ecomcoder-cli 1.3.1 → 1.3.3

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 (73) hide show
  1. package/dist/cli.js +21 -2
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/discount/create-basic.d.ts +6 -0
  4. package/dist/commands/discount/create-basic.d.ts.map +1 -0
  5. package/dist/commands/discount/create-basic.js +156 -0
  6. package/dist/commands/discount/create-basic.js.map +1 -0
  7. package/dist/commands/discount/create-bxgy.d.ts +17 -0
  8. package/dist/commands/discount/create-bxgy.d.ts.map +1 -0
  9. package/dist/commands/discount/create-bxgy.js +230 -0
  10. package/dist/commands/discount/create-bxgy.js.map +1 -0
  11. package/dist/commands/discount/create-shipping.d.ts +17 -0
  12. package/dist/commands/discount/create-shipping.d.ts.map +1 -0
  13. package/dist/commands/discount/create-shipping.js +170 -0
  14. package/dist/commands/discount/create-shipping.js.map +1 -0
  15. package/dist/commands/discount/delete.d.ts +6 -0
  16. package/dist/commands/discount/delete.d.ts.map +1 -0
  17. package/dist/commands/discount/delete.js +45 -0
  18. package/dist/commands/discount/delete.js.map +1 -0
  19. package/dist/commands/discount/index.d.ts +10 -0
  20. package/dist/commands/discount/index.d.ts.map +1 -0
  21. package/dist/commands/discount/index.js +98 -0
  22. package/dist/commands/discount/index.js.map +1 -0
  23. package/dist/commands/discount/list.d.ts +6 -0
  24. package/dist/commands/discount/list.d.ts.map +1 -0
  25. package/dist/commands/discount/list.js +84 -0
  26. package/dist/commands/discount/list.js.map +1 -0
  27. package/dist/commands/discount/queries.d.ts +14 -0
  28. package/dist/commands/discount/queries.d.ts.map +1 -0
  29. package/dist/commands/discount/queries.js +574 -0
  30. package/dist/commands/discount/queries.js.map +1 -0
  31. package/dist/commands/discount/service.d.ts +31 -0
  32. package/dist/commands/discount/service.d.ts.map +1 -0
  33. package/dist/commands/discount/service.js +684 -0
  34. package/dist/commands/discount/service.js.map +1 -0
  35. package/dist/commands/discount/types.d.ts +228 -0
  36. package/dist/commands/discount/types.d.ts.map +1 -0
  37. package/dist/commands/discount/types.js +5 -0
  38. package/dist/commands/discount/types.js.map +1 -0
  39. package/dist/commands/discount/utils.d.ts +51 -0
  40. package/dist/commands/discount/utils.d.ts.map +1 -0
  41. package/dist/commands/discount/utils.js +153 -0
  42. package/dist/commands/discount/utils.js.map +1 -0
  43. package/dist/commands/product/__tests__/update-description.test.js +1 -0
  44. package/dist/commands/product/__tests__/update-description.test.js.map +1 -1
  45. package/dist/commands/product/create-variants.d.ts +8 -0
  46. package/dist/commands/product/create-variants.d.ts.map +1 -0
  47. package/dist/commands/product/create-variants.js +160 -0
  48. package/dist/commands/product/create-variants.js.map +1 -0
  49. package/dist/commands/product/delete-variants.d.ts +8 -0
  50. package/dist/commands/product/delete-variants.d.ts.map +1 -0
  51. package/dist/commands/product/delete-variants.js +105 -0
  52. package/dist/commands/product/delete-variants.js.map +1 -0
  53. package/dist/commands/product/index.d.ts.map +1 -1
  54. package/dist/commands/product/index.js +30 -0
  55. package/dist/commands/product/index.js.map +1 -1
  56. package/dist/commands/product/queries.d.ts +12 -2
  57. package/dist/commands/product/queries.d.ts.map +1 -1
  58. package/dist/commands/product/queries.js +62 -0
  59. package/dist/commands/product/queries.js.map +1 -1
  60. package/dist/commands/product/service.d.ts +41 -1
  61. package/dist/commands/product/service.d.ts.map +1 -1
  62. package/dist/commands/product/service.js +159 -1
  63. package/dist/commands/product/service.js.map +1 -1
  64. package/dist/commands/product/types.d.ts +78 -0
  65. package/dist/commands/product/types.d.ts.map +1 -1
  66. package/dist/commands/product/update-title.d.ts +8 -0
  67. package/dist/commands/product/update-title.d.ts.map +1 -0
  68. package/dist/commands/product/update-title.js +94 -0
  69. package/dist/commands/product/update-title.js.map +1 -0
  70. package/dist/commands/product/utils.d.ts.map +1 -1
  71. package/dist/commands/product/utils.js +1 -0
  72. package/dist/commands/product/utils.js.map +1 -1
  73. package/package.json +2 -1
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Create Free Shipping Discount Command
3
+ *
4
+ * Design Pattern: Command Pattern
5
+ * - Thin orchestration layer
6
+ * - Delegates business logic to service layer
7
+ * - Single Responsibility: Parse args, validate, call service, format output
8
+ */
9
+ import { parseArgs } from '../../lib/args-parser.js';
10
+ import { getCredentials } from '../../lib/api-client.js';
11
+ import { createFreeShippingDiscount } from './service.js';
12
+ /**
13
+ * Show help for create-shipping command
14
+ */
15
+ function showHelp() {
16
+ console.log(`
17
+ Create Free Shipping Discount
18
+
19
+ USAGE:
20
+ ecomcoder discount create-shipping [options]
21
+
22
+ REQUIRED OPTIONS:
23
+ --title <text> Discount title
24
+ --starts-at <ISO8601> When discount becomes active
25
+
26
+ MINIMUM REQUIREMENTS (optional):
27
+ --min-subtotal <amount> Minimum order subtotal (e.g., "50.00")
28
+ --min-quantity <number> Minimum item quantity
29
+
30
+ DESTINATION (optional, defaults to all countries):
31
+ --all-countries Apply to all countries (default)
32
+ --countries <codes> Comma-separated country codes (e.g., "US,CA,GB")
33
+
34
+ DISCOUNT TYPE:
35
+ --code <CODE> Create code-based discount (default)
36
+ --automatic Create automatic discount (no code required)
37
+
38
+ DATE/TIME OPTIONS:
39
+ --ends-at <ISO8601> When discount expires (optional)
40
+
41
+ COMBINATION RULES:
42
+ --combines-with-orders Allow combining with order discounts
43
+ --combines-with-products Allow combining with product discounts
44
+ --combines-with-shipping Allow combining with other shipping discounts
45
+
46
+ EXAMPLES:
47
+ # Free shipping with code
48
+ ecomcoder discount create-shipping \\
49
+ --title="Free Shipping" \\
50
+ --code="FREESHIP" \\
51
+ --starts-at="2026-06-01T00:00:00Z"
52
+
53
+ # Free shipping on orders over $50
54
+ ecomcoder discount create-shipping \\
55
+ --title="Free Shipping Over $50" \\
56
+ --code="SHIP50" \\
57
+ --min-subtotal=50.00 \\
58
+ --starts-at="2026-06-01T00:00:00Z"
59
+
60
+ # Automatic free shipping for US only
61
+ ecomcoder discount create-shipping \\
62
+ --title="US Free Shipping" \\
63
+ --automatic \\
64
+ --countries="US" \\
65
+ --starts-at="2026-06-01T00:00:00Z"
66
+
67
+ # Free shipping for US and Canada
68
+ ecomcoder discount create-shipping \\
69
+ --title="North America Free Shipping" \\
70
+ --code="NAFREE" \\
71
+ --countries="US,CA" \\
72
+ --starts-at="2026-06-01T00:00:00Z"
73
+
74
+ # Free shipping on 5+ items
75
+ ecomcoder discount create-shipping \\
76
+ --title="Bulk Order Free Shipping" \\
77
+ --automatic \\
78
+ --min-quantity=5 \\
79
+ --starts-at="2026-06-01T00:00:00Z"
80
+
81
+ NOTES:
82
+ - Use ISO 8601 format for dates: YYYY-MM-DDTHH:mm:ssZ
83
+ - Country codes must be ISO 3166-1 alpha-2 (e.g., US, CA, GB, AU)
84
+ - Cannot specify both --min-subtotal AND --min-quantity (choose one)
85
+ - Free shipping discounts apply to all shipping methods
86
+ `);
87
+ }
88
+ /**
89
+ * Parse and execute create-shipping command
90
+ *
91
+ * Following SOLID principles:
92
+ * - Single Responsibility: Parse args and orchestrate service call
93
+ * - Dependency Inversion: Depends on service abstraction
94
+ */
95
+ export async function run(cliArgs) {
96
+ const args = parseArgs(cliArgs);
97
+ if (args.help) {
98
+ showHelp();
99
+ return;
100
+ }
101
+ // Validate required arguments
102
+ if (!args.title) {
103
+ console.error('Error: --title is required');
104
+ process.exit(1);
105
+ }
106
+ if (!args.startsAt) {
107
+ console.error('Error: --starts-at is required');
108
+ process.exit(1);
109
+ }
110
+ // Validate discount type
111
+ if (!args.automatic && !args.code) {
112
+ console.error('Error: --code is required for code-based discounts (or use --automatic)');
113
+ process.exit(1);
114
+ }
115
+ if (args.automatic && args.code) {
116
+ console.error('Error: Automatic discounts cannot have codes');
117
+ process.exit(1);
118
+ }
119
+ // Validate minimum requirements (cannot have both)
120
+ if (args.minSubtotal && args.minQuantity) {
121
+ console.error('Error: Cannot specify both --min-subtotal AND --min-quantity - choose one');
122
+ process.exit(1);
123
+ }
124
+ // Build minimum requirement
125
+ let minimumRequirement = undefined;
126
+ if (args.minSubtotal) {
127
+ minimumRequirement = {
128
+ subtotal: args.minSubtotal
129
+ };
130
+ }
131
+ else if (args.minQuantity) {
132
+ minimumRequirement = {
133
+ quantity: args.minQuantity
134
+ };
135
+ }
136
+ // Build destination selection
137
+ let destinationSelection = { all: true };
138
+ if (args.countries) {
139
+ const countryCodes = args.countries.split(',').map(c => c.trim().toUpperCase());
140
+ destinationSelection = {
141
+ countries: countryCodes,
142
+ all: false
143
+ };
144
+ }
145
+ else if (args.allCountries) {
146
+ destinationSelection = { all: true };
147
+ }
148
+ // Build input
149
+ const input = {
150
+ title: args.title,
151
+ code: args.code,
152
+ automatic: args.automatic,
153
+ startsAt: args.startsAt,
154
+ endsAt: args.endsAt,
155
+ minimumRequirement,
156
+ destinationSelection,
157
+ combinesWith: {
158
+ orderDiscounts: args.combinesWithOrders || false,
159
+ productDiscounts: args.combinesWithProducts || false,
160
+ shippingDiscounts: args.combinesWithShipping || false
161
+ }
162
+ };
163
+ // Get credentials
164
+ const sessionId = process.env.SESSION_ID || 'default';
165
+ const credentials = await getCredentials(sessionId);
166
+ // Create discount
167
+ const result = await createFreeShippingDiscount(input, credentials);
168
+ console.log(JSON.stringify(result, null, 2));
169
+ }
170
+ //# sourceMappingURL=create-shipping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-shipping.js","sourceRoot":"","sources":["../../../src/commands/discount/create-shipping.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAmB1D;;GAEG;AACH,SAAS,QAAQ;IACf,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEb,CAAC,CAAC;AACH,CAAC;AAED;;;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CAAC,SAAS,CAAC,CAAC;IAEpD,kBAAkB;IAClB,MAAM,MAAM,GAAG,MAAM,0BAA0B,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAEpE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Command: discount delete
3
+ * Delete a discount by ID
4
+ */
5
+ export declare function run(cliArgs: string[]): Promise<void>;
6
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/discount/delete.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,wBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,iBA2B1C"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Command: discount delete
3
+ * Delete a discount by ID
4
+ */
5
+ import { parseArgs } from '../../lib/args-parser.js';
6
+ import { getCredentials } from '../../lib/api-client.js';
7
+ import { deleteDiscount } from './service.js';
8
+ const HELP_TEXT = `
9
+ Delete a discount by ID
10
+
11
+ Usage:
12
+ ecomcoder discount delete [options]
13
+
14
+ Options:
15
+ --id <id> Discount ID (DiscountCodeNode or DiscountAutomaticNode GID) (required)
16
+
17
+ Examples:
18
+ # Delete a code discount
19
+ ecomcoder discount delete --id="gid://shopify/DiscountCodeNode/123"
20
+
21
+ # Delete an automatic discount
22
+ ecomcoder discount delete --id="gid://shopify/DiscountAutomaticNode/456"
23
+ `;
24
+ export async function run(cliArgs) {
25
+ const args = parseArgs(cliArgs);
26
+ if (args.help === 'true') {
27
+ console.log(HELP_TEXT);
28
+ return;
29
+ }
30
+ // Validate required arguments
31
+ if (!args.id) {
32
+ console.log(JSON.stringify({
33
+ success: false,
34
+ error: 'Missing required argument: --id'
35
+ }));
36
+ return;
37
+ }
38
+ // Get credentials
39
+ const sessionId = process.env.SESSION_ID || 'default';
40
+ const credentials = await getCredentials(sessionId);
41
+ // Delete discount
42
+ const result = await deleteDiscount(args.id, credentials);
43
+ console.log(JSON.stringify(result, null, 2));
44
+ }
45
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/discount/delete.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;CAejB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,OAAiB;IACzC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAEhC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO;IACT,CAAC;IAED,8BAA8B;IAC9B,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,iCAAiC;SACzC,CAAC,CACH,CAAC;QACF,OAAO;IACT,CAAC;IAED,kBAAkB;IAClB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,SAAS,CAAC;IACtD,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpD,kBAAkB;IAClB,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IAE1D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Discount Commands Registration
3
+ *
4
+ * Following Open/Closed Principle - commands register themselves
5
+ */
6
+ /**
7
+ * Register all discount commands
8
+ */
9
+ export declare function registerDiscountCommands(): void;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/discount/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CA4F/C"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Discount Commands Registration
3
+ *
4
+ * Following Open/Closed Principle - commands register themselves
5
+ */
6
+ import { registry } from '../../lib/command-registry.js';
7
+ /**
8
+ * Register all discount commands
9
+ */
10
+ export function registerDiscountCommands() {
11
+ // Register command group
12
+ registry.registerGroup({
13
+ command: 'discount',
14
+ description: 'Create and manage Shopify discounts',
15
+ showHelp: () => {
16
+ console.log(`
17
+ Discount Commands - Create and manage Shopify discounts
18
+
19
+ USAGE:
20
+ ecomcoder discount <subcommand> [options]
21
+
22
+ SUBCOMMANDS:
23
+ create-basic Create basic discount (percentage or fixed amount off)
24
+ create-bxgy Create BXGY (Buy X Get Y) discount
25
+ create-shipping Create free shipping discount
26
+ list List all discounts with filtering
27
+ delete Delete a discount by ID
28
+
29
+ EXAMPLES:
30
+ # Create percentage discount with code
31
+ ecomcoder discount create-basic \\
32
+ --title="Summer Sale" \\
33
+ --code="SUMMER25" \\
34
+ --type=percentage \\
35
+ --value=0.25 \\
36
+ --starts-at="2026-06-01T00:00:00Z"
37
+
38
+ # Create fixed amount discount with minimum
39
+ ecomcoder discount create-basic \\
40
+ --title="$10 Off Orders Over $50" \\
41
+ --code="SAVE10" \\
42
+ --type=fixed_amount \\
43
+ --value=10.00 \\
44
+ --min-subtotal=50.00 \\
45
+ --starts-at="2026-06-01T00:00:00Z"
46
+
47
+ # Create automatic discount
48
+ ecomcoder discount create-basic \\
49
+ --title="VIP Discount" \\
50
+ --automatic \\
51
+ --type=percentage \\
52
+ --value=0.15 \\
53
+ --starts-at="2026-06-01T00:00:00Z"
54
+
55
+ # List active discounts
56
+ ecomcoder discount list --status=active
57
+
58
+ # Delete discount
59
+ ecomcoder discount delete --id="gid://shopify/DiscountCodeNode/123"
60
+
61
+ For detailed help on a specific subcommand:
62
+ ecomcoder discount <subcommand> --help
63
+ `);
64
+ }
65
+ });
66
+ // Register individual subcommands
67
+ registry.register({
68
+ command: 'discount',
69
+ subcommand: 'create-basic',
70
+ description: 'Create basic discount (percentage or fixed amount off)',
71
+ handler: async () => await import('./create-basic.js')
72
+ });
73
+ registry.register({
74
+ command: 'discount',
75
+ subcommand: 'create-bxgy',
76
+ description: 'Create BXGY (Buy X Get Y) discount',
77
+ handler: async () => await import('./create-bxgy.js')
78
+ });
79
+ registry.register({
80
+ command: 'discount',
81
+ subcommand: 'create-shipping',
82
+ description: 'Create free shipping discount',
83
+ handler: async () => await import('./create-shipping.js')
84
+ });
85
+ registry.register({
86
+ command: 'discount',
87
+ subcommand: 'list',
88
+ description: 'List all discounts with filtering',
89
+ handler: async () => await import('./list.js')
90
+ });
91
+ registry.register({
92
+ command: 'discount',
93
+ subcommand: 'delete',
94
+ description: 'Delete a discount by ID',
95
+ handler: async () => await import('./delete.js')
96
+ });
97
+ }
98
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/discount/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAEzD;;GAEG;AACH,MAAM,UAAU,wBAAwB;IACtC,yBAAyB;IACzB,QAAQ,CAAC,aAAa,CAAC;QACrB,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,qCAAqC;QAClD,QAAQ,EAAE,GAAG,EAAE;YACb,OAAO,CAAC,GAAG,CAAC;;;;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6
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/discount/list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqCH,wBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,iBA+D1C"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Command: discount list
3
+ * List discounts with filtering options
4
+ */
5
+ import { parseArgs } from '../../lib/args-parser.js';
6
+ import { getCredentials } from '../../lib/api-client.js';
7
+ import { listDiscounts } from './service.js';
8
+ const HELP_TEXT = `
9
+ List discounts with filtering options
10
+
11
+ Usage:
12
+ ecomcoder discount list [options]
13
+
14
+ Options:
15
+ --type <type> Filter by type: code | automatic | all (default: all)
16
+ --status <status> Filter by status: active | expired | scheduled (optional)
17
+ --limit <number> Maximum number of results (default: 50)
18
+ --query <string> Search by title (optional)
19
+ --format <format> Output format: json | table (default: json)
20
+
21
+ Examples:
22
+ # List all active discounts
23
+ ecomcoder discount list --status=active
24
+
25
+ # List code discounts only
26
+ ecomcoder discount list --type=code
27
+
28
+ # Search for discounts by title
29
+ ecomcoder discount list --query="SUMMER"
30
+
31
+ # List with custom limit
32
+ ecomcoder discount list --limit=100
33
+
34
+ # Table format
35
+ ecomcoder discount list --format=table
36
+ `;
37
+ export async function run(cliArgs) {
38
+ const args = parseArgs(cliArgs);
39
+ if (args.help === 'true') {
40
+ console.log(HELP_TEXT);
41
+ return;
42
+ }
43
+ // Build input
44
+ const input = {
45
+ type: args.type,
46
+ status: args.status,
47
+ limit: args.limit ? parseInt(args.limit) : undefined,
48
+ query: args.query
49
+ };
50
+ // Get credentials
51
+ const sessionId = process.env.SESSION_ID || 'default';
52
+ const credentials = await getCredentials(sessionId);
53
+ // List discounts
54
+ const result = await listDiscounts(input, credentials);
55
+ // Format output
56
+ const format = args.format || 'json';
57
+ if (format === 'table' && result.success && result.data) {
58
+ console.log('\nšŸ“‹ Discounts\n');
59
+ console.log('─'.repeat(120));
60
+ console.log('ID'.padEnd(50) +
61
+ 'Title'.padEnd(30) +
62
+ 'Type'.padEnd(12) +
63
+ 'Status'.padEnd(10) +
64
+ 'Value'.padEnd(18));
65
+ console.log('─'.repeat(120));
66
+ result.data.discounts.forEach((discount) => {
67
+ const id = discount.id.split('/').pop() || discount.id;
68
+ const title = discount.title.substring(0, 28).padEnd(30);
69
+ const type = `${discount.type}/${discount.discountType}`.padEnd(12);
70
+ const status = discount.status.padEnd(10);
71
+ const value = discount.value.padEnd(18);
72
+ console.log(`${id.padEnd(50)}${title}${type}${status}${value}`);
73
+ if (discount.code) {
74
+ console.log(` Code: ${discount.code}`);
75
+ }
76
+ });
77
+ console.log('─'.repeat(120));
78
+ console.log(`\nTotal: ${result.data.count} discount(s)\n`);
79
+ }
80
+ else {
81
+ console.log(JSON.stringify(result, null, 2));
82
+ }
83
+ }
84
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/discount/list.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BjB,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,OAAiB;IACzC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAEhC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,OAAO;IACT,CAAC;IAED,cAAc;IACd,MAAM,KAAK,GAAuB;QAChC,IAAI,EAAE,IAAI,CAAC,IAAgD;QAC3D,MAAM,EAAE,IAAI,CAAC,MAAoC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,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACzD,MAAM,IAAI,GAAG,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACpE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAExC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC;YAEhE,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAClB,OAAO,CAAC,GAAG,CAAC,WAAW,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAChB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,IAAI,CAAC,KAAK,gBAAgB,CAAC,CAAC;IAC7D,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * GraphQL Queries and Mutations for Discount Commands
3
+ */
4
+ export declare const DISCOUNT_CODE_BASIC_CREATE = "\n mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) {\n discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) {\n codeDiscountNode {\n id\n codeDiscount {\n ... on DiscountCodeBasic {\n title\n summary\n status\n codes(first: 1) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n customerGets {\n value {\n ... on DiscountPercentage {\n percentage\n }\n ... on DiscountAmount {\n amount {\n amount\n }\n appliesOnEachItem\n }\n }\n items {\n ... on AllDiscountItems {\n allItems\n }\n }\n }\n minimumRequirement {\n ... on DiscountMinimumSubtotal {\n greaterThanOrEqualToSubtotal {\n amount\n }\n }\n ... on DiscountMinimumQuantity {\n greaterThanOrEqualToQuantity\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n usageLimit\n appliesOncePerCustomer\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
5
+ export declare const DISCOUNT_AUTOMATIC_BASIC_CREATE = "\n mutation discountAutomaticBasicCreate($automaticBasicDiscount: DiscountAutomaticBasicInput!) {\n discountAutomaticBasicCreate(automaticBasicDiscount: $automaticBasicDiscount) {\n automaticDiscountNode {\n id\n automaticDiscount {\n ... on DiscountAutomaticBasic {\n title\n summary\n status\n startsAt\n endsAt\n customerGets {\n value {\n ... on DiscountPercentage {\n percentage\n }\n ... on DiscountAmount {\n amount {\n amount\n }\n appliesOnEachItem\n }\n }\n items {\n ... on AllDiscountItems {\n allItems\n }\n }\n }\n minimumRequirement {\n ... on DiscountMinimumSubtotal {\n greaterThanOrEqualToSubtotal {\n amount\n }\n }\n ... on DiscountMinimumQuantity {\n greaterThanOrEqualToQuantity\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
6
+ export declare const CODE_DISCOUNT_NODES = "\n query codeDiscountNodes($first: Int!, $query: String, $after: String) {\n codeDiscountNodes(first: $first, query: $query, after: $after) {\n edges {\n cursor\n node {\n id\n codeDiscount {\n __typename\n ... on DiscountCodeBasic {\n title\n summary\n status\n codes(first: 5) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n customerGets {\n value {\n ... on DiscountPercentage {\n percentage\n }\n ... on DiscountAmount {\n amount {\n amount\n }\n appliesOnEachItem\n }\n }\n }\n }\n ... on DiscountCodeBxgy {\n title\n summary\n status\n codes(first: 5) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n }\n ... on DiscountCodeFreeShipping {\n title\n summary\n status\n codes(first: 5) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
7
+ export declare const AUTOMATIC_DISCOUNT_NODES = "\n query automaticDiscountNodes($first: Int!, $query: String, $after: String) {\n automaticDiscountNodes(first: $first, query: $query, after: $after) {\n edges {\n cursor\n node {\n id\n automaticDiscount {\n __typename\n ... on DiscountAutomaticBasic {\n title\n summary\n status\n startsAt\n endsAt\n customerGets {\n value {\n ... on DiscountPercentage {\n percentage\n }\n ... on DiscountAmount {\n amount {\n amount\n }\n appliesOnEachItem\n }\n }\n }\n }\n ... on DiscountAutomaticBxgy {\n title\n summary\n status\n startsAt\n endsAt\n }\n ... on DiscountAutomaticFreeShipping {\n title\n summary\n status\n startsAt\n endsAt\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
8
+ export declare const DISCOUNT_CODE_DELETE = "\n mutation discountCodeDelete($id: ID!) {\n discountCodeDelete(id: $id) {\n deletedCodeDiscountId\n userErrors {\n field\n message\n }\n }\n }\n";
9
+ export declare const DISCOUNT_AUTOMATIC_DELETE = "\n mutation discountAutomaticDelete($id: ID!) {\n discountAutomaticDelete(id: $id) {\n deletedAutomaticDiscountId\n userErrors {\n field\n message\n }\n }\n }\n";
10
+ export declare const DISCOUNT_CODE_BXGY_CREATE = "\n mutation discountCodeBxgyCreate($bxgyCodeDiscount: DiscountCodeBxgyInput!) {\n discountCodeBxgyCreate(bxgyCodeDiscount: $bxgyCodeDiscount) {\n codeDiscountNode {\n id\n codeDiscount {\n ... on DiscountCodeBxgy {\n title\n summary\n status\n codes(first: 1) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n customerBuys {\n value {\n ... on DiscountQuantity {\n quantity\n }\n ... on DiscountPurchaseAmount {\n amount\n }\n }\n items {\n ... on AllDiscountItems {\n allItems\n }\n ... on DiscountProducts {\n products(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n ... on DiscountCollections {\n collections(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n }\n }\n customerGets {\n value {\n ... on DiscountOnQuantity {\n quantity {\n quantity\n }\n effect {\n ... on DiscountPercentage {\n percentage\n }\n }\n }\n }\n items {\n ... on DiscountProducts {\n products(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n ... on DiscountCollections {\n collections(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n usesPerOrderLimit\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
11
+ export declare const DISCOUNT_AUTOMATIC_BXGY_CREATE = "\n mutation discountAutomaticBxgyCreate($automaticBxgyDiscount: DiscountAutomaticBxgyInput!) {\n discountAutomaticBxgyCreate(automaticBxgyDiscount: $automaticBxgyDiscount) {\n automaticDiscountNode {\n id\n automaticDiscount {\n ... on DiscountAutomaticBxgy {\n title\n summary\n status\n startsAt\n endsAt\n customerBuys {\n value {\n ... on DiscountQuantity {\n quantity\n }\n ... on DiscountPurchaseAmount {\n amount\n }\n }\n items {\n ... on AllDiscountItems {\n allItems\n }\n ... on DiscountProducts {\n products(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n ... on DiscountCollections {\n collections(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n }\n }\n customerGets {\n value {\n ... on DiscountOnQuantity {\n quantity {\n quantity\n }\n effect {\n ... on DiscountPercentage {\n percentage\n }\n }\n }\n }\n items {\n ... on DiscountProducts {\n products(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n ... on DiscountCollections {\n collections(first: 10) {\n edges {\n node {\n id\n title\n }\n }\n }\n }\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n usesPerOrderLimit\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
12
+ export declare const DISCOUNT_CODE_FREE_SHIPPING_CREATE = "\n mutation discountCodeFreeShippingCreate($freeShippingCodeDiscount: DiscountCodeFreeShippingInput!) {\n discountCodeFreeShippingCreate(freeShippingCodeDiscount: $freeShippingCodeDiscount) {\n codeDiscountNode {\n id\n codeDiscount {\n ... on DiscountCodeFreeShipping {\n title\n summary\n status\n codes(first: 1) {\n edges {\n node {\n code\n }\n }\n }\n startsAt\n endsAt\n minimumRequirement {\n ... on DiscountMinimumSubtotal {\n greaterThanOrEqualToSubtotal {\n amount\n }\n }\n ... on DiscountMinimumQuantity {\n greaterThanOrEqualToQuantity\n }\n }\n destinationSelection {\n ... on DiscountCountryAll {\n allCountries\n }\n ... on DiscountCountries {\n countries\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
13
+ export declare const DISCOUNT_AUTOMATIC_FREE_SHIPPING_CREATE = "\n mutation discountAutomaticFreeShippingCreate($freeShippingAutomaticDiscount: DiscountAutomaticFreeShippingInput!) {\n discountAutomaticFreeShippingCreate(freeShippingAutomaticDiscount: $freeShippingAutomaticDiscount) {\n automaticDiscountNode {\n id\n automaticDiscount {\n ... on DiscountAutomaticFreeShipping {\n title\n summary\n status\n startsAt\n endsAt\n minimumRequirement {\n ... on DiscountMinimumSubtotal {\n greaterThanOrEqualToSubtotal {\n amount\n }\n }\n ... on DiscountMinimumQuantity {\n greaterThanOrEqualToQuantity\n }\n }\n destinationSelection {\n ... on DiscountCountryAll {\n allCountries\n }\n ... on DiscountCountries {\n countries\n }\n }\n combinesWith {\n orderDiscounts\n productDiscounts\n shippingDiscounts\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n";
14
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/commands/discount/queries.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,0BAA0B,klDA+DtC,CAAC;AAEF,eAAO,MAAM,+BAA+B,06CAsD3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,guDAyE/B,CAAC;AAEF,eAAO,MAAM,wBAAwB,ywCAoDpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,2LAUhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,0MAUrC,CAAC;AAEF,eAAO,MAAM,yBAAyB,utFAyGrC,CAAC;AAEF,eAAO,MAAM,8BAA8B,2mFAkG1C,CAAC;AAEF,eAAO,MAAM,kCAAkC,y0CAmD9C,CAAC;AAEF,eAAO,MAAM,uCAAuC,6tCA4CnD,CAAC"}