@commercelayer/cli-core 6.0.0-beta.8 → 6.0.0-oclif4.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.
package/lib/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { Command, Interfaces, Help, CommandHelp } from '@oclif/core';
2
- import * as chalk from 'chalk';
2
+ import chalk from 'chalk';
3
+
4
+ declare const denormalize: (response: any) => any;
3
5
 
4
6
  declare const rawRequest: (config: {
5
7
  baseUrl: string;
@@ -13,8 +15,6 @@ declare enum Operation {
13
15
  Update = "PATCH"
14
16
  }
15
17
 
16
- declare const denormalize: (response: any) => any;
17
-
18
18
  type Method = 'GET' | 'PATCH' | 'POST' | 'PUT' | 'DELETE';
19
19
 
20
20
  type ApiMode = 'test' | 'live';
@@ -73,6 +73,44 @@ declare namespace api$1 {
73
73
  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 };
74
74
  }
75
75
 
76
+ declare const commandFlags: <T extends Interfaces.FlagInput>(flags: T, exclude?: Array<keyof T>) => T;
77
+ declare const allFlags: (command: Command.Class) => Interfaces.FlagInput;
78
+ type KeyVal = Record<string, string | number | boolean | undefined | null>;
79
+ type KeyValString = Record<string, string>;
80
+ type KeyValArray = Record<string, string[]>;
81
+ type KeyValRel = Record<string, {
82
+ readonly type: string;
83
+ readonly id: string;
84
+ }>;
85
+ type KeyValObj = Record<string, any>;
86
+ type KeyValSort = Record<string, 'asc' | 'desc'>;
87
+ type ResAttributes = KeyValObj;
88
+ declare const fixValueType: (val: string) => string | number | boolean | null | undefined;
89
+ declare const findLongStringFlag: (args: string[], name: string) => {
90
+ value: string;
91
+ index: number;
92
+ single: boolean;
93
+ } | undefined;
94
+ declare const fixDashedFlagValue: (argv: string[], flag: any, name?: string, parsed?: any) => string[];
95
+ declare const checkISODateTimeValue: (value?: string) => Date;
96
+
97
+ type command_KeyVal = KeyVal;
98
+ type command_KeyValArray = KeyValArray;
99
+ type command_KeyValObj = KeyValObj;
100
+ type command_KeyValRel = KeyValRel;
101
+ type command_KeyValSort = KeyValSort;
102
+ type command_KeyValString = KeyValString;
103
+ type command_ResAttributes = ResAttributes;
104
+ declare const command_allFlags: typeof allFlags;
105
+ declare const command_checkISODateTimeValue: typeof checkISODateTimeValue;
106
+ declare const command_commandFlags: typeof commandFlags;
107
+ declare const command_findLongStringFlag: typeof findLongStringFlag;
108
+ declare const command_fixDashedFlagValue: typeof fixDashedFlagValue;
109
+ declare const command_fixValueType: typeof fixValueType;
110
+ declare namespace command {
111
+ 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_checkISODateTimeValue as checkISODateTimeValue, command_commandFlags as commandFlags, command_findLongStringFlag as findLongStringFlag, command_fixDashedFlagValue as fixDashedFlagValue, command_fixValueType as fixValueType };
112
+ }
113
+
76
114
  type ApiConfig = {
77
115
  default_domain: string;
78
116
  default_app_domain: string;
@@ -178,44 +216,6 @@ type Config = {
178
216
  };
179
217
  declare const config: Config;
180
218
 
181
- declare const commandFlags: <T extends Interfaces.FlagInput>(flags: T, exclude?: Array<keyof T>) => T;
182
- declare const allFlags: (command: Command.Class) => Interfaces.FlagInput;
183
- type KeyVal = Record<string, string | number | boolean | undefined | null>;
184
- type KeyValString = Record<string, string>;
185
- type KeyValArray = Record<string, string[]>;
186
- type KeyValRel = Record<string, {
187
- readonly type: string;
188
- readonly id: string;
189
- }>;
190
- type KeyValObj = Record<string, any>;
191
- type KeyValSort = Record<string, 'asc' | 'desc'>;
192
- type ResAttributes = KeyValObj;
193
- declare const fixValueType: (val: string) => string | number | boolean | null | undefined;
194
- declare const findLongStringFlag: (args: string[], name: string) => {
195
- value: string;
196
- index: number;
197
- single: boolean;
198
- } | undefined;
199
- declare const fixDashedFlagValue: (argv: string[], flag: any, name?: string, parsed?: any) => string[];
200
- declare const checkISODateTimeValue: (value?: string) => Date;
201
-
202
- type command_KeyVal = KeyVal;
203
- type command_KeyValArray = KeyValArray;
204
- type command_KeyValObj = KeyValObj;
205
- type command_KeyValRel = KeyValRel;
206
- type command_KeyValSort = KeyValSort;
207
- type command_KeyValString = KeyValString;
208
- type command_ResAttributes = ResAttributes;
209
- declare const command_allFlags: typeof allFlags;
210
- declare const command_checkISODateTimeValue: typeof checkISODateTimeValue;
211
- declare const command_commandFlags: typeof commandFlags;
212
- declare const command_findLongStringFlag: typeof findLongStringFlag;
213
- declare const command_fixDashedFlagValue: typeof fixDashedFlagValue;
214
- declare const command_fixValueType: typeof fixValueType;
215
- declare namespace command {
216
- 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_checkISODateTimeValue as checkISODateTimeValue, command_commandFlags as commandFlags, command_findLongStringFlag as findLongStringFlag, command_fixDashedFlagValue as fixDashedFlagValue, command_fixValueType as fixValueType };
217
- }
218
-
219
219
  type AuthScope = string | string[];
