@optima-chat/commerce-cli 1.0.0
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/.claude/CLAUDE.md +101 -0
- package/LICENSE +21 -0
- package/README.md +1132 -0
- package/dist/api/rest/auth.d.ts +56 -0
- package/dist/api/rest/auth.d.ts.map +1 -0
- package/dist/api/rest/auth.js +150 -0
- package/dist/api/rest/auth.js.map +1 -0
- package/dist/api/rest/base.d.ts +7 -0
- package/dist/api/rest/base.d.ts.map +1 -0
- package/dist/api/rest/base.js +51 -0
- package/dist/api/rest/base.js.map +1 -0
- package/dist/api/rest/commerce.d.ts +730 -0
- package/dist/api/rest/commerce.d.ts.map +1 -0
- package/dist/api/rest/commerce.js +935 -0
- package/dist/api/rest/commerce.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +14 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +3 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +194 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +3 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +126 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/switch.d.ts +3 -0
- package/dist/commands/auth/switch.d.ts.map +1 -0
- package/dist/commands/auth/switch.js +111 -0
- package/dist/commands/auth/switch.js.map +1 -0
- package/dist/commands/auth/test-refresh.d.ts +3 -0
- package/dist/commands/auth/test-refresh.d.ts.map +1 -0
- package/dist/commands/auth/test-refresh.js +43 -0
- package/dist/commands/auth/test-refresh.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts +3 -0
- package/dist/commands/auth/whoami.d.ts.map +1 -0
- package/dist/commands/auth/whoami.js +117 -0
- package/dist/commands/auth/whoami.js.map +1 -0
- package/dist/commands/cleanup.d.ts +3 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +100 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/collection/add-products.d.ts +3 -0
- package/dist/commands/collection/add-products.d.ts.map +1 -0
- package/dist/commands/collection/add-products.js +105 -0
- package/dist/commands/collection/add-products.js.map +1 -0
- package/dist/commands/collection/create.d.ts +3 -0
- package/dist/commands/collection/create.d.ts.map +1 -0
- package/dist/commands/collection/create.js +154 -0
- package/dist/commands/collection/create.js.map +1 -0
- package/dist/commands/collection/delete.d.ts +3 -0
- package/dist/commands/collection/delete.d.ts.map +1 -0
- package/dist/commands/collection/delete.js +83 -0
- package/dist/commands/collection/delete.js.map +1 -0
- package/dist/commands/collection/get.d.ts +3 -0
- package/dist/commands/collection/get.d.ts.map +1 -0
- package/dist/commands/collection/get.js +83 -0
- package/dist/commands/collection/get.js.map +1 -0
- package/dist/commands/collection/index.d.ts +4 -0
- package/dist/commands/collection/index.d.ts.map +1 -0
- package/dist/commands/collection/index.js +22 -0
- package/dist/commands/collection/index.js.map +1 -0
- package/dist/commands/collection/list-products.d.ts +3 -0
- package/dist/commands/collection/list-products.d.ts.map +1 -0
- package/dist/commands/collection/list-products.js +100 -0
- package/dist/commands/collection/list-products.js.map +1 -0
- package/dist/commands/collection/list.d.ts +3 -0
- package/dist/commands/collection/list.d.ts.map +1 -0
- package/dist/commands/collection/list.js +98 -0
- package/dist/commands/collection/list.js.map +1 -0
- package/dist/commands/collection/remove-products.d.ts +3 -0
- package/dist/commands/collection/remove-products.d.ts.map +1 -0
- package/dist/commands/collection/remove-products.js +128 -0
- package/dist/commands/collection/remove-products.js.map +1 -0
- package/dist/commands/collection/update.d.ts +3 -0
- package/dist/commands/collection/update.d.ts.map +1 -0
- package/dist/commands/collection/update.js +166 -0
- package/dist/commands/collection/update.js.map +1 -0
- package/dist/commands/conversation/close.d.ts +3 -0
- package/dist/commands/conversation/close.d.ts.map +1 -0
- package/dist/commands/conversation/close.js +70 -0
- package/dist/commands/conversation/close.js.map +1 -0
- package/dist/commands/conversation/create.d.ts +3 -0
- package/dist/commands/conversation/create.d.ts.map +1 -0
- package/dist/commands/conversation/create.js +153 -0
- package/dist/commands/conversation/create.js.map +1 -0
- package/dist/commands/conversation/get.d.ts +3 -0
- package/dist/commands/conversation/get.d.ts.map +1 -0
- package/dist/commands/conversation/get.js +128 -0
- package/dist/commands/conversation/get.js.map +1 -0
- package/dist/commands/conversation/index.d.ts +3 -0
- package/dist/commands/conversation/index.d.ts.map +1 -0
- package/dist/commands/conversation/index.js +19 -0
- package/dist/commands/conversation/index.js.map +1 -0
- package/dist/commands/conversation/list.d.ts +3 -0
- package/dist/commands/conversation/list.d.ts.map +1 -0
- package/dist/commands/conversation/list.js +129 -0
- package/dist/commands/conversation/list.js.map +1 -0
- package/dist/commands/conversation/mark-read.d.ts +3 -0
- package/dist/commands/conversation/mark-read.d.ts.map +1 -0
- package/dist/commands/conversation/mark-read.js +69 -0
- package/dist/commands/conversation/mark-read.js.map +1 -0
- package/dist/commands/conversation/messages.d.ts +3 -0
- package/dist/commands/conversation/messages.d.ts.map +1 -0
- package/dist/commands/conversation/messages.js +128 -0
- package/dist/commands/conversation/messages.js.map +1 -0
- package/dist/commands/conversation/send.d.ts +3 -0
- package/dist/commands/conversation/send.d.ts.map +1 -0
- package/dist/commands/conversation/send.js +100 -0
- package/dist/commands/conversation/send.js.map +1 -0
- package/dist/commands/homepage/create.d.ts +3 -0
- package/dist/commands/homepage/create.d.ts.map +1 -0
- package/dist/commands/homepage/create.js +150 -0
- package/dist/commands/homepage/create.js.map +1 -0
- package/dist/commands/homepage/delete.d.ts +3 -0
- package/dist/commands/homepage/delete.d.ts.map +1 -0
- package/dist/commands/homepage/delete.js +83 -0
- package/dist/commands/homepage/delete.js.map +1 -0
- package/dist/commands/homepage/get.d.ts +3 -0
- package/dist/commands/homepage/get.d.ts.map +1 -0
- package/dist/commands/homepage/get.js +96 -0
- package/dist/commands/homepage/get.js.map +1 -0
- package/dist/commands/homepage/index.d.ts +4 -0
- package/dist/commands/homepage/index.d.ts.map +1 -0
- package/dist/commands/homepage/index.js +26 -0
- package/dist/commands/homepage/index.js.map +1 -0
- package/dist/commands/homepage/list.d.ts +3 -0
- package/dist/commands/homepage/list.d.ts.map +1 -0
- package/dist/commands/homepage/list.js +101 -0
- package/dist/commands/homepage/list.js.map +1 -0
- package/dist/commands/homepage/patch-settings.d.ts +3 -0
- package/dist/commands/homepage/patch-settings.d.ts.map +1 -0
- package/dist/commands/homepage/patch-settings.js +109 -0
- package/dist/commands/homepage/patch-settings.js.map +1 -0
- package/dist/commands/homepage/reorder.d.ts +3 -0
- package/dist/commands/homepage/reorder.d.ts.map +1 -0
- package/dist/commands/homepage/reorder.js +99 -0
- package/dist/commands/homepage/reorder.js.map +1 -0
- package/dist/commands/homepage/update-collections.d.ts +3 -0
- package/dist/commands/homepage/update-collections.d.ts.map +1 -0
- package/dist/commands/homepage/update-collections.js +93 -0
- package/dist/commands/homepage/update-collections.js.map +1 -0
- package/dist/commands/homepage/update-images.d.ts +3 -0
- package/dist/commands/homepage/update-images.d.ts.map +1 -0
- package/dist/commands/homepage/update-images.js +129 -0
- package/dist/commands/homepage/update-images.js.map +1 -0
- package/dist/commands/homepage/update-target.d.ts +3 -0
- package/dist/commands/homepage/update-target.d.ts.map +1 -0
- package/dist/commands/homepage/update-target.js +94 -0
- package/dist/commands/homepage/update-target.js.map +1 -0
- package/dist/commands/homepage/update.d.ts +3 -0
- package/dist/commands/homepage/update.d.ts.map +1 -0
- package/dist/commands/homepage/update.js +109 -0
- package/dist/commands/homepage/update.js.map +1 -0
- package/dist/commands/i18n/collection/create.d.ts +3 -0
- package/dist/commands/i18n/collection/create.d.ts.map +1 -0
- package/dist/commands/i18n/collection/create.js +147 -0
- package/dist/commands/i18n/collection/create.js.map +1 -0
- package/dist/commands/i18n/collection/delete.d.ts +3 -0
- package/dist/commands/i18n/collection/delete.d.ts.map +1 -0
- package/dist/commands/i18n/collection/delete.js +82 -0
- package/dist/commands/i18n/collection/delete.js.map +1 -0
- package/dist/commands/i18n/collection/get.d.ts +3 -0
- package/dist/commands/i18n/collection/get.d.ts.map +1 -0
- package/dist/commands/i18n/collection/get.js +85 -0
- package/dist/commands/i18n/collection/get.js.map +1 -0
- package/dist/commands/i18n/collection/index.d.ts +3 -0
- package/dist/commands/i18n/collection/index.d.ts.map +1 -0
- package/dist/commands/i18n/collection/index.js +14 -0
- package/dist/commands/i18n/collection/index.js.map +1 -0
- package/dist/commands/i18n/collection/list.d.ts +3 -0
- package/dist/commands/i18n/collection/list.d.ts.map +1 -0
- package/dist/commands/i18n/collection/list.js +89 -0
- package/dist/commands/i18n/collection/list.js.map +1 -0
- package/dist/commands/i18n/collection/update.d.ts +3 -0
- package/dist/commands/i18n/collection/update.d.ts.map +1 -0
- package/dist/commands/i18n/collection/update.js +108 -0
- package/dist/commands/i18n/collection/update.js.map +1 -0
- package/dist/commands/i18n/homepage/delete.d.ts +3 -0
- package/dist/commands/i18n/homepage/delete.d.ts.map +1 -0
- package/dist/commands/i18n/homepage/delete.js +90 -0
- package/dist/commands/i18n/homepage/delete.js.map +1 -0
- package/dist/commands/i18n/homepage/index.d.ts +4 -0
- package/dist/commands/i18n/homepage/index.d.ts.map +1 -0
- package/dist/commands/i18n/homepage/index.js +10 -0
- package/dist/commands/i18n/homepage/index.js.map +1 -0
- package/dist/commands/i18n/homepage/list.d.ts +3 -0
- package/dist/commands/i18n/homepage/list.d.ts.map +1 -0
- package/dist/commands/i18n/homepage/list.js +85 -0
- package/dist/commands/i18n/homepage/list.js.map +1 -0
- package/dist/commands/i18n/homepage/set.d.ts +3 -0
- package/dist/commands/i18n/homepage/set.d.ts.map +1 -0
- package/dist/commands/i18n/homepage/set.js +157 -0
- package/dist/commands/i18n/homepage/set.js.map +1 -0
- package/dist/commands/i18n/index.d.ts +3 -0
- package/dist/commands/i18n/index.d.ts.map +1 -0
- package/dist/commands/i18n/index.js +16 -0
- package/dist/commands/i18n/index.js.map +1 -0
- package/dist/commands/i18n/languages.d.ts +3 -0
- package/dist/commands/i18n/languages.d.ts.map +1 -0
- package/dist/commands/i18n/languages.js +90 -0
- package/dist/commands/i18n/languages.js.map +1 -0
- package/dist/commands/i18n/merchant/create.d.ts +3 -0
- package/dist/commands/i18n/merchant/create.d.ts.map +1 -0
- package/dist/commands/i18n/merchant/create.js +107 -0
- package/dist/commands/i18n/merchant/create.js.map +1 -0
- package/dist/commands/i18n/merchant/delete.d.ts +3 -0
- package/dist/commands/i18n/merchant/delete.d.ts.map +1 -0
- package/dist/commands/i18n/merchant/delete.js +57 -0
- package/dist/commands/i18n/merchant/delete.js.map +1 -0
- package/dist/commands/i18n/merchant/index.d.ts +3 -0
- package/dist/commands/i18n/merchant/index.d.ts.map +1 -0
- package/dist/commands/i18n/merchant/index.js +12 -0
- package/dist/commands/i18n/merchant/index.js.map +1 -0
- package/dist/commands/i18n/merchant/list.d.ts +3 -0
- package/dist/commands/i18n/merchant/list.d.ts.map +1 -0
- package/dist/commands/i18n/merchant/list.js +65 -0
- package/dist/commands/i18n/merchant/list.js.map +1 -0
- package/dist/commands/i18n/merchant/update.d.ts +3 -0
- package/dist/commands/i18n/merchant/update.d.ts.map +1 -0
- package/dist/commands/i18n/merchant/update.js +62 -0
- package/dist/commands/i18n/merchant/update.js.map +1 -0
- package/dist/commands/i18n/product/create.d.ts +3 -0
- package/dist/commands/i18n/product/create.d.ts.map +1 -0
- package/dist/commands/i18n/product/create.js +142 -0
- package/dist/commands/i18n/product/create.js.map +1 -0
- package/dist/commands/i18n/product/delete.d.ts +3 -0
- package/dist/commands/i18n/product/delete.d.ts.map +1 -0
- package/dist/commands/i18n/product/delete.js +67 -0
- package/dist/commands/i18n/product/delete.js.map +1 -0
- package/dist/commands/i18n/product/get.d.ts +3 -0
- package/dist/commands/i18n/product/get.d.ts.map +1 -0
- package/dist/commands/i18n/product/get.js +69 -0
- package/dist/commands/i18n/product/get.js.map +1 -0
- package/dist/commands/i18n/product/index.d.ts +3 -0
- package/dist/commands/i18n/product/index.d.ts.map +1 -0
- package/dist/commands/i18n/product/index.js +14 -0
- package/dist/commands/i18n/product/index.js.map +1 -0
- package/dist/commands/i18n/product/list.d.ts +3 -0
- package/dist/commands/i18n/product/list.d.ts.map +1 -0
- package/dist/commands/i18n/product/list.js +88 -0
- package/dist/commands/i18n/product/list.js.map +1 -0
- package/dist/commands/i18n/product/update.d.ts +3 -0
- package/dist/commands/i18n/product/update.d.ts.map +1 -0
- package/dist/commands/i18n/product/update.js +75 -0
- package/dist/commands/i18n/product/update.js.map +1 -0
- package/dist/commands/i18n/variant/create.d.ts +3 -0
- package/dist/commands/i18n/variant/create.d.ts.map +1 -0
- package/dist/commands/i18n/variant/create.js +179 -0
- package/dist/commands/i18n/variant/create.js.map +1 -0
- package/dist/commands/i18n/variant/delete.d.ts +3 -0
- package/dist/commands/i18n/variant/delete.d.ts.map +1 -0
- package/dist/commands/i18n/variant/delete.js +91 -0
- package/dist/commands/i18n/variant/delete.js.map +1 -0
- package/dist/commands/i18n/variant/get.d.ts +3 -0
- package/dist/commands/i18n/variant/get.d.ts.map +1 -0
- package/dist/commands/i18n/variant/get.js +75 -0
- package/dist/commands/i18n/variant/get.js.map +1 -0
- package/dist/commands/i18n/variant/index.d.ts +3 -0
- package/dist/commands/i18n/variant/index.d.ts.map +1 -0
- package/dist/commands/i18n/variant/index.js +14 -0
- package/dist/commands/i18n/variant/index.js.map +1 -0
- package/dist/commands/i18n/variant/list.d.ts +3 -0
- package/dist/commands/i18n/variant/list.d.ts.map +1 -0
- package/dist/commands/i18n/variant/list.js +79 -0
- package/dist/commands/i18n/variant/list.js.map +1 -0
- package/dist/commands/i18n/variant/update.d.ts +3 -0
- package/dist/commands/i18n/variant/update.d.ts.map +1 -0
- package/dist/commands/i18n/variant/update.js +113 -0
- package/dist/commands/i18n/variant/update.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +98 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/inventory/history.d.ts +3 -0
- package/dist/commands/inventory/history.d.ts.map +1 -0
- package/dist/commands/inventory/history.js +133 -0
- package/dist/commands/inventory/history.js.map +1 -0
- package/dist/commands/inventory/index.d.ts +3 -0
- package/dist/commands/inventory/index.d.ts.map +1 -0
- package/dist/commands/inventory/index.js +12 -0
- package/dist/commands/inventory/index.js.map +1 -0
- package/dist/commands/inventory/low-stock.d.ts +3 -0
- package/dist/commands/inventory/low-stock.d.ts.map +1 -0
- package/dist/commands/inventory/low-stock.js +100 -0
- package/dist/commands/inventory/low-stock.js.map +1 -0
- package/dist/commands/inventory/reserve.d.ts +3 -0
- package/dist/commands/inventory/reserve.d.ts.map +1 -0
- package/dist/commands/inventory/reserve.js +103 -0
- package/dist/commands/inventory/reserve.js.map +1 -0
- package/dist/commands/inventory/update.d.ts +3 -0
- package/dist/commands/inventory/update.d.ts.map +1 -0
- package/dist/commands/inventory/update.js +119 -0
- package/dist/commands/inventory/update.js.map +1 -0
- package/dist/commands/merchant/index.d.ts +3 -0
- package/dist/commands/merchant/index.d.ts.map +1 -0
- package/dist/commands/merchant/index.js +12 -0
- package/dist/commands/merchant/index.js.map +1 -0
- package/dist/commands/merchant/info.d.ts +3 -0
- package/dist/commands/merchant/info.d.ts.map +1 -0
- package/dist/commands/merchant/info.js +113 -0
- package/dist/commands/merchant/info.js.map +1 -0
- package/dist/commands/merchant/setup.d.ts +3 -0
- package/dist/commands/merchant/setup.d.ts.map +1 -0
- package/dist/commands/merchant/setup.js +228 -0
- package/dist/commands/merchant/setup.js.map +1 -0
- package/dist/commands/merchant/update.d.ts +3 -0
- package/dist/commands/merchant/update.d.ts.map +1 -0
- package/dist/commands/merchant/update.js +177 -0
- package/dist/commands/merchant/update.js.map +1 -0
- package/dist/commands/merchant/url.d.ts +3 -0
- package/dist/commands/merchant/url.d.ts.map +1 -0
- package/dist/commands/merchant/url.js +96 -0
- package/dist/commands/merchant/url.js.map +1 -0
- package/dist/commands/order/cancel.d.ts +3 -0
- package/dist/commands/order/cancel.d.ts.map +1 -0
- package/dist/commands/order/cancel.js +142 -0
- package/dist/commands/order/cancel.js.map +1 -0
- package/dist/commands/order/complete.d.ts +3 -0
- package/dist/commands/order/complete.d.ts.map +1 -0
- package/dist/commands/order/complete.js +99 -0
- package/dist/commands/order/complete.js.map +1 -0
- package/dist/commands/order/get.d.ts +3 -0
- package/dist/commands/order/get.d.ts.map +1 -0
- package/dist/commands/order/get.js +80 -0
- package/dist/commands/order/get.js.map +1 -0
- package/dist/commands/order/index.d.ts +3 -0
- package/dist/commands/order/index.d.ts.map +1 -0
- package/dist/commands/order/index.js +16 -0
- package/dist/commands/order/index.js.map +1 -0
- package/dist/commands/order/list.d.ts +3 -0
- package/dist/commands/order/list.d.ts.map +1 -0
- package/dist/commands/order/list.js +135 -0
- package/dist/commands/order/list.js.map +1 -0
- package/dist/commands/order/mark-delivered.d.ts +3 -0
- package/dist/commands/order/mark-delivered.d.ts.map +1 -0
- package/dist/commands/order/mark-delivered.js +70 -0
- package/dist/commands/order/mark-delivered.js.map +1 -0
- package/dist/commands/order/ship.d.ts +3 -0
- package/dist/commands/order/ship.d.ts.map +1 -0
- package/dist/commands/order/ship.js +124 -0
- package/dist/commands/order/ship.js.map +1 -0
- package/dist/commands/product/add-images.d.ts +3 -0
- package/dist/commands/product/add-images.d.ts.map +1 -0
- package/dist/commands/product/add-images.js +210 -0
- package/dist/commands/product/add-images.js.map +1 -0
- package/dist/commands/product/create.d.ts +3 -0
- package/dist/commands/product/create.d.ts.map +1 -0
- package/dist/commands/product/create.js +369 -0
- package/dist/commands/product/create.js.map +1 -0
- package/dist/commands/product/delete.d.ts +3 -0
- package/dist/commands/product/delete.d.ts.map +1 -0
- package/dist/commands/product/delete.js +100 -0
- package/dist/commands/product/delete.js.map +1 -0
- package/dist/commands/product/get.d.ts +3 -0
- package/dist/commands/product/get.d.ts.map +1 -0
- package/dist/commands/product/get.js +123 -0
- package/dist/commands/product/get.js.map +1 -0
- package/dist/commands/product/index.d.ts +3 -0
- package/dist/commands/product/index.d.ts.map +1 -0
- package/dist/commands/product/index.js +18 -0
- package/dist/commands/product/index.js.map +1 -0
- package/dist/commands/product/list.d.ts +3 -0
- package/dist/commands/product/list.d.ts.map +1 -0
- package/dist/commands/product/list.js +154 -0
- package/dist/commands/product/list.js.map +1 -0
- package/dist/commands/product/update.d.ts +3 -0
- package/dist/commands/product/update.d.ts.map +1 -0
- package/dist/commands/product/update.js +183 -0
- package/dist/commands/product/update.js.map +1 -0
- package/dist/commands/product/url.d.ts +3 -0
- package/dist/commands/product/url.d.ts.map +1 -0
- package/dist/commands/product/url.js +124 -0
- package/dist/commands/product/url.js.map +1 -0
- package/dist/commands/refund/create.d.ts +3 -0
- package/dist/commands/refund/create.d.ts.map +1 -0
- package/dist/commands/refund/create.js +161 -0
- package/dist/commands/refund/create.js.map +1 -0
- package/dist/commands/refund/get.d.ts +3 -0
- package/dist/commands/refund/get.d.ts.map +1 -0
- package/dist/commands/refund/get.js +93 -0
- package/dist/commands/refund/get.js.map +1 -0
- package/dist/commands/refund/index.d.ts +3 -0
- package/dist/commands/refund/index.d.ts.map +1 -0
- package/dist/commands/refund/index.js +8 -0
- package/dist/commands/refund/index.js.map +1 -0
- package/dist/commands/shipping/calculate.d.ts +3 -0
- package/dist/commands/shipping/calculate.d.ts.map +1 -0
- package/dist/commands/shipping/calculate.js +183 -0
- package/dist/commands/shipping/calculate.js.map +1 -0
- package/dist/commands/shipping/history.d.ts +3 -0
- package/dist/commands/shipping/history.d.ts.map +1 -0
- package/dist/commands/shipping/history.js +111 -0
- package/dist/commands/shipping/history.js.map +1 -0
- package/dist/commands/shipping/index.d.ts +3 -0
- package/dist/commands/shipping/index.d.ts.map +1 -0
- package/dist/commands/shipping/index.js +10 -0
- package/dist/commands/shipping/index.js.map +1 -0
- package/dist/commands/shipping/update-status.d.ts +3 -0
- package/dist/commands/shipping/update-status.d.ts.map +1 -0
- package/dist/commands/shipping/update-status.js +138 -0
- package/dist/commands/shipping/update-status.js.map +1 -0
- package/dist/commands/shipping-zone/create.d.ts +3 -0
- package/dist/commands/shipping-zone/create.d.ts.map +1 -0
- package/dist/commands/shipping-zone/create.js +191 -0
- package/dist/commands/shipping-zone/create.js.map +1 -0
- package/dist/commands/shipping-zone/delete.d.ts +3 -0
- package/dist/commands/shipping-zone/delete.d.ts.map +1 -0
- package/dist/commands/shipping-zone/delete.js +97 -0
- package/dist/commands/shipping-zone/delete.js.map +1 -0
- package/dist/commands/shipping-zone/index.d.ts +3 -0
- package/dist/commands/shipping-zone/index.d.ts.map +1 -0
- package/dist/commands/shipping-zone/index.js +14 -0
- package/dist/commands/shipping-zone/index.js.map +1 -0
- package/dist/commands/shipping-zone/list.d.ts +3 -0
- package/dist/commands/shipping-zone/list.d.ts.map +1 -0
- package/dist/commands/shipping-zone/list.js +91 -0
- package/dist/commands/shipping-zone/list.js.map +1 -0
- package/dist/commands/shipping-zone/rates.d.ts +4 -0
- package/dist/commands/shipping-zone/rates.d.ts.map +1 -0
- package/dist/commands/shipping-zone/rates.js +285 -0
- package/dist/commands/shipping-zone/rates.js.map +1 -0
- package/dist/commands/test/health.d.ts +3 -0
- package/dist/commands/test/health.d.ts.map +1 -0
- package/dist/commands/test/health.js +126 -0
- package/dist/commands/test/health.js.map +1 -0
- package/dist/commands/test/index.d.ts +3 -0
- package/dist/commands/test/index.d.ts.map +1 -0
- package/dist/commands/test/index.js +8 -0
- package/dist/commands/test/index.js.map +1 -0
- package/dist/commands/test/smoke.d.ts +3 -0
- package/dist/commands/test/smoke.d.ts.map +1 -0
- package/dist/commands/test/smoke.js +201 -0
- package/dist/commands/test/smoke.js.map +1 -0
- package/dist/commands/transfer/index.d.ts +3 -0
- package/dist/commands/transfer/index.d.ts.map +1 -0
- package/dist/commands/transfer/index.js +8 -0
- package/dist/commands/transfer/index.js.map +1 -0
- package/dist/commands/transfer/list.d.ts +3 -0
- package/dist/commands/transfer/list.d.ts.map +1 -0
- package/dist/commands/transfer/list.js +90 -0
- package/dist/commands/transfer/list.js.map +1 -0
- package/dist/commands/transfer/summary.d.ts +3 -0
- package/dist/commands/transfer/summary.d.ts.map +1 -0
- package/dist/commands/transfer/summary.js +68 -0
- package/dist/commands/transfer/summary.js.map +1 -0
- package/dist/commands/upload/file.d.ts +3 -0
- package/dist/commands/upload/file.d.ts.map +1 -0
- package/dist/commands/upload/file.js +79 -0
- package/dist/commands/upload/file.js.map +1 -0
- package/dist/commands/upload/image.d.ts +3 -0
- package/dist/commands/upload/image.d.ts.map +1 -0
- package/dist/commands/upload/image.js +92 -0
- package/dist/commands/upload/image.js.map +1 -0
- package/dist/commands/upload/index.d.ts +3 -0
- package/dist/commands/upload/index.d.ts.map +1 -0
- package/dist/commands/upload/index.js +10 -0
- package/dist/commands/upload/index.js.map +1 -0
- package/dist/commands/upload/video.d.ts +3 -0
- package/dist/commands/upload/video.d.ts.map +1 -0
- package/dist/commands/upload/video.js +78 -0
- package/dist/commands/upload/video.js.map +1 -0
- package/dist/commands/variant/add-images.d.ts +3 -0
- package/dist/commands/variant/add-images.d.ts.map +1 -0
- package/dist/commands/variant/add-images.js +146 -0
- package/dist/commands/variant/add-images.js.map +1 -0
- package/dist/commands/variant/create.d.ts +3 -0
- package/dist/commands/variant/create.d.ts.map +1 -0
- package/dist/commands/variant/create.js +189 -0
- package/dist/commands/variant/create.js.map +1 -0
- package/dist/commands/variant/delete.d.ts +3 -0
- package/dist/commands/variant/delete.d.ts.map +1 -0
- package/dist/commands/variant/delete.js +110 -0
- package/dist/commands/variant/delete.js.map +1 -0
- package/dist/commands/variant/index.d.ts +3 -0
- package/dist/commands/variant/index.d.ts.map +1 -0
- package/dist/commands/variant/index.js +14 -0
- package/dist/commands/variant/index.js.map +1 -0
- package/dist/commands/variant/list.d.ts +3 -0
- package/dist/commands/variant/list.d.ts.map +1 -0
- package/dist/commands/variant/list.js +98 -0
- package/dist/commands/variant/list.js.map +1 -0
- package/dist/commands/variant/update.d.ts +3 -0
- package/dist/commands/variant/update.d.ts.map +1 -0
- package/dist/commands/variant/update.js +141 -0
- package/dist/commands/variant/update.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +133 -0
- package/dist/index.js.map +1 -0
- package/dist/postinstall.d.ts +3 -0
- package/dist/postinstall.d.ts.map +1 -0
- package/dist/postinstall.js +108 -0
- package/dist/postinstall.js.map +1 -0
- package/dist/preuninstall.d.ts +3 -0
- package/dist/preuninstall.d.ts.map +1 -0
- package/dist/preuninstall.js +53 -0
- package/dist/preuninstall.js.map +1 -0
- package/dist/utils/config.d.ts +110 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +347 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/error.d.ts +35 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +110 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/format.d.ts +77 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +406 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/helpText.d.ts +116 -0
- package/dist/utils/helpText.d.ts.map +1 -0
- package/dist/utils/helpText.js +138 -0
- package/dist/utils/helpText.js.map +1 -0
- package/dist/utils/interactive.d.ts +60 -0
- package/dist/utils/interactive.d.ts.map +1 -0
- package/dist/utils/interactive.js +118 -0
- package/dist/utils/interactive.js.map +1 -0
- package/dist/utils/output.d.ts +82 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +151 -0
- package/dist/utils/output.js.map +1 -0
- package/dist/utils/validation.d.ts +16 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +46 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
interface Product {
|
|
2
|
+
id?: string;
|
|
3
|
+
product_id?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
handle?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
price: number;
|
|
9
|
+
currency?: string;
|
|
10
|
+
stock?: number;
|
|
11
|
+
quantity?: number;
|
|
12
|
+
sku?: string;
|
|
13
|
+
status?: 'active' | 'inactive' | 'draft' | 'archived';
|
|
14
|
+
category_id?: string;
|
|
15
|
+
images?: string[];
|
|
16
|
+
created_at?: string;
|
|
17
|
+
updated_at?: string;
|
|
18
|
+
}
|
|
19
|
+
interface Order {
|
|
20
|
+
id?: string;
|
|
21
|
+
order_id?: string;
|
|
22
|
+
customer_name?: string;
|
|
23
|
+
customer_email?: string;
|
|
24
|
+
total?: number;
|
|
25
|
+
amount?: number;
|
|
26
|
+
currency?: string;
|
|
27
|
+
status?: 'pending' | 'paid' | 'processing' | 'shipped' | 'delivered' | 'completed' | 'cancelled' | 'refunded';
|
|
28
|
+
shipping_address?: string;
|
|
29
|
+
tracking_number?: string;
|
|
30
|
+
carrier?: string;
|
|
31
|
+
stripe_payment_intent_id?: string;
|
|
32
|
+
items?: OrderItem[];
|
|
33
|
+
created_at?: string;
|
|
34
|
+
updated_at?: string;
|
|
35
|
+
}
|
|
36
|
+
interface OrderItem {
|
|
37
|
+
product_id: string;
|
|
38
|
+
product_name?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
quantity: number;
|
|
41
|
+
price: number;
|
|
42
|
+
}
|
|
43
|
+
interface InventoryItem {
|
|
44
|
+
product_id: string;
|
|
45
|
+
product_name?: string;
|
|
46
|
+
name?: string;
|
|
47
|
+
stock: number;
|
|
48
|
+
quantity?: number;
|
|
49
|
+
updated_at?: string;
|
|
50
|
+
}
|
|
51
|
+
interface Merchant {
|
|
52
|
+
id?: string;
|
|
53
|
+
merchant_id?: string;
|
|
54
|
+
name: string;
|
|
55
|
+
slug?: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
logo_url?: string;
|
|
59
|
+
banner_url?: string;
|
|
60
|
+
default_currency?: string;
|
|
61
|
+
created_at?: string;
|
|
62
|
+
updated_at?: string;
|
|
63
|
+
}
|
|
64
|
+
interface ShippingZone {
|
|
65
|
+
id?: string;
|
|
66
|
+
zone_id?: string;
|
|
67
|
+
name: string;
|
|
68
|
+
countries: string[];
|
|
69
|
+
rates?: ShippingRate[];
|
|
70
|
+
created_at?: string;
|
|
71
|
+
updated_at?: string;
|
|
72
|
+
}
|
|
73
|
+
interface ShippingZoneListItem {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
priority: number;
|
|
77
|
+
is_default: boolean;
|
|
78
|
+
is_active: boolean;
|
|
79
|
+
country_count: number;
|
|
80
|
+
rate_count: number;
|
|
81
|
+
created_at: string;
|
|
82
|
+
}
|
|
83
|
+
interface ShippingRate {
|
|
84
|
+
id?: string;
|
|
85
|
+
rate_id?: string;
|
|
86
|
+
zone_id: string;
|
|
87
|
+
min_weight: number;
|
|
88
|
+
max_weight?: number;
|
|
89
|
+
price: number;
|
|
90
|
+
currency?: string;
|
|
91
|
+
created_at?: string;
|
|
92
|
+
updated_at?: string;
|
|
93
|
+
}
|
|
94
|
+
interface Variant {
|
|
95
|
+
id?: string;
|
|
96
|
+
variant_id?: string;
|
|
97
|
+
product_id: string;
|
|
98
|
+
sku?: string;
|
|
99
|
+
price?: number;
|
|
100
|
+
stock?: number;
|
|
101
|
+
attributes?: Record<string, string>;
|
|
102
|
+
images?: string[];
|
|
103
|
+
created_at?: string;
|
|
104
|
+
updated_at?: string;
|
|
105
|
+
}
|
|
106
|
+
interface HomepageSection {
|
|
107
|
+
id?: string;
|
|
108
|
+
type: 'banner' | 'collections' | 'collection_products' | 'featured';
|
|
109
|
+
title: string;
|
|
110
|
+
position?: number;
|
|
111
|
+
handle?: string;
|
|
112
|
+
settings?: Record<string, any>;
|
|
113
|
+
translations?: HomepageSectionTranslation[];
|
|
114
|
+
created_at?: string;
|
|
115
|
+
updated_at?: string;
|
|
116
|
+
}
|
|
117
|
+
interface HomepageSectionTranslation {
|
|
118
|
+
language_code: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
description?: string;
|
|
121
|
+
}
|
|
122
|
+
interface MoveInput {
|
|
123
|
+
section_id: string;
|
|
124
|
+
new_position: number;
|
|
125
|
+
}
|
|
126
|
+
interface SectionCreateRequest {
|
|
127
|
+
type: 'banner' | 'collections' | 'collection_products' | 'featured';
|
|
128
|
+
title: string;
|
|
129
|
+
settings?: Record<string, any>;
|
|
130
|
+
}
|
|
131
|
+
interface SectionUpdateRequest {
|
|
132
|
+
title?: string;
|
|
133
|
+
settings?: Record<string, any>;
|
|
134
|
+
}
|
|
135
|
+
interface SectionListResponse {
|
|
136
|
+
sections: HomepageSection[];
|
|
137
|
+
}
|
|
138
|
+
interface SectionReorderResponse {
|
|
139
|
+
sections: HomepageSection[];
|
|
140
|
+
}
|
|
141
|
+
interface BannerImagesUpdateRequest {
|
|
142
|
+
images: string[];
|
|
143
|
+
}
|
|
144
|
+
interface CollectionsUpdateRequest {
|
|
145
|
+
collection_slugs: string[];
|
|
146
|
+
}
|
|
147
|
+
interface FeaturedTargetUpdateRequest {
|
|
148
|
+
target_type: 'collection' | 'product';
|
|
149
|
+
target_handle: string;
|
|
150
|
+
}
|
|
151
|
+
interface TranslationUpdateRequest {
|
|
152
|
+
title?: string;
|
|
153
|
+
description?: string;
|
|
154
|
+
}
|
|
155
|
+
interface TranslationListResponse {
|
|
156
|
+
translations: HomepageSectionTranslation[];
|
|
157
|
+
}
|
|
158
|
+
interface Collection {
|
|
159
|
+
id?: string;
|
|
160
|
+
slug: string;
|
|
161
|
+
name: string;
|
|
162
|
+
description?: string;
|
|
163
|
+
handle?: string;
|
|
164
|
+
image_url?: string;
|
|
165
|
+
product_count?: number;
|
|
166
|
+
created_at?: string;
|
|
167
|
+
updated_at?: string;
|
|
168
|
+
}
|
|
169
|
+
interface CollectionCreateRequest {
|
|
170
|
+
slug: string;
|
|
171
|
+
name: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
image_url?: string;
|
|
174
|
+
}
|
|
175
|
+
interface CollectionUpdateRequest {
|
|
176
|
+
slug?: string;
|
|
177
|
+
name?: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
image_url?: string;
|
|
180
|
+
}
|
|
181
|
+
interface CollectionListResponse {
|
|
182
|
+
collections: Collection[];
|
|
183
|
+
total?: number;
|
|
184
|
+
limit?: number;
|
|
185
|
+
offset?: number;
|
|
186
|
+
}
|
|
187
|
+
interface CollectionResponse {
|
|
188
|
+
collection: Collection;
|
|
189
|
+
}
|
|
190
|
+
interface CollectionProductsRequest {
|
|
191
|
+
product_ids: string[];
|
|
192
|
+
}
|
|
193
|
+
interface CollectionProductsResponse {
|
|
194
|
+
products: Product[];
|
|
195
|
+
total?: number;
|
|
196
|
+
}
|
|
197
|
+
interface Tag {
|
|
198
|
+
name: string;
|
|
199
|
+
product_count?: number;
|
|
200
|
+
created_at?: string;
|
|
201
|
+
}
|
|
202
|
+
interface TagListResponse {
|
|
203
|
+
tags: Tag[];
|
|
204
|
+
total?: number;
|
|
205
|
+
}
|
|
206
|
+
interface TagResponse {
|
|
207
|
+
tag: Tag;
|
|
208
|
+
}
|
|
209
|
+
interface TagStatsResponse {
|
|
210
|
+
name: string;
|
|
211
|
+
product_count: number;
|
|
212
|
+
created_at?: string;
|
|
213
|
+
}
|
|
214
|
+
declare class CommerceApiClient {
|
|
215
|
+
private client;
|
|
216
|
+
constructor();
|
|
217
|
+
/**
|
|
218
|
+
* 重新初始化客户端(当 API URL 改变时调用)
|
|
219
|
+
*/
|
|
220
|
+
reinitialize(): void;
|
|
221
|
+
products: {
|
|
222
|
+
/**
|
|
223
|
+
* 创建商品
|
|
224
|
+
*/
|
|
225
|
+
create: (data: Partial<Product>) => Promise<Product>;
|
|
226
|
+
/**
|
|
227
|
+
* 商品列表
|
|
228
|
+
*/
|
|
229
|
+
list: (params?: {
|
|
230
|
+
limit?: number;
|
|
231
|
+
offset?: number;
|
|
232
|
+
status?: string;
|
|
233
|
+
category_id?: string;
|
|
234
|
+
search?: string;
|
|
235
|
+
}) => Promise<{
|
|
236
|
+
products: Product[];
|
|
237
|
+
total: number;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* 商品详情
|
|
241
|
+
*/
|
|
242
|
+
get: (productId: string) => Promise<Product>;
|
|
243
|
+
/**
|
|
244
|
+
* 更新商品
|
|
245
|
+
*/
|
|
246
|
+
update: (productId: string, data: Partial<Product>) => Promise<Product>;
|
|
247
|
+
/**
|
|
248
|
+
* 删除商品(软删除)
|
|
249
|
+
*/
|
|
250
|
+
delete: (productId: string) => Promise<void>;
|
|
251
|
+
/**
|
|
252
|
+
* 添加商品图片(两步流程)
|
|
253
|
+
* 1. 先上传图片到存储获取 media_id
|
|
254
|
+
* 2. 再关联 media_id 到商品
|
|
255
|
+
*/
|
|
256
|
+
addImages: (productId: string, imagePaths: string[]) => Promise<Product>;
|
|
257
|
+
/**
|
|
258
|
+
* 添加商品图片(通过 URL)
|
|
259
|
+
* 直接用图片 URL 关联到商品(后端会下载)
|
|
260
|
+
*/
|
|
261
|
+
addImageUrls: (productId: string, imageUrls: string[]) => Promise<Product>;
|
|
262
|
+
/**
|
|
263
|
+
* 添加商品图片(通过 Media ID)
|
|
264
|
+
* 直接用 media_id 关联到商品(从 upload 命令获取)
|
|
265
|
+
*/
|
|
266
|
+
addImagesByMediaIds: (productId: string, mediaIds: string[]) => Promise<Product>;
|
|
267
|
+
};
|
|
268
|
+
orders: {
|
|
269
|
+
/**
|
|
270
|
+
* 商户订单列表
|
|
271
|
+
*/
|
|
272
|
+
list: (params?: {
|
|
273
|
+
limit?: number;
|
|
274
|
+
offset?: number;
|
|
275
|
+
status?: string;
|
|
276
|
+
start_date?: string;
|
|
277
|
+
end_date?: string;
|
|
278
|
+
}) => Promise<{
|
|
279
|
+
orders: Order[];
|
|
280
|
+
total: number;
|
|
281
|
+
}>;
|
|
282
|
+
/**
|
|
283
|
+
* 订单详情
|
|
284
|
+
*/
|
|
285
|
+
get: (orderId: string) => Promise<Order>;
|
|
286
|
+
/**
|
|
287
|
+
* 标记订单已发货
|
|
288
|
+
*/
|
|
289
|
+
ship: (orderId: string, data: {
|
|
290
|
+
tracking_number?: string;
|
|
291
|
+
carrier?: string;
|
|
292
|
+
}) => Promise<Order>;
|
|
293
|
+
/**
|
|
294
|
+
* 完成订单
|
|
295
|
+
*/
|
|
296
|
+
complete: (orderId: string) => Promise<Order>;
|
|
297
|
+
/**
|
|
298
|
+
* 取消订单
|
|
299
|
+
*/
|
|
300
|
+
cancel: (orderId: string, reason?: string) => Promise<Order>;
|
|
301
|
+
/**
|
|
302
|
+
* 标记已送达
|
|
303
|
+
*/
|
|
304
|
+
markDelivered: (orderId: string) => Promise<Order>;
|
|
305
|
+
};
|
|
306
|
+
inventory: {
|
|
307
|
+
/**
|
|
308
|
+
* 获取低库存商品
|
|
309
|
+
*/
|
|
310
|
+
getLowStock: (threshold?: number) => Promise<InventoryItem[]>;
|
|
311
|
+
/**
|
|
312
|
+
* 调整商品库存
|
|
313
|
+
*/
|
|
314
|
+
updateStock: (productId: string, quantity: number, reason?: string) => Promise<InventoryItem>;
|
|
315
|
+
/**
|
|
316
|
+
* 查看库存变更历史
|
|
317
|
+
*/
|
|
318
|
+
getHistory: (productId: string) => Promise<any[]>;
|
|
319
|
+
/**
|
|
320
|
+
* 预留库存(购物车功能)
|
|
321
|
+
*/
|
|
322
|
+
reserveStock: (productId: string, quantity: number) => Promise<any>;
|
|
323
|
+
};
|
|
324
|
+
merchant: {
|
|
325
|
+
/**
|
|
326
|
+
* 获取当前商户信息
|
|
327
|
+
*/
|
|
328
|
+
getProfile: () => Promise<Merchant>;
|
|
329
|
+
/**
|
|
330
|
+
* 更新商户资料
|
|
331
|
+
*/
|
|
332
|
+
updateProfile: (data: Partial<Merchant>) => Promise<Merchant>;
|
|
333
|
+
/**
|
|
334
|
+
* 初始化 OAuth 用户的商户资料
|
|
335
|
+
*/
|
|
336
|
+
setupProfile: (data: Partial<Merchant>) => Promise<Merchant>;
|
|
337
|
+
};
|
|
338
|
+
shipping: {
|
|
339
|
+
/**
|
|
340
|
+
* 更新物流状态
|
|
341
|
+
*/
|
|
342
|
+
updateShippingStatus: (orderId: string, data: {
|
|
343
|
+
status: string;
|
|
344
|
+
note?: string;
|
|
345
|
+
}) => Promise<any>;
|
|
346
|
+
/**
|
|
347
|
+
* 获取物流历史
|
|
348
|
+
*/
|
|
349
|
+
getShippingHistory: (orderId: string) => Promise<any[]>;
|
|
350
|
+
/**
|
|
351
|
+
* 添加物流备注
|
|
352
|
+
*/
|
|
353
|
+
addShippingNote: (orderId: string, note: string) => Promise<any>;
|
|
354
|
+
/**
|
|
355
|
+
* 获取支持的国家列表
|
|
356
|
+
*/
|
|
357
|
+
listCountries: () => Promise<any[]>;
|
|
358
|
+
/**
|
|
359
|
+
* 获取当前物流模式
|
|
360
|
+
*/
|
|
361
|
+
getMode: () => Promise<{
|
|
362
|
+
mode: "fixed" | "easyship";
|
|
363
|
+
}>;
|
|
364
|
+
/**
|
|
365
|
+
* 切换物流模式
|
|
366
|
+
*/
|
|
367
|
+
setMode: (mode: "fixed" | "easyship") => Promise<void>;
|
|
368
|
+
};
|
|
369
|
+
shippingFixed: {
|
|
370
|
+
/**
|
|
371
|
+
* 获取固定运费全局配置
|
|
372
|
+
*/
|
|
373
|
+
getConfig: () => Promise<any>;
|
|
374
|
+
/**
|
|
375
|
+
* 更新全局配置
|
|
376
|
+
*/
|
|
377
|
+
updateConfig: (data: any) => Promise<any>;
|
|
378
|
+
/**
|
|
379
|
+
* 计算订单运费
|
|
380
|
+
*/
|
|
381
|
+
calculate: (data: {
|
|
382
|
+
destination_country: string;
|
|
383
|
+
postal_code?: string;
|
|
384
|
+
weight: number;
|
|
385
|
+
items?: any[];
|
|
386
|
+
merchant_id?: string;
|
|
387
|
+
}) => Promise<{
|
|
388
|
+
shipping_cost: number;
|
|
389
|
+
currency: string;
|
|
390
|
+
}>;
|
|
391
|
+
/**
|
|
392
|
+
* 获取运费区域列表
|
|
393
|
+
*/
|
|
394
|
+
listZones: () => Promise<ShippingZoneListItem[]>;
|
|
395
|
+
/**
|
|
396
|
+
* 创建运费区域
|
|
397
|
+
*/
|
|
398
|
+
createZone: (data: {
|
|
399
|
+
name: string;
|
|
400
|
+
countries: Array<{
|
|
401
|
+
code: string;
|
|
402
|
+
}> | string[];
|
|
403
|
+
rates?: Array<{
|
|
404
|
+
min_weight: number;
|
|
405
|
+
max_weight?: number;
|
|
406
|
+
price: number;
|
|
407
|
+
currency?: string;
|
|
408
|
+
}>;
|
|
409
|
+
}) => Promise<ShippingZone>;
|
|
410
|
+
/**
|
|
411
|
+
* 获取运费区域详情
|
|
412
|
+
*/
|
|
413
|
+
getZone: (zoneId: string) => Promise<ShippingZone>;
|
|
414
|
+
/**
|
|
415
|
+
* 更新运费区域
|
|
416
|
+
*/
|
|
417
|
+
updateZone: (zoneId: string, data: Partial<ShippingZone>) => Promise<ShippingZone>;
|
|
418
|
+
/**
|
|
419
|
+
* 删除运费区域
|
|
420
|
+
*/
|
|
421
|
+
deleteZone: (zoneId: string) => Promise<void>;
|
|
422
|
+
/**
|
|
423
|
+
* 获取区域运费费率
|
|
424
|
+
*/
|
|
425
|
+
listRates: (zoneId: string) => Promise<ShippingRate[]>;
|
|
426
|
+
/**
|
|
427
|
+
* 创建运费费率
|
|
428
|
+
*/
|
|
429
|
+
createRate: (zoneId: string, data: Partial<ShippingRate>) => Promise<ShippingRate>;
|
|
430
|
+
/**
|
|
431
|
+
* 更新运费费率
|
|
432
|
+
*/
|
|
433
|
+
updateRate: (zoneId: string, rateId: string, data: Partial<ShippingRate>) => Promise<ShippingRate>;
|
|
434
|
+
/**
|
|
435
|
+
* 删除运费费率
|
|
436
|
+
*/
|
|
437
|
+
deleteRate: (zoneId: string, rateId: string) => Promise<void>;
|
|
438
|
+
};
|
|
439
|
+
conversations: {
|
|
440
|
+
/**
|
|
441
|
+
* 创建对话
|
|
442
|
+
*/
|
|
443
|
+
create: (data: {
|
|
444
|
+
participants: Array<{
|
|
445
|
+
role: string;
|
|
446
|
+
customer_id?: string;
|
|
447
|
+
customer_email?: string;
|
|
448
|
+
customer_phone?: string;
|
|
449
|
+
customer_name?: string;
|
|
450
|
+
merchant_id?: string;
|
|
451
|
+
}>;
|
|
452
|
+
initial_message?: string;
|
|
453
|
+
}) => Promise<any>;
|
|
454
|
+
/**
|
|
455
|
+
* 获取对话列表
|
|
456
|
+
*/
|
|
457
|
+
list: (params?: {
|
|
458
|
+
page?: number;
|
|
459
|
+
per_page?: number;
|
|
460
|
+
status?: string;
|
|
461
|
+
}) => Promise<any>;
|
|
462
|
+
/**
|
|
463
|
+
* 获取对话详情
|
|
464
|
+
*/
|
|
465
|
+
get: (conversationId: string) => Promise<any>;
|
|
466
|
+
/**
|
|
467
|
+
* 更新对话状态
|
|
468
|
+
*/
|
|
469
|
+
update: (conversationId: string, data: {
|
|
470
|
+
status?: string;
|
|
471
|
+
}) => Promise<any>;
|
|
472
|
+
/**
|
|
473
|
+
* 发送消息
|
|
474
|
+
*/
|
|
475
|
+
sendMessage: (conversationId: string, data: {
|
|
476
|
+
content: string;
|
|
477
|
+
message_type?: string;
|
|
478
|
+
metadata?: any;
|
|
479
|
+
}) => Promise<any>;
|
|
480
|
+
/**
|
|
481
|
+
* 获取消息列表
|
|
482
|
+
*/
|
|
483
|
+
getMessages: (conversationId: string, params?: {
|
|
484
|
+
limit?: number;
|
|
485
|
+
before?: string;
|
|
486
|
+
}) => Promise<any>;
|
|
487
|
+
/**
|
|
488
|
+
* 标记消息已读
|
|
489
|
+
*/
|
|
490
|
+
markRead: (conversationId: string) => Promise<any>;
|
|
491
|
+
/**
|
|
492
|
+
* 获取对话上下文
|
|
493
|
+
*/
|
|
494
|
+
getContext: (conversationId: string) => Promise<any>;
|
|
495
|
+
};
|
|
496
|
+
variants: {
|
|
497
|
+
/**
|
|
498
|
+
* 获取商品变体列表
|
|
499
|
+
*/
|
|
500
|
+
list: (productId: string) => Promise<Variant[]>;
|
|
501
|
+
/**
|
|
502
|
+
* 搜索商品变体
|
|
503
|
+
*/
|
|
504
|
+
search: (productId: string, criteria: any) => Promise<Variant[]>;
|
|
505
|
+
/**
|
|
506
|
+
* 创建商品变体
|
|
507
|
+
*/
|
|
508
|
+
create: (productId: string, data: Partial<Variant>) => Promise<Variant>;
|
|
509
|
+
/**
|
|
510
|
+
* 获取变体详情
|
|
511
|
+
*/
|
|
512
|
+
get: (productId: string, variantId: string) => Promise<Variant>;
|
|
513
|
+
/**
|
|
514
|
+
* 更新变体
|
|
515
|
+
*/
|
|
516
|
+
update: (productId: string, variantId: string, data: Partial<Variant>) => Promise<Variant>;
|
|
517
|
+
/**
|
|
518
|
+
* 删除变体
|
|
519
|
+
*/
|
|
520
|
+
delete: (productId: string, variantId: string) => Promise<void>;
|
|
521
|
+
/**
|
|
522
|
+
* 添加变体图片(两步流程)
|
|
523
|
+
* 1. 先上传图片到存储获取 media_id
|
|
524
|
+
* 2. 再关联 media_id 到变体
|
|
525
|
+
*/
|
|
526
|
+
addImages: (masterId: string, variantId: string, imagePaths: string[]) => Promise<Variant>;
|
|
527
|
+
/**
|
|
528
|
+
* 添加变体图片(通过 Media ID)
|
|
529
|
+
* 直接用 media_id 关联到变体(从 upload 命令获取)
|
|
530
|
+
*/
|
|
531
|
+
addImagesByMediaIds: (masterId: string, variantId: string, mediaIds: string[]) => Promise<Variant>;
|
|
532
|
+
};
|
|
533
|
+
refunds: {
|
|
534
|
+
/**
|
|
535
|
+
* 创建退款
|
|
536
|
+
*/
|
|
537
|
+
create: (data: {
|
|
538
|
+
payment_intent_id: string;
|
|
539
|
+
amount: number;
|
|
540
|
+
reason?: string;
|
|
541
|
+
}) => Promise<any>;
|
|
542
|
+
/**
|
|
543
|
+
* 获取退款详情
|
|
544
|
+
*/
|
|
545
|
+
get: (refundId: string) => Promise<any>;
|
|
546
|
+
};
|
|
547
|
+
upload: {
|
|
548
|
+
/**
|
|
549
|
+
* 上传图片
|
|
550
|
+
*/
|
|
551
|
+
uploadImage: (imagePath: string) => Promise<{
|
|
552
|
+
url: string;
|
|
553
|
+
media_id?: string;
|
|
554
|
+
}>;
|
|
555
|
+
/**
|
|
556
|
+
* 上传视频
|
|
557
|
+
*/
|
|
558
|
+
uploadVideo: (videoPath: string) => Promise<{
|
|
559
|
+
url: string;
|
|
560
|
+
}>;
|
|
561
|
+
/**
|
|
562
|
+
* 上传文件
|
|
563
|
+
*/
|
|
564
|
+
uploadFile: (filePath: string) => Promise<{
|
|
565
|
+
url: string;
|
|
566
|
+
}>;
|
|
567
|
+
};
|
|
568
|
+
transfers: {
|
|
569
|
+
list: () => Promise<any[]>;
|
|
570
|
+
summary: () => Promise<any>;
|
|
571
|
+
};
|
|
572
|
+
i18n: {
|
|
573
|
+
/**
|
|
574
|
+
* 获取支持的语言列表
|
|
575
|
+
*/
|
|
576
|
+
listLanguages: (activeOnly?: boolean) => Promise<any[]>;
|
|
577
|
+
productTranslations: {
|
|
578
|
+
list: (productId: string) => Promise<any[]>;
|
|
579
|
+
get: (productId: string, languageCode: string) => Promise<any>;
|
|
580
|
+
create: (productId: string, data: any) => Promise<any>;
|
|
581
|
+
update: (productId: string, languageCode: string, data: any) => Promise<any>;
|
|
582
|
+
delete: (productId: string, languageCode: string) => Promise<void>;
|
|
583
|
+
};
|
|
584
|
+
collectionTranslations: {
|
|
585
|
+
list: (collectionId: string) => Promise<any[]>;
|
|
586
|
+
get: (collectionId: string, languageCode: string) => Promise<any>;
|
|
587
|
+
create: (collectionId: string, data: any) => Promise<any>;
|
|
588
|
+
update: (collectionId: string, languageCode: string, data: any) => Promise<any>;
|
|
589
|
+
delete: (collectionId: string, languageCode: string) => Promise<void>;
|
|
590
|
+
};
|
|
591
|
+
merchantTranslations: {
|
|
592
|
+
list: () => Promise<any[]>;
|
|
593
|
+
get: (languageCode: string) => Promise<any>;
|
|
594
|
+
create: (data: any) => Promise<any>;
|
|
595
|
+
update: (languageCode: string, data: any) => Promise<any>;
|
|
596
|
+
delete: (languageCode: string) => Promise<void>;
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
homepage: {
|
|
600
|
+
sections: {
|
|
601
|
+
/**
|
|
602
|
+
* 列出所有 sections
|
|
603
|
+
*/
|
|
604
|
+
list: () => Promise<SectionListResponse>;
|
|
605
|
+
/**
|
|
606
|
+
* 创建 section
|
|
607
|
+
*/
|
|
608
|
+
create: (data: SectionCreateRequest) => Promise<HomepageSection>;
|
|
609
|
+
/**
|
|
610
|
+
* 获取单个 section
|
|
611
|
+
*/
|
|
612
|
+
get: (id: string, expand?: string) => Promise<HomepageSection>;
|
|
613
|
+
/**
|
|
614
|
+
* 更新 section
|
|
615
|
+
*/
|
|
616
|
+
update: (id: string, data: SectionUpdateRequest) => Promise<HomepageSection>;
|
|
617
|
+
/**
|
|
618
|
+
* 删除 section
|
|
619
|
+
*/
|
|
620
|
+
delete: (id: string) => Promise<void>;
|
|
621
|
+
/**
|
|
622
|
+
* 重排序 sections
|
|
623
|
+
*/
|
|
624
|
+
reorder: (moves: MoveInput[]) => Promise<SectionReorderResponse>;
|
|
625
|
+
};
|
|
626
|
+
settings: {
|
|
627
|
+
/**
|
|
628
|
+
* 更新 Banner 图片
|
|
629
|
+
*/
|
|
630
|
+
updateImages: (id: string, images: Array<{
|
|
631
|
+
url: string;
|
|
632
|
+
alt: string;
|
|
633
|
+
action_type: string;
|
|
634
|
+
action_value: string | null;
|
|
635
|
+
}>) => Promise<HomepageSection>;
|
|
636
|
+
/**
|
|
637
|
+
* 更新 Collections 列表
|
|
638
|
+
*/
|
|
639
|
+
updateCollections: (id: string, collection_slugs: string[]) => Promise<HomepageSection>;
|
|
640
|
+
/**
|
|
641
|
+
* 更新 Collection Products 目标集合
|
|
642
|
+
*/
|
|
643
|
+
updateCollectionSlug: (id: string, collection_slug: string) => Promise<HomepageSection>;
|
|
644
|
+
/**
|
|
645
|
+
* 更新 Featured 目标
|
|
646
|
+
*/
|
|
647
|
+
updateTarget: (id: string, target_type: "collection" | "product", target_handle: string) => Promise<HomepageSection>;
|
|
648
|
+
/**
|
|
649
|
+
* 通用设置补丁
|
|
650
|
+
*/
|
|
651
|
+
patch: (id: string, settings: Record<string, any>) => Promise<HomepageSection>;
|
|
652
|
+
};
|
|
653
|
+
translations: {
|
|
654
|
+
/**
|
|
655
|
+
* 列出所有翻译
|
|
656
|
+
*/
|
|
657
|
+
list: (sectionId: string) => Promise<TranslationListResponse>;
|
|
658
|
+
/**
|
|
659
|
+
* 创建或更新翻译 (upsert)
|
|
660
|
+
*/
|
|
661
|
+
set: (sectionId: string, lang: string, data: TranslationUpdateRequest) => Promise<HomepageSectionTranslation>;
|
|
662
|
+
/**
|
|
663
|
+
* 删除翻译
|
|
664
|
+
*/
|
|
665
|
+
delete: (sectionId: string, lang: string) => Promise<void>;
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
collections: {
|
|
669
|
+
/**
|
|
670
|
+
* 列出所有 collections
|
|
671
|
+
*/
|
|
672
|
+
list: (params?: {
|
|
673
|
+
limit?: number;
|
|
674
|
+
offset?: number;
|
|
675
|
+
}) => Promise<CollectionListResponse>;
|
|
676
|
+
/**
|
|
677
|
+
* 创建 collection
|
|
678
|
+
*/
|
|
679
|
+
create: (data: CollectionCreateRequest) => Promise<Collection>;
|
|
680
|
+
/**
|
|
681
|
+
* 获取单个 collection
|
|
682
|
+
*/
|
|
683
|
+
get: (id: string) => Promise<Collection>;
|
|
684
|
+
/**
|
|
685
|
+
* 更新 collection
|
|
686
|
+
*/
|
|
687
|
+
update: (id: string, data: CollectionUpdateRequest) => Promise<Collection>;
|
|
688
|
+
/**
|
|
689
|
+
* 删除 collection
|
|
690
|
+
*/
|
|
691
|
+
delete: (id: string) => Promise<void>;
|
|
692
|
+
/**
|
|
693
|
+
* 添加商品到 collection
|
|
694
|
+
*/
|
|
695
|
+
addProducts: (id: string, productIds: string[]) => Promise<void>;
|
|
696
|
+
/**
|
|
697
|
+
* 从 collection 移除商品
|
|
698
|
+
* Note: Backend API 不支持批量删除,需要对每个产品发送单独的 DELETE 请求
|
|
699
|
+
*/
|
|
700
|
+
removeProducts: (id: string, productIds: string[]) => Promise<void>;
|
|
701
|
+
/**
|
|
702
|
+
* 列出 collection 中的商品
|
|
703
|
+
*/
|
|
704
|
+
listProducts: (id: string, params?: {
|
|
705
|
+
limit?: number;
|
|
706
|
+
offset?: number;
|
|
707
|
+
}) => Promise<CollectionProductsResponse>;
|
|
708
|
+
};
|
|
709
|
+
tags: {
|
|
710
|
+
/**
|
|
711
|
+
* 列出所有 tags
|
|
712
|
+
*/
|
|
713
|
+
list: () => Promise<TagListResponse>;
|
|
714
|
+
/**
|
|
715
|
+
* 创建 tag
|
|
716
|
+
*/
|
|
717
|
+
create: (name: string) => Promise<Tag>;
|
|
718
|
+
/**
|
|
719
|
+
* 删除 tag
|
|
720
|
+
*/
|
|
721
|
+
delete: (name: string) => Promise<void>;
|
|
722
|
+
/**
|
|
723
|
+
* 获取 tag 统计信息
|
|
724
|
+
*/
|
|
725
|
+
stats: (name: string) => Promise<TagStatsResponse>;
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
export declare const commerceApi: CommerceApiClient;
|
|
729
|
+
export type { Product, Order, OrderItem, InventoryItem, Merchant, ShippingZone, ShippingRate, Variant, HomepageSection, HomepageSectionTranslation, MoveInput, SectionCreateRequest, SectionUpdateRequest, SectionListResponse, SectionReorderResponse, BannerImagesUpdateRequest, CollectionsUpdateRequest, FeaturedTargetUpdateRequest, TranslationUpdateRequest, TranslationListResponse, Collection, CollectionCreateRequest, CollectionUpdateRequest, CollectionListResponse, CollectionResponse, CollectionProductsRequest, CollectionProductsResponse, Tag, TagListResponse, TagResponse, TagStatsResponse, };
|
|
730
|
+
//# sourceMappingURL=commerce.d.ts.map
|