@youzan-cloud/zan-saas-cli 0.0.0-stage → 0.1.0-beta.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 (329) hide show
  1. package/DEPENDENCIES.json +50 -0
  2. package/INSTALL.md +79 -0
  3. package/LICENSE +21 -0
  4. package/NOTICE +1 -0
  5. package/README.md +151 -2
  6. package/THIRD_PARTY_NOTICES.txt +162 -0
  7. package/bin/zan-saas-cli.js +28 -0
  8. package/internal/registry/index.js +123 -0
  9. package/internal/registry/manifest.json +424 -0
  10. package/npm-shrinkwrap.json +86 -0
  11. package/package.json +33 -4
  12. package/skills/README.md +30 -0
  13. package/skills/zan-saas/SKILL.md +54 -0
  14. package/skills/zan-saas/references/host-entry.md +25 -0
  15. package/skills/zan-saas-access/SKILL.md +37 -0
  16. package/skills/zan-saas-access/references/role-list.md +11 -0
  17. package/skills/zan-saas-access/references/staff-perms-get.md +11 -0
  18. package/skills/zan-saas-aftersale/SKILL.md +31 -0
  19. package/skills/zan-saas-aftersale/references/case-list.md +13 -0
  20. package/skills/zan-saas-aftersale/references/case-scan.md +31 -0
  21. package/skills/zan-saas-benefit/SKILL.md +46 -0
  22. package/skills/zan-saas-benefit/references/card-get.md +7 -0
  23. package/skills/zan-saas-benefit/references/card-grant-list.md +11 -0
  24. package/skills/zan-saas-benefit/references/card-list.md +7 -0
  25. package/skills/zan-saas-benefit/references/customer-card-get.md +7 -0
  26. package/skills/zan-saas-benefit/references/customer-card-list.md +7 -0
  27. package/skills/zan-saas-coupon/SKILL.md +41 -0
  28. package/skills/zan-saas-coupon/references/activity-get.md +11 -0
  29. package/skills/zan-saas-coupon/references/activity-list.md +15 -0
  30. package/skills/zan-saas-coupon/references/voucher-get.md +13 -0
  31. package/skills/zan-saas-coupon/references/voucher-list.md +25 -0
  32. package/skills/zan-saas-customer/SKILL.md +73 -0
  33. package/skills/zan-saas-customer/references/customer-scan.md +11 -0
  34. package/skills/zan-saas-customer/references/segment-list.md +22 -0
  35. package/skills/zan-saas-fulfillment/SKILL.md +36 -0
  36. package/skills/zan-saas-fulfillment/references/delivery-get.md +11 -0
  37. package/skills/zan-saas-fulfillment/references/shipment-list.md +11 -0
  38. package/skills/zan-saas-fulfillment/references/waybill-get.md +9 -0
  39. package/skills/zan-saas-interaction/SKILL.md +37 -0
  40. package/skills/zan-saas-interaction/references/lottery-get.md +11 -0
  41. package/skills/zan-saas-interaction/references/lottery-list.md +19 -0
  42. package/skills/zan-saas-item/SKILL.md +61 -0
  43. package/skills/zan-saas-item/references/attribute-list.md +11 -0
  44. package/skills/zan-saas-item/references/brand-list.md +7 -0
  45. package/skills/zan-saas-item/references/classification-get.md +7 -0
  46. package/skills/zan-saas-item/references/classification-list.md +7 -0
  47. package/skills/zan-saas-item/references/group-list.md +9 -0
  48. package/skills/zan-saas-item/references/item-content.md +9 -0
  49. package/skills/zan-saas-item/references/item-get.md +9 -0
  50. package/skills/zan-saas-item/references/item-search.md +23 -0
  51. package/skills/zan-saas-item/references/product-identity.md +11 -0
  52. package/skills/zan-saas-member/SKILL.md +41 -0
  53. package/skills/zan-saas-member/references/customer-level-get.md +7 -0
  54. package/skills/zan-saas-member/references/growth-log-list.md +17 -0
  55. package/skills/zan-saas-member/references/membership-get.md +7 -0
  56. package/skills/zan-saas-order/SKILL.md +56 -0
  57. package/skills/zan-saas-order/references/order-get.md +26 -0
  58. package/skills/zan-saas-order/references/order-list.md +25 -0
  59. package/skills/zan-saas-order/references/order-scan.md +35 -0
  60. package/skills/zan-saas-org/SKILL.md +37 -0
  61. package/skills/zan-saas-org/references/staff-get.md +15 -0
  62. package/skills/zan-saas-org/references/staff-role-get.md +11 -0
  63. package/skills/zan-saas-org/references/unit-get.md +11 -0
  64. package/skills/zan-saas-org/references/unit-list.md +15 -0
  65. package/skills/zan-saas-points/SKILL.md +42 -0
  66. package/skills/zan-saas-points/references/account-get.md +7 -0
  67. package/skills/zan-saas-points/references/log-list.md +17 -0
  68. package/skills/zan-saas-points/references/rule-list.md +2 -0
  69. package/skills/zan-saas-privacy/SKILL.md +30 -0
  70. package/skills/zan-saas-privacy/references/field-decrypt.md +19 -0
  71. package/skills/zan-saas-shared/SKILL.md +94 -0
  72. package/skills/zan-saas-shared/references/authentication.md +52 -0
  73. package/skills/zan-saas-shared/references/value-processing.md +27 -0
  74. package/skills/zan-saas-stock/SKILL.md +28 -0
  75. package/skills/zan-saas-stock/references/log-list.md +11 -0
  76. package/skills/zan-saas-valuecard/SKILL.md +37 -0
  77. package/skills/zan-saas-valuecard/references/card-get.md +13 -0
  78. package/skills/zan-saas-valuecard/references/card-list.md +11 -0
  79. package/src/auth/browser.js +28 -0
  80. package/src/auth/callback-server.js +99 -0
  81. package/src/auth/config.js +53 -0
  82. package/src/auth/credential-store.js +109 -0
  83. package/src/auth/oauth-client.js +105 -0
  84. package/src/auth/pkce.js +28 -0
  85. package/src/auth/session.js +178 -0
  86. package/src/auth/tool.js +25 -0
  87. package/src/cli/command-paths.js +126 -0
  88. package/src/cli/context-help.js +102 -0
  89. package/src/cli/diagnostic-command.js +57 -0
  90. package/src/cli/domain-catalog.js +42 -0
  91. package/src/cli/help-text.js +32 -0
  92. package/src/cli/native-loader.js +120 -0
  93. package/src/cli/native-path.js +22 -0
  94. package/src/cli/parser-policy.js +141 -0
  95. package/src/cli/program.js +134 -0
  96. package/src/cli/skill-catalog.js +241 -0
  97. package/src/commands/native/access/commands.index.json +24 -0
  98. package/src/commands/native/access/domain.json +3 -0
  99. package/src/commands/native/access/role/list/command.js +141 -0
  100. package/src/commands/native/access/role/list/schema.json +393 -0
  101. package/src/commands/native/access/staff-perms/get/command.js +119 -0
  102. package/src/commands/native/access/staff-perms/get/schema.json +703 -0
  103. package/src/commands/native/aftersale/case/get/command.js +104 -0
  104. package/src/commands/native/aftersale/case/get/exact-json.js +52 -0
  105. package/src/commands/native/aftersale/case/get/money.js +28 -0
  106. package/src/commands/native/aftersale/case/get/projection.js +120 -0
  107. package/src/commands/native/aftersale/case/get/query.js +72 -0
  108. package/src/commands/native/aftersale/case/get/schema.json +134 -0
  109. package/src/commands/native/aftersale/case/list/command.js +135 -0
  110. package/src/commands/native/aftersale/case/list/schema.json +1095 -0
  111. package/src/commands/native/aftersale/case/scan/command.js +110 -0
  112. package/src/commands/native/aftersale/case/scan/query.js +62 -0
  113. package/src/commands/native/aftersale/case/scan/scan.js +78 -0
  114. package/src/commands/native/aftersale/case/scan/schema.json +964 -0
  115. package/src/commands/native/aftersale/case/scan/search.js +108 -0
  116. package/src/commands/native/aftersale/commands.index.json +42 -0
  117. package/src/commands/native/aftersale/domain.json +3 -0
  118. package/src/commands/native/aftersale/refund/list/command.js +97 -0
  119. package/src/commands/native/aftersale/refund/list/money.js +25 -0
  120. package/src/commands/native/aftersale/refund/list/projection.js +50 -0
  121. package/src/commands/native/aftersale/refund/list/query.js +73 -0
  122. package/src/commands/native/aftersale/refund/list/schema.json +130 -0
  123. package/src/commands/native/aftersale/shared/query.js +58 -0
  124. package/src/commands/native/aftersale/shared/search.js +128 -0
  125. package/src/commands/native/benefit/card-definition/get/command.js +110 -0
  126. package/src/commands/native/benefit/card-definition/get/schema.json +545 -0
  127. package/src/commands/native/benefit/card-definition/list/command.js +106 -0
  128. package/src/commands/native/benefit/card-definition/list/schema.json +690 -0
  129. package/src/commands/native/benefit/card-grant/list/command.js +135 -0
  130. package/src/commands/native/benefit/card-grant/list/schema.json +758 -0
  131. package/src/commands/native/benefit/commands.index.json +51 -0
  132. package/src/commands/native/benefit/customer-card/get/command.js +110 -0
  133. package/src/commands/native/benefit/customer-card/get/schema.json +340 -0
  134. package/src/commands/native/benefit/customer-card/list/command.js +103 -0
  135. package/src/commands/native/benefit/customer-card/list/schema.json +731 -0
  136. package/src/commands/native/benefit/domain.json +3 -0
  137. package/src/commands/native/coupon/activity/get/command.js +183 -0
  138. package/src/commands/native/coupon/activity/get/schema.json +624 -0
  139. package/src/commands/native/coupon/activity/list/command.js +169 -0
  140. package/src/commands/native/coupon/activity/list/schema.json +845 -0
  141. package/src/commands/native/coupon/commands.index.json +42 -0
  142. package/src/commands/native/coupon/domain.json +3 -0
  143. package/src/commands/native/coupon/shared/query.js +15 -0
  144. package/src/commands/native/coupon/voucher/get/command.js +113 -0
  145. package/src/commands/native/coupon/voucher/get/schema.json +147 -0
  146. package/src/commands/native/coupon/voucher/list/command.js +155 -0
  147. package/src/commands/native/coupon/voucher/list/schema.json +772 -0
  148. package/src/commands/native/customer/commands.index.json +96 -0
  149. package/src/commands/native/customer/customer/get/adapter.js +82 -0
  150. package/src/commands/native/customer/customer/get/command.js +106 -0
  151. package/src/commands/native/customer/customer/get/schema.json +958 -0
  152. package/src/commands/native/customer/customer/list/command.js +78 -0
  153. package/src/commands/native/customer/customer/list/input.js +145 -0
  154. package/src/commands/native/customer/customer/list/query.js +103 -0
  155. package/src/commands/native/customer/customer/list/schema.json +969 -0
  156. package/src/commands/native/customer/customer/scan/command.js +80 -0
  157. package/src/commands/native/customer/customer/scan/scan.js +92 -0
  158. package/src/commands/native/customer/customer/scan/schema.json +211 -0
  159. package/src/commands/native/customer/customer-tag/get/command.js +166 -0
  160. package/src/commands/native/customer/customer-tag/get/schema.json +317 -0
  161. package/src/commands/native/customer/customer-tag/list/command.js +143 -0
  162. package/src/commands/native/customer/customer-tag/list/schema.json +259 -0
  163. package/src/commands/native/customer/domain.json +3 -0
  164. package/src/commands/native/customer/segment/list/command.js +96 -0
  165. package/src/commands/native/customer/segment/list/query.js +98 -0
  166. package/src/commands/native/customer/segment/list/schema.json +135 -0
  167. package/src/commands/native/customer/segment-customer/list/command.js +171 -0
  168. package/src/commands/native/customer/segment-customer/list/schema.json +123 -0
  169. package/src/commands/native/customer/shared/search-input.js +179 -0
  170. package/src/commands/native/customer/shared/search-page.js +54 -0
  171. package/src/commands/native/customer/tag/get/command.js +73 -0
  172. package/src/commands/native/customer/tag/get/schema.json +339 -0
  173. package/src/commands/native/customer/tagcategory/get/command.js +80 -0
  174. package/src/commands/native/customer/tagcategory/get/query.js +98 -0
  175. package/src/commands/native/customer/tagcategory/get/schema.json +339 -0
  176. package/src/commands/native/customer/tagcategory/list/command.js +127 -0
  177. package/src/commands/native/customer/tagcategory/list/schema.json +394 -0
  178. package/src/commands/native/fulfillment/commands.index.json +33 -0
  179. package/src/commands/native/fulfillment/delivery/get/command.js +107 -0
  180. package/src/commands/native/fulfillment/delivery/get/projection.js +142 -0
  181. package/src/commands/native/fulfillment/delivery/get/schema.json +173 -0
  182. package/src/commands/native/fulfillment/domain.json +3 -0
  183. package/src/commands/native/fulfillment/shipment/list/command.js +83 -0
  184. package/src/commands/native/fulfillment/shipment/list/projection.js +130 -0
  185. package/src/commands/native/fulfillment/shipment/list/schema.json +752 -0
  186. package/src/commands/native/fulfillment/waybill/get/command.js +193 -0
  187. package/src/commands/native/fulfillment/waybill/get/response.js +68 -0
  188. package/src/commands/native/fulfillment/waybill/get/schema.json +190 -0
  189. package/src/commands/native/interaction/commands.index.json +24 -0
  190. package/src/commands/native/interaction/domain.json +3 -0
  191. package/src/commands/native/interaction/lottery/get/command.js +61 -0
  192. package/src/commands/native/interaction/lottery/get/query.js +152 -0
  193. package/src/commands/native/interaction/lottery/get/schema.json +1004 -0
  194. package/src/commands/native/interaction/lottery/list/command.js +176 -0
  195. package/src/commands/native/interaction/lottery/list/schema.json +898 -0
  196. package/src/commands/native/item/attribute/list/command.js +122 -0
  197. package/src/commands/native/item/attribute/list/schema.json +727 -0
  198. package/src/commands/native/item/brand/list/command.js +114 -0
  199. package/src/commands/native/item/brand/list/schema.json +725 -0
  200. package/src/commands/native/item/classification/get/command.js +87 -0
  201. package/src/commands/native/item/classification/get/schema.json +596 -0
  202. package/src/commands/native/item/classification/list/command.js +105 -0
  203. package/src/commands/native/item/classification/list/schema.json +676 -0
  204. package/src/commands/native/item/commands.index.json +87 -0
  205. package/src/commands/native/item/domain.json +1 -0
  206. package/src/commands/native/item/group/list/command.js +122 -0
  207. package/src/commands/native/item/group/list/schema.json +809 -0
  208. package/src/commands/native/item/item/get/command.js +122 -0
  209. package/src/commands/native/item/item/get/schema.json +3799 -0
  210. package/src/commands/native/item/item/list/command.js +7 -0
  211. package/src/commands/native/item/item/list/schema.json +1118 -0
  212. package/src/commands/native/item/item/scan/command.js +7 -0
  213. package/src/commands/native/item/item/scan/schema.json +1046 -0
  214. package/src/commands/native/item/item-content/get/command.js +54 -0
  215. package/src/commands/native/item/item-content/get/schema.json +677 -0
  216. package/src/commands/native/item/shared/api.js +31 -0
  217. package/src/commands/native/item/shared/content.js +20 -0
  218. package/src/commands/native/item/shared/diagnostics.js +61 -0
  219. package/src/commands/native/item/shared/h5.js +63 -0
  220. package/src/commands/native/item/shared/identity.js +62 -0
  221. package/src/commands/native/item/shared/normalize.js +49 -0
  222. package/src/commands/native/item/shared/scope.js +22 -0
  223. package/src/commands/native/item/shared/search-command.js +61 -0
  224. package/src/commands/native/item/shared/search-options.js +150 -0
  225. package/src/commands/native/item/shared/search.js +158 -0
  226. package/src/commands/native/member/commands.index.json +60 -0
  227. package/src/commands/native/member/customer-level/get/command.js +122 -0
  228. package/src/commands/native/member/customer-level/get/schema.json +300 -0
  229. package/src/commands/native/member/domain.json +3 -0
  230. package/src/commands/native/member/growth/get/command.js +64 -0
  231. package/src/commands/native/member/growth/get/schema.json +283 -0
  232. package/src/commands/native/member/growth-log/list/command.js +203 -0
  233. package/src/commands/native/member/growth-log/list/schema.json +695 -0
  234. package/src/commands/native/member/level/get/command.js +70 -0
  235. package/src/commands/native/member/level/get/query.js +125 -0
  236. package/src/commands/native/member/level/get/schema.json +339 -0
  237. package/src/commands/native/member/level/list/command.js +50 -0
  238. package/src/commands/native/member/level/list/query.js +109 -0
  239. package/src/commands/native/member/level/list/schema.json +104 -0
  240. package/src/commands/native/member/membership/get/command.js +78 -0
  241. package/src/commands/native/member/membership/get/schema.json +283 -0
  242. package/src/commands/native/order/commands.index.json +33 -0
  243. package/src/commands/native/order/domain.json +3 -0
  244. package/src/commands/native/order/order/get/command.js +155 -0
  245. package/src/commands/native/order/order/get/schema.json +1167 -0
  246. package/src/commands/native/order/order/list/command.js +230 -0
  247. package/src/commands/native/order/order/list/schema.json +1363 -0
  248. package/src/commands/native/order/order/scan/command.js +148 -0
  249. package/src/commands/native/order/order/scan/scan.js +89 -0
  250. package/src/commands/native/order/order/scan/schema.json +1445 -0
  251. package/src/commands/native/order/shared/projection.js +183 -0
  252. package/src/commands/native/order/shared/query.js +84 -0
  253. package/src/commands/native/order/shared/search.js +112 -0
  254. package/src/commands/native/org/commands.index.json +42 -0
  255. package/src/commands/native/org/domain.json +3 -0
  256. package/src/commands/native/org/shared/single-staff.js +115 -0
  257. package/src/commands/native/org/staff/get/command.js +148 -0
  258. package/src/commands/native/org/staff/get/schema.json +114 -0
  259. package/src/commands/native/org/staff-role/get/command.js +45 -0
  260. package/src/commands/native/org/staff-role/get/schema.json +93 -0
  261. package/src/commands/native/org/unit/get/command.js +131 -0
  262. package/src/commands/native/org/unit/get/schema.json +478 -0
  263. package/src/commands/native/org/unit/list/command.js +187 -0
  264. package/src/commands/native/org/unit/list/schema.json +828 -0
  265. package/src/commands/native/points/account/get/command.js +65 -0
  266. package/src/commands/native/points/account/get/schema.json +303 -0
  267. package/src/commands/native/points/commands.index.json +33 -0
  268. package/src/commands/native/points/domain.json +3 -0
  269. package/src/commands/native/points/log/list/command.js +141 -0
  270. package/src/commands/native/points/log/list/schema.json +761 -0
  271. package/src/commands/native/points/rule/list/command.js +82 -0
  272. package/src/commands/native/points/rule/list/schema.json +294 -0
  273. package/src/commands/native/privacy/commands.index.json +15 -0
  274. package/src/commands/native/privacy/domain.json +3 -0
  275. package/src/commands/native/privacy/field/decrypt/command.js +185 -0
  276. package/src/commands/native/privacy/field/decrypt/schema.json +656 -0
  277. package/src/commands/native/privacy/shared/order-source.js +33 -0
  278. package/src/commands/native/stock/commands.index.json +15 -0
  279. package/src/commands/native/stock/domain.json +3 -0
  280. package/src/commands/native/stock/log/list/command.js +207 -0
  281. package/src/commands/native/stock/log/list/schema.json +922 -0
  282. package/src/commands/native/valuecard/card/get/command.js +107 -0
  283. package/src/commands/native/valuecard/card/get/schema.json +683 -0
  284. package/src/commands/native/valuecard/card/list/command.js +136 -0
  285. package/src/commands/native/valuecard/card/list/pagination.js +23 -0
  286. package/src/commands/native/valuecard/card/list/schema.json +780 -0
  287. package/src/commands/native/valuecard/commands.index.json +24 -0
  288. package/src/commands/native/valuecard/domain.json +3 -0
  289. package/src/commands/native/valuecard/shared/projection.js +57 -0
  290. package/src/commands/system/api.js +47 -0
  291. package/src/commands/system/auth.js +118 -0
  292. package/src/commands/system/contracts.js +373 -0
  293. package/src/commands/system/doctor.js +24 -0
  294. package/src/commands/system/install.js +41 -0
  295. package/src/commands/system/printer.js +16 -0
  296. package/src/commands/system/schema.js +162 -0
  297. package/src/commands/system/shop-guidance.js +9 -0
  298. package/src/commands/system/shop.js +237 -0
  299. package/src/commands/system/skills.js +49 -0
  300. package/src/execution/beijing-date-time.js +29 -0
  301. package/src/execution/beijing-time.js +21 -0
  302. package/src/execution/bounded-input.js +42 -0
  303. package/src/execution/command-io.js +137 -0
  304. package/src/execution/command-policy.js +41 -0
  305. package/src/execution/command-schema.js +131 -0
  306. package/src/execution/datetime.js +83 -0
  307. package/src/execution/error-details.js +399 -0
  308. package/src/execution/error-model.js +82 -0
  309. package/src/execution/exact-json.js +80 -0
  310. package/src/execution/list-total.js +10 -0
  311. package/src/execution/money.js +59 -0
  312. package/src/execution/parser-error.js +66 -0
  313. package/src/execution/privacy.js +197 -0
  314. package/src/execution/public-schema.js +52 -0
  315. package/src/execution/query-api.js +101 -0
  316. package/src/execution/range.js +84 -0
  317. package/src/execution/request-state.js +55 -0
  318. package/src/execution/schema-completeness.js +116 -0
  319. package/src/execution/shop-query.js +54 -0
  320. package/src/execution/target-shop-default.js +23 -0
  321. package/src/execution/target-shop.js +49 -0
  322. package/src/identity/context-store.js +54 -0
  323. package/src/identity/context.js +38 -0
  324. package/src/installation/install.js +158 -0
  325. package/src/installation/npm-error.js +93 -0
  326. package/src/installation/skill.js +113 -0
  327. package/src/transport/account-api.js +152 -0
  328. package/src/transport/api.js +199 -0
  329. package/src/transport/shop-app.js +63 -0
