@youzan-cloud/zan-saas-cli 0.0.0-stage → 0.1.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +105 -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 +102 -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,1118 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "input": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "kdtId",
8
+ "channel",
9
+ "pageNo",
10
+ "pageSize"
11
+ ],
12
+ "properties": {
13
+ "kdtId": {
14
+ "type": "integer",
15
+ "minimum": 1,
16
+ "maximum": 9007199254740991,
17
+ "description": "目标店铺 ID。"
18
+ },
19
+ "channel": {
20
+ "type": "integer",
21
+ "minimum": -9007199254740991,
22
+ "maximum": 9007199254740991,
23
+ "description": "渠道,0 网店、1 门店。",
24
+ "enum": [
25
+ 0,
26
+ 1
27
+ ]
28
+ },
29
+ "classificationIds": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "integer",
33
+ "minimum": 1,
34
+ "maximum": 9007199254740991,
35
+ "description": "商品分类 ID 列表,最多 20 项。"
36
+ },
37
+ "minItems": 1,
38
+ "maxItems": 20,
39
+ "description": "商品分类 ID 列表,最多 20 项。"
40
+ },
41
+ "item_ids": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "integer",
45
+ "minimum": 1,
46
+ "maximum": 9007199254740991,
47
+ "description": "指定商品 ID 列表,最多 20 项。"
48
+ },
49
+ "minItems": 1,
50
+ "maxItems": 20,
51
+ "description": "新版商品 ID 集合,同一商品在分店和渠道间保持相同;不是渠道商品 ID。接收 --item-ids 的 CSV、空白分隔或 JSON 数组文本,规范化后为去重的正安全整数数组,最多20项。"
52
+ },
53
+ "groupIds": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "integer",
57
+ "minimum": 1,
58
+ "maximum": 9007199254740991,
59
+ "description": "一级商品分组 ID 列表,最多 20 项。"
60
+ },
61
+ "minItems": 1,
62
+ "maxItems": 20,
63
+ "description": "一级商品分组 ID 列表,最多 20 项。"
64
+ },
65
+ "secondGroupIds": {
66
+ "type": "array",
67
+ "items": {
68
+ "type": "integer",
69
+ "minimum": 1,
70
+ "maximum": 9007199254740991,
71
+ "description": "二级商品分组 ID 列表,最多 20 项。"
72
+ },
73
+ "minItems": 1,
74
+ "maxItems": 20,
75
+ "description": "二级商品分组 ID 列表,最多 20 项。"
76
+ },
77
+ "notExcludeAbilityCodes": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "integer",
81
+ "minimum": 0,
82
+ "maximum": 2147483647,
83
+ "description": "不排除的能力标编码,10033 使套餐商品可被搜索,不表示只查询套餐。"
84
+ },
85
+ "minItems": 1,
86
+ "maxItems": 20,
87
+ "description": "不排除的能力标编码,10033 使套餐商品可被搜索,不表示只查询套餐。"
88
+ },
89
+ "isDisplays": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "integer",
93
+ "minimum": -9007199254740991,
94
+ "maximum": 9007199254740991,
95
+ "description": "上下架筛选,0 仓库中、1 出售中及已售罄;省略时查询两种状态。",
96
+ "enum": [
97
+ 0,
98
+ 1
99
+ ]
100
+ },
101
+ "minItems": 1,
102
+ "maxItems": 20,
103
+ "description": "上下架筛选,0 仓库中、1 出售中及已售罄;省略时查询两种状态。"
104
+ },
105
+ "soldStatusList": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "integer",
109
+ "minimum": -9007199254740991,
110
+ "maximum": 9007199254740991,
111
+ "description": "销售状态筛选:0 非有赞平台出售商品,1 全部在售,2 全部售罄,3 部分售罄;须结合 isDisplays 判断,不能单独推断在售。",
112
+ "enum": [
113
+ 0,
114
+ 1,
115
+ 2,
116
+ 3
117
+ ]
118
+ },
119
+ "minItems": 1,
120
+ "maxItems": 20,
121
+ "description": "销售状态筛选:0 非有赞平台出售商品,1 全部在售,2 全部售罄,3 部分售罄;须结合 isDisplays 判断,不能单独推断在售。"
122
+ },
123
+ "keyword": {
124
+ "type": "string",
125
+ "description": "商品标题、商品或 SKU 编码和条码关键词,标题支持模糊匹配。"
126
+ },
127
+ "itemType": {
128
+ "type": "string",
129
+ "description": "规范化的 17 位发布码;CLI 文案对应关系:实物商品 00000000000000000,蛋糕烘焙 01000000000100000,生鲜果蔬 01000000004204200,海淘商品 01000000004304300,虚拟商品 00000000000000002,电子卡券 00000000000000003,付费优惠券 01000000005100002,酒店商品 00000000003503500,付费会员卡或权益卡 00000000002002002,服务商品 10000000000000002。其他合法 17 位码原样使用,但拒绝 10000000000000003 和 10000000000000004;合法编码不表示当前店铺支持。",
130
+ "pattern": "^\\d{17}$"
131
+ },
132
+ "pageNo": {
133
+ "type": "integer",
134
+ "minimum": 1,
135
+ "maximum": 9007199254740991,
136
+ "description": "页码,从 1 开始,pageNo × pageSize 不超过 5000。"
137
+ },
138
+ "pageSize": {
139
+ "type": "integer",
140
+ "minimum": 1,
141
+ "maximum": 50,
142
+ "description": "每页条数,1 至 50。"
143
+ },
144
+ "sorts": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "string",
148
+ "enum": [
149
+ "CREATED_TIME_DESC",
150
+ "CREATED_TIME_ASC",
151
+ "PRICE_DESC",
152
+ "PRICE_ASC",
153
+ "STOCK_NUM_DESC",
154
+ "STOCK_NUM_ASC",
155
+ "ID_DESC",
156
+ "ID_ASC",
157
+ "ACTUAL_SOLD_NUM_DESC",
158
+ "ACTUAL_SOLD_NUM_ASC"
159
+ ]
160
+ },
161
+ "minItems": 1,
162
+ "maxItems": 20,
163
+ "description": "排序列表:CREATED_TIME_DESC/ASC 为创建时间降/升序,PRICE_DESC/ASC 为价格降/升序,STOCK_NUM_DESC/ASC 为库存数降/升序,ID_DESC/ASC 为商品 ID 降/升序,ACTUAL_SOLD_NUM_DESC/ASC 为销量降/升序;省略时按创建时间降序。"
164
+ },
165
+ "createdAt": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "minProperties": 1,
169
+ "properties": {
170
+ "start": {
171
+ "type": "string",
172
+ "format": "beijing-date-time-ms",
173
+ "description": "窗口起点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
174
+ },
175
+ "end": {
176
+ "type": "string",
177
+ "format": "beijing-date-time-ms",
178
+ "description": "窗口终点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
179
+ }
180
+ },
181
+ "description": "--created-at \"START..END\" 解析后的创建时间闭区间;北京时间、毫秒精度,不早于 Unix 起点。可省略一端,两端齐备允许相等。"
182
+ },
183
+ "updatedAt": {
184
+ "type": "object",
185
+ "additionalProperties": false,
186
+ "minProperties": 1,
187
+ "properties": {
188
+ "start": {
189
+ "type": "string",
190
+ "format": "beijing-date-time-ms",
191
+ "description": "窗口起点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
192
+ },
193
+ "end": {
194
+ "type": "string",
195
+ "format": "beijing-date-time-ms",
196
+ "description": "窗口终点,北京时间 YYYY-MM-DD HH:mm:ss.SSS,省略时不补值。"
197
+ }
198
+ },
199
+ "description": "--updated-at \"START..END\" 解析后的更新时间闭区间;北京时间、毫秒精度,不早于 Unix 起点,可省略一端,两端齐备允许相等。"
200
+ }
201
+ },
202
+ "description": "CLI 解析参数并完成必要上下文补全后的业务输入;不是直接传入 CLI 的 JSON。原始选项、必填条件和默认值见 options。"
203
+ },
204
+ "output": {
205
+ "type": "object",
206
+ "required": [
207
+ "data"
208
+ ],
209
+ "additionalProperties": false,
210
+ "properties": {
211
+ "data": {
212
+ "type": "object",
213
+ "required": [
214
+ "items",
215
+ "pagination",
216
+ "scope"
217
+ ],
218
+ "additionalProperties": false,
219
+ "properties": {
220
+ "items": {
221
+ "type": "array",
222
+ "maxItems": 50,
223
+ "items": {
224
+ "$ref": "#/definitions/item"
225
+ }
226
+ },
227
+ "pagination": {
228
+ "type": "object",
229
+ "required": [
230
+ "pageNo",
231
+ "pageSize",
232
+ "returned",
233
+ "hasMore",
234
+ "nextPageNo",
235
+ "windowLimitReached"
236
+ ],
237
+ "additionalProperties": false,
238
+ "properties": {
239
+ "pageNo": {
240
+ "type": "integer",
241
+ "minimum": 1,
242
+ "description": "本次结果对应的页码。"
243
+ },
244
+ "pageSize": {
245
+ "type": "integer",
246
+ "minimum": 1,
247
+ "description": "本次生效的每页容量,由请求指定。"
248
+ },
249
+ "returned": {
250
+ "type": "integer",
251
+ "minimum": 0,
252
+ "description": "本次响应中 data.items 的数组长度,不是匹配总数、累计条数或嵌套记录数。"
253
+ },
254
+ "hasMore": {
255
+ "type": [
256
+ "boolean",
257
+ "null"
258
+ ],
259
+ "description": "true 表示还有后续页,false 表示已确认没有后续页;无法确定时为 null,不以空页或短页推算。"
260
+ },
261
+ "total": {
262
+ "type": "integer",
263
+ "minimum": 0,
264
+ "description": "匹配本次查询条件的总记录数,不是当前页返回条数;上游未提供可确认总数时省略。"
265
+ },
266
+ "nextPageNo": {
267
+ "type": [
268
+ "integer",
269
+ "null"
270
+ ],
271
+ "minimum": 1,
272
+ "description": "已确认且未超过页码上限的下一页;无法确认或到达上限时为 null。"
273
+ },
274
+ "windowLimitReached": {
275
+ "type": "boolean",
276
+ "description": "下一页超出 5000 条窗口且尚未确认结束时为 true;保留本页成功结果,缩小筛选范围。需要扫描时须明确完整创建时间范围,不能直接继续翻页。"
277
+ }
278
+ },
279
+ "description": "本次返回页面的页码、容量、记录数和后页信号。"
280
+ },
281
+ "scope": {
282
+ "$ref": "#/definitions/scope",
283
+ "description": "本次实际查询的店铺和渠道;只代表该渠道内符合本次筛选的商品,各渠道可能重叠,不能将数量相加作为全店去重商品数。"
284
+ }
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "preview": {
290
+ "type": "object",
291
+ "required": [
292
+ "requests",
293
+ "conditionalRequests",
294
+ "mode",
295
+ "limits",
296
+ "strategy"
297
+ ],
298
+ "additionalProperties": false,
299
+ "properties": {
300
+ "requests": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/definitions/request"
304
+ }
305
+ },
306
+ "conditionalRequests": {
307
+ "type": "array",
308
+ "items": {
309
+ "type": "object",
310
+ "required": [
311
+ "condition",
312
+ "request",
313
+ "maxRequests"
314
+ ],
315
+ "additionalProperties": false,
316
+ "properties": {
317
+ "condition": {
318
+ "type": "string"
319
+ },
320
+ "request": {
321
+ "$ref": "#/definitions/request"
322
+ },
323
+ "maxRequests": {
324
+ "type": "integer",
325
+ "minimum": 1,
326
+ "maximum": 100
327
+ }
328
+ }
329
+ }
330
+ },
331
+ "mode": {
332
+ "const": "list"
333
+ },
334
+ "limits": {
335
+ "$ref": "#/definitions/limits"
336
+ },
337
+ "strategy": {
338
+ "type": "string"
339
+ }
340
+ }
341
+ },
342
+ "error": {
343
+ "type": "object",
344
+ "required": [
345
+ "success",
346
+ "code",
347
+ "message",
348
+ "details"
349
+ ],
350
+ "additionalProperties": false,
351
+ "properties": {
352
+ "success": {
353
+ "const": false
354
+ },
355
+ "code": {
356
+ "const": -10001
357
+ },
358
+ "message": {
359
+ "type": "string",
360
+ "minLength": 1
361
+ },
362
+ "details": {
363
+ "type": "object",
364
+ "required": [
365
+ "category",
366
+ "stage",
367
+ "command",
368
+ "targetScope",
369
+ "requestState",
370
+ "nextStep",
371
+ "errorVersion",
372
+ "recovery",
373
+ "execution"
374
+ ],
375
+ "additionalProperties": false,
376
+ "properties": {
377
+ "category": {
378
+ "type": "string",
379
+ "enum": [
380
+ "parameter",
381
+ "configuration",
382
+ "transport",
383
+ "authentication",
384
+ "permission",
385
+ "http",
386
+ "protocol",
387
+ "business_rejected",
388
+ "not_found",
389
+ "scope_unresolved",
390
+ "pagination_stalled",
391
+ "budget_exceeded",
392
+ "missing_alias",
393
+ "pagination_limit"
394
+ ]
395
+ },
396
+ "stage": {
397
+ "type": "string",
398
+ "minLength": 1
399
+ },
400
+ "command": {
401
+ "const": "item.item.list"
402
+ },
403
+ "targetScope": {
404
+ "oneOf": [
405
+ {
406
+ "$ref": "#/definitions/scope"
407
+ },
408
+ {
409
+ "type": "object",
410
+ "maxProperties": 0
411
+ }
412
+ ]
413
+ },
414
+ "requestState": {
415
+ "type": "string",
416
+ "enum": [
417
+ "not_sent",
418
+ "sent",
419
+ "unknown"
420
+ ],
421
+ "description": "not_sent 确认本步请求未发送;sent 已取得本步响应;unknown 传输中断,无法确定本步结果。不是整个多步查询的发送汇总。"
422
+ },
423
+ "nextStep": {
424
+ "type": "string",
425
+ "minLength": 1
426
+ },
427
+ "api": {
428
+ "type": "string",
429
+ "minLength": 1
430
+ },
431
+ "httpStatus": {
432
+ "type": "integer",
433
+ "minimum": 100,
434
+ "maximum": 599
435
+ },
436
+ "businessCode": {
437
+ "oneOf": [
438
+ {
439
+ "type": "integer",
440
+ "minimum": -9007199254740991,
441
+ "maximum": 9007199254740991
442
+ },
443
+ {
444
+ "type": "string",
445
+ "pattern": "^-?\\d{1,12}$"
446
+ }
447
+ ]
448
+ },
449
+ "gatewayCode": {
450
+ "oneOf": [
451
+ {
452
+ "type": "integer",
453
+ "minimum": -9007199254740991,
454
+ "maximum": 9007199254740991
455
+ },
456
+ {
457
+ "type": "string",
458
+ "pattern": "^-?\\d{1,12}$"
459
+ }
460
+ ]
461
+ },
462
+ "trace_id": {
463
+ "type": "string",
464
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
465
+ },
466
+ "request_id": {
467
+ "type": "string",
468
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
469
+ },
470
+ "errorVersion": {
471
+ "const": 2,
472
+ "description": "本命令采用错误诊断协议第二版。"
473
+ },
474
+ "issues": {
475
+ "type": "array",
476
+ "minItems": 1,
477
+ "maxItems": 16,
478
+ "items": {
479
+ "$ref": "#/definitions/diagnosticIssue"
480
+ },
481
+ "description": "最多十六个已定位问题,不包含收到的原值。"
482
+ },
483
+ "issuesTruncated": {
484
+ "const": true,
485
+ "description": "问题超过返回上限,当前列表没有穷尽全部问题。"
486
+ },
487
+ "recovery": {
488
+ "$ref": "#/definitions/diagnosticRecovery",
489
+ "description": "受限的恢复说明,不会自动执行。"
490
+ },
491
+ "execution": {
492
+ "$ref": "#/definitions/diagnosticExecution",
493
+ "description": "整次调用的请求观察,独立于失败阶段的 requestState。"
494
+ },
495
+ "pageNo": {
496
+ "type": "integer",
497
+ "minimum": 1,
498
+ "description": "出错的搜索请求页码;issues 中 /data/items/N 的 N 是该请求页内从 0 开始的记录索引,不是扫描累计索引。"
499
+ }
500
+ }
501
+ }
502
+ }
503
+ },
504
+ "definitions": {
505
+ "scope": {
506
+ "type": "object",
507
+ "required": [
508
+ "kdtId",
509
+ "channel"
510
+ ],
511
+ "additionalProperties": false,
512
+ "properties": {
513
+ "kdtId": {
514
+ "type": "integer",
515
+ "minimum": 1,
516
+ "maximum": 9007199254740991,
517
+ "description": "本次实际查询的店铺 ID。"
518
+ },
519
+ "channel": {
520
+ "type": "integer",
521
+ "enum": [
522
+ 0,
523
+ 1
524
+ ],
525
+ "description": "销售渠道:0 网店,1 门店。同一商品可在两个渠道出现。"
526
+ }
527
+ }
528
+ },
529
+ "limits": {
530
+ "type": "object",
531
+ "required": [
532
+ "maxItems",
533
+ "maxRequests",
534
+ "maxResponseBytes",
535
+ "maxOutputBytes"
536
+ ],
537
+ "additionalProperties": false,
538
+ "properties": {
539
+ "maxItems": {
540
+ "type": "integer",
541
+ "minimum": 1,
542
+ "maximum": 50000
543
+ },
544
+ "maxRequests": {
545
+ "type": "integer",
546
+ "minimum": 1,
547
+ "maximum": 2000
548
+ },
549
+ "maxResponseBytes": {
550
+ "const": 10485760
551
+ },
552
+ "maxOutputBytes": {
553
+ "const": 5242880
554
+ }
555
+ }
556
+ },
557
+ "item": {
558
+ "type": "object",
559
+ "properties": {
560
+ "kdt_id": {
561
+ "type": "integer",
562
+ "minimum": -9007199254740991,
563
+ "maximum": 9007199254740991,
564
+ "description": "店铺在有赞的id标识,有赞平台生成,在有赞平台唯一,用于判断信息属于哪一个店铺"
565
+ },
566
+ "item_id": {
567
+ "type": "integer",
568
+ "minimum": 1,
569
+ "maximum": 9007199254740991,
570
+ "description": "统一商品 ID(OneID),同一商品在各分店和渠道使用相同值;与目标店铺和渠道一起定位,不接受渠道商品 ID 替代。"
571
+ },
572
+ "channel_item_id": {
573
+ "type": "integer",
574
+ "minimum": -9007199254740991,
575
+ "maximum": 9007199254740991,
576
+ "description": "渠道商品 ID,标识目标分店和渠道下的商品,对应旧商品接口的 item_id;数值可能与统一商品 ID 相同,不能据此互换。未返回时省略,不用 item_id 补齐;有值时须符合本字段整数约束。"
577
+ },
578
+ "root_kdt_id": {
579
+ "type": "integer",
580
+ "minimum": -9007199254740991,
581
+ "maximum": 9007199254740991,
582
+ "description": "有赞连锁总部店铺id,仅供有赞连锁场景下使用。有赞平台生成,在有赞平台唯一,用于判断信息属于哪一个总部"
583
+ },
584
+ "item_type": {
585
+ "type": "integer",
586
+ "minimum": -9007199254740991,
587
+ "maximum": 9007199254740991,
588
+ "description": "商品类型。0实物商品,1虚拟商品、2服务商品"
589
+ },
590
+ "publish_code": {
591
+ "type": "string",
592
+ "description": "商品发布类型。对应商品发布页面的商品类型。值:00000000000000000(实物商品)、01000000000100000(蛋糕烘焙)、01000000004204200(生鲜果蔬)、01000000004304300(海淘商品)、00000000000000002(虚拟商品)、00000000000000003(电子卡券)、01000000005100002(付费优惠券)、00000000003503500(酒店商品)。"
593
+ },
594
+ "title": {
595
+ "type": "string",
596
+ "description": "商品名称"
597
+ },
598
+ "share_description": {
599
+ "type": "string",
600
+ "description": "分享描述"
601
+ },
602
+ "sell_point": {
603
+ "type": "string",
604
+ "description": "商品卖点"
605
+ },
606
+ "alias": {
607
+ "type": "string",
608
+ "description": "商品别名"
609
+ },
610
+ "display": {
611
+ "type": "integer",
612
+ "minimum": -9007199254740991,
613
+ "maximum": 9007199254740991,
614
+ "description": "上下架状态。0-下架、1-上架、8-不可售。"
615
+ },
616
+ "start_sold_time": {
617
+ "type": "string",
618
+ "format": "beijing-date-time-ms",
619
+ "$comment": "upstream-time:seconds",
620
+ "description": "开售时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。"
621
+ },
622
+ "sold_status": {
623
+ "type": "integer",
624
+ "minimum": -9007199254740991,
625
+ "maximum": 9007199254740991,
626
+ "description": "发售状态:1发售中,2已售罄,3部分售罄"
627
+ },
628
+ "delete": {
629
+ "type": "integer",
630
+ "minimum": -9007199254740991,
631
+ "maximum": 9007199254740991,
632
+ "description": "是否已删除。0否,1是"
633
+ },
634
+ "item_code": {
635
+ "type": "string",
636
+ "description": "商品编码"
637
+ },
638
+ "item_barcode": {
639
+ "type": "string",
640
+ "description": "商品条码"
641
+ },
642
+ "channel": {
643
+ "type": "integer",
644
+ "minimum": -9007199254740991,
645
+ "maximum": 9007199254740991,
646
+ "description": "渠道:0网店,1门店"
647
+ },
648
+ "leaf_category_id": {
649
+ "type": "integer",
650
+ "minimum": -9007199254740991,
651
+ "maximum": 9007199254740991,
652
+ "description": "类目ID"
653
+ },
654
+ "classification_id": {
655
+ "type": "integer",
656
+ "minimum": -9007199254740991,
657
+ "maximum": 9007199254740991,
658
+ "description": "分类ID"
659
+ },
660
+ "brand_id": {
661
+ "type": "integer",
662
+ "minimum": -9007199254740991,
663
+ "maximum": 9007199254740991,
664
+ "description": "品牌ID"
665
+ },
666
+ "origin_price": {
667
+ "type": "string",
668
+ "description": "划线价,单位:元 输出固定两位小数字符串;空字符串保持空字符串。",
669
+ "$comment": "upstream-money:yuan",
670
+ "pattern": "^(?:|-?(?:0|[1-9]\\d*)\\.\\d{2})$"
671
+ },
672
+ "media": {
673
+ "type": "object",
674
+ "properties": {
675
+ "images": {
676
+ "type": "array",
677
+ "items": {
678
+ "type": "object",
679
+ "properties": {
680
+ "image_id": {
681
+ "type": "integer",
682
+ "minimum": -9007199254740991,
683
+ "maximum": 9007199254740991,
684
+ "description": "图片ID"
685
+ },
686
+ "width": {
687
+ "type": "integer",
688
+ "minimum": -9007199254740991,
689
+ "maximum": 9007199254740991,
690
+ "description": "宽度"
691
+ },
692
+ "height": {
693
+ "type": "integer",
694
+ "minimum": -9007199254740991,
695
+ "maximum": 9007199254740991,
696
+ "description": "高度"
697
+ },
698
+ "url": {
699
+ "type": "string",
700
+ "description": "图片url"
701
+ }
702
+ },
703
+ "additionalProperties": true
704
+ },
705
+ "description": "商品主图"
706
+ },
707
+ "main_video_id": {
708
+ "type": "integer",
709
+ "minimum": -9007199254740991,
710
+ "maximum": 9007199254740991,
711
+ "description": "主视频ID"
712
+ },
713
+ "explain_video_id": {
714
+ "type": "integer",
715
+ "minimum": -9007199254740991,
716
+ "maximum": 9007199254740991,
717
+ "description": "讲解视频ID"
718
+ }
719
+ },
720
+ "additionalProperties": true,
721
+ "description": "商品媒体包含主图、主图视频、视频讲解"
722
+ },
723
+ "message_settings": {
724
+ "type": "array",
725
+ "items": {
726
+ "type": "object",
727
+ "properties": {
728
+ "datetime": {
729
+ "type": "integer",
730
+ "minimum": -9007199254740991,
731
+ "maximum": 9007199254740991,
732
+ "description": "是否含日期。0 否 1是。目前只有Type=time 会设置。"
733
+ },
734
+ "multiple": {
735
+ "type": "integer",
736
+ "minimum": -9007199254740991,
737
+ "maximum": 9007199254740991,
738
+ "description": "是否多选。0-否、1-是。"
739
+ },
740
+ "name": {
741
+ "type": "string",
742
+ "description": "留言名称。不能多于10个字。"
743
+ },
744
+ "required": {
745
+ "type": "integer",
746
+ "minimum": -9007199254740991,
747
+ "maximum": 9007199254740991,
748
+ "description": "是否必填。0-否、1-是。"
749
+ },
750
+ "type": {
751
+ "type": "string",
752
+ "description": "留言数据类型。值:text(文本格式)、tel(数字格式)、email(邮箱格式)、date(日期格式)、id_no(身份证号格式)、image(图片格式)、mobile(手机号格式)、time(时间格式)。"
753
+ }
754
+ },
755
+ "additionalProperties": true
756
+ },
757
+ "description": "留言信息"
758
+ },
759
+ "join_member_discount": {
760
+ "type": "integer",
761
+ "minimum": -9007199254740991,
762
+ "maximum": 9007199254740991,
763
+ "description": "是否参与会员折扣。值:0-否、1-是。"
764
+ },
765
+ "created_time": {
766
+ "type": "string",
767
+ "format": "beijing-date-time-ms",
768
+ "$comment": "upstream-time:milliseconds",
769
+ "description": "创建时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。"
770
+ },
771
+ "update_time": {
772
+ "type": "string",
773
+ "format": "beijing-date-time-ms",
774
+ "$comment": "upstream-time:milliseconds",
775
+ "description": "更新时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。"
776
+ },
777
+ "price": {
778
+ "type": "string",
779
+ "description": "商品最小价,单位:元 输出固定两位小数字符串。",
780
+ "$comment": "upstream-money:fen",
781
+ "pattern": "^-?(?:0|[1-9]\\d*)\\.\\d{2}$"
782
+ },
783
+ "h5_url": {
784
+ "type": [
785
+ "string",
786
+ "null"
787
+ ],
788
+ "description": "CLI 默认提供的买家H5;根据已确认角色/渠道规则生成,已确认不适用时为null。搜索接口字段定义本身不包含此字段。"
789
+ }
790
+ },
791
+ "additionalProperties": true,
792
+ "required": [
793
+ "item_id",
794
+ "h5_url"
795
+ ]
796
+ },
797
+ "request": {
798
+ "type": "object",
799
+ "required": [
800
+ "method",
801
+ "path",
802
+ "body"
803
+ ],
804
+ "additionalProperties": false,
805
+ "properties": {
806
+ "method": {
807
+ "const": "POST"
808
+ },
809
+ "path": {
810
+ "type": "string"
811
+ },
812
+ "body": {
813
+ "type": "object",
814
+ "additionalProperties": true
815
+ }
816
+ }
817
+ },
818
+ "diagnosticExpected": {
819
+ "type": "object",
820
+ "additionalProperties": false,
821
+ "required": [],
822
+ "properties": {
823
+ "type": {
824
+ "anyOf": [
825
+ {
826
+ "type": "string",
827
+ "description": "预期的 JSON 类型。"
828
+ },
829
+ {
830
+ "type": "array",
831
+ "items": {
832
+ "type": "string",
833
+ "description": "预期的 JSON 类型。"
834
+ }
835
+ }
836
+ ],
837
+ "description": "同版模型允许的类型。"
838
+ },
839
+ "enum": {
840
+ "type": "array",
841
+ "items": {
842
+ "anyOf": [
843
+ {
844
+ "type": "string"
845
+ },
846
+ {
847
+ "type": "number"
848
+ },
849
+ {
850
+ "type": "boolean"
851
+ },
852
+ {
853
+ "type": "null"
854
+ }
855
+ ],
856
+ "description": "契约声明的静态标量约束。"
857
+ },
858
+ "description": "同版模型允许的静态值。"
859
+ },
860
+ "const": {
861
+ "anyOf": [
862
+ {
863
+ "type": "string"
864
+ },
865
+ {
866
+ "type": "number"
867
+ },
868
+ {
869
+ "type": "boolean"
870
+ },
871
+ {
872
+ "type": "null"
873
+ }
874
+ ],
875
+ "description": "契约声明的静态标量约束。"
876
+ },
877
+ "minimum": {
878
+ "type": "number",
879
+ "description": "包含的最小值。"
880
+ },
881
+ "maximum": {
882
+ "type": "number",
883
+ "description": "包含的最大值。"
884
+ },
885
+ "exclusiveMinimum": {
886
+ "type": "number",
887
+ "description": "不包含的最小值。"
888
+ },
889
+ "exclusiveMaximum": {
890
+ "type": "number",
891
+ "description": "不包含的最大值。"
892
+ },
893
+ "minLength": {
894
+ "type": "integer",
895
+ "description": "最少字符数。"
896
+ },
897
+ "maxLength": {
898
+ "type": "integer",
899
+ "description": "最多字符数。"
900
+ },
901
+ "minItems": {
902
+ "type": "integer",
903
+ "description": "最少元素数。"
904
+ },
905
+ "maxItems": {
906
+ "type": "integer",
907
+ "description": "最多元素数。"
908
+ },
909
+ "format": {
910
+ "type": "string",
911
+ "description": "同版模型声明的格式。"
912
+ },
913
+ "pattern": {
914
+ "type": "string",
915
+ "description": "同版模型声明的字符约束。"
916
+ },
917
+ "additionalProperties": {
918
+ "const": false,
919
+ "description": "对象拒绝契约以外的属性。"
920
+ },
921
+ "contains": {
922
+ "type": "object",
923
+ "additionalProperties": false,
924
+ "required": [
925
+ "const"
926
+ ],
927
+ "properties": {
928
+ "const": {
929
+ "anyOf": [
930
+ {
931
+ "type": "string"
932
+ },
933
+ {
934
+ "type": "number"
935
+ },
936
+ {
937
+ "type": "boolean"
938
+ },
939
+ {
940
+ "type": "null"
941
+ }
942
+ ],
943
+ "description": "契约声明的静态标量约束。"
944
+ }
945
+ }
946
+ },
947
+ "items": {
948
+ "type": "object",
949
+ "additionalProperties": false,
950
+ "required": [
951
+ "enum"
952
+ ],
953
+ "properties": {
954
+ "enum": {
955
+ "type": "array",
956
+ "items": {
957
+ "anyOf": [
958
+ {
959
+ "type": "string"
960
+ },
961
+ {
962
+ "type": "number"
963
+ },
964
+ {
965
+ "type": "boolean"
966
+ },
967
+ {
968
+ "type": "null"
969
+ }
970
+ ],
971
+ "description": "契约声明的静态标量约束。"
972
+ },
973
+ "description": "元素允许的静态值。"
974
+ }
975
+ }
976
+ }
977
+ }
978
+ },
979
+ "diagnosticIssue": {
980
+ "type": "object",
981
+ "additionalProperties": false,
982
+ "required": [
983
+ "source",
984
+ "reason"
985
+ ],
986
+ "properties": {
987
+ "source": {
988
+ "enum": [
989
+ "argv",
990
+ "input",
991
+ "context",
992
+ "output",
993
+ "preview"
994
+ ],
995
+ "description": "问题所属的参数、输入、上下文、结果或预览模型。"
996
+ },
997
+ "path": {
998
+ "type": "string",
999
+ "description": "对应模型中的 JSON Pointer;不含原始输入或动态字典键。"
1000
+ },
1001
+ "option": {
1002
+ "type": "string",
1003
+ "description": "可定位时给出的已注册 CLI 选项。"
1004
+ },
1005
+ "reason": {
1006
+ "enum": [
1007
+ "required",
1008
+ "invalid_type",
1009
+ "invalid_choice",
1010
+ "out_of_range",
1011
+ "invalid_format",
1012
+ "conditional_required",
1013
+ "constraint",
1014
+ "unexpected_property",
1015
+ "unknown_option",
1016
+ "unknown_command",
1017
+ "excess_arguments",
1018
+ "missing_value"
1019
+ ],
1020
+ "description": "字段违反的约束类型,原始值不回显。"
1021
+ },
1022
+ "expected": {
1023
+ "$ref": "#/definitions/diagnosticExpected",
1024
+ "description": "同版契约的静态预期。"
1025
+ },
1026
+ "relatedPaths": {
1027
+ "type": "array",
1028
+ "items": {
1029
+ "type": "string",
1030
+ "description": "关联字段的 JSON Pointer。"
1031
+ },
1032
+ "description": "触发条件约束的关联字段。"
1033
+ }
1034
+ }
1035
+ },
1036
+ "diagnosticRecovery": {
1037
+ "type": "object",
1038
+ "additionalProperties": false,
1039
+ "required": [
1040
+ "action",
1041
+ "automaticBusinessRetry"
1042
+ ],
1043
+ "properties": {
1044
+ "action": {
1045
+ "enum": [
1046
+ "correct_input",
1047
+ "complete_authentication",
1048
+ "request_access_review",
1049
+ "stop_and_inspect"
1050
+ ],
1051
+ "description": "依次表示修正本地输入、补认证、核对权限或停止核查;仅是说明,不执行操作或授予权限。"
1052
+ },
1053
+ "automaticBusinessRetry": {
1054
+ "const": false,
1055
+ "description": "不据此自动重放业务请求。"
1056
+ }
1057
+ }
1058
+ },
1059
+ "diagnosticExecution": {
1060
+ "type": "object",
1061
+ "additionalProperties": false,
1062
+ "required": [
1063
+ "requestState",
1064
+ "coverage",
1065
+ "observedAttempts"
1066
+ ],
1067
+ "properties": {
1068
+ "requestState": {
1069
+ "enum": [
1070
+ "not_sent",
1071
+ "sent",
1072
+ "unknown"
1073
+ ],
1074
+ "description": "整次调用尚未发送、已有发送记录或无法排除未知请求;不代表业务完成。"
1075
+ },
1076
+ "coverage": {
1077
+ "enum": [
1078
+ "complete",
1079
+ "partial"
1080
+ ],
1081
+ "description": "请求观察覆盖全部已接入路径,或存在未观测路径;部分覆盖不能声明零请求。"
1082
+ },
1083
+ "observedAttempts": {
1084
+ "type": "integer",
1085
+ "minimum": 0,
1086
+ "maximum": 9007199254740991,
1087
+ "description": "本地已进入发送边界的观测次数下界,不是服务端执行次数。"
1088
+ }
1089
+ }
1090
+ }
1091
+ },
1092
+ "api": {
1093
+ "method": "POST",
1094
+ "path": "youzan.item.base.search/1.0.0"
1095
+ },
1096
+ "success": {
1097
+ "description": "当前页商品、目标、H5 及分页满足模型且未超过预算后整体输出。"
1098
+ },
1099
+ "errors": {
1100
+ "description": "失败 stdout 为空,stderr 为一份脱敏错误 JSON,退出码非零;不返回部分成功,不自动重试、切换身份或目标。按 error 模型及安全下一步处理。",
1101
+ "diagnosticsVersion": 2
1102
+ },
1103
+ "notes": [
1104
+ "只查询一页,默认第 1 页、每页 20 条;pageNo × pageSize 不超过 5000,超出窗口使用 item item scan。",
1105
+ "查询数量先读 pagination.total;只代表当前店铺、渠道和筛选,未取得总数时省略 total,不能用 returned 代替。各渠道商品可能重叠,数量不能直接相加。",
1106
+ "nextPageNo 非 null 时保留筛选和 pageSize 继续。windowLimitReached=true 时本页仍成功,但不能继续翻页;缩小筛选,或明确完整创建时间范围后使用 item item scan。hasMore=null 不表示查完。",
1107
+ "列表可用逗号、空白分隔或 JSON 数组编码,最多 20 项并去重;商品类型可用已支持文案或 17 位发布码。",
1108
+ "创建和更新时间分别使用 --created-at/--updated-at \"START..END\";必须包含 ..,省略边界不补值;不接受旧成对参数或时间 JSON。",
1109
+ "时间按北京时间文本输入,可带 1 至 3 位毫秒,不接受时间戳、T 或时区后缀;预览请求中的时间为毫秒整数。",
1110
+ "默认补适用 H5,不返回库存数量,不提供 group/content 扩展;已定义金额为元固定两位字符串,不得再次除以 100。",
1111
+ "搜索数据累计最多 10 MiB、完整输出最多 5 MiB;超预算或无进展整体失败,不输出部分商品,不提供续游标或快照保证。",
1112
+ "不支持 search_after 和 NUM/UPDATE_TIME/SCORE 排序;服务商品发布码仅为历史兼容,未在真实样本验收。",
1113
+ "本地 --dry-run 不读取凭证、不联网;预览只证明构造计划,不证明对象存在或权限有效。真实执行仍需有效上下文及目标范围授权,at 声明不替代服务端授权。",
1114
+ "本命令已定义金额的币种默认人民币(CNY);字段、结果或明确父对象上下文声明其他币种时按该声明处理,不执行换汇。",
1115
+ "商品标识采用新版口径:item_id/sku_id 跨分店和渠道统一,channel_item_id/channel_sku_id 对应目标店铺渠道的旧标识。商品查询使用统一商品 ID 和渠道,不接受旧渠道 ID 替代,不因标识数值相等而互换。",
1116
+ "商品记录或字段不符合模型时整体失败,不跳过记录;issues 指出字段和页内索引,pageNo 指出搜索请求页码,不包含原始商品字段值。"
1117
+ ]
1118
+ }