@optima-chat/commerce-cli 1.7.6 → 1.8.0

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 (158) hide show
  1. package/dist/api/rest/base.d.ts.map +1 -1
  2. package/dist/api/rest/base.js +1 -0
  3. package/dist/api/rest/base.js.map +1 -1
  4. package/dist/api/rest/commerce.d.ts +176 -22
  5. package/dist/api/rest/commerce.d.ts.map +1 -1
  6. package/dist/api/rest/commerce.js +133 -23
  7. package/dist/api/rest/commerce.js.map +1 -1
  8. package/dist/commands/collection/create.d.ts.map +1 -1
  9. package/dist/commands/collection/create.js +39 -1
  10. package/dist/commands/collection/create.js.map +1 -1
  11. package/dist/commands/collection/update.d.ts.map +1 -1
  12. package/dist/commands/collection/update.js +47 -6
  13. package/dist/commands/collection/update.js.map +1 -1
  14. package/dist/commands/easyship/couriers.d.ts +3 -0
  15. package/dist/commands/easyship/couriers.d.ts.map +1 -0
  16. package/dist/commands/easyship/couriers.js +103 -0
  17. package/dist/commands/easyship/couriers.js.map +1 -0
  18. package/dist/commands/easyship/create-shipment.d.ts +3 -0
  19. package/dist/commands/easyship/create-shipment.d.ts.map +1 -0
  20. package/dist/commands/easyship/create-shipment.js +102 -0
  21. package/dist/commands/easyship/create-shipment.js.map +1 -0
  22. package/dist/commands/easyship/get-origin.d.ts +3 -0
  23. package/dist/commands/easyship/get-origin.d.ts.map +1 -0
  24. package/dist/commands/easyship/get-origin.js +111 -0
  25. package/dist/commands/easyship/get-origin.js.map +1 -0
  26. package/dist/commands/easyship/index.d.ts +3 -0
  27. package/dist/commands/easyship/index.d.ts.map +1 -0
  28. package/dist/commands/easyship/index.js +18 -0
  29. package/dist/commands/easyship/index.js.map +1 -0
  30. package/dist/commands/easyship/track.d.ts +3 -0
  31. package/dist/commands/easyship/track.d.ts.map +1 -0
  32. package/dist/commands/easyship/track.js +141 -0
  33. package/dist/commands/easyship/track.js.map +1 -0
  34. package/dist/commands/easyship/update-origin.d.ts +3 -0
  35. package/dist/commands/easyship/update-origin.d.ts.map +1 -0
  36. package/dist/commands/easyship/update-origin.js +228 -0
  37. package/dist/commands/easyship/update-origin.js.map +1 -0
  38. package/dist/commands/easyship/validate-address.d.ts +3 -0
  39. package/dist/commands/easyship/validate-address.d.ts.map +1 -0
  40. package/dist/commands/easyship/validate-address.js +119 -0
  41. package/dist/commands/easyship/validate-address.js.map +1 -0
  42. package/dist/commands/easyship/validate-origin.d.ts +3 -0
  43. package/dist/commands/easyship/validate-origin.d.ts.map +1 -0
  44. package/dist/commands/easyship/validate-origin.js +119 -0
  45. package/dist/commands/easyship/validate-origin.js.map +1 -0
  46. package/dist/commands/homepage/delete-config.d.ts +3 -0
  47. package/dist/commands/homepage/delete-config.d.ts.map +1 -0
  48. package/dist/commands/homepage/delete-config.js +94 -0
  49. package/dist/commands/homepage/delete-config.js.map +1 -0
  50. package/dist/commands/homepage/get-config.d.ts +3 -0
  51. package/dist/commands/homepage/get-config.d.ts.map +1 -0
  52. package/dist/commands/homepage/get-config.js +95 -0
  53. package/dist/commands/homepage/get-config.js.map +1 -0
  54. package/dist/commands/homepage/index.d.ts.map +1 -1
  55. package/dist/commands/homepage/index.js +9 -0
  56. package/dist/commands/homepage/index.js.map +1 -1
  57. package/dist/commands/homepage/list-templates.d.ts +3 -0
  58. package/dist/commands/homepage/list-templates.d.ts.map +1 -0
  59. package/dist/commands/homepage/list-templates.js +113 -0
  60. package/dist/commands/homepage/list-templates.js.map +1 -0
  61. package/dist/commands/homepage/switch-template.d.ts +3 -0
  62. package/dist/commands/homepage/switch-template.d.ts.map +1 -0
  63. package/dist/commands/homepage/switch-template.js +129 -0
  64. package/dist/commands/homepage/switch-template.js.map +1 -0
  65. package/dist/commands/order/index.d.ts.map +1 -1
  66. package/dist/commands/order/index.js +5 -1
  67. package/dist/commands/order/index.js.map +1 -1
  68. package/dist/commands/order/list.d.ts.map +1 -1
  69. package/dist/commands/order/list.js +30 -3
  70. package/dist/commands/order/list.js.map +1 -1
  71. package/dist/commands/order/ship.d.ts.map +1 -1
  72. package/dist/commands/order/ship.js +29 -1
  73. package/dist/commands/order/ship.js.map +1 -1
  74. package/dist/commands/order/shipping-history.d.ts +3 -0
  75. package/dist/commands/order/shipping-history.d.ts.map +1 -0
  76. package/dist/commands/order/shipping-history.js +120 -0
  77. package/dist/commands/order/shipping-history.js.map +1 -0
  78. package/dist/commands/order/update-shipping-status.d.ts +3 -0
  79. package/dist/commands/order/update-shipping-status.d.ts.map +1 -0
  80. package/dist/commands/order/update-shipping-status.js +164 -0
  81. package/dist/commands/order/update-shipping-status.js.map +1 -0
  82. package/dist/commands/product/create.d.ts.map +1 -1
  83. package/dist/commands/product/create.js +53 -1
  84. package/dist/commands/product/create.js.map +1 -1
  85. package/dist/commands/product/index.d.ts.map +1 -1
  86. package/dist/commands/product/index.js +4 -0
  87. package/dist/commands/product/index.js.map +1 -1
  88. package/dist/commands/product/list.d.ts.map +1 -1
  89. package/dist/commands/product/list.js +30 -4
  90. package/dist/commands/product/list.js.map +1 -1
  91. package/dist/commands/product/remove-images.d.ts +3 -0
  92. package/dist/commands/product/remove-images.d.ts.map +1 -0
  93. package/dist/commands/product/remove-images.js +109 -0
  94. package/dist/commands/product/remove-images.js.map +1 -0
  95. package/dist/commands/product/reorder-images.d.ts +3 -0
  96. package/dist/commands/product/reorder-images.d.ts.map +1 -0
  97. package/dist/commands/product/reorder-images.js +113 -0
  98. package/dist/commands/product/reorder-images.js.map +1 -0
  99. package/dist/commands/product/update.d.ts.map +1 -1
  100. package/dist/commands/product/update.js +57 -1
  101. package/dist/commands/product/update.js.map +1 -1
  102. package/dist/commands/shipping/countries.d.ts +3 -0
  103. package/dist/commands/shipping/countries.d.ts.map +1 -0
  104. package/dist/commands/shipping/countries.js +87 -0
  105. package/dist/commands/shipping/countries.js.map +1 -0
  106. package/dist/commands/shipping/get-mode.d.ts +3 -0
  107. package/dist/commands/shipping/get-mode.d.ts.map +1 -0
  108. package/dist/commands/shipping/get-mode.js +84 -0
  109. package/dist/commands/shipping/get-mode.js.map +1 -0
  110. package/dist/commands/shipping/index.d.ts.map +1 -1
  111. package/dist/commands/shipping/index.js +7 -5
  112. package/dist/commands/shipping/index.js.map +1 -1
  113. package/dist/commands/shipping/update-mode.d.ts +3 -0
  114. package/dist/commands/shipping/update-mode.d.ts.map +1 -0
  115. package/dist/commands/shipping/update-mode.js +117 -0
  116. package/dist/commands/shipping/update-mode.js.map +1 -0
  117. package/dist/commands/shipping-zone/create.d.ts.map +1 -1
  118. package/dist/commands/shipping-zone/create.js +53 -9
  119. package/dist/commands/shipping-zone/create.js.map +1 -1
  120. package/dist/commands/shipping-zone/delete-rate.d.ts +3 -0
  121. package/dist/commands/shipping-zone/delete-rate.d.ts.map +1 -0
  122. package/dist/commands/shipping-zone/delete-rate.js +103 -0
  123. package/dist/commands/shipping-zone/delete-rate.js.map +1 -0
  124. package/dist/commands/shipping-zone/get.d.ts +3 -0
  125. package/dist/commands/shipping-zone/get.d.ts.map +1 -0
  126. package/dist/commands/shipping-zone/get.js +121 -0
  127. package/dist/commands/shipping-zone/get.js.map +1 -0
  128. package/dist/commands/shipping-zone/index.d.ts.map +1 -1
  129. package/dist/commands/shipping-zone/index.js +9 -1
  130. package/dist/commands/shipping-zone/index.js.map +1 -1
  131. package/dist/commands/shipping-zone/update-rate.d.ts +3 -0
  132. package/dist/commands/shipping-zone/update-rate.d.ts.map +1 -0
  133. package/dist/commands/shipping-zone/update-rate.js +149 -0
  134. package/dist/commands/shipping-zone/update-rate.js.map +1 -0
  135. package/dist/commands/shipping-zone/update.d.ts +3 -0
  136. package/dist/commands/shipping-zone/update.d.ts.map +1 -0
  137. package/dist/commands/shipping-zone/update.js +117 -0
  138. package/dist/commands/shipping-zone/update.js.map +1 -0
  139. package/dist/commands/variant/index.d.ts.map +1 -1
  140. package/dist/commands/variant/index.js +2 -0
  141. package/dist/commands/variant/index.js.map +1 -1
  142. package/dist/commands/variant/search.d.ts +3 -0
  143. package/dist/commands/variant/search.d.ts.map +1 -0
  144. package/dist/commands/variant/search.js +107 -0
  145. package/dist/commands/variant/search.js.map +1 -0
  146. package/dist/index.js +2 -0
  147. package/dist/index.js.map +1 -1
  148. package/dist/utils/config.js +4 -4
  149. package/dist/utils/config.js.map +1 -1
  150. package/package.json +1 -1
  151. package/dist/commands/shipping/history.d.ts +0 -3
  152. package/dist/commands/shipping/history.d.ts.map +0 -1
  153. package/dist/commands/shipping/history.js +0 -111
  154. package/dist/commands/shipping/history.js.map +0 -1
  155. package/dist/commands/shipping/update-status.d.ts +0 -3
  156. package/dist/commands/shipping/update-status.d.ts.map +0 -1
  157. package/dist/commands/shipping/update-status.js +0 -138
  158. package/dist/commands/shipping/update-status.js.map +0 -1
