@optima-chat/commerce-cli 1.7.2 → 1.7.4

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 (181) hide show
  1. package/.claude/settings.local.json +70 -0
  2. package/README.md +7 -7
  3. package/dist/commands/address/create.d.ts +3 -0
  4. package/dist/commands/address/create.d.ts.map +1 -0
  5. package/dist/commands/address/create.js +122 -0
  6. package/dist/commands/address/create.js.map +1 -0
  7. package/dist/commands/address/delete.d.ts +3 -0
  8. package/dist/commands/address/delete.d.ts.map +1 -0
  9. package/dist/commands/address/delete.js +50 -0
  10. package/dist/commands/address/delete.js.map +1 -0
  11. package/dist/commands/address/get.d.ts +3 -0
  12. package/dist/commands/address/get.d.ts.map +1 -0
  13. package/dist/commands/address/get.js +50 -0
  14. package/dist/commands/address/get.js.map +1 -0
  15. package/dist/commands/address/index.d.ts +3 -0
  16. package/dist/commands/address/index.d.ts.map +1 -0
  17. package/dist/commands/address/index.js +16 -0
  18. package/dist/commands/address/index.js.map +1 -0
  19. package/dist/commands/address/list.d.ts +3 -0
  20. package/dist/commands/address/list.d.ts.map +1 -0
  21. package/dist/commands/address/list.js +34 -0
  22. package/dist/commands/address/list.js.map +1 -0
  23. package/dist/commands/address/set-default.d.ts +3 -0
  24. package/dist/commands/address/set-default.d.ts.map +1 -0
  25. package/dist/commands/address/set-default.js +34 -0
  26. package/dist/commands/address/set-default.js.map +1 -0
  27. package/dist/commands/address/update.d.ts +3 -0
  28. package/dist/commands/address/update.d.ts.map +1 -0
  29. package/dist/commands/address/update.js +120 -0
  30. package/dist/commands/address/update.js.map +1 -0
  31. package/dist/commands/auth/login.js +1 -1
  32. package/dist/commands/auth/login.js.map +1 -1
  33. package/dist/commands/auth/switch.d.ts +3 -0
  34. package/dist/commands/auth/switch.d.ts.map +1 -0
  35. package/dist/commands/auth/switch.js +111 -0
  36. package/dist/commands/auth/switch.js.map +1 -0
  37. package/dist/commands/auth/test-refresh.d.ts +3 -0
  38. package/dist/commands/auth/test-refresh.d.ts.map +1 -0
  39. package/dist/commands/auth/test-refresh.js +43 -0
  40. package/dist/commands/auth/test-refresh.js.map +1 -0
  41. package/dist/commands/auth/whoami.d.ts.map +1 -1
  42. package/dist/commands/auth/whoami.js +5 -5
  43. package/dist/commands/auth/whoami.js.map +1 -1
  44. package/dist/commands/category/create.d.ts +3 -0
  45. package/dist/commands/category/create.d.ts.map +1 -0
  46. package/dist/commands/category/create.js +142 -0
  47. package/dist/commands/category/create.js.map +1 -0
  48. package/dist/commands/category/delete.d.ts +3 -0
  49. package/dist/commands/category/delete.d.ts.map +1 -0
  50. package/dist/commands/category/delete.js +98 -0
  51. package/dist/commands/category/delete.js.map +1 -0
  52. package/dist/commands/category/get.d.ts +3 -0
  53. package/dist/commands/category/get.d.ts.map +1 -0
  54. package/dist/commands/category/get.js +74 -0
  55. package/dist/commands/category/get.js.map +1 -0
  56. package/dist/commands/category/index.d.ts +3 -0
  57. package/dist/commands/category/index.d.ts.map +1 -0
  58. package/dist/commands/category/index.js +14 -0
  59. package/dist/commands/category/index.js.map +1 -0
  60. package/dist/commands/category/list.d.ts +3 -0
  61. package/dist/commands/category/list.d.ts.map +1 -0
  62. package/dist/commands/category/list.js +77 -0
  63. package/dist/commands/category/list.js.map +1 -0
  64. package/dist/commands/category/update.d.ts +3 -0
  65. package/dist/commands/category/update.d.ts.map +1 -0
  66. package/dist/commands/category/update.js +104 -0
  67. package/dist/commands/category/update.js.map +1 -0
  68. package/dist/commands/cleanup.d.ts +3 -0
  69. package/dist/commands/cleanup.d.ts.map +1 -0
  70. package/dist/commands/cleanup.js +100 -0
  71. package/dist/commands/cleanup.js.map +1 -0
  72. package/dist/commands/i18n/category/create.d.ts +3 -0
  73. package/dist/commands/i18n/category/create.d.ts.map +1 -0
  74. package/dist/commands/i18n/category/create.js +113 -0
  75. package/dist/commands/i18n/category/create.js.map +1 -0
  76. package/dist/commands/i18n/category/delete.d.ts +3 -0
  77. package/dist/commands/i18n/category/delete.d.ts.map +1 -0
  78. package/dist/commands/i18n/category/delete.js +63 -0
  79. package/dist/commands/i18n/category/delete.js.map +1 -0
  80. package/dist/commands/i18n/category/get.d.ts +3 -0
  81. package/dist/commands/i18n/category/get.d.ts.map +1 -0
  82. package/dist/commands/i18n/category/get.js +56 -0
  83. package/dist/commands/i18n/category/get.js.map +1 -0
  84. package/dist/commands/i18n/category/index.d.ts +3 -0
  85. package/dist/commands/i18n/category/index.d.ts.map +1 -0
  86. package/dist/commands/i18n/category/index.js +14 -0
  87. package/dist/commands/i18n/category/index.js.map +1 -0
  88. package/dist/commands/i18n/category/list.d.ts +3 -0
  89. package/dist/commands/i18n/category/list.d.ts.map +1 -0
  90. package/dist/commands/i18n/category/list.js +72 -0
  91. package/dist/commands/i18n/category/list.js.map +1 -0
  92. package/dist/commands/i18n/category/update.d.ts +3 -0
  93. package/dist/commands/i18n/category/update.d.ts.map +1 -0
  94. package/dist/commands/i18n/category/update.js +68 -0
  95. package/dist/commands/i18n/category/update.js.map +1 -0
  96. package/dist/commands/i18n/merchant/get.d.ts +3 -0
  97. package/dist/commands/i18n/merchant/get.d.ts.map +1 -0
  98. package/dist/commands/i18n/merchant/get.js +30 -0
  99. package/dist/commands/i18n/merchant/get.js.map +1 -0
  100. package/dist/commands/section/create.d.ts +3 -0
  101. package/dist/commands/section/create.d.ts.map +1 -0
  102. package/dist/commands/section/create.js +218 -0
  103. package/dist/commands/section/create.js.map +1 -0
  104. package/dist/commands/section/delete.d.ts +3 -0
  105. package/dist/commands/section/delete.d.ts.map +1 -0
  106. package/dist/commands/section/delete.js +86 -0
  107. package/dist/commands/section/delete.js.map +1 -0
  108. package/dist/commands/section/hide.d.ts +3 -0
  109. package/dist/commands/section/hide.d.ts.map +1 -0
  110. package/dist/commands/section/hide.js +82 -0
  111. package/dist/commands/section/hide.js.map +1 -0
  112. package/dist/commands/section/index.d.ts +4 -0
  113. package/dist/commands/section/index.d.ts.map +1 -0
  114. package/dist/commands/section/index.js +23 -0
  115. package/dist/commands/section/index.js.map +1 -0
  116. package/dist/commands/section/list.d.ts +3 -0
  117. package/dist/commands/section/list.d.ts.map +1 -0
  118. package/dist/commands/section/list.js +164 -0
  119. package/dist/commands/section/list.js.map +1 -0
  120. package/dist/commands/section/product/create.d.ts +3 -0
  121. package/dist/commands/section/product/create.d.ts.map +1 -0
  122. package/dist/commands/section/product/create.js +208 -0
  123. package/dist/commands/section/product/create.js.map +1 -0
  124. package/dist/commands/section/product/delete.d.ts +3 -0
  125. package/dist/commands/section/product/delete.d.ts.map +1 -0
  126. package/dist/commands/section/product/delete.js +85 -0
  127. package/dist/commands/section/product/delete.js.map +1 -0
  128. package/dist/commands/section/product/hide.d.ts +3 -0
  129. package/dist/commands/section/product/hide.d.ts.map +1 -0
  130. package/dist/commands/section/product/hide.js +78 -0
  131. package/dist/commands/section/product/hide.js.map +1 -0
  132. package/dist/commands/section/product/index.d.ts +4 -0
  133. package/dist/commands/section/product/index.d.ts.map +1 -0
  134. package/dist/commands/section/product/index.js +17 -0
  135. package/dist/commands/section/product/index.js.map +1 -0
  136. package/dist/commands/section/product/list.d.ts +3 -0
  137. package/dist/commands/section/product/list.d.ts.map +1 -0
  138. package/dist/commands/section/product/list.js +157 -0
  139. package/dist/commands/section/product/list.js.map +1 -0
  140. package/dist/commands/section/product/reorder.d.ts +3 -0
  141. package/dist/commands/section/product/reorder.d.ts.map +1 -0
  142. package/dist/commands/section/product/reorder.js +110 -0
  143. package/dist/commands/section/product/reorder.js.map +1 -0
  144. package/dist/commands/section/product/update.d.ts +3 -0
  145. package/dist/commands/section/product/update.d.ts.map +1 -0
  146. package/dist/commands/section/product/update.js +127 -0
  147. package/dist/commands/section/product/update.js.map +1 -0
  148. package/dist/commands/section/reorder.d.ts +3 -0
  149. package/dist/commands/section/reorder.d.ts.map +1 -0
  150. package/dist/commands/section/reorder.js +111 -0
  151. package/dist/commands/section/reorder.js.map +1 -0
  152. package/dist/commands/section/translation/delete.d.ts +3 -0
  153. package/dist/commands/section/translation/delete.d.ts.map +1 -0
  154. package/dist/commands/section/translation/delete.js +97 -0
  155. package/dist/commands/section/translation/delete.js.map +1 -0
  156. package/dist/commands/section/translation/index.d.ts +4 -0
  157. package/dist/commands/section/translation/index.d.ts.map +1 -0
  158. package/dist/commands/section/translation/index.js +11 -0
  159. package/dist/commands/section/translation/index.js.map +1 -0
  160. package/dist/commands/section/translation/list.d.ts +3 -0
  161. package/dist/commands/section/translation/list.d.ts.map +1 -0
  162. package/dist/commands/section/translation/list.js +104 -0
  163. package/dist/commands/section/translation/list.js.map +1 -0
  164. package/dist/commands/section/translation/set.d.ts +3 -0
  165. package/dist/commands/section/translation/set.d.ts.map +1 -0
  166. package/dist/commands/section/translation/set.js +151 -0
  167. package/dist/commands/section/translation/set.js.map +1 -0
  168. package/dist/commands/section/update.d.ts +3 -0
  169. package/dist/commands/section/update.d.ts.map +1 -0
  170. package/dist/commands/section/update.js +137 -0
  171. package/dist/commands/section/update.js.map +1 -0
  172. package/dist/commands/test/health.js +2 -2
  173. package/dist/commands/test/health.js.map +1 -1
  174. package/dist/commands/variant/get.d.ts +3 -0
  175. package/dist/commands/variant/get.d.ts.map +1 -0
  176. package/dist/commands/variant/get.js +41 -0
  177. package/dist/commands/variant/get.js.map +1 -0
  178. package/dist/index.js +0 -0
  179. package/dist/utils/config.js +3 -3
  180. package/dist/utils/config.js.map +1 -1
  181. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const getCategoryTranslationCommand: Command;