220
220
  type AccessToken = {
221
221
  accessToken: string;
@@ -378,110 +378,110 @@ declare namespace output {
378
378
  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 };
379
379
  }
380
380
 
381
- declare const reset: chalk.ChalkInstance;
382
- declare const visible: chalk.ChalkInstance;
383
- declare const hidden: chalk.ChalkInstance;
384
- declare const red: chalk.ChalkInstance;
385
- declare const redBright: chalk.ChalkInstance;
386
- declare const green: chalk.ChalkInstance;
387
- declare const greenBright: chalk.ChalkInstance;
388
- declare const yellow: chalk.ChalkInstance;
389
- declare const yellowBright: chalk.ChalkInstance;
390
- declare const blue: chalk.ChalkInstance;
391
- declare const blueBright: chalk.ChalkInstance;
392
- declare const white: chalk.ChalkInstance;
393
- declare const whiteBright: chalk.ChalkInstance;
394
- declare const black: chalk.ChalkInstance;
395
- declare const blackBright: chalk.ChalkInstance;
396
- declare const grey: chalk.ChalkInstance;
397
- declare const cyan: chalk.ChalkInstance;
398
- declare const cyanBright: chalk.ChalkInstance;
399
- declare const magenta: chalk.ChalkInstance;
400
- declare const magentaBright: chalk.ChalkInstance;
401
- declare const bold: chalk.ChalkInstance;
402
- declare const dim: chalk.ChalkInstance;
403
- declare const underline: chalk.ChalkInstance;
404
- declare const italic: chalk.ChalkInstance;
381
+ declare const reset: chalk.Chalk;
382
+ declare const visible: chalk.Chalk;
383
+ declare const hidden: chalk.Chalk;
384
+ declare const red: chalk.Chalk;
385
+ declare const redBright: chalk.Chalk;
386
+ declare const green: chalk.Chalk;
387
+ declare const greenBright: chalk.Chalk;
388
+ declare const yellow: chalk.Chalk;
389
+ declare const yellowBright: chalk.Chalk;
390
+ declare const blue: chalk.Chalk;
391
+ declare const blueBright: chalk.Chalk;
392
+ declare const white: chalk.Chalk;
393
+ declare const whiteBright: chalk.Chalk;
394
+ declare const black: chalk.Chalk;
395
+ declare const blackBright: chalk.Chalk;
396
+ declare const grey: chalk.Chalk;
397
+ declare const cyan: chalk.Chalk;
398
+ declare const cyanBright: chalk.Chalk;
399
+ declare const magenta: chalk.Chalk;
400
+ declare const magentaBright: chalk.Chalk;
401
+ declare const bold: chalk.Chalk;
402
+ declare const dim: chalk.Chalk;
403
+ declare const underline: chalk.Chalk;
404
+ declare const italic: chalk.Chalk;
405
405
  declare const bg: {
406
- white: chalk.ChalkInstance;
407
- whiteBright: chalk.ChalkInstance;
408
- black: chalk.ChalkInstance;
409
- blackBright: chalk.ChalkInstance;
410
- grey: chalk.ChalkInstance;
411
- red: chalk.ChalkInstance;
412
- redBright: chalk.ChalkInstance;
413
- green: chalk.ChalkInstance;
414
- greenBright: chalk.ChalkInstance;
415
- yellow: chalk.ChalkInstance;
416
- yellowBright: chalk.ChalkInstance;
417
- blue: chalk.ChalkInstance;
418
- blueBright: chalk.ChalkInstance;
419
- magenta: chalk.ChalkInstance;
420
- magentaBright: chalk.ChalkInstance;
421
- cyan: chalk.ChalkInstance;
422
- cyanBright: chalk.ChalkInstance;
406
+ white: chalk.Chalk;
407
+ whiteBright: chalk.Chalk;
408
+ black: chalk.Chalk;
409
+ blackBright: chalk.Chalk;
410
+ grey: chalk.Chalk;
411
+ red: chalk.Chalk;
412
+ redBright: chalk.Chalk;
413
+ green: chalk.Chalk;
414
+ greenBright: chalk.Chalk;
415
+ yellow: chalk.Chalk;
416
+ yellowBright: chalk.Chalk;
417
+ blue: chalk.Chalk;
418
+ blueBright: chalk.Chalk;
419
+ magenta: chalk.Chalk;
420
+ magentaBright: chalk.Chalk;
421
+ cyan: chalk.Chalk;
422
+ cyanBright: chalk.Chalk;
423
423
  };
