diff --git a/docs-shopify.dev/commands/app-bulk-cancel.doc.ts b/docs-shopify.dev/commands/app-bulk-cancel.doc.ts new file mode 100644 index 00000000000..184427c825e --- /dev/null +++ b/docs-shopify.dev/commands/app-bulk-cancel.doc.ts @@ -0,0 +1,34 @@ +// This is an autogenerated file. Don't edit this file manually. +import {ReferenceEntityTemplateSchema} from '@shopify/generate-docs' + +const data: ReferenceEntityTemplateSchema = { + name: 'app bulk cancel', + description: `Cancels a running bulk operation by ID.`, + overviewPreviewDescription: `Cancel a bulk operation.`, + type: 'command', + isVisualComponent: false, + defaultExample: { + codeblock: { + tabs: [ + { + title: 'app bulk cancel', + code: './examples/app-bulk-cancel.example.sh', + language: 'bash', + }, + ], + title: 'app bulk cancel', + }, + }, + definitions: [ + { + title: 'Flags', + description: 'The following flags are available for the `app bulk cancel` command:', + type: 'appbulkcancel', + }, + ], + category: 'app', + related: [ + ], +} + +export default data \ No newline at end of file diff --git a/docs-shopify.dev/commands/examples/app-bulk-cancel.example.sh b/docs-shopify.dev/commands/examples/app-bulk-cancel.example.sh new file mode 100644 index 00000000000..1feb4eaef61 --- /dev/null +++ b/docs-shopify.dev/commands/examples/app-bulk-cancel.example.sh @@ -0,0 +1 @@ +shopify app bulk cancel [flags] \ No newline at end of file diff --git a/docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts b/docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts new file mode 100644 index 00000000000..5bb81f2b196 --- /dev/null +++ b/docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts @@ -0,0 +1,50 @@ +// This is an autogenerated file. Don't edit this file manually. +export interface appbulkcancel { + /** + * The Client ID of your app. + * @environment SHOPIFY_FLAG_CLIENT_ID + */ + '--client-id '?: string + + /** + * The name of the app configuration. + * @environment SHOPIFY_FLAG_APP_CONFIG + */ + '-c, --config '?: string + + /** + * The bulk operation ID to cancel (numeric ID or full GID). + * @environment SHOPIFY_FLAG_ID + */ + '--id ': string + + /** + * Disable color output. + * @environment SHOPIFY_FLAG_NO_COLOR + */ + '--no-color'?: '' + + /** + * The path to your app directory. + * @environment SHOPIFY_FLAG_PATH + */ + '--path '?: string + + /** + * Reset all your settings. + * @environment SHOPIFY_FLAG_RESET + */ + '--reset'?: '' + + /** + * The store domain. Must be an existing dev store. + * @environment SHOPIFY_FLAG_STORE + */ + '-s, --store '?: string + + /** + * Increase the verbosity of the output. + * @environment SHOPIFY_FLAG_VERBOSE + */ + '--verbose'?: '' +} diff --git a/docs-shopify.dev/generated/generated_docs_data.json b/docs-shopify.dev/generated/generated_docs_data.json index 61d97738e26..5d51044f3a6 100644 --- a/docs-shopify.dev/generated/generated_docs_data.json +++ b/docs-shopify.dev/generated/generated_docs_data.json @@ -100,6 +100,115 @@ "category": "app", "related": [] }, + { + "name": "app bulk cancel", + "description": "Cancels a running bulk operation by ID.", + "overviewPreviewDescription": "Cancel a bulk operation.", + "type": "command", + "isVisualComponent": false, + "defaultExample": { + "codeblock": { + "tabs": [ + { + "title": "app bulk cancel", + "code": "shopify app bulk cancel [flags]", + "language": "bash" + } + ], + "title": "app bulk cancel" + } + }, + "definitions": [ + { + "title": "Flags", + "description": "The following flags are available for the `app bulk cancel` command:", + "type": "appbulkcancel", + "typeDefinitions": { + "appbulkcancel": { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "name": "appbulkcancel", + "description": "", + "members": [ + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--client-id ", + "value": "string", + "description": "The Client ID of your app.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_CLIENT_ID" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--id ", + "value": "string", + "description": "The bulk operation ID to cancel (numeric ID or full GID).", + "environmentValue": "SHOPIFY_FLAG_ID" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--no-color", + "value": "\"\"", + "description": "Disable color output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_NO_COLOR" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--path ", + "value": "string", + "description": "The path to your app directory.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_PATH" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--reset", + "value": "\"\"", + "description": "Reset all your settings.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_RESET" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "--verbose", + "value": "\"\"", + "description": "Increase the verbosity of the output.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_VERBOSE" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-c, --config ", + "value": "string", + "description": "The name of the app configuration.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_APP_CONFIG" + }, + { + "filePath": "docs-shopify.dev/commands/interfaces/app-bulk-cancel.interface.ts", + "syntaxKind": "PropertySignature", + "name": "-s, --store ", + "value": "string", + "description": "The store domain. Must be an existing dev store.", + "isOptional": true, + "environmentValue": "SHOPIFY_FLAG_STORE" + } + ], + "value": "export interface appbulkcancel {\n /**\n * The Client ID of your app.\n * @environment SHOPIFY_FLAG_CLIENT_ID\n */\n '--client-id '?: string\n\n /**\n * The name of the app configuration.\n * @environment SHOPIFY_FLAG_APP_CONFIG\n */\n '-c, --config '?: string\n\n /**\n * The bulk operation ID to cancel (numeric ID or full GID).\n * @environment SHOPIFY_FLAG_ID\n */\n '--id ': string\n\n /**\n * Disable color output.\n * @environment SHOPIFY_FLAG_NO_COLOR\n */\n '--no-color'?: ''\n\n /**\n * The path to your app directory.\n * @environment SHOPIFY_FLAG_PATH\n */\n '--path '?: string\n\n /**\n * Reset all your settings.\n * @environment SHOPIFY_FLAG_RESET\n */\n '--reset'?: ''\n\n /**\n * The store domain. Must be an existing dev store.\n * @environment SHOPIFY_FLAG_STORE\n */\n '-s, --store '?: string\n\n /**\n * Increase the verbosity of the output.\n * @environment SHOPIFY_FLAG_VERBOSE\n */\n '--verbose'?: ''\n}" + } + } + } + ], + "category": "app", + "related": [] + }, { "name": "app bulk execute", "description": "Executes an Admin API GraphQL query or mutation on the specified store, as a bulk operation. Mutations are only allowed on dev stores.\n\n Bulk operations allow you to process large amounts of data asynchronously. Learn more about [bulk query operations](/docs/api/usage/bulk-operations/queries) and [bulk mutation operations](/docs/api/usage/bulk-operations/imports).\n\n Use [`bulk status`](/docs/api/shopify-cli/app/app-bulk-status) to check the status of your bulk operations.", diff --git a/packages/app/src/cli/commands/app/bulk/cancel.ts b/packages/app/src/cli/commands/app/bulk/cancel.ts index 2b39e9ef898..23f1cceb19f 100644 --- a/packages/app/src/cli/commands/app/bulk/cancel.ts +++ b/packages/app/src/cli/commands/app/bulk/cancel.ts @@ -12,8 +12,6 @@ export default class BulkCancel extends AppLinkedCommand { static description = 'Cancels a running bulk operation by ID.' - static hidden = true - static flags = { ...globalFlags, ...appFlags, diff --git a/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.test.ts b/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.test.ts index aae1203e4da..efee9318fe7 100644 --- a/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.test.ts +++ b/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.test.ts @@ -140,7 +140,7 @@ describe('cancelBulkOperation', () => { await cancelBulkOperation({organization: mockOrganization, storeFqdn, operationId, remoteApp: mockRemoteApp}) expect(renderError).toHaveBeenCalledWith({ - headline: 'Bulk operation cancellation errors.', + headline: 'Failed to cancel bulk operation.', body: 'id: Operation not found', }) }) diff --git a/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.ts b/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.ts index dab844a03f0..6badc0d5f26 100644 --- a/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.ts +++ b/packages/app/src/cli/services/bulk-operations/cancel-bulk-operation.ts @@ -43,7 +43,7 @@ export async function cancelBulkOperation(options: CancelBulkOperationOptions): }) if (response.bulkOperationCancel?.userErrors?.length) { - renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, 'Bulk operation cancellation errors.') + renderBulkOperationUserErrors(response.bulkOperationCancel.userErrors, 'Failed to cancel bulk operation.') return } diff --git a/packages/cli/README.md b/packages/cli/README.md index efc1b52575f..3c02585b24c 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -1,6 +1,7 @@ # Commands * [`shopify app build`](#shopify-app-build) +* [`shopify app bulk cancel`](#shopify-app-bulk-cancel) * [`shopify app bulk execute`](#shopify-app-bulk-execute) * [`shopify app bulk status`](#shopify-app-bulk-status) * [`shopify app config link`](#shopify-app-config-link) @@ -121,6 +122,31 @@ DESCRIPTION extension to ensure that it's valid. ``` +## `shopify app bulk cancel` + +Cancel a bulk operation. + +``` +USAGE + $ shopify app bulk cancel --id [--client-id | -c ] [--no-color] [--path ] [--reset | + ] [-s ] [--verbose] + +FLAGS + -c, --config= The name of the app configuration. + -s, --store= The store domain. Must be an existing dev store. + --client-id= The Client ID of your app. + --id= (required) The bulk operation ID to cancel (numeric ID or full GID). + --no-color Disable color output. + --path= The path to your app directory. + --reset Reset all your settings. + --verbose Increase the verbosity of the output. + +DESCRIPTION + Cancel a bulk operation. + + Cancels a running bulk operation by ID. +``` + ## `shopify app bulk execute` Execute bulk operations. diff --git a/packages/cli/oclif.manifest.json b/packages/cli/oclif.manifest.json index e5d502df4c2..bfc1c73c123 100644 --- a/packages/cli/oclif.manifest.json +++ b/packages/cli/oclif.manifest.json @@ -172,7 +172,6 @@ } }, "hasDynamicHelp": false, - "hidden": true, "hiddenAliases": [ ], "id": "app:bulk:cancel", diff --git a/packages/features/snapshots/commands.txt b/packages/features/snapshots/commands.txt index 3a960471837..5a978dfe6ba 100644 --- a/packages/features/snapshots/commands.txt +++ b/packages/features/snapshots/commands.txt @@ -1,6 +1,7 @@ ├─ app │ ├─ build │ ├─ bulk +│ │ ├─ cancel │ │ ├─ execute │ │ └─ status │ ├─ config