@@ -0,0 +1,228 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ import inquirer from 'inquirer';
4
+ import { commerceApi } from '../../api/rest/commerce.js';
5
+ import { handleError, createApiError, ValidationError } from '../../utils/error.js';
6
+ import { output } from '../../utils/output.js';
7
+ import { addEnhancedHelp } from '../../utils/helpText.js';
8
+ import { isInteractiveEnvironment } from '../../utils/interactive.js';
9
+ const cmd = new Command('update-origin')
10
+ .description('Update Easyship origin address')
11
+ .option('--line1 <string>', 'Address line 1 (required)')
12
+ .option('--line2 <string>', 'Address line 2')
13
+ .option('--city <string>', 'City (required)')
14
+ .option('--state <string>', 'State/Province')
15
+ .option('--postal-code <string>', 'Postal code (required)')
16
+ .option('--country <code>', 'Country code (ISO 3166-1 alpha-2, required)')
17
+ .option('--contact-name <string>', 'Contact name')
18
+ .option('--contact-phone <string>', 'Contact phone')
19
+ .option('--contact-email <string>', 'Contact email')
20
+ .action(async (options) => {
21
+ try {
22
+ await updateOrigin(options);
23
+ }
24
+ catch (error) {
25
+ handleError(error);
26
+ }
27
+ });
28
+ addEnhancedHelp(cmd, {
29
+ examples: [
30
+ '# Update origin address (minimum required fields)',
31
+ '$ commerce easyship update-origin \\',
32
+ ' --line1 "123 Warehouse St" --city "Los Angeles" \\',
33
+ ' --postal-code "90001" --country US',
34
+ '',
35
+ '# Update with full details',
36
+ '$ commerce easyship update-origin \\',
37
+ ' --line1 "456 Shipping Blvd" --line2 "Unit 10" \\',
38
+ ' --city "San Francisco" --state "CA" \\',
39
+ ' --postal-code "94102" --country US \\',
40
+ ' --contact-name "Shipping Dept" \\',
41
+ ' --contact-phone "+14155551234" \\',
42
+ ' --contact-email "shipping@example.com"',
43
+ ],
44
+ output: {
45
+ example: JSON.stringify({
46
+ success: true,
47
+ data: {
48
+ line_1: '123 Warehouse St',
49
+ city: 'Los Angeles',
50
+ postal_code: '90001',
51
+ country_alpha2: 'US',
52
+ },
53
+ message: 'Origin address updated',
54
+ }, null, 2),
55
+ },
56
+ relatedCommands: [
57
+ { command: 'easyship get-origin', description: 'View current origin address' },
58
+ { command: 'easyship validate-address', description: 'Validate an address' },
59
+ { command: 'easyship get-mode', description: 'View shipping mode' },
60
+ ],
61
+ notes: [
62
+ 'Origin address is where shipments are sent from',
63
+ 'Required fields: line1, city, postal-code, country',
64
+ 'Country code must be ISO 3166-1 alpha-2 (e.g., US, GB, CN)',
65
+ 'Contact info is recommended for shipping labels',
66
+ ],
67
+ });
68
+ export const updateOriginCommand = cmd;
69
+ async function updateOrigin(options) {
70
+ let line1 = options.line1;
71
+ let city = options.city;
72
+ let postalCode = options.postalCode;
73
+ let country = options.country;
74
+ // Interactive mode if required fields are missing
75
+ if (isInteractiveEnvironment() && (!line1 || !city || !postalCode || !country)) {
76
+ console.log(chalk.cyan('\n📍 更新 Easyship 发货地址\n'));
77
+ // Try to fetch current origin for defaults
78
+ let currentOrigin = {};
79
+ try {
80
+ currentOrigin = await commerceApi.easyship.getOrigin() || {};
81
+ }
82
+ catch {
83
+ // Ignore error
84
+ }
85
+ const answers = await inquirer.prompt([
86
+ {
87
+ type: 'input',
88
+ name: 'line1',
89
+ message: '地址行 1:',
90
+ default: options.line1 || currentOrigin.line_1 || '',
91
+ validate: (input) => input.trim() ? true : '地址行 1 不能为空',
92
+ },
93
+ {
94
+ type: 'input',
95
+ name: 'line2',
96
+ message: '地址行 2 (可选):',
97
+ default: options.line2 || currentOrigin.line_2 || '',
98
+ },
99
+ {
100
+ type: 'input',
101
+ name: 'city',
102
+ message: '城市:',
103
+ default: options.city || currentOrigin.city || '',
104
+ validate: (input) => input.trim() ? true : '城市不能为空',
105
+ },
106
+ {
107
+ type: 'input',
108
+ name: 'state',
109
+ message: '州/省 (可选):',
110
+ default: options.state || currentOrigin.state || '',
111
+ },
112
+ {
113
+ type: 'input',
114
+ name: 'postalCode',
115
+ message: '邮政编码:',
116
+ default: options.postalCode || currentOrigin.postal_code || '',
117
+ validate: (input) => input.trim() ? true : '邮政编码不能为空',
118
+ },
119
+ {
120
+ type: 'input',
121
+ name: 'country',
122
+ message: '国家代码 (如 US, CN):',
123
+ default: options.country || currentOrigin.country_alpha2 || '',
124
+ validate: (input) => {
125
+ if (!input.trim())
126
+ return '国家代码不能为空';
127
+ if (input.trim().length !== 2)
128
+ return '请输入 2 位国家代码';
129
+ return true;
130
+ },
131
+ },
132
+ {
133
+ type: 'input',
134
+ name: 'contactName',
135
+ message: '联系人姓名 (可选):',
136
+ default: options.contactName || currentOrigin.contact_name || '',
137
+ },
138
+ {
139
+ type: 'input',
140
+ name: 'contactPhone',
141
+ message: '联系电话 (可选):',
142
+ default: options.contactPhone || currentOrigin.contact_phone || '',
143
+ },
144
+ {
145
+ type: 'input',
146
+ name: 'contactEmail',
147
+ message: '联系邮箱 (可选):',
148
+ default: options.contactEmail || currentOrigin.contact_email || '',
149
+ },
150
+ ]);
151
+ line1 = answers.line1;
152
+ city = answers.city;
153
+ postalCode = answers.postalCode;
154
+ country = answers.country;
155
+ options.line2 = answers.line2 || options.line2;
156
+ options.state = answers.state || options.state;
157
+ options.contactName = answers.contactName || options.contactName;
158
+ options.contactPhone = answers.contactPhone || options.contactPhone;
159
+ options.contactEmail = answers.contactEmail || options.contactEmail;
160
+ }
161
+ // Validate required fields (non-interactive mode)
162
+ if (!line1) {
163
+ throw new ValidationError('Address line 1 is required (--line1)', 'line1');
164
+ }
165
+ if (!city) {
166
+ throw new ValidationError('City is required (--city)', 'city');
167
+ }
168
+ if (!postalCode) {
169
+ throw new ValidationError('Postal code is required (--postal-code)', 'postal-code');
170
+ }
171
+ if (!country) {
172
+ throw new ValidationError('Country code is required (--country)', 'country');
173
+ }
174
+ const spinner = output.spinner('Updating origin address...');
175
+ try {
176
+ const data = {
177
+ line_1: line1,
178
+ city: city,
179
+ postal_code: postalCode,
180
+ country_alpha2: country.toUpperCase(),
181
+ };
182
+ if (options.line2)
183
+ data.line_2 = options.line2;
184
+ if (options.state)
185
+ data.state = options.state;
186
+ if (options.contactName)
187
+ data.contact_name = options.contactName;
188
+ if (options.contactPhone)
189
+ data.contact_phone = options.contactPhone;
190
+ if (options.contactEmail)
191
+ data.contact_email = options.contactEmail;
192
+ const result = await commerceApi.easyship.updateOrigin(data);
193
+ spinner.succeed('Origin address updated');
194
+ if (output.isJson()) {
195
+ output.success(result, 'Origin address updated');
196
+ }
197
+ else {
198
+ console.log();
199
+ console.log(chalk.green('✓ 发货地址已更新'));
200
+ console.log();
201
+ console.log(chalk.white(line1));
202
+ if (options.line2) {
203
+ console.log(chalk.white(options.line2));
204
+ }
205
+ console.log(chalk.white([city, options.state, postalCode].filter(Boolean).join(', ')));
206
+ console.log(chalk.white(country.toUpperCase()));
207
+ if (options.contactName || options.contactPhone || options.contactEmail) {
208
+ console.log();
209
+ console.log(chalk.gray('联系信息:'));
210
+ if (options.contactName) {
211
+ console.log(chalk.gray(' 姓名: ') + chalk.white(options.contactName));
212
+ }
213
+ if (options.contactPhone) {
214
+ console.log(chalk.gray(' 电话: ') + chalk.white(options.contactPhone));
215
+ }
216
+ if (options.contactEmail) {
217
+ console.log(chalk.gray(' 邮箱: ') + chalk.white(options.contactEmail));
218
+ }
219
+ }
220
+ console.log();
221
+ }
222
+ }
223
+ catch (error) {
224
+ spinner.fail('Failed to update origin address');
225
+ throw createApiError(error);
226
+ }
227
+ }
228
+ //# sourceMappingURL=update-origin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-origin.js","sourceRoot":"","sources":["../../../src/commands/easyship/update-origin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AActE,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC;KACrC,WAAW,CAAC,gCAAgC,CAAC;KAC7C,MAAM,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;KACvD,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;KAC5C,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;KAC1D,MAAM,CAAC,kBAAkB,EAAE,6CAA6C,CAAC;KACzE,MAAM,CAAC,yBAAyB,EAAE,cAAc,CAAC;KACjD,MAAM,CAAC,0BAA0B,EAAE,eAAe,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,eAAe,CAAC;KACnD,MAAM,CAAC,KAAK,EAAE,OAA4B,EAAE,EAAE;IAC7C,IAAI,CAAC;QACH,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,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=validate-address.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-address.d.ts","sourceRoot":"","sources":["../../../src/commands/easyship/validate-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0EpC,eAAO,MAAM,sBAAsB,SAAM,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ import { commerceApi } from '../../api/rest/commerce.js';
4
+ import { handleError, createApiError, ValidationError } from '../../utils/error.js';
5
+ import { output } from '../../utils/output.js';
6
+ import { addEnhancedHelp } from '../../utils/helpText.js';
7
+ const cmd = new Command('validate-address')
8
+ .description('Validate a shipping address with Easyship')
9
+ .option('--line1 <string>', 'Address line 1 (required)')
10
+ .option('--line2 <string>', 'Address line 2')
11
+ .option('--city <string>', 'City (required)')
12
+ .option('--state <string>', 'State/Province')
13
+ .option('--postal-code <string>', 'Postal code (required)')
14
+ .option('--country <code>', 'Country code (ISO 3166-1 alpha-2, required)')
15
+ .option('--contact-name <string>', 'Contact name')
16
+ .option('--contact-phone <string>', 'Contact phone')
17
+ .option('--contact-email <string>', 'Contact email')
18
+ .action(async (options) => {
19
+ try {
20
+ await validateAddress(options);
21
+ }
22
+ catch (error) {
23
+ handleError(error);
24
+ }
25
+ });
26
+ addEnhancedHelp(cmd, {
27
+ examples: [
28
+ '# Validate a US address',
29
+ '$ commerce easyship validate-address \\',
30
+ ' --line1 "123 Main St" --city "New York" \\',
31
+ ' --postal-code "10001" --country US',
32
+ '',
33
+ '# Validate with full details',
34
+ '$ commerce easyship validate-address \\',
35
+ ' --line1 "456 Oak Ave" --line2 "Apt 2B" \\',
36
+ ' --city "Los Angeles" --state "CA" \\',
37
+ ' --postal-code "90001" --country US \\',
38
+ ' --contact-name "John Doe" --contact-phone "+1234567890"',
39
+ ],
40
+ output: {
41
+ example: JSON.stringify({
42
+ success: true,
43
+ data: {
44
+ address_validated: true,
45
+ formatted_address: '123 Main St, New York, NY 10001, USA',
46
+ suggestions: []
47
+ },
48
+ message: 'Address validation completed'
49
+ }, null, 2)
50
+ },
51
+ relatedCommands: [
52
+ { command: 'easyship create-shipment', description: 'Create shipment' },
53
+ { command: 'easyship get-origin', description: 'View origin address' },
54
+ ],
55
+ notes: [
56
+ 'Uses Easyship API for address validation',
57
+ 'Country code must be ISO 3166-1 alpha-2 (e.g., US, GB, CN)',
58
+ 'Validates address format and deliverability',
59
+ ]
60
+ });
61
+ export const validateAddressCommand = cmd;
62
+ async function validateAddress(options) {
63
+ if (!options.line1) {
64
+ throw new ValidationError('Address line 1 is required (--line1)', 'line1');
65
+ }
66
+ if (!options.city) {
67
+ throw new ValidationError('City is required (--city)', 'city');
68
+ }
69
+ if (!options.postalCode) {
70
+ throw new ValidationError('Postal code is required (--postal-code)', 'postal-code');
71
+ }
72
+ if (!options.country) {
73
+ throw new ValidationError('Country code is required (--country)', 'country');
74
+ }
75
+ const spinner = output.spinner('Validating address...');
76
+ try {
77
+ const result = await commerceApi.easyship.validateAddress({
78
+ line_1: options.line1,
79
+ line_2: options.line2,
80
+ city: options.city,
81
+ state: options.state,
82
+ postal_code: options.postalCode,
83
+ country_alpha2: options.country.toUpperCase(),
84
+ contact_name: options.contactName,
85
+ contact_phone: options.contactPhone,
86
+ contact_email: options.contactEmail,
87
+ });
88
+ spinner.succeed('Address validation completed');
89
+ if (output.isJson()) {
90
+ output.success(result, 'Address validation completed');
91
+ }
92
+ else {
93
+ console.log();
94
+ const isValid = result.address_validated || result.valid;
95
+ if (isValid) {
96
+ console.log(chalk.green('✓ Address is valid'));
97
+ }
98
+ else {
99
+ console.log(chalk.yellow('⚠ Address may need review'));
100
+ }
101
+ console.log();
102
+ if (result.formatted_address) {
103
+ console.log(chalk.gray('Formatted: ') + chalk.white(result.formatted_address));
104
+ }
105
+ if (result.suggestions && result.suggestions.length > 0) {
106
+ console.log(chalk.gray('\nSuggestions:'));
107
+ result.suggestions.forEach((s, i) => {
108
+ console.log(chalk.gray(` ${i + 1}. `) + chalk.white(s));
109
+ });
110
+ }
111
+ console.log();
112
+ }
113
+ }
114
+ catch (error) {
115
+ spinner.fail('Address validation failed');
116
+ throw createApiError(error);
117
+ }
118
+ }
119
+ //# sourceMappingURL=validate-address.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-address.js","sourceRoot":"","sources":["../../../src/commands/easyship/validate-address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAc1D,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,kBAAkB,CAAC;KACxC,WAAW,CAAC,2CAA2C,CAAC;KACxD,MAAM,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;KACvD,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;KAC5C,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;KAC1D,MAAM,CAAC,kBAAkB,EAAE,6CAA6C,CAAC;KACzE,MAAM,CAAC,yBAAyB,EAAE,cAAc,CAAC;KACjD,MAAM,CAAC,0BAA0B,EAAE,eAAe,CAAC;KACnD,MAAM,CAAC,0BAA0B,EAAE,eAAe,CAAC;KACnD,MAAM,CAAC,KAAK,EAAE,OAA+B,EAAE,EAAE;IAChD,IAAI,CAAC;QACH,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CA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B,EAAE,CAAC;gBAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;YACjF,CAAC;YAED,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBAC1C,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;oBAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3D,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC1C,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const validateOriginCommand: Command;
3
+ //# sourceMappingURL=validate-origin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-origin.d.ts","sourceRoot":"","sources":["../../../src/commands/easyship/validate-origin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0EpC,eAAO,MAAM,qBAAqB,SAAM,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ import { commerceApi } from '../../api/rest/commerce.js';
4
+ import { handleError, createApiError, ValidationError } from '../../utils/error.js';
5
+ import { output } from '../../utils/output.js';
6
+ import { addEnhancedHelp } from '../../utils/helpText.js';
7
+ const cmd = new Command('validate-origin')
8
+ .description('Validate an Easyship origin address')
9
+ .option('--line1 <string>', 'Address line 1 (required)')
10
+ .option('--line2 <string>', 'Address line 2')
11
+ .option('--city <string>', 'City (required)')
12
+ .option('--state <string>', 'State/Province')
13
+ .option('--postal-code <string>', 'Postal code (required)')
14
+ .option('--country <code>', 'Country code (ISO 3166-1 alpha-2, required)')
15
+ .option('--contact-name <string>', 'Contact name')
16
+ .option('--contact-phone <string>', 'Contact phone')
17
+ .option('--contact-email <string>', 'Contact email')
18
+ .action(async (options) => {
19
+ try {
20
+ await validateOrigin(options);
21
+ }
22
+ catch (error) {
23
+ handleError(error);
24
+ }
25
+ });
26
+ addEnhancedHelp(cmd, {
27
+ examples: [
28
+ '# Validate an origin address',
29
+ '$ commerce easyship validate-origin \\',
30
+ ' --line1 "123 Warehouse St" --city "Los Angeles" \\',
31
+ ' --postal-code "90001" --country US',
32
+ '',
33
+ '# Validate with full details',
34
+ '$ commerce easyship validate-origin \\',
35
+ ' --line1 "456 Shipping Blvd" --line2 "Unit 10" \\',
36
+ ' --city "San Francisco" --state "CA" \\',
37
+ ' --postal-code "94102" --country US \\',
38
+ ' --contact-name "Shipping Dept" --contact-phone "+14155551234"',
39
+ ],
40
+ output: {
41
+ example: JSON.stringify({
42
+ success: true,
43
+ data: {
44
+ address_validated: true,
45
+ formatted_address: '123 Warehouse St, Los Angeles, CA 90001, USA',
46
+ },
47
+ message: 'Origin address is valid',
48
+ }, null, 2),
49
+ },
50
+ relatedCommands: [
51
+ { command: 'easyship update-origin', description: 'Update origin address' },
52
+ { command: 'easyship get-origin', description: 'View current origin' },
53
+ { command: 'easyship validate-address', description: 'Validate shipping address' },
54
+ ],
55
+ notes: [
56
+ 'Validates origin address before saving',
57
+ 'Required fields: line1, city, postal-code, country',
58
+ 'Country code must be ISO 3166-1 alpha-2 (e.g., US, GB, CN)',
59
+ ],
60
+ });
61
+ export const validateOriginCommand = cmd;
62
+ async function validateOrigin(options) {
63
+ if (!options.line1) {
64
+ throw new ValidationError('Address line 1 is required (--line1)', 'line1');
65
+ }
66
+ if (!options.city) {
67
+ throw new ValidationError('City is required (--city)', 'city');
68
+ }
69
+ if (!options.postalCode) {
70
+ throw new ValidationError('Postal code is required (--postal-code)', 'postal-code');
71
+ }
72
+ if (!options.country) {
73
+ throw new ValidationError('Country code is required (--country)', 'country');
74
+ }
75
+ const spinner = output.spinner('Validating origin address...');
76
+ try {
77
+ const result = await commerceApi.easyship.validateOrigin({
78
+ line_1: options.line1,
79
+ line_2: options.line2,
80
+ city: options.city,
81
+ state: options.state,
82
+ postal_code: options.postalCode,
83
+ country_alpha2: options.country.toUpperCase(),
84
+ contact_name: options.contactName,
85
+ contact_phone: options.contactPhone,
86
+ contact_email: options.contactEmail,
87
+ });
88
+ spinner.succeed('Origin address validation completed');
89
+ if (output.isJson()) {
90
+ output.success(result, 'Origin address validation completed');
91
+ }
92
+ else {
93
+ console.log();
94
+ const isValid = result.address_validated || result.valid;
95
+ if (isValid) {
96
+ console.log(chalk.green('✓ Origin address is valid'));
97
+ }
98
+ else {
99
+ console.log(chalk.yellow('⚠ Origin address may need review'));
100
+ }
101
+ console.log();
102
+ if (result.formatted_address) {
103
+ console.log(chalk.gray('Formatted: ') + chalk.white(result.formatted_address));
104
+ }
105
+ if (result.suggestions && result.suggestions.length > 0) {
106
+ console.log(chalk.gray('\nSuggestions:'));
107
+ result.suggestions.forEach((s, i) => {
108
+ console.log(chalk.gray(` ${i + 1}. `) + chalk.white(s));
109
+ });
110
+ }
111
+ console.log();
112
+ }
113
+ }
114
+ catch (error) {
115
+ spinner.fail('Origin address validation failed');
116
+ throw createApiError(error);
117
+ }
118
+ }
119
+ //# sourceMappingURL=validate-origin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-origin.js","sourceRoot":"","sources":["../../../src/commands/easyship/validate-origin.ts"],"names":[],"mappings":"AAAA,O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AAG,CAAC,EAAE,CAAC;gBACxD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBAC1C,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE;oBAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3D,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACjD,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const deleteConfigCommand: Command;
3
+ //# sourceMappingURL=delete-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-config.d.ts","sourceRoot":"","sources":["../../../src/commands/homepage/delete-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuDpC,eAAO,MAAM,mBAAmB,SAAM,CAAC"}
@@ -0,0 +1,94 @@
1
+ import { Command } from 'commander';
2
+ import chalk from 'chalk';
3
+ import inquirer from 'inquirer';
4
+ import { commerceApi } from '../../api/rest/commerce.js';
5
+ import { handleError, createApiError, ValidationError } from '../../utils/error.js';
6
+ import { output } from '../../utils/output.js';
7
+ import { addEnhancedHelp } from '../../utils/helpText.js';
8
+ import { isInteractiveEnvironment, requireParam } from '../../utils/interactive.js';
9
+ const cmd = new Command('delete-config')
10
+ .description('Delete a homepage configuration')
11
+ .option('--id <uuid>', 'Homepage config ID (required)')
12
+ .option('-y, --yes', 'Skip confirmation prompt')
13
+ .action(async (options) => {
14
+ try {
15
+ await deleteConfig(options);
16
+ }
17
+ catch (error) {
18
+ handleError(error);
19
+ }
20
+ });
21
+ addEnhancedHelp(cmd, {
22
+ examples: [
23
+ '# Delete a homepage config (with confirmation)',
24
+ '$ commerce homepage delete-config --id abc-123-def',
25
+ '',
26
+ '# Delete without confirmation',
27
+ '$ commerce homepage delete-config --id abc-123-def --yes',
28
+ ],
29
+ output: {
30
+ example: JSON.stringify({
31
+ success: true,
32
+ data: {
33
+ config_id: 'abc-123-def',
34
+ },
35
+ message: 'Homepage config deleted',
36
+ }, null, 2),
37
+ },
38
+ relatedCommands: [
39
+ { command: 'homepage get-config', description: 'View current config' },
40
+ { command: 'homepage switch-template', description: 'Switch to different template' },
41
+ { command: 'homepage list-templates', description: 'List available templates' },
42
+ ],
43
+ notes: [
44
+ 'This action cannot be undone',
45
+ 'Use --yes to skip confirmation in non-interactive mode',
46
+ 'Deleting config will reset homepage to default state',
47
+ ],
48
+ });
49
+ export const deleteConfigCommand = cmd;
50
+ async function deleteConfig(options) {
51
+ const configId = isInteractiveEnvironment()
52
+ ? (options.id?.trim() || (() => { throw new ValidationError('Config ID is required', 'id'); })())
53
+ : requireParam(options.id, 'id', 'Config ID');
54
+ // Confirmation prompt
55
+ if (!options.yes) {
56
+ if (isInteractiveEnvironment()) {
57
+ console.log(chalk.yellow(`\n⚠️ 即将删除首页配置: ${configId}\n`));
58
+ const { confirm } = await inquirer.prompt([
59
+ {
60
+ type: 'confirm',
61
+ name: 'confirm',
62
+ message: '确定要删除此配置吗?此操作不可撤销。',
63
+ default: false,
64
+ },
65
+ ]);
66
+ if (!confirm) {
67
+ console.log(chalk.gray('操作已取消'));
68
+ return;
69
+ }
70
+ }
71
+ else {
72
+ throw new ValidationError('Use --yes flag to confirm deletion in non-interactive mode', 'yes');
73
+ }
74
+ }
75
+ const spinner = output.spinner('Deleting homepage config...');
76
+ try {
77
+ await commerceApi.homepage.deleteConfig(configId);
78
+ spinner.succeed('Homepage config deleted');
79
+ if (output.isJson()) {
80
+ output.success({ config_id: configId }, 'Homepage config deleted');
81
+ }
82
+ else {
83
+ console.log();
84
+ console.log(chalk.green('✓ 首页配置已删除'));
85
+ console.log(chalk.gray('Config ID: ') + chalk.white(configId));
86
+ console.log();
87
+ }
88
+ }
89
+ catch (error) {
90
+ spinner.fail('Failed to delete homepage config');
91
+ throw createApiError(error);
92
+ }
93
+ }
94
+ //# sourceMappingURL=delete-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-config.js","sourceRoot":"","sources":["../../../src/commands/homepage/delete-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAOpF,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,eAAe,CAAC;KACrC,WAAW,CAAC,iCAAiC,CAAC;KAC9C,MAAM,CAAC,aAAa,EAAE,+BAA+B,CAAC;KACtD,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;KAC/C,MAAM,CAAC,KAAK,EAAE,OAA4B,EAAE,EAAE;IAC7C,IAAI,CAAC;QACH,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,eAAe,CAAC,GAAG,E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Command } from 'commander';
2
+ export declare const getConfigCommand: Command;
3
+ //# sourceMappingURL=get-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-config.d.ts","sourceRoot":"","sources":["../../../src/commands/homepage/get-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyDpC,eAAO,MAAM,gBAAgB,SAAM,CAAC"}