@shopify/cli-kit 3.0.21 → 3.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { AbortController, AbortSignal } from 'abort-controller';
2
- import { RequestDocument, Variables } from 'graphql-request';
3
2
  import { Writable, Readable } from 'node:stream';
3
+ import { ExtendableError } from 'ts-error';
4
+ import { RequestDocument, Variables } from 'graphql-request';
4
5
  import * as _oclif_core_lib_interfaces from '@oclif/core/lib/interfaces';
5
6
  import { Plugin } from '@oclif/core/lib/interfaces';
6
7
  import * as fastify from 'fastify';
@@ -100,357 +101,781 @@ declare namespace analytics {
100
101
  };
101
102
  }
102
103
 
104
+ declare const genericConfigurationFileNames: {
105
+ readonly yarn: {
106
+ readonly lockfile: "yarn.lock";
107
+ };
108
+ readonly pnpm: {
109
+ readonly lockfile: "pnpm-lock.yaml";
110
+ };
111
+ };
112
+ declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
113
+ declare type DependencyManager = typeof dependencyManager[number];
114
+ declare const PackageJsonNotFoundError: (directory: string) => Abort;
103
115
  /**
104
- * A scope supported by the Shopify Admin API.
105
- */
106
- declare type AdminAPIScope = 'graphql' | 'themes' | 'collaborator' | string;
107
- /**
108
- * It represents the options to authenticate against the Shopify Admin API.
109
- */
110
- interface AdminAPIOAuthOptions {
111
- /** Store to request permissions for */
112
- storeFqdn: string;
113
- /** List of scopes to request permissions for */
114
- scopes: AdminAPIScope[];
115
- }
116
- /**
117
- * A scope supported by the Partners API.
118
- */
119
- declare type PartnersAPIScope = 'cli' | string;
120
- interface PartnersAPIOAuthOptions {
121
- /** List of scopes to request permissions for */
122
- scopes: PartnersAPIScope[];
123
- }
124
- /**
125
- * A scope supported by the Storefront Renderer API.
116
+ * Returns the dependency manager used to run the create workflow.
117
+ * @param env {Object} The environment variables of the process in which the CLI runs.
118
+ * @returns The dependency manager
126
119
  */
127
- declare type StorefrontRendererScope = 'devtools' | string;
128
- interface StorefrontRendererAPIOAuthOptions {
129
- /** List of scopes to request permissions for */
130
- scopes: StorefrontRendererScope[];
131
- }
120
+ declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
132
121
  /**
133
- * It represents the authentication requirements and
134
- * is the input necessary to trigger the authentication
135
- * flow.
122
+ * Returns the dependency manager used by an existing project.
123
+ * @param directory {string} The root directory of the project.
124
+ * @returns The dependency manager
136
125
  */
137
- interface OAuthApplications {
138
- adminApi?: AdminAPIOAuthOptions;
139
- storefrontRendererApi?: StorefrontRendererAPIOAuthOptions;
140
- partnersApi?: PartnersAPIOAuthOptions;
141
- }
142
- interface AdminSession {
143
- token: string;
144
- storeFqdn: string;
145
- }
146
- interface OAuthSession {
147
- admin?: AdminSession;
148
- partners?: string;
149
- storefront?: string;
126
+ declare function getDependencyManager(directory: string): Promise<DependencyManager>;
127
+ interface InstallNPMDependenciesRecursivelyOptions {
128
+ /**
129
+ * The dependency manager to use to install the dependencies.
130
+ */
131
+ dependencyManager: DependencyManager;
132
+ /**
133
+ * The directory from where we'll find package.json's recursively
134
+ */
135
+ directory: string;
136
+ /**
137
+ * Specifies the maximum depth of the glob search.
138
+ */
139
+ deep?: number;
150
140
  }
151
141
  /**
152
- * Ensure that we have a valid session to access the Partners API.
153
- * If SHOPIFY_CLI_PARTNERS_TOKEN exists, that token will be used to obtain a valid Partners Token
154
- * If SHOPIFY_CLI_PARTNERS_TOKEN exists, scopes will be ignored
155
- * @param scopes {string[]} Optional array of extra scopes to authenticate with.
156
- * @returns {Promise<string>} The access token for the Partners API.
142
+ * This function traverses down a directory tree to find directories containing a package.json
143
+ * and installs the dependencies if needed. To know if it's needed, it uses the "check" command
144
+ * provided by dependency managers.
145
+ * @param options {InstallNPMDependenciesRecursivelyOptions} Options to install dependencies recursively.
157
146
  */
158
- declare function ensureAuthenticatedPartners(scopes?: string[], env?: NodeJS.ProcessEnv): Promise<string>;
147
+ declare function installNPMDependenciesRecursively(options: InstallNPMDependenciesRecursivelyOptions): Promise<void>;
159
148
  /**
160
- * Ensure that we have a valid session to access the Storefront API.
161
- * @param scopes {string[]} Optional array of extra scopes to authenticate with.
162
- * @returns {Promise<string>} The access token for the Storefront API.
149
+ * Installs the dependencies in the given directory.
150
+ * @param directory {string} The directory that contains the package.json
151
+ * @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
152
+ * @param stdout {Writable} Standard output stream.
153
+ * @param stderr {Writable} Standard error stream.
154
+ * @param signal {AbortSignal} Abort signal.
155
+ * @returns stderr {Writable} Standard error stream.
163
156
  */
164
- declare function ensureAuthenticatedStorefront(scopes?: string[]): Promise<string>;
157
+ declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable, signal?: AbortSignal): Promise<void>;
165
158
  /**
166
- * Ensure that we have a valid Admin session for the given store.
167
- * @param store {string} Store fqdn to request auth for
168
- * @param scopes {string[]} Optional array of extra scopes to authenticate with.
169
- * @returns {Promise<string>} The access token for the Admin API
159
+ * Returns the name of the package configured in its package.json
160
+ * @param packageJsonPath {string} Path to the package.json file
161
+ * @returns A promise that resolves with the name.
170
162
  */
171
- declare function ensureAuthenticatedAdmin(store: string, scopes?: string[]): Promise<AdminSession>;
163
+ declare function getPackageName(packageJsonPath: string): Promise<string>;
172
164
  /**
173
- * This method ensures that we have a valid session to authenticate against the given applications using the provided scopes.
174
- * @param applications {OAuthApplications} An object containing the applications we need to be authenticated with.
175
- * @returns {OAuthSession} An instance with the access tokens organized by application.
165
+ * Returns the list of production and dev dependencies of a package.json
166
+ * @param packageJsonPath {string} Path to the package.json file
167
+ * @returns A promise that resolves with the list of dependencies.
176
168
  */
177
- declare function ensureAuthenticated(applications: OAuthApplications, env?: NodeJS.ProcessEnv): Promise<OAuthSession>;
178
- declare function logout(): Promise<void>;
179
-
180
- type session_OAuthApplications = OAuthApplications;
181
- type session_AdminSession = AdminSession;
182
- type session_OAuthSession = OAuthSession;
183
- declare const session_ensureAuthenticatedPartners: typeof ensureAuthenticatedPartners;
184
- declare const session_ensureAuthenticatedStorefront: typeof ensureAuthenticatedStorefront;
185
- declare const session_ensureAuthenticatedAdmin: typeof ensureAuthenticatedAdmin;
186
- declare const session_ensureAuthenticated: typeof ensureAuthenticated;
187
- declare const session_logout: typeof logout;
188
- declare namespace session {
189
- export {
190
- session_OAuthApplications as OAuthApplications,
191
- session_AdminSession as AdminSession,
192
- session_OAuthSession as OAuthSession,
193
- session_ensureAuthenticatedPartners as ensureAuthenticatedPartners,
194
- session_ensureAuthenticatedStorefront as ensureAuthenticatedStorefront,
195
- session_ensureAuthenticatedAdmin as ensureAuthenticatedAdmin,
196
- session_ensureAuthenticated as ensureAuthenticated,
197
- session_logout as logout,
198
- };
169
+ declare function getDependencies(packageJsonPath: string): Promise<{
170
+ [key: string]: string;
171
+ }>;
172
+ declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
173
+ declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, version: string): string;
174
+ interface PackageJSONContents {
175
+ name: string;
176
+ version?: string;
177
+ dependencies?: {
178
+ [key: string]: string;
179
+ };
180
+ devDependencies?: {
181
+ [key: string]: string;
182
+ };
199
183
  }
