@commercelayer/cli-core 5.0.0-oclif3.1 → 5.0.0-oclif3.10

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.
Files changed (83) hide show
  1. package/lib/index.d.mts +593 -0
  2. package/lib/index.d.ts +593 -0
  3. package/lib/index.js +11 -0
  4. package/lib/index.mjs +11 -0
  5. package/package.json +26 -34
  6. package/lib/cjs/api.d.ts +0 -41
  7. package/lib/cjs/api.js +0 -1
  8. package/lib/cjs/application.d.ts +0 -34
  9. package/lib/cjs/application.js +0 -1
  10. package/lib/cjs/color.d.ts +0 -107
  11. package/lib/cjs/color.js +0 -1
  12. package/lib/cjs/command.d.ts +0 -21
  13. package/lib/cjs/command.js +0 -1
  14. package/lib/cjs/config.d.ts +0 -92
  15. package/lib/cjs/config.js +0 -1
  16. package/lib/cjs/filter.d.ts +0 -10
  17. package/lib/cjs/filter.js +0 -1
  18. package/lib/cjs/help.d.ts +0 -17
  19. package/lib/cjs/help.js +0 -5
  20. package/lib/cjs/index.d.ts +0 -19
  21. package/lib/cjs/index.js +0 -1
  22. package/lib/cjs/inflector.d.ts +0 -26
  23. package/lib/cjs/inflector.js +0 -1
  24. package/lib/cjs/jsonapi.d.ts +0 -2
  25. package/lib/cjs/jsonapi.js +0 -1
  26. package/lib/cjs/output.d.ts +0 -28
  27. package/lib/cjs/output.js +0 -3
  28. package/lib/cjs/raw.d.ts +0 -12
  29. package/lib/cjs/raw.js +0 -1
  30. package/lib/cjs/schema.d.ts +0 -2
  31. package/lib/cjs/schema.js +0 -1
  32. package/lib/cjs/style.d.ts +0 -14
  33. package/lib/cjs/style.js +0 -1
  34. package/lib/cjs/symbol.d.ts +0 -2
  35. package/lib/cjs/symbol.js +0 -1
  36. package/lib/cjs/text.d.ts +0 -6
  37. package/lib/cjs/text.js +0 -1
  38. package/lib/cjs/token.d.ts +0 -58
  39. package/lib/cjs/token.js +0 -1
  40. package/lib/cjs/update.d.ts +0 -7
  41. package/lib/cjs/update.js +0 -4
  42. package/lib/cjs/util.d.ts +0 -9
  43. package/lib/cjs/util.js +0 -2
  44. package/lib/esm/api.d.ts +0 -41
  45. package/lib/esm/api.js +0 -1
  46. package/lib/esm/application.d.ts +0 -34
  47. package/lib/esm/application.js +0 -1
  48. package/lib/esm/color.d.ts +0 -107
  49. package/lib/esm/color.js +0 -1
  50. package/lib/esm/command.d.ts +0 -21
  51. package/lib/esm/command.js +0 -1
  52. package/lib/esm/config.d.ts +0 -92
  53. package/lib/esm/config.js +0 -1
  54. package/lib/esm/filter.d.ts +0 -10
  55. package/lib/esm/filter.js +0 -1
  56. package/lib/esm/help.d.ts +0 -17
  57. package/lib/esm/help.js +0 -5
  58. package/lib/esm/index.d.ts +0 -19
  59. package/lib/esm/index.js +0 -1
  60. package/lib/esm/inflector.d.ts +0 -26
  61. package/lib/esm/inflector.js +0 -1
  62. package/lib/esm/jsonapi.d.ts +0 -2
  63. package/lib/esm/jsonapi.js +0 -1
  64. package/lib/esm/output.d.ts +0 -28
  65. package/lib/esm/output.js +0 -3
  66. package/lib/esm/raw.d.ts +0 -12
  67. package/lib/esm/raw.js +0 -1
  68. package/lib/esm/schema.d.ts +0 -2
  69. package/lib/esm/schema.js +0 -1
  70. package/lib/esm/style.d.ts +0 -14
  71. package/lib/esm/style.js +0 -1
  72. package/lib/esm/symbol.d.ts +0 -2
  73. package/lib/esm/symbol.js +0 -1
  74. package/lib/esm/text.d.ts +0 -6
  75. package/lib/esm/text.js +0 -1
  76. package/lib/esm/token.d.ts +0 -58
  77. package/lib/esm/token.js +0 -1
  78. package/lib/esm/update.d.ts +0 -7
  79. package/lib/esm/update.js +0 -4
  80. package/lib/esm/util.d.ts +0 -9
  81. package/lib/esm/util.js +0 -2
  82. package/lib/tsconfig.esm.tsbuildinfo +0 -1
  83. package/lib/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,593 @@
