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