@commercelayer/sdk 4.47.0 → 4.49.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/lib/cjs/api.d.ts +1 -126
- package/lib/cjs/api.js +1 -394
- package/lib/cjs/client.d.ts +1 -31
- package/lib/cjs/client.js +1 -123
- package/lib/cjs/commercelayer.d.ts +1 -152
- package/lib/cjs/commercelayer.js +1 -243
- package/lib/cjs/common.d.ts +1 -4
- package/lib/cjs/common.js +1 -14
- package/lib/cjs/config.d.ts +1 -11
- package/lib/cjs/config.js +1 -13
- package/lib/cjs/debug.d.ts +1 -3
- package/lib/cjs/debug.js +1 -42
- package/lib/cjs/error.d.ts +1 -28
- package/lib/cjs/error.js +1 -43
- package/lib/cjs/index.d.ts +1 -7
- package/lib/cjs/index.js +1 -29
- package/lib/cjs/interceptor.d.ts +1 -21
- package/lib/cjs/interceptor.js +1 -2
- package/lib/cjs/jsonapi.d.ts +1 -5
- package/lib/cjs/jsonapi.js +1 -82
- package/lib/cjs/model.d.ts +1 -124
- package/lib/cjs/model.js +1 -3
- package/lib/cjs/query.d.ts +1 -23
- package/lib/cjs/query.js +1 -51
- package/lib/cjs/resource.d.ts +1 -75
- package/lib/cjs/resource.js +1 -145
- package/lib/cjs/resources/addresses.d.ts +1 -102
- package/lib/cjs/resources/addresses.js +1 -49
- package/lib/cjs/resources/adjustments.d.ts +1 -41
- package/lib/cjs/resources/adjustments.js +1 -37
- package/lib/cjs/resources/adyen_gateways.d.ts +1 -59
- package/lib/cjs/resources/adyen_gateways.js +1 -45
- package/lib/cjs/resources/adyen_payments.d.ts +1 -49
- package/lib/cjs/resources/adyen_payments.js +1 -45
- package/lib/cjs/resources/application.d.ts +1 -21
- package/lib/cjs/resources/application.js +1 -21
- package/lib/cjs/resources/attachments.d.ts +1 -156
- package/lib/cjs/resources/attachments.js +1 -33
- package/lib/cjs/resources/authorizations.d.ts +1 -66
- package/lib/cjs/resources/authorizations.js +1 -51
- package/lib/cjs/resources/avalara_accounts.d.ts +1 -58
- package/lib/cjs/resources/avalara_accounts.js +1 -49
- package/lib/cjs/resources/axerve_gateways.d.ts +1 -47
- package/lib/cjs/resources/axerve_gateways.js +1 -45
- package/lib/cjs/resources/axerve_payments.d.ts +1 -55
- package/lib/cjs/resources/axerve_payments.js +1 -45
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/cjs/resources/billing_info_validation_rules.js +1 -45
- package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
- package/lib/cjs/resources/bing_geocoders.js +1 -41
- package/lib/cjs/resources/braintree_gateways.d.ts +1 -59
- package/lib/cjs/resources/braintree_gateways.js +1 -45
- package/lib/cjs/resources/braintree_payments.d.ts +1 -51
- package/lib/cjs/resources/braintree_payments.js +1 -45
- package/lib/cjs/resources/bundles.d.ts +1 -90
- package/lib/cjs/resources/bundles.js +1 -61
- package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -81
- package/lib/cjs/resources/captures.d.ts +1 -57
- package/lib/cjs/resources/captures.js +1 -51
- package/lib/cjs/resources/carrier_accounts.d.ts +1 -29
- package/lib/cjs/resources/carrier_accounts.js +1 -36
- package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/cjs/resources/checkout_com_gateways.js +1 -45
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -62
- package/lib/cjs/resources/checkout_com_payments.js +1 -45
- package/lib/cjs/resources/cleanups.d.ts +1 -39
- package/lib/cjs/resources/cleanups.js +1 -38
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -41
- package/lib/cjs/resources/coupon_recipients.d.ts +1 -47
- package/lib/cjs/resources/coupon_recipients.js +1 -45
- package/lib/cjs/resources/coupons.d.ts +1 -70
- package/lib/cjs/resources/coupons.js +1 -53
- package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/cjs/resources/custom_promotion_rules.js +1 -37
- package/lib/cjs/resources/customer_addresses.d.ts +1 -49
- package/lib/cjs/resources/customer_addresses.js +1 -49
- package/lib/cjs/resources/customer_groups.d.ts +1 -39
- package/lib/cjs/resources/customer_groups.js +1 -49
- package/lib/cjs/resources/customer_password_resets.d.ts +1 -36
- package/lib/cjs/resources/customer_password_resets.js +1 -41
- package/lib/cjs/resources/customer_payment_sources.d.ts +1 -85
- package/lib/cjs/resources/customer_payment_sources.js +1 -45
- package/lib/cjs/resources/customer_subscriptions.d.ts +1 -34
- package/lib/cjs/resources/customer_subscriptions.js +1 -45
- package/lib/cjs/resources/customers.d.ts +1 -75
- package/lib/cjs/resources/customers.js +1 -77
- package/lib/cjs/resources/delivery_lead_times.d.ts +1 -54
- package/lib/cjs/resources/delivery_lead_times.js +1 -49
- package/lib/cjs/resources/event_callbacks.d.ts +1 -24
- package/lib/cjs/resources/event_callbacks.js +1 -28
- package/lib/cjs/resources/events.d.ts +1 -24
- package/lib/cjs/resources/events.js +1 -32
- package/lib/cjs/resources/exports.d.ts +1 -40
- package/lib/cjs/resources/exports.js +1 -34
- package/lib/cjs/resources/external_gateways.d.ts +1 -55
- package/lib/cjs/resources/external_gateways.js +1 -45
- package/lib/cjs/resources/external_payments.d.ts +1 -47
- package/lib/cjs/resources/external_payments.js +1 -49
- package/lib/cjs/resources/external_promotions.d.ts +1 -132
- package/lib/cjs/resources/external_promotions.js +1 -81
- package/lib/cjs/resources/external_tax_calculators.d.ts +1 -43
- package/lib/cjs/resources/external_tax_calculators.js +1 -45
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -81
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/cjs/resources/fixed_price_promotions.js +1 -81
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -128
- package/lib/cjs/resources/free_gift_promotions.js +1 -81
- package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/cjs/resources/free_shipping_promotions.js +1 -77
- package/lib/cjs/resources/geocoders.d.ts +1 -24
- package/lib/cjs/resources/geocoders.js +1 -32
- package/lib/cjs/resources/gift_card_recipients.d.ts +1 -47
- package/lib/cjs/resources/gift_card_recipients.js +1 -45
- package/lib/cjs/resources/gift_cards.d.ts +1 -99
- package/lib/cjs/resources/gift_cards.js +1 -57
- package/lib/cjs/resources/google_geocoders.d.ts +1 -35
- package/lib/cjs/resources/google_geocoders.js +1 -41
- package/lib/cjs/resources/imports.d.ts +1 -43
- package/lib/cjs/resources/imports.js +1 -34
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -53
- package/lib/cjs/resources/inventory_models.d.ts +1 -54
- package/lib/cjs/resources/inventory_models.js +1 -49
- package/lib/cjs/resources/inventory_return_locations.d.ts +1 -46
- package/lib/cjs/resources/inventory_return_locations.js +1 -45
- package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/cjs/resources/inventory_stock_locations.js +1 -45
- package/lib/cjs/resources/klarna_gateways.d.ts +1 -47
- package/lib/cjs/resources/klarna_gateways.js +1 -45
- package/lib/cjs/resources/klarna_payments.d.ts +1 -49
- package/lib/cjs/resources/klarna_payments.js +1 -45
- package/lib/cjs/resources/line_item_options.d.ts +1 -68
- package/lib/cjs/resources/line_item_options.js +1 -49
- package/lib/cjs/resources/line_items.d.ts +1 -166
- package/lib/cjs/resources/line_items.js +1 -65
- package/lib/cjs/resources/manual_gateways.d.ts +1 -33
- package/lib/cjs/resources/manual_gateways.js +1 -41
- package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/cjs/resources/manual_tax_calculators.js +1 -49
- package/lib/cjs/resources/markets.d.ts +1 -104
- package/lib/cjs/resources/markets.js +1 -65
- package/lib/cjs/resources/merchants.d.ts +1 -41
- package/lib/cjs/resources/merchants.js +1 -45
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -37
- package/lib/cjs/resources/order_copies.d.ts +1 -50
- package/lib/cjs/resources/order_copies.js +1 -49
- package/lib/cjs/resources/order_factories.d.ts +1 -33
- package/lib/cjs/resources/order_factories.js +1 -36
- package/lib/cjs/resources/order_subscription_items.d.ts +1 -67
- package/lib/cjs/resources/order_subscription_items.js +1 -41
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -92
- package/lib/cjs/resources/order_subscriptions.js +1 -77
- package/lib/cjs/resources/order_validation_rules.d.ts +1 -26
- package/lib/cjs/resources/order_validation_rules.js +1 -36
- package/lib/cjs/resources/orders.d.ts +1 -359
- package/lib/cjs/resources/orders.js +1 -157
- package/lib/cjs/resources/organization.d.ts +1 -33
- package/lib/cjs/resources/organization.js +1 -21
- package/lib/cjs/resources/packages.d.ts +1 -59
- package/lib/cjs/resources/packages.js +1 -49
- package/lib/cjs/resources/parcel_line_items.d.ts +1 -46
- package/lib/cjs/resources/parcel_line_items.js +1 -45
- package/lib/cjs/resources/parcels.d.ts +1 -125
- package/lib/cjs/resources/parcels.js +1 -57
- package/lib/cjs/resources/payment_gateways.d.ts +1 -24
- package/lib/cjs/resources/payment_gateways.js +1 -32
- package/lib/cjs/resources/payment_methods.d.ts +1 -80
- package/lib/cjs/resources/payment_methods.js +1 -49
- package/lib/cjs/resources/payment_options.d.ts +1 -43
- package/lib/cjs/resources/payment_options.js +1 -41
- package/lib/cjs/resources/paypal_gateways.d.ts +1 -40
- package/lib/cjs/resources/paypal_gateways.js +1 -45
- package/lib/cjs/resources/paypal_payments.d.ts +1 -55
- package/lib/cjs/resources/paypal_payments.js +1 -45
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -81
- package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_frequency_tiers.js +1 -49
- package/lib/cjs/resources/price_lists.d.ts +1 -45
- package/lib/cjs/resources/price_lists.js +1 -45
- package/lib/cjs/resources/price_tiers.d.ts +1 -31
- package/lib/cjs/resources/price_tiers.js +1 -36
- package/lib/cjs/resources/price_volume_tiers.d.ts +1 -52
- package/lib/cjs/resources/price_volume_tiers.js +1 -49
- package/lib/cjs/resources/prices.d.ts +1 -74
- package/lib/cjs/resources/prices.js +1 -61
- package/lib/cjs/resources/promotion_rules.d.ts +1 -28
- package/lib/cjs/resources/promotion_rules.js +1 -28
- package/lib/cjs/resources/promotions.d.ts +1 -62
- package/lib/cjs/resources/promotions.js +1 -68
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -52
- package/lib/cjs/resources/recurring_order_copies.js +1 -49
- package/lib/cjs/resources/refunds.d.ts +1 -43
- package/lib/cjs/resources/refunds.js +1 -44
- package/lib/cjs/resources/reserved_stocks.d.ts +1 -27
- package/lib/cjs/resources/reserved_stocks.js +1 -36
- package/lib/cjs/resources/resource_errors.d.ts +1 -22
- package/lib/cjs/resources/resource_errors.js +1 -24
- package/lib/cjs/resources/return_line_items.d.ts +1 -50
- package/lib/cjs/resources/return_line_items.js +1 -41
- package/lib/cjs/resources/returns.d.ts +1 -86
- package/lib/cjs/resources/returns.js +1 -73
- package/lib/cjs/resources/satispay_gateways.d.ts +1 -45
- package/lib/cjs/resources/satispay_gateways.js +1 -45
- package/lib/cjs/resources/satispay_payments.d.ts +1 -51
- package/lib/cjs/resources/satispay_payments.js +1 -45
- package/lib/cjs/resources/shipments.d.ts +1 -139
- package/lib/cjs/resources/shipments.js +1 -105
- package/lib/cjs/resources/shipping_categories.d.ts +1 -39
- package/lib/cjs/resources/shipping_categories.js +1 -45
- package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/cjs/resources/shipping_method_tiers.js +1 -36
- package/lib/cjs/resources/shipping_methods.d.ts +1 -121
- package/lib/cjs/resources/shipping_methods.js +1 -69
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -45
- package/lib/cjs/resources/shipping_zones.d.ts +1 -51
- package/lib/cjs/resources/shipping_zones.js +1 -41
- package/lib/cjs/resources/sku_list_items.d.ts +1 -50
- package/lib/cjs/resources/sku_list_items.js +1 -45
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/cjs/resources/sku_list_promotion_rules.js +1 -45
- package/lib/cjs/resources/sku_lists.d.ts +1 -63
- package/lib/cjs/resources/sku_lists.js +1 -57
- package/lib/cjs/resources/sku_options.d.ts +1 -70
- package/lib/cjs/resources/sku_options.js +1 -53
- package/lib/cjs/resources/skus.d.ts +1 -95
- package/lib/cjs/resources/skus.js +1 -73
- package/lib/cjs/resources/stock_items.d.ts +1 -58
- package/lib/cjs/resources/stock_items.js +1 -57
- package/lib/cjs/resources/stock_line_items.d.ts +1 -69
- package/lib/cjs/resources/stock_line_items.js +1 -53
- package/lib/cjs/resources/stock_locations.d.ts +1 -63
- package/lib/cjs/resources/stock_locations.js +1 -61
- package/lib/cjs/resources/stock_reservations.d.ts +1 -49
- package/lib/cjs/resources/stock_reservations.js +1 -53
- package/lib/cjs/resources/stock_transfers.d.ts +1 -79
- package/lib/cjs/resources/stock_transfers.js +1 -61
- package/lib/cjs/resources/stripe_gateways.d.ts +1 -44
- package/lib/cjs/resources/stripe_gateways.js +1 -45
- package/lib/cjs/resources/stripe_payments.d.ts +1 -59
- package/lib/cjs/resources/stripe_payments.js +1 -45
- package/lib/cjs/resources/subscription_models.d.ts +1 -48
- package/lib/cjs/resources/subscription_models.js +1 -45
- package/lib/cjs/resources/tags.d.ts +1 -27
- package/lib/cjs/resources/tags.js +1 -33
- package/lib/cjs/resources/tax_calculators.d.ts +1 -27
- package/lib/cjs/resources/tax_calculators.js +1 -36
- package/lib/cjs/resources/tax_categories.d.ts +1 -62
- package/lib/cjs/resources/tax_categories.js +1 -45
- package/lib/cjs/resources/tax_rules.d.ts +1 -72
- package/lib/cjs/resources/tax_rules.js +1 -41
- package/lib/cjs/resources/taxjar_accounts.d.ts +1 -46
- package/lib/cjs/resources/taxjar_accounts.js +1 -49
- package/lib/cjs/resources/transactions.d.ts +1 -40
- package/lib/cjs/resources/transactions.js +1 -40
- package/lib/cjs/resources/versions.d.ts +1 -22
- package/lib/cjs/resources/versions.js +1 -24
- package/lib/cjs/resources/voids.d.ts +1 -43
- package/lib/cjs/resources/voids.js +1 -44
- package/lib/cjs/resources/webhooks.d.ts +1 -51
- package/lib/cjs/resources/webhooks.js +1 -41
- package/lib/cjs/resources/wire_transfers.d.ts +1 -36
- package/lib/cjs/resources/wire_transfers.js +1 -41
- package/lib/cjs/static.d.ts +1 -9
- package/lib/cjs/static.js +1 -45
- package/lib/cjs/util.d.ts +1 -6
- package/lib/cjs/util.js +1 -15
- package/lib/esm/api.d.ts +1 -126
- package/lib/esm/api.js +1 -265
- package/lib/esm/client.d.ts +1 -31
- package/lib/esm/client.js +1 -118
- package/lib/esm/commercelayer.d.ts +1 -152
- package/lib/esm/commercelayer.js +1 -214
- package/lib/esm/common.d.ts +1 -4
- package/lib/esm/common.js +1 -10
- package/lib/esm/config.d.ts +1 -11
- package/lib/esm/config.js +1 -11
- package/lib/esm/debug.d.ts +1 -3
- package/lib/esm/debug.js +1 -40
- package/lib/esm/error.d.ts +1 -28
- package/lib/esm/error.js +1 -38
- package/lib/esm/index.d.ts +1 -7
- package/lib/esm/index.js +1 -6
- package/lib/esm/interceptor.d.ts +1 -21
- package/lib/esm/interceptor.js +1 -1
- package/lib/esm/jsonapi.d.ts +1 -5
- package/lib/esm/jsonapi.js +1 -75
- package/lib/esm/model.d.ts +1 -124
- package/lib/esm/model.js +1 -2
- package/lib/esm/query.d.ts +1 -23
- package/lib/esm/query.js +1 -45
- package/lib/esm/resource.d.ts +1 -75
- package/lib/esm/resource.js +1 -139
- package/lib/esm/resources/addresses.d.ts +1 -102
- package/lib/esm/resources/addresses.js +1 -47
- package/lib/esm/resources/adjustments.d.ts +1 -41
- package/lib/esm/resources/adjustments.js +1 -35
- package/lib/esm/resources/adyen_gateways.d.ts +1 -59
- package/lib/esm/resources/adyen_gateways.js +1 -43
- package/lib/esm/resources/adyen_payments.d.ts +1 -49
- package/lib/esm/resources/adyen_payments.js +1 -43
- package/lib/esm/resources/application.d.ts +1 -21
- package/lib/esm/resources/application.js +1 -19
- package/lib/esm/resources/attachments.d.ts +1 -156
- package/lib/esm/resources/attachments.js +1 -31
- package/lib/esm/resources/authorizations.d.ts +1 -66
- package/lib/esm/resources/authorizations.js +1 -49
- package/lib/esm/resources/avalara_accounts.d.ts +1 -58
- package/lib/esm/resources/avalara_accounts.js +1 -47
- package/lib/esm/resources/axerve_gateways.d.ts +1 -47
- package/lib/esm/resources/axerve_gateways.js +1 -43
- package/lib/esm/resources/axerve_payments.d.ts +1 -55
- package/lib/esm/resources/axerve_payments.js +1 -43
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -38
- package/lib/esm/resources/billing_info_validation_rules.js +1 -43
- package/lib/esm/resources/bing_geocoders.d.ts +1 -35
- package/lib/esm/resources/bing_geocoders.js +1 -39
- package/lib/esm/resources/braintree_gateways.d.ts +1 -59
- package/lib/esm/resources/braintree_gateways.js +1 -43
- package/lib/esm/resources/braintree_payments.d.ts +1 -51
- package/lib/esm/resources/braintree_payments.js +1 -43
- package/lib/esm/resources/bundles.d.ts +1 -90
- package/lib/esm/resources/bundles.js +1 -59
- package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -134
- package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -79
- package/lib/esm/resources/captures.d.ts +1 -57
- package/lib/esm/resources/captures.js +1 -49
- package/lib/esm/resources/carrier_accounts.d.ts +1 -29
- package/lib/esm/resources/carrier_accounts.js +1 -34
- package/lib/esm/resources/checkout_com_gateways.d.ts +1 -48
- package/lib/esm/resources/checkout_com_gateways.js +1 -43
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -62
- package/lib/esm/resources/checkout_com_payments.js +1 -43
- package/lib/esm/resources/cleanups.d.ts +1 -39
- package/lib/esm/resources/cleanups.js +1 -36
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -39
- package/lib/esm/resources/coupon_recipients.d.ts +1 -47
- package/lib/esm/resources/coupon_recipients.js +1 -43
- package/lib/esm/resources/coupons.d.ts +1 -70
- package/lib/esm/resources/coupons.js +1 -51
- package/lib/esm/resources/custom_promotion_rules.d.ts +1 -61
- package/lib/esm/resources/custom_promotion_rules.js +1 -35
- package/lib/esm/resources/customer_addresses.d.ts +1 -49
- package/lib/esm/resources/customer_addresses.js +1 -47
- package/lib/esm/resources/customer_groups.d.ts +1 -39
- package/lib/esm/resources/customer_groups.js +1 -47
- package/lib/esm/resources/customer_password_resets.d.ts +1 -36
- package/lib/esm/resources/customer_password_resets.js +1 -39
- package/lib/esm/resources/customer_payment_sources.d.ts +1 -85
- package/lib/esm/resources/customer_payment_sources.js +1 -43
- package/lib/esm/resources/customer_subscriptions.d.ts +1 -34
- package/lib/esm/resources/customer_subscriptions.js +1 -43
- package/lib/esm/resources/customers.d.ts +1 -75
- package/lib/esm/resources/customers.js +1 -75
- package/lib/esm/resources/delivery_lead_times.d.ts +1 -54
- package/lib/esm/resources/delivery_lead_times.js +1 -47
- package/lib/esm/resources/event_callbacks.d.ts +1 -24
- package/lib/esm/resources/event_callbacks.js +1 -26
- package/lib/esm/resources/events.d.ts +1 -24
- package/lib/esm/resources/events.js +1 -30
- package/lib/esm/resources/exports.d.ts +1 -40
- package/lib/esm/resources/exports.js +1 -32
- package/lib/esm/resources/external_gateways.d.ts +1 -55
- package/lib/esm/resources/external_gateways.js +1 -43
- package/lib/esm/resources/external_payments.d.ts +1 -47
- package/lib/esm/resources/external_payments.js +1 -47
- package/lib/esm/resources/external_promotions.d.ts +1 -132
- package/lib/esm/resources/external_promotions.js +1 -79
- package/lib/esm/resources/external_tax_calculators.d.ts +1 -43
- package/lib/esm/resources/external_tax_calculators.js +1 -43
- package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_amount_promotions.js +1 -79
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -130
- package/lib/esm/resources/fixed_price_promotions.js +1 -79
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -128
- package/lib/esm/resources/free_gift_promotions.js +1 -79
- package/lib/esm/resources/free_shipping_promotions.d.ts +1 -122
- package/lib/esm/resources/free_shipping_promotions.js +1 -75
- package/lib/esm/resources/geocoders.d.ts +1 -24
- package/lib/esm/resources/geocoders.js +1 -30
- package/lib/esm/resources/gift_card_recipients.d.ts +1 -47
- package/lib/esm/resources/gift_card_recipients.js +1 -43
- package/lib/esm/resources/gift_cards.d.ts +1 -99
- package/lib/esm/resources/gift_cards.js +1 -55
- package/lib/esm/resources/google_geocoders.d.ts +1 -35
- package/lib/esm/resources/google_geocoders.js +1 -39
- package/lib/esm/resources/imports.d.ts +1 -43
- package/lib/esm/resources/imports.js +1 -32
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -65
- package/lib/esm/resources/in_stock_subscriptions.js +1 -51
- package/lib/esm/resources/inventory_models.d.ts +1 -54
- package/lib/esm/resources/inventory_models.js +1 -47
- package/lib/esm/resources/inventory_return_locations.d.ts +1 -46
- package/lib/esm/resources/inventory_return_locations.js +1 -43
- package/lib/esm/resources/inventory_stock_locations.d.ts +1 -49
- package/lib/esm/resources/inventory_stock_locations.js +1 -43
- package/lib/esm/resources/klarna_gateways.d.ts +1 -47
- package/lib/esm/resources/klarna_gateways.js +1 -43
- package/lib/esm/resources/klarna_payments.d.ts +1 -49
- package/lib/esm/resources/klarna_payments.js +1 -43
- package/lib/esm/resources/line_item_options.d.ts +1 -68
- package/lib/esm/resources/line_item_options.js +1 -47
- package/lib/esm/resources/line_items.d.ts +1 -166
- package/lib/esm/resources/line_items.js +1 -63
- package/lib/esm/resources/manual_gateways.d.ts +1 -33
- package/lib/esm/resources/manual_gateways.js +1 -39
- package/lib/esm/resources/manual_tax_calculators.d.ts +1 -44
- package/lib/esm/resources/manual_tax_calculators.js +1 -47
- package/lib/esm/resources/markets.d.ts +1 -104
- package/lib/esm/resources/markets.js +1 -63
- package/lib/esm/resources/merchants.d.ts +1 -41
- package/lib/esm/resources/merchants.js +1 -43
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -66
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -35
- package/lib/esm/resources/order_copies.d.ts +1 -50
- package/lib/esm/resources/order_copies.js +1 -47
- package/lib/esm/resources/order_factories.d.ts +1 -33
- package/lib/esm/resources/order_factories.js +1 -34
- package/lib/esm/resources/order_subscription_items.d.ts +1 -67
- package/lib/esm/resources/order_subscription_items.js +1 -39
- package/lib/esm/resources/order_subscriptions.d.ts +1 -92
- package/lib/esm/resources/order_subscriptions.js +1 -75
- package/lib/esm/resources/order_validation_rules.d.ts +1 -26
- package/lib/esm/resources/order_validation_rules.js +1 -34
- package/lib/esm/resources/orders.d.ts +1 -359
- package/lib/esm/resources/orders.js +1 -155
- package/lib/esm/resources/organization.d.ts +1 -33
- package/lib/esm/resources/organization.js +1 -19
- package/lib/esm/resources/packages.d.ts +1 -59
- package/lib/esm/resources/packages.js +1 -47
- package/lib/esm/resources/parcel_line_items.d.ts +1 -46
- package/lib/esm/resources/parcel_line_items.js +1 -43
- package/lib/esm/resources/parcels.d.ts +1 -125
- package/lib/esm/resources/parcels.js +1 -55
- package/lib/esm/resources/payment_gateways.d.ts +1 -24
- package/lib/esm/resources/payment_gateways.js +1 -30
- package/lib/esm/resources/payment_methods.d.ts +1 -80
- package/lib/esm/resources/payment_methods.js +1 -47
- package/lib/esm/resources/payment_options.d.ts +1 -43
- package/lib/esm/resources/payment_options.js +1 -39
- package/lib/esm/resources/paypal_gateways.d.ts +1 -40
- package/lib/esm/resources/paypal_gateways.js +1 -43
- package/lib/esm/resources/paypal_payments.d.ts +1 -55
- package/lib/esm/resources/paypal_payments.js +1 -43
- package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -128
- package/lib/esm/resources/percentage_discount_promotions.js +1 -79
- package/lib/esm/resources/price_frequency_tiers.d.ts +1 -52
- package/lib/esm/resources/price_frequency_tiers.js +1 -47
- package/lib/esm/resources/price_lists.d.ts +1 -45
- package/lib/esm/resources/price_lists.js +1 -43
- package/lib/esm/resources/price_tiers.d.ts +1 -31
- package/lib/esm/resources/price_tiers.js +1 -34
- package/lib/esm/resources/price_volume_tiers.d.ts +1 -52
- package/lib/esm/resources/price_volume_tiers.js +1 -47
- package/lib/esm/resources/prices.d.ts +1 -74
- package/lib/esm/resources/prices.js +1 -59
- package/lib/esm/resources/promotion_rules.d.ts +1 -28
- package/lib/esm/resources/promotion_rules.js +1 -26
- package/lib/esm/resources/promotions.d.ts +1 -62
- package/lib/esm/resources/promotions.js +1 -66
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -52
- package/lib/esm/resources/recurring_order_copies.js +1 -47
- package/lib/esm/resources/refunds.d.ts +1 -43
- package/lib/esm/resources/refunds.js +1 -42
- package/lib/esm/resources/reserved_stocks.d.ts +1 -27
- package/lib/esm/resources/reserved_stocks.js +1 -34
- package/lib/esm/resources/resource_errors.d.ts +1 -22
- package/lib/esm/resources/resource_errors.js +1 -22
- package/lib/esm/resources/return_line_items.d.ts +1 -50
- package/lib/esm/resources/return_line_items.js +1 -39
- package/lib/esm/resources/returns.d.ts +1 -86
- package/lib/esm/resources/returns.js +1 -71
- package/lib/esm/resources/satispay_gateways.d.ts +1 -45
- package/lib/esm/resources/satispay_gateways.js +1 -43
- package/lib/esm/resources/satispay_payments.d.ts +1 -51
- package/lib/esm/resources/satispay_payments.js +1 -43
- package/lib/esm/resources/shipments.d.ts +1 -139
- package/lib/esm/resources/shipments.js +1 -103
- package/lib/esm/resources/shipping_categories.d.ts +1 -39
- package/lib/esm/resources/shipping_categories.js +1 -43
- package/lib/esm/resources/shipping_method_tiers.d.ts +1 -31
- package/lib/esm/resources/shipping_method_tiers.js +1 -34
- package/lib/esm/resources/shipping_methods.d.ts +1 -121
- package/lib/esm/resources/shipping_methods.js +1 -67
- package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -49
- package/lib/esm/resources/shipping_weight_tiers.js +1 -43
- package/lib/esm/resources/shipping_zones.d.ts +1 -51
- package/lib/esm/resources/shipping_zones.js +1 -39
- package/lib/esm/resources/sku_list_items.d.ts +1 -50
- package/lib/esm/resources/sku_list_items.js +1 -43
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -75
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -43
- package/lib/esm/resources/sku_lists.d.ts +1 -63
- package/lib/esm/resources/sku_lists.js +1 -55
- package/lib/esm/resources/sku_options.d.ts +1 -70
- package/lib/esm/resources/sku_options.js +1 -51
- package/lib/esm/resources/skus.d.ts +1 -95
- package/lib/esm/resources/skus.js +1 -71
- package/lib/esm/resources/stock_items.d.ts +1 -58
- package/lib/esm/resources/stock_items.js +1 -55
- package/lib/esm/resources/stock_line_items.d.ts +1 -69
- package/lib/esm/resources/stock_line_items.js +1 -51
- package/lib/esm/resources/stock_locations.d.ts +1 -63
- package/lib/esm/resources/stock_locations.js +1 -59
- package/lib/esm/resources/stock_reservations.d.ts +1 -49
- package/lib/esm/resources/stock_reservations.js +1 -51
- package/lib/esm/resources/stock_transfers.d.ts +1 -79
- package/lib/esm/resources/stock_transfers.js +1 -59
- package/lib/esm/resources/stripe_gateways.d.ts +1 -44
- package/lib/esm/resources/stripe_gateways.js +1 -43
- package/lib/esm/resources/stripe_payments.d.ts +1 -59
- package/lib/esm/resources/stripe_payments.js +1 -43
- package/lib/esm/resources/subscription_models.d.ts +1 -48
- package/lib/esm/resources/subscription_models.js +1 -43
- package/lib/esm/resources/tags.d.ts +1 -27
- package/lib/esm/resources/tags.js +1 -31
- package/lib/esm/resources/tax_calculators.d.ts +1 -27
- package/lib/esm/resources/tax_calculators.js +1 -34
- package/lib/esm/resources/tax_categories.d.ts +1 -62
- package/lib/esm/resources/tax_categories.js +1 -43
- package/lib/esm/resources/tax_rules.d.ts +1 -72
- package/lib/esm/resources/tax_rules.js +1 -39
- package/lib/esm/resources/taxjar_accounts.d.ts +1 -46
- package/lib/esm/resources/taxjar_accounts.js +1 -47
- package/lib/esm/resources/transactions.d.ts +1 -40
- package/lib/esm/resources/transactions.js +1 -38
- package/lib/esm/resources/versions.d.ts +1 -22
- package/lib/esm/resources/versions.js +1 -22
- package/lib/esm/resources/voids.d.ts +1 -43
- package/lib/esm/resources/voids.js +1 -42
- package/lib/esm/resources/webhooks.d.ts +1 -51
- package/lib/esm/resources/webhooks.js +1 -39
- package/lib/esm/resources/wire_transfers.d.ts +1 -36
- package/lib/esm/resources/wire_transfers.js +1 -39
- package/lib/esm/static.d.ts +1 -9
- package/lib/esm/static.js +1 -19
- package/lib/esm/util.d.ts +1 -6
- package/lib/esm/util.js +1 -11
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
@@ -1,63 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Customer } from './customers';
|
4
|
-
import type { Sku } from './skus';
|
5
|
-
import type { SkuListItem } from './sku_list_items';
|
6
|
-
import type { Bundle } from './bundles';
|
7
|
-
import type { Attachment } from './attachments';
|
8
|
-
import type { Version } from './versions';
|
9
|
-
type SkuListRel = ResourceRel & {
|
10
|
-
type: typeof SkuLists.TYPE;
|
11
|
-
};
|
12
|
-
type CustomerRel = ResourceRel & {
|
13
|
-
type: 'customers';
|
14
|
-
};
|
15
|
-
interface SkuList extends Resource {
|
16
|
-
name?: string;
|
17
|
-
slug?: string;
|
18
|
-
description?: string;
|
19
|
-
image_url?: string;
|
20
|
-
manual?: boolean;
|
21
|
-
sku_code_regex?: string;
|
22
|
-
customer?: Customer;
|
23
|
-
skus?: Sku[];
|
24
|
-
sku_list_items?: SkuListItem[];
|
25
|
-
bundles?: Bundle[];
|
26
|
-
attachments?: Attachment[];
|
27
|
-
versions?: Version[];
|
28
|
-
}
|
29
|
-
interface SkuListCreate extends ResourceCreate {
|
30
|
-
name: string;
|
31
|
-
description?: string;
|
32
|
-
image_url?: string;
|
33
|
-
manual?: boolean;
|
34
|
-
sku_code_regex?: string;
|
35
|
-
customer?: CustomerRel;
|
36
|
-
}
|
37
|
-
interface SkuListUpdate extends ResourceUpdate {
|
38
|
-
name?: string;
|
39
|
-
description?: string;
|
40
|
-
image_url?: string;
|
41
|
-
manual?: boolean;
|
42
|
-
sku_code_regex?: string;
|
43
|
-
customer?: CustomerRel;
|
44
|
-
}
|
45
|
-
declare class SkuLists extends ApiResource {
|
46
|
-
static readonly TYPE: 'sku_lists';
|
47
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuList>>;
|
48
|
-
create(resource: SkuListCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
49
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
50
|
-
update(resource: SkuListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
|
51
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
52
|
-
customer(skuListId: string | SkuList, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
53
|
-
skus(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
54
|
-
sku_list_items(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
|
55
|
-
bundles(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
56
|
-
attachments(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
57
|
-
versions(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
58
|
-
isSkuList(resource: any): resource is SkuList;
|
59
|
-
relationship(id: string | ResourceId | null): SkuListRel;
|
60
|
-
type(): string;
|
61
|
-
}
|
62
|
-
export default SkuLists;
|
63
|
-
export { SkuList, SkuListCreate, SkuListUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Customer}from'./customers';import type{Sku}from'./skus';import type{SkuListItem}from'./sku_list_items';import type{Bundle}from'./bundles';import type{Attachment}from'./attachments';import type{Version}from'./versions';type SkuListRel=ResourceRel&{type:typeof SkuLists.TYPE;};type CustomerRel=ResourceRel&{type:'customers';};interface SkuList extends Resource{name?:string;slug?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;customer?:Customer;skus?:Sku[];sku_list_items?:SkuListItem[];bundles?:Bundle[];attachments?:Attachment[];versions?:Version[];}interface SkuListCreate extends ResourceCreate{name:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;customer?:CustomerRel;}interface SkuListUpdate extends ResourceUpdate{name?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;customer?:CustomerRel;}declare class SkuLists extends ApiResource{static readonly TYPE:'sku_lists';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuList>>;create(resource:SkuListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;update(resource:SkuListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;delete(id:string,options?:ResourcesConfig):Promise<void>;customer(skuListId:string|SkuList,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;skus(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;sku_list_items(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;bundles(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;attachments(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSkuList(resource:any):resource is SkuList;relationship(id:string|ResourceId|null):SkuListRel;type():string;}export default SkuLists;export{SkuList,SkuListCreate,SkuListUpdate};
|
@@ -1,55 +1 @@
|
|
1
|
-
import
|
2
|
-
class SkuLists extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_lists'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: SkuLists.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: SkuLists.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: SkuLists.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SkuLists.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: SkuLists.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async customer(skuListId, params, options) {
|
20
|
-
const _skuListId = skuListId.id || skuListId;
|
21
|
-
return this.resources.fetch({ type: 'customers' }, `sku_lists/${_skuListId}/customer`, params, options);
|
22
|
-
}
|
23
|
-
async skus(skuListId, params, options) {
|
24
|
-
const _skuListId = skuListId.id || skuListId;
|
25
|
-
return this.resources.fetch({ type: 'skus' }, `sku_lists/${_skuListId}/skus`, params, options);
|
26
|
-
}
|
27
|
-
async sku_list_items(skuListId, params, options) {
|
28
|
-
const _skuListId = skuListId.id || skuListId;
|
29
|
-
return this.resources.fetch({ type: 'sku_list_items' }, `sku_lists/${_skuListId}/sku_list_items`, params, options);
|
30
|
-
}
|
31
|
-
async bundles(skuListId, params, options) {
|
32
|
-
const _skuListId = skuListId.id || skuListId;
|
33
|
-
return this.resources.fetch({ type: 'bundles' }, `sku_lists/${_skuListId}/bundles`, params, options);
|
34
|
-
}
|
35
|
-
async attachments(skuListId, params, options) {
|
36
|
-
const _skuListId = skuListId.id || skuListId;
|
37
|
-
return this.resources.fetch({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options);
|
38
|
-
}
|
39
|
-
async versions(skuListId, params, options) {
|
40
|
-
const _skuListId = skuListId.id || skuListId;
|
41
|
-
return this.resources.fetch({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options);
|
42
|
-
}
|
43
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
|
-
isSkuList(resource) {
|
45
|
-
return resource.type && (resource.type === SkuLists.TYPE);
|
46
|
-
}
|
47
|
-
relationship(id) {
|
48
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SkuLists.TYPE } : { id: id.id, type: SkuLists.TYPE };
|
49
|
-
}
|
50
|
-
type() {
|
51
|
-
return SkuLists.TYPE;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
SkuLists.TYPE = 'sku_lists';
|
55
|
-
export default SkuLists;
|
1
|
+
import{ApiResource as n}from"../resource";class r extends n{async list(s,e){return this.resources.list({type:r.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:r.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:r.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:r.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:r.TYPE,id:s},e)}async customer(s,e,t){const c=s.id||s;return this.resources.fetch({type:"customers"},`sku_lists/${c}/customer`,e,t)}async skus(s,e,t){const c=s.id||s;return this.resources.fetch({type:"skus"},`sku_lists/${c}/skus`,e,t)}async sku_list_items(s,e,t){const c=s.id||s;return this.resources.fetch({type:"sku_list_items"},`sku_lists/${c}/sku_list_items`,e,t)}async bundles(s,e,t){const c=s.id||s;return this.resources.fetch({type:"bundles"},`sku_lists/${c}/bundles`,e,t)}async attachments(s,e,t){const c=s.id||s;return this.resources.fetch({type:"attachments"},`sku_lists/${c}/attachments`,e,t)}async versions(s,e,t){const c=s.id||s;return this.resources.fetch({type:"versions"},`sku_lists/${c}/versions`,e,t)}isSkuList(s){return s.type&&s.type===r.TYPE}relationship(s){return s===null||typeof s=="string"?{id:s,type:r.TYPE}:{id:s.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="sku_lists";export default r;
|
@@ -1,70 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Market } from './markets';
|
4
|
-
import type { Attachment } from './attachments';
|
5
|
-
import type { Event } from './events';
|
6
|
-
import type { Tag } from './tags';
|
7
|
-
import type { Version } from './versions';
|
8
|
-
type SkuOptionRel = ResourceRel & {
|
9
|
-
type: typeof SkuOptions.TYPE;
|
10
|
-
};
|
11
|
-
type MarketRel = ResourceRel & {
|
12
|
-
type: 'markets';
|
13
|
-
};
|
14
|
-
type TagRel = ResourceRel & {
|
15
|
-
type: 'tags';
|
16
|
-
};
|
17
|
-
interface SkuOption extends Resource {
|
18
|
-
name?: string;
|
19
|
-
currency_code?: string;
|
20
|
-
description?: string;
|
21
|
-
price_amount_cents?: number;
|
22
|
-
price_amount_float?: number;
|
23
|
-
formatted_price_amount?: string;
|
24
|
-
delay_hours?: number;
|
25
|
-
delay_days?: number;
|
26
|
-
sku_code_regex?: string;
|
27
|
-
market?: Market;
|
28
|
-
attachments?: Attachment[];
|
29
|
-
events?: Event[];
|
30
|
-
tags?: Tag[];
|
31
|
-
versions?: Version[];
|
32
|
-
}
|
33
|
-
interface SkuOptionCreate extends ResourceCreate {
|
34
|
-
name: string;
|
35
|
-
currency_code?: string;
|
36
|
-
description?: string;
|
37
|
-
price_amount_cents?: number;
|
38
|
-
delay_hours?: number;
|
39
|
-
sku_code_regex?: string;
|
40
|
-
market?: MarketRel;
|
41
|
-
tags?: TagRel[];
|
42
|
-
}
|
43
|
-
interface SkuOptionUpdate extends ResourceUpdate {
|
44
|
-
name?: string;
|
45
|
-
currency_code?: string;
|
46
|
-
description?: string;
|
47
|
-
price_amount_cents?: number;
|
48
|
-
delay_hours?: number;
|
49
|
-
sku_code_regex?: string;
|
50
|
-
market?: MarketRel;
|
51
|
-
tags?: TagRel[];
|
52
|
-
}
|
53
|
-
declare class SkuOptions extends ApiResource {
|
54
|
-
static readonly TYPE: 'sku_options';
|
55
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuOption>>;
|
56
|
-
create(resource: SkuOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
57
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
58
|
-
update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
|
59
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
60
|
-
market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
|
61
|
-
attachments(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
62
|
-
events(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
63
|
-
tags(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
64
|
-
versions(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
65
|
-
isSkuOption(resource: any): resource is SkuOption;
|
66
|
-
relationship(id: string | ResourceId | null): SkuOptionRel;
|
67
|
-
type(): string;
|
68
|
-
}
|
69
|
-
export default SkuOptions;
|
70
|
-
export { SkuOption, SkuOptionCreate, SkuOptionUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag}from'./tags';import type{Version}from'./versions';type SkuOptionRel=ResourceRel&{type:typeof SkuOptions.TYPE;};type MarketRel=ResourceRel&{type:'markets';};type TagRel=ResourceRel&{type:'tags';};interface SkuOption extends Resource{name?:string;currency_code?:string;description?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;delay_hours?:number;delay_days?:number;sku_code_regex?:string;market?:Market;attachments?:Attachment[];events?:Event[];tags?:Tag[];versions?:Version[];}interface SkuOptionCreate extends ResourceCreate{name:string;currency_code?:string;description?:string;price_amount_cents?:number;delay_hours?:number;sku_code_regex?:string;market?:MarketRel;tags?:TagRel[];}interface SkuOptionUpdate extends ResourceUpdate{name?:string;currency_code?:string;description?:string;price_amount_cents?:number;delay_hours?:number;sku_code_regex?:string;market?:MarketRel;tags?:TagRel[];}declare class SkuOptions extends ApiResource{static readonly TYPE:'sku_options';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuOption>>;create(resource:SkuOptionCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;update(resource:SkuOptionUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuOption>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(skuOptionId:string|SkuOption,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;attachments(skuOptionId:string|SkuOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(skuOptionId:string|SkuOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(skuOptionId:string|SkuOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(skuOptionId:string|SkuOption,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSkuOption(resource:any):resource is SkuOption;relationship(id:string|ResourceId|null):SkuOptionRel;type():string;}export default SkuOptions;export{SkuOption,SkuOptionCreate,SkuOptionUpdate};
|
@@ -1,51 +1 @@
|
|
1
|
-
import
|
2
|
-
class SkuOptions extends ApiResource {
|
3
|
-
// static readonly PATH = 'sku_options'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: SkuOptions.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: SkuOptions.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: SkuOptions.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: SkuOptions.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: SkuOptions.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async market(skuOptionId, params, options) {
|
20
|
-
const _skuOptionId = skuOptionId.id || skuOptionId;
|
21
|
-
return this.resources.fetch({ type: 'markets' }, `sku_options/${_skuOptionId}/market`, params, options);
|
22
|
-
}
|
23
|
-
async attachments(skuOptionId, params, options) {
|
24
|
-
const _skuOptionId = skuOptionId.id || skuOptionId;
|
25
|
-
return this.resources.fetch({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options);
|
26
|
-
}
|
27
|
-
async events(skuOptionId, params, options) {
|
28
|
-
const _skuOptionId = skuOptionId.id || skuOptionId;
|
29
|
-
return this.resources.fetch({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options);
|
30
|
-
}
|
31
|
-
async tags(skuOptionId, params, options) {
|
32
|
-
const _skuOptionId = skuOptionId.id || skuOptionId;
|
33
|
-
return this.resources.fetch({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options);
|
34
|
-
}
|
35
|
-
async versions(skuOptionId, params, options) {
|
36
|
-
const _skuOptionId = skuOptionId.id || skuOptionId;
|
37
|
-
return this.resources.fetch({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options);
|
38
|
-
}
|
39
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
40
|
-
isSkuOption(resource) {
|
41
|
-
return resource.type && (resource.type === SkuOptions.TYPE);
|
42
|
-
}
|
43
|
-
relationship(id) {
|
44
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: SkuOptions.TYPE } : { id: id.id, type: SkuOptions.TYPE };
|
45
|
-
}
|
46
|
-
type() {
|
47
|
-
return SkuOptions.TYPE;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
SkuOptions.TYPE = 'sku_options';
|
51
|
-
export default SkuOptions;
|
1
|
+
import{ApiResource as c}from"../resource";class r extends c{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async market(e,t,s){const n=e.id||e;return this.resources.fetch({type:"markets"},`sku_options/${n}/market`,t,s)}async attachments(e,t,s){const n=e.id||e;return this.resources.fetch({type:"attachments"},`sku_options/${n}/attachments`,t,s)}async events(e,t,s){const n=e.id||e;return this.resources.fetch({type:"events"},`sku_options/${n}/events`,t,s)}async tags(e,t,s){const n=e.id||e;return this.resources.fetch({type:"tags"},`sku_options/${n}/tags`,t,s)}async versions(e,t,s){const n=e.id||e;return this.resources.fetch({type:"versions"},`sku_options/${n}/versions`,t,s)}isSkuOption(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="sku_options";export default r;
|
@@ -1,95 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { ShippingCategory } from './shipping_categories';
|
4
|
-
import type { Price } from './prices';
|
5
|
-
import type { StockItem } from './stock_items';
|
6
|
-
import type { StockReservation } from './stock_reservations';
|
7
|
-
import type { DeliveryLeadTime } from './delivery_lead_times';
|
8
|
-
import type { SkuOption } from './sku_options';
|
9
|
-
import type { Attachment } from './attachments';
|
10
|
-
import type { Event } from './events';
|
11
|
-
import type { Tag } from './tags';
|
12
|
-
import type { Version } from './versions';
|
13
|
-
type SkuRel = ResourceRel & {
|
14
|
-
type: typeof Skus.TYPE;
|
15
|
-
};
|
16
|
-
type ShippingCategoryRel = ResourceRel & {
|
17
|
-
type: 'shipping_categories';
|
18
|
-
};
|
19
|
-
type TagRel = ResourceRel & {
|
20
|
-
type: 'tags';
|
21
|
-
};
|
22
|
-
interface Sku extends Resource {
|
23
|
-
code?: string;
|
24
|
-
name?: string;
|
25
|
-
description?: string;
|
26
|
-
image_url?: string;
|
27
|
-
pieces_per_pack?: number;
|
28
|
-
weight?: number;
|
29
|
-
unit_of_weight?: string;
|
30
|
-
hs_tariff_number?: string;
|
31
|
-
do_not_ship?: boolean;
|
32
|
-
do_not_track?: boolean;
|
33
|
-
inventory?: object;
|
34
|
-
shipping_category?: ShippingCategory;
|
35
|
-
prices?: Price[];
|
36
|
-
stock_items?: StockItem[];
|
37
|
-
stock_reservations?: StockReservation[];
|
38
|
-
delivery_lead_times?: DeliveryLeadTime[];
|
39
|
-
sku_options?: SkuOption[];
|
40
|
-
attachments?: Attachment[];
|
41
|
-
events?: Event[];
|
42
|
-
tags?: Tag[];
|
43
|
-
versions?: Version[];
|
44
|
-
}
|
45
|
-
interface SkuCreate extends ResourceCreate {
|
46
|
-
code: string;
|
47
|
-
name: string;
|
48
|
-
description?: string;
|
49
|
-
image_url?: string;
|
50
|
-
pieces_per_pack?: number;
|
51
|
-
weight?: number;
|
52
|
-
unit_of_weight?: string;
|
53
|
-
hs_tariff_number?: string;
|
54
|
-
do_not_ship?: boolean;
|
55
|
-
do_not_track?: boolean;
|
56
|
-
shipping_category: ShippingCategoryRel;
|
57
|
-
tags?: TagRel[];
|
58
|
-
}
|
59
|
-
interface SkuUpdate extends ResourceUpdate {
|
60
|
-
code?: string;
|
61
|
-
name?: string;
|
62
|
-
description?: string;
|
63
|
-
image_url?: string;
|
64
|
-
pieces_per_pack?: number;
|
65
|
-
weight?: number;
|
66
|
-
unit_of_weight?: string;
|
67
|
-
hs_tariff_number?: string;
|
68
|
-
do_not_ship?: boolean;
|
69
|
-
do_not_track?: boolean;
|
70
|
-
shipping_category?: ShippingCategoryRel;
|
71
|
-
tags?: TagRel[];
|
72
|
-
}
|
73
|
-
declare class Skus extends ApiResource {
|
74
|
-
static readonly TYPE: 'skus';
|
75
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
|
76
|
-
create(resource: SkuCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
77
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
78
|
-
update(resource: SkuUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
79
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
80
|
-
shipping_category(skuId: string | Sku, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
|
81
|
-
prices(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
|
82
|
-
stock_items(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
|
83
|
-
stock_reservations(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
84
|
-
delivery_lead_times(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>>;
|
85
|
-
sku_options(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuOption>>;
|
86
|
-
attachments(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
87
|
-
events(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
88
|
-
tags(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
|
89
|
-
versions(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
90
|
-
isSku(resource: any): resource is Sku;
|
91
|
-
relationship(id: string | ResourceId | null): SkuRel;
|
92
|
-
type(): string;
|
93
|
-
}
|
94
|
-
export default Skus;
|
95
|
-
export { Sku, SkuCreate, SkuUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{ShippingCategory}from'./shipping_categories';import type{Price}from'./prices';import type{StockItem}from'./stock_items';import type{StockReservation}from'./stock_reservations';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{SkuOption}from'./sku_options';import type{Attachment}from'./attachments';import type{Event}from'./events';import type{Tag}from'./tags';import type{Version}from'./versions';type SkuRel=ResourceRel&{type:typeof Skus.TYPE;};type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};type TagRel=ResourceRel&{type:'tags';};interface Sku extends Resource{code?:string;name?:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;inventory?:object;shipping_category?:ShippingCategory;prices?:Price[];stock_items?:StockItem[];stock_reservations?:StockReservation[];delivery_lead_times?:DeliveryLeadTime[];sku_options?:SkuOption[];attachments?:Attachment[];events?:Event[];tags?:Tag[];versions?:Version[];}interface SkuCreate extends ResourceCreate{code:string;name:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;shipping_category:ShippingCategoryRel;tags?:TagRel[];}interface SkuUpdate extends ResourceUpdate{code?:string;name?:string;description?:string;image_url?:string;pieces_per_pack?:number;weight?:number;unit_of_weight?:string;hs_tariff_number?:string;do_not_ship?:boolean;do_not_track?:boolean;shipping_category?:ShippingCategoryRel;tags?:TagRel[];}declare class Skus extends ApiResource{static readonly TYPE:'skus';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;create(resource:SkuCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;update(resource:SkuUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipping_category(skuId:string|Sku,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;prices(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Price>>;stock_items(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;stock_reservations(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;delivery_lead_times(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<DeliveryLeadTime>>;sku_options(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuOption>>;attachments(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;events(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Event>>;tags(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Tag>>;versions(skuId:string|Sku,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isSku(resource:any):resource is Sku;relationship(id:string|ResourceId|null):SkuRel;type():string;}export default Skus;export{Sku,SkuCreate,SkuUpdate};
|
@@ -1,71 +1 @@
|
|
1
|
-
import
|
2
|
-
class Skus extends ApiResource {
|
3
|
-
// static readonly PATH = 'skus'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: Skus.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Skus.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: Skus.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Skus.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: Skus.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async shipping_category(skuId, params, options) {
|
20
|
-
const _skuId = skuId.id || skuId;
|
21
|
-
return this.resources.fetch({ type: 'shipping_categories' }, `skus/${_skuId}/shipping_category`, params, options);
|
22
|
-
}
|
23
|
-
async prices(skuId, params, options) {
|
24
|
-
const _skuId = skuId.id || skuId;
|
25
|
-
return this.resources.fetch({ type: 'prices' }, `skus/${_skuId}/prices`, params, options);
|
26
|
-
}
|
27
|
-
async stock_items(skuId, params, options) {
|
28
|
-
const _skuId = skuId.id || skuId;
|
29
|
-
return this.resources.fetch({ type: 'stock_items' }, `skus/${_skuId}/stock_items`, params, options);
|
30
|
-
}
|
31
|
-
async stock_reservations(skuId, params, options) {
|
32
|
-
const _skuId = skuId.id || skuId;
|
33
|
-
return this.resources.fetch({ type: 'stock_reservations' }, `skus/${_skuId}/stock_reservations`, params, options);
|
34
|
-
}
|
35
|
-
async delivery_lead_times(skuId, params, options) {
|
36
|
-
const _skuId = skuId.id || skuId;
|
37
|
-
return this.resources.fetch({ type: 'delivery_lead_times' }, `skus/${_skuId}/delivery_lead_times`, params, options);
|
38
|
-
}
|
39
|
-
async sku_options(skuId, params, options) {
|
40
|
-
const _skuId = skuId.id || skuId;
|
41
|
-
return this.resources.fetch({ type: 'sku_options' }, `skus/${_skuId}/sku_options`, params, options);
|
42
|
-
}
|
43
|
-
async attachments(skuId, params, options) {
|
44
|
-
const _skuId = skuId.id || skuId;
|
45
|
-
return this.resources.fetch({ type: 'attachments' }, `skus/${_skuId}/attachments`, params, options);
|
46
|
-
}
|
47
|
-
async events(skuId, params, options) {
|
48
|
-
const _skuId = skuId.id || skuId;
|
49
|
-
return this.resources.fetch({ type: 'events' }, `skus/${_skuId}/events`, params, options);
|
50
|
-
}
|
51
|
-
async tags(skuId, params, options) {
|
52
|
-
const _skuId = skuId.id || skuId;
|
53
|
-
return this.resources.fetch({ type: 'tags' }, `skus/${_skuId}/tags`, params, options);
|
54
|
-
}
|
55
|
-
async versions(skuId, params, options) {
|
56
|
-
const _skuId = skuId.id || skuId;
|
57
|
-
return this.resources.fetch({ type: 'versions' }, `skus/${_skuId}/versions`, params, options);
|
58
|
-
}
|
59
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
60
|
-
isSku(resource) {
|
61
|
-
return resource.type && (resource.type === Skus.TYPE);
|
62
|
-
}
|
63
|
-
relationship(id) {
|
64
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: Skus.TYPE } : { id: id.id, type: Skus.TYPE };
|
65
|
-
}
|
66
|
-
type() {
|
67
|
-
return Skus.TYPE;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
Skus.TYPE = 'skus';
|
71
|
-
export default Skus;
|
1
|
+
import{ApiResource as n}from"../resource";class c extends n{async list(s,e){return this.resources.list({type:c.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:c.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:c.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:c.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:c.TYPE,id:s},e)}async shipping_category(s,e,t){const r=s.id||s;return this.resources.fetch({type:"shipping_categories"},`skus/${r}/shipping_category`,e,t)}async prices(s,e,t){const r=s.id||s;return this.resources.fetch({type:"prices"},`skus/${r}/prices`,e,t)}async stock_items(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_items"},`skus/${r}/stock_items`,e,t)}async stock_reservations(s,e,t){const r=s.id||s;return this.resources.fetch({type:"stock_reservations"},`skus/${r}/stock_reservations`,e,t)}async delivery_lead_times(s,e,t){const r=s.id||s;return this.resources.fetch({type:"delivery_lead_times"},`skus/${r}/delivery_lead_times`,e,t)}async sku_options(s,e,t){const r=s.id||s;return this.resources.fetch({type:"sku_options"},`skus/${r}/sku_options`,e,t)}async attachments(s,e,t){const r=s.id||s;return this.resources.fetch({type:"attachments"},`skus/${r}/attachments`,e,t)}async events(s,e,t){const r=s.id||s;return this.resources.fetch({type:"events"},`skus/${r}/events`,e,t)}async tags(s,e,t){const r=s.id||s;return this.resources.fetch({type:"tags"},`skus/${r}/tags`,e,t)}async versions(s,e,t){const r=s.id||s;return this.resources.fetch({type:"versions"},`skus/${r}/versions`,e,t)}isSku(s){return s.type&&s.type===c.TYPE}relationship(s){return s===null||typeof s=="string"?{id:s,type:c.TYPE}:{id:s.id,type:c.TYPE}}type(){return c.TYPE}}c.TYPE="skus";export default c;
|
@@ -1,58 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { StockLocation } from './stock_locations';
|
4
|
-
import type { Sku } from './skus';
|
5
|
-
import type { ReservedStock } from './reserved_stocks';
|
6
|
-
import type { StockReservation } from './stock_reservations';
|
7
|
-
import type { Attachment } from './attachments';
|
8
|
-
import type { Version } from './versions';
|
9
|
-
type StockItemRel = ResourceRel & {
|
10
|
-
type: typeof StockItems.TYPE;
|
11
|
-
};
|
12
|
-
type StockLocationRel = ResourceRel & {
|
13
|
-
type: 'stock_locations';
|
14
|
-
};
|
15
|
-
type SkuRel = ResourceRel & {
|
16
|
-
type: 'skus';
|
17
|
-
};
|
18
|
-
interface StockItem extends Resource {
|
19
|
-
sku_code?: string;
|
20
|
-
quantity?: number;
|
21
|
-
stock_location?: StockLocation;
|
22
|
-
sku?: Sku;
|
23
|
-
reserved_stock?: ReservedStock;
|
24
|
-
stock_reservations?: StockReservation[];
|
25
|
-
attachments?: Attachment[];
|
26
|
-
versions?: Version[];
|
27
|
-
}
|
28
|
-
interface StockItemCreate extends ResourceCreate {
|
29
|
-
sku_code?: string;
|
30
|
-
quantity: number;
|
31
|
-
stock_location: StockLocationRel;
|
32
|
-
sku?: SkuRel;
|
33
|
-
}
|
34
|
-
interface StockItemUpdate extends ResourceUpdate {
|
35
|
-
sku_code?: string;
|
36
|
-
quantity?: number;
|
37
|
-
stock_location?: StockLocationRel;
|
38
|
-
sku?: SkuRel;
|
39
|
-
}
|
40
|
-
declare class StockItems extends ApiResource {
|
41
|
-
static readonly TYPE: 'stock_items';
|
42
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
|
43
|
-
create(resource: StockItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
44
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
45
|
-
update(resource: StockItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
46
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
47
|
-
stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
|
48
|
-
sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
49
|
-
reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
|
50
|
-
stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
|
51
|
-
attachments(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
52
|
-
versions(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
53
|
-
isStockItem(resource: any): resource is StockItem;
|
54
|
-
relationship(id: string | ResourceId | null): StockItemRel;
|
55
|
-
type(): string;
|
56
|
-
}
|
57
|
-
export default StockItems;
|
58
|
-
export { StockItem, StockItemCreate, StockItemUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{StockLocation}from'./stock_locations';import type{Sku}from'./skus';import type{ReservedStock}from'./reserved_stocks';import type{StockReservation}from'./stock_reservations';import type{Attachment}from'./attachments';import type{Version}from'./versions';type StockItemRel=ResourceRel&{type:typeof StockItems.TYPE;};type StockLocationRel=ResourceRel&{type:'stock_locations';};type SkuRel=ResourceRel&{type:'skus';};interface StockItem extends Resource{sku_code?:string;quantity?:number;stock_location?:StockLocation;sku?:Sku;reserved_stock?:ReservedStock;stock_reservations?:StockReservation[];attachments?:Attachment[];versions?:Version[];}interface StockItemCreate extends ResourceCreate{sku_code?:string;quantity:number;stock_location:StockLocationRel;sku?:SkuRel;}interface StockItemUpdate extends ResourceUpdate{sku_code?:string;quantity?:number;_validate?:boolean;stock_location?:StockLocationRel;sku?:SkuRel;}declare class StockItems extends ApiResource{static readonly TYPE:'stock_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;create(resource:StockItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;update(resource:StockItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(stockItemId:string|StockItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;sku(stockItemId:string|StockItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;reserved_stock(stockItemId:string|StockItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReservedStock>;stock_reservations(stockItemId:string|StockItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockReservation>>;attachments(stockItemId:string|StockItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;versions(stockItemId:string|StockItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isStockItem(resource:any):resource is StockItem;relationship(id:string|ResourceId|null):StockItemRel;type():string;}export default StockItems;export{StockItem,StockItemCreate,StockItemUpdate};
|
@@ -1,55 +1 @@
|
|
1
|
-
import
|
2
|
-
class StockItems extends ApiResource {
|
3
|
-
// static readonly PATH = 'stock_items'
|
4
|
-
async list(params, options) {
|
5
|
-
return this.resources.list({ type: StockItems.TYPE }, params, options);
|
6
|
-
}
|
7
|
-
async create(resource, params, options) {
|
8
|
-
return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockItems.TYPE }), params, options);
|
9
|
-
}
|
10
|
-
async retrieve(id, params, options) {
|
11
|
-
return this.resources.retrieve({ type: StockItems.TYPE, id }, params, options);
|
12
|
-
}
|
13
|
-
async update(resource, params, options) {
|
14
|
-
return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockItems.TYPE }), params, options);
|
15
|
-
}
|
16
|
-
async delete(id, options) {
|
17
|
-
await this.resources.delete({ type: StockItems.TYPE, id }, options);
|
18
|
-
}
|
19
|
-
async stock_location(stockItemId, params, options) {
|
20
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
21
|
-
return this.resources.fetch({ type: 'stock_locations' }, `stock_items/${_stockItemId}/stock_location`, params, options);
|
22
|
-
}
|
23
|
-
async sku(stockItemId, params, options) {
|
24
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
25
|
-
return this.resources.fetch({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options);
|
26
|
-
}
|
27
|
-
async reserved_stock(stockItemId, params, options) {
|
28
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
29
|
-
return this.resources.fetch({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options);
|
30
|
-
}
|
31
|
-
async stock_reservations(stockItemId, params, options) {
|
32
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
33
|
-
return this.resources.fetch({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options);
|
34
|
-
}
|
35
|
-
async attachments(stockItemId, params, options) {
|
36
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
37
|
-
return this.resources.fetch({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options);
|
38
|
-
}
|
39
|
-
async versions(stockItemId, params, options) {
|
40
|
-
const _stockItemId = stockItemId.id || stockItemId;
|
41
|
-
return this.resources.fetch({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options);
|
42
|
-
}
|
43
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
44
|
-
isStockItem(resource) {
|
45
|
-
return resource.type && (resource.type === StockItems.TYPE);
|
46
|
-
}
|
47
|
-
relationship(id) {
|
48
|
-
return ((id === null) || (typeof id === 'string')) ? { id, type: StockItems.TYPE } : { id: id.id, type: StockItems.TYPE };
|
49
|
-
}
|
50
|
-
type() {
|
51
|
-
return StockItems.TYPE;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
StockItems.TYPE = 'stock_items';
|
55
|
-
export default StockItems;
|
1
|
+
import{ApiResource as n}from"../resource";class r extends n{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}async stock_location(e,s,t){const c=e.id||e;return this.resources.fetch({type:"stock_locations"},`stock_items/${c}/stock_location`,s,t)}async sku(e,s,t){const c=e.id||e;return this.resources.fetch({type:"skus"},`stock_items/${c}/sku`,s,t)}async reserved_stock(e,s,t){const c=e.id||e;return this.resources.fetch({type:"reserved_stocks"},`stock_items/${c}/reserved_stock`,s,t)}async stock_reservations(e,s,t){const c=e.id||e;return this.resources.fetch({type:"stock_reservations"},`stock_items/${c}/stock_reservations`,s,t)}async attachments(e,s,t){const c=e.id||e;return this.resources.fetch({type:"attachments"},`stock_items/${c}/attachments`,s,t)}async versions(e,s,t){const c=e.id||e;return this.resources.fetch({type:"versions"},`stock_items/${c}/versions`,s,t)}isStockItem(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_items";export default r;
|
@@ -1,69 +1 @@
|
|
1
|
-
import
|
2
|
-
import type { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
-
import type { Shipment } from './shipments';
|
4
|
-
import type { LineItem } from './line_items';
|
5
|
-
import type { StockItem } from './stock_items';
|
6
|
-
import type { Sku } from './skus';
|
7
|
-
import type { Version } from './versions';
|
8
|
-
type StockLineItemRel = ResourceRel & {
|
9
|
-
type: typeof StockLineItems.TYPE;
|
10
|
-
};
|
11
|
-
type ShipmentRel = ResourceRel & {
|
12
|
-
type: 'shipments';
|
13
|
-
};
|
14
|
-
type LineItemRel = ResourceRel & {
|
15
|
-
type: 'line_items';
|
16
|
-
};
|
17
|
-
type StockItemRel = ResourceRel & {
|
18
|
-
type: 'stock_items';
|
19
|
-
};
|
20
|
-
type SkuRel = ResourceRel & {
|
21
|
-
type: 'skus';
|
22
|
-
};
|
23
|
-
interface StockLineItem extends Resource {
|
24
|
-
sku_code?: string;
|
25
|
-
bundle_code?: string;
|
26
|
-
quantity?: number;
|
27
|
-
shipment?: Shipment;
|
28
|
-
line_item?: LineItem;
|
29
|
-
stock_item?: StockItem;
|
30
|
-
sku?: Sku;
|
31
|
-
versions?: Version[];
|
32
|
-
}
|
33
|
-
interface StockLineItemCreate extends ResourceCreate {
|
34
|
-
sku_code?: string;
|
35
|
-
quantity: number;
|
36
|
-
shipment?: ShipmentRel;
|
37
|
-
line_item?: LineItemRel;
|
38
|
-
stock_item?: StockItemRel;
|
39
|
-
sku?: SkuRel;
|
40
|
-
}
|
41
|
-
interface StockLineItemUpdate extends ResourceUpdate {
|
42
|
-
sku_code?: string;
|
43
|
-
quantity?: number;
|
44
|
-
_reserve_stock?: boolean;
|
45
|
-
_release_stock?: boolean;
|
46
|
-
_decrement_stock?: boolean;
|
47
|
-
shipment?: ShipmentRel;
|
48
|
-
line_item?: LineItemRel;
|
49
|
-
stock_item?: StockItemRel;
|
50
|
-
sku?: SkuRel;
|
51
|
-
}
|
52
|
-
declare class StockLineItems extends ApiResource {
|
53
|
-
static readonly TYPE: 'stock_line_items';
|
54
|
-
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
|
55
|
-
create(resource: StockLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
56
|
-
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
57
|
-
update(resource: StockLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
|
58
|
-
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
59
|
-
shipment(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
|
60
|
-
line_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
61
|
-
stock_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
|
62
|
-
sku(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
|
63
|
-
versions(stockLineItemId: string | StockLineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
64
|
-
isStockLineItem(resource: any): resource is StockLineItem;
|
65
|
-
relationship(id: string | ResourceId | null): StockLineItemRel;
|
66
|
-
type(): string;
|
67
|
-
}
|
68
|
-
export default StockLineItems;
|
69
|
-
export { StockLineItem, StockLineItemCreate, StockLineItemUpdate };
|
1
|
+
import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Shipment}from'./shipments';import type{LineItem}from'./line_items';import type{StockItem}from'./stock_items';import type{Sku}from'./skus';import type{Version}from'./versions';type StockLineItemRel=ResourceRel&{type:typeof StockLineItems.TYPE;};type ShipmentRel=ResourceRel&{type:'shipments';};type LineItemRel=ResourceRel&{type:'line_items';};type StockItemRel=ResourceRel&{type:'stock_items';};type SkuRel=ResourceRel&{type:'skus';};interface StockLineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;shipment?:Shipment;line_item?:LineItem;stock_item?:StockItem;sku?:Sku;versions?:Version[];}interface StockLineItemCreate extends ResourceCreate{sku_code?:string;quantity:number;shipment?:ShipmentRel;line_item?:LineItemRel;stock_item?:StockItemRel;sku?:SkuRel;}interface StockLineItemUpdate extends ResourceUpdate{sku_code?:string;quantity?:number;_reserve_stock?:boolean;_release_stock?:boolean;_decrement_stock?:boolean;shipment?:ShipmentRel;line_item?:LineItemRel;stock_item?:StockItemRel;sku?:SkuRel;}declare class StockLineItems extends ApiResource{static readonly TYPE:'stock_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;create(resource:StockLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;update(resource:StockLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;shipment(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;stock_item(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;sku(stockLineItemId:string|StockLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;versions(stockLineItemId:string|StockLineItem,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Version>>;isStockLineItem(resource:any):resource is StockLineItem;relationship(id:string|ResourceId|null):StockLineItemRel;type():string;}export default StockLineItems;export{StockLineItem,StockLineItemCreate,StockLineItemUpdate};
|