@commercelayer/sdk 2.3.3-beta.1 → 2.3.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{api.d.ts → cjs/api.d.ts} +101 -101
- package/lib/cjs/api.js +406 -0
- package/lib/{client.d.ts → cjs/client.d.ts} +30 -30
- package/lib/cjs/client.js +101 -0
- package/lib/{commercelayer.d.ts → cjs/commercelayer.d.ts} +118 -118
- package/lib/cjs/commercelayer.js +201 -0
- package/lib/{common.d.ts → cjs/common.d.ts} +4 -4
- package/lib/cjs/common.js +13 -0
- package/lib/{config.d.ts → cjs/config.d.ts} +7 -7
- package/lib/cjs/config.js +9 -0
- package/lib/{error.d.ts → cjs/error.d.ts} +26 -26
- package/lib/cjs/error.js +40 -0
- package/lib/{index.d.ts → cjs/index.d.ts} +6 -6
- package/lib/cjs/index.js +24 -0
- package/lib/{interceptor.d.ts → cjs/interceptor.d.ts} +19 -19
- package/lib/cjs/interceptor.js +2 -0
- package/lib/{jsonapi.d.ts → cjs/jsonapi.d.ts} +7 -7
- package/lib/cjs/jsonapi.js +63 -0
- package/lib/{model.d.ts → cjs/model.d.ts} +99 -99
- package/lib/cjs/model.js +3 -0
- package/lib/{query.d.ts → cjs/query.d.ts} +57 -57
- package/lib/cjs/query.js +172 -0
- package/lib/{resource.d.ts → cjs/resource.d.ts} +69 -69
- package/lib/cjs/resource.js +114 -0
- package/lib/{resources → cjs/resources}/addresses.d.ts +91 -91
- package/lib/cjs/resources/addresses.js +47 -0
- package/lib/{resources → cjs/resources}/adjustments.d.ts +39 -39
- package/lib/cjs/resources/adjustments.js +47 -0
- package/lib/{resources → cjs/resources}/adyen_gateways.d.ts +49 -49
- package/lib/cjs/resources/adyen_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/adyen_payments.d.ts +47 -47
- package/lib/cjs/resources/adyen_payments.js +47 -0
- package/lib/{resources → cjs/resources}/application.d.ts +25 -25
- package/lib/cjs/resources/application.js +35 -0
- package/lib/{resources → cjs/resources}/attachments.d.ts +160 -160
- package/lib/cjs/resources/attachments.js +47 -0
- package/lib/{resources → cjs/resources}/authorizations.d.ts +58 -58
- package/lib/cjs/resources/authorizations.js +41 -0
- package/lib/{resources → cjs/resources}/avalara_accounts.d.ts +53 -53
- package/lib/cjs/resources/avalara_accounts.js +47 -0
- package/lib/{resources → cjs/resources}/billing_info_validation_rules.d.ts +35 -35
- package/lib/cjs/resources/billing_info_validation_rules.js +47 -0
- package/lib/{resources → cjs/resources}/bing_geocoders.d.ts +37 -37
- package/lib/cjs/resources/bing_geocoders.js +47 -0
- package/lib/{resources → cjs/resources}/braintree_gateways.d.ts +58 -58
- package/lib/cjs/resources/braintree_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/braintree_payments.d.ts +49 -49
- package/lib/cjs/resources/braintree_payments.js +47 -0
- package/lib/{resources → cjs/resources}/bundles.d.ts +69 -69
- package/lib/cjs/resources/bundles.js +47 -0
- package/lib/{resources → cjs/resources}/captures.d.ts +49 -49
- package/lib/cjs/resources/captures.js +41 -0
- package/lib/{resources → cjs/resources}/carrier_accounts.d.ts +28 -28
- package/lib/cjs/resources/carrier_accounts.js +38 -0
- package/lib/{resources → cjs/resources}/checkout_com_gateways.d.ts +47 -47
- package/lib/cjs/resources/checkout_com_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/checkout_com_payments.d.ts +53 -53
- package/lib/cjs/resources/checkout_com_payments.js +47 -0
- package/lib/{resources → cjs/resources}/coupon_codes_promotion_rules.d.ts +62 -62
- package/lib/cjs/resources/coupon_codes_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/coupon_recipients.d.ts +46 -46
- package/lib/cjs/resources/coupon_recipients.js +47 -0
- package/lib/{resources → cjs/resources}/coupons.d.ts +45 -45
- package/lib/cjs/resources/coupons.js +47 -0
- package/lib/{resources → cjs/resources}/customer_addresses.d.ts +43 -43
- package/lib/cjs/resources/customer_addresses.js +47 -0
- package/lib/{resources → cjs/resources}/customer_groups.d.ts +37 -37
- package/lib/cjs/resources/customer_groups.js +47 -0
- package/lib/{resources → cjs/resources}/customer_password_resets.d.ts +36 -36
- package/lib/cjs/resources/customer_password_resets.js +47 -0
- package/lib/{resources → cjs/resources}/customer_payment_sources.d.ts +69 -69
- package/lib/cjs/resources/customer_payment_sources.js +47 -0
- package/lib/{resources → cjs/resources}/customer_subscriptions.d.ts +31 -31
- package/lib/cjs/resources/customer_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/customers.d.ts +56 -56
- package/lib/cjs/resources/customers.js +47 -0
- package/lib/{resources → cjs/resources}/delivery_lead_times.d.ts +52 -52
- package/lib/cjs/resources/delivery_lead_times.js +47 -0
- package/lib/{resources → cjs/resources}/event_callbacks.d.ts +27 -27
- package/lib/cjs/resources/event_callbacks.js +38 -0
- package/lib/{resources → cjs/resources}/external_gateways.d.ts +48 -48
- package/lib/cjs/resources/external_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/external_payments.d.ts +42 -42
- package/lib/cjs/resources/external_payments.js +47 -0
- package/lib/{resources → cjs/resources}/external_promotions.d.ts +82 -82
- package/lib/cjs/resources/external_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/external_tax_calculators.d.ts +45 -45
- package/lib/cjs/resources/external_tax_calculators.js +47 -0
- package/lib/{resources → cjs/resources}/fixed_amount_promotions.d.ts +84 -84
- package/lib/cjs/resources/fixed_amount_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/fixed_price_promotions.d.ts +93 -93
- package/lib/cjs/resources/fixed_price_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/free_gift_promotions.d.ts +91 -91
- package/lib/cjs/resources/free_gift_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/free_shipping_promotions.d.ts +79 -79
- package/lib/cjs/resources/free_shipping_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/geocoders.d.ts +25 -25
- package/lib/cjs/resources/geocoders.js +35 -0
- package/lib/{resources → cjs/resources}/gift_card_recipients.d.ts +46 -46
- package/lib/cjs/resources/gift_card_recipients.js +47 -0
- package/lib/{resources → cjs/resources}/gift_cards.d.ts +84 -84
- package/lib/cjs/resources/gift_cards.js +47 -0
- package/lib/{resources → cjs/resources}/google_geocoders.d.ts +37 -37
- package/lib/cjs/resources/google_geocoders.js +47 -0
- package/lib/{resources → cjs/resources}/imports.d.ts +44 -44
- package/lib/cjs/resources/imports.js +44 -0
- package/lib/{resources → cjs/resources}/in_stock_subscriptions.d.ts +60 -60
- package/lib/cjs/resources/in_stock_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_models.d.ts +43 -43
- package/lib/cjs/resources/inventory_models.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_return_locations.d.ts +45 -45
- package/lib/cjs/resources/inventory_return_locations.js +47 -0
- package/lib/{resources → cjs/resources}/inventory_stock_locations.d.ts +48 -48
- package/lib/cjs/resources/inventory_stock_locations.js +47 -0
- package/lib/{resources → cjs/resources}/line_item_options.d.ts +59 -59
- package/lib/cjs/resources/line_item_options.js +47 -0
- package/lib/{resources → cjs/resources}/line_items.d.ts +125 -125
- package/lib/cjs/resources/line_items.js +47 -0
- package/lib/{resources → cjs/resources}/manual_gateways.d.ts +36 -36
- package/lib/cjs/resources/manual_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/manual_tax_calculators.d.ts +49 -49
- package/lib/cjs/resources/manual_tax_calculators.js +47 -0
- package/lib/{resources → cjs/resources}/markets.d.ts +79 -79
- package/lib/cjs/resources/markets.js +47 -0
- package/lib/{resources → cjs/resources}/merchants.d.ts +40 -40
- package/lib/cjs/resources/merchants.js +47 -0
- package/lib/{resources → cjs/resources}/order_amount_promotion_rules.d.ts +60 -60
- package/lib/cjs/resources/order_amount_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/order_copies.d.ts +46 -46
- package/lib/cjs/resources/order_copies.js +44 -0
- package/lib/{resources → cjs/resources}/order_subscriptions.d.ts +66 -66
- package/lib/cjs/resources/order_subscriptions.js +47 -0
- package/lib/{resources → cjs/resources}/order_validation_rules.d.ts +22 -22
- package/lib/cjs/resources/order_validation_rules.js +35 -0
- package/lib/{resources → cjs/resources}/orders.d.ts +255 -255
- package/lib/cjs/resources/orders.js +47 -0
- package/lib/{resources → cjs/resources}/organization.d.ts +34 -34
- package/lib/cjs/resources/organization.js +35 -0
- package/lib/{resources → cjs/resources}/packages.d.ts +57 -57
- package/lib/cjs/resources/packages.js +47 -0
- package/lib/{resources → cjs/resources}/parcel_line_items.d.ts +51 -51
- package/lib/cjs/resources/parcel_line_items.js +47 -0
- package/lib/{resources → cjs/resources}/parcels.d.ts +108 -108
- package/lib/cjs/resources/parcels.js +47 -0
- package/lib/{resources → cjs/resources}/payment_gateways.d.ts +33 -33
- package/lib/cjs/resources/payment_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/payment_methods.d.ts +54 -54
- package/lib/cjs/resources/payment_methods.js +47 -0
- package/lib/{resources → cjs/resources}/paypal_gateways.d.ts +41 -41
- package/lib/cjs/resources/paypal_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/paypal_payments.d.ts +49 -49
- package/lib/cjs/resources/paypal_payments.js +47 -0
- package/lib/{resources → cjs/resources}/percentage_discount_promotions.d.ts +91 -91
- package/lib/cjs/resources/percentage_discount_promotions.js +47 -0
- package/lib/{resources → cjs/resources}/price_lists.d.ts +41 -41
- package/lib/cjs/resources/price_lists.js +47 -0
- package/lib/{resources → cjs/resources}/prices.d.ts +58 -58
- package/lib/cjs/resources/prices.js +47 -0
- package/lib/{resources → cjs/resources}/promotion_rules.d.ts +27 -27
- package/lib/cjs/resources/promotion_rules.js +35 -0
- package/lib/{resources → cjs/resources}/promotions.d.ts +38 -38
- package/lib/cjs/resources/promotions.js +35 -0
- package/lib/{resources → cjs/resources}/refunds.d.ts +36 -36
- package/lib/cjs/resources/refunds.js +38 -0
- package/lib/{resources → cjs/resources}/return_line_items.d.ts +51 -51
- package/lib/cjs/resources/return_line_items.js +47 -0
- package/lib/{resources → cjs/resources}/returns.d.ts +69 -69
- package/lib/cjs/resources/returns.js +47 -0
- package/lib/{resources → cjs/resources}/shipments.d.ts +80 -80
- package/lib/cjs/resources/shipments.js +41 -0
- package/lib/{resources → cjs/resources}/shipping_categories.d.ts +35 -35
- package/lib/cjs/resources/shipping_categories.js +47 -0
- package/lib/{resources → cjs/resources}/shipping_methods.d.ts +71 -71
- package/lib/cjs/resources/shipping_methods.js +47 -0
- package/lib/{resources → cjs/resources}/shipping_zones.d.ts +51 -51
- package/lib/cjs/resources/shipping_zones.js +47 -0
- package/lib/{resources → cjs/resources}/sku_list_items.d.ts +46 -46
- package/lib/cjs/resources/sku_list_items.js +47 -0
- package/lib/{resources → cjs/resources}/sku_list_promotion_rules.d.ts +70 -70
- package/lib/cjs/resources/sku_list_promotion_rules.js +47 -0
- package/lib/{resources → cjs/resources}/sku_lists.d.ts +50 -50
- package/lib/cjs/resources/sku_lists.js +47 -0
- package/lib/{resources → cjs/resources}/sku_options.d.ts +55 -55
- package/lib/cjs/resources/sku_options.js +47 -0
- package/lib/{resources → cjs/resources}/skus.d.ts +76 -76
- package/lib/cjs/resources/skus.js +47 -0
- package/lib/{resources → cjs/resources}/stock_items.d.ts +50 -50
- package/lib/cjs/resources/stock_items.js +47 -0
- package/lib/{resources → cjs/resources}/stock_line_items.d.ts +30 -30
- package/lib/cjs/resources/stock_line_items.js +38 -0
- package/lib/{resources → cjs/resources}/stock_locations.d.ts +55 -55
- package/lib/cjs/resources/stock_locations.js +47 -0
- package/lib/{resources → cjs/resources}/stock_transfers.d.ts +70 -70
- package/lib/cjs/resources/stock_transfers.js +47 -0
- package/lib/{resources → cjs/resources}/stripe_gateways.d.ts +40 -40
- package/lib/cjs/resources/stripe_gateways.js +47 -0
- package/lib/{resources → cjs/resources}/stripe_payments.d.ts +44 -44
- package/lib/cjs/resources/stripe_payments.js +47 -0
- package/lib/{resources → cjs/resources}/tax_calculators.d.ts +27 -27
- package/lib/cjs/resources/tax_calculators.js +35 -0
- package/lib/{resources → cjs/resources}/tax_categories.d.ts +61 -61
- package/lib/cjs/resources/tax_categories.js +47 -0
- package/lib/{resources → cjs/resources}/tax_rules.d.ts +72 -72
- package/lib/cjs/resources/tax_rules.js +47 -0
- package/lib/{resources → cjs/resources}/taxjar_accounts.d.ts +44 -44
- package/lib/cjs/resources/taxjar_accounts.js +47 -0
- package/lib/{resources → cjs/resources}/transactions.d.ts +33 -33
- package/lib/cjs/resources/transactions.js +35 -0
- package/lib/{resources → cjs/resources}/voids.d.ts +36 -36
- package/lib/cjs/resources/voids.js +38 -0
- package/lib/{resources → cjs/resources}/webhooks.d.ts +45 -45
- package/lib/cjs/resources/webhooks.js +47 -0
- package/lib/{resources → cjs/resources}/wire_transfers.d.ts +35 -35
- package/lib/cjs/resources/wire_transfers.js +47 -0
- package/lib/{static.d.ts → cjs/static.d.ts} +6 -6
- package/lib/cjs/static.js +36 -0
- package/lib/{util.d.ts → cjs/util.d.ts} +3 -3
- package/lib/cjs/util.js +7 -0
- package/lib/esm/api.d.ts +101 -0
- package/lib/esm/api.js +304 -0
- package/lib/esm/client.d.ts +30 -0
- package/lib/esm/client.js +96 -0
- package/lib/esm/commercelayer.d.ts +118 -0
- package/lib/esm/commercelayer.js +177 -0
- package/lib/esm/common.d.ts +4 -0
- package/lib/esm/common.js +9 -0
- package/lib/esm/config.d.ts +7 -0
- package/lib/esm/config.js +7 -0
- package/lib/esm/error.d.ts +26 -0
- package/lib/esm/error.js +35 -0
- package/lib/esm/index.d.ts +6 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/interceptor.d.ts +19 -0
- package/lib/esm/interceptor.js +1 -0
- package/lib/esm/jsonapi.d.ts +7 -0
- package/lib/esm/jsonapi.js +59 -0
- package/lib/esm/model.d.ts +99 -0
- package/lib/esm/model.js +2 -0
- package/lib/esm/query.d.ts +57 -0
- package/lib/esm/query.js +168 -0
- package/lib/esm/resource.d.ts +69 -0
- package/lib/esm/resource.js +108 -0
- package/lib/esm/resources/addresses.d.ts +91 -0
- package/lib/esm/resources/addresses.js +45 -0
- package/lib/esm/resources/adjustments.d.ts +39 -0
- package/lib/esm/resources/adjustments.js +45 -0
- package/lib/esm/resources/adyen_gateways.d.ts +49 -0
- package/lib/esm/resources/adyen_gateways.js +45 -0
- package/lib/esm/resources/adyen_payments.d.ts +47 -0
- package/lib/esm/resources/adyen_payments.js +45 -0
- package/lib/esm/resources/application.d.ts +25 -0
- package/lib/esm/resources/application.js +33 -0
- package/lib/esm/resources/attachments.d.ts +160 -0
- package/lib/esm/resources/attachments.js +45 -0
- package/lib/esm/resources/authorizations.d.ts +58 -0
- package/lib/esm/resources/authorizations.js +39 -0
- package/lib/esm/resources/avalara_accounts.d.ts +53 -0
- package/lib/esm/resources/avalara_accounts.js +45 -0
- package/lib/esm/resources/billing_info_validation_rules.d.ts +35 -0
- package/lib/esm/resources/billing_info_validation_rules.js +45 -0
- package/lib/esm/resources/bing_geocoders.d.ts +37 -0
- package/lib/esm/resources/bing_geocoders.js +45 -0
- package/lib/esm/resources/braintree_gateways.d.ts +58 -0
- package/lib/esm/resources/braintree_gateways.js +45 -0
- package/lib/esm/resources/braintree_payments.d.ts +49 -0
- package/lib/esm/resources/braintree_payments.js +45 -0
- package/lib/esm/resources/bundles.d.ts +69 -0
- package/lib/esm/resources/bundles.js +45 -0
- package/lib/esm/resources/captures.d.ts +49 -0
- package/lib/esm/resources/captures.js +39 -0
- package/lib/esm/resources/carrier_accounts.d.ts +28 -0
- package/lib/esm/resources/carrier_accounts.js +36 -0
- package/lib/esm/resources/checkout_com_gateways.d.ts +47 -0
- package/lib/esm/resources/checkout_com_gateways.js +45 -0
- package/lib/esm/resources/checkout_com_payments.d.ts +53 -0
- package/lib/esm/resources/checkout_com_payments.js +45 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +62 -0
- package/lib/esm/resources/coupon_codes_promotion_rules.js +45 -0
- package/lib/esm/resources/coupon_recipients.d.ts +46 -0
- package/lib/esm/resources/coupon_recipients.js +45 -0
- package/lib/esm/resources/coupons.d.ts +45 -0
- package/lib/esm/resources/coupons.js +45 -0
- package/lib/esm/resources/customer_addresses.d.ts +43 -0
- package/lib/esm/resources/customer_addresses.js +45 -0
- package/lib/esm/resources/customer_groups.d.ts +37 -0
- package/lib/esm/resources/customer_groups.js +45 -0
- package/lib/esm/resources/customer_password_resets.d.ts +36 -0
- package/lib/esm/resources/customer_password_resets.js +45 -0
- package/lib/esm/resources/customer_payment_sources.d.ts +69 -0
- package/lib/esm/resources/customer_payment_sources.js +45 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +31 -0
- package/lib/esm/resources/customer_subscriptions.js +45 -0
- package/lib/esm/resources/customers.d.ts +56 -0
- package/lib/esm/resources/customers.js +45 -0
- package/lib/esm/resources/delivery_lead_times.d.ts +52 -0
- package/lib/esm/resources/delivery_lead_times.js +45 -0
- package/lib/esm/resources/event_callbacks.d.ts +27 -0
- package/lib/esm/resources/event_callbacks.js +36 -0
- package/lib/esm/resources/external_gateways.d.ts +48 -0
- package/lib/esm/resources/external_gateways.js +45 -0
- package/lib/esm/resources/external_payments.d.ts +42 -0
- package/lib/esm/resources/external_payments.js +45 -0
- package/lib/esm/resources/external_promotions.d.ts +82 -0
- package/lib/esm/resources/external_promotions.js +45 -0
- package/lib/esm/resources/external_tax_calculators.d.ts +45 -0
- package/lib/esm/resources/external_tax_calculators.js +45 -0
- package/lib/esm/resources/fixed_amount_promotions.d.ts +84 -0
- package/lib/esm/resources/fixed_amount_promotions.js +45 -0
- package/lib/esm/resources/fixed_price_promotions.d.ts +93 -0
- package/lib/esm/resources/fixed_price_promotions.js +45 -0
- package/lib/esm/resources/free_gift_promotions.d.ts +91 -0
- package/lib/esm/resources/free_gift_promotions.js +45 -0
- package/lib/esm/resources/free_shipping_promotions.d.ts +79 -0
- package/lib/esm/resources/free_shipping_promotions.js +45 -0
- package/lib/esm/resources/geocoders.d.ts +25 -0
- package/lib/esm/resources/geocoders.js +33 -0
- package/lib/esm/resources/gift_card_recipients.d.ts +46 -0
- package/lib/esm/resources/gift_card_recipients.js +45 -0
- package/lib/esm/resources/gift_cards.d.ts +84 -0
- package/lib/esm/resources/gift_cards.js +45 -0
- package/lib/esm/resources/google_geocoders.d.ts +37 -0
- package/lib/esm/resources/google_geocoders.js +45 -0
- package/lib/esm/resources/imports.d.ts +44 -0
- package/lib/esm/resources/imports.js +42 -0
- package/lib/esm/resources/in_stock_subscriptions.d.ts +60 -0
- package/lib/esm/resources/in_stock_subscriptions.js +45 -0
- package/lib/esm/resources/inventory_models.d.ts +43 -0
- package/lib/esm/resources/inventory_models.js +45 -0
- package/lib/esm/resources/inventory_return_locations.d.ts +45 -0
- package/lib/esm/resources/inventory_return_locations.js +45 -0
- package/lib/esm/resources/inventory_stock_locations.d.ts +48 -0
- package/lib/esm/resources/inventory_stock_locations.js +45 -0
- package/lib/esm/resources/line_item_options.d.ts +59 -0
- package/lib/esm/resources/line_item_options.js +45 -0
- package/lib/esm/resources/line_items.d.ts +125 -0
- package/lib/esm/resources/line_items.js +45 -0
- package/lib/esm/resources/manual_gateways.d.ts +36 -0
- package/lib/esm/resources/manual_gateways.js +45 -0
- package/lib/esm/resources/manual_tax_calculators.d.ts +49 -0
- package/lib/esm/resources/manual_tax_calculators.js +45 -0
- package/lib/esm/resources/markets.d.ts +79 -0
- package/lib/esm/resources/markets.js +45 -0
- package/lib/esm/resources/merchants.d.ts +40 -0
- package/lib/esm/resources/merchants.js +45 -0
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +60 -0
- package/lib/esm/resources/order_amount_promotion_rules.js +45 -0
- package/lib/esm/resources/order_copies.d.ts +46 -0
- package/lib/esm/resources/order_copies.js +42 -0
- package/lib/esm/resources/order_subscriptions.d.ts +66 -0
- package/lib/esm/resources/order_subscriptions.js +45 -0
- package/lib/esm/resources/order_validation_rules.d.ts +22 -0
- package/lib/esm/resources/order_validation_rules.js +33 -0
- package/lib/esm/resources/orders.d.ts +255 -0
- package/lib/esm/resources/orders.js +45 -0
- package/lib/esm/resources/organization.d.ts +34 -0
- package/lib/esm/resources/organization.js +33 -0
- package/lib/esm/resources/packages.d.ts +57 -0
- package/lib/esm/resources/packages.js +45 -0
- package/lib/esm/resources/parcel_line_items.d.ts +51 -0
- package/lib/esm/resources/parcel_line_items.js +45 -0
- package/lib/esm/resources/parcels.d.ts +108 -0
- package/lib/esm/resources/parcels.js +45 -0
- package/lib/esm/resources/payment_gateways.d.ts +33 -0
- package/lib/esm/resources/payment_gateways.js +45 -0
- package/lib/esm/resources/payment_methods.d.ts +54 -0
- package/lib/esm/resources/payment_methods.js +45 -0
- package/lib/esm/resources/paypal_gateways.d.ts +41 -0
- package/lib/esm/resources/paypal_gateways.js +45 -0
- package/lib/esm/resources/paypal_payments.d.ts +49 -0
- package/lib/esm/resources/paypal_payments.js +45 -0
- package/lib/esm/resources/percentage_discount_promotions.d.ts +91 -0
- package/lib/esm/resources/percentage_discount_promotions.js +45 -0
- package/lib/esm/resources/price_lists.d.ts +41 -0
- package/lib/esm/resources/price_lists.js +45 -0
- package/lib/esm/resources/prices.d.ts +58 -0
- package/lib/esm/resources/prices.js +45 -0
- package/lib/esm/resources/promotion_rules.d.ts +27 -0
- package/lib/esm/resources/promotion_rules.js +33 -0
- package/lib/esm/resources/promotions.d.ts +38 -0
- package/lib/esm/resources/promotions.js +33 -0
- package/lib/esm/resources/refunds.d.ts +36 -0
- package/lib/esm/resources/refunds.js +36 -0
- package/lib/esm/resources/return_line_items.d.ts +51 -0
- package/lib/esm/resources/return_line_items.js +45 -0
- package/lib/esm/resources/returns.d.ts +69 -0
- package/lib/esm/resources/returns.js +45 -0
- package/lib/esm/resources/shipments.d.ts +80 -0
- package/lib/esm/resources/shipments.js +39 -0
- package/lib/esm/resources/shipping_categories.d.ts +35 -0
- package/lib/esm/resources/shipping_categories.js +45 -0
- package/lib/esm/resources/shipping_methods.d.ts +71 -0
- package/lib/esm/resources/shipping_methods.js +45 -0
- package/lib/esm/resources/shipping_zones.d.ts +51 -0
- package/lib/esm/resources/shipping_zones.js +45 -0
- package/lib/esm/resources/sku_list_items.d.ts +46 -0
- package/lib/esm/resources/sku_list_items.js +45 -0
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +70 -0
- package/lib/esm/resources/sku_list_promotion_rules.js +45 -0
- package/lib/esm/resources/sku_lists.d.ts +50 -0
- package/lib/esm/resources/sku_lists.js +45 -0
- package/lib/esm/resources/sku_options.d.ts +55 -0
- package/lib/esm/resources/sku_options.js +45 -0
- package/lib/esm/resources/skus.d.ts +76 -0
- package/lib/esm/resources/skus.js +45 -0
- package/lib/esm/resources/stock_items.d.ts +50 -0
- package/lib/esm/resources/stock_items.js +45 -0
- package/lib/esm/resources/stock_line_items.d.ts +30 -0
- package/lib/esm/resources/stock_line_items.js +36 -0
- package/lib/esm/resources/stock_locations.d.ts +55 -0
- package/lib/esm/resources/stock_locations.js +45 -0
- package/lib/esm/resources/stock_transfers.d.ts +70 -0
- package/lib/esm/resources/stock_transfers.js +45 -0
- package/lib/esm/resources/stripe_gateways.d.ts +40 -0
- package/lib/esm/resources/stripe_gateways.js +45 -0
- package/lib/esm/resources/stripe_payments.d.ts +44 -0
- package/lib/esm/resources/stripe_payments.js +45 -0
- package/lib/esm/resources/tax_calculators.d.ts +27 -0
- package/lib/esm/resources/tax_calculators.js +33 -0
- package/lib/esm/resources/tax_categories.d.ts +61 -0
- package/lib/esm/resources/tax_categories.js +45 -0
- package/lib/esm/resources/tax_rules.d.ts +72 -0
- package/lib/esm/resources/tax_rules.js +45 -0
- package/lib/esm/resources/taxjar_accounts.d.ts +44 -0
- package/lib/esm/resources/taxjar_accounts.js +45 -0
- package/lib/esm/resources/transactions.d.ts +33 -0
- package/lib/esm/resources/transactions.js +33 -0
- package/lib/esm/resources/voids.d.ts +36 -0
- package/lib/esm/resources/voids.js +36 -0
- package/lib/esm/resources/webhooks.d.ts +45 -0
- package/lib/esm/resources/webhooks.js +45 -0
- package/lib/esm/resources/wire_transfers.d.ts +35 -0
- package/lib/esm/resources/wire_transfers.js +45 -0
- package/lib/esm/static.d.ts +6 -0
- package/lib/esm/static.js +14 -0
- package/lib/esm/util.d.ts +3 -0
- package/lib/esm/util.js +4 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +70 -57
- package/lib/index.js +0 -8
- package/lib/sdk.cjs.development.js +0 -17158
- package/lib/sdk.cjs.development.js.map +0 -1
- package/lib/sdk.cjs.production.min.js +0 -2
- package/lib/sdk.cjs.production.min.js.map +0 -1
- package/lib/sdk.esm.js +0 -17152
- package/lib/sdk.esm.js.map +0 -1
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { StockLocation } from './stock_locations';
|
8
|
+
import { InventoryModel } from './inventory_models';
|
9
|
+
declare type InventoryReturnLocationRel = ResourceId & {
|
10
|
+
type: typeof InventoryReturnLocations.TYPE;
|
11
|
+
};
|
12
|
+
declare type StockLocationRel = ResourceId & {
|
13
|
+
type: 'stock_locations';
|
14
|
+
};
|
15
|
+
declare type InventoryModelRel = ResourceId & {
|
16
|
+
type: 'inventory_models';
|
17
|
+
};
|
18
|
+
interface InventoryReturnLocation extends Resource {
|
19
|
+
priority?: number;
|
20
|
+
stock_location?: StockLocation;
|
21
|
+
inventory_model?: InventoryModel;
|
22
|
+
}
|
23
|
+
interface InventoryReturnLocationCreate extends ResourceCreate {
|
24
|
+
priority: number;
|
25
|
+
stock_location?: StockLocationRel;
|
26
|
+
inventory_model?: InventoryModelRel;
|
27
|
+
}
|
28
|
+
interface InventoryReturnLocationUpdate extends ResourceUpdate {
|
29
|
+
priority?: number;
|
30
|
+
stock_location?: StockLocationRel;
|
31
|
+
inventory_model?: InventoryModelRel;
|
32
|
+
}
|
33
|
+
declare class InventoryReturnLocations extends ApiResource {
|
34
|
+
static readonly TYPE: 'inventory_return_locations';
|
35
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
|
36
|
+
create(resource: InventoryReturnLocationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryReturnLocation>;
|
37
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryReturnLocation>;
|
38
|
+
update(resource: InventoryReturnLocationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryReturnLocation>;
|
39
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
40
|
+
isInventoryReturnLocation(resource: any): resource is InventoryReturnLocation;
|
41
|
+
relationship(id: string | ResourceId): InventoryReturnLocationRel;
|
42
|
+
type(): string;
|
43
|
+
}
|
44
|
+
export default InventoryReturnLocations;
|
45
|
+
export { InventoryReturnLocation, InventoryReturnLocationCreate, InventoryReturnLocationUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class InventoryReturnLocations extends ApiResource {
|
7
|
+
// static readonly PATH = 'inventory_return_locations'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: InventoryReturnLocations.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryReturnLocations.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: InventoryReturnLocations.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryReturnLocations.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: InventoryReturnLocations.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isInventoryReturnLocation(resource) {
|
25
|
+
return resource.type && (resource.type === InventoryReturnLocations.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(InventoryReturnLocations.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(InventoryReturnLocations.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: InventoryReturnLocations.TYPE } : { id: id.id, type: InventoryReturnLocations.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return InventoryReturnLocations.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
InventoryReturnLocations.TYPE = 'inventory_return_locations';
|
45
|
+
export default InventoryReturnLocations;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { StockLocation } from './stock_locations';
|
8
|
+
import { InventoryModel } from './inventory_models';
|
9
|
+
declare type InventoryStockLocationRel = ResourceId & {
|
10
|
+
type: typeof InventoryStockLocations.TYPE;
|
11
|
+
};
|
12
|
+
declare type StockLocationRel = ResourceId & {
|
13
|
+
type: 'stock_locations';
|
14
|
+
};
|
15
|
+
declare type InventoryModelRel = ResourceId & {
|
16
|
+
type: 'inventory_models';
|
17
|
+
};
|
18
|
+
interface InventoryStockLocation extends Resource {
|
19
|
+
priority?: number;
|
20
|
+
on_hold?: boolean;
|
21
|
+
stock_location?: StockLocation;
|
22
|
+
inventory_model?: InventoryModel;
|
23
|
+
}
|
24
|
+
interface InventoryStockLocationCreate extends ResourceCreate {
|
25
|
+
priority: number;
|
26
|
+
on_hold?: boolean;
|
27
|
+
stock_location?: StockLocationRel;
|
28
|
+
inventory_model?: InventoryModelRel;
|
29
|
+
}
|
30
|
+
interface InventoryStockLocationUpdate extends ResourceUpdate {
|
31
|
+
priority?: number;
|
32
|
+
on_hold?: boolean;
|
33
|
+
stock_location?: StockLocationRel;
|
34
|
+
inventory_model?: InventoryModelRel;
|
35
|
+
}
|
36
|
+
declare class InventoryStockLocations extends ApiResource {
|
37
|
+
static readonly TYPE: 'inventory_stock_locations';
|
38
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
|
39
|
+
create(resource: InventoryStockLocationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
|
40
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
|
41
|
+
update(resource: InventoryStockLocationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryStockLocation>;
|
42
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
|
+
isInventoryStockLocation(resource: any): resource is InventoryStockLocation;
|
44
|
+
relationship(id: string | ResourceId): InventoryStockLocationRel;
|
45
|
+
type(): string;
|
46
|
+
}
|
47
|
+
export default InventoryStockLocations;
|
48
|
+
export { InventoryStockLocation, InventoryStockLocationCreate, InventoryStockLocationUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class InventoryStockLocations extends ApiResource {
|
7
|
+
// static readonly PATH = 'inventory_stock_locations'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: InventoryStockLocations.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryStockLocations.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: InventoryStockLocations.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryStockLocations.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: InventoryStockLocations.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isInventoryStockLocation(resource) {
|
25
|
+
return resource.type && (resource.type === InventoryStockLocations.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(InventoryStockLocations.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(InventoryStockLocations.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: InventoryStockLocations.TYPE } : { id: id.id, type: InventoryStockLocations.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return InventoryStockLocations.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
InventoryStockLocations.TYPE = 'inventory_stock_locations';
|
45
|
+
export default InventoryStockLocations;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { LineItem } from './line_items';
|
8
|
+
import { SkuOption } from './sku_options';
|
9
|
+
declare type LineItemOptionRel = ResourceId & {
|
10
|
+
type: typeof LineItemOptions.TYPE;
|
11
|
+
};
|
12
|
+
declare type LineItemRel = ResourceId & {
|
13
|
+
type: 'line_items';
|
14
|
+
};
|
15
|
+
declare type SkuOptionRel = ResourceId & {
|
16
|
+
type: 'sku_options';
|
17
|
+
};
|
18
|
+
interface LineItemOption extends Resource {
|
19
|
+
name?: string;
|
20
|
+
quantity?: number;
|
21
|
+
currency_code?: string;
|
22
|
+
unit_amount_cents?: number;
|
23
|
+
unit_amount_float?: number;
|
24
|
+
formatted_unit_amount?: string;
|
25
|
+
total_amount_cents?: number;
|
26
|
+
total_amount_float?: number;
|
27
|
+
formatted_total_amount?: string;
|
28
|
+
delay_hours?: number;
|
29
|
+
delay_days?: number;
|
30
|
+
options?: object;
|
31
|
+
line_item?: LineItem;
|
32
|
+
sku_option?: SkuOption;
|
33
|
+
}
|
34
|
+
interface LineItemOptionCreate extends ResourceCreate {
|
35
|
+
name?: string;
|
36
|
+
quantity: number;
|
37
|
+
options: object;
|
38
|
+
line_item?: LineItemRel;
|
39
|
+
sku_option?: SkuOptionRel;
|
40
|
+
}
|
41
|
+
interface LineItemOptionUpdate extends ResourceUpdate {
|
42
|
+
name?: string;
|
43
|
+
quantity?: number;
|
44
|
+
options?: object;
|
45
|
+
sku_option?: SkuOptionRel;
|
46
|
+
}
|
47
|
+
declare class LineItemOptions extends ApiResource {
|
48
|
+
static readonly TYPE: 'line_item_options';
|
49
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
|
50
|
+
create(resource: LineItemOptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
51
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
52
|
+
update(resource: LineItemOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItemOption>;
|
53
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
54
|
+
isLineItemOption(resource: any): resource is LineItemOption;
|
55
|
+
relationship(id: string | ResourceId): LineItemOptionRel;
|
56
|
+
type(): string;
|
57
|
+
}
|
58
|
+
export default LineItemOptions;
|
59
|
+
export { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class LineItemOptions extends ApiResource {
|
7
|
+
// static readonly PATH = 'line_item_options'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: LineItemOptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: LineItemOptions.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItemOptions.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: LineItemOptions.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isLineItemOption(resource) {
|
25
|
+
return resource.type && (resource.type === LineItemOptions.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(LineItemOptions.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(LineItemOptions.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: LineItemOptions.TYPE } : { id: id.id, type: LineItemOptions.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return LineItemOptions.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
LineItemOptions.TYPE = 'line_item_options';
|
45
|
+
export default LineItemOptions;
|
@@ -0,0 +1,125 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { Order } from './orders';
|
8
|
+
import { Adjustment } from './adjustments';
|
9
|
+
import { Bundle } from './bundles';
|
10
|
+
import { ExternalPromotion } from './external_promotions';
|
11
|
+
import { FixedAmountPromotion } from './fixed_amount_promotions';
|
12
|
+
import { FreeShippingPromotion } from './free_shipping_promotions';
|
13
|
+
import { GiftCard } from './gift_cards';
|
14
|
+
import { PaymentMethod } from './payment_methods';
|
15
|
+
import { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
16
|
+
import { Shipment } from './shipments';
|
17
|
+
import { Sku } from './skus';
|
18
|
+
import { LineItemOption } from './line_item_options';
|
19
|
+
import { StockLineItem } from './stock_line_items';
|
20
|
+
import { StockTransfer } from './stock_transfers';
|
21
|
+
declare type LineItemRel = ResourceId & {
|
22
|
+
type: typeof LineItems.TYPE;
|
23
|
+
};
|
24
|
+
declare type OrderRel = ResourceId & {
|
25
|
+
type: 'orders';
|
26
|
+
};
|
27
|
+
declare type AdjustmentRel = ResourceId & {
|
28
|
+
type: 'adjustments';
|
29
|
+
};
|
30
|
+
declare type BundleRel = ResourceId & {
|
31
|
+
type: 'bundles';
|
32
|
+
};
|
33
|
+
declare type ExternalPromotionRel = ResourceId & {
|
34
|
+
type: 'external_promotions';
|
35
|
+
};
|
36
|
+
declare type FixedAmountPromotionRel = ResourceId & {
|
37
|
+
type: 'fixed_amount_promotions';
|
38
|
+
};
|
39
|
+
declare type FreeShippingPromotionRel = ResourceId & {
|
40
|
+
type: 'free_shipping_promotions';
|
41
|
+
};
|
42
|
+
declare type GiftCardRel = ResourceId & {
|
43
|
+
type: 'gift_cards';
|
44
|
+
};
|
45
|
+
declare type PaymentMethodRel = ResourceId & {
|
46
|
+
type: 'payment_methods';
|
47
|
+
};
|
48
|
+
declare type PercentageDiscountPromotionRel = ResourceId & {
|
49
|
+
type: 'percentage_discount_promotions';
|
50
|
+
};
|
51
|
+
declare type ShipmentRel = ResourceId & {
|
52
|
+
type: 'shipments';
|
53
|
+
};
|
54
|
+
declare type SkuRel = ResourceId & {
|
55
|
+
type: 'skus';
|
56
|
+
};
|
57
|
+
interface LineItem extends Resource {
|
58
|
+
sku_code?: string;
|
59
|
+
bundle_code?: string;
|
60
|
+
quantity?: number;
|
61
|
+
currency_code?: string;
|
62
|
+
unit_amount_cents?: number;
|
63
|
+
unit_amount_float?: number;
|
64
|
+
formatted_unit_amount?: string;
|
65
|
+
options_amount_cents?: number;
|
66
|
+
options_amount_float?: number;
|
67
|
+
formatted_options_amount?: string;
|
68
|
+
discount_cents?: number;
|
69
|
+
discount_float?: number;
|
70
|
+
formatted_discount?: string;
|
71
|
+
total_amount_cents?: number;
|
72
|
+
total_amount_float?: number;
|
73
|
+
formatted_total_amount?: string;
|
74
|
+
tax_amount_cents?: number;
|
75
|
+
tax_amount_float?: number;
|
76
|
+
formatted_tax_amount?: string;
|
77
|
+
name?: string;
|
78
|
+
image_url?: string;
|
79
|
+
discount_breakdown?: object;
|
80
|
+
tax_rate?: number;
|
81
|
+
tax_breakdown?: object;
|
82
|
+
item_type?: string;
|
83
|
+
order?: Order;
|
84
|
+
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku;
|
85
|
+
line_item_options?: LineItemOption[];
|
86
|
+
/**
|
87
|
+
* @deprecated This field should not be used as it may be removed in the future without notice
|
88
|
+
*/
|
89
|
+
shipment_line_items?: object[];
|
90
|
+
stock_line_items?: StockLineItem[];
|
91
|
+
stock_transfers?: StockTransfer[];
|
92
|
+
}
|
93
|
+
interface LineItemCreate extends ResourceCreate {
|
94
|
+
sku_code?: string;
|
95
|
+
bundle_code?: string;
|
96
|
+
quantity: number;
|
97
|
+
_external_price?: boolean;
|
98
|
+
_update_quantity?: boolean;
|
99
|
+
unit_amount_cents?: number;
|
100
|
+
name?: string;
|
101
|
+
image_url?: string;
|
102
|
+
item_type?: string;
|
103
|
+
order?: OrderRel;
|
104
|
+
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel;
|
105
|
+
}
|
106
|
+
interface LineItemUpdate extends ResourceUpdate {
|
107
|
+
sku_code?: string;
|
108
|
+
bundle_code?: string;
|
109
|
+
quantity?: number;
|
110
|
+
name?: string;
|
111
|
+
image_url?: string;
|
112
|
+
}
|
113
|
+
declare class LineItems extends ApiResource {
|
114
|
+
static readonly TYPE: 'line_items';
|
115
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItem>>;
|
116
|
+
create(resource: LineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
117
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
118
|
+
update(resource: LineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
|
119
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
120
|
+
isLineItem(resource: any): resource is LineItem;
|
121
|
+
relationship(id: string | ResourceId): LineItemRel;
|
122
|
+
type(): string;
|
123
|
+
}
|
124
|
+
export default LineItems;
|
125
|
+
export { LineItem, LineItemCreate, LineItemUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class LineItems extends ApiResource {
|
7
|
+
// static readonly PATH = 'line_items'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: LineItems.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: LineItems.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: LineItems.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: LineItems.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isLineItem(resource) {
|
25
|
+
return resource.type && (resource.type === LineItems.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(LineItems.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(LineItems.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: LineItems.TYPE } : { id: id.id, type: LineItems.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return LineItems.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
LineItems.TYPE = 'line_items';
|
45
|
+
export default LineItems;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { PaymentMethod } from './payment_methods';
|
8
|
+
declare type ManualGatewayRel = ResourceId & {
|
9
|
+
type: typeof ManualGateways.TYPE;
|
10
|
+
};
|
11
|
+
interface ManualGateway extends Resource {
|
12
|
+
name?: string;
|
13
|
+
require_capture?: boolean;
|
14
|
+
payment_methods?: PaymentMethod[];
|
15
|
+
}
|
16
|
+
interface ManualGatewayCreate extends ResourceCreate {
|
17
|
+
name: string;
|
18
|
+
require_capture?: boolean;
|
19
|
+
}
|
20
|
+
interface ManualGatewayUpdate extends ResourceUpdate {
|
21
|
+
name?: string;
|
22
|
+
require_capture?: boolean;
|
23
|
+
}
|
24
|
+
declare class ManualGateways extends ApiResource {
|
25
|
+
static readonly TYPE: 'manual_gateways';
|
26
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualGateway>>;
|
27
|
+
create(resource: ManualGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
28
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
29
|
+
update(resource: ManualGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualGateway>;
|
30
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
31
|
+
isManualGateway(resource: any): resource is ManualGateway;
|
32
|
+
relationship(id: string | ResourceId): ManualGatewayRel;
|
33
|
+
type(): string;
|
34
|
+
}
|
35
|
+
export default ManualGateways;
|
36
|
+
export { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class ManualGateways extends ApiResource {
|
7
|
+
// static readonly PATH = 'manual_gateways'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: ManualGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: ManualGateways.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualGateways.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: ManualGateways.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isManualGateway(resource) {
|
25
|
+
return resource.type && (resource.type === ManualGateways.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(ManualGateways.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(ManualGateways.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: ManualGateways.TYPE } : { id: id.id, type: ManualGateways.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return ManualGateways.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
ManualGateways.TYPE = 'manual_gateways';
|
45
|
+
export default ManualGateways;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { TaxCategory } from './tax_categories';
|
8
|
+
import { Market } from './markets';
|
9
|
+
import { Attachment } from './attachments';
|
10
|
+
import { TaxRule } from './tax_rules';
|
11
|
+
declare type ManualTaxCalculatorRel = ResourceId & {
|
12
|
+
type: typeof ManualTaxCalculators.TYPE;
|
13
|
+
};
|
14
|
+
declare type TaxCategoryRel = ResourceId & {
|
15
|
+
type: 'tax_categories';
|
16
|
+
};
|
17
|
+
declare type TaxRuleRel = ResourceId & {
|
18
|
+
type: 'tax_rules';
|
19
|
+
};
|
20
|
+
interface ManualTaxCalculator extends Resource {
|
21
|
+
name?: string;
|
22
|
+
tax_categories?: TaxCategory[];
|
23
|
+
markets?: Market[];
|
24
|
+
attachments?: Attachment[];
|
25
|
+
tax_rules?: TaxRule[];
|
26
|
+
}
|
27
|
+
interface ManualTaxCalculatorCreate extends ResourceCreate {
|
28
|
+
name: string;
|
29
|
+
tax_categories?: TaxCategoryRel[];
|
30
|
+
tax_rules?: TaxRuleRel[];
|
31
|
+
}
|
32
|
+
interface ManualTaxCalculatorUpdate extends ResourceUpdate {
|
33
|
+
name?: string;
|
34
|
+
tax_categories?: TaxCategoryRel[];
|
35
|
+
tax_rules?: TaxRuleRel[];
|
36
|
+
}
|
37
|
+
declare class ManualTaxCalculators extends ApiResource {
|
38
|
+
static readonly TYPE: 'manual_tax_calculators';
|
39
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ManualTaxCalculator>>;
|
40
|
+
create(resource: ManualTaxCalculatorCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
41
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
42
|
+
update(resource: ManualTaxCalculatorUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
|
43
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
44
|
+
isManualTaxCalculator(resource: any): resource is ManualTaxCalculator;
|
45
|
+
relationship(id: string | ResourceId): ManualTaxCalculatorRel;
|
46
|
+
type(): string;
|
47
|
+
}
|
48
|
+
export default ManualTaxCalculators;
|
49
|
+
export { ManualTaxCalculator, ManualTaxCalculatorCreate, ManualTaxCalculatorUpdate };
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource } from '../resource';
|
6
|
+
class ManualTaxCalculators extends ApiResource {
|
7
|
+
// static readonly PATH = 'manual_tax_calculators'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: ManualTaxCalculators.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: ManualTaxCalculators.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ManualTaxCalculators.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: ManualTaxCalculators.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isManualTaxCalculator(resource) {
|
25
|
+
return resource.type && (resource.type === ManualTaxCalculators.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(ManualTaxCalculators.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(ManualTaxCalculators.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: ManualTaxCalculators.TYPE } : { id: id.id, type: ManualTaxCalculators.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return ManualTaxCalculators.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
ManualTaxCalculators.TYPE = 'manual_tax_calculators';
|
45
|
+
export default ManualTaxCalculators;
|