@@ -0,0 +1,845 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "input": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "kdtId",
8
+ "form",
9
+ "stage",
10
+ "pageNo",
11
+ "pageSize"
12
+ ],
13
+ "properties": {
14
+ "kdtId": {
15
+ "$ref": "#/definitions/positiveInteger"
16
+ },
17
+ "form": {
18
+ "enum": [
19
+ "card",
20
+ "code"
21
+ ],
22
+ "description": "card 优惠卡券;code 优惠码,分别分页。"
23
+ },
24
+ "keyword": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]+$",
28
+ "description": "活动名称关键词,首尾去空白;不承诺精确匹配。"
29
+ },
30
+ "stage": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 4,
34
+ "description": "0 全部;1 未开始;2 进行中;3 已结束;4 未结束,含未开始与进行中。"
35
+ },
36
+ "displayType": {
37
+ "type": "integer",
38
+ "minimum": 1,
39
+ "maximum": 7,
40
+ "description": "1 满减券;2 折扣券;3 随机金额券;4 商品兑换券;5 社区团购券;6 通用码;7 一卡一码。不猜组合限制。"
41
+ },
42
+ "pageNo": {
43
+ "type": "integer",
44
+ "minimum": 1,
45
+ "maximum": 500,
46
+ "description": "指定页码,不自动翻页。"
47
+ },
48
+ "pageSize": {
49
+ "type": "integer",
50
+ "minimum": 1,
51
+ "maximum": 20,
52
+ "description": "单页容量。"
53
+ },
54
+ "createdAt": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "minProperties": 1,
58
+ "properties": {
59
+ "start": {
60
+ "type": "string",
61
+ "format": "beijing-date-time-ms",
62
+ "description": "窗口起点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
63
+ },
64
+ "end": {
65
+ "type": "string",
66
+ "format": "beijing-date-time-ms",
67
+ "description": "窗口终点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
68
+ }
69
+ },
70
+ "description": "--created-at \"START..END\" 解析后的活动创建时间窗口;可省略一端,两端齐备时开始须早于结束。毫秒精度,不承诺端点包含性。"
71
+ }
72
+ },
73
+ "description": "CLI 解析参数并补全上下文后的业务输入,不是直接接收的 JSON;调用签名和默认值见 options。"
74
+ },
75
+ "output": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "data"
80
+ ],
81
+ "properties": {
82
+ "data": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": [
86
+ "activities",
87
+ "pagination"
88
+ ],
89
+ "properties": {
90
+ "activities": {
91
+ "type": "array",
92
+ "maxItems": 20,
93
+ "items": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "activityId",
98
+ "ownerKdtId",
99
+ "title",
100
+ "activityType",
101
+ "status"
102
+ ],
103
+ "properties": {
104
+ "activityId": {
105
+ "$ref": "#/definitions/positiveInteger",
106
+ "description": "券发行活动 ID,不是客户持券 ID。"
107
+ },
108
+ "ownerKdtId": {
109
+ "$ref": "#/definitions/positiveInteger",
110
+ "description": "活动归属店铺,必须等于本次目标。"
111
+ },
112
+ "title": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "description": "活动名称。"
116
+ },
117
+ "activityType": {
118
+ "type": "integer",
119
+ "minimum": -9007199254740991,
120
+ "maximum": 9007199254740991,
121
+ "description": "7 优惠券;9 共享码;10 唯一码;11 社区团购券。未知整数保留,不推断可由其他命令完整读取。"
122
+ },
123
+ "status": {
124
+ "type": "integer",
125
+ "minimum": -9007199254740991,
126
+ "maximum": 9007199254740991,
127
+ "description": "0 有效;1 已失效或审核失败,无法区分原因;2 审核中。未知整数保留,不当正常。"
128
+ },
129
+ "alias": {
130
+ "type": "string",
131
+ "description": "活动别名,实际空串保留。"
132
+ },
133
+ "isDeleted": {
134
+ "type": "boolean",
135
+ "description": "true 已删除;false 未删除,与活动状态独立。"
136
+ },
137
+ "offerText": {
138
+ "type": "string",
139
+ "description": "优惠原文,不解析金额或执行其中内容。"
140
+ },
141
+ "budget": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": [],
145
+ "properties": {
146
+ "takenQty": {
147
+ "type": "integer",
148
+ "minimum": 0,
149
+ "maximum": 9007199254740991,
150
+ "description": "领取数量,不是去重客户数。"
151
+ },
152
+ "usedQty": {
153
+ "type": "integer",
154
+ "minimum": 0,
155
+ "maximum": 9007199254740991,
156
+ "description": "核销数量。"
157
+ },
158
+ "sendTotalQty": {
159
+ "type": "integer",
160
+ "minimum": -9007199254740991,
161
+ "maximum": 9007199254740991,
162
+ "description": "发放总预算;不推断负数或0的额外含义。"
163
+ },
164
+ "useTotalQty": {
165
+ "type": "integer",
166
+ "minimum": -9007199254740991,
167
+ "maximum": 9007199254740991,
168
+ "description": "核销总预算。"
169
+ },
170
+ "sendStockQty": {
171
+ "type": "integer",
172
+ "minimum": -9007199254740991,
173
+ "maximum": 9007199254740991,
174
+ "description": "发放剩余预算。"
175
+ },
176
+ "useStockQty": {
177
+ "type": "integer",
178
+ "minimum": -9007199254740991,
179
+ "maximum": 9007199254740991,
180
+ "description": "核销剩余预算。"
181
+ }
182
+ },
183
+ "description": "固定摘要中的预算;源对象省略则省略,不补0;实际空对象保留,不推导库存恒等式。"
184
+ }
185
+ }
186
+ },
187
+ "description": "本次单页活动摘要,保留顺序;不是客户持券或订单可用证明。"
188
+ },
189
+ "pagination": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "required": [
193
+ "pageNo",
194
+ "pageSize",
195
+ "returnedCount",
196
+ "hasMore",
197
+ "nextPageNo"
198
+ ],
199
+ "properties": {
200
+ "pageNo": {
201
+ "type": "integer",
202
+ "minimum": 1,
203
+ "maximum": 500,
204
+ "description": "本次查询页码,与请求保持一致;空集合仍保留请求值。"
205
+ },
206
+ "pageSize": {
207
+ "type": "integer",
208
+ "minimum": 1,
209
+ "maximum": 20,
210
+ "description": "本次查询容量,与请求保持一致;空集合仍保留请求值。"
211
+ },
212
+ "total": {
213
+ "type": "integer",
214
+ "minimum": 0,
215
+ "maximum": 9007199254740991,
216
+ "description": "匹配本次查询条件的总记录数,不是当前页返回条数;上游未提供可确认总数时省略。"
217
+ },
218
+ "returnedCount": {
219
+ "type": "integer",
220
+ "minimum": 0,
221
+ "maximum": 20,
222
+ "description": "本页活动数量,不超过容量和报告总量。"
223
+ },
224
+ "hasMore": {
225
+ "type": ["boolean", "null"],
226
+ "description": "true 表示还有后续页,false 表示已确认没有后续页;无法确定时为 null,不以空页或短页推算。"
227
+ },
228
+ "nextPageNo": {
229
+ "anyOf": [
230
+ {
231
+ "type": "integer",
232
+ "minimum": 1,
233
+ "maximum": 500
234
+ },
235
+ {
236
+ "type": "null"
237
+ }
238
+ ],
239
+ "description": "已确认且未超过页码上限的下一页;无法确认或到达上限时为 null。"
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "preview": {
248
+ "type": "object",
249
+ "additionalProperties": false,
250
+ "required": [
251
+ "scope",
252
+ "prerequisites",
253
+ "requests"
254
+ ],
255
+ "properties": {
256
+ "scope": {
257
+ "$ref": "#/definitions/scope"
258
+ },
259
+ "prerequisites": {
260
+ "type": "array",
261
+ "items": {
262
+ "enum": [
263
+ "context",
264
+ "token-shop-binding"
265
+ ]
266
+ },
267
+ "minItems": 2,
268
+ "maxItems": 2
269
+ },
270
+ "requests": {
271
+ "type": "array",
272
+ "minItems": 2,
273
+ "maxItems": 2,
274
+ "items": [
275
+ {
276
+ "type": "object",
277
+ "additionalProperties": false,
278
+ "required": [
279
+ "method",
280
+ "api",
281
+ "body"
282
+ ],
283
+ "properties": {
284
+ "method": {
285
+ "const": "POST"
286
+ },
287
+ "api": {
288
+ "const": "youzan.shop.basic.get/3.0.0"
289
+ },
290
+ "body": {
291
+ "type": "object",
292
+ "additionalProperties": false,
293
+ "required": [],
294
+ "properties": {}
295
+ }
296
+ }
297
+ },
298
+ {
299
+ "type": "object",
300
+ "additionalProperties": false,
301
+ "required": [
302
+ "method",
303
+ "api",
304
+ "body"
305
+ ],
306
+ "properties": {
307
+ "method": {
308
+ "const": "POST"
309
+ },
310
+ "api": {
311
+ "const": "youzan.ump.voucheractivity.manage.info.search/1.0.1"
312
+ },
313
+ "body": {
314
+ "type": "object",
315
+ "additionalProperties": false,
316
+ "required": [
317
+ "activity_type_group",
318
+ "time_line_status",
319
+ "page_no",
320
+ "page_size"
321
+ ],
322
+ "properties": {
323
+ "activity_type_group": {
324
+ "enum": [
325
+ 1,
326
+ 2
327
+ ]
328
+ },
329
+ "time_line_status": {
330
+ "type": "integer",
331
+ "minimum": 0,
332
+ "maximum": 4
333
+ },
334
+ "page_no": {
335
+ "type": "integer",
336
+ "minimum": 1,
337
+ "maximum": 500
338
+ },
339
+ "page_size": {
340
+ "type": "integer",
341
+ "minimum": 1,
342
+ "maximum": 20
343
+ },
344
+ "title_keyword": {
345
+ "type": "string",
346
+ "minLength": 1
347
+ },
348
+ "activity_display_type": {
349
+ "type": "integer",
350
+ "minimum": 1,
351
+ "maximum": 7
352
+ },
353
+ "create_begin_time": {
354
+ "type": "integer",
355
+ "minimum": -9007199254740991,
356
+ "maximum": 9007199254740991
357
+ },
358
+ "create_end_time": {
359
+ "type": "integer",
360
+ "minimum": -9007199254740991,
361
+ "maximum": 9007199254740991
362
+ }
363
+ }
364
+ }
365
+ }
366
+ }
367
+ ],
368
+ "additionalItems": false
369
+ }
370
+ }
371
+ },
372
+ "error": {
373
+ "type": "object",
374
+ "required": [
375
+ "success",
376
+ "code",
377
+ "message",
378
+ "details"
379
+ ],
380
+ "additionalProperties": false,
381
+ "properties": {
382
+ "success": {
383
+ "const": false
384
+ },
385
+ "code": {
386
+ "const": -10001
387
+ },
388
+ "message": {
389
+ "type": "string",
390
+ "minLength": 1
391
+ },
392
+ "details": {
393
+ "type": "object",
394
+ "additionalProperties": false,
395
+ "required": [
396
+ "category",
397
+ "stage",
398
+ "command",
399
+ "targetScope",
400
+ "requestState",
401
+ "nextStep",
402
+ "errorVersion",
403
+ "recovery",
404
+ "execution"
405
+ ],
406
+ "properties": {
407
+ "category": {
408
+ "enum": [
409
+ "parameter",
410
+ "validation",
411
+ "configuration",
412
+ "permission",
413
+ "authentication",
414
+ "scope_unresolved",
415
+ "transport",
416
+ "http",
417
+ "protocol",
418
+ "business_rejected",
419
+ "not_found"
420
+ ]
421
+ },
422
+ "stage": {
423
+ "enum": [
424
+ "input",
425
+ "configuration",
426
+ "shop-binding",
427
+ "query",
428
+ "response"
429
+ ]
430
+ },
431
+ "command": {
432
+ "const": "coupon.activity.list"
433
+ },
434
+ "targetScope": {
435
+ "type": "object",
436
+ "additionalProperties": false,
437
+ "properties": {
438
+ "kdtId": {
439
+ "$ref": "#/definitions/positiveInteger"
440
+ }
441
+ }
442
+ },
443
+ "requestState": {
444
+ "enum": [
445
+ "not_sent",
446
+ "sent",
447
+ "unknown"
448
+ ]
449
+ },
450
+ "nextStep": {
451
+ "type": "string",
452
+ "minLength": 1
453
+ },
454
+ "api": {
455
+ "type": "string"
456
+ },
457
+ "httpStatus": {
458
+ "type": "integer",
459
+ "minimum": 100,
460
+ "maximum": 599
461
+ },
462
+ "businessCode": {
463
+ "$ref": "#/definitions/diagnosticCode"
464
+ },
465
+ "gatewayCode": {
466
+ "$ref": "#/definitions/diagnosticCode"
467
+ },
468
+ "trace_id": {
469
+ "type": "string",
470
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
471
+ },
472
+ "request_id": {
473
+ "type": "string",
474
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
475
+ },
476
+ "errorVersion": {
477
+ "const": 2,
478
+ "description": "本命令采用错误诊断协议第二版。"
479
+ },
480
+ "issues": {
481
+ "type": "array",
482
+ "minItems": 1,
483
+ "maxItems": 16,
484
+ "items": {
485
+ "$ref": "#/definitions/diagnosticIssue"
486
+ },
487
+ "description": "最多十六个已定位问题,不包含收到的原值。"
488
+ },
489
+ "issuesTruncated": {
490
+ "const": true,
491
+ "description": "问题超过返回上限,当前列表没有穷尽全部问题。"
492
+ },
493
+ "recovery": {
494
+ "$ref": "#/definitions/diagnosticRecovery",
495
+ "description": "受限的恢复说明,不会自动执行。"
496
+ },
497
+ "execution": {
498
+ "$ref": "#/definitions/diagnosticExecution",
499
+ "description": "整次调用的请求观察,独立于失败阶段的 requestState。"
500
+ }
501
+ }
502
+ }
503
+ }
504
+ },
505
+ "definitions": {
506
+ "positiveInteger": {
507
+ "type": "integer",
508
+ "minimum": 1,
509
+ "maximum": 9007199254740991
510
+ },
511
+ "scope": {
512
+ "type": "object",
513
+ "required": [
514
+ "kdtId"
515
+ ],
516
+ "additionalProperties": false,
517
+ "properties": {
518
+ "kdtId": {
519
+ "$ref": "#/definitions/positiveInteger"
520
+ }
521
+ }
522
+ },
523
+ "diagnosticCode": {
524
+ "oneOf": [
525
+ {
526
+ "type": "integer",
527
+ "minimum": -9007199254740991,
528
+ "maximum": 9007199254740991
529
+ },
530
+ {
531
+ "type": "string",
532
+ "pattern": "^-?\\d{1,12}$"
533
+ }
534
+ ]
535
+ },
536
+ "diagnosticExpected": {
537
+ "type": "object",
538
+ "additionalProperties": false,
539
+ "required": [],
540
+ "properties": {
541
+ "type": {
542
+ "anyOf": [
543
+ {
544
+ "type": "string",
545
+ "description": "预期的 JSON 类型。"
546
+ },
547
+ {
548
+ "type": "array",
549
+ "items": {
550
+ "type": "string",
551
+ "description": "预期的 JSON 类型。"
552
+ }
553
+ }
554
+ ],
555
+ "description": "同版模型允许的类型。"
556
+ },
557
+ "enum": {
558
+ "type": "array",
559
+ "items": {
560
+ "anyOf": [
561
+ {
562
+ "type": "string"
563
+ },
564
+ {
565
+ "type": "number"
566
+ },
567
+ {
568
+ "type": "boolean"
569
+ },
570
+ {
571
+ "type": "null"
572
+ }
573
+ ],
574
+ "description": "契约声明的静态标量约束。"
575
+ },
576
+ "description": "同版模型允许的静态值。"
577
+ },
578
+ "const": {
579
+ "anyOf": [
580
+ {
581
+ "type": "string"
582
+ },
583
+ {
584
+ "type": "number"
585
+ },
586
+ {
587
+ "type": "boolean"
588
+ },
589
+ {
590
+ "type": "null"
591
+ }
592
+ ],
593
+ "description": "契约声明的静态标量约束。"
594
+ },
595
+ "minimum": {
596
+ "type": "number",
597
+ "description": "包含的最小值。"
598
+ },
599
+ "maximum": {
600
+ "type": "number",
601
+ "description": "包含的最大值。"
602
+ },
603
+ "exclusiveMinimum": {
604
+ "type": "number",
605
+ "description": "不包含的最小值。"
606
+ },
607
+ "exclusiveMaximum": {
608
+ "type": "number",
609
+ "description": "不包含的最大值。"
610
+ },
611
+ "minLength": {
612
+ "type": "integer",
613
+ "description": "最少字符数。"
614
+ },
615
+ "maxLength": {
616
+ "type": "integer",
617
+ "description": "最多字符数。"
618
+ },
619
+ "minItems": {
620
+ "type": "integer",
621
+ "description": "最少元素数。"
622
+ },
623
+ "maxItems": {
624
+ "type": "integer",
625
+ "description": "最多元素数。"
626
+ },
627
+ "format": {
628
+ "type": "string",
629
+ "description": "同版模型声明的格式。"
630
+ },
631
+ "pattern": {
632
+ "type": "string",
633
+ "description": "同版模型声明的字符约束。"
634
+ },
635
+ "additionalProperties": {
636
+ "const": false,
637
+ "description": "对象拒绝契约以外的属性。"
638
+ },
639
+ "contains": {
640
+ "type": "object",
641
+ "additionalProperties": false,
642
+ "required": [
643
+ "const"
644
+ ],
645
+ "properties": {
646
+ "const": {
647
+ "anyOf": [
648
+ {
649
+ "type": "string"
650
+ },
651
+ {
652
+ "type": "number"
653
+ },
654
+ {
655
+ "type": "boolean"
656
+ },
657
+ {
658
+ "type": "null"
659
+ }
660
+ ],
661
+ "description": "契约声明的静态标量约束。"
662
+ }
663
+ }
664
+ },
665
+ "items": {
666
+ "type": "object",
667
+ "additionalProperties": false,
668
+ "required": [
669
+ "enum"
670
+ ],
671
+ "properties": {
672
+ "enum": {
673
+ "type": "array",
674
+ "items": {
675
+ "anyOf": [
676
+ {
677
+ "type": "string"
678
+ },
679
+ {
680
+ "type": "number"
681
+ },
682
+ {
683
+ "type": "boolean"
684
+ },
685
+ {
686
+ "type": "null"
687
+ }
688
+ ],
689
+ "description": "契约声明的静态标量约束。"
690
+ },
691
+ "description": "元素允许的静态值。"
692
+ }
693
+ }
694
+ }
695
+ }
696
+ },
697
+ "diagnosticIssue": {
698
+ "type": "object",
699
+ "additionalProperties": false,
700
+ "required": [
701
+ "source",
702
+ "reason"
703
+ ],
704
+ "properties": {
705
+ "source": {
706
+ "enum": [
707
+ "argv",
708
+ "input",
709
+ "context",
710
+ "output",
711
+ "preview"
712
+ ],
713
+ "description": "问题所属的参数、输入、上下文、结果或预览模型。"
714
+ },
715
+ "path": {
716
+ "type": "string",
717
+ "description": "对应模型中的 JSON Pointer;不含原始输入或动态字典键。"
718
+ },
719
+ "option": {
720
+ "type": "string",
721
+ "description": "可定位时给出的已注册 CLI 选项。"
722
+ },
723
+ "reason": {
724
+ "enum": [
725
+ "required",
726
+ "invalid_type",
727
+ "invalid_choice",
728
+ "out_of_range",
729
+ "invalid_format",
730
+ "conditional_required",
731
+ "constraint",
732
+ "unexpected_property",
733
+ "unknown_option",
734
+ "unknown_command",
735
+ "excess_arguments",
736
+ "missing_value"
737
+ ],
738
+ "description": "字段违反的约束类型,原始值不回显。"
739
+ },
740
+ "expected": {
741
+ "$ref": "#/definitions/diagnosticExpected",
742
+ "description": "同版契约的静态预期。"
743
+ },
744
+ "relatedPaths": {
745
+ "type": "array",
746
+ "items": {
747
+ "type": "string",
748
+ "description": "关联字段的 JSON Pointer。"
749
+ },
750
+ "description": "触发条件约束的关联字段。"
751
+ }
752
+ }
753
+ },
754
+ "diagnosticRecovery": {
755
+ "type": "object",
756
+ "additionalProperties": false,
757
+ "required": [
758
+ "action",
759
+ "automaticBusinessRetry"
760
+ ],
761
+ "properties": {
762
+ "action": {
763
+ "enum": [
764
+ "correct_input",
765
+ "complete_authentication",
766
+ "request_access_review",
767
+ "stop_and_inspect"
768
+ ],
769
+ "description": "依次表示修正本地输入、补认证、核对权限或停止核查;仅是说明,不执行操作或授予权限。"
770
+ },
771
+ "automaticBusinessRetry": {
772
+ "const": false,
773
+ "description": "不据此自动重放业务请求。"
774
+ }
775
+ }
776
+ },
777
+ "diagnosticExecution": {
778
+ "type": "object",
779
+ "additionalProperties": false,
780
+ "required": [
781
+ "requestState",
782
+ "coverage",
783
+ "observedAttempts"
784
+ ],
785
+ "properties": {
786
+ "requestState": {
787
+ "enum": [
788
+ "not_sent",
789
+ "sent",
790
+ "unknown"
791
+ ],
792
+ "description": "整次调用尚未发送、已有发送记录或无法排除未知请求;不代表业务完成。"
793
+ },
794
+ "coverage": {
795
+ "enum": [
796
+ "complete",
797
+ "partial"
798
+ ],
799
+ "description": "请求观察覆盖全部已接入路径,或存在未观测路径;部分覆盖不能声明零请求。"
800
+ },
801
+ "observedAttempts": {
802
+ "type": "integer",
803
+ "minimum": 0,
804
+ "maximum": 9007199254740991,
805
+ "description": "本地已进入发送边界的观测次数下界,不是服务端执行次数。"
806
+ }
807
+ }
808
+ }
809
+ },
810
+ "modules": {
811
+ "activities": {
812
+ "base": true,
813
+ "upstreamPath": "data",
814
+ "required": true,
815
+ "description": "固定活动摘要及已返回的预算计数,可选字段缺失保持省略。"
816
+ },
817
+ "pagination": {
818
+ "base": true,
819
+ "upstreamPath": "$",
820
+ "required": true,
821
+ "description": "根分页信息,与请求一致;空页不表示全集为空。"
822
+ }
823
+ },
824
+ "api": {
825
+ "method": "POST",
826
+ "path": "youzan.ump.voucheractivity.manage.info.search/1.0.1"
827
+ },
828
+ "success": {
829
+ "description": "同归属店铺的本页活动摘要及分页满足契约后整体成功;空列表与失败严格区分。"
830
+ },
831
+ "errors": {
832
+ "description": "失败 stdout 为空,stderr 为一份脱敏错误 JSON,退出码非零;不返回部分成功,不自动重试、切换身份或目标。按 error 模型及安全下一步处理。",
833
+ "diagnosticsVersion": 2
834
+ },
835
+ "notes": [
836
+ "必填 form,card 与 code 分开查询;不提供 include,不补查详情。",
837
+ "凭证店铺与活动归属必须等于目标;有效四字段上下文仅提供本地准入,店铺核验不证明员工 OAuth。不支持总部代查其他归属店铺。",
838
+ "每次一次核验加一次主查询,最多两个请求,无自动重试、切店、重定向或翻页。",
839
+ "默认第1页、容量10,最大500页、容量20。保持原范围按 nextPageNo 继续;第500页仍有后续时停止并说明窗口耗尽,收窄条件是新查询,不承诺无重无漏。",
840
+ "可选字段缺失保持省略,明确 null 或错型失败;保留0、false、空字符串与实际空对象。不以预算推导不限量或额外库存等式。",
841
+ "活动状态不证明已经开始、客户资格或订单可用;未知整数保留不当正常。",
842
+ "缺少上下文仅可显式店铺本地预览;预览不读凭证、不联网,只表示构造计划。",
843
+ "区间省略边界不会补零或当前时间;不接受旧开始/结束参数或裸时间等值。"
844
+ ]
845
+ }