@crossly/sdk 0.3.0 → 0.3.2
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/README.md +8 -12
- package/dist/client.d.ts +3 -12
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -86
- package/dist/client.js.map +1 -1
- package/dist/create-client-carnival.d.ts +44 -0
- package/dist/create-client-carnival.d.ts.map +1 -0
- package/dist/create-client-carnival.js +31 -0
- package/dist/create-client-carnival.js.map +1 -0
- package/dist/create-client-data-sync.d.ts +13 -0
- package/dist/create-client-data-sync.d.ts.map +1 -0
- package/dist/create-client-data-sync.js +7 -0
- package/dist/create-client-data-sync.js.map +1 -0
- package/dist/create-client-store-ops.d.ts +53 -0
- package/dist/create-client-store-ops.d.ts.map +1 -0
- package/dist/create-client-store-ops.js +27 -0
- package/dist/create-client-store-ops.js.map +1 -0
- package/dist/create-client.d.ts +57 -34
- package/dist/create-client.d.ts.map +1 -1
- package/dist/create-client.js +42 -26
- package/dist/create-client.js.map +1 -1
- package/dist/errors.d.ts +8 -18
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +17 -20
- package/dist/errors.js.map +1 -1
- package/dist/generated/api-types.d.ts +12587 -675
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/generated/operations.d.ts +3337 -513
- package/dist/generated/operations.d.ts.map +1 -1
- package/dist/generated/operations.js +384 -31
- package/dist/generated/operations.js.map +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/index.js.map +1 -1
- package/dist/public-exports.d.ts +14 -5
- package/dist/public-exports.d.ts.map +1 -1
- package/dist/public-exports.js +5 -0
- package/dist/public-exports.js.map +1 -1
- package/dist/resources/account-billing.d.ts +26 -0
- package/dist/resources/account-billing.d.ts.map +1 -1
- package/dist/resources/account-billing.js +20 -0
- package/dist/resources/account-billing.js.map +1 -1
- package/dist/resources/account.d.ts +8 -85
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +14 -86
- package/dist/resources/account.js.map +1 -1
- package/dist/resources/ai-integrations.d.ts +36 -0
- package/dist/resources/ai-integrations.d.ts.map +1 -1
- package/dist/resources/ai-integrations.js +4 -0
- package/dist/resources/ai-integrations.js.map +1 -1
- package/dist/resources/analytics-benchmarks.d.ts +67 -0
- package/dist/resources/analytics-benchmarks.d.ts.map +1 -0
- package/dist/resources/analytics-benchmarks.js +24 -0
- package/dist/resources/analytics-benchmarks.js.map +1 -0
- package/dist/resources/analytics-goals.d.ts +100 -0
- package/dist/resources/analytics-goals.d.ts.map +1 -0
- package/dist/resources/analytics-goals.js +45 -0
- package/dist/resources/analytics-goals.js.map +1 -0
- package/dist/resources/analytics.d.ts +108 -0
- package/dist/resources/analytics.d.ts.map +1 -0
- package/dist/resources/analytics.js +110 -0
- package/dist/resources/analytics.js.map +1 -0
- package/dist/resources/automation-activity.d.ts +32 -0
- package/dist/resources/automation-activity.d.ts.map +1 -0
- package/dist/resources/automation-activity.js +26 -0
- package/dist/resources/automation-activity.js.map +1 -0
- package/dist/resources/automation-guardrails.d.ts +42 -0
- package/dist/resources/automation-guardrails.d.ts.map +1 -0
- package/dist/resources/automation-guardrails.js +31 -0
- package/dist/resources/automation-guardrails.js.map +1 -0
- package/dist/resources/automation.d.ts +1 -1
- package/dist/resources/automation.d.ts.map +1 -1
- package/dist/resources/books.d.ts +147 -1
- package/dist/resources/books.d.ts.map +1 -1
- package/dist/resources/books.js +53 -0
- package/dist/resources/books.js.map +1 -1
- package/dist/resources/branding.d.ts +38 -3
- package/dist/resources/branding.d.ts.map +1 -1
- package/dist/resources/branding.js +12 -2
- package/dist/resources/branding.js.map +1 -1
- package/dist/resources/buyer/after-purchase.d.ts +26 -4
- package/dist/resources/buyer/after-purchase.d.ts.map +1 -1
- package/dist/resources/buyer/after-purchase.js +26 -4
- package/dist/resources/buyer/after-purchase.js.map +1 -1
- package/dist/resources/buyer/catalog-surface.d.ts +291 -0
- package/dist/resources/buyer/catalog-surface.d.ts.map +1 -0
- package/dist/resources/buyer/catalog-surface.js +314 -0
- package/dist/resources/buyer/catalog-surface.js.map +1 -0
- package/dist/resources/buyer/commerce.d.ts +15 -3
- package/dist/resources/buyer/commerce.d.ts.map +1 -1
- package/dist/resources/buyer/commerce.js +15 -3
- package/dist/resources/buyer/commerce.js.map +1 -1
- package/dist/resources/buyer/gift-cards.d.ts +12 -2
- package/dist/resources/buyer/gift-cards.d.ts.map +1 -1
- package/dist/resources/buyer/gift-cards.js +12 -2
- package/dist/resources/buyer/gift-cards.js.map +1 -1
- package/dist/resources/buyer/xmarket.d.ts +2 -0
- package/dist/resources/buyer/xmarket.d.ts.map +1 -1
- package/dist/resources/buyer/xmarket.js +2 -0
- package/dist/resources/buyer/xmarket.js.map +1 -1
- package/dist/resources/buyer.d.ts +216 -244
- package/dist/resources/buyer.d.ts.map +1 -1
- package/dist/resources/buyer.js +192 -263
- package/dist/resources/buyer.js.map +1 -1
- package/dist/resources/calendar.d.ts +48 -0
- package/dist/resources/calendar.d.ts.map +1 -0
- package/dist/resources/calendar.js +23 -0
- package/dist/resources/calendar.js.map +1 -0
- package/dist/resources/campaigns.d.ts +212 -0
- package/dist/resources/campaigns.d.ts.map +1 -0
- package/dist/resources/campaigns.js +60 -0
- package/dist/resources/campaigns.js.map +1 -0
- package/dist/resources/catalog.d.ts +34 -162
- package/dist/resources/catalog.d.ts.map +1 -1
- package/dist/resources/catalog.js +46 -230
- package/dist/resources/catalog.js.map +1 -1
- package/dist/resources/categories.d.ts +10 -2
- package/dist/resources/categories.d.ts.map +1 -1
- package/dist/resources/categories.js.map +1 -1
- package/dist/resources/channel-inventory.d.ts +24 -0
- package/dist/resources/channel-inventory.d.ts.map +1 -1
- package/dist/resources/channel-inventory.js +14 -0
- package/dist/resources/channel-inventory.js.map +1 -1
- package/dist/resources/comms.d.ts +90 -17
- package/dist/resources/comms.d.ts.map +1 -1
- package/dist/resources/comms.js +68 -16
- package/dist/resources/comms.js.map +1 -1
- package/dist/resources/connection-health.d.ts +56 -0
- package/dist/resources/connection-health.d.ts.map +1 -0
- package/dist/resources/connection-health.js +19 -0
- package/dist/resources/connection-health.js.map +1 -0
- package/dist/resources/connection-panels.d.ts +37 -0
- package/dist/resources/connection-panels.d.ts.map +1 -0
- package/dist/resources/connection-panels.js +33 -0
- package/dist/resources/connection-panels.js.map +1 -0
- package/dist/resources/consignment.d.ts +248 -0
- package/dist/resources/consignment.d.ts.map +1 -0
- package/dist/resources/consignment.js +64 -0
- package/dist/resources/consignment.js.map +1 -0
- package/dist/resources/custom-data.d.ts +149 -0
- package/dist/resources/custom-data.d.ts.map +1 -0
- package/dist/resources/custom-data.js +112 -0
- package/dist/resources/custom-data.js.map +1 -0
- package/dist/resources/customers-types.d.ts +86 -0
- package/dist/resources/customers-types.d.ts.map +1 -1
- package/dist/resources/customers.d.ts +16 -1
- package/dist/resources/customers.d.ts.map +1 -1
- package/dist/resources/customers.js +32 -0
- package/dist/resources/customers.js.map +1 -1
- package/dist/resources/delist-outcomes.d.ts +77 -0
- package/dist/resources/delist-outcomes.d.ts.map +1 -0
- package/dist/resources/delist-outcomes.js +39 -0
- package/dist/resources/delist-outcomes.js.map +1 -0
- package/dist/resources/devices.d.ts +90 -0
- package/dist/resources/devices.d.ts.map +1 -1
- package/dist/resources/devices.js +36 -0
- package/dist/resources/devices.js.map +1 -1
- package/dist/resources/discount-programs.d.ts +175 -0
- package/dist/resources/discount-programs.d.ts.map +1 -1
- package/dist/resources/discount-programs.js +33 -0
- package/dist/resources/discount-programs.js.map +1 -1
- package/dist/resources/discount-promos.d.ts +80 -0
- package/dist/resources/discount-promos.d.ts.map +1 -0
- package/dist/resources/discount-promos.js +35 -0
- package/dist/resources/discount-promos.js.map +1 -0
- package/dist/resources/discovery.d.ts +12 -74
- package/dist/resources/discovery.d.ts.map +1 -1
- package/dist/resources/discovery.js +16 -81
- package/dist/resources/discovery.js.map +1 -1
- package/dist/resources/drops.d.ts +15 -3
- package/dist/resources/drops.d.ts.map +1 -1
- package/dist/resources/drops.js +15 -3
- package/dist/resources/drops.js.map +1 -1
- package/dist/resources/event-policies.d.ts +4 -3
- package/dist/resources/event-policies.d.ts.map +1 -1
- package/dist/resources/event-policies.js +4 -3
- package/dist/resources/event-policies.js.map +1 -1
- package/dist/resources/funding.d.ts +17 -0
- package/dist/resources/funding.d.ts.map +1 -1
- package/dist/resources/funding.js +12 -0
- package/dist/resources/funding.js.map +1 -1
- package/dist/resources/hub-agent-changes.d.ts +96 -0
- package/dist/resources/hub-agent-changes.d.ts.map +1 -0
- package/dist/resources/hub-agent-changes.js +34 -0
- package/dist/resources/hub-agent-changes.js.map +1 -0
- package/dist/resources/hub-programs.d.ts +40 -1
- package/dist/resources/hub-programs.d.ts.map +1 -1
- package/dist/resources/hub-programs.js +7 -0
- package/dist/resources/hub-programs.js.map +1 -1
- package/dist/resources/imports.d.ts +54 -0
- package/dist/resources/imports.d.ts.map +1 -1
- package/dist/resources/imports.js +15 -0
- package/dist/resources/imports.js.map +1 -1
- package/dist/resources/inventory-bulk-quantity.d.ts +24 -0
- package/dist/resources/inventory-bulk-quantity.d.ts.map +1 -0
- package/dist/resources/inventory-bulk-quantity.js +3 -0
- package/dist/resources/inventory-bulk-quantity.js.map +1 -0
- package/dist/resources/inventory-kits.d.ts +42 -0
- package/dist/resources/inventory-kits.d.ts.map +1 -0
- package/dist/resources/inventory-kits.js +29 -0
- package/dist/resources/inventory-kits.js.map +1 -0
- package/dist/resources/inventory-labels.d.ts +70 -0
- package/dist/resources/inventory-labels.d.ts.map +1 -0
- package/dist/resources/inventory-labels.js +34 -0
- package/dist/resources/inventory-labels.js.map +1 -0
- package/dist/resources/inventory-locations.d.ts +107 -0
- package/dist/resources/inventory-locations.d.ts.map +1 -0
- package/dist/resources/inventory-locations.js +63 -0
- package/dist/resources/inventory-locations.js.map +1 -0
- package/dist/resources/inventory-stale.d.ts +33 -0
- package/dist/resources/inventory-stale.d.ts.map +1 -0
- package/dist/resources/inventory-stale.js +3 -0
- package/dist/resources/inventory-stale.js.map +1 -0
- package/dist/resources/inventory.d.ts +144 -0
- package/dist/resources/inventory.d.ts.map +1 -0
- package/dist/resources/inventory.js +221 -0
- package/dist/resources/inventory.js.map +1 -0
- package/dist/resources/linear.d.ts +157 -0
- package/dist/resources/linear.d.ts.map +1 -0
- package/dist/resources/linear.js +77 -0
- package/dist/resources/linear.js.map +1 -0
- package/dist/resources/listing-automation.d.ts +59 -0
- package/dist/resources/listing-automation.d.ts.map +1 -0
- package/dist/resources/listing-automation.js +28 -0
- package/dist/resources/listing-automation.js.map +1 -0
- package/dist/resources/listing-defaults.d.ts +57 -0
- package/dist/resources/listing-defaults.d.ts.map +1 -0
- package/dist/resources/listing-defaults.js +20 -0
- package/dist/resources/listing-defaults.js.map +1 -0
- package/dist/resources/listing-duplicate.d.ts +46 -0
- package/dist/resources/listing-duplicate.d.ts.map +1 -0
- package/dist/resources/listing-duplicate.js +6 -0
- package/dist/resources/listing-duplicate.js.map +1 -0
- package/dist/resources/listing-issues.d.ts +73 -0
- package/dist/resources/listing-issues.d.ts.map +1 -0
- package/dist/resources/listing-issues.js +44 -0
- package/dist/resources/listing-issues.js.map +1 -0
- package/dist/resources/listing-list.d.ts +41 -0
- package/dist/resources/listing-list.d.ts.map +1 -0
- package/dist/resources/listing-list.js +13 -0
- package/dist/resources/listing-list.js.map +1 -0
- package/dist/resources/listing-photos.d.ts +59 -0
- package/dist/resources/listing-photos.d.ts.map +1 -0
- package/dist/resources/listing-photos.js +32 -0
- package/dist/resources/listing-photos.js.map +1 -0
- package/dist/resources/listing-proposals.d.ts +111 -0
- package/dist/resources/listing-proposals.d.ts.map +1 -0
- package/dist/resources/listing-proposals.js +70 -0
- package/dist/resources/listing-proposals.js.map +1 -0
- package/dist/resources/listing-revisions.d.ts +88 -0
- package/dist/resources/listing-revisions.d.ts.map +1 -0
- package/dist/resources/listing-revisions.js +57 -0
- package/dist/resources/listing-revisions.js.map +1 -0
- package/dist/resources/listing-schedule.d.ts +56 -0
- package/dist/resources/listing-schedule.d.ts.map +1 -0
- package/dist/resources/listing-schedule.js +40 -0
- package/dist/resources/listing-schedule.js.map +1 -0
- package/dist/resources/listing-word-rules.d.ts +96 -0
- package/dist/resources/listing-word-rules.d.ts.map +1 -0
- package/dist/resources/listing-word-rules.js +41 -0
- package/dist/resources/listing-word-rules.js.map +1 -0
- package/dist/resources/listings-csv.d.ts +105 -0
- package/dist/resources/listings-csv.d.ts.map +1 -0
- package/dist/resources/listings-csv.js +42 -0
- package/dist/resources/listings-csv.js.map +1 -0
- package/dist/resources/listings-search.d.ts +47 -0
- package/dist/resources/listings-search.d.ts.map +1 -0
- package/dist/resources/listings-search.js +2 -0
- package/dist/resources/listings-search.js.map +1 -0
- package/dist/resources/live-destinations.d.ts +89 -0
- package/dist/resources/live-destinations.d.ts.map +1 -0
- package/dist/resources/live-destinations.js +34 -0
- package/dist/resources/live-destinations.js.map +1 -0
- package/dist/resources/live-shows.d.ts +88 -2
- package/dist/resources/live-shows.d.ts.map +1 -1
- package/dist/resources/live-shows.js +21 -2
- package/dist/resources/live-shows.js.map +1 -1
- package/dist/resources/marketing.d.ts +141 -0
- package/dist/resources/marketing.d.ts.map +1 -0
- package/dist/resources/marketing.js +48 -0
- package/dist/resources/marketing.js.map +1 -0
- package/dist/resources/marketplace-ads.d.ts +214 -0
- package/dist/resources/marketplace-ads.d.ts.map +1 -0
- package/dist/resources/marketplace-ads.js +56 -0
- package/dist/resources/marketplace-ads.js.map +1 -0
- package/dist/resources/marketplace-fit.d.ts +58 -0
- package/dist/resources/marketplace-fit.d.ts.map +1 -0
- package/dist/resources/marketplace-fit.js +16 -0
- package/dist/resources/marketplace-fit.js.map +1 -0
- package/dist/resources/notion.d.ts +80 -0
- package/dist/resources/notion.d.ts.map +1 -0
- package/dist/resources/notion.js +54 -0
- package/dist/resources/notion.js.map +1 -0
- package/dist/resources/offer-rules.d.ts +125 -0
- package/dist/resources/offer-rules.d.ts.map +1 -0
- package/dist/resources/offer-rules.js +57 -0
- package/dist/resources/offer-rules.js.map +1 -0
- package/dist/resources/order-cancel-requests.d.ts +68 -0
- package/dist/resources/order-cancel-requests.d.ts.map +1 -0
- package/dist/resources/order-cancel-requests.js +32 -0
- package/dist/resources/order-cancel-requests.js.map +1 -0
- package/dist/resources/orders-bulk.d.ts +94 -0
- package/dist/resources/orders-bulk.d.ts.map +1 -0
- package/dist/resources/orders-bulk.js +58 -0
- package/dist/resources/orders-bulk.js.map +1 -0
- package/dist/resources/orders-ship-groups.d.ts +72 -0
- package/dist/resources/orders-ship-groups.d.ts.map +1 -0
- package/dist/resources/orders-ship-groups.js +29 -0
- package/dist/resources/orders-ship-groups.js.map +1 -0
- package/dist/resources/orders-types.d.ts +53 -0
- package/dist/resources/orders-types.d.ts.map +1 -1
- package/dist/resources/orders.d.ts +31 -48
- package/dist/resources/orders.d.ts.map +1 -1
- package/dist/resources/orders.js +19 -64
- package/dist/resources/orders.js.map +1 -1
- package/dist/resources/price-rules.d.ts +18 -0
- package/dist/resources/price-rules.d.ts.map +1 -1
- package/dist/resources/price-rules.js.map +1 -1
- package/dist/resources/publish-tasks.d.ts +32 -0
- package/dist/resources/publish-tasks.d.ts.map +1 -0
- package/dist/resources/publish-tasks.js +37 -0
- package/dist/resources/publish-tasks.js.map +1 -0
- package/dist/resources/rentals.d.ts +2 -2
- package/dist/resources/rentals.d.ts.map +1 -1
- package/dist/resources/rentals.js.map +1 -1
- package/dist/resources/reorder-points.d.ts +34 -0
- package/dist/resources/reorder-points.d.ts.map +1 -0
- package/dist/resources/reorder-points.js +20 -0
- package/dist/resources/reorder-points.js.map +1 -0
- package/dist/resources/restock-orders.d.ts +111 -0
- package/dist/resources/restock-orders.d.ts.map +1 -0
- package/dist/resources/restock-orders.js +67 -0
- package/dist/resources/restock-orders.js.map +1 -0
- package/dist/resources/returns.d.ts +92 -0
- package/dist/resources/returns.d.ts.map +1 -0
- package/dist/resources/returns.js +106 -0
- package/dist/resources/returns.js.map +1 -0
- package/dist/resources/seller-xmarket.d.ts +5 -5
- package/dist/resources/seller-xmarket.d.ts.map +1 -1
- package/dist/resources/seller-xmarket.js.map +1 -1
- package/dist/resources/sentry.d.ts +82 -0
- package/dist/resources/sentry.d.ts.map +1 -0
- package/dist/resources/sentry.js +49 -0
- package/dist/resources/sentry.js.map +1 -0
- package/dist/resources/sharing-schedules.d.ts +108 -0
- package/dist/resources/sharing-schedules.d.ts.map +1 -0
- package/dist/resources/sharing-schedules.js +34 -0
- package/dist/resources/sharing-schedules.js.map +1 -0
- package/dist/resources/shipping-add-ons-types.d.ts +63 -0
- package/dist/resources/shipping-add-ons-types.d.ts.map +1 -0
- package/dist/resources/shipping-add-ons-types.js +2 -0
- package/dist/resources/shipping-add-ons-types.js.map +1 -0
- package/dist/resources/slack-app.d.ts +66 -0
- package/dist/resources/slack-app.d.ts.map +1 -0
- package/dist/resources/slack-app.js +48 -0
- package/dist/resources/slack-app.js.map +1 -0
- package/dist/resources/stock-adjustments.d.ts +62 -0
- package/dist/resources/stock-adjustments.d.ts.map +1 -0
- package/dist/resources/stock-adjustments.js +35 -0
- package/dist/resources/stock-adjustments.js.map +1 -0
- package/dist/resources/stock-counts.d.ts +73 -0
- package/dist/resources/stock-counts.d.ts.map +1 -0
- package/dist/resources/stock-counts.js +45 -0
- package/dist/resources/stock-counts.js.map +1 -0
- package/dist/resources/store-credit.d.ts +119 -0
- package/dist/resources/store-credit.d.ts.map +1 -0
- package/dist/resources/store-credit.js +47 -0
- package/dist/resources/store-credit.js.map +1 -0
- package/dist/resources/store-reviews.d.ts +103 -0
- package/dist/resources/store-reviews.d.ts.map +1 -0
- package/dist/resources/store-reviews.js +39 -0
- package/dist/resources/store-reviews.js.map +1 -0
- package/dist/resources/store-settings-copy.d.ts +82 -0
- package/dist/resources/store-settings-copy.d.ts.map +1 -0
- package/dist/resources/store-settings-copy.js +56 -0
- package/dist/resources/store-settings-copy.js.map +1 -0
- package/dist/resources/store-setup.d.ts +49 -0
- package/dist/resources/store-setup.d.ts.map +1 -0
- package/dist/resources/store-setup.js +18 -0
- package/dist/resources/store-setup.js.map +1 -0
- package/dist/resources/storefront-site.d.ts +100 -0
- package/dist/resources/storefront-site.d.ts.map +1 -1
- package/dist/resources/storefront-site.js +26 -0
- package/dist/resources/storefront-site.js.map +1 -1
- package/dist/resources/storefronts.d.ts +58 -0
- package/dist/resources/storefronts.d.ts.map +1 -1
- package/dist/resources/storefronts.js +13 -0
- package/dist/resources/storefronts.js.map +1 -1
- package/dist/resources/stories-live-studio.d.ts +256 -1
- package/dist/resources/stories-live-studio.d.ts.map +1 -1
- package/dist/resources/stories-live-studio.js +65 -1
- package/dist/resources/stories-live-studio.js.map +1 -1
- package/dist/resources/supabase.d.ts +64 -0
- package/dist/resources/supabase.d.ts.map +1 -0
- package/dist/resources/supabase.js +35 -0
- package/dist/resources/supabase.js.map +1 -0
- package/dist/resources/tax.d.ts +128 -0
- package/dist/resources/tax.d.ts.map +1 -0
- package/dist/resources/tax.js +132 -0
- package/dist/resources/tax.js.map +1 -0
- package/dist/resources/team.d.ts +68 -1
- package/dist/resources/team.d.ts.map +1 -1
- package/dist/resources/team.js +65 -0
- package/dist/resources/team.js.map +1 -1
- package/dist/resources/templates.d.ts +19 -3
- package/dist/resources/templates.d.ts.map +1 -1
- package/dist/resources/templates.js +17 -2
- package/dist/resources/templates.js.map +1 -1
- package/dist/resources/units.d.ts +43 -1
- package/dist/resources/units.d.ts.map +1 -1
- package/dist/resources/units.js +17 -1
- package/dist/resources/units.js.map +1 -1
- package/dist/resources/variation-groups.js +10 -10
- package/dist/resources/variation-groups.js.map +1 -1
- package/dist/resources/vault-markets-mm.d.ts +6 -28
- package/dist/resources/vault-markets-mm.d.ts.map +1 -1
- package/dist/resources/vault-markets-mm.js.map +1 -1
- package/dist/resources/vault-markets-supply.d.ts +28 -0
- package/dist/resources/vault-markets-supply.d.ts.map +1 -1
- package/dist/resources/vault-markets-supply.js +12 -0
- package/dist/resources/vault-markets-supply.js.map +1 -1
- package/dist/resources/workflows-types.d.ts +115 -0
- package/dist/resources/workflows-types.d.ts.map +1 -1
- package/dist/resources/workflows.d.ts +26 -2
- package/dist/resources/workflows.d.ts.map +1 -1
- package/dist/resources/workflows.js +34 -0
- package/dist/resources/workflows.js.map +1 -1
- package/dist/resources/world-conventions.d.ts +3 -3
- package/dist/resources/world-conventions.d.ts.map +1 -1
- package/dist/resources/world-conventions.js.map +1 -1
- package/dist/resources.d.ts +36 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +36 -1
- package/dist/resources.js.map +1 -1
- package/dist/settings-exports.d.ts +18 -0
- package/dist/settings-exports.d.ts.map +1 -0
- package/dist/settings-exports.js +14 -0
- package/dist/settings-exports.js.map +1 -0
- package/dist/transport/index.d.ts +96 -0
- package/dist/transport/index.d.ts.map +1 -0
- package/dist/transport/index.js +162 -0
- package/dist/transport/index.js.map +1 -0
- package/dist/types.d.ts +72 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +14 -5
- package/dist/webhooks.js.map +1 -1
- package/package.json +4 -7
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { HttpClient, StoreOpts } from './_shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* The store's Sentry integration over /v1 (Settings › Integrations › Sentry): whether it is installed and linked, the
|
|
4
|
+
* Sentry issues linked to listings, orders and workflow runs, the Alert Action log, and disconnect. Installing happens
|
|
5
|
+
* in Sentry (the install link is in `status().installUrl`) and on the signed-in setup page. Per store:
|
|
6
|
+
* `storefrontId`, else the client's store, else the default store. A token is never returned.
|
|
7
|
+
*/
|
|
8
|
+
export type SentryRecordType = 'listing' | 'order' | 'workflow_run';
|
|
9
|
+
export interface SentryInstallation {
|
|
10
|
+
id: string;
|
|
11
|
+
orgSlug: string;
|
|
12
|
+
status: 'installed' | 'disconnected' | 'uninstalled' | string;
|
|
13
|
+
linkedAt: string | null;
|
|
14
|
+
lastEventAt: string | null;
|
|
15
|
+
/** The org's integrations page in Sentry, where the app is uninstalled. */
|
|
16
|
+
sentryUrl: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SentryStatus {
|
|
19
|
+
/** False when this Crossly deployment has no Sentry app credentials. */
|
|
20
|
+
configured: boolean;
|
|
21
|
+
installUrl: string | null;
|
|
22
|
+
installation: SentryInstallation | null;
|
|
23
|
+
linkedIssues: number;
|
|
24
|
+
}
|
|
25
|
+
export interface SentryIssueLink {
|
|
26
|
+
id: string;
|
|
27
|
+
sentryIssueId: string;
|
|
28
|
+
sentryIssueUrl: string | null;
|
|
29
|
+
projectSlug: string | null;
|
|
30
|
+
title: string | null;
|
|
31
|
+
recordType: SentryRecordType;
|
|
32
|
+
recordId: string;
|
|
33
|
+
/** The record's short id shown in Sentry: L-…, O-…, R-…. */
|
|
34
|
+
identifier: string;
|
|
35
|
+
/** `note`: made with Sentry's Create, carrying the issue title and link as a note on the record. */
|
|
36
|
+
kind: 'link' | 'note';
|
|
37
|
+
note: string | null;
|
|
38
|
+
issueStatus: 'unresolved' | 'resolved' | 'ignored' | string;
|
|
39
|
+
createdBy: string | null;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
}
|
|
43
|
+
export interface SentryAlertAction {
|
|
44
|
+
id: string;
|
|
45
|
+
resource: 'event_alert' | 'metric_alert' | string;
|
|
46
|
+
action: 'notify' | 'pause_automations' | string;
|
|
47
|
+
status: 'running' | 'done' | 'failed' | string;
|
|
48
|
+
alertTitle: string | null;
|
|
49
|
+
alertUrl: string | null;
|
|
50
|
+
result: Record<string, unknown> | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
finishedAt: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface SentryLinksQuery extends StoreOpts {
|
|
55
|
+
recordType?: SentryRecordType;
|
|
56
|
+
recordId?: string;
|
|
57
|
+
limit?: number;
|
|
58
|
+
}
|
|
59
|
+
export declare class SentryResource {
|
|
60
|
+
private readonly http;
|
|
61
|
+
constructor(http: HttpClient);
|
|
62
|
+
/** Configured?, the install link, the linked Sentry org and its status. */
|
|
63
|
+
status(opts?: StoreOpts): Promise<SentryStatus>;
|
|
64
|
+
/** Linked Sentry issues: the store's, or one record's (`recordType` + `recordId`). */
|
|
65
|
+
links(q?: SentryLinksQuery): Promise<{
|
|
66
|
+
data: SentryIssueLink[];
|
|
67
|
+
}>;
|
|
68
|
+
/** Unlink one Sentry issue from its record. */
|
|
69
|
+
unlink(id: string, opts?: StoreOpts): Promise<{
|
|
70
|
+
success: true;
|
|
71
|
+
}>;
|
|
72
|
+
/** The Alert Action log: each alert event Crossly acted on and what it did. */
|
|
73
|
+
alertActions(opts?: StoreOpts): Promise<{
|
|
74
|
+
data: SentryAlertAction[];
|
|
75
|
+
}>;
|
|
76
|
+
/** Disconnect: the installation's tokens are deleted. Uninstall the app in Sentry too (`installation.sentryUrl`). */
|
|
77
|
+
disconnect(opts?: StoreOpts): Promise<{
|
|
78
|
+
success: true;
|
|
79
|
+
orgSlug: string;
|
|
80
|
+
}>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=sentry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentry.d.ts","sourceRoot":"","sources":["../../src/resources/sentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D;;;;;GAKG;AAEH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC;AAEpE,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,GAAG,cAAc,GAAG,aAAa,GAAG,MAAM,CAAC;IAC9D,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,2EAA2E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S,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,2EAA2E;IAC3E,MAAM,CAAC,IAAI,GAAE,SAAc;IAO3B,sFAAsF;IACtF,KAAK,CAAC,CAAC,GAAE,gBAAqB;cAEK,eAAe,EAAE;;IAOpD,+CAA+C;IAC/C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,SAAc;iBACD,IAAI;;IAM1C,+EAA+E;IAC/E,YAAY,CAAC,IAAI,GAAE,SAAc;cACE,iBAAiB,EAAE;;IAMtD,qHAAqH;IACrH,UAAU,CAAC,IAAI,GAAE,SAAc;iBACO,IAAI;iBAAW,MAAM;;CAM5D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export class SentryResource {
|
|
2
|
+
http;
|
|
3
|
+
constructor(http) {
|
|
4
|
+
this.http = http;
|
|
5
|
+
}
|
|
6
|
+
/** Configured?, the install link, the linked Sentry org and its status. */
|
|
7
|
+
status(opts = {}) {
|
|
8
|
+
return this.http.request({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
path: '/v1/integrations/sentry',
|
|
11
|
+
storefrontId: opts.storefrontId,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Linked Sentry issues: the store's, or one record's (`recordType` + `recordId`). */
|
|
15
|
+
links(q = {}) {
|
|
16
|
+
const { storefrontId, ...query } = q;
|
|
17
|
+
return this.http.request({
|
|
18
|
+
method: 'GET',
|
|
19
|
+
path: '/v1/integrations/sentry/links',
|
|
20
|
+
query,
|
|
21
|
+
storefrontId,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** Unlink one Sentry issue from its record. */
|
|
25
|
+
unlink(id, opts = {}) {
|
|
26
|
+
return this.http.request({
|
|
27
|
+
method: 'DELETE',
|
|
28
|
+
path: `/v1/integrations/sentry/links/${encodeURIComponent(id)}`,
|
|
29
|
+
storefrontId: opts.storefrontId,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** The Alert Action log: each alert event Crossly acted on and what it did. */
|
|
33
|
+
alertActions(opts = {}) {
|
|
34
|
+
return this.http.request({
|
|
35
|
+
method: 'GET',
|
|
36
|
+
path: '/v1/integrations/sentry/actions',
|
|
37
|
+
storefrontId: opts.storefrontId,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/** Disconnect: the installation's tokens are deleted. Uninstall the app in Sentry too (`installation.sentryUrl`). */
|
|
41
|
+
disconnect(opts = {}) {
|
|
42
|
+
return this.http.request({
|
|
43
|
+
method: 'DELETE',
|
|
44
|
+
path: '/v1/integrations/sentry',
|
|
45
|
+
storefrontId: opts.storefrontId,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=sentry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sentry.js","sourceRoot":"","sources":["../../src/resources/sentry.ts"],"names":[],"mappings":"AAkEA,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,2EAA2E;IAC3E,MAAM,CAAC,OAAkB,EAAE;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAe;YACrC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,yBAAyB;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,sFAAsF;IACtF,KAAK,CAAC,IAAsB,EAAE;QAC5B,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA8B;YACpD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,+BAA+B;YACrC,KAAK;YACL,YAAY;SACb,CAAC,CAAC;IACL,CAAC;IACD,+CAA+C;IAC/C,MAAM,CAAC,EAAU,EAAE,OAAkB,EAAE;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAoB;YAC1C,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,iCAAiC,kBAAkB,CAAC,EAAE,CAAC,EAAE;YAC/D,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,+EAA+E;IAC/E,YAAY,CAAC,OAAkB,EAAE;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAgC;YACtD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,iCAAiC;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,qHAAqH;IACrH,UAAU,CAAC,OAAkB,EAAE;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqC;YAC3D,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,yBAAyB;YAC/B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { HttpClient, IdempotencyOpts } from './_shared.js';
|
|
2
|
+
export type SharingAction = 'share' | 'bump';
|
|
3
|
+
export type SharingSource = 'closet' | 'party';
|
|
4
|
+
export type SharingOrder = 'top_down' | 'bottom_up' | 'random' | 'price_low_high' | 'price_high_low';
|
|
5
|
+
export type SharingPace = 'gentle' | 'steady' | 'brisk' | 'fast';
|
|
6
|
+
export interface SharingConfig {
|
|
7
|
+
action: SharingAction;
|
|
8
|
+
source: SharingSource;
|
|
9
|
+
/** Poshmark party (event) ids, with source 'party'. */
|
|
10
|
+
partyIds: string[];
|
|
11
|
+
order: SharingOrder;
|
|
12
|
+
pace: SharingPace;
|
|
13
|
+
/** Listings per round, 1-500. */
|
|
14
|
+
perRunCap: number;
|
|
15
|
+
/** Listings per day across the rounds (1-6000); null = rounds × perRunCap. */
|
|
16
|
+
dailyCap: number | null;
|
|
17
|
+
/** 'HH:MM' 24-hour, same day, in `timezone`. */
|
|
18
|
+
window: {
|
|
19
|
+
start: string;
|
|
20
|
+
end: string;
|
|
21
|
+
};
|
|
22
|
+
/** Weekdays, 0 = Sunday. */
|
|
23
|
+
days: number[];
|
|
24
|
+
/** 1-12, spread over the window on 15-minute slots. */
|
|
25
|
+
roundsPerDay: number;
|
|
26
|
+
timezone: string;
|
|
27
|
+
filters: {
|
|
28
|
+
priceMinCents?: number | null;
|
|
29
|
+
priceMaxCents?: number | null;
|
|
30
|
+
minAgeDays?: number | null;
|
|
31
|
+
maxAgeDays?: number | null;
|
|
32
|
+
category?: string | null;
|
|
33
|
+
};
|
|
34
|
+
followBack: boolean;
|
|
35
|
+
returnShare: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SharingScheduleInput extends Partial<SharingConfig> {
|
|
38
|
+
platform: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
/** Default true. */
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export type SharingSchedulePatch = Partial<SharingConfig> & {
|
|
44
|
+
name?: string;
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
};
|
|
47
|
+
export interface SharingSchedule {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
platform: string;
|
|
51
|
+
platformName: string;
|
|
52
|
+
config: SharingConfig;
|
|
53
|
+
summary: string;
|
|
54
|
+
roundTimes: string[];
|
|
55
|
+
perRound: number;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
pausedReason: string | null;
|
|
58
|
+
workflowId: string;
|
|
59
|
+
lastRunAt: string | null;
|
|
60
|
+
lastRunStatus: string | null;
|
|
61
|
+
nextRunAt: string | null;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
}
|
|
65
|
+
export interface SharingPlatformOption {
|
|
66
|
+
platform: string;
|
|
67
|
+
name: string;
|
|
68
|
+
actions: SharingAction[];
|
|
69
|
+
parties: boolean;
|
|
70
|
+
followBack: boolean;
|
|
71
|
+
returnShare: boolean;
|
|
72
|
+
}
|
|
73
|
+
export declare class SharingSchedulesResource {
|
|
74
|
+
private http;
|
|
75
|
+
constructor(http: HttpClient);
|
|
76
|
+
/** What each marketplace supports on a schedule. Envelope: `{ data }`. */
|
|
77
|
+
options(): Promise<{
|
|
78
|
+
data: SharingPlatformOption[];
|
|
79
|
+
}>;
|
|
80
|
+
list(): Promise<{
|
|
81
|
+
data: SharingSchedule[];
|
|
82
|
+
}>;
|
|
83
|
+
get(id: string): Promise<{
|
|
84
|
+
data: SharingSchedule;
|
|
85
|
+
}>;
|
|
86
|
+
/** Unsent settings default (3 rounds 09:00-21:00 every day, 100 a round, random, steady). */
|
|
87
|
+
create(body: SharingScheduleInput, opts?: IdempotencyOpts): Promise<{
|
|
88
|
+
data: SharingSchedule;
|
|
89
|
+
}>;
|
|
90
|
+
/** Any setting, or `{ enabled }` alone to pause / resume. */
|
|
91
|
+
update(id: string, body: SharingSchedulePatch, opts?: IdempotencyOpts): Promise<{
|
|
92
|
+
data: SharingSchedule;
|
|
93
|
+
}>;
|
|
94
|
+
delete(id: string, opts?: IdempotencyOpts): Promise<{
|
|
95
|
+
data: {
|
|
96
|
+
id: string;
|
|
97
|
+
deleted: true;
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
/** Share now: one round right away. */
|
|
101
|
+
runNow(id: string, opts?: IdempotencyOpts): Promise<{
|
|
102
|
+
data: {
|
|
103
|
+
id: string;
|
|
104
|
+
runId: string;
|
|
105
|
+
};
|
|
106
|
+
}>;
|
|
107
|
+
}
|
|
108
|
+
//#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AE,OAAO,CAAC;CACtB;AAKD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,0EAA0E;IAC1E,OAAO;cAC4B,qBAAqB,EAAE;;IAG1D,IAAI;cAC+B,eAAe,EAAE;;IAGpD,GAAG,CAAC,EAAE,EAAE,MAAM;cACqB,eAAe;;IAGlD,6FAA6F;IAC7F,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,IAAI,GAAE,eAAoB;cAC1B,eAAe;;IAGlD,6DAA6D;IAC7D,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,GAAE,eAAoB;cACtC,eAAe;;IAGlD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB;cACV;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,IAAI,CAAA;SAAE;;IAGhE,uCAAuC;IACvC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB;cACV;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;;CAEjE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const BASE = '/v1/automation/sharing-schedules';
|
|
2
|
+
const enc = encodeURIComponent;
|
|
3
|
+
export class SharingSchedulesResource {
|
|
4
|
+
http;
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.http = http;
|
|
7
|
+
}
|
|
8
|
+
/** What each marketplace supports on a schedule. Envelope: `{ data }`. */
|
|
9
|
+
options() {
|
|
10
|
+
return this.http.request({ method: 'GET', path: `${BASE}/options` });
|
|
11
|
+
}
|
|
12
|
+
list() {
|
|
13
|
+
return this.http.request({ method: 'GET', path: BASE });
|
|
14
|
+
}
|
|
15
|
+
get(id) {
|
|
16
|
+
return this.http.request({ method: 'GET', path: `${BASE}/${enc(id)}` });
|
|
17
|
+
}
|
|
18
|
+
/** Unsent settings default (3 rounds 09:00-21:00 every day, 100 a round, random, steady). */
|
|
19
|
+
create(body, opts = {}) {
|
|
20
|
+
return this.http.request({ method: 'POST', path: BASE, body, idempotencyKey: opts.idempotencyKey });
|
|
21
|
+
}
|
|
22
|
+
/** Any setting, or `{ enabled }` alone to pause / resume. */
|
|
23
|
+
update(id, body, opts = {}) {
|
|
24
|
+
return this.http.request({ method: 'PATCH', path: `${BASE}/${enc(id)}`, body, idempotencyKey: opts.idempotencyKey });
|
|
25
|
+
}
|
|
26
|
+
delete(id, opts = {}) {
|
|
27
|
+
return this.http.request({ method: 'DELETE', path: `${BASE}/${enc(id)}`, idempotencyKey: opts.idempotencyKey });
|
|
28
|
+
}
|
|
29
|
+
/** Share now: one round right away. */
|
|
30
|
+
runNow(id, opts = {}) {
|
|
31
|
+
return this.http.request({ method: 'POST', path: `${BASE}/${enc(id)}/run`, body: {}, idempotencyKey: opts.idempotencyKey });
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=sharing-schedules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing-schedules.js","sourceRoot":"","sources":["../../src/resources/sharing-schedules.ts"],"names":[],"mappings":"AAyEA,MAAM,IAAI,GAAG,kCAAkC,CAAC;AAChD,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAE/B,MAAM,OAAO,wBAAwB;IACf;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,0EAA0E;IAC1E,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAoC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,UAAU,EAAE,CAAC,CAAC;IAC1G,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA8B,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACvF,CA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AAE,CAAC,CAAC;IACvK,CAAC;CACF"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Insurance, signature confirmation and customs on a Crossly Shipping label (POST /v1/orders/{id}/rates,
|
|
3
|
+
* GET /v1/orders/{id}/shipping-protection). Mirrors the api's @crosslister/shared constants/shipping-add-ons.ts; the
|
|
4
|
+
* SDK has no runtime dependency on it.
|
|
5
|
+
*/
|
|
6
|
+
export type ShippingSignature = 'none' | 'standard' | 'adult';
|
|
7
|
+
export type CustomsContentsType = 'MERCHANDISE' | 'GIFT' | 'DOCUMENTS' | 'SAMPLE' | 'RETURN_MERCHANDISE' | 'HUMANITARIAN_DONATION' | 'OTHER';
|
|
8
|
+
/** A US export's exemption from an EEI filing. */
|
|
9
|
+
export type EelPfcCode = 'NOEEI_30_37_a' | 'NOEEI_30_37_h' | 'NOEEI_30_37_f' | 'NOEEI_30_36';
|
|
10
|
+
export interface CustomsItem {
|
|
11
|
+
description: string;
|
|
12
|
+
quantity: number;
|
|
13
|
+
/** Per unit, USD cents. */
|
|
14
|
+
valueCents: number;
|
|
15
|
+
/** Per unit; omitted = the parcel weight shared across lines. */
|
|
16
|
+
weightOz?: number;
|
|
17
|
+
hsCode?: string;
|
|
18
|
+
/** ISO 3166 alpha-2. */
|
|
19
|
+
originCountry: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CustomsDeclarationInput {
|
|
22
|
+
contentsType?: CustomsContentsType;
|
|
23
|
+
/** Required when contentsType is OTHER. */
|
|
24
|
+
contentsExplanation?: string;
|
|
25
|
+
items: CustomsItem[];
|
|
26
|
+
eelPfc?: EelPfcCode;
|
|
27
|
+
}
|
|
28
|
+
/** The add-on fields of a rate quote. Omitted = the store's rules. */
|
|
29
|
+
export interface ShippingAddOns {
|
|
30
|
+
/** null (or amountCents 0) = no insurance. */
|
|
31
|
+
insurance?: {
|
|
32
|
+
amountCents: number;
|
|
33
|
+
} | null;
|
|
34
|
+
signature?: ShippingSignature;
|
|
35
|
+
/** Only used when the label crosses a border; omitted = the order's own lines. */
|
|
36
|
+
customs?: CustomsDeclarationInput;
|
|
37
|
+
}
|
|
38
|
+
export interface RatesInput extends ShippingAddOns {
|
|
39
|
+
weightOz: number;
|
|
40
|
+
presetId?: string;
|
|
41
|
+
lengthIn?: number;
|
|
42
|
+
widthIn?: number;
|
|
43
|
+
heightIn?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface ShippingProtection {
|
|
46
|
+
orderTotalCents: number;
|
|
47
|
+
/** The store's rules (Settings › Shipping › Protection). */
|
|
48
|
+
defaults: {
|
|
49
|
+
insureOverCents: number | null;
|
|
50
|
+
signatureOverCents: number | null;
|
|
51
|
+
signatureType: 'standard' | 'adult';
|
|
52
|
+
};
|
|
53
|
+
insuranceAmountCents: number | null;
|
|
54
|
+
signature: ShippingSignature;
|
|
55
|
+
fromCountry: string;
|
|
56
|
+
toCountry: string;
|
|
57
|
+
international: boolean;
|
|
58
|
+
customs: {
|
|
59
|
+
contentsType: CustomsContentsType;
|
|
60
|
+
items: CustomsItem[];
|
|
61
|
+
} | null;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=shipping-add-ons-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipping-add-ons-types.d.ts","sourceRoot":"","sources":["../../src/resources/shipping-add-ons-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAC3B,aAAa,GACb,MAAM,GACN,WAAW,GACX,QAAQ,GACR,oBAAoB,GACpB,uBAAuB,GACvB,OAAO,CAAC;AAEZ,kDAAkD;AAClD,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,GAAG,aAAa,CAAC;AAE7F,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE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AE,OAAO,CAAC;IACvB,OAAO,EAAE;QAAE,YAAY,EAAE,mBAAmB,CAAC;QAAC,KAAK,EAAE,WAAW,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shipping-add-ons-types.js","sourceRoot":"","sources":["../../src/resources/shipping-add-ons-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { HttpClient, StoreOpts } from './_shared.js';
|
|
2
|
+
/**
|
|
3
|
+
* Settings › Integrations › Slack over /v1: the Crossly Slack app's workspaces linked to a store, the channel each
|
|
4
|
+
* posts to and which store events it posts. Per store: `storefrontId`, else the client's store, else the default
|
|
5
|
+
* store. Installing is done by a person in a browser (Slack's consent screen): `settingsUrl` is where. Never a token.
|
|
6
|
+
*/
|
|
7
|
+
/** The event families the app can post; each has its own toggle. */
|
|
8
|
+
export type SlackNotifyKey = 'sale' | 'order_shipped' | 'offer' | 'message' | 'listing_published' | 'publish_failed' | 'stock' | 'disconnected';
|
|
9
|
+
export type SlackNotifySettings = Record<SlackNotifyKey, boolean>;
|
|
10
|
+
export interface SlackInstallation {
|
|
11
|
+
id: string;
|
|
12
|
+
teamId: string;
|
|
13
|
+
teamName: string | null;
|
|
14
|
+
storefrontId: string;
|
|
15
|
+
channelId: string | null;
|
|
16
|
+
channelName: string | null;
|
|
17
|
+
notify: SlackNotifySettings;
|
|
18
|
+
status: 'active' | 'revoked';
|
|
19
|
+
installedAt: string;
|
|
20
|
+
installedBy: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface SlackStatus {
|
|
23
|
+
/** False when the deployment has no Slack app credentials. */
|
|
24
|
+
configured: boolean;
|
|
25
|
+
storefrontId: string | null;
|
|
26
|
+
installations: SlackInstallation[];
|
|
27
|
+
/** The settings page where a person adds Crossly to Slack. */
|
|
28
|
+
settingsUrl: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SlackChannel {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
isPrivate: boolean;
|
|
34
|
+
/** The bot is in the channel (it must be, to post: invite @Crossly). */
|
|
35
|
+
isMember: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface SlackSettingsInput {
|
|
38
|
+
/** The channel to post to; null stops posting. */
|
|
39
|
+
channelId?: string | null;
|
|
40
|
+
/** Only the keys given change. */
|
|
41
|
+
notify?: Partial<SlackNotifySettings>;
|
|
42
|
+
}
|
|
43
|
+
export declare class SlackAppResource {
|
|
44
|
+
private readonly http;
|
|
45
|
+
constructor(http: HttpClient);
|
|
46
|
+
/** The store's Slack workspaces. */
|
|
47
|
+
status(opts?: StoreOpts): Promise<SlackStatus>;
|
|
48
|
+
/** Channels the bot can see in a workspace. */
|
|
49
|
+
channels(id: string, opts?: StoreOpts): Promise<{
|
|
50
|
+
channels: SlackChannel[];
|
|
51
|
+
}>;
|
|
52
|
+
/** Set the channel and the event toggles. */
|
|
53
|
+
update(id: string, body: SlackSettingsInput, opts?: StoreOpts): Promise<{
|
|
54
|
+
installation: SlackInstallation;
|
|
55
|
+
}>;
|
|
56
|
+
/** Post a test message to the chosen channel. */
|
|
57
|
+
sendTest(id: string, opts?: StoreOpts): Promise<{
|
|
58
|
+
ok: true;
|
|
59
|
+
channelName: string | null;
|
|
60
|
+
}>;
|
|
61
|
+
/** Disconnect a workspace from the store (Slack revokes the token). */
|
|
62
|
+
disconnect(id: string, opts?: StoreOpts): Promise<{
|
|
63
|
+
ok: true;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=slack-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack-app.d.ts","sourceRoot":"","sources":["../../src/resources/slack-app.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D;;;;GAIG;AAEH,oEAAoE;AACpE,MAAM,MA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AM,CAAC,IAAI,GAAE,SAAc;IAO3B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,SAAc;kBACF,YAAY,EAAE;;IAMrD,6CAA6C;IAC7C,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,GAAE,SAAc;sBACtB,iBAAiB;;IAO5D,iDAAiD;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,SAAc;YACR,IAAI;qBAAe,MAAM,GAAG,IAAI;;IAMjE,uEAAuE;IACvE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,GAAE,SAAc;YACV,IAAI;;CAMtC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export class SlackAppResource {
|
|
2
|
+
http;
|
|
3
|
+
constructor(http) {
|
|
4
|
+
this.http = http;
|
|
5
|
+
}
|
|
6
|
+
/** The store's Slack workspaces. */
|
|
7
|
+
status(opts = {}) {
|
|
8
|
+
return this.http.request({
|
|
9
|
+
method: 'GET',
|
|
10
|
+
path: '/v1/integrations/slack',
|
|
11
|
+
storefrontId: opts.storefrontId,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/** Channels the bot can see in a workspace. */
|
|
15
|
+
channels(id, opts = {}) {
|
|
16
|
+
return this.http.request({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: `/v1/integrations/slack/${encodeURIComponent(id)}/channels`,
|
|
19
|
+
storefrontId: opts.storefrontId,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** Set the channel and the event toggles. */
|
|
23
|
+
update(id, body, opts = {}) {
|
|
24
|
+
return this.http.request({
|
|
25
|
+
method: 'PATCH',
|
|
26
|
+
path: `/v1/integrations/slack/${encodeURIComponent(id)}`,
|
|
27
|
+
body,
|
|
28
|
+
storefrontId: opts.storefrontId,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** Post a test message to the chosen channel. */
|
|
32
|
+
sendTest(id, opts = {}) {
|
|
33
|
+
return this.http.request({
|
|
34
|
+
method: 'POST',
|
|
35
|
+
path: `/v1/integrations/slack/${encodeURIComponent(id)}/test`,
|
|
36
|
+
storefrontId: opts.storefrontId,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** Disconnect a workspace from the store (Slack revokes the token). */
|
|
40
|
+
disconnect(id, opts = {}) {
|
|
41
|
+
return this.http.request({
|
|
42
|
+
method: 'DELETE',
|
|
43
|
+
path: `/v1/integrations/slack/${encodeURIComponent(id)}`,
|
|
44
|
+
storefrontId: opts.storefrontId,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=slack-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slack-app.js","sourceRoot":"","sources":["../../src/resources/slack-app.ts"],"names":[],"mappings":"AAmDA,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,oCAAoC;IACpC,MAAM,CAAC,OAAkB,EAAE;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAc;YACpC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,wBAAwB;YAC9B,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,+CAA+C;IAC/C,QAAQ,CAAC,EAAU,EAAE,OAAkB,EAAE;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA+B;YACrD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,0BAA0B,kBAAkB,CAAC,EAAE,CAAC,WAAW;YACjE,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,6CAA6C;IAC7C,MAAM,CAAC,EAAU,EAAE,IAAwB,EAAE,OAAkB,EAAE;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAsC;YAC5D,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,0BAA0B,kBAAkB,CAAC,EAAE,CAAC,EAAE;YACxD,IAAI;YACJ,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,iDAAiD;IACjD,QAAQ,CAAC,EAAU,EAAE,OAAkB,EAAE;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAA2C;YACjE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,0BAA0B,kBAAkB,CAAC,EAAE,CAAC,OAAO;YAC7D,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;IACD,uEAAuE;IACvE,UAAU,CAAC,EAAU,EAAE,OAAkB,EAAE;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAe;YACrC,MAAM,EAAE,QAAQ;YAChB,IAAI,EAAE,0BAA0B,kBAAkB,CAAC,EAAE,CAAC,EAAE;YACxD,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { HttpClient, JsonObject, IdempotencyOpts } from './_shared.js';
|
|
2
|
+
/** Why stock moved. `sold`, `reserved` and `released` are recorded by sales and holds, never sent by hand. */
|
|
3
|
+
export type StockAdjustmentReason = 'received' | 'recount' | 'damaged' | 'lost' | 'found' | 'written_off' | 'returned' | 'sold' | 'reserved' | 'released' | 'transfer' | 'correction';
|
|
4
|
+
/** The reasons an adjustment may be sent with. */
|
|
5
|
+
export type ManualStockAdjustmentReason = Exclude<StockAdjustmentReason, 'sold' | 'reserved' | 'released'>;
|
|
6
|
+
export interface StockAdjustmentInput {
|
|
7
|
+
/** A signed change to available stock. Send this or `setTo`. */
|
|
8
|
+
delta?: number;
|
|
9
|
+
/** The available count to end at. */
|
|
10
|
+
setTo?: number;
|
|
11
|
+
reason: ManualStockAdjustmentReason;
|
|
12
|
+
note?: string | null;
|
|
13
|
+
/** Identified units to mark written off (damaged, lost, written_off). With no delta, one unit removed per id. */
|
|
14
|
+
unitIds?: string[];
|
|
15
|
+
/** Push the new count to the marketplaces. Default true. */
|
|
16
|
+
syncMarketplaces?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** One ledger row. */
|
|
19
|
+
export interface StockAdjustment {
|
|
20
|
+
id: string;
|
|
21
|
+
inventoryItemId: string | null;
|
|
22
|
+
itemTitle: string | null;
|
|
23
|
+
sku: string | null;
|
|
24
|
+
image: string | null;
|
|
25
|
+
type: string;
|
|
26
|
+
/** Null when the move predates reasons and none can be derived. */
|
|
27
|
+
reason: StockAdjustmentReason | null;
|
|
28
|
+
note: string | null;
|
|
29
|
+
delta: number | null;
|
|
30
|
+
quantityBefore: number | null;
|
|
31
|
+
quantityAfter: number | null;
|
|
32
|
+
platform: string | null;
|
|
33
|
+
actorUserId: string | null;
|
|
34
|
+
/** Lost / written-off stock at cost, in cents: what Books posts as an inventory write-off. */
|
|
35
|
+
writeOffCents: number | null;
|
|
36
|
+
unitIds: string[];
|
|
37
|
+
createdAt: string;
|
|
38
|
+
}
|
|
39
|
+
export interface StockAdjustmentListOptions {
|
|
40
|
+
reason?: StockAdjustmentReason;
|
|
41
|
+
/** UTC day, inclusive (YYYY-MM-DD). */
|
|
42
|
+
from?: string;
|
|
43
|
+
/** UTC day, inclusive (YYYY-MM-DD). */
|
|
44
|
+
to?: string;
|
|
45
|
+
itemId?: string;
|
|
46
|
+
/** 1-200, default 50. */
|
|
47
|
+
limit?: number;
|
|
48
|
+
/** The previous page's `meta.nextBefore`. */
|
|
49
|
+
before?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare class StockAdjustmentsResource {
|
|
52
|
+
private http;
|
|
53
|
+
constructor(http: HttpClient);
|
|
54
|
+
/** The ledger, newest first. Envelope: `{ data, meta?: { nextBefore } }`. */
|
|
55
|
+
list(opts?: StockAdjustmentListOptions): Promise<JsonObject>;
|
|
56
|
+
/**
|
|
57
|
+
* Adjust one item's stock. Envelope: `{ data: { adjustment, quantity, unitsWrittenOff, cascade? } }`. 400
|
|
58
|
+
* `stock_adjustment_direction` / `_insufficient` / `_noop` / `_units_invalid` say why one was refused.
|
|
59
|
+
*/
|
|
60
|
+
adjust(inventoryItemId: string, body: StockAdjustmentInput, opts?: IdempotencyOpts): Promise<JsonObject>;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=stock-adjustments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock-adjustments.d.ts","sourceRoot":"","sources":["../../src/resources/stock-adjustments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE5E,8GAA8G;AAC9G,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,SAAS,GACT,SAAS,GACT,MAAM,GACN,OAAO,GACP,aAAa,GACb,UAAU,GACV,MAAM,GACN,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,CAAC;AAEjB,kDAAkD;AAClD,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAE3G,MAAM,WAAW,oBAAoB;IACnC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,2BAA2B,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iHAAiH;IACjH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,sBAAsB;AACtB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,8FAA8F;IAC9F,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC,6EAA6E;IAC7E,IAAI,CAAC,IAAI,GAAE,0BAA+B;IAU1C;;;OAGG;IACH,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,GAAE,eAAoB;CAQvF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// ─── Stock adjustments ──────────────────────────────────────────────────────
|
|
2
|
+
//
|
|
3
|
+
// Adjust an item's available stock with a reason (received, damaged, lost, recount…) and read the ledger of every
|
|
4
|
+
// stock move. Lost and written-off stock posts its cost to Books as an inventory write-off.
|
|
5
|
+
export class StockAdjustmentsResource {
|
|
6
|
+
http;
|
|
7
|
+
constructor(http) {
|
|
8
|
+
this.http = http;
|
|
9
|
+
}
|
|
10
|
+
/** The ledger, newest first. Envelope: `{ data, meta?: { nextBefore } }`. */
|
|
11
|
+
list(opts = {}) {
|
|
12
|
+
const query = {};
|
|
13
|
+
for (const [k, v] of Object.entries(opts))
|
|
14
|
+
if (v !== undefined && v !== null)
|
|
15
|
+
query[k] = String(v);
|
|
16
|
+
return this.http.request({
|
|
17
|
+
method: 'GET',
|
|
18
|
+
path: '/v1/inventory/adjustments',
|
|
19
|
+
query: Object.keys(query).length > 0 ? query : undefined,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Adjust one item's stock. Envelope: `{ data: { adjustment, quantity, unitsWrittenOff, cascade? } }`. 400
|
|
24
|
+
* `stock_adjustment_direction` / `_insufficient` / `_noop` / `_units_invalid` say why one was refused.
|
|
25
|
+
*/
|
|
26
|
+
adjust(inventoryItemId, body, opts = {}) {
|
|
27
|
+
return this.http.request({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
path: `/v1/inventory/${encodeURIComponent(inventoryItemId)}/adjust`,
|
|
30
|
+
body,
|
|
31
|
+
idempotencyKey: opts.idempotencyKey,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=stock-adjustments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stock-adjustments.js","sourceRoot":"","sources":["../../src/resources/stock-adjustments.ts"],"names":[],"mappings":"AAoEA,+EAA+E;AAC/E,EAAE;AACF,kHAAkH;AAClH,4FAA4F;AAE5F,MAAM,OAAO,wBAAwB;IACf;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,6EAA6E;IAC7E,IAAI,CAAC,OAAmC,EAAE;QACxC,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;gBAAE,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACnG,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,2BAA2B;YACjC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;SACzD,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,eAAuB,EAAE,IAA0B,EAAE,OAAwB,EAAE;QACpF,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAa;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,iBAAiB,kBAAkB,CAAC,eAAe,CAAC,SAAS;YACnE,IAAI;YACJ,cAAc,EAAE,IAAI,CAAC,cAAc;SACpC,CAAC,CAAC;IACL,CAAC;CACF"}
|