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