200
-
201
- declare function request$1<T>(query: RequestDocument, session: AdminSession, variables?: Variables): Promise<T>;
202
-
203
- declare namespace admin {
204
- export {
205
- request$1 as request,
206
- };
184
+ declare function packageJSONContents(packageJsonPath: string): Promise<PackageJSONContents>;
185
+ declare type DependencyType = 'dev' | 'prod' | 'peer';
186
+ interface AddNPMDependenciesIfNeededOptions {
187
+ /** How dependencies should be added */
188
+ type: DependencyType;
189
+ /** The dependency manager to use to add dependencies */
190
+ dependencyManager: DependencyManager;
191
+ /** The directory that contains the package.json where dependencies will be added */
192
+ directory: string;
193
+ /** Standard output coming from the underlying installation process */
194
+ stdout?: Writable;
195
+ /** Standard error coming from the underlying installation process */
196
+ stderr?: Writable;
197
+ /** Abort signal to stop the process */
198
+ signal?: AbortSignal;
199
+ }
200
+ interface DependencyVersion {
201
+ name: string;
202
+ version: string | undefined;
207
203
  }
208
-
209
- declare function request<T>(query: RequestDocument, token: string, variables?: Variables): Promise<T>;
210
- /**
211
- * Check if the given token is revoked and no longer valid to interact with the Partners API.
212
- * @param token {string} - The token to check
213
- * @returns {Promise<boolean>} - True if the token is revoked, false otherwise
214
- */
215
- declare function checkIfTokenIsRevoked(token: string): Promise<boolean>;
216
204
  /**
217
- * Function queries are proxied through the script service proxy.
218
- * To execute a query, we encapsulate it inside another query (including the variables)
219
- * This is done automatically, you just need to provide the query and the variables.
220
- *
221
- * @param apiKey {string} APIKey of the app where the query will be executed.
222
- * @param query {any} GraphQL query to execute.
223
- * @param token {string} Partners token
224
- * @param variables {any} GraphQL variables to pass to the query.
225
- * @returns {Promise<T>} The response of the query.
205
+ * Adds dependencies to a Node project (i.e. a project that has a package.json)
206
+ * @param dependencies {string[]} List of dependencies to be added.
207
+ * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
226
208
  */
227
- declare function functionProxyRequest<T>(apiKey: string, query: unknown, token: string, variables?: unknown): Promise<T>;
209
+ declare function addNPMDependenciesIfNeeded(dependencies: DependencyVersion[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
210
+ declare function addNPMDependenciesWithoutVersionIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
211
+ declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
228
212
 
229
- declare const partners$2_request: typeof request;
230
- declare const partners$2_checkIfTokenIsRevoked: typeof checkIfTokenIsRevoked;
231
- declare const partners$2_functionProxyRequest: typeof functionProxyRequest;
232
- declare namespace partners$2 {
213
+ declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
214
+ declare const dependency_dependencyManager: typeof dependencyManager;
215
+ type dependency_DependencyManager = DependencyManager;
216
+ declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
217
+ declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
218
+ declare const dependency_getDependencyManager: typeof getDependencyManager;
219
+ declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
220
+ declare const dependency_install: typeof install;
221
+ declare const dependency_getPackageName: typeof getPackageName;
222
+ declare const dependency_getDependencies: typeof getDependencies;
223
+ declare const dependency_checkForNewVersion: typeof checkForNewVersion;
224
+ declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
225
+ declare const dependency_packageJSONContents: typeof packageJSONContents;
226
+ type dependency_DependencyType = DependencyType;
227
+ type dependency_DependencyVersion = DependencyVersion;
228
+ declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
229
+ declare const dependency_addNPMDependenciesWithoutVersionIfNeeded: typeof addNPMDependenciesWithoutVersionIfNeeded;
230
+ declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
231
+ declare namespace dependency {
233
232
  export {
234
- partners$2_request as request,
235
- partners$2_checkIfTokenIsRevoked as checkIfTokenIsRevoked,
236
- partners$2_functionProxyRequest as functionProxyRequest,
233
+ dependency_genericConfigurationFileNames as genericConfigurationFileNames,
234
+ dependency_dependencyManager as dependencyManager,
235
+ dependency_DependencyManager as DependencyManager,
236
+ dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
237
+ dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
238
+ dependency_getDependencyManager as getDependencyManager,
239
+ dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
240
+ dependency_install as install,
241
+ dependency_getPackageName as getPackageName,
242
+ dependency_getDependencies as getDependencies,
243
+ dependency_checkForNewVersion as checkForNewVersion,
244
+ dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
245
+ dependency_packageJSONContents as packageJSONContents,
246
+ dependency_DependencyType as DependencyType,
247
+ dependency_DependencyVersion as DependencyVersion,
248
+ dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
249
+ dependency_addNPMDependenciesWithoutVersionIfNeeded as addNPMDependenciesWithoutVersionIfNeeded,
250
+ dependency_addLatestNPMDependencies as addLatestNPMDependencies,
237
251
  };
238
252
  }
239
253
 
240
- declare const FindOrganizationQuery: string;
241
- interface FindOrganizationQuerySchema {
242
- organizations: {
243
- nodes: {
244
- id: string;
245
- businessName: string;
246
- website: string;
247
- appsNext: boolean;
248
- apps: {
249
- nodes: {
250
- id: string;
251
- title: string;
252
- apiKey: string;
253
- organizationId: string;
254
- apiSecretKeys: {
255
- secret: string;
256
- }[];
257
- appType: string;
258
- }[];
259
- };
260
- }[];
261
- };
254
+ declare function initiateLogging({ logDir, filename, }: {
255
+ logDir?: string;
256
+ filename?: string;
257
+ }): void;
258
+ declare enum ContentTokenType {
259
+ Raw = 0,
260
+ Command = 1,
261
+ Json = 2,
262
+ Path = 3,
263
+ Link = 4,
264
+ Heading = 5,
265
+ SubHeading = 6,
266
+ Italic = 7,
267
+ ErrorText = 8,
268
+ Yellow = 9,
269
+ Cyan = 10,
270
+ Magenta = 11,
271
+ Green = 12
262
272
  }
263
-
264
- interface AllOrganizationsQuerySchemaOrganization {
265
- id: string;
266
- businessName: string;
267
- website: string;
268
- appsNext: boolean;
273
+ interface ContentMetadata {
274
+ link?: string;
269
275
  }
270
- interface AllOrganizationsQuerySchema {
271
- organizations: {
272
- nodes: AllOrganizationsQuerySchemaOrganization[];
273
- };
276
+ declare class ContentToken {
277
+ type: ContentTokenType;
278
+ value: Message;
279
+ metadata: ContentMetadata;
280
+ constructor(value: Message, metadata: ContentMetadata | undefined, type: ContentTokenType);
274
281
  }
275
- declare const AllOrganizationsQuery: string;
276
-
277
- declare const CreateAppQuery: string;
278
- interface CreateAppQueryVariables {
279
- org: number;
280
- title: string;
281
- appUrl: string;
282
- redir: string[];
283
- type: string;
282
+ declare const token: {
283
+ raw: (value: Message) => ContentToken;
284
+ genericShellCommand: (value: Message) => ContentToken;
285
+ json: (value: any) => ContentToken;
286
+ path: (value: Message) => ContentToken;
287
+ link: (value: Message, link: string) => ContentToken;
288
+ heading: (value: Message) => ContentToken;
289
+ subheading: (value: Message) => ContentToken;
290
+ italic: (value: Message) => ContentToken;
291
+ errorText: (value: Message) => ContentToken;
292
+ cyan: (value: Message) => ContentToken;
293
+ yellow: (value: Message) => ContentToken;
294
+ magenta: (value: Message) => ContentToken;
295
+ green: (value: Message) => ContentToken;
296
+ packagejsonScript: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
297
+ successIcon: () => ContentToken;
298
+ failIcon: () => ContentToken;
299
+ };
300
+ declare class TokenizedString {
301
+ value: string;
302
+ constructor(value: string);
284
303
  }
285
- interface CreateAppQuerySchema {
286
- appCreate: {
287
- app: {
288
- id: string;
289
- apiKey: string;
290
- title: string;
291
- applicationUrl: string;
292
- redirectUrlWhitelist: string[];
293
- organizationId: string;
294
- apiSecretKeys: {
295
- secret: string;
296
- }[];
297
- appType: string;
298
- };
299
- userErrors: {
300
- field: string[];
301
- message: string;
302
- }[];
303
- };
304
+ declare type Message = string | TokenizedString;
305
+ declare function content(strings: TemplateStringsArray, ...keys: (ContentToken | string)[]): TokenizedString;
306
+ /** Log levels */
307
+ declare type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
308
+ /**
309
+ *
310
+ * @returns {LogLevel} It returns the log level set by the user.
311
+ */
312
+ declare const currentLogLevel: () => LogLevel;
313
+ declare const shouldOutput: (logLevel: LogLevel) => boolean;
314
+ /**
315
+ * Ouputs information to the user. This is akin to "console.log"
316
+ * Info messages don't get additional formatting.
317
+ * Note: Info messages are sent through the standard output.
318
+ * @param content {string} The content to be output to the user.
319
+ */
320
+ declare const info: (content: Message) => void;
321
+ /**
322
+ * Outputs a success message to the user.
323
+ * Success message receive a special formatting to make them stand out in the console.
324
+ * Note: Success messages are sent through the standard output.
325
+ * @param content {string} The content to be output to the user.
326
+ */
327
+ declare const success: (content: Message) => void;
328
+ /**
329
+ * Outputs a completed message to the user.
330
+ * Completed message receive a special formatting to make them stand out in the console.
331
+ * Note: Completed messages are sent through the standard output.
332
+ * @param content {string} The content to be output to the user.
333
+ */
334
+ declare const completed: (content: Message) => void;
335
+ /**
336
+ * Ouputs debug information to the user. By default these output is hidden unless the user calls the CLI with --verbose.
337
+ * Debug messages don't get additional formatting.
338
+ * Note: Debug messages are sent through the standard output.
339
+ * @param content {string} The content to be output to the user.
340
+ */
341
+ declare const debug: (content: Message) => void;
342
+ /**
343
+ * Outputs a warning message to the user.
344
+ * Warning messages receive a special formatting to make them stand out in the console.
345
+ * Note: Warning messages are sent through the standard output.
346
+ * @param content {string} The content to be output to the user.
347
+ */
348
+ declare const warn: (content: Message) => void;
349
+ /**
350
+ * Prints a new line in the terminal.
351
+ */
352
+ declare const newline: () => void;
353
+ /**
354
+ * Formats and outputs a fatal error.
355
+ * Note: This API is not intended to be used internally. If you want to
356
+ * abort the execution due to an error, raise a fatal error and let the
357
+ * error handler handle and format it.
358
+ * @param content {Fatal} The fatal error to be output.
359
+ */
360
+ declare const error$1: (content: Fatal) => Promise<void>;
361
+ declare function stringifyMessage(message: Message): string;
362
+ interface OutputProcess {
363
+ /** The prefix to include in the logs
364
+ * [vite] Output coming from Vite
365
+ */
366
+ prefix: string;
367
+ /**
368
+ * A callback to invoke the process. stdout and stderr should be used
369
+ * to send standard output and error data that gets formatted with the
370
+ * right prefix.
371
+ */
372
+ action: (stdout: Writable, stderr: Writable, signal: AbortSignal) => Promise<void>;
304
373
  }
374
+ /**
375
+ * Use this function when you have multiple concurrent processes that send data events
376
+ * and we need to output them ensuring that they can visually differenciated by the user.
377
+ *
378
+ * @param processes {OutputProcess[]} A list of processes to run concurrently.
379
+ */
380
+ declare function concurrent(processes: OutputProcess[], callback?: ((signal: AbortSignal) => void) | undefined): Promise<void>;
381
+ declare function unstyled(message: string): string;
382
+ declare function shouldDisplayColors(): boolean;
383
+ declare function pageLogs(): Promise<void>;
305
384
 
306
- declare const UpdateURLsQuery: string;
307
- interface UpdateURLsQueryVariables {
308
- apiKey: string;
309
- appUrl: string;
310
- redir: string[];
311
- }
312
- interface UpdateURLsQuerySchema {
313
- appUpdate: {
314
- userErrors: {
315
- field: string[];
316
- message: string;
317
- }[];
318
- };
385
+ declare const output_initiateLogging: typeof initiateLogging;
386
+ declare const output_token: typeof token;
387
+ type output_TokenizedString = TokenizedString;
388
+ declare const output_TokenizedString: typeof TokenizedString;
389
+ type output_Message = Message;
390
+ declare const output_content: typeof content;
391
+ type output_LogLevel = LogLevel;
392
+ declare const output_currentLogLevel: typeof currentLogLevel;
393
+ declare const output_shouldOutput: typeof shouldOutput;
394
+ declare const output_info: typeof info;
395
+ declare const output_success: typeof success;
396
+ declare const output_completed: typeof completed;
397
+ declare const output_debug: typeof debug;
398
+ declare const output_warn: typeof warn;
399
+ declare const output_newline: typeof newline;
400
+ declare const output_stringifyMessage: typeof stringifyMessage;
401
+ type output_OutputProcess = OutputProcess;
402
+ declare const output_concurrent: typeof concurrent;
403
+ declare const output_unstyled: typeof unstyled;
404
+ declare const output_shouldDisplayColors: typeof shouldDisplayColors;
405
+ declare const output_pageLogs: typeof pageLogs;
406
+ declare namespace output {
407
+ export {
408
+ output_initiateLogging as initiateLogging,
409
+ output_token as token,
410
+ output_TokenizedString as TokenizedString,
411
+ output_Message as Message,
412
+ output_content as content,
413
+ output_LogLevel as LogLevel,
414
+ output_currentLogLevel as currentLogLevel,
415
+ output_shouldOutput as shouldOutput,
416
+ output_info as info,
417
+ output_success as success,
418
+ output_completed as completed,
419
+ output_debug as debug,
420
+ output_warn as warn,
421
+ output_newline as newline,
422
+ error$1 as error,
423
+ output_stringifyMessage as stringifyMessage,
424
+ output_OutputProcess as OutputProcess,
425
+ output_concurrent as concurrent,
426
+ output_unstyled as unstyled,
427
+ output_shouldDisplayColors as shouldDisplayColors,
428
+ output_pageLogs as pageLogs,
429
+ };
319
430
  }
320
431
 
321
- declare const FindAppQuery: string;
322
- interface FindAppQuerySchema {
323
- app: {
324
- id: string;
325
- title: string;
326
- apiKey: string;
327
- organizationId: string;
328
- apiSecretKeys: {
329
- secret: string;
330
- }[];
331
- appType: string;
332
- };
432
+ declare enum FatalErrorType {
433
+ Abort = 0,
434
+ AbortSilent = 1,
435
+ Bug = 2
333
436
  }
334
-
335
- declare const ExtensionUpdateDraftMutation: string;
336
- interface ExtensionUpdateDraftInput {
337
- apiKey: string;
338
- config: string;
339
- context: string | undefined;
340
- registrationId: string;
437
+ declare class CancelExecution extends Error {
341
438
  }
342
- interface ExtensionUpdateDraftPayload {
343
- clientMutationId: string;
344
- extensionVersion: ExtensionVersion;
345
- userErrors: {
346
- field: string[];
347
- message: string;
348
- }[];
439
+ /**
440
+ * A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
441
+ * There shouldn't be code that catches fatal errors.
442
+ */
443
+ declare abstract class Fatal extends Error {
444
+ tryMessage: string | null;
445
+ type: FatalErrorType;
446
+ constructor(message: Message, type: FatalErrorType, tryMessage?: Message | null);
349
447
  }
350
- interface ExtensionVersion {
351
- config: string;
352
- context: string;
353
- id: string;
354
- lastUserInteractionAt: string;
355
- location: string;
356
- registrationId: string;
357
- registrationUuid: string;
358
- uuid: string;
359
- validationErrors: {
360
- field: string[];
361
- message: string;
362
- }[];
363
- versionTag: string;
448
+ /**
449
+ * An abort error is a fatal error that shouldn't be reported as a bug.
450
+ * Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
451
+ */
452
+ declare class Abort extends Fatal {
453
+ constructor(message: Message, tryMessage?: Message | null);
364
454
  }
365
- interface ExtensionUpdateSchema {
366
- extensionUpdateDraft: ExtensionUpdateDraftPayload;
455
+ declare class AbortSilent extends Fatal {
456
+ constructor();
367
457
  }
368
-
369
- declare const GenerateSignedUploadUrl: string;
370
- interface GenerateSignedUploadUrlVariables {
371
- apiKey: string;
372
- deploymentUuid: string;
373
- bundleFormat: number;
458
+ /**
459
+ * A bug error is an error that represents a bug and therefore should be reported.
460
+ */
461
+ declare class Bug extends Fatal {
462
+ constructor(message: Message, tryMessage?: string | null);
374
463
  }
375
- interface GenerateSignedUploadUrlSchema {
376
- deploymentGenerateSignedUploadUrl: {
377
- signedUploadUrl: string;
378
- userErrors: {
379
- field: string[];
380
- message: string;
381
- }[];
382
- };
464
+ /**
465
+ * A function that handles errors that blow up in the CLI.
466
+ * @param error Error to be handled.
467
+ * @returns A promise that resolves with the error passed.
468
+ */
469
+ declare function handler(error: Error): Promise<Error>;
470
+ declare function mapper(error: Error): Promise<Error>;
471
+ declare function isFatal(error: Error): boolean;
472
+ declare function shouldReport(error: Error): boolean;
473
+
474
+ type error_CancelExecution = CancelExecution;
475
+ declare const error_CancelExecution: typeof CancelExecution;
476
+ type error_Fatal = Fatal;
477
+ declare const error_Fatal: typeof Fatal;
478
+ type error_Abort = Abort;
479
+ declare const error_Abort: typeof Abort;
480
+ type error_AbortSilent = AbortSilent;
481
+ declare const error_AbortSilent: typeof AbortSilent;
482
+ type error_Bug = Bug;
483
+ declare const error_Bug: typeof Bug;
484
+ declare const error_handler: typeof handler;
485
+ declare const error_mapper: typeof mapper;
486
+ declare const error_isFatal: typeof isFatal;
487
+ declare const error_shouldReport: typeof shouldReport;
488
+ declare const error_ExtendableError: typeof ExtendableError;
489
+ declare const error_AbortSignal: typeof AbortSignal;
490
+ declare namespace error {
491
+ export {
492
+ error_CancelExecution as CancelExecution,
493
+ error_Fatal as Fatal,
494
+ error_Abort as Abort,
495
+ error_AbortSilent as AbortSilent,
496
+ error_Bug as Bug,
497
+ error_handler as handler,
498
+ error_mapper as mapper,
499
+ error_isFatal as isFatal,
500
+ error_shouldReport as shouldReport,
501
+ error_ExtendableError as ExtendableError,
502
+ error_AbortSignal as AbortSignal,
503
+ };
383
504
  }
384
505
 
385
- declare const CreateDeployment: string;
386
- interface ExtensionSettings {
387
- uuid: string;
388
- config: string;
389
- context: string;
506
+ /**
507
+ * A scope supported by the Shopify Admin API.
508
+ */
509
+ declare type AdminAPIScope = 'graphql' | 'themes' | 'collaborator' | string;
510
+ /**
511
+ * It represents the options to authenticate against the Shopify Admin API.
512
+ */
513
+ interface AdminAPIOAuthOptions {
514
+ /** Store to request permissions for */
515
+ storeFqdn: string;
516
+ /** List of scopes to request permissions for */
517
+ scopes: AdminAPIScope[];
390
518
  }
391
- interface CreateDeploymentVariables {
392
- apiKey: string;
393
- uuid: string;
394
- bundleUrl: string;
395
- extensions: ExtensionSettings[];
519
+ /**
520
+ * A scope supported by the Partners API.
521
+ */
522
+ declare type PartnersAPIScope = 'cli' | string;
523
+ interface PartnersAPIOAuthOptions {
524
+ /** List of scopes to request permissions for */
525
+ scopes: PartnersAPIScope[];
396
526
  }
397
- interface CreateDeploymentSchema {
398
- deploymentCreate: {
399
- deployment: {
400
- uuid: string;
401
- };
402
- userErrors: {
403
- field: string[];
404
- message: string;
405
- }[];
406
- };
527
+ /**
528
+ * A scope supported by the Storefront Renderer API.
529
+ */
530
+ declare type StorefrontRendererScope = 'devtools' | string;
531
+ interface StorefrontRendererAPIOAuthOptions {
532
+ /** List of scopes to request permissions for */
533
+ scopes: StorefrontRendererScope[];
407
534
  }
408
-
409
- declare const AllStoresByOrganizationQuery: string;
410
- interface AllStoresByOrganizationSchema {
411
- organizations: {
412
- nodes: {
413
- id: string;
414
- stores: {
415
- nodes: {
416
- shopId: string;
417
- link: string;
418
- shopDomain: string;
419
- shopName: string;
420
- transferDisabled: boolean;
421
- convertableToPartnerTest: boolean;
422
- }[];
423
- };
424
- }[];
425
- };
535
+ /**
536
+ * It represents the authentication requirements and
537
+ * is the input necessary to trigger the authentication
538
+ * flow.
539
+ */
540
+ interface OAuthApplications {
541
+ adminApi?: AdminAPIOAuthOptions;
542
+ storefrontRendererApi?: StorefrontRendererAPIOAuthOptions;
543
+ partnersApi?: PartnersAPIOAuthOptions;
544
+ }
545
+ interface AdminSession {
546
+ token: string;
547
+ storeFqdn: string;
548
+ }
549
+ interface OAuthSession {
550
+ admin?: AdminSession;
551
+ partners?: string;
552
+ storefront?: string;
426
553
  }
554
+ declare const PartnerOrganizationNotFoundError: () => Abort;
555
+ /**
556
+ * Ensure that we have a valid session to access the Partners API.
557
+ * If SHOPIFY_CLI_PARTNERS_TOKEN exists, that token will be used to obtain a valid Partners Token
558
+ * If SHOPIFY_CLI_PARTNERS_TOKEN exists, scopes will be ignored
559
+ * @param scopes {string[]} Optional array of extra scopes to authenticate with.
560
+ * @returns {Promise<string>} The access token for the Partners API.
561
+ */
562
+ declare function ensureAuthenticatedPartners(scopes?: string[], env?: NodeJS.ProcessEnv): Promise<string>;
563
+ /**
564
+ * Ensure that we have a valid session to access the Storefront API.
565
+ * @param scopes {string[]} Optional array of extra scopes to authenticate with.
566
+ * @returns {Promise<string>} The access token for the Storefront API.
567
+ */
568
+ declare function ensureAuthenticatedStorefront(scopes?: string[]): Promise<string>;
569
+ /**
570
+ * Ensure that we have a valid Admin session for the given store.
571
+ * @param store {string} Store fqdn to request auth for
572
+ * @param scopes {string[]} Optional array of extra scopes to authenticate with.
573
+ * @returns {Promise<string>} The access token for the Admin API
574
+ */
575
+ declare function ensureAuthenticatedAdmin(store: string, scopes?: string[]): Promise<AdminSession>;
576
+ /**
577
+ * This method ensures that we have a valid session to authenticate against the given applications using the provided scopes.
578
+ * @param applications {OAuthApplications} An object containing the applications we need to be authenticated with.
579
+ * @returns {OAuthSession} An instance with the access tokens organized by application.
580
+ */
581
+ declare function ensureAuthenticated(applications: OAuthApplications, env?: NodeJS.ProcessEnv): Promise<OAuthSession>;
582
+ declare function hasPartnerAccount(partnersToken: string): Promise<boolean>;
583
+ /**
584
+ * If the user creates an account from the Identity website, the created
585
+ * account won't get a Partner organization created. We need to detect that
586
+ * and take the user to create a partner organization.
587
+ * @param partnersToken {string} Partners token
588
+ */
589
+ declare function ensureUserHasPartnerAccount(partnersToken: string): Promise<void>;
590
+ declare function logout(): Promise<void>;
427
591
 
428
- declare const ConvertDevToTestStoreQuery: string;
429
- interface ConvertDevToTestStoreVariables {
430
- input: {
431
- organizationID: number;
432
- shopId: string;
433
- };
592
+ type session_OAuthApplications = OAuthApplications;
593
+ type session_AdminSession = AdminSession;
594
+ type session_OAuthSession = OAuthSession;
595
+ declare const session_PartnerOrganizationNotFoundError: typeof PartnerOrganizationNotFoundError;
596
+ declare const session_ensureAuthenticatedPartners: typeof ensureAuthenticatedPartners;
597
+ declare const session_ensureAuthenticatedStorefront: typeof ensureAuthenticatedStorefront;
598
+ declare const session_ensureAuthenticatedAdmin: typeof ensureAuthenticatedAdmin;
599
+ declare const session_ensureAuthenticated: typeof ensureAuthenticated;
600
+ declare const session_hasPartnerAccount: typeof hasPartnerAccount;
601
+ declare const session_ensureUserHasPartnerAccount: typeof ensureUserHasPartnerAccount;
602
+ declare const session_logout: typeof logout;
603
+ declare namespace session {
604
+ export {
605
+ session_OAuthApplications as OAuthApplications,
606
+ session_AdminSession as AdminSession,
607
+ session_OAuthSession as OAuthSession,
608
+ session_PartnerOrganizationNotFoundError as PartnerOrganizationNotFoundError,
609
+ session_ensureAuthenticatedPartners as ensureAuthenticatedPartners,
610
+ session_ensureAuthenticatedStorefront as ensureAuthenticatedStorefront,
611
+ session_ensureAuthenticatedAdmin as ensureAuthenticatedAdmin,
612
+ session_ensureAuthenticated as ensureAuthenticated,
613
+ session_hasPartnerAccount as hasPartnerAccount,
614
+ session_ensureUserHasPartnerAccount as ensureUserHasPartnerAccount,
615
+ session_logout as logout,
616
+ };
434
617
  }
435
- interface ConvertDevToTestStoreSchema {
436
- convertDevToTestStore: {
437
- convertedToTestStore: boolean;
438
- userErrors: {
439
- field: string[];
440
- message: string;
441
- }[];
442
- };
618
+
619
+ declare function request$1<T>(query: RequestDocument, session: AdminSession, variables?: Variables): Promise<T>;
620
+
621
+ declare namespace admin {
622
+ export {
623
+ request$1 as request,
624
+ };
443
625
  }
444
626
 
445
- declare const ExtensionCreateQuery: string;
446
- interface ExtensionCreateVariables {
447
- apiKey: string;
448
- type: string;
449
- title: string;
450
- config: string;
451
- context?: string | null;
627
+ declare class RequestClientError extends ExtendableError {
628
+ statusCode: number;
629
+ constructor(message: string, statusCode: number);
452
630
  }
453
- interface ExtensionCreateSchema {
631
+ declare function request<T>(query: RequestDocument, token: string, variables?: Variables): Promise<T>;
632
+ /**
633
+ * Check if the given token is revoked and no longer valid to interact with the Partners API.
634
+ * @param token {string} - The token to check
635
+ * @returns {Promise<boolean>} - True if the token is revoked, false otherwise
636
+ */
637
+ declare function checkIfTokenIsRevoked(token: string): Promise<boolean>;
638
+ /**
639
+ * Function queries are proxied through the script service proxy.
640
+ * To execute a query, we encapsulate it inside another query (including the variables)
641
+ * This is done automatically, you just need to provide the query and the variables.
642
+ *
643
+ * @param apiKey {string} APIKey of the app where the query will be executed.
644
+ * @param query {any} GraphQL query to execute.
645
+ * @param token {string} Partners token
646
+ * @param variables {any} GraphQL variables to pass to the query.
647
+ * @returns {Promise<T>} The response of the query.
648
+ */
649
+ declare function functionProxyRequest<T>(apiKey: string, query: unknown, token: string, variables?: unknown): Promise<T>;
650
+
651
+ type partners$2_RequestClientError = RequestClientError;
652
+ declare const partners$2_RequestClientError: typeof RequestClientError;
653
+ declare const partners$2_request: typeof request;
654
+ declare const partners$2_checkIfTokenIsRevoked: typeof checkIfTokenIsRevoked;
655
+ declare const partners$2_functionProxyRequest: typeof functionProxyRequest;
656
+ declare namespace partners$2 {
657
+ export {
658
+ partners$2_RequestClientError as RequestClientError,
659
+ partners$2_request as request,
660
+ partners$2_checkIfTokenIsRevoked as checkIfTokenIsRevoked,
661
+ partners$2_functionProxyRequest as functionProxyRequest,
662
+ };
663
+ }
664
+
665
+ declare const FindOrganizationQuery: string;
666
+ interface FindOrganizationQuerySchema {
667
+ organizations: {
668
+ nodes: {
669
+ id: string;
670
+ businessName: string;
671
+ website: string;
672
+ appsNext: boolean;
673
+ apps: {
674
+ nodes: {
675
+ id: string;
676
+ title: string;
677
+ apiKey: string;
678
+ organizationId: string;
679
+ apiSecretKeys: {
680
+ secret: string;
681
+ }[];
682
+ appType: string;
683
+ }[];
684
+ };
685
+ }[];
686
+ };
687
+ }
688
+
689
+ interface AllOrganizationsQuerySchemaOrganization {
690
+ id: string;
691
+ businessName: string;
692
+ website: string;
693
+ appsNext: boolean;
694
+ }
695
+ interface AllOrganizationsQuerySchema {
696
+ organizations: {
697
+ nodes: AllOrganizationsQuerySchemaOrganization[];
698
+ };
699
+ }
700
+ declare const AllOrganizationsQuery: string;
701
+
702
+ declare const CreateAppQuery: string;
703
+ interface CreateAppQueryVariables {
704
+ org: number;
705
+ title: string;
706
+ appUrl: string;
707
+ redir: string[];
708
+ type: string;
709
+ }
710
+ interface CreateAppQuerySchema {
711
+ appCreate: {
712
+ app: {
713
+ id: string;
714
+ apiKey: string;
715
+ title: string;
716
+ applicationUrl: string;
717
+ redirectUrlWhitelist: string[];
718
+ organizationId: string;
719
+ apiSecretKeys: {
720
+ secret: string;
721
+ }[];
722
+ appType: string;
723
+ };
724
+ userErrors: {
725
+ field: string[];
726
+ message: string;
727
+ }[];
728
+ };
729
+ }
730
+
731
+ declare const UpdateURLsQuery: string;
732
+ interface UpdateURLsQueryVariables {
733
+ apiKey: string;
734
+ appUrl: string;
735
+ redir: string[];
736
+ }
737
+ interface UpdateURLsQuerySchema {
738
+ appUpdate: {
739
+ userErrors: {
740
+ field: string[];
741
+ message: string;
742
+ }[];
743
+ };
744
+ }
745
+
746
+ declare const FindAppQuery: string;
747
+ interface FindAppQuerySchema {
748
+ app: {
749
+ id: string;
750
+ title: string;
751
+ apiKey: string;
752
+ organizationId: string;
753
+ apiSecretKeys: {
754
+ secret: string;
755
+ }[];
756
+ appType: string;
757
+ };
758
+ }
759
+
760
+ declare const ExtensionUpdateDraftMutation: string;
761
+ interface ExtensionUpdateDraftInput {
762
+ apiKey: string;
763
+ config: string;
764
+ context: string | undefined;
765
+ registrationId: string;
766
+ }
767
+ interface ExtensionUpdateDraftPayload {
768
+ clientMutationId: string;
769
+ extensionVersion: ExtensionVersion;
770
+ userErrors: {
771
+ field: string[];
772
+ message: string;
773
+ }[];
774
+ }
775
+ interface ExtensionVersion {
776
+ config: string;
777
+ context: string;
778
+ id: string;
779
+ lastUserInteractionAt: string;
780
+ location: string;
781
+ registrationId: string;
782
+ registrationUuid: string;
783
+ uuid: string;
784
+ validationErrors: {
785
+ field: string[];
786
+ message: string;
787
+ }[];
788
+ versionTag: string;
789
+ }
790
+ interface ExtensionUpdateSchema {
791
+ extensionUpdateDraft: ExtensionUpdateDraftPayload;
792
+ }
793
+
794
+ declare const GenerateSignedUploadUrl: string;
795
+ interface GenerateSignedUploadUrlVariables {
796
+ apiKey: string;
797
+ deploymentUuid: string;
798
+ bundleFormat: number;
799
+ }
800
+ interface GenerateSignedUploadUrlSchema {
801
+ deploymentGenerateSignedUploadUrl: {
802
+ signedUploadUrl: string;
803
+ userErrors: {
804
+ field: string[];
805
+ message: string;
806
+ }[];
807
+ };
808
+ }
809
+
810
+ declare const CreateDeployment: string;
811
+ interface ExtensionSettings {
812
+ uuid: string;
813
+ config: string;
814
+ context: string;
815
+ }
816
+ interface CreateDeploymentVariables {
817
+ apiKey: string;
818
+ uuid: string;
819
+ bundleUrl: string;
820
+ extensions: ExtensionSettings[];
821
+ }
822
+ interface CreateDeploymentSchema {
823
+ deploymentCreate: {
824
+ deployment: {
825
+ uuid: string;
826
+ };
827
+ userErrors: {
828
+ field: string[];
829
+ message: string;
830
+ }[];
831
+ };
832
+ }
833
+
834
+ declare const AllStoresByOrganizationQuery: string;
835
+ interface AllStoresByOrganizationSchema {
836
+ organizations: {
837
+ nodes: {
838
+ id: string;
839
+ stores: {
840
+ nodes: {
841
+ shopId: string;
842
+ link: string;
843
+ shopDomain: string;
844
+ shopName: string;
845
+ transferDisabled: boolean;
846
+ convertableToPartnerTest: boolean;
847
+ }[];
848
+ };
849
+ }[];
850
+ };
851
+ }
852
+
853
+ declare const ConvertDevToTestStoreQuery: string;
854
+ interface ConvertDevToTestStoreVariables {
855
+ input: {
856
+ organizationID: number;
857
+ shopId: string;
858
+ };
859
+ }
860
+ interface ConvertDevToTestStoreSchema {
861
+ convertDevToTestStore: {
862
+ convertedToTestStore: boolean;
863
+ userErrors: {
864
+ field: string[];
865
+ message: string;
866
+ }[];
867
+ };
868
+ }
869
+
870
+ declare const ExtensionCreateQuery: string;
871
+ interface ExtensionCreateVariables {
872
+ apiKey: string;
873
+ type: string;
874
+ title: string;
875
+ config: string;
876
+ context?: string | null;
877
+ }
878
+ interface ExtensionCreateSchema {
454
879
  extensionCreate: {
455
880
  extensionRegistration: {
456
881
  id: string;
@@ -525,609 +950,209 @@ interface FindProductVariantSchema {
525
950
  };
526
951
  }
527
952
 
528
- declare const ScriptServiceProxyQuery: string;
529
- interface ScriptServiceProxyQuerySchema {
530
- scriptServiceProxy: unknown;
531
- }
532
-
533
- declare const GetAppFunctionsQuery: string;
534
-
535
- declare const ModuleUploadUrlGenerateMutation: string;
536
- interface ModuleUploadUrlGenerateMutationSchema {
537
- data: {
538
- moduleUploadUrlGenerate: {
539
- details: {
540
- url: string;
541
- headers: {
542
- [key: string]: string;
543
- };
544
- humanizedMaxSize: string;
545
- };
546
- userErrors: {
547
- field: string;
548
- message: string;
549
- }[];
550
- };
551
- };
552
- }
553
-
554
- declare const AppFunctionSetMutation: string;
555
- interface AppFunctionSetMutationSchema {
556
- data: {
557
- appScriptSet: {
558
- userErrors: {
559
- field: string;
560
- message: string;
561
- tag: string;
562
- }[];
563
- appScript?: {
564
- uuid: string;
565
- appKey: string;
566
- configSchema: unknown;
567
- extensionPointName: string;
568
- title: string;
569
- };
570
- };
571
- };
572
- }
573
- interface AppFunctionSetVariables {
574
- uuid?: string;
575
- extensionPointName: string;
576
- title: string;
577
- description?: string;
578
- force?: boolean;
579
- schemaMajorVersion?: string;
580
- schemaMinorVersion?: string;
581
- scriptConfigVersion?: string;
582
- configurationUi: boolean;
583
- configurationDefinition?: string;
584
- moduleUploadUrl: string;
585
- library?: {
586
- language: string;
587
- version: string;
588
- };
589
- appBridge?: {
590
- createPath?: string;
591
- detailsPath?: string;
592
- };
593
- inputQuery?: string;
594
- apiVersion?: string;
595
- }
596
-
597
- declare const FindOrganizationBasicQuery: string;
598
- interface FindOrganizationBasicQuerySchema {
599
- organizations: {
600
- nodes: {
601
- id: string;
602
- businessName: string;
603
- website: string;
604
- appsNext: boolean;
605
- }[];
606
- };
607
- }
608
-
609
- declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
610
- type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
611
- type index_AllOrganizationsQuerySchemaOrganization = AllOrganizationsQuerySchemaOrganization;
612
- type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
613
- declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
614
- declare const index_CreateAppQuery: typeof CreateAppQuery;
615
- type index_CreateAppQueryVariables = CreateAppQueryVariables;
616
- type index_CreateAppQuerySchema = CreateAppQuerySchema;
617
- declare const index_UpdateURLsQuery: typeof UpdateURLsQuery;
618
- type index_UpdateURLsQueryVariables = UpdateURLsQueryVariables;
619
- type index_UpdateURLsQuerySchema = UpdateURLsQuerySchema;
620
- declare const index_FindAppQuery: typeof FindAppQuery;
621
- type index_FindAppQuerySchema = FindAppQuerySchema;
622
- declare const index_ExtensionUpdateDraftMutation: typeof ExtensionUpdateDraftMutation;
623
- type index_ExtensionUpdateDraftInput = ExtensionUpdateDraftInput;
624
- type index_ExtensionUpdateDraftPayload = ExtensionUpdateDraftPayload;
625
- type index_ExtensionVersion = ExtensionVersion;
626
- type index_ExtensionUpdateSchema = ExtensionUpdateSchema;
627
- declare const index_GenerateSignedUploadUrl: typeof GenerateSignedUploadUrl;
628
- type index_GenerateSignedUploadUrlVariables = GenerateSignedUploadUrlVariables;
629
- type index_GenerateSignedUploadUrlSchema = GenerateSignedUploadUrlSchema;
630
- declare const index_CreateDeployment: typeof CreateDeployment;
631
- type index_ExtensionSettings = ExtensionSettings;
632
- type index_CreateDeploymentVariables = CreateDeploymentVariables;
633
- type index_CreateDeploymentSchema = CreateDeploymentSchema;
634
- declare const index_AllStoresByOrganizationQuery: typeof AllStoresByOrganizationQuery;
635
- type index_AllStoresByOrganizationSchema = AllStoresByOrganizationSchema;
636
- declare const index_ConvertDevToTestStoreQuery: typeof ConvertDevToTestStoreQuery;
637
- type index_ConvertDevToTestStoreVariables = ConvertDevToTestStoreVariables;
638
- type index_ConvertDevToTestStoreSchema = ConvertDevToTestStoreSchema;
639
- declare const index_ExtensionCreateQuery: typeof ExtensionCreateQuery;
640
- type index_ExtensionCreateVariables = ExtensionCreateVariables;
641
- type index_ExtensionCreateSchema = ExtensionCreateSchema;
642
- declare const index_ExtensionSpecificationsQuery: typeof ExtensionSpecificationsQuery;
643
- type index_ExtensionSpecificationsQueryVariables = ExtensionSpecificationsQueryVariables;
644
- type index_ExtensionSpecificationsQuerySchema = ExtensionSpecificationsQuerySchema;
645
- declare const index_AllAppExtensionRegistrationsQuery: typeof AllAppExtensionRegistrationsQuery;
646
- type index_AllAppExtensionRegistrationsQueryVariables = AllAppExtensionRegistrationsQueryVariables;
647
- type index_AllAppExtensionRegistrationsQuerySchema = AllAppExtensionRegistrationsQuerySchema;
648
- declare const index_FindProductVariantQuery: typeof FindProductVariantQuery;
649
- type index_FindProductVariantSchema = FindProductVariantSchema;
650
- declare const index_ScriptServiceProxyQuery: typeof ScriptServiceProxyQuery;
651
- type index_ScriptServiceProxyQuerySchema = ScriptServiceProxyQuerySchema;
652
- declare const index_GetAppFunctionsQuery: typeof GetAppFunctionsQuery;
653
- declare const index_ModuleUploadUrlGenerateMutation: typeof ModuleUploadUrlGenerateMutation;
654
- type index_ModuleUploadUrlGenerateMutationSchema = ModuleUploadUrlGenerateMutationSchema;
655
- declare const index_AppFunctionSetMutation: typeof AppFunctionSetMutation;
656
- type index_AppFunctionSetMutationSchema = AppFunctionSetMutationSchema;
657
- type index_AppFunctionSetVariables = AppFunctionSetVariables;
658
- declare const index_FindOrganizationBasicQuery: typeof FindOrganizationBasicQuery;
659
- type index_FindOrganizationBasicQuerySchema = FindOrganizationBasicQuerySchema;
660
- declare namespace index {
661
- export {
662
- index_FindOrganizationQuery as FindOrganizationQuery,
663
- index_FindOrganizationQuerySchema as FindOrganizationQuerySchema,
664
- index_AllOrganizationsQuerySchemaOrganization as AllOrganizationsQuerySchemaOrganization,
665
- index_AllOrganizationsQuerySchema as AllOrganizationsQuerySchema,
666
- index_AllOrganizationsQuery as AllOrganizationsQuery,
667
- index_CreateAppQuery as CreateAppQuery,
668
- index_CreateAppQueryVariables as CreateAppQueryVariables,
669
- index_CreateAppQuerySchema as CreateAppQuerySchema,
670
- index_UpdateURLsQuery as UpdateURLsQuery,
671
- index_UpdateURLsQueryVariables as UpdateURLsQueryVariables,
672
- index_UpdateURLsQuerySchema as UpdateURLsQuerySchema,
673
- index_FindAppQuery as FindAppQuery,
674
- index_FindAppQuerySchema as FindAppQuerySchema,
675
- index_ExtensionUpdateDraftMutation as ExtensionUpdateDraftMutation,
676
- index_ExtensionUpdateDraftInput as ExtensionUpdateDraftInput,
677
- index_ExtensionUpdateDraftPayload as ExtensionUpdateDraftPayload,
678
- index_ExtensionVersion as ExtensionVersion,
679
- index_ExtensionUpdateSchema as ExtensionUpdateSchema,
680
- index_GenerateSignedUploadUrl as GenerateSignedUploadUrl,
681
- index_GenerateSignedUploadUrlVariables as GenerateSignedUploadUrlVariables,
682
- index_GenerateSignedUploadUrlSchema as GenerateSignedUploadUrlSchema,
683
- index_CreateDeployment as CreateDeployment,
684
- index_ExtensionSettings as ExtensionSettings,
685
- index_CreateDeploymentVariables as CreateDeploymentVariables,
686
- index_CreateDeploymentSchema as CreateDeploymentSchema,
687
- index_AllStoresByOrganizationQuery as AllStoresByOrganizationQuery,
688
- index_AllStoresByOrganizationSchema as AllStoresByOrganizationSchema,
689
- index_ConvertDevToTestStoreQuery as ConvertDevToTestStoreQuery,
690
- index_ConvertDevToTestStoreVariables as ConvertDevToTestStoreVariables,
691
- index_ConvertDevToTestStoreSchema as ConvertDevToTestStoreSchema,
692
- index_ExtensionCreateQuery as ExtensionCreateQuery,
693
- index_ExtensionCreateVariables as ExtensionCreateVariables,
694
- index_ExtensionCreateSchema as ExtensionCreateSchema,
695
- index_ExtensionSpecificationsQuery as ExtensionSpecificationsQuery,
696
- index_ExtensionSpecificationsQueryVariables as ExtensionSpecificationsQueryVariables,
697
- index_ExtensionSpecificationsQuerySchema as ExtensionSpecificationsQuerySchema,
698
- index_AllAppExtensionRegistrationsQuery as AllAppExtensionRegistrationsQuery,
699
- index_AllAppExtensionRegistrationsQueryVariables as AllAppExtensionRegistrationsQueryVariables,
700
- index_AllAppExtensionRegistrationsQuerySchema as AllAppExtensionRegistrationsQuerySchema,
701
- index_FindProductVariantQuery as FindProductVariantQuery,
702
- index_FindProductVariantSchema as FindProductVariantSchema,
703
- index_ScriptServiceProxyQuery as ScriptServiceProxyQuery,
704
- index_ScriptServiceProxyQuerySchema as ScriptServiceProxyQuerySchema,
705
- index_GetAppFunctionsQuery as GetAppFunctionsQuery,
706
- index_ModuleUploadUrlGenerateMutation as ModuleUploadUrlGenerateMutation,
707
- index_ModuleUploadUrlGenerateMutationSchema as ModuleUploadUrlGenerateMutationSchema,
708
- index_AppFunctionSetMutation as AppFunctionSetMutation,
709
- index_AppFunctionSetMutationSchema as AppFunctionSetMutationSchema,
710
- index_AppFunctionSetVariables as AppFunctionSetVariables,
711
- index_FindOrganizationBasicQuery as FindOrganizationBasicQuery,
712
- index_FindOrganizationBasicQuerySchema as FindOrganizationBasicQuerySchema,
713
- };
714
- }
715
-
716
- declare const api_admin: typeof admin;
717
- declare namespace api {
718
- export {
719
- api_admin as admin,
720
- partners$2 as partners,
721
- index as graphql,
722
- };
723
- }
724
-
725
- declare function zip(inputDirectory: string, outputZipPath: string): Promise<void>;
726
-
727
- declare const archiver_zip: typeof zip;
728
- declare namespace archiver {
729
- export {
730
- archiver_zip as zip,
731
- };
732
- }
733
-
734
- declare const genericConfigurationFileNames: {
735
- readonly yarn: {
736
- readonly lockfile: "yarn.lock";
737
- };
738
- readonly pnpm: {
739
- readonly lockfile: "pnpm-lock.yaml";
740
- };
741
- };
742
- declare const dependencyManager: readonly ["yarn", "npm", "pnpm"];
743
- declare type DependencyManager = typeof dependencyManager[number];
744
- declare const PackageJsonNotFoundError: (directory: string) => Abort;
745
- /**
746
- * Returns the dependency manager used to run the create workflow.
747
- * @param env {Object} The environment variables of the process in which the CLI runs.
748
- * @returns The dependency manager
749
- */
750
- declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): DependencyManager;
751
- /**
752
- * Returns the dependency manager used by an existing project.
753
- * @param directory {string} The root directory of the project.
754
- * @returns The dependency manager
755
- */
756
- declare function getDependencyManager(directory: string): Promise<DependencyManager>;
757
- interface InstallNPMDependenciesRecursivelyOptions {
758
- /**
759
- * The dependency manager to use to install the dependencies.
760
- */
761
- dependencyManager: DependencyManager;
762
- /**
763
- * The directory from where we'll find package.json's recursively
764
- */
765
- directory: string;
766
- /**
767
- * Specifies the maximum depth of the glob search.
768
- */
769
- deep?: number;
770
- }
771
- /**
772
- * This function traverses down a directory tree to find directories containing a package.json
773
- * and installs the dependencies if needed. To know if it's needed, it uses the "check" command
774
- * provided by dependency managers.
775
- * @param options {InstallNPMDependenciesRecursivelyOptions} Options to install dependencies recursively.
776
- */
777
- declare function installNPMDependenciesRecursively(options: InstallNPMDependenciesRecursivelyOptions): Promise<void>;
778
- /**
779
- * Installs the dependencies in the given directory.
780
- * @param directory {string} The directory that contains the package.json
781
- * @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
782
- * @param stdout {Writable} Standard output stream.
783
- * @param stderr {Writable} Standard error stream.
784
- * @param signal {AbortSignal} Abort signal.
785
- * @returns stderr {Writable} Standard error stream.
786
- */
787
- declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable, signal?: AbortSignal): Promise<void>;
788
- /**
789
- * Returns the name of the package configured in its package.json
790
- * @param packageJsonPath {string} Path to the package.json file
791
- * @returns A promise that resolves with the name.
792
- */
793
- declare function getPackageName(packageJsonPath: string): Promise<string>;
794
- /**
795
- * Returns the list of production and dev dependencies of a package.json
796
- * @param packageJsonPath {string} Path to the package.json file
797
- * @returns A promise that resolves with the list of dependencies.
798
- */
799
- declare function getDependencies(packageJsonPath: string): Promise<{
800
- [key: string]: string;
801
- }>;
802
- declare function checkForNewVersion(dependency: string, currentVersion: string): Promise<string | undefined>;
803
- declare function getOutputUpdateCLIReminder(dependencyManager: DependencyManager, version: string): string;
804
- interface PackageJSONContents {
805
- name: string;
806
- version?: string;
807
- dependencies?: {
808
- [key: string]: string;
809
- };
810
- devDependencies?: {
811
- [key: string]: string;
812
- };
813
- }
814
- declare function packageJSONContents(packageJsonPath: string): Promise<PackageJSONContents>;
815
- declare type DependencyType = 'dev' | 'prod' | 'peer';
816
- interface AddNPMDependenciesIfNeededOptions {
817
- /** How dependencies should be added */
818
- type: DependencyType;
819
- /** The dependency manager to use to add dependencies */
820
- dependencyManager: DependencyManager;
821
- /** The directory that contains the package.json where dependencies will be added */
822
- directory: string;
823
- /** Standard output coming from the underlying installation process */
824
- stdout?: Writable;
825
- /** Standard error coming from the underlying installation process */
826
- stderr?: Writable;
827
- /** Abort signal to stop the process */
828
- signal?: AbortSignal;
829
- }
830
- interface DependencyVersion {
831
- name: string;
832
- version: string | undefined;
833
- }
834
- /**
835
- * Adds dependencies to a Node project (i.e. a project that has a package.json)
836
- * @param dependencies {string[]} List of dependencies to be added.
837
- * @param options {AddNPMDependenciesIfNeededOptions} Options for adding dependencies.
838
- */
839
- declare function addNPMDependenciesIfNeeded(dependencies: DependencyVersion[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
840
- declare function addNPMDependenciesWithoutVersionIfNeeded(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
841
- declare function addLatestNPMDependencies(dependencies: string[], options: AddNPMDependenciesIfNeededOptions): Promise<void>;
842
-
843
- declare const dependency_genericConfigurationFileNames: typeof genericConfigurationFileNames;
844
- declare const dependency_dependencyManager: typeof dependencyManager;
845
- type dependency_DependencyManager = DependencyManager;
846
- declare const dependency_PackageJsonNotFoundError: typeof PackageJsonNotFoundError;
847
- declare const dependency_dependencyManagerUsedForCreating: typeof dependencyManagerUsedForCreating;
848
- declare const dependency_getDependencyManager: typeof getDependencyManager;
849
- declare const dependency_installNPMDependenciesRecursively: typeof installNPMDependenciesRecursively;
850
- declare const dependency_install: typeof install;
851
- declare const dependency_getPackageName: typeof getPackageName;
852
- declare const dependency_getDependencies: typeof getDependencies;
853
- declare const dependency_checkForNewVersion: typeof checkForNewVersion;
854
- declare const dependency_getOutputUpdateCLIReminder: typeof getOutputUpdateCLIReminder;
855
- declare const dependency_packageJSONContents: typeof packageJSONContents;
856
- type dependency_DependencyType = DependencyType;
857
- type dependency_DependencyVersion = DependencyVersion;
858
- declare const dependency_addNPMDependenciesIfNeeded: typeof addNPMDependenciesIfNeeded;
859
- declare const dependency_addNPMDependenciesWithoutVersionIfNeeded: typeof addNPMDependenciesWithoutVersionIfNeeded;
860
- declare const dependency_addLatestNPMDependencies: typeof addLatestNPMDependencies;
861
- declare namespace dependency {
862
- export {
863
- dependency_genericConfigurationFileNames as genericConfigurationFileNames,
864
- dependency_dependencyManager as dependencyManager,
865
- dependency_DependencyManager as DependencyManager,
866
- dependency_PackageJsonNotFoundError as PackageJsonNotFoundError,
867
- dependency_dependencyManagerUsedForCreating as dependencyManagerUsedForCreating,
868
- dependency_getDependencyManager as getDependencyManager,
869
- dependency_installNPMDependenciesRecursively as installNPMDependenciesRecursively,
870
- dependency_install as install,
871
- dependency_getPackageName as getPackageName,
872
- dependency_getDependencies as getDependencies,
873
- dependency_checkForNewVersion as checkForNewVersion,
874
- dependency_getOutputUpdateCLIReminder as getOutputUpdateCLIReminder,
875
- dependency_packageJSONContents as packageJSONContents,
876
- dependency_DependencyType as DependencyType,
877
- dependency_DependencyVersion as DependencyVersion,
878
- dependency_addNPMDependenciesIfNeeded as addNPMDependenciesIfNeeded,
879
- dependency_addNPMDependenciesWithoutVersionIfNeeded as addNPMDependenciesWithoutVersionIfNeeded,
880
- dependency_addLatestNPMDependencies as addLatestNPMDependencies,
881
- };
882
- }
883
-
884
- declare function initiateLogging({ logDir, filename, }: {
885
- logDir?: string;
886
- filename?: string;
887
- }): void;
888
- declare enum ContentTokenType {
889
- Raw = 0,
890
- Command = 1,
891
- Json = 2,
892
- Path = 3,
893
- Link = 4,
894
- Heading = 5,
895
- SubHeading = 6,
896
- Italic = 7,
897
- ErrorText = 8,
898
- Yellow = 9,
899
- Cyan = 10,
900
- Magenta = 11,
901
- Green = 12
902
- }
903
- interface ContentMetadata {
904
- link?: string;
905
- }
906
- declare class ContentToken {
907
- type: ContentTokenType;
908
- value: Message;
909
- metadata: ContentMetadata;
910
- constructor(value: Message, metadata: ContentMetadata | undefined, type: ContentTokenType);
911
- }
912
- declare const token: {
913
- raw: (value: Message) => ContentToken;
914
- genericShellCommand: (value: Message) => ContentToken;
915
- json: (value: any) => ContentToken;
916
- path: (value: Message) => ContentToken;
917
- link: (value: Message, link: string) => ContentToken;
918
- heading: (value: Message) => ContentToken;
919
- subheading: (value: Message) => ContentToken;
920
- italic: (value: Message) => ContentToken;
921
- errorText: (value: Message) => ContentToken;
922
- cyan: (value: Message) => ContentToken;
923
- yellow: (value: Message) => ContentToken;
924
- magenta: (value: Message) => ContentToken;
925
- green: (value: Message) => ContentToken;
926
- packagejsonScript: (dependencyManager: DependencyManager, scriptName: string, ...scriptArgs: string[]) => ContentToken;
927
- successIcon: () => ContentToken;
928
- failIcon: () => ContentToken;
929
- };
930
- declare class TokenizedString {
931
- value: string;
932
- constructor(value: string);
933
- }
934
- declare type Message = string | TokenizedString;
935
- declare function content(strings: TemplateStringsArray, ...keys: (ContentToken | string)[]): TokenizedString;
936
- /** Log levels */
937
- declare type LogLevel = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
938
- /**
939
- *
940
- * @returns {LogLevel} It returns the log level set by the user.
941
- */
942
- declare const currentLogLevel: () => LogLevel;
943
- declare const shouldOutput: (logLevel: LogLevel) => boolean;
944
- /**
945
- * Ouputs information to the user. This is akin to "console.log"
946
- * Info messages don't get additional formatting.
947
- * Note: Info messages are sent through the standard output.
948
- * @param content {string} The content to be output to the user.
949
- */
950
- declare const info: (content: Message) => void;
951
- /**
952
- * Outputs a success message to the user.
953
- * Success message receive a special formatting to make them stand out in the console.
954
- * Note: Success messages are sent through the standard output.
955
- * @param content {string} The content to be output to the user.
956
- */
957
- declare const success: (content: Message) => void;
958
- /**
959
- * Outputs a completed message to the user.
960
- * Completed message receive a special formatting to make them stand out in the console.
961
- * Note: Completed messages are sent through the standard output.
962
- * @param content {string} The content to be output to the user.
963
- */
964
- declare const completed: (content: Message) => void;
965
- /**
966
- * Ouputs debug information to the user. By default these output is hidden unless the user calls the CLI with --verbose.
967
- * Debug messages don't get additional formatting.
968
- * Note: Debug messages are sent through the standard output.
969
- * @param content {string} The content to be output to the user.
970
- */
971
- declare const debug: (content: Message) => void;
972
- /**
973
- * Outputs a warning message to the user.
974
- * Warning messages receive a special formatting to make them stand out in the console.
975
- * Note: Warning messages are sent through the standard output.
976
- * @param content {string} The content to be output to the user.
977
- */
978
- declare const warn: (content: Message) => void;
979
- /**
980
- * Prints a new line in the terminal.
981
- */
982
- declare const newline: () => void;
983
- /**
984
- * Formats and outputs a fatal error.
985
- * Note: This API is not intended to be used internally. If you want to
986
- * abort the execution due to an error, raise a fatal error and let the
987
- * error handler handle and format it.
988
- * @param content {Fatal} The fatal error to be output.
989
- */
990
- declare const error$1: (content: Fatal) => Promise<void>;
991
- declare function stringifyMessage(message: Message): string;
992
- interface OutputProcess {
993
- /** The prefix to include in the logs
994
- * [vite] Output coming from Vite
995
- */
996
- prefix: string;
997
- /**
998
- * A callback to invoke the process. stdout and stderr should be used
999
- * to send standard output and error data that gets formatted with the
1000
- * right prefix.
1001
- */
1002
- action: (stdout: Writable, stderr: Writable, signal: AbortSignal) => Promise<void>;
1003
- }
1004
- /**
1005
- * Use this function when you have multiple concurrent processes that send data events
1006
- * and we need to output them ensuring that they can visually differenciated by the user.
1007
- *
1008
- * @param processes {OutputProcess[]} A list of processes to run concurrently.
1009
- */
1010
- declare function concurrent(processes: OutputProcess[], callback?: ((signal: AbortSignal) => void) | undefined): Promise<void>;
1011
- declare function unstyled(message: string): string;
1012
- declare function shouldDisplayColors(): boolean;
1013
- declare function pageLogs(): Promise<void>;
1014
-
1015
- declare const output_initiateLogging: typeof initiateLogging;
1016
- declare const output_token: typeof token;
1017
- type output_TokenizedString = TokenizedString;
1018
- declare const output_TokenizedString: typeof TokenizedString;
1019
- type output_Message = Message;
1020
- declare const output_content: typeof content;
1021
- type output_LogLevel = LogLevel;
1022
- declare const output_currentLogLevel: typeof currentLogLevel;
1023
- declare const output_shouldOutput: typeof shouldOutput;
1024
- declare const output_info: typeof info;
1025
- declare const output_success: typeof success;
1026
- declare const output_completed: typeof completed;
1027
- declare const output_debug: typeof debug;
1028
- declare const output_warn: typeof warn;
1029
- declare const output_newline: typeof newline;
1030
- declare const output_stringifyMessage: typeof stringifyMessage;
1031
- type output_OutputProcess = OutputProcess;
1032
- declare const output_concurrent: typeof concurrent;
1033
- declare const output_unstyled: typeof unstyled;
1034
- declare const output_shouldDisplayColors: typeof shouldDisplayColors;
1035
- declare const output_pageLogs: typeof pageLogs;
1036
- declare namespace output {
1037
- export {
1038
- output_initiateLogging as initiateLogging,
1039
- output_token as token,
1040
- output_TokenizedString as TokenizedString,
1041
- output_Message as Message,
1042
- output_content as content,
1043
- output_LogLevel as LogLevel,
1044
- output_currentLogLevel as currentLogLevel,
1045
- output_shouldOutput as shouldOutput,
1046
- output_info as info,
1047
- output_success as success,
1048
- output_completed as completed,
1049
- output_debug as debug,
1050
- output_warn as warn,
1051
- output_newline as newline,
1052
- error$1 as error,
1053
- output_stringifyMessage as stringifyMessage,
1054
- output_OutputProcess as OutputProcess,
1055
- output_concurrent as concurrent,
1056
- output_unstyled as unstyled,
1057
- output_shouldDisplayColors as shouldDisplayColors,
1058
- output_pageLogs as pageLogs,
1059
- };
1060
- }
1061
-
1062
- declare enum FatalErrorType {
1063
- Abort = 0,
1064
- AbortSilent = 1,
1065
- Bug = 2
953
+ declare const ScriptServiceProxyQuery: string;
954
+ interface ScriptServiceProxyQuerySchema {
955
+ scriptServiceProxy: unknown;
1066
956
  }
1067
- declare class CancelExecution extends Error {
957
+
958
+ declare const GetAppFunctionsQuery: string;
959
+
960
+ declare const ModuleUploadUrlGenerateMutation: string;
961
+ interface ModuleUploadUrlGenerateMutationSchema {
962
+ data: {
963
+ moduleUploadUrlGenerate: {
964
+ details: {
965
+ url: string;
966
+ headers: {
967
+ [key: string]: string;
968
+ };
969
+ humanizedMaxSize: string;
970
+ };
971
+ userErrors: {
972
+ field: string;
973
+ message: string;
974
+ }[];
975
+ };
976
+ };
1068
977
  }
1069
- /**
1070
- * A fatal error represents an error shouldn't be rescued and that causes the execution to terminate.
1071
- * There shouldn't be code that catches fatal errors.
1072
- */
1073
- declare abstract class Fatal extends Error {
1074
- tryMessage: string | null;
1075
- type: FatalErrorType;
1076
- constructor(message: Message, type: FatalErrorType, tryMessage?: Message | null);
978
+
979
+ declare const AppFunctionSetMutation: string;
980
+ interface AppFunctionSetMutationSchema {
981
+ data: {
982
+ appScriptSet: {
983
+ userErrors: {
984
+ field: string;
985
+ message: string;
986
+ tag: string;
987
+ }[];
988
+ appScript?: {
989
+ uuid: string;
990
+ appKey: string;
991
+ configSchema: unknown;
992
+ extensionPointName: string;
993
+ title: string;
994
+ };
995
+ };
996
+ };
1077
997
  }
1078
- /**
1079
- * An abort error is a fatal error that shouldn't be reported as a bug.
1080
- * Those usually represent unexpected scenarios that we can't handle and that usually require some action from the developer
1081
- */
1082
- declare class Abort extends Fatal {
1083
- constructor(message: Message, tryMessage?: Message | null);
998
+ interface AppFunctionSetVariables {
999
+ uuid?: string;
1000
+ extensionPointName: string;
1001
+ title: string;
1002
+ description?: string;
1003
+ force?: boolean;
1004
+ schemaMajorVersion?: string;
1005
+ schemaMinorVersion?: string;
1006
+ scriptConfigVersion?: string;
1007
+ configurationUi: boolean;
1008
+ configurationDefinition?: string;
1009
+ moduleUploadUrl: string;
1010
+ library?: {
1011
+ language: string;
1012
+ version: string;
1013
+ };
1014
+ appBridge?: {
1015
+ createPath?: string;
1016
+ detailsPath?: string;
1017
+ };
1018
+ inputQuery?: string;
1019
+ apiVersion?: string;
1084
1020
  }
1085
- declare class AbortSilent extends Fatal {
1086
- constructor();
1021
+
1022
+ declare const FindOrganizationBasicQuery: string;
1023
+ interface FindOrganizationBasicQuerySchema {
1024
+ organizations: {
1025
+ nodes: {
1026
+ id: string;
1027
+ businessName: string;
1028
+ website: string;
1029
+ appsNext: boolean;
1030
+ }[];
1031
+ };
1087
1032
  }
1088
- /**
1089
- * A bug error is an error that represents a bug and therefore should be reported.
1090
- */
1091
- declare class Bug extends Fatal {
1092
- constructor(message: Message, tryMessage?: string | null);
1033
+
1034
+ declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
1035
+ type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
1036
+ type index_AllOrganizationsQuerySchemaOrganization = AllOrganizationsQuerySchemaOrganization;
1037
+ type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
1038
+ declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
1039
+ declare const index_CreateAppQuery: typeof CreateAppQuery;
1040
+ type index_CreateAppQueryVariables = CreateAppQueryVariables;
1041
+ type index_CreateAppQuerySchema = CreateAppQuerySchema;
1042
+ declare const index_UpdateURLsQuery: typeof UpdateURLsQuery;
1043
+ type index_UpdateURLsQueryVariables = UpdateURLsQueryVariables;
1044
+ type index_UpdateURLsQuerySchema = UpdateURLsQuerySchema;
1045
+ declare const index_FindAppQuery: typeof FindAppQuery;
1046
+ type index_FindAppQuerySchema = FindAppQuerySchema;
1047
+ declare const index_ExtensionUpdateDraftMutation: typeof ExtensionUpdateDraftMutation;
1048
+ type index_ExtensionUpdateDraftInput = ExtensionUpdateDraftInput;
1049
+ type index_ExtensionUpdateDraftPayload = ExtensionUpdateDraftPayload;
1050
+ type index_ExtensionVersion = ExtensionVersion;
1051
+ type index_ExtensionUpdateSchema = ExtensionUpdateSchema;
1052
+ declare const index_GenerateSignedUploadUrl: typeof GenerateSignedUploadUrl;
1053
+ type index_GenerateSignedUploadUrlVariables = GenerateSignedUploadUrlVariables;
1054
+ type index_GenerateSignedUploadUrlSchema = GenerateSignedUploadUrlSchema;
1055
+ declare const index_CreateDeployment: typeof CreateDeployment;
1056
+ type index_ExtensionSettings = ExtensionSettings;
1057
+ type index_CreateDeploymentVariables = CreateDeploymentVariables;
1058
+ type index_CreateDeploymentSchema = CreateDeploymentSchema;
1059
+ declare const index_AllStoresByOrganizationQuery: typeof AllStoresByOrganizationQuery;
1060
+ type index_AllStoresByOrganizationSchema = AllStoresByOrganizationSchema;
1061
+ declare const index_ConvertDevToTestStoreQuery: typeof ConvertDevToTestStoreQuery;
1062
+ type index_ConvertDevToTestStoreVariables = ConvertDevToTestStoreVariables;
1063
+ type index_ConvertDevToTestStoreSchema = ConvertDevToTestStoreSchema;
1064
+ declare const index_ExtensionCreateQuery: typeof ExtensionCreateQuery;
1065
+ type index_ExtensionCreateVariables = ExtensionCreateVariables;
1066
+ type index_ExtensionCreateSchema = ExtensionCreateSchema;
1067
+ declare const index_ExtensionSpecificationsQuery: typeof ExtensionSpecificationsQuery;
1068
+ type index_ExtensionSpecificationsQueryVariables = ExtensionSpecificationsQueryVariables;
1069
+ type index_ExtensionSpecificationsQuerySchema = ExtensionSpecificationsQuerySchema;
1070
+ declare const index_AllAppExtensionRegistrationsQuery: typeof AllAppExtensionRegistrationsQuery;
1071
+ type index_AllAppExtensionRegistrationsQueryVariables = AllAppExtensionRegistrationsQueryVariables;
1072
+ type index_AllAppExtensionRegistrationsQuerySchema = AllAppExtensionRegistrationsQuerySchema;
1073
+ declare const index_FindProductVariantQuery: typeof FindProductVariantQuery;
1074
+ type index_FindProductVariantSchema = FindProductVariantSchema;
1075
+ declare const index_ScriptServiceProxyQuery: typeof ScriptServiceProxyQuery;
1076
+ type index_ScriptServiceProxyQuerySchema = ScriptServiceProxyQuerySchema;
1077
+ declare const index_GetAppFunctionsQuery: typeof GetAppFunctionsQuery;
1078
+ declare const index_ModuleUploadUrlGenerateMutation: typeof ModuleUploadUrlGenerateMutation;
1079
+ type index_ModuleUploadUrlGenerateMutationSchema = ModuleUploadUrlGenerateMutationSchema;
1080
+ declare const index_AppFunctionSetMutation: typeof AppFunctionSetMutation;
1081
+ type index_AppFunctionSetMutationSchema = AppFunctionSetMutationSchema;
1082
+ type index_AppFunctionSetVariables = AppFunctionSetVariables;
1083
+ declare const index_FindOrganizationBasicQuery: typeof FindOrganizationBasicQuery;
1084
+ type index_FindOrganizationBasicQuerySchema = FindOrganizationBasicQuerySchema;
1085
+ declare namespace index {
1086
+ export {
1087
+ index_FindOrganizationQuery as FindOrganizationQuery,
1088
+ index_FindOrganizationQuerySchema as FindOrganizationQuerySchema,
1089
+ index_AllOrganizationsQuerySchemaOrganization as AllOrganizationsQuerySchemaOrganization,
1090
+ index_AllOrganizationsQuerySchema as AllOrganizationsQuerySchema,
1091
+ index_AllOrganizationsQuery as AllOrganizationsQuery,
1092
+ index_CreateAppQuery as CreateAppQuery,
1093
+ index_CreateAppQueryVariables as CreateAppQueryVariables,
1094
+ index_CreateAppQuerySchema as CreateAppQuerySchema,
1095
+ index_UpdateURLsQuery as UpdateURLsQuery,
1096
+ index_UpdateURLsQueryVariables as UpdateURLsQueryVariables,
1097
+ index_UpdateURLsQuerySchema as UpdateURLsQuerySchema,
1098
+ index_FindAppQuery as FindAppQuery,
1099
+ index_FindAppQuerySchema as FindAppQuerySchema,
1100
+ index_ExtensionUpdateDraftMutation as ExtensionUpdateDraftMutation,
1101
+ index_ExtensionUpdateDraftInput as ExtensionUpdateDraftInput,
1102
+ index_ExtensionUpdateDraftPayload as ExtensionUpdateDraftPayload,
1103
+ index_ExtensionVersion as ExtensionVersion,
1104
+ index_ExtensionUpdateSchema as ExtensionUpdateSchema,
1105
+ index_GenerateSignedUploadUrl as GenerateSignedUploadUrl,
1106
+ index_GenerateSignedUploadUrlVariables as GenerateSignedUploadUrlVariables,
1107
+ index_GenerateSignedUploadUrlSchema as GenerateSignedUploadUrlSchema,
1108
+ index_CreateDeployment as CreateDeployment,
1109
+ index_ExtensionSettings as ExtensionSettings,
1110
+ index_CreateDeploymentVariables as CreateDeploymentVariables,
1111
+ index_CreateDeploymentSchema as CreateDeploymentSchema,
1112
+ index_AllStoresByOrganizationQuery as AllStoresByOrganizationQuery,
1113
+ index_AllStoresByOrganizationSchema as AllStoresByOrganizationSchema,
1114
+ index_ConvertDevToTestStoreQuery as ConvertDevToTestStoreQuery,
1115
+ index_ConvertDevToTestStoreVariables as ConvertDevToTestStoreVariables,
1116
+ index_ConvertDevToTestStoreSchema as ConvertDevToTestStoreSchema,
1117
+ index_ExtensionCreateQuery as ExtensionCreateQuery,
1118
+ index_ExtensionCreateVariables as ExtensionCreateVariables,
1119
+ index_ExtensionCreateSchema as ExtensionCreateSchema,
1120
+ index_ExtensionSpecificationsQuery as ExtensionSpecificationsQuery,
1121
+ index_ExtensionSpecificationsQueryVariables as ExtensionSpecificationsQueryVariables,
1122
+ index_ExtensionSpecificationsQuerySchema as ExtensionSpecificationsQuerySchema,
1123
+ index_AllAppExtensionRegistrationsQuery as AllAppExtensionRegistrationsQuery,
1124
+ index_AllAppExtensionRegistrationsQueryVariables as AllAppExtensionRegistrationsQueryVariables,
1125
+ index_AllAppExtensionRegistrationsQuerySchema as AllAppExtensionRegistrationsQuerySchema,
1126
+ index_FindProductVariantQuery as FindProductVariantQuery,
1127
+ index_FindProductVariantSchema as FindProductVariantSchema,
1128
+ index_ScriptServiceProxyQuery as ScriptServiceProxyQuery,
1129
+ index_ScriptServiceProxyQuerySchema as ScriptServiceProxyQuerySchema,
1130
+ index_GetAppFunctionsQuery as GetAppFunctionsQuery,
1131
+ index_ModuleUploadUrlGenerateMutation as ModuleUploadUrlGenerateMutation,
1132
+ index_ModuleUploadUrlGenerateMutationSchema as ModuleUploadUrlGenerateMutationSchema,
1133
+ index_AppFunctionSetMutation as AppFunctionSetMutation,
1134
+ index_AppFunctionSetMutationSchema as AppFunctionSetMutationSchema,
1135
+ index_AppFunctionSetVariables as AppFunctionSetVariables,
1136
+ index_FindOrganizationBasicQuery as FindOrganizationBasicQuery,
1137
+ index_FindOrganizationBasicQuerySchema as FindOrganizationBasicQuerySchema,
1138
+ };
1093
1139
  }
1094
- /**
1095
- * A function that handles errors that blow up in the CLI.
1096
- * @param error Error to be handled.
1097
- * @returns A promise that resolves with the error passed.
1098
- */
1099
- declare function handler(error: Error): Promise<Error>;
1100
- declare function mapper(error: Error): Promise<Error>;
1101
- declare function isFatal(error: Error): boolean;
1102
- declare function shouldReport(error: Error): boolean;
1103
1140
 
1104
- type error_CancelExecution = CancelExecution;
1105
- declare const error_CancelExecution: typeof CancelExecution;
1106
- type error_Fatal = Fatal;
1107
- declare const error_Fatal: typeof Fatal;
1108
- type error_Abort = Abort;
1109
- declare const error_Abort: typeof Abort;
1110
- type error_AbortSilent = AbortSilent;
1111
- declare const error_AbortSilent: typeof AbortSilent;
1112
- type error_Bug = Bug;
1113
- declare const error_Bug: typeof Bug;
1114
- declare const error_handler: typeof handler;
1115
- declare const error_mapper: typeof mapper;
1116
- declare const error_isFatal: typeof isFatal;
1117
- declare const error_shouldReport: typeof shouldReport;
1118
- declare const error_AbortSignal: typeof AbortSignal;
1119
- declare namespace error {
1141
+ declare const api_admin: typeof admin;
1142
+ declare namespace api {
1120
1143
  export {
1121
- error_CancelExecution as CancelExecution,
1122
- error_Fatal as Fatal,
1123
- error_Abort as Abort,
1124
- error_AbortSilent as AbortSilent,
1125
- error_Bug as Bug,
1126
- error_handler as handler,
1127
- error_mapper as mapper,
1128
- error_isFatal as isFatal,
1129
- error_shouldReport as shouldReport,
1130
- error_AbortSignal as AbortSignal,
1144
+ api_admin as admin,
1145
+ partners$2 as partners,
1146
+ index as graphql,
1147
+ };
1148
+ }
1149
+
1150
+ declare function zip(inputDirectory: string, outputZipPath: string): Promise<void>;
1151
+
1152
+ declare const archiver_zip: typeof zip;
1153
+ declare namespace archiver {
1154
+ export {
1155
+ archiver_zip as zip,
1131
1156
  };
1132
1157
  }
1133
1158
 
@@ -1408,7 +1433,7 @@ declare function writeSync(path: string, data: string): void;
1408
1433
  declare function append(path: string, data: string): Promise<void>;
1409
1434
  declare function mkdir(path: string): Promise<void>;
1410
1435
  declare function mkdirSync(path: string): void;
1411
- declare function remove(path: string): Promise<void>;
1436
+ declare function remove$1(path: string): Promise<void>;
1412
1437
  declare function rmdir(path: string, { force }?: {
1413
1438
  force?: boolean;
1414
1439
  }): Promise<void>;
@@ -1460,7 +1485,6 @@ declare const file_writeSync: typeof writeSync;
1460
1485
  declare const file_append: typeof append;
1461
1486
  declare const file_mkdir: typeof mkdir;
1462
1487
  declare const file_mkdirSync: typeof mkdirSync;
1463
- declare const file_remove: typeof remove;
1464
1488
  declare const file_rmdir: typeof rmdir;
1465
1489
  declare const file_mkTmpDir: typeof mkTmpDir;
1466
1490
  declare const file_isDirectory: typeof isDirectory;
@@ -1484,7 +1508,7 @@ declare namespace file {
1484
1508
  file_append as append,
1485
1509
  file_mkdir as mkdir,
1486
1510
  file_mkdirSync as mkdirSync,
1487
- file_remove as remove,
1511
+ remove$1 as remove,
1488
1512
  file_rmdir as rmdir,
1489
1513
  file_mkTmpDir as mkTmpDir,
1490
1514
  file_isDirectory as isDirectory,
@@ -1792,6 +1816,7 @@ interface ConfSchema {
1792
1816
  themeStore: string;
1793
1817
  }
1794
1818
  declare const cliKit: Conf<ConfSchema>;
1819
+ declare function remove(): void;
1795
1820
  declare function getAppInfo(directory: string): CachedAppInfo | undefined;
1796
1821
  declare function setAppInfo(options: {
1797
1822
  directory: string;
@@ -1806,6 +1831,7 @@ declare function setThemeStore(store: string): void;
1806
1831
 
1807
1832
  type store_CachedAppInfo = CachedAppInfo;
1808
1833
  declare const store_cliKit: typeof cliKit;
1834
+ declare const store_remove: typeof remove;
1809
1835
  declare const store_getAppInfo: typeof getAppInfo;
1810
1836
  declare const store_setAppInfo: typeof setAppInfo;
1811
1837
  declare const store_clearAppInfo: typeof clearAppInfo;
@@ -1815,6 +1841,7 @@ declare namespace store {
1815
1841
  export {
1816
1842
  store_CachedAppInfo as CachedAppInfo,
1817
1843
  store_cliKit as cliKit,
1844
+ store_remove as remove,
1818
1845
  store_getAppInfo as getAppInfo,
1819
1846
  store_setAppInfo as setAppInfo,
1820
1847
  store_clearAppInfo as clearAppInfo,
@@ -1907,6 +1934,7 @@ declare const concurrentExec: (commands: ConcurrentExecCommand[]) => Promise<voi
1907
1934
  * @param filename string The path to the file to be displayed.
1908
1935
  */
1909
1936
  declare function page(filename: string): Promise<void>;
1937
+ declare function sleep(seconds: number): Promise<unknown>;
1910
1938
 
1911
1939
  type system_ExecOptions = ExecOptions;
1912
1940
  type system_WritableExecOptions = WritableExecOptions;
@@ -1915,6 +1943,7 @@ declare const system_captureOutput: typeof captureOutput;
1915
1943
  declare const system_exec: typeof exec;
1916
1944
  declare const system_concurrentExec: typeof concurrentExec;
1917
1945
  declare const system_page: typeof page;
1946
+ declare const system_sleep: typeof sleep;
1918
1947
  declare namespace system {
1919
1948
  export {
1920
1949
  system_ExecOptions as ExecOptions,
@@ -1924,6 +1953,7 @@ declare namespace system {
1924
1953
  system_exec as exec,
1925
1954
  system_concurrentExec as concurrentExec,
1926
1955
  system_page as page,
1956
+ system_sleep as sleep,
1927
1957
  };
1928
1958
  }
1929
1959