@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,958 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "input": {
4
+ "type": "object",
5
+ "required": [
6
+ "kdtId",
7
+ "yzOpenId",
8
+ "include"
9
+ ],
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "kdtId": {
13
+ "$ref": "#/definitions/shopId"
14
+ },
15
+ "yzOpenId": {
16
+ "$ref": "#/definitions/customerId"
17
+ },
18
+ "include": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string",
22
+ "enum": [
23
+ "tags",
24
+ "benefit_cards",
25
+ "level_summary",
26
+ "credit",
27
+ "behavior",
28
+ "valuecard_gift",
29
+ "valuecard_balance",
30
+ "level",
31
+ "auth_info"
32
+ ]
33
+ },
34
+ "uniqueItems": true,
35
+ "description": "省略include选项后规范化为[];显式空值或空项不是省略。"
36
+ }
37
+ },
38
+ "description": "CLI 解析参数并完成必要上下文补全后的业务输入;不是直接传入 CLI 的 JSON。原始选项、必填条件和默认值见 options。"
39
+ },
40
+ "output": {
41
+ "type": "object",
42
+ "required": [
43
+ "data"
44
+ ],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "data": {
48
+ "type": "object",
49
+ "required": [
50
+ "user_base"
51
+ ],
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "user_base": {
55
+ "$ref": "#/definitions/user_base"
56
+ },
57
+ "tags": {
58
+ "$ref": "#/definitions/tags"
59
+ },
60
+ "benefit_cards": {
61
+ "$ref": "#/definitions/benefit_cards"
62
+ },
63
+ "level_summary": {
64
+ "$ref": "#/definitions/level_summary"
65
+ },
66
+ "credit": {
67
+ "$ref": "#/definitions/credit"
68
+ },
69
+ "behavior": {
70
+ "$ref": "#/definitions/behavior"
71
+ },
72
+ "valuecard_gift": {
73
+ "$ref": "#/definitions/valuecard_gift"
74
+ },
75
+ "valuecard_balance": {
76
+ "$ref": "#/definitions/valuecard_balance"
77
+ },
78
+ "level": {
79
+ "$ref": "#/definitions/level"
80
+ },
81
+ "auth_info": {
82
+ "$ref": "#/definitions/auth_info"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "preview": {
89
+ "type": "object",
90
+ "required": [
91
+ "method",
92
+ "path",
93
+ "body"
94
+ ],
95
+ "additionalProperties": false,
96
+ "properties": {
97
+ "method": {
98
+ "const": "POST"
99
+ },
100
+ "path": {
101
+ "const": "youzan.scrm.customer.detail.get/1.0.1"
102
+ },
103
+ "body": {
104
+ "type": "object",
105
+ "required": [
106
+ "kdt_id",
107
+ "yz_open_id",
108
+ "fields"
109
+ ],
110
+ "additionalProperties": false,
111
+ "properties": {
112
+ "kdt_id": {
113
+ "$ref": "#/definitions/shopId"
114
+ },
115
+ "yz_open_id": {
116
+ "$ref": "#/definitions/customerId"
117
+ },
118
+ "fields": {
119
+ "type": "string",
120
+ "minLength": 1
121
+ }
122
+ }
123
+ }
124
+ }
125
+ },
126
+ "error": {
127
+ "type": "object",
128
+ "required": [
129
+ "success",
130
+ "code",
131
+ "message",
132
+ "details"
133
+ ],
134
+ "additionalProperties": false,
135
+ "properties": {
136
+ "success": {
137
+ "const": false
138
+ },
139
+ "code": {
140
+ "const": -10001
141
+ },
142
+ "message": {
143
+ "type": "string",
144
+ "minLength": 1
145
+ },
146
+ "details": {
147
+ "type": "object",
148
+ "required": [
149
+ "category",
150
+ "stage",
151
+ "command",
152
+ "targetScope",
153
+ "requestState",
154
+ "nextStep",
155
+ "errorVersion",
156
+ "recovery",
157
+ "execution"
158
+ ],
159
+ "additionalProperties": false,
160
+ "properties": {
161
+ "category": {
162
+ "type": "string",
163
+ "enum": [
164
+ "parameter",
165
+ "configuration",
166
+ "permission",
167
+ "authentication",
168
+ "http",
169
+ "transport",
170
+ "business_rejected",
171
+ "protocol"
172
+ ]
173
+ },
174
+ "stage": {
175
+ "type": "string",
176
+ "enum": [
177
+ "input",
178
+ "context",
179
+ "scope",
180
+ "configuration",
181
+ "http",
182
+ "transport",
183
+ "response",
184
+ "customer",
185
+ "customer-model"
186
+ ]
187
+ },
188
+ "command": {
189
+ "const": "customer.customer.get"
190
+ },
191
+ "targetScope": {
192
+ "oneOf": [
193
+ {
194
+ "$ref": "#/definitions/scope"
195
+ },
196
+ {
197
+ "type": "object",
198
+ "maxProperties": 0
199
+ }
200
+ ]
201
+ },
202
+ "requestState": {
203
+ "type": "string",
204
+ "enum": [
205
+ "not_sent",
206
+ "sent",
207
+ "unknown"
208
+ ],
209
+ "description": "not_sent确认未发送;sent已取得响应但不证明业务成功;unknown发送或结果无法确认。"
210
+ },
211
+ "nextStep": {
212
+ "type": "string",
213
+ "minLength": 1
214
+ },
215
+ "api": {
216
+ "type": "string",
217
+ "minLength": 1
218
+ },
219
+ "httpStatus": {
220
+ "type": "integer",
221
+ "minimum": 100,
222
+ "maximum": 599
223
+ },
224
+ "businessCode": {
225
+ "oneOf": [
226
+ {
227
+ "$ref": "#/definitions/safeInteger"
228
+ },
229
+ {
230
+ "type": "string",
231
+ "pattern": "^-?[0-9]{1,12}$"
232
+ }
233
+ ]
234
+ },
235
+ "gatewayCode": {
236
+ "oneOf": [
237
+ {
238
+ "$ref": "#/definitions/safeInteger"
239
+ },
240
+ {
241
+ "type": "string",
242
+ "pattern": "^-?[0-9]{1,12}$"
243
+ }
244
+ ]
245
+ },
246
+ "trace_id": {
247
+ "type": "string",
248
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
249
+ },
250
+ "request_id": {
251
+ "type": "string",
252
+ "pattern": "^[a-zA-Z0-9_-]{1,128}$"
253
+ },
254
+ "errorVersion": {
255
+ "const": 2,
256
+ "description": "本命令采用错误诊断协议第二版。"
257
+ },
258
+ "issues": {
259
+ "type": "array",
260
+ "minItems": 1,
261
+ "maxItems": 16,
262
+ "items": {
263
+ "$ref": "#/definitions/diagnosticIssue"
264
+ },
265
+ "description": "最多十六个已定位问题,不包含收到的原值。"
266
+ },
267
+ "issuesTruncated": {
268
+ "const": true,
269
+ "description": "问题超过返回上限,当前列表没有穷尽全部问题。"
270
+ },
271
+ "recovery": {
272
+ "$ref": "#/definitions/diagnosticRecovery",
273
+ "description": "受限的恢复说明,不会自动执行。"
274
+ },
275
+ "execution": {
276
+ "$ref": "#/definitions/diagnosticExecution",
277
+ "description": "整次调用的请求观察,独立于失败阶段的 requestState。"
278
+ }
279
+ }
280
+ }
281
+ }
282
+ },
283
+ "definitions": {
284
+ "safeInteger": {
285
+ "type": "integer",
286
+ "minimum": -9007199254740991,
287
+ "maximum": 9007199254740991,
288
+ "description": "JSON安全整数;原始long超出安全范围时失败,不把已舍入数值转成字符串。"
289
+ },
290
+ "shopId": {
291
+ "type": "integer",
292
+ "minimum": 1,
293
+ "maximum": 9007199254740991,
294
+ "description": "目标店铺 ID;省略 --kdt-id 时取当前上下文 shopId,显式非法值不回退;非总部须与上下文 shopId 一致。"
295
+ },
296
+ "customerId": {
297
+ "type": "string",
298
+ "minLength": 1,
299
+ "description": "返回的客户yzOpenId须与请求完全一致;不得用请求值补造响应。"
300
+ },
301
+ "yuanMoney": {
302
+ "type": "string",
303
+ "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
304
+ "description": "默认人民币(CNY)的元十进制金额字符串,固定两位;不执行换汇或浮点舍入。"
305
+ },
306
+ "user_base": {
307
+ "type": "object",
308
+ "required": [
309
+ "yz_open_id"
310
+ ],
311
+ "additionalProperties": false,
312
+ "properties": {
313
+ "yz_open_id": {
314
+ "$ref": "#/definitions/customerId"
315
+ },
316
+ "name": {
317
+ "type": "string",
318
+ "description": "客户姓名"
319
+ },
320
+ "show_name": {
321
+ "type": "string",
322
+ "description": "展示姓名(包含展示逻辑:客户姓名=>手机号=>微信昵称=>匿名用户)"
323
+ },
324
+ "mobile": {
325
+ "type": "string",
326
+ "description": "客户联系手机号"
327
+ },
328
+ "gender": {
329
+ "$ref": "#/definitions/safeInteger",
330
+ "description": "客户性别, 1:男,2:女"
331
+ },
332
+ "created_at": {
333
+ "type": "string",
334
+ "format": "beijing-date-time-ms",
335
+ "$comment": "upstream-time:seconds",
336
+ "description": "创建时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。"
337
+ }
338
+ },
339
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
340
+ },
341
+ "tags": {
342
+ "type": "object",
343
+ "required": [
344
+ "tags"
345
+ ],
346
+ "additionalProperties": false,
347
+ "properties": {
348
+ "tags": {
349
+ "type": "array",
350
+ "items": {
351
+ "type": "object",
352
+ "required": [
353
+ "id"
354
+ ],
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "id": {
358
+ "$ref": "#/definitions/safeInteger",
359
+ "description": "标签id"
360
+ },
361
+ "name": {
362
+ "type": "string",
363
+ "description": "标签名"
364
+ }
365
+ },
366
+ "description": "元素只输出本视图选择的属性;未选择的源属性忽略,必需身份字段缺失或已选属性错型失败。"
367
+ },
368
+ "description": "客户标签"
369
+ }
370
+ },
371
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
372
+ },
373
+ "benefit_cards": {
374
+ "type": "object",
375
+ "required": [
376
+ "cards"
377
+ ],
378
+ "additionalProperties": false,
379
+ "properties": {
380
+ "cards": {
381
+ "type": "array",
382
+ "items": {
383
+ "type": "object",
384
+ "required": [
385
+ "id"
386
+ ],
387
+ "additionalProperties": false,
388
+ "properties": {
389
+ "id": {
390
+ "$ref": "#/definitions/safeInteger",
391
+ "description": "客户卡摘要标识;不能直接当作权益卡 cardAlias 或客户持卡 cardNo 使用。"
392
+ },
393
+ "name": {
394
+ "type": "string",
395
+ "description": "权益卡名称"
396
+ },
397
+ "begin_at": {
398
+ "anyOf": [
399
+ {
400
+ "type": "string",
401
+ "format": "beijing-date-time-ms"
402
+ },
403
+ {
404
+ "const": ""
405
+ }
406
+ ],
407
+ "$comment": "upstream-time:text:empty",
408
+ "description": "权益卡有效期开始时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。业务哨兵原值保留:['']。"
409
+ },
410
+ "end_at": {
411
+ "anyOf": [
412
+ {
413
+ "type": "string",
414
+ "format": "beijing-date-time-ms"
415
+ },
416
+ {
417
+ "const": ""
418
+ }
419
+ ],
420
+ "$comment": "upstream-time:text:empty",
421
+ "description": "权益卡有效期结束时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。业务哨兵原值保留:['']。"
422
+ }
423
+ },
424
+ "description": "元素只输出本视图选择的属性;未选择的源属性忽略,必需身份字段缺失或已选属性错型失败。"
425
+ },
426
+ "description": "客户会员卡"
427
+ }
428
+ },
429
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
430
+ },
431
+ "level_summary": {
432
+ "type": "object",
433
+ "required": [
434
+ "level"
435
+ ],
436
+ "additionalProperties": false,
437
+ "properties": {
438
+ "level": {
439
+ "$ref": "#/definitions/safeInteger",
440
+ "description": "本次取得的单值等级;不表示权益等级,不与 level_infos 自动换算。"
441
+ }
442
+ },
443
+ "description": "客户单值等级摘要;与免费、付费等级关系的对应未明确,不能据此补造等级记录或推算会员身份。"
444
+ },
445
+ "credit": {
446
+ "type": "object",
447
+ "required": [
448
+ "points"
449
+ ],
450
+ "additionalProperties": false,
451
+ "properties": {
452
+ "points": {
453
+ "$ref": "#/definitions/safeInteger",
454
+ "description": "客户积分"
455
+ }
456
+ },
457
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
458
+ },
459
+ "behavior": {
460
+ "type": "object",
461
+ "required": [
462
+ "trade_count",
463
+ "total_trade_amount"
464
+ ],
465
+ "additionalProperties": false,
466
+ "properties": {
467
+ "trade_count": {
468
+ "$ref": "#/definitions/safeInteger",
469
+ "description": "购买次数"
470
+ },
471
+ "total_trade_amount": {
472
+ "$ref": "#/definitions/yuanMoney",
473
+ "$comment": "upstream-money:fen",
474
+ "description": "购买总金额,单位:分;源为分安全整数,CLI精确转换为元两位字符串;不补零。"
475
+ },
476
+ "last_trade_at": {
477
+ "anyOf": [
478
+ {
479
+ "type": "string",
480
+ "format": "beijing-date-time-ms"
481
+ },
482
+ {
483
+ "const": 0
484
+ }
485
+ ],
486
+ "$comment": "upstream-time:seconds:zero",
487
+ "description": "最后购买时间;北京时间 YYYY-MM-DD HH:mm:ss.SSS。业务哨兵原值保留:[0]。"
488
+ },
489
+ "refund_count": {
490
+ "$ref": "#/definitions/safeInteger",
491
+ "description": "退款次数"
492
+ },
493
+ "refund_trade_amount": {
494
+ "$ref": "#/definitions/yuanMoney",
495
+ "$comment": "upstream-money:fen",
496
+ "description": "退款总金额,单位:分;源为分安全整数,CLI精确转换为元两位字符串;不补零。"
497
+ }
498
+ },
499
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
500
+ },
501
+ "valuecard_gift": {
502
+ "type": "object",
503
+ "required": [
504
+ "totalBalance"
505
+ ],
506
+ "additionalProperties": false,
507
+ "properties": {
508
+ "totalBalance": {
509
+ "$ref": "#/definitions/yuanMoney",
510
+ "$comment": "upstream-money:fen",
511
+ "description": "礼品卡余额摘要,人民币元两位文本;不提供本金与赠金拆分,不证明等于逐卡余额之和。"
512
+ }
513
+ },
514
+ "description": "客户档案返回的分类余额摘要;归集范围未明确,不能与另一分类相加为客户总资产。"
515
+ },
516
+ "valuecard_balance": {
517
+ "type": "object",
518
+ "required": [
519
+ "totalBalance"
520
+ ],
521
+ "additionalProperties": false,
522
+ "properties": {
523
+ "totalBalance": {
524
+ "$ref": "#/definitions/yuanMoney",
525
+ "$comment": "upstream-money:fen",
526
+ "description": "余额卡余额摘要,人民币元两位文本;不提供本金与赠金拆分,不证明等于逐卡余额之和。"
527
+ }
528
+ },
529
+ "description": "客户档案返回的分类余额摘要;归集范围未明确,不能与另一分类相加为客户总资产。"
530
+ },
531
+ "level": {
532
+ "type": "object",
533
+ "required": [
534
+ "level_infos"
535
+ ],
536
+ "additionalProperties": false,
537
+ "properties": {
538
+ "level_infos": {
539
+ "type": "array",
540
+ "items": {
541
+ "type": "object",
542
+ "required": [
543
+ "level_value",
544
+ "level_type"
545
+ ],
546
+ "additionalProperties": false,
547
+ "properties": {
548
+ "level_value": {
549
+ "$ref": "#/definitions/safeInteger",
550
+ "description": "等级值"
551
+ },
552
+ "level_alias": {
553
+ "type": "string",
554
+ "description": "等级别名设置"
555
+ },
556
+ "level_name": {
557
+ "type": "string",
558
+ "description": "等级名称"
559
+ },
560
+ "level_type": {
561
+ "$ref": "#/definitions/safeInteger",
562
+ "description": "等级类型 1:免费等级,2:付费等级"
563
+ }
564
+ },
565
+ "description": "元素只输出本视图选择的属性;未选择的源属性忽略,必需身份字段缺失或已选属性错型失败。"
566
+ },
567
+ "description": "本次返回的免费、付费等级记录,保留顺序;不保证包含完整等级历史。"
568
+ }
569
+ },
570
+ "description": "本次取得的等级关系摘要;缺失不从单值摘要补齐。"
571
+ },
572
+ "auth_info": {
573
+ "type": "object",
574
+ "required": [
575
+ "is_mobile_auth"
576
+ ],
577
+ "additionalProperties": false,
578
+ "properties": {
579
+ "is_mobile_auth": {
580
+ "type": "boolean",
581
+ "description": "手机号码是否授权 true:已授权 false:未授权"
582
+ }
583
+ },
584
+ "description": "CLI已确认的有限字段视图;required为本视图成功所需核心内容,其余明细允许省略但返回时须类型正确。省略只表示未取得,不推断无值/权限;null不在本视图类型内。"
585
+ },
586
+ "scope": {
587
+ "type": "object",
588
+ "required": [
589
+ "kdtId"
590
+ ],
591
+ "additionalProperties": false,
592
+ "properties": {
593
+ "kdtId": {
594
+ "$ref": "#/definitions/shopId"
595
+ }
596
+ }
597
+ },
598
+ "diagnosticExpected": {
599
+ "type": "object",
600
+ "additionalProperties": false,
601
+ "required": [],
602
+ "properties": {
603
+ "type": {
604
+ "anyOf": [
605
+ {
606
+ "type": "string",
607
+ "description": "预期的 JSON 类型。"
608
+ },
609
+ {
610
+ "type": "array",
611
+ "items": {
612
+ "type": "string",
613
+ "description": "预期的 JSON 类型。"
614
+ }
615
+ }
616
+ ],
617
+ "description": "同版模型允许的类型。"
618
+ },
619
+ "enum": {
620
+ "type": "array",
621
+ "items": {
622
+ "anyOf": [
623
+ {
624
+ "type": "string"
625
+ },
626
+ {
627
+ "type": "number"
628
+ },
629
+ {
630
+ "type": "boolean"
631
+ },
632
+ {
633
+ "type": "null"
634
+ }
635
+ ],
636
+ "description": "契约声明的静态标量约束。"
637
+ },
638
+ "description": "同版模型允许的静态值。"
639
+ },
640
+ "const": {
641
+ "anyOf": [
642
+ {
643
+ "type": "string"
644
+ },
645
+ {
646
+ "type": "number"
647
+ },
648
+ {
649
+ "type": "boolean"
650
+ },
651
+ {
652
+ "type": "null"
653
+ }
654
+ ],
655
+ "description": "契约声明的静态标量约束。"
656
+ },
657
+ "minimum": {
658
+ "type": "number",
659
+ "description": "包含的最小值。"
660
+ },
661
+ "maximum": {
662
+ "type": "number",
663
+ "description": "包含的最大值。"
664
+ },
665
+ "exclusiveMinimum": {
666
+ "type": "number",
667
+ "description": "不包含的最小值。"
668
+ },
669
+ "exclusiveMaximum": {
670
+ "type": "number",
671
+ "description": "不包含的最大值。"
672
+ },
673
+ "minLength": {
674
+ "type": "integer",
675
+ "description": "最少字符数。"
676
+ },
677
+ "maxLength": {
678
+ "type": "integer",
679
+ "description": "最多字符数。"
680
+ },
681
+ "minItems": {
682
+ "type": "integer",
683
+ "description": "最少元素数。"
684
+ },
685
+ "maxItems": {
686
+ "type": "integer",
687
+ "description": "最多元素数。"
688
+ },
689
+ "format": {
690
+ "type": "string",
691
+ "description": "同版模型声明的格式。"
692
+ },
693
+ "pattern": {
694
+ "type": "string",
695
+ "description": "同版模型声明的字符约束。"
696
+ },
697
+ "additionalProperties": {
698
+ "const": false,
699
+ "description": "对象拒绝契约以外的属性。"
700
+ },
701
+ "contains": {
702
+ "type": "object",
703
+ "additionalProperties": false,
704
+ "required": [
705
+ "const"
706
+ ],
707
+ "properties": {
708
+ "const": {
709
+ "anyOf": [
710
+ {
711
+ "type": "string"
712
+ },
713
+ {
714
+ "type": "number"
715
+ },
716
+ {
717
+ "type": "boolean"
718
+ },
719
+ {
720
+ "type": "null"
721
+ }
722
+ ],
723
+ "description": "契约声明的静态标量约束。"
724
+ }
725
+ }
726
+ },
727
+ "items": {
728
+ "type": "object",
729
+ "additionalProperties": false,
730
+ "required": [
731
+ "enum"
732
+ ],
733
+ "properties": {
734
+ "enum": {
735
+ "type": "array",
736
+ "items": {
737
+ "anyOf": [
738
+ {
739
+ "type": "string"
740
+ },
741
+ {
742
+ "type": "number"
743
+ },
744
+ {
745
+ "type": "boolean"
746
+ },
747
+ {
748
+ "type": "null"
749
+ }
750
+ ],
751
+ "description": "契约声明的静态标量约束。"
752
+ },
753
+ "description": "元素允许的静态值。"
754
+ }
755
+ }
756
+ }
757
+ }
758
+ },
759
+ "diagnosticIssue": {
760
+ "type": "object",
761
+ "additionalProperties": false,
762
+ "required": [
763
+ "source",
764
+ "reason"
765
+ ],
766
+ "properties": {
767
+ "source": {
768
+ "enum": [
769
+ "argv",
770
+ "input",
771
+ "context",
772
+ "output",
773
+ "preview"
774
+ ],
775
+ "description": "问题所属的参数、输入、上下文、结果或预览模型。"
776
+ },
777
+ "path": {
778
+ "type": "string",
779
+ "description": "对应模型中的 JSON Pointer;不含原始输入或动态字典键。"
780
+ },
781
+ "option": {
782
+ "type": "string",
783
+ "description": "可定位时给出的已注册 CLI 选项。"
784
+ },
785
+ "reason": {
786
+ "enum": [
787
+ "required",
788
+ "invalid_type",
789
+ "invalid_choice",
790
+ "out_of_range",
791
+ "invalid_format",
792
+ "conditional_required",
793
+ "constraint",
794
+ "unexpected_property",
795
+ "unknown_option",
796
+ "unknown_command",
797
+ "excess_arguments",
798
+ "missing_value"
799
+ ],
800
+ "description": "字段违反的约束类型,原始值不回显。"
801
+ },
802
+ "expected": {
803
+ "$ref": "#/definitions/diagnosticExpected",
804
+ "description": "同版契约的静态预期。"
805
+ },
806
+ "relatedPaths": {
807
+ "type": "array",
808
+ "items": {
809
+ "type": "string",
810
+ "description": "关联字段的 JSON Pointer。"
811
+ },
812
+ "description": "触发条件约束的关联字段。"
813
+ }
814
+ }
815
+ },
816
+ "diagnosticRecovery": {
817
+ "type": "object",
818
+ "additionalProperties": false,
819
+ "required": [
820
+ "action",
821
+ "automaticBusinessRetry"
822
+ ],
823
+ "properties": {
824
+ "action": {
825
+ "enum": [
826
+ "correct_input",
827
+ "complete_authentication",
828
+ "request_access_review",
829
+ "stop_and_inspect"
830
+ ],
831
+ "description": "依次表示修正本地输入、补认证、核对权限或停止核查;仅是说明,不执行操作或授予权限。"
832
+ },
833
+ "automaticBusinessRetry": {
834
+ "const": false,
835
+ "description": "不据此自动重放业务请求。"
836
+ }
837
+ }
838
+ },
839
+ "diagnosticExecution": {
840
+ "type": "object",
841
+ "additionalProperties": false,
842
+ "required": [
843
+ "requestState",
844
+ "coverage",
845
+ "observedAttempts"
846
+ ],
847
+ "properties": {
848
+ "requestState": {
849
+ "enum": [
850
+ "not_sent",
851
+ "sent",
852
+ "unknown"
853
+ ],
854
+ "description": "整次调用尚未发送、已有发送记录或无法排除未知请求;不代表业务完成。"
855
+ },
856
+ "coverage": {
857
+ "enum": [
858
+ "complete",
859
+ "partial"
860
+ ],
861
+ "description": "请求观察覆盖全部已接入路径,或存在未观测路径;部分覆盖不能声明零请求。"
862
+ },
863
+ "observedAttempts": {
864
+ "type": "integer",
865
+ "minimum": 0,
866
+ "maximum": 9007199254740991,
867
+ "description": "本地已进入发送边界的观测次数下界,不是服务端执行次数。"
868
+ }
869
+ }
870
+ }
871
+ },
872
+ "modules": {
873
+ "user_base": {
874
+ "base": true,
875
+ "upstreamPath": "data",
876
+ "required": true,
877
+ "description": "默认客户身份及常用资料;只选模型中6个字段,主键必需,其余已返回资料可省略。"
878
+ },
879
+ "tags": {
880
+ "base": false,
881
+ "upstreamPath": "data",
882
+ "required": true,
883
+ "description": "客户标签视图,只返回tags中id/name,不重复tag_ids。"
884
+ },
885
+ "benefit_cards": {
886
+ "base": false,
887
+ "upstreamPath": "data",
888
+ "required": true,
889
+ "description": "客户卡视图,只返回id/name/begin_at/end_at,不推断当前可用性或卡实例身份。"
890
+ },
891
+ "level_summary": {
892
+ "base": false,
893
+ "upstreamPath": "data",
894
+ "required": true,
895
+ "description": "单值等级摘要,不能据此推算免费、付费等级关系或会员身份。"
896
+ },
897
+ "credit": {
898
+ "base": false,
899
+ "upstreamPath": "data",
900
+ "required": true,
901
+ "description": "当前积分points;不输出累计消费积分。"
902
+ },
903
+ "behavior": {
904
+ "base": false,
905
+ "upstreamPath": "data",
906
+ "required": true,
907
+ "description": "购买/退款次数与金额、最后购买时间点;不输出全渠道统计。"
908
+ },
909
+ "valuecard_gift": {
910
+ "base": false,
911
+ "upstreamPath": "data",
912
+ "required": true,
913
+ "description": "礼品卡 gift余额摘要,使用储值卡域 totalBalance 术语;不推断逐卡归集范围或可支付金额。"
914
+ },
915
+ "valuecard_balance": {
916
+ "base": false,
917
+ "upstreamPath": "data",
918
+ "required": true,
919
+ "description": "余额卡 balance余额摘要,使用储值卡域 totalBalance 术语;不推断逐卡归集范围或可支付金额。"
920
+ },
921
+ "level": {
922
+ "base": false,
923
+ "upstreamPath": "data",
924
+ "required": true,
925
+ "description": "本次取得的免费、付费等级关系摘要;只查询客户等级关系时优先选择 member.customer-level.get。"
926
+ },
927
+ "auth_info": {
928
+ "base": false,
929
+ "upstreamPath": "data.auth_info",
930
+ "required": true,
931
+ "description": "手机号码授权状态is_mobile_auth,不等同手机号验证。"
932
+ }
933
+ },
934
+ "api": {
935
+ "method": "POST",
936
+ "path": "youzan.scrm.customer.detail.get/1.0.1"
937
+ },
938
+ "success": {
939
+ "description": "客户主键匹配,user_base 及全部请求模块的有限字段视图满足模型后整体成功。"
940
+ },
941
+ "errors": {
942
+ "description": "失败 stdout 为空,stderr 为一份脱敏错误 JSON,退出码非零;不返回部分成功,不自动重试、切换身份或目标。按 error 模型及安全下一步处理。",
943
+ "diagnosticsVersion": 2
944
+ },
945
+ "notes": [
946
+ "--kdt-id 省略时使用本次有效上下文 shopId;显式提供的非法值不回退。两者都缺失时拒绝;目标范围、同店核验和服务端权限仍按本命令校验。",
947
+ "默认 user_base 只包含 yz_open_id、name、show_name、mobile、gender、created_at,其中仅 yz_open_id 必需。",
948
+ "--include 追加所列扩展模块,不替换基础模块;未请求模块省略,已请求模块必须满足模型后才整体成功。",
949
+ "已选可选明细缺失不表示无值、无权限或不存在;不补零、null 或空集合,不承诺完整客户档案。",
950
+ "已定义人民币金额为元、固定两位小数字符串,不能再次除以 100;日期时间遵循字段模型。",
951
+ "卡、等级及标签只表示本次返回关系,不推导会员身份、卡可用性、可支付金额或全渠道统计。",
952
+ "本地 --dry-run 不读取凭证、不联网;预览只证明构造计划,不证明对象存在或权限有效。真实执行仍需有效上下文及目标范围授权,at 声明不替代服务端授权。",
953
+ "本命令已定义金额的币种默认人民币(CNY);字段、结果或明确父对象上下文声明其他币种时按该声明处理,不执行换汇。",
954
+ "level 是免费、付费等级关系摘要;level_summary 是单值等级摘要,两者不自动换算。不存在名为权益等级的独立概念。",
955
+ "valuecard_balance 与 valuecard_gift 分别展示余额卡、礼品卡余额摘要;不相加为客户总资产,不断言与 valuecard 逐卡余额求和相等。",
956
+ "benefit_cards 的 id 只作为客户卡摘要标识,不提供到 cardAlias 或 cardNo 的标识转换。"
957
+ ]
958
+ }