424
424
  declare const style: {
425
- organization: chalk.ChalkInstance;
426
- application: chalk.ChalkInstance;
427
- slug: chalk.ChalkInstance;
428
- id: chalk.ChalkInstance;
429
- token: chalk.ChalkInstance;
430
- resource: chalk.ChalkInstance;
431
- attribute: chalk.ChalkInstance;
432
- trigger: chalk.ChalkInstance;
433
- kind: chalk.ChalkInstance;
434
- live: chalk.ChalkInstance;
435
- test: chalk.ChalkInstance;
436
- execMode: (mode: ApiMode) => chalk.ChalkInstance;
437
- success: chalk.ChalkInstance;
438
- warning: chalk.ChalkInstance;
439
- error: chalk.ChalkInstance;
440
- arg: chalk.ChalkInstance;
441
- flag: chalk.ChalkInstance;
442
- command: chalk.ChalkInstance;
443
- value: chalk.ChalkInstance;
444
- alias: chalk.ChalkInstance;
445
- plugin: chalk.ChalkInstance;
446
- title: chalk.ChalkInstance;
447
- path: chalk.ChalkInstance;
448
- datetime: chalk.ChalkInstance;
449
- number: chalk.ChalkInstance;
425
+ organization: chalk.Chalk;
426
+ application: chalk.Chalk;
427
+ slug: chalk.Chalk;
428
+ id: chalk.Chalk;
429
+ token: chalk.Chalk;
430
+ resource: chalk.Chalk;
431
+ attribute: chalk.Chalk;
432
+ trigger: chalk.Chalk;
433
+ kind: chalk.Chalk;
434
+ live: chalk.Chalk;
435
+ test: chalk.Chalk;
436
+ execMode: (mode: ApiMode) => chalk.Chalk;
437
+ success: chalk.Chalk;
438
+ warning: chalk.Chalk;
439
+ error: chalk.Chalk;
440
+ arg: chalk.Chalk;
441
+ flag: chalk.Chalk;
442
+ command: chalk.Chalk;
443
+ value: chalk.Chalk;
444
+ alias: chalk.Chalk;
445
+ plugin: chalk.Chalk;
446
+ title: chalk.Chalk;
447
+ path: chalk.Chalk;
448
+ datetime: chalk.Chalk;
449
+ number: chalk.Chalk;
450
450
  };