1
+ import { Command, Help, Interfaces, CommandHelp } from '@oclif/core';
2
+ import { FlagInput } from '@oclif/core/lib/interfaces/parser';
3
+ import chalk from 'chalk';
4
+ import { Config as Config$1 } from '@oclif/core/lib/interfaces';
5
+
6
+ declare const rawRequest: (config: {
7
+ baseUrl: string;
8
+ resource: string;
9
+ accessToken: string;
10
+ operation: Operation;
11
+ }, data: any, id?: string) => Promise<any>;
12
+ declare const readDataFile: (file: string) => any;
13
+ declare enum Operation {
14
+ Create = "POST",
15
+ Update = "PATCH"
16
+ }
17
+
18
+ declare const denormalize: (response: any) => any;
19
+
20
+ type Method = 'GET' | 'PATCH' | 'POST' | 'PUT' | 'DELETE';
21
+
22
+ type ApiMode = 'test' | 'live';
23
+ type ApiType = 'core' | 'provisioning' | 'metrics' | 'auth';
24
+
25
+ /** Build base URL */
26
+ declare const baseURL: (api?: ApiType, slug?: string, domain?: string) => string;
27
+ /** Extract domain name from URL */
28
+ declare const extractDomain: (baseUrl: string) => string | undefined;
29
+ /** Decode API execution mode */
30
+ declare const execMode: (liveFlag: string | boolean | undefined) => ApiMode;
31
+ declare const humanizeResource: (type: string) => string;
32
+
33
+ declare const isResourceCacheable: (resource?: string, method?: Method) => boolean;
34
+ type DelayOptions = {
35
+ environment?: ApiMode;
36
+ parallelRequests?: number;
37
+ totalRequests?: number;
38
+ minimumDelay?: number;
39
+ securityDelay?: number;
40
+ resourceType?: string;
41
+ method?: Method;
42
+ };
43
+ declare const liveEnvironment: (env: ApiMode) => boolean;
44
+ declare const requestRateLimitDelay: (options?: DelayOptions) => number;
45
+
46
+ declare const request: {
47
+ raw: (config: {
48
+ baseUrl: string;
49
+ resource: string;
50
+ accessToken: string;
51
+ operation: Operation;
52
+ }, data: any, id?: string | undefined) => Promise<any>;
53
+ readDataFile: (file: string) => any;
54
+ rateLimitDelay: (options?: DelayOptions) => number;
55
+ };
56
+ declare const response: {
57
+ denormalize: (response: any) => any;
58
+ };
59
+
60
+ type api$1_ApiMode = ApiMode;
61
+ type api$1_ApiType = ApiType;
62
+ type api$1_DelayOptions = DelayOptions;
63
+ type api$1_Operation = Operation;
64
+ declare const api$1_Operation: typeof Operation;
65
+ declare const api$1_baseURL: typeof baseURL;
66
+ declare const api$1_execMode: typeof execMode;
67
+ declare const api$1_extractDomain: typeof extractDomain;
68
+ declare const api$1_humanizeResource: typeof humanizeResource;
69
+ declare const api$1_isResourceCacheable: typeof isResourceCacheable;
70
+ declare const api$1_liveEnvironment: typeof liveEnvironment;
71
+ declare const api$1_request: typeof request;
72
+ declare const api$1_requestRateLimitDelay: typeof requestRateLimitDelay;
73
+ declare const api$1_response: typeof response;
74
+ declare namespace api$1 {
75
+ export { type api$1_ApiMode as ApiMode, type api$1_ApiType as ApiType, type api$1_DelayOptions as DelayOptions, api$1_Operation as Operation, api$1_baseURL as baseURL, api$1_execMode as execMode, api$1_extractDomain as extractDomain, api$1_humanizeResource as humanizeResource, api$1_isResourceCacheable as isResourceCacheable, api$1_liveEnvironment as liveEnvironment, api$1_request as request, readDataFile as requestDataFile, api$1_requestRateLimitDelay as requestRateLimitDelay, rawRequest as requestRaw, api$1_response as response, denormalize as responseDenormalize };
76
+ }
77
+
78
+ type AuthScope = string | string[];
79
+ type AccessToken = {
80
+ accessToken: string;
81
+ tokenType: 'bearer' | 'Bearer';
82
+ expiresIn: number;
83
+ expires: Date;
84
+ scope: AuthScope;
85
+ createdAt: number;
86
+ error?: string;
87
+ errorDescription?: string;
88
+ };
89
+ type AccessTokenInfo = {
90
+ organization?: {
91
+ id: string;
92
+ slug: string;
93
+ };
94
+ application: {
95
+ id: string;
96
+ kind: 'integration' | 'sales_channel' | 'user';
97
+ public: boolean;
98
+ };
99
+ test: boolean;
100
+ exp?: number;
101
+ rand?: number;
102
+ owner?: {
103
+ id: string;
104
+ type: 'Customer' | 'User';
105
+ };
106
+ market?: {
107
+ id: string[];
108
+ price_list_id: string;
109
+ stock_location_ids?: string[];
110
+ geocoder_id?: string;
111
+ allows_external_prices: boolean;
112
+ };
113
+ scope?: AuthScope;
114
+ user?: {
115
+ id: string;
116
+ };
117
+ };
118
+ type CustomToken = {
119
+ accessToken: string;
120
+ info: AccessTokenInfo;
121
+ expMinutes: number;
122
+ };
123
+ /** Decode a Commerce Layer access token */
124
+ declare const decodeAccessToken: (accessToken: string) => AccessTokenInfo;
125
+ /** generate a custom access token */
126
+ declare const generateAccessToken: (token: AccessTokenInfo, sharedSecret: string, minutes: number) => CustomToken;
127
+ declare const getAccessToken: (auth: AppAuth) => Promise<AccessToken>;
128
+ declare const revokeAccessToken: (app: AppAuth, token: string) => Promise<void>;
129
+ declare const isAccessTokenExpiring: (tokenData: AccessToken) => boolean;
130
+ declare const getTokenEnvironment: (token: string | AccessTokenInfo) => ApiMode;
131
+
132
+ type token_AccessToken = AccessToken;
133
+ type token_AccessTokenInfo = AccessTokenInfo;
134
+ type token_AuthScope = AuthScope;
135
+ type token_CustomToken = CustomToken;
136
+ declare const token_decodeAccessToken: typeof decodeAccessToken;
137
+ declare const token_generateAccessToken: typeof generateAccessToken;
138
+ declare const token_getAccessToken: typeof getAccessToken;
139
+ declare const token_getTokenEnvironment: typeof getTokenEnvironment;
140
+ declare const token_isAccessTokenExpiring: typeof isAccessTokenExpiring;
141
+ declare const token_revokeAccessToken: typeof revokeAccessToken;
142
+ declare namespace token {
143
+ export { type token_AccessToken as AccessToken, type token_AccessTokenInfo as AccessTokenInfo, type token_AuthScope as AuthScope, type token_CustomToken as CustomToken, token_decodeAccessToken as decodeAccessToken, token_generateAccessToken as generateAccessToken, token_getAccessToken as getAccessToken, token_getTokenEnvironment as getTokenEnvironment, token_isAccessTokenExpiring as isAccessTokenExpiring, token_revokeAccessToken as revokeAccessToken };
144
+ }
145
+
146
+ interface AppKey {
147
+ key: string;
148
+ mode: ApiMode;
149
+ id?: string;
150
+ alias?: string;
151
+ }
152
+ interface AppAuth {
153
+ slug?: string;
154
+ domain?: string;
155
+ clientId: string;
156
+ clientSecret?: string;
157
+ scope?: AuthScope;
158
+ email?: string;
159
+ password?: string;
160
+ api?: ApiType;
161
+ }
162
+ interface AppInfo extends AppKey, AppAuth {
163
+ organization?: string;
164
+ kind: string;
165
+ name: string;
166
+ baseUrl?: string;
167
+ }
168
+
169
+ /** Build application key */
170
+ declare const appKey: () => string;
171
+ /** Check application key */
172
+ declare const appKeyValid: (appKey: AppKey) => boolean;
173
+ /** Check if two application keys are equal */
174
+ declare const appKeyMatch: (app1?: AppKey, app2?: AppKey) => boolean;
175
+ declare const arrayScope: (scope?: AuthScope) => string[];
176
+ declare const isProvisioningApp: (app: AppAuth) => boolean;
177
+
178
+ type application_AppAuth = AppAuth;
179
+ type application_AppInfo = AppInfo;
180
+ type application_AppKey = AppKey;
181
+ declare const application_appKey: typeof appKey;
182
+ declare const application_appKeyMatch: typeof appKeyMatch;
183
+ declare const application_appKeyValid: typeof appKeyValid;
184
+ declare const application_arrayScope: typeof arrayScope;
185
+ declare const application_isProvisioningApp: typeof isProvisioningApp;
186
+ declare namespace application {
187
+ export { type application_AppAuth as AppAuth, type application_AppInfo as AppInfo, type application_AppKey as AppKey, application_appKey as appKey, application_appKeyMatch as appKeyMatch, application_appKeyValid as appKeyValid, application_arrayScope as arrayScope, application_isProvisioningApp as isProvisioningApp };
188
+ }
189
+
190
+ type ApiConfig = {
191
+ default_domain: string;
192
+ default_app_domain: string;
193
+ default_stg_domain: string;
194
+ token_expiration_mins: number;
195
+ token_encoding_algorithm: string;
196
+ requests_max_num_burst: number;
197
+ requests_max_num_burst_cacheable: number;
198
+ requests_max_num_burst_test: number;
199
+ requests_max_num_burst_test_cacheable: number;
200
+ requests_max_secs_burst: number;
201
+ requests_max_num_avg: number;
202
+ requests_max_num_avg_cacheable: number;
203
+ requests_max_num_avg_test: number;
204
+ requests_max_num_avg_test_cacheable: number;
205
+ requests_max_secs_avg: number;
206
+ requests_max_num_oauth: number;
207
+ requests_max_secs_oauth: number;
208
+ page_max_size: number;
209
+ page_default_size: number;
210
+ };
211
+ type ApplicationConfig = {
212
+ kinds: readonly string[];
213
+ login_scopes: readonly string[];
214
+ };
215
+ type ImportsConfig = {
216
+ max_size: number;
217
+ statuses: readonly string[];
218
+ types: readonly string[];
219
+ max_queue_length: number;
220
+ attachment_expiration: number;
221
+ };
222
+ type ExportsConfig = {
223
+ max_size: number;
224
+ statuses: readonly string[];
225
+ types: readonly string[];
226
+ max_queue_length: number;
227
+ attachment_expiration: number;
228
+ };
229
+ type CleanupsConfig = {
230
+ max_size: number;
231
+ statuses: readonly string[];
232
+ types: readonly string[];
233
+ max_queue_length: number;
234
+ };
235
+ type WebhooksConfig = {
236
+ retry_number: number;
237
+ };
238
+ type CliConfig = {
239
+ applications: readonly string[];
240
+ };
241
+ type DocConfig = {
242
+ core: string;
243
+ core_api_reference: string;
244
+ core_how_tos: string;
245
+ core_raste_limits: string;
246
+ core_filtering_data: string;
247
+ metrics: string;
248
+ metrics_api_reference: string;
249
+ provisioning: string;
250
+ provisioning_api_reference: string;
251
+ imports_resources: string;
252
+ exports_resources: string;
253
+ cleanups_resources: string;
254
+ webhooks_events: string;
255
+ tags_resources: string;
256
+ };
257
+ type TagsConfig = {
258
+ max_resource_tags: number;
259
+ taggable_resources: readonly string[];
260
+ tag_name_max_length: number;
261
+ tag_name_pattern: RegExp;
262
+ };
263
+ type ProvisioningConfig = {
264
+ default_subdomain: string;
265
+ scope: string;
266
+ applications: readonly string[];
267
+ };
268
+ type Config = {
269
+ api: ApiConfig;
270
+ application: ApplicationConfig;
271
+ imports: ImportsConfig;
272
+ exports: ExportsConfig;
273
+ cleanups: CleanupsConfig;
274
+ webhooks: WebhooksConfig;
275
+ cli: CliConfig;
276
+ doc: DocConfig;
277
+ tags: TagsConfig;
278
+ provisioning: ProvisioningConfig;
279
+ };
280
+ declare const config: Config;
281
+
282
+ /** Copy command flags excluding a subset */
283
+ declare const commandFlags: <T extends object>(flags: T, exclude?: string[]) => T;
284
+ declare const allFlags: (command: Command.Class) => FlagInput;
285
+
286
+ type KeyVal = Record<string, string | number | boolean | undefined | null>;
287
+ type KeyValString = Record<string, string>;
288
+ type KeyValArray = Record<string, string[]>;
289
+ type KeyValRel = Record<string, {
290
+ readonly type: string;
291
+ readonly id: string;
292
+ }>;
293
+ type KeyValObj = Record<string, any>;
294
+ type KeyValSort = Record<string, 'asc' | 'desc'>;
295
+ type ResAttributes = KeyValObj;
296
+ declare const fixValueType: (val: string) => string | number | boolean | null | undefined;
297
+ declare const findLongStringFlag: (args: string[], name: string) => {
298
+ value: string;
299
+ index: number;
300
+ single: boolean;
301
+ } | undefined;
302
+ declare const fixDashedFlagValue: (argv: string[], flag: any, name?: string, parsed?: any) => string[];
303
+
304
+ type command_KeyVal = KeyVal;
305
+ type command_KeyValArray = KeyValArray;
306
+ type command_KeyValObj = KeyValObj;
307
+ type command_KeyValRel = KeyValRel;
308
+ type command_KeyValSort = KeyValSort;
309
+ type command_KeyValString = KeyValString;
310
+ type command_ResAttributes = ResAttributes;
311
+ declare const command_allFlags: typeof allFlags;
312
+ declare const command_commandFlags: typeof commandFlags;
313
+ declare const command_findLongStringFlag: typeof findLongStringFlag;
314
+ declare const command_fixDashedFlagValue: typeof fixDashedFlagValue;
315
+ declare const command_fixValueType: typeof fixValueType;
316
+ declare namespace command {
317
+ export { type command_KeyVal as KeyVal, type command_KeyValArray as KeyValArray, type command_KeyValObj as KeyValObj, type command_KeyValRel as KeyValRel, type command_KeyValSort as KeyValSort, type command_KeyValString as KeyValString, type command_ResAttributes as ResAttributes, command_allFlags as allFlags, command_commandFlags as commandFlags, command_findLongStringFlag as findLongStringFlag, command_fixDashedFlagValue as fixDashedFlagValue, command_fixValueType as fixValueType };
318
+ }
319
+
320
+ /** Print a formatted object */
321
+ declare const printObject: (obj: any, options?: {
322
+ color?: boolean;
323
+ sort?: boolean;
324
+ width?: number;
325
+ }) => string;
326
+ /** Print object in JSON format */
327
+ declare const printJSON: (obj: any, options?: {
328
+ unformatted?: boolean;
329
+ tabSize?: number;
330
+ }) => string;
331
+ /** Print object in CSV format */
332
+ declare const printCSV: (obj: object[], flags?: any) => string;
333
+ /** Center a string in the given width space */
334
+ declare const center: (str: string, width: number) => string;
335
+ /** Compute longest string in a list of strings */
336
+ declare const maxLength: (values: any[], field: string) => number;
337
+ /** Clean ISO string date */
338
+ declare const cleanDate: (date: string) => string;
339
+ /** Localized string date */
340
+ declare const localeDate: (date: string) => string;
341
+ /** Format aoutput */
342
+ declare const formatOutput: (output: any, flags?: any, { color }?: {
343
+ color?: boolean | undefined;
344
+ }) => string;
345
+ /** Format error message */
346
+ declare const formatError: (error: any, flags?: any) => string;
347
+
348
+ declare const output_center: typeof center;
349
+ declare const output_cleanDate: typeof cleanDate;
350
+ declare const output_formatError: typeof formatError;
351
+ declare const output_formatOutput: typeof formatOutput;
352
+ declare const output_localeDate: typeof localeDate;
353
+ declare const output_maxLength: typeof maxLength;
354
+ declare const output_printCSV: typeof printCSV;
355
+ declare const output_printJSON: typeof printJSON;
356
+ declare const output_printObject: typeof printObject;
357
+ declare namespace output {
358
+ export { output_center as center, output_cleanDate as cleanDate, output_formatError as formatError, output_formatOutput as formatOutput, output_localeDate as localeDate, output_maxLength as maxLength, output_printCSV as printCSV, output_printJSON as printJSON, output_printObject as printObject };
359
+ }
360
+
361
+ declare const reset: chalk.Chalk;
362
+ declare const visible: chalk.Chalk;
363
+ declare const hidden: chalk.Chalk;
364
+ declare const red: chalk.Chalk;
365
+ declare const redBright: chalk.Chalk;
366
+ declare const green: chalk.Chalk;
367
+ declare const greenBright: chalk.Chalk;
368
+ declare const yellow: chalk.Chalk;
369
+ declare const yellowBright: chalk.Chalk;
370
+ declare const blue: chalk.Chalk;
371
+ declare const blueBright: chalk.Chalk;
372
+ declare const white: chalk.Chalk;
373
+ declare const whiteBright: chalk.Chalk;
374
+ declare const black: chalk.Chalk;
375
+ declare const blackBright: chalk.Chalk;
376
+ declare const grey: chalk.Chalk;
377
+ declare const cyan: chalk.Chalk;
378
+ declare const cyanBright: chalk.Chalk;
379
+ declare const magenta: chalk.Chalk;
380
+ declare const magentaBright: chalk.Chalk;
381
+ declare const bold: chalk.Chalk;
382
+ declare const dim: chalk.Chalk;
383
+ declare const underline: chalk.Chalk;
384
+ declare const italic: chalk.Chalk;
385
+ declare const bg: {
386
+ white: chalk.Chalk;
387
+ whiteBright: chalk.Chalk;
388
+ black: chalk.Chalk;
389
+ blackBright: chalk.Chalk;
390
+ grey: chalk.Chalk;
391
+ red: chalk.Chalk;
392
+ redBright: chalk.Chalk;
393
+ green: chalk.Chalk;
394
+ greenBright: chalk.Chalk;
395
+ yellow: chalk.Chalk;
396
+ yellowBright: chalk.Chalk;
397
+ blue: chalk.Chalk;
398
+ blueBright: chalk.Chalk;
399
+ magenta: chalk.Chalk;
400
+ magentaBright: chalk.Chalk;
401
+ cyan: chalk.Chalk;
402
+ cyanBright: chalk.Chalk;
403
+ };
404
+ declare const style: {
405
+ organization: chalk.Chalk;
406
+ application: chalk.Chalk;
407
+ slug: chalk.Chalk;
408
+ id: chalk.Chalk;
409
+ token: chalk.Chalk;
410
+ resource: chalk.Chalk;
411
+ attribute: chalk.Chalk;
412
+ trigger: chalk.Chalk;
413
+ kind: chalk.Chalk;
414
+ live: chalk.Chalk;
415
+ test: chalk.Chalk;
416
+ execMode: (mode: ApiMode) => chalk.Chalk;
417
+ success: chalk.Chalk;
418
+ warning: chalk.Chalk;
419
+ error: chalk.Chalk;
420
+ arg: chalk.Chalk;
421
+ flag: chalk.Chalk;
422
+ command: chalk.Chalk;
423
+ value: chalk.Chalk;
424
+ alias: chalk.Chalk;
425
+ plugin: chalk.Chalk;
426
+ title: chalk.Chalk;
427
+ path: chalk.Chalk;
428
+ datetime: chalk.Chalk;
429
+ number: chalk.Chalk;
430
+ };
431
+ declare const type: {
432
+ datetime: chalk.Chalk;
433
+ number: chalk.Chalk;
434
+ path: chalk.Chalk;
435
+ };
436
+ declare const api: {
437
+ organization: chalk.Chalk;
438
+ application: chalk.Chalk;
439
+ slug: chalk.Chalk;
440
+ id: chalk.Chalk;
441
+ token: chalk.Chalk;
442
+ resource: chalk.Chalk;
443
+ attribute: chalk.Chalk;
444
+ trigger: chalk.Chalk;
445
+ kind: chalk.Chalk;
446
+ live: chalk.Chalk;
447
+ test: chalk.Chalk;
448
+ };
449
+ declare const msg: {
450
+ success: chalk.Chalk;
451
+ warning: chalk.Chalk;
452
+ error: chalk.Chalk;
453
+ };
454
+ declare const cli: {
455
+ arg: chalk.Chalk;
456
+ flag: chalk.Chalk;
457
+ command: chalk.Chalk;
458
+ value: chalk.Chalk;
459
+ alias: chalk.Chalk;
460
+ plugin: chalk.Chalk;
461
+ };
462
+ declare const table: {
463
+ header: chalk.Chalk;
464
+ key: chalk.Chalk;
465
+ };
466
+
467
+ declare const color_api: typeof api;
468
+ declare const color_bg: typeof bg;
469
+ declare const color_black: typeof black;
470
+ declare const color_blackBright: typeof blackBright;
471
+ declare const color_blue: typeof blue;
472
+ declare const color_blueBright: typeof blueBright;
473
+ declare const color_bold: typeof bold;
474
+ declare const color_cli: typeof cli;
475
+ declare const color_cyan: typeof cyan;
476
+ declare const color_cyanBright: typeof cyanBright;
477
+ declare const color_dim: typeof dim;
478
+ declare const color_green: typeof green;
479
+ declare const color_greenBright: typeof greenBright;
480
+ declare const color_grey: typeof grey;
481
+ declare const color_hidden: typeof hidden;
482
+ declare const color_italic: typeof italic;
483
+ declare const color_magenta: typeof magenta;
484
+ declare const color_magentaBright: typeof magentaBright;
485
+ declare const color_msg: typeof msg;
486
+ declare const color_red: typeof red;
487
+ declare const color_redBright: typeof redBright;
488
+ declare const color_reset: typeof reset;
489
+ declare const color_style: typeof style;
490
+ declare const color_table: typeof table;
491
+ declare const color_type: typeof type;
492
+ declare const color_underline: typeof underline;
493
+ declare const color_visible: typeof visible;
494
+ declare const color_white: typeof white;
495
+ declare const color_whiteBright: typeof whiteBright;
496
+ declare const color_yellow: typeof yellow;
497
+ declare const color_yellowBright: typeof yellowBright;
498
+ declare namespace color {
499
+ export { color_api as api, color_bg as bg, color_black as black, color_blackBright as blackBright, color_blue as blue, color_blueBright as blueBright, color_bold as bold, color_cli as cli, color_cyan as cyan, color_cyanBright as cyanBright, color_dim as dim, color_green as green, color_greenBright as greenBright, color_grey as grey, color_hidden as hidden, color_italic as italic, color_magenta as magenta, color_magentaBright as magentaBright, color_msg as msg, color_red as red, color_redBright as redBright, color_reset as reset, color_style as style, color_table as table, color_type as type, color_underline as underline, color_visible as visible, color_white as white, color_whiteBright as whiteBright, color_yellow as yellow, color_yellowBright as yellowBright };
500
+ }
501
+
502
+ interface Package {
503
+ name: string;
504
+ version: string;
505
+ description: string;
506
+ }
507
+ declare const checkUpdate: (pkg: Package) => void;
508
+
509
+ type update_Package = Package;
510
+ declare const update_checkUpdate: typeof checkUpdate;
511
+ declare namespace update {
512
+ export { type update_Package as Package, update_checkUpdate as checkUpdate };
513
+ }
514
+
515
+ /** Await ms milliseconds */
516
+ declare const sleep: (ms: number) => Promise<void>;
517
+ declare const resetConsole: () => void;
518
+ declare const log: (message?: string, ...args: unknown[]) => void;
519
+ declare const specialFolder: (filePath: string, createIfNotExists?: boolean) => string;
520
+ declare const generateGroupUID: () => string;
521
+ declare const userAgent: (config: Config$1) => string;
522
+
523
+ declare const util_generateGroupUID: typeof generateGroupUID;
524
+ declare const util_log: typeof log;
525
+ declare const util_resetConsole: typeof resetConsole;
526
+ declare const util_sleep: typeof sleep;
527
+ declare const util_specialFolder: typeof specialFolder;
528
+ declare const util_userAgent: typeof userAgent;
529
+ declare namespace util {
530
+ export { util_generateGroupUID as generateGroupUID, util_log as log, util_resetConsole as resetConsole, util_sleep as sleep, util_specialFolder as specialFolder, util_userAgent as userAgent };
531
+ }
532
+
533
+ declare class CLICommandHelp extends CommandHelp {
534
+ examples(examples: Command.Example[] | undefined | string): string | undefined;
535
+ }
536
+ declare class CLIBaseHelp extends Help {
537
+ showHelp(args: string[]): Promise<void>;
538
+ showRootHelp(): Promise<void>;
539
+ showTopicHelp(topic: Interfaces.Topic): Promise<void>;
540
+ showCommandHelp(command: Command.Loadable): Promise<void>;
541
+ formatRoot(): string;
542
+ formatTopic(topic: Interfaces.Topic): string;
543
+ formatTopics(topics: Interfaces.Topic[]): string;
544
+ formatCommands(commands: Command.Loadable[]): string;
545
+ formatCommand(command: Command.Loadable): string;
546
+ getCommandHelpClass(command: Command.Loadable): CLICommandHelp;
547
+ }
548
+
549
+ declare const downloadSchema: (version?: string) => Promise<any>;
550
+
551
+ declare namespace schema {
552
+ export { downloadSchema as download };
553
+ }
554
+
555
+ declare const symbols: Record<string, Record<string, string>>;
556
+
557
+ declare const symbol_symbols: typeof symbols;
558
+ declare namespace symbol {
559
+ export { symbol_symbols as symbols };
560
+ }
561
+
562
+ declare const capitalize: (str: string | undefined) => string | undefined;
563
+ declare const pluralize: (str: string, plural?: string | undefined) => string;
564
+ declare const singularize: (str: string, singular?: string | undefined) => string;
565
+ declare const camelize: (str: string, lowFirstLetter?: boolean | undefined) => string;
566
+
567
+ declare const text_camelize: typeof camelize;
568
+ declare const text_capitalize: typeof capitalize;
569
+ declare const text_pluralize: typeof pluralize;
570
+ declare const text_singularize: typeof singularize;
571
+ declare const text_symbols: typeof symbols;
572
+ declare namespace text {
573
+ export { text_camelize as camelize, text_capitalize as capitalize, text_pluralize as pluralize, text_singularize as singularize, text_symbols as symbols };
574
+ }
575
+
576
+ declare const documentation: string;
577
+ interface Filter extends Record<string, unknown> {
578
+ predicate: string;
579
+ description: string;
580
+ }
581
+ declare const filterList: () => string[];
582
+ declare const filterAvailable: (filter: string) => boolean;
583
+ declare const applyFilter: (predicate: string, ...fields: string[]) => string;
584
+ declare const filters: () => Filter[];
585
+
586
+ type filter_Filter = Filter;
587
+ declare const filter_documentation: typeof documentation;
588
+ declare const filter_filters: typeof filters;
589
+ declare namespace filter {
590
+ export { type filter_Filter as Filter, applyFilter as apply, filterAvailable as available, filter_documentation as documentation, filter_filters as filters, filterList as list };
591
+ }
592
+
593
+ export { type AccessToken, type AccessTokenInfo, type ApiMode, type ApiType, type AppAuth, type AppInfo, type AppKey, type AuthScope, type CustomToken, type KeyVal, type KeyValArray, type KeyValObj, type KeyValRel, type KeyValSort, type KeyValString, type ResAttributes, api$1 as clApi, application as clApplication, color as clColor, command as clCommand, config as clConfig, filter as clFilter, CLIBaseHelp as clHelp, output as clOutput, schema as clSchema, symbol as clSymbol, text as clText, token as clToken, update as clUpdate, util as clUtil };