3
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/i18n/category/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0DpC,eAAO,MAAM,6BAA6B,SAAM,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { addEnhancedHelp } from '../../../utils/helpText.js';
2
+ import { Command } from 'commander';
3
+ import chalk from 'chalk';
4
+ import { output } from '../../../utils/output.js';
5
+ import { commerceApi } from '../../../api/rest/commerce.js';
6
+ import { handleError, ValidationError } from '../../../utils/error.js';
7
+ import { validateLanguageCode, SUPPORTED_LANGUAGES } from '../../../utils/validation.js';
8
+ const cmd = new Command('get')
9
+ .description('查看分类翻译详情')
10
+ .option('--category-id <id>', '分类 ID')
11
+ .option('--lang <code>', `语言代码(支持: ${SUPPORTED_LANGUAGES.join(', ')})`)
12
+ .action(async (options) => {
13
+ try {
14
+ if (!options.categoryId || options.categoryId.trim().length === 0) {
15
+ throw new ValidationError('分类 ID 不能为空', 'category-id');
16
+ }
17
+ if (!options.lang || options.lang.trim().length === 0) {
18
+ throw new ValidationError('语言代码不能为空', 'lang');
19
+ }
20
+ validateLanguageCode(options.lang);
21
+ const categoryId = options.categoryId;
22
+ const languageCode = options.lang;
23
+ const spinner = output.spinner('正在获取翻译详情...');
24
+ const translation = await commerceApi.i18n.categoryTranslations.get(categoryId, languageCode);
25
+ spinner.succeed('翻译详情获取成功');
26
+ if (output.isJson()) {
27
+ output.success({
28
+ category_id: categoryId,
29
+ language_code: languageCode,
30
+ translation: translation
31
+ });
32
+ }
33
+ else {
34
+ console.log();
35
+ console.log(chalk.gray('语言代码: ') + chalk.cyan(translation.language_code));
36
+ console.log(chalk.gray('名称: ') + chalk.white(translation.name));
37
+ if (translation.description) {
38
+ console.log(chalk.gray('描述: ') + chalk.white(translation.description));
39
+ }
40
+ console.log();
41
+ }
42
+ }
43
+ catch (error) {
44
+ handleError(error);
45
+ }
46
+ });
47
+ addEnhancedHelp(cmd, {
48
+ examples: ['$ optima i18n category get --category-id id-123 --lang zh-CN'],
49
+ relatedCommands: [
50
+ { command: 'i18n category list', description: 'View all translations' },
51
+ { command: 'i18n category update', description: 'Update translation' },
52
+ ],
53
+ notes: ['Category ID and language code are required']
54
+ });
55
+ export const getCategoryTranslationCommand = cmd;
56
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @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uB,EAAE;QACvE,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,oBAAoB,EAAE;KACvE;IACD,KAAK,EAAE,CAAC,4CAA4C,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const categoryTranslationCommand: Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/i18n/category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,eAAO,MAAM,0BAA0B,SAMQ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Command } from 'commander';
2
+ import { listCategoryTranslationsCommand } from './list.js';
3
+ import { getCategoryTranslationCommand } from './get.js';
4
+ import { createCategoryTranslationCommand } from './create.js';
5
+ import { updateCategoryTranslationCommand } from './update.js';
6
+ import { deleteCategoryTranslationCommand } from './delete.js';
7
+ export const categoryTranslationCommand = new Command('category')
8
+ .description('分类翻译管理')
9
+ .addCommand(listCategoryTranslationsCommand)
10
+ .addCommand(getCategoryTranslationCommand)
11
+ .addCommand(createCategoryTranslationCommand)
12
+ .addCommand(updateCategoryTranslationCommand)
13
+ .addCommand(deleteCategoryTranslationCommand);
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/i18n/category/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;KAC9D,WAAW,CAAC,QAAQ,CAAC;KACrB,UAAU,CAAC,+BAA+B,CAAC;KAC3C,UAAU,CAAC,6BAA6B,CAAC;KACzC,UAAU,CAAC,gCAAgC,CAAC;KAC5C,UAAU,CAAC,gCAAgC,CAAC;KAC5C,UAAU,CAAC,gCAAgC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const listCategoryTranslationsCommand: Command;
3
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/i18n/category/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4EpC,eAAO,MAAM,+BAA+B,SAAM,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { addEnhancedHelp } from '../../../utils/helpText.js';
2
+ import { Command } from 'commander';
3
+ import chalk from 'chalk';
4
+ import Table from 'cli-table3';
5
+ import { output } from '../../../utils/output.js';
6
+ import { commerceApi } from '../../../api/rest/commerce.js';
7
+ import { handleError, ValidationError } from '../../../utils/error.js';
8
+ const cmd = new Command('list')
9
+ .description('查看分类翻译列表')
10
+ .option('--category-id <id>', '分类 ID')
11
+ .action(async (options) => {
12
+ try {
13
+ if (!options.categoryId || options.categoryId.trim().length === 0) {
14
+ throw new ValidationError('分类 ID 不能为空', 'category-id');
15
+ }
16
+ const categoryId = options.categoryId;
17
+ const spinner = output.spinner('正在获取分类翻译...').start();
18
+ const translations = await commerceApi.i18n.categoryTranslations.list(categoryId);
19
+ spinner.succeed('分类翻译获取成功');
20
+ if (translations.length === 0) {
21
+ if (output.isJson()) {
22
+ output.success({
23
+ category_id: categoryId,
24
+ translations: [],
25
+ total: 0
26
+ }, '该分类暂无翻译');
27
+ }
28
+ else {
29
+ console.log(chalk.yellow('\n该分类暂无翻译\n'));
30
+ }
31
+ return;
32
+ }
33
+ if (output.isJson()) {
34
+ output.success({
35
+ category_id: categoryId,
36
+ translations: translations,
37
+ total: translations.length
38
+ });
39
+ }
40
+ else {
41
+ const table = new Table({
42
+ head: [chalk.cyan('语言代码'), chalk.cyan('名称'), chalk.cyan('描述预览')],
43
+ colWidths: [12, 30, 50],
44
+ });
45
+ translations.forEach((trans) => {
46
+ const descPreview = trans.description
47
+ ? trans.description.substring(0, 47) + (trans.description.length > 47 ? '...' : '')
48
+ : '-';
49
+ table.push([
50
+ trans.language_code,
51
+ trans.name || '-',
52
+ descPreview,
53
+ ]);
54
+ });
55
+ console.log('\n' + table.toString());
56
+ console.log(chalk.gray(`\n共 ${translations.length} 个翻译\n`));
57
+ }
58
+ }
59
+ catch (error) {
60
+ handleError(error);
61
+ }
62
+ });
63
+ addEnhancedHelp(cmd, {
64
+ examples: ['$ optima i18n category list --category-id id-123'],
65
+ relatedCommands: [
66
+ { command: 'i18n category create', description: 'Add new translation' },
67
+ { command: 'i18n category get', description: 'View specific translation' },
68
+ ],
69
+ notes: ['Category ID is required']
70
+ });
71
+ export const listCategoryTranslationsCommand = cmd;
72
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/i18n/category/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yBAAyB,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O,EAAE,mBAAmB,EAAE,WAAW,EAAE,2BAA2B,EAAE;KAC3E;IACD,KAAK,EAAE,CAAC,yBAAyB,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const updateCategoryTranslationCommand: Command;
3
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/i18n/category/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8EpC,eAAO,MAAM,gCAAgC,SAAM,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { addEnhancedHelp } from '../../../utils/helpText.js';
2
+ import { Command } from 'commander';
3
+ import chalk from 'chalk';
4
+ import { output } from '../../../utils/output.js';
5
+ import { commerceApi } from '../../../api/rest/commerce.js';
6
+ import { handleError, ValidationError } from '../../../utils/error.js';
7
+ import { validateLanguageCode, SUPPORTED_LANGUAGES } from '../../../utils/validation.js';
8
+ const cmd = new Command('update')
9
+ .description('更新分类翻译')
10
+ .option('--category-id <id>', '分类 ID')
11
+ .option('--lang <code>', `语言代码(支持: ${SUPPORTED_LANGUAGES.join(', ')})`)
12
+ .option('-n, --name <name>', '翻译后的名称')
13
+ .option('-d, --description <description>', '翻译后的描述')
14
+ .action(async (options) => {
15
+ try {
16
+ if (!options.categoryId || options.categoryId.trim().length === 0) {
17
+ throw new ValidationError('分类 ID 不能为空', 'category-id');
18
+ }
19
+ if (!options.lang || options.lang.trim().length === 0) {
20
+ throw new ValidationError('语言代码不能为空', 'lang');
21
+ }
22
+ validateLanguageCode(options.lang);
23
+ const categoryId = options.categoryId;
24
+ const languageCode = options.lang;
25
+ const { name, description } = options;
26
+ if (!name && !description) {
27
+ throw new ValidationError('至少需要提供一个更新字段', 'fields');
28
+ }
29
+ const data = {};
30
+ if (name)
31
+ data.name = name;
32
+ if (description)
33
+ data.description = description;
34
+ const spinner = output.spinner('正在更新翻译...');
35
+ const translation = await commerceApi.i18n.categoryTranslations.update(categoryId, languageCode, data);
36
+ spinner.succeed('翻译更新成功!');
37
+ if (output.isJson()) {
38
+ output.success({
39
+ category_id: categoryId,
40
+ language_code: languageCode,
41
+ updated_fields: Object.keys(data),
42
+ translation: translation
43
+ });
44
+ }
45
+ else {
46
+ console.log();
47
+ console.log(chalk.gray('语言代码: ') + chalk.cyan(translation.language_code));
48
+ console.log(chalk.gray('名称: ') + chalk.white(translation.name));
49
+ if (translation.description) {
50
+ console.log(chalk.gray('描述: ') + chalk.white(translation.description));
51
+ }
52
+ console.log();
53
+ }
54
+ }
55
+ catch (error) {
56
+ handleError(error);
57
+ }
58
+ });
59
+ addEnhancedHelp(cmd, {
60
+ examples: ['$ optima i18n category update --category-id id-123 --lang zh-CN --name "新名称"'],
61
+ relatedCommands: [
62
+ { command: 'i18n category get', description: 'View current translation' },
63
+ { command: 'i18n category list', description: 'View all translations' },
64
+ ],
65
+ notes: ['Language code and at least one field to update are required']
66
+ });
67
+ export const updateCategoryTranslationCommand = cmd;
68
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/i18n/category/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AASzF,MAAM,GAAG,GAAG,IA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,mBAAmB,EAAE,WAAW,EAAE,0BAA0B,EAAE;QACzE,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,uBAAuB,EAAE;KACxE;IACD,KAAK,EAAE,CAAC,6DAA6D,CAAC;CACvE,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const getMerchantTranslationCommand: Command;
3
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/commands/i18n/merchant/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,6BAA6B,SAyBtC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { Command } from 'commander';
2
+ import ora from 'ora';
3
+ import chalk from 'chalk';
4
+ import { commerceApi } from '../../../api/rest/commerce.js';
5
+ import { handleError, ValidationError } from '../../../utils/error.js';
6
+ export const getMerchantTranslationCommand = new Command('get')
7
+ .description('查看商户翻译详情')
8
+ .option('--lang <code>', '语言代码(如 zh-CN, en, es)')
9
+ .action(async (options) => {
10
+ try {
11
+ if (!options.lang || options.lang.trim().length === 0) {
12
+ throw new ValidationError('语言代码不能为空', 'lang');
13
+ }
14
+ const languageCode = options.lang;
15
+ const spinner = ora('正在获取翻译详情...').start();
16
+ const translation = await commerceApi.i18n.merchantTranslations.get(languageCode);
17
+ spinner.succeed('翻译详情获取成功');
18
+ console.log();
19
+ console.log(chalk.gray('语言代码: ') + chalk.cyan(translation.language_code));
20
+ console.log(chalk.gray('名称: ') + chalk.white(translation.name));
21
+ if (translation.description) {
22
+ console.log(chalk.gray('描述: ') + chalk.white(translation.description));
23
+ }
24
+ console.log();
25
+ }
26
+ catch (error) {
27
+ handleError(error);
28
+ }
29
+ });
30
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+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KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAChE,IAAI,WAAW,CAAC,WAAW,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const createSectionCommand: Command;
3
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/section/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2FpC,eAAO,MAAM,oBAAoB,SAAM,CAAC"}
@@ -0,0 +1,218 @@
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('create')
10
+ .description('Create or override a product page section (merchant-level)')
11
+ .option('--handle <handle>', 'Section handle/identifier (required)')
12
+ .option('--operation-type <type>', 'Operation type: override | new | hidden (required)')
13
+ .option('--type <type>', 'Section type: collapsible | static (required for override/new)')
14
+ .option('--position <n>', 'Display position (required for override/new)')
15
+ .option('--content <text>', 'Section content in Markdown (required for override/new)')
16
+ .option('--tab-group <group>', 'Tab group name (optional, null for independent sections)')
17
+ .option('--inherit-translations', 'Inherit translations from parent layer')
18
+ .action(async (options) => {
19
+ try {
20
+ await createSection(options);
21
+ }
22
+ catch (error) {
23
+ handleError(error);
24
+ }
25
+ });
26
+ addEnhancedHelp(cmd, {
27
+ examples: [
28
+ '# Override system default section',
29
+ '$ commerce section create --handle care --operation-type override \\',
30
+ ' --type collapsible --position 4 --content "Machine washable, 30°C"',
31
+ '',
32
+ '# Create a new custom section',
33
+ '$ commerce section create --handle brand-story --operation-type new \\',
34
+ ' --type collapsible --position 8 --content "## Our Story\\n\\nFounded in 2020..."',
35
+ '',
36
+ '# Hide a system section',
37
+ '$ commerce section create --handle eco-friendly --operation-type hidden',
38
+ '',
39
+ '# Create section in a tab group',
40
+ '$ commerce section create --handle ingredients --operation-type new \\',
41
+ ' --type collapsible --position 5 --content "100% organic cotton" \\',
42
+ ' --tab-group product-info',
43
+ ],
44
+ output: {
45
+ example: JSON.stringify({
46
+ success: true,
47
+ data: {
48
+ id: 'customization-uuid',
49
+ merchant_id: 'merchant-uuid',
50
+ handle: 'care',
51
+ operation_type: 'override',
52
+ type: 'collapsible',
53
+ position: 4,
54
+ content: 'Machine washable, 30°C',
55
+ tab_group: null,
56
+ created_at: '2025-11-27T00:00:00Z',
57
+ updated_at: '2025-11-27T00:00:00Z',
58
+ },
59
+ message: '区块创建成功',
60
+ }, null, 2),
61
+ },
62
+ relatedCommands: [
63
+ { command: 'section list --resolved', description: 'View all sections' },
64
+ { command: 'section update', description: 'Update a section' },
65
+ { command: 'section hide', description: 'Quick hide a section' },
66
+ { command: 'section delete', description: 'Delete a customization' },
67
+ ],
68
+ notes: [
69
+ 'operation_type: override (modify system default), new (create custom), hidden (hide section)',
70
+ 'For hidden operation, only --handle and --operation-type are required',
71
+ 'System default sections: highlights, details, guarantee, care, shipping-policies, return, eco-friendly',
72
+ 'Content supports Markdown and template variables like {{product.name}}',
73
+ 'Use section hide command as a shortcut for hiding sections',
74
+ ],
75
+ });
76
+ export const createSectionCommand = cmd;
77
+ async function createSection(options) {
78
+ let { handle, operationType, type, position, content, tabGroup, inheritTranslations } = options;
79
+ // 非交互模式下验证必需参数
80
+ if (!isInteractiveEnvironment()) {
81
+ if (!handle || handle.trim().length === 0) {
82
+ throw new ValidationError('缺少必需参数: --handle (区块标识符)', 'handle');
83
+ }
84
+ if (!operationType || operationType.trim().length === 0) {
85
+ throw new ValidationError('缺少必需参数: --operation-type (操作类型: override | new | hidden)', 'operation_type');
86
+ }
87
+ // hidden 类型不需要其他参数
88
+ if (operationType !== 'hidden') {
89
+ if (!type || type.trim().length === 0) {
90
+ throw new ValidationError('缺少必需参数: --type (区块类型: collapsible | static)', 'type');
91
+ }
92
+ if (!position) {
93
+ throw new ValidationError('缺少必需参数: --position (显示位置)', 'position');
94
+ }
95
+ if (!content || content.trim().length === 0) {
96
+ throw new ValidationError('缺少必需参数: --content (区块内容)', 'content');
97
+ }
98
+ }
99
+ }
100
+ else {
101
+ // 交互模式:提示缺失的字段
102
+ const answers = await inquirer.prompt([
103
+ {
104
+ type: 'input',
105
+ name: 'handle',
106
+ message: '区块标识符 (handle):',
107
+ when: !handle,
108
+ validate: (input) => (input.trim().length > 0 ? true : '标识符不能为空'),
109
+ },
110
+ {
111
+ type: 'list',
112
+ name: 'operationType',
113
+ message: '操作类型:',
114
+ choices: [
115
+ { name: 'override - 覆盖系统默认', value: 'override' },
116
+ { name: 'new - 创建新区块', value: 'new' },
117
+ { name: 'hidden - 隐藏区块', value: 'hidden' },
118
+ ],
119
+ when: !operationType,
120
+ },
121
+ ]);
122
+ handle = handle || answers.handle;
123
+ operationType = operationType || answers.operationType;
124
+ // 如果不是 hidden,继续询问其他字段
125
+ if (operationType !== 'hidden') {
126
+ const moreAnswers = await inquirer.prompt([
127
+ {
128
+ type: 'list',
129
+ name: 'type',
130
+ message: '区块类型:',
131
+ choices: [
132
+ { name: 'collapsible - 可折叠', value: 'collapsible' },
133
+ { name: 'static - 静态', value: 'static' },
134
+ ],
135
+ when: !type,
136
+ },
137
+ {
138
+ type: 'number',
139
+ name: 'position',
140
+ message: '显示位置 (1-10):',
141
+ when: !position,
142
+ validate: (input) => (input > 0 ? true : '位置必须大于0'),
143
+ },
144
+ {
145
+ type: 'editor',
146
+ name: 'content',
147
+ message: '区块内容 (Markdown):',
148
+ when: !content,
149
+ },
150
+ ]);
151
+ type = type || moreAnswers.type;
152
+ position = position || moreAnswers.position?.toString();
153
+ content = content || moreAnswers.content;
154
+ }
155
+ }
156
+ // 验证 operationType
157
+ const validOperationTypes = ['override', 'new', 'hidden'];
158
+ if (!validOperationTypes.includes(operationType)) {
159
+ throw new ValidationError(`无效的操作类型: ${operationType}。有效值: ${validOperationTypes.join(', ')}`, 'operation_type');
160
+ }
161
+ // 验证 type(仅 override/new 需要)
162
+ if (operationType !== 'hidden') {
163
+ const validTypes = ['collapsible', 'static'];
164
+ if (!validTypes.includes(type)) {
165
+ throw new ValidationError(`无效的区块类型: ${type}。有效值: ${validTypes.join(', ')}`, 'type');
166
+ }
167
+ }
168
+ const spinner = output.spinner('正在创建区块...');
169
+ try {
170
+ const data = {
171
+ handle: handle,
172
+ operation_type: operationType,
173
+ };
174
+ if (operationType !== 'hidden') {
175
+ data.type = type;
176
+ data.position = parseInt(position, 10);
177
+ data.content = content;
178
+ }
179
+ if (tabGroup !== undefined) {
180
+ data.tab_group = tabGroup || null;
181
+ }
182
+ if (inheritTranslations !== undefined) {
183
+ data.inherit_translations = inheritTranslations;
184
+ }
185
+ const result = await commerceApi.productSections.merchant.create(data);
186
+ spinner.succeed('区块创建成功!');
187
+ if (output.isJson()) {
188
+ output.success(result, '区块创建成功');
189
+ }
190
+ else {
191
+ console.log();
192
+ console.log(chalk.green('✓ 区块创建成功!'));
193
+ console.log();
194
+ console.log(chalk.gray('ID: ') + chalk.cyan(result.id));
195
+ console.log(chalk.gray('Handle: ') + chalk.white(result.handle));
196
+ console.log(chalk.gray('操作类型: ') + chalk.white(result.operation_type));
197
+ if (result.type) {
198
+ console.log(chalk.gray('区块类型: ') + chalk.white(result.type));
199
+ }
200
+ if (result.position !== undefined) {
201
+ console.log(chalk.gray('位置: ') + chalk.white(result.position.toString()));
202
+ }
203
+ if (result.tab_group) {
204
+ console.log(chalk.gray('Tab分组: ') + chalk.white(result.tab_group));
205
+ }
206
+ if (result.content) {
207
+ const preview = result.content.length > 100 ? result.content.substring(0, 100) + '...' : result.content;
208
+ console.log(chalk.gray('内容: ') + chalk.white(preview));
209
+ }
210
+ console.log();
211
+ }
212
+ }
213
+ catch (error) {
214
+ spinner.fail('创建区块失败');
215
+ throw createApiError(error);
216
+ }
217
+ }
218
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/section/create.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;AAYtE,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC9B,WAAW,CAAC,4DAA4D,CAAC;KACzE,MAAM,CAAC,mBAAmB,EAAE,sCAAsC,CAAC;KACnE,MAAM,CAAC,yBAAyB,EAAE,oDAAoD,CAAC;KACvF,MAAM,CAAC,eAAe,EAAE,gEAAgE,CAAC;KACzF,MAAM,CAAC,gBAAgB,EAAE,8CAA8C,CAAC;KACxE,MAAM,CAAC,kBAAkB,EAAE,yDAAyD,CAAC;KACrF,MAAM,CAAC,qBAAqB,EAAE,0DAA0D,CAAC;KACzF,MAAM,CAAC,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AC,CAAC;QACvB,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare const deleteSectionCommand: Command;
3
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/section/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuDpC,eAAO,MAAM,oBAAoB,SAAM,CAAC"}