451
451
  declare const type: {
452
- datetime: chalk.ChalkInstance;
453
- number: chalk.ChalkInstance;
454
- path: chalk.ChalkInstance;
452
+ datetime: chalk.Chalk;
453
+ number: chalk.Chalk;
454
+ path: chalk.Chalk;
455
455
  };
456
456
  declare const api: {
457
- organization: chalk.ChalkInstance;
458
- application: chalk.ChalkInstance;
459
- slug: chalk.ChalkInstance;
460
- id: chalk.ChalkInstance;
461
- token: chalk.ChalkInstance;
462
- resource: chalk.ChalkInstance;
463
- attribute: chalk.ChalkInstance;
464
- trigger: chalk.ChalkInstance;
465
- kind: chalk.ChalkInstance;
466
- live: chalk.ChalkInstance;
467
- test: chalk.ChalkInstance;
457
+ organization: chalk.Chalk;
458
+ application: chalk.Chalk;
459
+ slug: chalk.Chalk;
460
+ id: chalk.Chalk;
461
+ token: chalk.Chalk;
462
+ resource: chalk.Chalk;
463
+ attribute: chalk.Chalk;
464
+ trigger: chalk.Chalk;
465
+ kind: chalk.Chalk;
466
+ live: chalk.Chalk;
467
+ test: chalk.Chalk;
468
468
  };
469
469
  declare const msg: {
470
- success: chalk.ChalkInstance;
471
- warning: chalk.ChalkInstance;
472
- error: chalk.ChalkInstance;
470
+ success: chalk.Chalk;
471
+ warning: chalk.Chalk;
472
+ error: chalk.Chalk;
473
473
  };
474
474
  declare const cli: {
475
- arg: chalk.ChalkInstance;
476
- flag: chalk.ChalkInstance;
477
- command: chalk.ChalkInstance;
478
- value: chalk.ChalkInstance;
479
- alias: chalk.ChalkInstance;
480
- plugin: chalk.ChalkInstance;
475
+ arg: chalk.Chalk;
476
+ flag: chalk.Chalk;
477
+ command: chalk.Chalk;
478
+ value: chalk.Chalk;
479
+ alias: chalk.Chalk;
480
+ plugin: chalk.Chalk;
481
481
  };
482
482
  declare const table: {
483
- header: chalk.ChalkInstance;
484
- key: chalk.ChalkInstance;
483
+ header: chalk.Chalk;
484
+ key: chalk.Chalk;
485
485
  };
486
486
 
487
487
  declare const color_api: typeof api;
@@ -519,37 +519,21 @@ declare namespace color {
519
519
  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 };
520
520
  }
521
521
 
