@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,1363 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "input": {
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "scope": {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kdtId": {
12
+ "$ref": "#/definitions/shopId"
13
+ }
14
+ },
15
+ "required": [
16
+ "kdtId"
17
+ ]
18
+ },
19
+ "filters": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "orderNo": {
24
+ "$ref": "#/definitions/orderNo",
25
+ "description": "精确交易订单号。"
26
+ },
27
+ "yzOpenId": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "description": "客户统一标识,非员工ID或手机号,非空文本。"
31
+ },
32
+ "status": {
33
+ "type": "string",
34
+ "minLength": 1,
35
+ "enum": [
36
+ "WAIT_BUYER_PAY",
37
+ "WAIT_SELLER_SEND_GOODS",
38
+ "WAIT_BUYER_CONFIRM_GOODS",
39
+ "TRADE_SUCCESS",
40
+ "TRADE_CLOSED",
41
+ "TRADE_REFUND"
42
+ ],
43
+ "description": "WAIT_BUYER_PAY=等待买家付款,含适用预售定金或尾款;WAIT_SELLER_SEND_GOODS=等待卖家发货;WAIT_BUYER_CONFIRM_GOODS=等待买家确认收货;TRADE_SUCCESS=交易完成;TRADE_CLOSED=交易关闭;TRADE_REFUND=退款中,仅搜索条件,不是已知交易状态响应值。请求字符串,与响应字典分开,未知值拒绝。"
44
+ },
45
+ "type": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "enum": [
49
+ "NORMAL",
50
+ "PEERPAY",
51
+ "GIFT",
52
+ "FX_CAIGOUDAN",
53
+ "PRESENT",
54
+ "WISH",
55
+ "QRCODE",
56
+ "QRCODE_3RD",
57
+ "FX_MERGED",
58
+ "VERIFIED",
59
+ "PINJIAN",
60
+ "REBATE",
61
+ "FX_QUANYUANDIAN",
62
+ "FX_DEPOSIT",
63
+ "PF",
64
+ "GROUP",
65
+ "HOTEL",
66
+ "TAKE_AWAY",
67
+ "CATERING_OFFLINE",
68
+ "CATERING_QRCODE",
69
+ "BEAUTY_APPOINTMENT",
70
+ "BEAUTY_SERVICE",
71
+ "KNOWLEDGE_PAY",
72
+ "GIFT_CARD"
73
+ ],
74
+ "description": "NORMAL=普通订单;PEERPAY=代付;GIFT=我要送人;FX_CAIGOUDAN=分销供货单;PRESENT=赠品;WISH=心愿单;QRCODE=二维码订单;QRCODE_3RD=线下收银台;FX_MERGED=合并付货款;VERIFIED=1分钱实名认证;PINJIAN=品鉴;REBATE=返利;FX_QUANYUANDIAN=全员开店;FX_DEPOSIT=分销保证金;PF=批发;GROUP=拼团;HOTEL=酒店;TAKE_AWAY=外卖;CATERING_OFFLINE=堂食点餐;CATERING_QRCODE=外卖买单;BEAUTY_APPOINTMENT=美业预约;BEAUTY_SERVICE=美业服务;KNOWLEDGE_PAY=知识付费;GIFT_CARD=礼品卡。请求字符串,与响应字典分开,未知值拒绝。"
75
+ },
76
+ "item_id": {
77
+ "$ref": "#/definitions/id",
78
+ "description": "OneID商品ID,沿用统一商品筛选;当前仅接受正安全整数范围。"
79
+ },
80
+ "itemTitle": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 200,
84
+ "description": "商品名称模糊搜索,最长200字符为CLI预算。"
85
+ },
86
+ "receiverPhone": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 20,
90
+ "description": "收货人电话,非买家手机号,最长20字符。"
91
+ },
92
+ "receiverName": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "maxLength": 50,
96
+ "description": "收货人姓名,最长50字符。"
97
+ },
98
+ "deliveryType": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "enum": [
102
+ "EXPRESS",
103
+ "SELF_FETCH",
104
+ "LOCAL_DELIVERY"
105
+ ],
106
+ "description": "EXPRESS=快递发货;SELF_FETCH=到店自提;LOCAL_DELIVERY=同城配送。请求字符串,与响应字典分开,未知值拒绝。"
107
+ },
108
+ "keyword": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "maxLength": 200,
112
+ "description": "订单号、收货人手机或后四位,最长200字符为CLI预算。"
113
+ }
114
+ },
115
+ "description": "至少一个明确筛选或完整时间范围;各筛选原样保留,不补默认状态或类型。"
116
+ },
117
+ "range": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "properties": {
121
+ "created": {
122
+ "$ref": "#/definitions/timeRange"
123
+ },
124
+ "updated": {
125
+ "$ref": "#/definitions/timeRange"
126
+ },
127
+ "paid": {
128
+ "$ref": "#/definitions/timeRange"
129
+ },
130
+ "succeeded": {
131
+ "$ref": "#/definitions/timeRange"
132
+ },
133
+ "delivery": {
134
+ "$ref": "#/definitions/timeRange"
135
+ }
136
+ },
137
+ "minProperties": 0,
138
+ "description": "时间区间由 --created-at/--updated-at/--paid-at/--succeeded-at/--delivery-at \"START..END\" 解析;每组必须两端,生命周期最多一组。配送时间要求 LOCAL_DELIVERY,不承诺端点包含性。"
139
+ },
140
+ "pagination": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "properties": {
144
+ "pageNo": {
145
+ "type": "integer",
146
+ "minimum": 1,
147
+ "maximum": 100
148
+ },
149
+ "pageSize": {
150
+ "type": "integer",
151
+ "minimum": 1,
152
+ "maximum": 100
153
+ }
154
+ },
155
+ "required": [
156
+ "pageNo",
157
+ "pageSize"
158
+ ]
159
+ },
160
+ "include": {
161
+ "type": "array",
162
+ "uniqueItems": true,
163
+ "items": {
164
+ "type": "string",
165
+ "enum": [
166
+ "items",
167
+ "payment",
168
+ "buyer",
169
+ "address",
170
+ "remark",
171
+ "source",
172
+ "aftersale",
173
+ "fulfillment"
174
+ ]
175
+ }
176
+ },
177
+ "format": {
178
+ "type": "string",
179
+ "enum": [
180
+ "json",
181
+ "pretty"
182
+ ]
183
+ },
184
+ "dryRun": {
185
+ "type": "boolean"
186
+ }
187
+ },
188
+ "required": [
189
+ "scope",
190
+ "filters",
191
+ "range",
192
+ "pagination",
193
+ "include",
194
+ "format",
195
+ "dryRun"
196
+ ]
197
+ },
198
+ "output": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "properties": {
202
+ "data": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "properties": {
206
+ "orders": {
207
+ "type": "array",
208
+ "items": {
209
+ "$ref": "#/definitions/orderRow"
210
+ }
211
+ },
212
+ "pagination": {
213
+ "$ref": "#/definitions/pagination"
214
+ }
215
+ },
216
+ "required": [
217
+ "orders",
218
+ "pagination"
219
+ ]
220
+ }
221
+ },
222
+ "required": [
223
+ "data"
224
+ ]
225
+ },
226
+ "preview": {
227
+ "type": "object",
228
+ "description": "纯本地两步请求计划;receiver_phone、receiver_name、keywords 若存在均替换为 ***。不读取凭证、不联网,不修改规范化输入或实际请求筛选。",
229
+ "additionalProperties": false,
230
+ "properties": {
231
+ "requests": {
232
+ "type": "array",
233
+ "minItems": 2,
234
+ "maxItems": 2,
235
+ "items": [
236
+ {
237
+ "$ref": "#/definitions/bindingRequest"
238
+ },
239
+ {
240
+ "$ref": "#/definitions/listRequest"
241
+ }
242
+ ]
243
+ }
244
+ },
245
+ "required": [
246
+ "requests"
247
+ ]
248
+ },
249
+ "error": {
250
+ "type": "object",
251
+ "required": [
252
+ "success",
253
+ "code",
254
+ "message",
255
+ "details"
256
+ ],
257
+ "additionalProperties": false,
258
+ "properties": {
259
+ "success": {
260
+ "const": false
261
+ },
262
+ "code": {
263
+ "const": -10001
264
+ },
265
+ "message": {
266
+ "type": "string",
267
+ "minLength": 1
268
+ },
269
+ "details": {
270
+ "type": "object",
271
+ "required": [
272
+ "category",
273
+ "stage",
274
+ "command",
275
+ "targetScope",
276
+ "requestState",
277
+ "nextStep",
278
+ "errorVersion",
279
+ "recovery",
280
+ "execution"
281
+ ],
282
+ "additionalProperties": false,
283
+ "properties": {
284
+ "category": {
285
+ "type": "string",
286
+ "enum": [
287
+ "validation",
288
+ "configuration",
289
+ "authentication",
290
+ "permission",
291
+ "scope_unresolved",
292
+ "http",
293
+ "business_rejected",
294
+ "transport",
295
+ "protocol",
296
+ "limit"
297
+ ]
298
+ },
299
+ "stage": {
300
+ "type": "string",
301
+ "enum": [
302
+ "input",
303
+ "context",
304
+ "configuration",
305
+ "shop-binding",
306
+ "order",
307
+ "orders",
308
+ "scan",
309
+ "output-model"
310
+ ]
311
+ },
312
+ "command": {
313
+ "const": "order.order.list"
314
+ },
315
+ "targetScope": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "properties": {
319
+ "kdtId": {
320
+ "$ref": "#/definitions/shopId"
321
+ }
322
+ },
323
+ "required": []
324
+ },
325
+ "requestState": {
326
+ "enum": [
327
+ "not_sent",
328
+ "sent",
329
+ "unknown"
330
+ ]
331
+ },
332
+ "nextStep": {
333
+ "type": "string",
334
+ "minLength": 1
335
+ },
336
+ "api": {
337
+ "type": "string"
338
+ },
339
+ "httpStatus": {
340
+ "type": "integer"
341
+ },
342
+ "businessCode": {
343
+ "anyOf": [
344
+ {
345
+ "type": "integer",
346
+ "minimum": -9007199254740991,
347
+ "maximum": 9007199254740991
348
+ },
349
+ {
350
+ "type": "string",
351
+ "pattern": "^-?\\d{1,12}$"
352
+ }
353
+ ]
354
+ },
355
+ "gatewayCode": {
356
+ "anyOf": [
357
+ {
358
+ "type": "integer",
359
+ "minimum": -9007199254740991,
360
+ "maximum": 9007199254740991
361
+ },
362
+ {
363
+ "type": "string",
364
+ "pattern": "^-?\\d{1,12}$"
365
+ }
366
+ ]
367
+ },
368
+ "trace_id": {
369
+ "type": "string",
370
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
371
+ },
372
+ "request_id": {
373
+ "type": "string",
374
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
375
+ },
376
+ "errorVersion": {
377
+ "const": 2,
378
+ "description": "本命令采用错误诊断协议第二版。"
379
+ },
380
+ "issues": {
381
+ "type": "array",
382
+ "minItems": 1,
383
+ "maxItems": 16,
384
+ "items": {
385
+ "$ref": "#/definitions/diagnosticIssue"
386
+ },
387
+ "description": "最多十六个已定位问题,不包含收到的原值。"
388
+ },
389
+ "issuesTruncated": {
390
+ "const": true,
391
+ "description": "问题超过返回上限,当前列表没有穷尽全部问题。"
392
+ },
393
+ "recovery": {
394
+ "$ref": "#/definitions/diagnosticRecovery",
395
+ "description": "受限的恢复说明,不会自动执行。"
396
+ },
397
+ "execution": {
398
+ "$ref": "#/definitions/diagnosticExecution",
399
+ "description": "整次调用的请求观察,独立于失败阶段的 requestState。"
400
+ }
401
+ }
402
+ }
403
+ }
404
+ },
405
+ "definitions": {
406
+ "id": {
407
+ "type": "string",
408
+ "pattern": "^(?=.*[1-9])\\d+$",
409
+ "description": "十进制正整数 ID 字符串;上游 number 仅接受安全整数,字符串不经浮点转换。"
410
+ },
411
+ "shopId": {
412
+ "type": "string",
413
+ "pattern": "^[1-9]\\d*$",
414
+ "description": "显式目标店铺 ID,输入仅正安全整数;成功输出为实际订单所属店铺。"
415
+ },
416
+ "orderNo": {
417
+ "type": "string",
418
+ "minLength": 1,
419
+ "pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]+$(?![\\s\\S])",
420
+ "maxLength": 128,
421
+ "description": "原始交易订单号,最多 128 字符,不含空白或控制字符;不按前缀或位数判断有效性,不改写原值。"
422
+ },
423
+ "time": {
424
+ "type": "string",
425
+ "format": "beijing-date-time-ms",
426
+ "$comment": "upstream-time:text",
427
+ "description": "固定北京时间 YYYY-MM-DD HH:mm:ss.SSS;来源为文本且仅秒精度,拒绝非零毫秒、非法日历、时区及数字时间戳。"
428
+ },
429
+ "timeRange": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "properties": {
433
+ "start": {
434
+ "$ref": "#/definitions/time"
435
+ },
436
+ "end": {
437
+ "$ref": "#/definitions/time"
438
+ }
439
+ },
440
+ "required": [
441
+ "start",
442
+ "end"
443
+ ],
444
+ "description": "北京时间成对范围,结束严格晚于开始,最长三日历月,月末夹到目标月末并保留时分秒;结束至多晚于固定当前时刻7天。秒接口拒绝非零毫秒。 CLI 使用 START..END,必须有分隔符和两端;不补边界,不承诺端点包含性。"
445
+ },
446
+ "money": {
447
+ "type": "string",
448
+ "pattern": "^\\d+\\.\\d{2}$",
449
+ "$comment": "upstream-money:yuan",
450
+ "description": "元金额字符串,无损补齐两位,不再次除以100;不接受负数、科学计数法、非零额外小数位或非字符串。不计算汇总;本命令默认以 CNY 计价,不新增币种字段或作汇率换算。"
451
+ },
452
+ "order": {
453
+ "type": "object",
454
+ "additionalProperties": false,
455
+ "properties": {
456
+ "orderNo": {
457
+ "$ref": "#/definitions/nonemptyText",
458
+ "description": "交易订单号,不是退款单号或支付流水号。"
459
+ },
460
+ "kdtId": {
461
+ "$ref": "#/definitions/shopId"
462
+ },
463
+ "rootKdtId": {
464
+ "$ref": "#/definitions/id",
465
+ "description": "订单所属总部 ID;返回时须等于本次 context.hq,不以本地值补造。"
466
+ },
467
+ "status": {
468
+ "$ref": "#/definitions/nonemptyText",
469
+ "description": "状态字符串。WAIT_BUYER_PAY=待支付,TRADE_PAID=支付成功瞬态,WAIT_CONFIRM=待确认,WAIT_SELLER_SEND_GOODS=待发货,WAIT_BUYER_CONFIRM_GOODS=待收货,TRADE_SUCCESS=交易完成,TRADE_CLOSED=关闭;未来非空字符串原样保留,不编造标签。"
470
+ },
471
+ "statusText": {
472
+ "type": "string",
473
+ "description": "上游展示状态文案,不反推状态码。"
474
+ },
475
+ "type": {
476
+ "type": "integer",
477
+ "minimum": -9007199254740991,
478
+ "maximum": 9007199254740991,
479
+ "description": "业务类型。0普通、1老送礼、2代付、3分销供货、4赠品、5心愿、6二维码、7合并付货款、8一分钱实名、9品鉴、10拼团、15返利、35酒店、40外卖、41堂食、46外卖买单、51全员开店、61线下收银、71美业预约、72美业服务、75知识付费、81礼品卡、85爱逛直播、89样品、100批发。未知安全整数保留。"
480
+ },
481
+ "createdAt": {
482
+ "$ref": "#/definitions/time"
483
+ },
484
+ "paidAt": {
485
+ "$ref": "#/definitions/time",
486
+ "description": "可选订单支付时间,北京时间三位毫秒;未取得时省略,不证明未支付。不保证首笔、末笔或结清时间,也不是逐笔资金事件。"
487
+ },
488
+ "isPaid": {
489
+ "type": "boolean",
490
+ "description": "可选订单支付标记;true 表示已支付,false 表示未支付,未知时省略。不从状态、金额或支付时间推算。"
491
+ },
492
+ "updatedAt": {
493
+ "$ref": "#/definitions/time",
494
+ "description": "可选更新时间,不是快照版本。"
495
+ },
496
+ "shopName": {
497
+ "type": "string",
498
+ "description": "订单记录的店铺名,不作店铺归属锚点。"
499
+ }
500
+ },
501
+ "required": [
502
+ "orderNo",
503
+ "kdtId",
504
+ "status",
505
+ "type",
506
+ "createdAt"
507
+ ]
508
+ },
509
+ "orderItem": {
510
+ "type": "object",
511
+ "additionalProperties": false,
512
+ "properties": {
513
+ "oid": {
514
+ "$ref": "#/definitions/nonemptyText",
515
+ "description": "交易明细 ID,不是商品或 SKU ID。"
516
+ },
517
+ "title": {
518
+ "type": "string",
519
+ "description": "成交商品名称,允许空文本。"
520
+ },
521
+ "quantity": {
522
+ "type": "integer",
523
+ "minimum": 0,
524
+ "maximum": 9007199254740991,
525
+ "description": "本交易行商品数量,不是库存。"
526
+ },
527
+ "item_id": {
528
+ "$ref": "#/definitions/id",
529
+ "description": "OneID商品 ID;同一商品在分店及渠道间保持一致。"
530
+ },
531
+ "sku_id": {
532
+ "$ref": "#/definitions/sku_id",
533
+ "description": "OneID商品规格 ID,与所属商品一起解释。"
534
+ },
535
+ "channel_item_id": {
536
+ "$ref": "#/definitions/id",
537
+ "description": "历史交易的店铺渠道商品 ID,不能代替OneID。"
538
+ },
539
+ "channel_sku_id": {
540
+ "$ref": "#/definitions/sku_id",
541
+ "description": "历史交易的店铺渠道规格 ID,不能代替统一规格。"
542
+ },
543
+ "unitPrice": {
544
+ "$ref": "#/definitions/money"
545
+ },
546
+ "payment": {
547
+ "$ref": "#/definitions/money",
548
+ "description": "交易明细分摊应付/支付价格,不推导到账。"
549
+ },
550
+ "isPresent": {
551
+ "type": "boolean",
552
+ "description": "true 为赠品,false 为非赠品,缺失不补 false。"
553
+ },
554
+ "isCombo": {
555
+ "type": "boolean",
556
+ "description": "true 是套餐主行,false 不是;不表示已取得全部套餐子品。"
557
+ }
558
+ },
559
+ "required": [
560
+ "oid",
561
+ "title",
562
+ "quantity"
563
+ ]
564
+ },
565
+ "payment": {
566
+ "type": "object",
567
+ "additionalProperties": false,
568
+ "properties": {
569
+ "totalFee": {
570
+ "$ref": "#/definitions/money",
571
+ "description": "商品总价,元;不从其他金额推算。"
572
+ },
573
+ "postFee": {
574
+ "$ref": "#/definitions/money",
575
+ "description": "运费,元。"
576
+ },
577
+ "payment": {
578
+ "$ref": "#/definitions/money",
579
+ "description": "列表返回的应付/支付价格,元;不补成详情 realPayment,不推导到账、净收入或退款。"
580
+ }
581
+ },
582
+ "required": [
583
+ "totalFee",
584
+ "postFee",
585
+ "payment"
586
+ ]
587
+ },
588
+ "buyer": {
589
+ "type": "object",
590
+ "additionalProperties": false,
591
+ "properties": {
592
+ "yzOpenId": {
593
+ "type": "string",
594
+ "description": "有赞客户开放标识,不是手机号、微信 openId 或员工 ID。"
595
+ }
596
+ },
597
+ "required": [],
598
+ "minProperties": 1
599
+ },
600
+ "address": {
601
+ "type": "object",
602
+ "additionalProperties": false,
603
+ "properties": {
604
+ "receiverName": {
605
+ "type": "string",
606
+ "description": "接口实际返回的收货人姓名,不主动解密。"
607
+ },
608
+ "receiverPhone": {
609
+ "type": "string",
610
+ "description": "接口实际返回的收货电话,不保证明文。"
611
+ },
612
+ "province": {
613
+ "type": "string",
614
+ "description": "省。"
615
+ },
616
+ "city": {
617
+ "type": "string",
618
+ "description": "市。"
619
+ },
620
+ "district": {
621
+ "type": "string",
622
+ "description": "区。"
623
+ },
624
+ "address": {
625
+ "type": "string",
626
+ "description": "订单收货要求中的详细地址,不是运单实时目的地。"
627
+ },
628
+ "postalCode": {
629
+ "type": "string",
630
+ "description": "邮政编码。"
631
+ }
632
+ },
633
+ "required": [],
634
+ "minProperties": 1
635
+ },
636
+ "remark": {
637
+ "type": "object",
638
+ "additionalProperties": false,
639
+ "properties": {
640
+ "buyerMessage": {
641
+ "type": "string",
642
+ "description": "买家留言,空文本保留。"
643
+ },
644
+ "tradeMemo": {
645
+ "type": "string",
646
+ "description": "商家备注,空文本保留。"
647
+ }
648
+ },
649
+ "required": [],
650
+ "minProperties": 1
651
+ },
652
+ "source": {
653
+ "type": "object",
654
+ "additionalProperties": false,
655
+ "properties": {
656
+ "isOfflineOrder": {
657
+ "type": "boolean",
658
+ "description": "true 是线下来源,false 是非线下来源。"
659
+ },
660
+ "bookKey": {
661
+ "type": "string",
662
+ "description": "订单识别码,与交易订单号不同。"
663
+ }
664
+ },
665
+ "required": [],
666
+ "minProperties": 1
667
+ },
668
+ "aftersale": {
669
+ "type": "object",
670
+ "additionalProperties": false,
671
+ "properties": {
672
+ "refundState": {
673
+ "type": "integer",
674
+ "minimum": -9007199254740991,
675
+ "maximum": 9007199254740991,
676
+ "description": "订单退款金额状态:0未退款、1部分退款中瞬态、2部分退款成功、11全额退款中瞬态、12全额退款成功;未知安全整数保留,不表示售后处理状态。"
677
+ }
678
+ },
679
+ "required": [
680
+ "refundState"
681
+ ]
682
+ },
683
+ "fulfillment": {
684
+ "type": "object",
685
+ "additionalProperties": false,
686
+ "properties": {
687
+ "deliveryType": {
688
+ "type": "string",
689
+ "enum": [
690
+ "EXPRESS",
691
+ "SELF_FETCH",
692
+ "LOCAL_DELIVERY",
693
+ "VIRTUAL"
694
+ ],
695
+ "description": "EXPRESS=快递、SELF_FETCH=自提、LOCAL_DELIVERY=同城配送、VIRTUAL=无需发货;无法识别的配送方式整体失败。"
696
+ }
697
+ },
698
+ "required": [
699
+ "deliveryType"
700
+ ]
701
+ },
702
+ "orderRow": {
703
+ "type": "object",
704
+ "additionalProperties": false,
705
+ "properties": {
706
+ "order": {
707
+ "$ref": "#/definitions/order"
708
+ },
709
+ "items": {
710
+ "type": "array",
711
+ "items": {
712
+ "$ref": "#/definitions/orderItem"
713
+ }
714
+ },
715
+ "payment": {
716
+ "$ref": "#/definitions/payment"
717
+ },
718
+ "buyer": {
719
+ "$ref": "#/definitions/buyer"
720
+ },
721
+ "address": {
722
+ "$ref": "#/definitions/address"
723
+ },
724
+ "remark": {
725
+ "$ref": "#/definitions/remark"
726
+ },
727
+ "source": {
728
+ "$ref": "#/definitions/source"
729
+ },
730
+ "aftersale": {
731
+ "$ref": "#/definitions/aftersale"
732
+ },
733
+ "fulfillment": {
734
+ "$ref": "#/definitions/fulfillment"
735
+ }
736
+ },
737
+ "required": [
738
+ "order"
739
+ ]
740
+ },
741
+ "pagination": {
742
+ "type": "object",
743
+ "additionalProperties": false,
744
+ "properties": {
745
+ "pageNo": {
746
+ "type": "integer",
747
+ "minimum": 1,
748
+ "description": "本次结果对应的页码。"
749
+ },
750
+ "pageSize": {
751
+ "type": "integer",
752
+ "minimum": 1,
753
+ "description": "本次生效的每页容量,由请求指定。"
754
+ },
755
+ "returned": {
756
+ "type": "integer",
757
+ "minimum": 0,
758
+ "description": "本次响应中 data.orders 的数组长度,不是匹配总数、累计条数或嵌套记录数。"
759
+ },
760
+ "hasMore": {
761
+ "type": [
762
+ "boolean",
763
+ "null"
764
+ ],
765
+ "description": "true 表示还有后续页,false 表示已确认没有后续页;无法确定时为 null,不以空页或短页推算。"
766
+ },
767
+ "total": {
768
+ "type": "integer",
769
+ "minimum": 0,
770
+ "description": "匹配本次查询条件的总记录数,不是当前页返回条数;上游未提供可确认总数时省略。"
771
+ },
772
+ "nextPageNo": {
773
+ "type": [
774
+ "integer",
775
+ "null"
776
+ ],
777
+ "minimum": 1,
778
+ "maximum": 100,
779
+ "description": "已确认且未超过页码上限的下一页;无法确认或到达上限时为 null。"
780
+ },
781
+ "windowLimitReached": {
782
+ "type": "boolean",
783
+ "description": "true表示已到100页CLI窗口且尚未确认取完;保留原筛选并缩小范围,不请求第101页,不表示已读全集。"
784
+ }
785
+ },
786
+ "required": [
787
+ "pageNo",
788
+ "pageSize",
789
+ "returned",
790
+ "hasMore",
791
+ "nextPageNo",
792
+ "windowLimitReached"
793
+ ],
794
+ "description": "本次返回页面的页码、容量、记录数和后页信号。"
795
+ },
796
+ "bindingRequest": {
797
+ "type": "object",
798
+ "additionalProperties": false,
799
+ "properties": {
800
+ "method": {
801
+ "const": "POST"
802
+ },
803
+ "path": {
804
+ "const": "youzan.shop.basic.get/3.0.0"
805
+ },
806
+ "body": {
807
+ "type": "object",
808
+ "additionalProperties": false,
809
+ "properties": {},
810
+ "required": []
811
+ }
812
+ },
813
+ "required": [
814
+ "method",
815
+ "path",
816
+ "body"
817
+ ]
818
+ },
819
+ "listRequest": {
820
+ "type": "object",
821
+ "additionalProperties": false,
822
+ "properties": {
823
+ "method": {
824
+ "const": "POST"
825
+ },
826
+ "path": {
827
+ "const": "youzan.trades.sold.get/4.0.4"
828
+ },
829
+ "body": {
830
+ "type": "object",
831
+ "additionalProperties": false,
832
+ "properties": {
833
+ "node_kdt_id": {
834
+ "type": "integer"
835
+ },
836
+ "page_no": {
837
+ "type": "integer"
838
+ },
839
+ "page_size": {
840
+ "type": "integer"
841
+ },
842
+ "tid": {
843
+ "$ref": "#/definitions/orderNo",
844
+ "description": "精确交易订单号。"
845
+ },
846
+ "yz_open_id": {
847
+ "type": "string",
848
+ "minLength": 1,
849
+ "description": "客户统一标识,非员工ID或手机号,非空文本。"
850
+ },
851
+ "status": {
852
+ "type": "string",
853
+ "minLength": 1,
854
+ "enum": [
855
+ "WAIT_BUYER_PAY",
856
+ "WAIT_SELLER_SEND_GOODS",
857
+ "WAIT_BUYER_CONFIRM_GOODS",
858
+ "TRADE_SUCCESS",
859
+ "TRADE_CLOSED",
860
+ "TRADE_REFUND"
861
+ ],
862
+ "description": "WAIT_BUYER_PAY=等待买家付款,含适用预售定金或尾款;WAIT_SELLER_SEND_GOODS=等待卖家发货;WAIT_BUYER_CONFIRM_GOODS=等待买家确认收货;TRADE_SUCCESS=交易完成;TRADE_CLOSED=交易关闭;TRADE_REFUND=退款中,仅搜索条件,不是已知交易状态响应值。请求字符串,与响应字典分开,未知值拒绝。"
863
+ },
864
+ "type": {
865
+ "type": "string",
866
+ "minLength": 1,
867
+ "enum": [
868
+ "NORMAL",
869
+ "PEERPAY",
870
+ "GIFT",
871
+ "FX_CAIGOUDAN",
872
+ "PRESENT",
873
+ "WISH",
874
+ "QRCODE",
875
+ "QRCODE_3RD",
876
+ "FX_MERGED",
877
+ "VERIFIED",
878
+ "PINJIAN",
879
+ "REBATE",
880
+ "FX_QUANYUANDIAN",
881
+ "FX_DEPOSIT",
882
+ "PF",
883
+ "GROUP",
884
+ "HOTEL",
885
+ "TAKE_AWAY",
886
+ "CATERING_OFFLINE",
887
+ "CATERING_QRCODE",
888
+ "BEAUTY_APPOINTMENT",
889
+ "BEAUTY_SERVICE",
890
+ "KNOWLEDGE_PAY",
891
+ "GIFT_CARD"
892
+ ],
893
+ "description": "NORMAL=普通订单;PEERPAY=代付;GIFT=我要送人;FX_CAIGOUDAN=分销供货单;PRESENT=赠品;WISH=心愿单;QRCODE=二维码订单;QRCODE_3RD=线下收银台;FX_MERGED=合并付货款;VERIFIED=1分钱实名认证;PINJIAN=品鉴;REBATE=返利;FX_QUANYUANDIAN=全员开店;FX_DEPOSIT=分销保证金;PF=批发;GROUP=拼团;HOTEL=酒店;TAKE_AWAY=外卖;CATERING_OFFLINE=堂食点餐;CATERING_QRCODE=外卖买单;BEAUTY_APPOINTMENT=美业预约;BEAUTY_SERVICE=美业服务;KNOWLEDGE_PAY=知识付费;GIFT_CARD=礼品卡。请求字符串,与响应字典分开,未知值拒绝。"
894
+ },
895
+ "goods_id": {
896
+ "type": "integer",
897
+ "minimum": 1,
898
+ "maximum": 9007199254740991
899
+ },
900
+ "goods_title": {
901
+ "type": "string",
902
+ "minLength": 1,
903
+ "maxLength": 200,
904
+ "description": "商品名称模糊搜索,最长200字符为CLI预算。"
905
+ },
906
+ "receiver_phone": {
907
+ "type": "string",
908
+ "minLength": 1,
909
+ "maxLength": 20,
910
+ "description": "收货人电话,非买家手机号,最长20字符。"
911
+ },
912
+ "receiver_name": {
913
+ "type": "string",
914
+ "minLength": 1,
915
+ "maxLength": 50,
916
+ "description": "收货人姓名,最长50字符。"
917
+ },
918
+ "express_type": {
919
+ "type": "string",
920
+ "minLength": 1,
921
+ "enum": [
922
+ "EXPRESS",
923
+ "SELF_FETCH",
924
+ "LOCAL_DELIVERY"
925
+ ],
926
+ "description": "EXPRESS=快递发货;SELF_FETCH=到店自提;LOCAL_DELIVERY=同城配送。请求字符串,与响应字典分开,未知值拒绝。"
927
+ },
928
+ "keywords": {
929
+ "type": "string",
930
+ "minLength": 1,
931
+ "maxLength": 200,
932
+ "description": "订单号、收货人手机或后四位,最长200字符为CLI预算。"
933
+ },
934
+ "start_created": {
935
+ "type": "string",
936
+ "format": "beijing-date-time",
937
+ "description": "秒精度北京时间文本。"
938
+ },
939
+ "end_created": {
940
+ "type": "string",
941
+ "format": "beijing-date-time",
942
+ "description": "秒精度北京时间文本。"
943
+ },
944
+ "start_update": {
945
+ "type": "string",
946
+ "format": "beijing-date-time",
947
+ "description": "秒精度北京时间文本。"
948
+ },
949
+ "end_update": {
950
+ "type": "string",
951
+ "format": "beijing-date-time",
952
+ "description": "秒精度北京时间文本。"
953
+ },
954
+ "start_pay": {
955
+ "type": "string",
956
+ "format": "beijing-date-time",
957
+ "description": "秒精度北京时间文本。"
958
+ },
959
+ "end_pay": {
960
+ "type": "string",
961
+ "format": "beijing-date-time",
962
+ "description": "秒精度北京时间文本。"
963
+ },
964
+ "start_success": {
965
+ "type": "string",
966
+ "format": "beijing-date-time",
967
+ "description": "秒精度北京时间文本。"
968
+ },
969
+ "end_success": {
970
+ "type": "string",
971
+ "format": "beijing-date-time",
972
+ "description": "秒精度北京时间文本。"
973
+ },
974
+ "delivery_start_time": {
975
+ "type": "string",
976
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}-\\d{2}-\\d{2}-\\d{2}$",
977
+ "description": "配送时间按字段定义显式编码为 yyyy-MM-dd-HH-mm-ss。"
978
+ },
979
+ "delivery_end_time": {
980
+ "type": "string",
981
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}-\\d{2}-\\d{2}-\\d{2}$",
982
+ "description": "配送时间按字段定义显式编码为 yyyy-MM-dd-HH-mm-ss。"
983
+ }
984
+ },
985
+ "required": [
986
+ "node_kdt_id",
987
+ "page_no",
988
+ "page_size"
989
+ ]
990
+ }
991
+ },
992
+ "required": [
993
+ "method",
994
+ "path",
995
+ "body"
996
+ ]
997
+ },
998
+ "nonemptyText": {
999
+ "type": "string",
1000
+ "minLength": 1,
1001
+ "pattern": "\\S",
1002
+ "description": "非空文本标识或状态;保留业务空格,不解密。"
1003
+ },
1004
+ "sku_id": {
1005
+ "type": "string",
1006
+ "pattern": "^\\d+$",
1007
+ "description": "规格 ID 字符串,可为 0;统一规格与渠道规格不可互换。"
1008
+ },
1009
+ "diagnosticExpected": {
1010
+ "type": "object",
1011
+ "additionalProperties": false,
1012
+ "required": [],
1013
+ "properties": {
1014
+ "type": {
1015
+ "anyOf": [
1016
+ {
1017
+ "type": "string",
1018
+ "description": "预期的 JSON 类型。"
1019
+ },
1020
+ {
1021
+ "type": "array",
1022
+ "items": {
1023
+ "type": "string",
1024
+ "description": "预期的 JSON 类型。"
1025
+ }
1026
+ }
1027
+ ],
1028
+ "description": "同版模型允许的类型。"
1029
+ },
1030
+ "enum": {
1031
+ "type": "array",
1032
+ "items": {
1033
+ "anyOf": [
1034
+ {
1035
+ "type": "string"
1036
+ },
1037
+ {
1038
+ "type": "number"
1039
+ },
1040
+ {
1041
+ "type": "boolean"
1042
+ },
1043
+ {
1044
+ "type": "null"
1045
+ }
1046
+ ],
1047
+ "description": "契约声明的静态标量约束。"
1048
+ },
1049
+ "description": "同版模型允许的静态值。"
1050
+ },
1051
+ "const": {
1052
+ "anyOf": [
1053
+ {
1054
+ "type": "string"
1055
+ },
1056
+ {
1057
+ "type": "number"
1058
+ },
1059
+ {
1060
+ "type": "boolean"
1061
+ },
1062
+ {
1063
+ "type": "null"
1064
+ }
1065
+ ],
1066
+ "description": "契约声明的静态标量约束。"
1067
+ },
1068
+ "minimum": {
1069
+ "type": "number",
1070
+ "description": "包含的最小值。"
1071
+ },
1072
+ "maximum": {
1073
+ "type": "number",
1074
+ "description": "包含的最大值。"
1075
+ },
1076
+ "exclusiveMinimum": {
1077
+ "type": "number",
1078
+ "description": "不包含的最小值。"
1079
+ },
1080
+ "exclusiveMaximum": {
1081
+ "type": "number",
1082
+ "description": "不包含的最大值。"
1083
+ },
1084
+ "minLength": {
1085
+ "type": "integer",
1086
+ "description": "最少字符数。"
1087
+ },
1088
+ "maxLength": {
1089
+ "type": "integer",
1090
+ "description": "最多字符数。"
1091
+ },
1092
+ "minItems": {
1093
+ "type": "integer",
1094
+ "description": "最少元素数。"
1095
+ },
1096
+ "maxItems": {
1097
+ "type": "integer",
1098
+ "description": "最多元素数。"
1099
+ },
1100
+ "format": {
1101
+ "type": "string",
1102
+ "description": "同版模型声明的格式。"
1103
+ },
1104
+ "pattern": {
1105
+ "type": "string",
1106
+ "description": "同版模型声明的字符约束。"
1107
+ },
1108
+ "additionalProperties": {
1109
+ "const": false,
1110
+ "description": "对象拒绝契约以外的属性。"
1111
+ },
1112
+ "contains": {
1113
+ "type": "object",
1114
+ "additionalProperties": false,
1115
+ "required": [
1116
+ "const"
1117
+ ],
1118
+ "properties": {
1119
+ "const": {
1120
+ "anyOf": [
1121
+ {
1122
+ "type": "string"
1123
+ },
1124
+ {
1125
+ "type": "number"
1126
+ },
1127
+ {
1128
+ "type": "boolean"
1129
+ },
1130
+ {
1131
+ "type": "null"
1132
+ }
1133
+ ],
1134
+ "description": "契约声明的静态标量约束。"
1135
+ }
1136
+ }
1137
+ },
1138
+ "items": {
1139
+ "type": "object",
1140
+ "additionalProperties": false,
1141
+ "required": [
1142
+ "enum"
1143
+ ],
1144
+ "properties": {
1145
+ "enum": {
1146
+ "type": "array",
1147
+ "items": {
1148
+ "anyOf": [
1149
+ {
1150
+ "type": "string"
1151
+ },
1152
+ {
1153
+ "type": "number"
1154
+ },
1155
+ {
1156
+ "type": "boolean"
1157
+ },
1158
+ {
1159
+ "type": "null"
1160
+ }
1161
+ ],
1162
+ "description": "契约声明的静态标量约束。"
1163
+ },
1164
+ "description": "元素允许的静态值。"
1165
+ }
1166
+ }
1167
+ }
1168
+ }
1169
+ },
1170
+ "diagnosticIssue": {
1171
+ "type": "object",
1172
+ "additionalProperties": false,
1173
+ "required": [
1174
+ "source",
1175
+ "reason"
1176
+ ],
1177
+ "properties": {
1178
+ "source": {
1179
+ "enum": [
1180
+ "argv",
1181
+ "input",
1182
+ "context",
1183
+ "output",
1184
+ "preview"
1185
+ ],
1186
+ "description": "问题所属的参数、输入、上下文、结果或预览模型。"
1187
+ },
1188
+ "path": {
1189
+ "type": "string",
1190
+ "description": "对应模型中的 JSON Pointer;不含原始输入或动态字典键。"
1191
+ },
1192
+ "option": {
1193
+ "type": "string",
1194
+ "description": "可定位时给出的已注册 CLI 选项。"
1195
+ },
1196
+ "reason": {
1197
+ "enum": [
1198
+ "required",
1199
+ "invalid_type",
1200
+ "invalid_choice",
1201
+ "out_of_range",
1202
+ "invalid_format",
1203
+ "conditional_required",
1204
+ "constraint",
1205
+ "unexpected_property",
1206
+ "unknown_option",
1207
+ "unknown_command",
1208
+ "excess_arguments",
1209
+ "missing_value"
1210
+ ],
1211
+ "description": "字段违反的约束类型,原始值不回显。"
1212
+ },
1213
+ "expected": {
1214
+ "$ref": "#/definitions/diagnosticExpected",
1215
+ "description": "同版契约的静态预期。"
1216
+ },
1217
+ "relatedPaths": {
1218
+ "type": "array",
1219
+ "items": {
1220
+ "type": "string",
1221
+ "description": "关联字段的 JSON Pointer。"
1222
+ },
1223
+ "description": "触发条件约束的关联字段。"
1224
+ }
1225
+ }
1226
+ },
1227
+ "diagnosticRecovery": {
1228
+ "type": "object",
1229
+ "additionalProperties": false,
1230
+ "required": [
1231
+ "action",
1232
+ "automaticBusinessRetry"
1233
+ ],
1234
+ "properties": {
1235
+ "action": {
1236
+ "enum": [
1237
+ "correct_input",
1238
+ "complete_authentication",
1239
+ "request_access_review",
1240
+ "stop_and_inspect"
1241
+ ],
1242
+ "description": "依次表示修正本地输入、补认证、核对权限或停止核查;仅是说明,不执行操作或授予权限。"
1243
+ },
1244
+ "automaticBusinessRetry": {
1245
+ "const": false,
1246
+ "description": "不据此自动重放业务请求。"
1247
+ }
1248
+ }
1249
+ },
1250
+ "diagnosticExecution": {
1251
+ "type": "object",
1252
+ "additionalProperties": false,
1253
+ "required": [
1254
+ "requestState",
1255
+ "coverage",
1256
+ "observedAttempts"
1257
+ ],
1258
+ "properties": {
1259
+ "requestState": {
1260
+ "enum": [
1261
+ "not_sent",
1262
+ "sent",
1263
+ "unknown"
1264
+ ],
1265
+ "description": "整次调用尚未发送、已有发送记录或无法排除未知请求;不代表业务完成。"
1266
+ },
1267
+ "coverage": {
1268
+ "enum": [
1269
+ "complete",
1270
+ "partial"
1271
+ ],
1272
+ "description": "请求观察覆盖全部已接入路径,或存在未观测路径;部分覆盖不能声明零请求。"
1273
+ },
1274
+ "observedAttempts": {
1275
+ "type": "integer",
1276
+ "minimum": 0,
1277
+ "maximum": 9007199254740991,
1278
+ "description": "本地已进入发送边界的观测次数下界,不是服务端执行次数。"
1279
+ }
1280
+ }
1281
+ }
1282
+ },
1283
+ "modules": {
1284
+ "order": {
1285
+ "base": true,
1286
+ "upstreamPath": "full_order_info_list[].full_order_info.order_info",
1287
+ "required": true,
1288
+ "description": "订单锚点、状态、业务类型与时间。"
1289
+ },
1290
+ "items": {
1291
+ "base": false,
1292
+ "upstreamPath": "full_order_info_list[].full_order_info.orders",
1293
+ "required": false,
1294
+ "description": "交易商品行。"
1295
+ },
1296
+ "payment": {
1297
+ "base": false,
1298
+ "upstreamPath": "full_order_info_list[].full_order_info.pay_info",
1299
+ "required": false,
1300
+ "description": "列表金额有限视图。"
1301
+ },
1302
+ "buyer": {
1303
+ "base": false,
1304
+ "upstreamPath": "full_order_info_list[].full_order_info.buyer_info",
1305
+ "required": false,
1306
+ "description": "客户统一标识。"
1307
+ },
1308
+ "address": {
1309
+ "base": false,
1310
+ "upstreamPath": "full_order_info_list[].full_order_info.address_info",
1311
+ "required": false,
1312
+ "description": "订单收货要求。"
1313
+ },
1314
+ "remark": {
1315
+ "base": false,
1316
+ "upstreamPath": "full_order_info_list[].full_order_info.remark_info",
1317
+ "required": false,
1318
+ "description": "买家留言与商家备注。"
1319
+ },
1320
+ "source": {
1321
+ "base": false,
1322
+ "upstreamPath": "full_order_info_list[].full_order_info.source_info",
1323
+ "required": false,
1324
+ "description": "线下来源标记。"
1325
+ },
1326
+ "aftersale": {
1327
+ "base": false,
1328
+ "upstreamPath": "full_order_info_list[].full_order_info.order_info.refund_state",
1329
+ "required": false,
1330
+ "description": "有限退款状态摘要。"
1331
+ },
1332
+ "fulfillment": {
1333
+ "base": false,
1334
+ "upstreamPath": "full_order_info_list[].full_order_info.order_info.express_type",
1335
+ "required": false,
1336
+ "description": "交付方式。"
1337
+ }
1338
+ },
1339
+ "api": {
1340
+ "method": "POST",
1341
+ "path": "youzan.trades.sold.get/4.0.4"
1342
+ },
1343
+ "success": {
1344
+ "description": "同一凭证核验目标店铺后仅一次列表查询;全部行的店铺、总部锚点、所选模块及分页观测一致才输出。"
1345
+ },
1346
+ "errors": {
1347
+ "description": "必需字段缺失、字段错型、不安全数字、非零额外金额精度或非零毫秒整体失败;paidAt 未取得时省略,其余 null 按字段契约拒绝。未知字段不进入校验。不猜订单不存在,不自动重试或换店;失败 stdout 为空,安全 stderr,传输中断 unknown。",
1348
+ "diagnosticsVersion": 2
1349
+ },
1350
+ "notes": [
1351
+ "基础 order 可返回 paidAt、isPaid。paidAt 未取得、空文本或 null 时省略,不证明未支付;非空错型、非法日期或非零毫秒失败。isPaid 未取得时省略,false 原样保留,非 boolean 失败;两者不从状态或金额推算。",
1352
+ "订单号通常为 E/V/C 开头加 23 位数字,仅供核对,不限定前缀、数字组合或 24 位长度;按原值传递。仅保留非空、无空白或控制字符和最多 128 字符的文本保护;服务端仍判断支持范围和对象归属。",
1353
+ "省略 --kdt-id 时使用当前上下文店铺;显式目标须满足当前店铺范围约束。至少一个明确筛选;include仅投影,最多一次店铺核验加一次列表请求。不自动重试、翻页、换身份或逐单详情补齐。",
1354
+ "本批默认以 CNY 计价,源为元的金额无损补齐两位十进制字符串,不新增币种字段、不换汇或跨币种汇总;这是用户确认的批次约定,不是官方币种保证。",
1355
+ "payment保留列表应付/支付价格含义,不提供详情realPayment、优惠或独立退款集合。",
1356
+ "累计响应10MiB、最终UTF-8输出含换行5MiB,超限整体失败;非流式内存保证。",
1357
+ "未知字段不扩大模型;未请求模块不校验;请求模块缺失、null或错型整体失败,合法零、false、空文本及实际空数组保留。",
1358
+ "应用凭证实测不证明店铺员工身份授权与权限隔离。",
1359
+ "商品行 item_id/sku_id 为OneID,channel_item_id/channel_sku_id 为历史渠道身份;oid仍为交易行,不用当前档案重写历史。",
1360
+ "历史统一商品或规格字段为空字符串时,省略对应OneID并保留明确渠道身份,不用渠道ID补造;null和其他错型仍失败。",
1361
+ "时间区间必须包含 .. 并显式两端;不接受旧成对参数或裸时间等值,非零毫秒在请求前拒绝。"
1362
+ ]
1363
+ }