522
- interface Package {
523
- name: string;
524
- version: string;
522
+ declare const documentation: string;
523
+ interface Filter extends Record<string, unknown> {
524
+ predicate: string;
525
525
  description: string;
526
526
  }
527
- declare const checkUpdate: (pkg: Package) => void;
528
-
529
- type update_Package = Package;
530
- declare const update_checkUpdate: typeof checkUpdate;
531
- declare namespace update {
532
- export { type update_Package as Package, update_checkUpdate as checkUpdate };
533
- }
534
-
535
- /** Await ms milliseconds */
536
- declare const sleep: (ms: number) => Promise<void>;
537
- declare const resetConsole: () => void;
538
- declare const log: (message?: string, ...args: unknown[]) => void;
539
- declare const specialFolder: (filePath: string, createIfNotExists?: boolean) => string;
540
- declare const generateGroupUID: () => string;
541
- declare const userAgent: (config: Interfaces.Config) => string;
542
- declare const dotNotationToObject: (dotNot: KeyValObj, toObj?: KeyValObj) => KeyValObj;
527
+ declare const filterList: () => string[];
528
+ declare const filterAvailable: (filter: string) => boolean;
529
+ declare const applyFilter: (predicate: string, ...fields: string[]) => string;
530
+ declare const filters: () => Filter[];
543
531
 
544
- declare const util_dotNotationToObject: typeof dotNotationToObject;
545
- declare const util_generateGroupUID: typeof generateGroupUID;
546
- declare const util_log: typeof log;
547
- declare const util_resetConsole: typeof resetConsole;
548
- declare const util_sleep: typeof sleep;
549
- declare const util_specialFolder: typeof specialFolder;
550
- declare const util_userAgent: typeof userAgent;
551
- declare namespace util {
552
- export { util_dotNotationToObject as dotNotationToObject, util_generateGroupUID as generateGroupUID, util_log as log, util_resetConsole as resetConsole, util_sleep as sleep, util_specialFolder as specialFolder, util_userAgent as userAgent };
532
+ type filter_Filter = Filter;
533
+ declare const filter_documentation: typeof documentation;
534
+ declare const filter_filters: typeof filters;
535
+ declare namespace filter {
536
+ export { type filter_Filter as Filter, applyFilter as apply, filterAvailable as available, filter_documentation as documentation, filter_filters as filters, filterList as list };
553
537
  }
554
538
 
555
539
  declare class CLICommandHelp extends CommandHelp {
@@ -599,21 +583,37 @@ declare namespace text {
599
583
  export { text_camelize as camelize, text_capitalize as capitalize, text_dasherize as dasherize, text_pluralize as pluralize, text_singularize as singularize, text_symbols as symbols, text_underscorize as underscorize };
600
584
  }
601
585
 
602
- declare const documentation: string;
603
- interface Filter extends Record<string, unknown> {
604
- predicate: string;
586
+ interface Package {
587
+ name: string;
588
+ version: string;
605
589
  description: string;
606
590
  }
607
- declare const filterList: () => string[];
608
- declare const filterAvailable: (filter: string) => boolean;
609
- declare const applyFilter: (predicate: string, ...fields: string[]) => string;
610
- declare const filters: () => Filter[];
591
+ declare const checkUpdate: (pkg: Package) => void;
611
592
 
612
- type filter_Filter = Filter;
613
- declare const filter_documentation: typeof documentation;
614
- declare const filter_filters: typeof filters;
615
- declare namespace filter {
616
- export { type filter_Filter as Filter, applyFilter as apply, filterAvailable as available, filter_documentation as documentation, filter_filters as filters, filterList as list };
593
+ type update_Package = Package;
594
+ declare const update_checkUpdate: typeof checkUpdate;
595
+ declare namespace update {
596
+ export { type update_Package as Package, update_checkUpdate as checkUpdate };
597
+ }
598
+
599
+ /** Await ms milliseconds */
600
+ declare const sleep: (ms: number) => Promise<void>;
601
+ declare const resetConsole: () => void;
602
+ declare const log: (message?: string, ...args: unknown[]) => void;
603
+ declare const specialFolder: (filePath: string, createIfNotExists?: boolean) => string;
604
+ declare const generateGroupUID: () => string;
605
+ declare const userAgent: (config: Interfaces.Config) => string;
606
+ declare const dotNotationToObject: (dotNot: KeyValObj, toObj?: KeyValObj) => KeyValObj;
607
+
608
+ declare const util_dotNotationToObject: typeof dotNotationToObject;
609
+ declare const util_generateGroupUID: typeof generateGroupUID;
610
+ declare const util_log: typeof log;
611
+ declare const util_resetConsole: typeof resetConsole;
612
+ declare const util_sleep: typeof sleep;
613
+ declare const util_specialFolder: typeof specialFolder;
614
+ declare const util_userAgent: typeof userAgent;
615
+ declare namespace util {
616
+ export { util_dotNotationToObject as dotNotationToObject, util_generateGroupUID as generateGroupUID, util_log as log, util_resetConsole as resetConsole, util_sleep as sleep, util_specialFolder as specialFolder, util_userAgent as userAgent };
617
617
  }
618
618
 
619
619
  export { type AccessToken, type AccessTokenInfo, type ApiMode, type ApiType, type AppAuth, type AppInfo, type AppKey, type ApplicationKind, type AuthScope, type CustomToken, type KeyVal, type KeyValArray, type KeyValObj, type KeyValRel, type KeyValSort, type KeyValString, type Method, type OwnerType, 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 };