@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 } from '../resource';
|
6
|
+
class CustomerPaymentSources extends ApiResource {
|
7
|
+
// static readonly PATH = 'customer_payment_sources'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: CustomerPaymentSources.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerPaymentSources.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: CustomerPaymentSources.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerPaymentSources.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: CustomerPaymentSources.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isCustomerPaymentSource(resource) {
|
25
|
+
return resource.type && (resource.type === CustomerPaymentSources.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(CustomerPaymentSources.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(CustomerPaymentSources.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: CustomerPaymentSources.TYPE } : { id: id.id, type: CustomerPaymentSources.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return CustomerPaymentSources.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
CustomerPaymentSources.TYPE = 'customer_payment_sources';
|
45
|
+
export default CustomerPaymentSources;
|
@@ -0,0 +1,31 @@
|
|
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 { Customer } from './customers';
|
8
|
+
declare type CustomerSubscriptionRel = ResourceId & {
|
9
|
+
type: typeof CustomerSubscriptions.TYPE;
|
10
|
+
};
|
11
|
+
interface CustomerSubscription extends Resource {
|
12
|
+
customer_email?: string;
|
13
|
+
customer?: Customer;
|
14
|
+
}
|
15
|
+
interface CustomerSubscriptionCreate extends ResourceCreate {
|
16
|
+
customer_email: string;
|
17
|
+
}
|
18
|
+
declare type CustomerSubscriptionUpdate = ResourceUpdate;
|
19
|
+
declare class CustomerSubscriptions extends ApiResource {
|
20
|
+
static readonly TYPE: 'customer_subscriptions';
|
21
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>>;
|
22
|
+
create(resource: CustomerSubscriptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerSubscription>;
|
23
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerSubscription>;
|
24
|
+
update(resource: CustomerSubscriptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerSubscription>;
|
25
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
26
|
+
isCustomerSubscription(resource: any): resource is CustomerSubscription;
|
27
|
+
relationship(id: string | ResourceId): CustomerSubscriptionRel;
|
28
|
+
type(): string;
|
29
|
+
}
|
30
|
+
export default CustomerSubscriptions;
|
31
|
+
export { CustomerSubscription, CustomerSubscriptionCreate, CustomerSubscriptionUpdate };
|
@@ -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 CustomerSubscriptions extends ApiResource {
|
7
|
+
// static readonly PATH = 'customer_subscriptions'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: CustomerSubscriptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: CustomerSubscriptions.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: CustomerSubscriptions.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: CustomerSubscriptions.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: CustomerSubscriptions.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isCustomerSubscription(resource) {
|
25
|
+
return resource.type && (resource.type === CustomerSubscriptions.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(CustomerSubscriptions.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(CustomerSubscriptions.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: CustomerSubscriptions.TYPE } : { id: id.id, type: CustomerSubscriptions.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return CustomerSubscriptions.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
CustomerSubscriptions.TYPE = 'customer_subscriptions';
|
45
|
+
export default CustomerSubscriptions;
|
@@ -0,0 +1,56 @@
|
|
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 { CustomerGroup } from './customer_groups';
|
8
|
+
import { CustomerAddress } from './customer_addresses';
|
9
|
+
import { CustomerPaymentSource } from './customer_payment_sources';
|
10
|
+
import { CustomerSubscription } from './customer_subscriptions';
|
11
|
+
import { Order } from './orders';
|
12
|
+
import { OrderSubscription } from './order_subscriptions';
|
13
|
+
import { Return } from './returns';
|
14
|
+
import { Attachment } from './attachments';
|
15
|
+
declare type CustomerRel = ResourceId & {
|
16
|
+
type: typeof Customers.TYPE;
|
17
|
+
};
|
18
|
+
declare type CustomerGroupRel = ResourceId & {
|
19
|
+
type: 'customer_groups';
|
20
|
+
};
|
21
|
+
interface Customer extends Resource {
|
22
|
+
email?: string;
|
23
|
+
status?: string;
|
24
|
+
has_password?: boolean;
|
25
|
+
customer_group?: CustomerGroup;
|
26
|
+
customer_addresses?: CustomerAddress[];
|
27
|
+
customer_payment_sources?: CustomerPaymentSource[];
|
28
|
+
customer_subscriptions?: CustomerSubscription[];
|
29
|
+
orders?: Order[];
|
30
|
+
order_subscriptions?: OrderSubscription[];
|
31
|
+
returns?: Return[];
|
32
|
+
attachments?: Attachment[];
|
33
|
+
}
|
34
|
+
interface CustomerCreate extends ResourceCreate {
|
35
|
+
email: string;
|
36
|
+
password?: string;
|
37
|
+
customer_group?: CustomerGroupRel;
|
38
|
+
}
|
39
|
+
interface CustomerUpdate extends ResourceUpdate {
|
40
|
+
email?: string;
|
41
|
+
password?: string;
|
42
|
+
customer_group?: CustomerGroupRel;
|
43
|
+
}
|
44
|
+
declare class Customers extends ApiResource {
|
45
|
+
static readonly TYPE: 'customers';
|
46
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Customer>>;
|
47
|
+
create(resource: CustomerCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
48
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
49
|
+
update(resource: CustomerUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
|
50
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
51
|
+
isCustomer(resource: any): resource is Customer;
|
52
|
+
relationship(id: string | ResourceId): CustomerRel;
|
53
|
+
type(): string;
|
54
|
+
}
|
55
|
+
export default Customers;
|
56
|
+
export { Customer, CustomerCreate, CustomerUpdate };
|
@@ -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 Customers extends ApiResource {
|
7
|
+
// static readonly PATH = 'customers'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: Customers.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Customers.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: Customers.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Customers.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: Customers.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isCustomer(resource) {
|
25
|
+
return resource.type && (resource.type === Customers.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(Customers.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(Customers.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: Customers.TYPE } : { id: id.id, type: Customers.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return Customers.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
Customers.TYPE = 'customers';
|
45
|
+
export default Customers;
|
@@ -0,0 +1,52 @@
|
|
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 { ShippingMethod } from './shipping_methods';
|
9
|
+
import { Attachment } from './attachments';
|
10
|
+
declare type DeliveryLeadTimeRel = ResourceId & {
|
11
|
+
type: typeof DeliveryLeadTimes.TYPE;
|
12
|
+
};
|
13
|
+
declare type StockLocationRel = ResourceId & {
|
14
|
+
type: 'stock_locations';
|
15
|
+
};
|
16
|
+
declare type ShippingMethodRel = ResourceId & {
|
17
|
+
type: 'shipping_methods';
|
18
|
+
};
|
19
|
+
interface DeliveryLeadTime extends Resource {
|
20
|
+
min_hours?: number;
|
21
|
+
max_hours?: number;
|
22
|
+
min_days?: number;
|
23
|
+
max_days?: number;
|
24
|
+
stock_location?: StockLocation;
|
25
|
+
shipping_method?: ShippingMethod;
|
26
|
+
attachments?: Attachment[];
|
27
|
+
}
|
28
|
+
interface DeliveryLeadTimeCreate extends ResourceCreate {
|
29
|
+
min_hours: number;
|
30
|
+
max_hours: number;
|
31
|
+
stock_location?: StockLocationRel;
|
32
|
+
shipping_method?: ShippingMethodRel;
|
33
|
+
}
|
34
|
+
interface DeliveryLeadTimeUpdate extends ResourceUpdate {
|
35
|
+
min_hours?: number;
|
36
|
+
max_hours?: number;
|
37
|
+
stock_location?: StockLocationRel;
|
38
|
+
shipping_method?: ShippingMethodRel;
|
39
|
+
}
|
40
|
+
declare class DeliveryLeadTimes extends ApiResource {
|
41
|
+
static readonly TYPE: 'delivery_lead_times';
|
42
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>>;
|
43
|
+
create(resource: DeliveryLeadTimeCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
44
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
45
|
+
update(resource: DeliveryLeadTimeUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
|
46
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
47
|
+
isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
|
48
|
+
relationship(id: string | ResourceId): DeliveryLeadTimeRel;
|
49
|
+
type(): string;
|
50
|
+
}
|
51
|
+
export default DeliveryLeadTimes;
|
52
|
+
export { DeliveryLeadTime, DeliveryLeadTimeCreate, DeliveryLeadTimeUpdate };
|
@@ -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 DeliveryLeadTimes extends ApiResource {
|
7
|
+
// static readonly PATH = 'delivery_lead_times'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: DeliveryLeadTimes.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: DeliveryLeadTimes.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: DeliveryLeadTimes.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: DeliveryLeadTimes.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: DeliveryLeadTimes.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isDeliveryLeadTime(resource) {
|
25
|
+
return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(DeliveryLeadTimes.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(DeliveryLeadTimes.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: DeliveryLeadTimes.TYPE } : { id: id.id, type: DeliveryLeadTimes.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return DeliveryLeadTimes.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
DeliveryLeadTimes.TYPE = 'delivery_lead_times';
|
45
|
+
export default DeliveryLeadTimes;
|
@@ -0,0 +1,27 @@
|
|
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, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { Webhook } from './webhooks';
|
8
|
+
declare type EventCallbackRel = ResourceId & {
|
9
|
+
type: typeof EventCallbacks.TYPE;
|
10
|
+
};
|
11
|
+
interface EventCallback extends Resource {
|
12
|
+
callback_url?: string;
|
13
|
+
payload?: object;
|
14
|
+
response_code?: string;
|
15
|
+
response_message?: string;
|
16
|
+
webhook?: Webhook;
|
17
|
+
}
|
18
|
+
declare class EventCallbacks extends ApiResource {
|
19
|
+
static readonly TYPE: 'event_callbacks';
|
20
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
21
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<EventCallback>;
|
22
|
+
isEventCallback(resource: any): resource is EventCallback;
|
23
|
+
relationship(id: string | ResourceId): EventCallbackRel;
|
24
|
+
type(): string;
|
25
|
+
}
|
26
|
+
export default EventCallbacks;
|
27
|
+
export { EventCallback };
|
@@ -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 } from '../resource';
|
6
|
+
class EventCallbacks extends ApiResource {
|
7
|
+
// static readonly PATH = 'event_callbacks'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: EventCallbacks.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async retrieve(id, params, options) {
|
12
|
+
return this.resources.retrieve({ type: EventCallbacks.TYPE, id }, params, options);
|
13
|
+
}
|
14
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
|
+
isEventCallback(resource) {
|
16
|
+
return resource.type && (resource.type === EventCallbacks.TYPE);
|
17
|
+
}
|
18
|
+
/*
|
19
|
+
filter(): QueryBuilderRetrieve {
|
20
|
+
return new QueryBuilderRetrieve(EventCallbacks.TYPE)
|
21
|
+
}
|
22
|
+
*/
|
23
|
+
/*
|
24
|
+
filterList(): QueryBuilderList {
|
25
|
+
return new QueryBuilderList(EventCallbacks.TYPE)
|
26
|
+
}
|
27
|
+
*/
|
28
|
+
relationship(id) {
|
29
|
+
return (typeof id === 'string') ? { id, type: EventCallbacks.TYPE } : { id: id.id, type: EventCallbacks.TYPE };
|
30
|
+
}
|
31
|
+
type() {
|
32
|
+
return EventCallbacks.TYPE;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
EventCallbacks.TYPE = 'event_callbacks';
|
36
|
+
export default EventCallbacks;
|
@@ -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 { PaymentMethod } from './payment_methods';
|
8
|
+
import { ExternalPayment } from './external_payments';
|
9
|
+
declare type ExternalGatewayRel = ResourceId & {
|
10
|
+
type: typeof ExternalGateways.TYPE;
|
11
|
+
};
|
12
|
+
interface ExternalGateway extends Resource {
|
13
|
+
name?: string;
|
14
|
+
shared_secret?: string;
|
15
|
+
authorize_url?: string;
|
16
|
+
capture_url?: string;
|
17
|
+
void_url?: string;
|
18
|
+
refund_url?: string;
|
19
|
+
payment_methods?: PaymentMethod[];
|
20
|
+
external_payments?: ExternalPayment[];
|
21
|
+
}
|
22
|
+
interface ExternalGatewayCreate extends ResourceCreate {
|
23
|
+
name: string;
|
24
|
+
authorize_url?: string;
|
25
|
+
capture_url?: string;
|
26
|
+
void_url?: string;
|
27
|
+
refund_url?: string;
|
28
|
+
}
|
29
|
+
interface ExternalGatewayUpdate extends ResourceUpdate {
|
30
|
+
name?: string;
|
31
|
+
authorize_url?: string;
|
32
|
+
capture_url?: string;
|
33
|
+
void_url?: string;
|
34
|
+
refund_url?: string;
|
35
|
+
}
|
36
|
+
declare class ExternalGateways extends ApiResource {
|
37
|
+
static readonly TYPE: 'external_gateways';
|
38
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalGateway>>;
|
39
|
+
create(resource: ExternalGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
40
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
41
|
+
update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
|
42
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
43
|
+
isExternalGateway(resource: any): resource is ExternalGateway;
|
44
|
+
relationship(id: string | ResourceId): ExternalGatewayRel;
|
45
|
+
type(): string;
|
46
|
+
}
|
47
|
+
export default ExternalGateways;
|
48
|
+
export { ExternalGateway, ExternalGatewayCreate, ExternalGatewayUpdate };
|
@@ -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 ExternalGateways extends ApiResource {
|
7
|
+
// static readonly PATH = 'external_gateways'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: ExternalGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: ExternalGateways.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalGateways.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: ExternalGateways.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isExternalGateway(resource) {
|
25
|
+
return resource.type && (resource.type === ExternalGateways.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(ExternalGateways.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(ExternalGateways.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: ExternalGateways.TYPE } : { id: id.id, type: ExternalGateways.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return ExternalGateways.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
ExternalGateways.TYPE = 'external_gateways';
|
45
|
+
export default ExternalGateways;
|
@@ -0,0 +1,42 @@
|
|
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 { PaymentGateway } from './payment_gateways';
|
9
|
+
declare type ExternalPaymentRel = ResourceId & {
|
10
|
+
type: typeof ExternalPayments.TYPE;
|
11
|
+
};
|
12
|
+
declare type OrderRel = ResourceId & {
|
13
|
+
type: 'orders';
|
14
|
+
};
|
15
|
+
interface ExternalPayment extends Resource {
|
16
|
+
payment_source_token?: string;
|
17
|
+
options?: object;
|
18
|
+
order?: Order;
|
19
|
+
payment_gateway?: PaymentGateway;
|
20
|
+
}
|
21
|
+
interface ExternalPaymentCreate extends ResourceCreate {
|
22
|
+
payment_source_token: string;
|
23
|
+
options?: object;
|
24
|
+
order?: OrderRel;
|
25
|
+
}
|
26
|
+
interface ExternalPaymentUpdate extends ResourceUpdate {
|
27
|
+
options?: object;
|
28
|
+
order?: OrderRel;
|
29
|
+
}
|
30
|
+
declare class ExternalPayments extends ApiResource {
|
31
|
+
static readonly TYPE: 'external_payments';
|
32
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
|
33
|
+
create(resource: ExternalPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
34
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
35
|
+
update(resource: ExternalPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPayment>;
|
36
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
37
|
+
isExternalPayment(resource: any): resource is ExternalPayment;
|
38
|
+
relationship(id: string | ResourceId): ExternalPaymentRel;
|
39
|
+
type(): string;
|
40
|
+
}
|
41
|
+
export default ExternalPayments;
|
42
|
+
export { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate };
|
@@ -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 ExternalPayments extends ApiResource {
|
7
|
+
// static readonly PATH = 'external_payments'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: ExternalPayments.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: ExternalPayments.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: ExternalPayments.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: ExternalPayments.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isExternalPayment(resource) {
|
25
|
+
return resource.type && (resource.type === ExternalPayments.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(ExternalPayments.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(ExternalPayments.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: ExternalPayments.TYPE } : { id: id.id, type: ExternalPayments.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return ExternalPayments.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
ExternalPayments.TYPE = 'external_payments';
|
45
|
+
export default ExternalPayments;
|
@@ -0,0 +1,82 @@
|
|
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 { Market } from './markets';
|
8
|
+
import { PromotionRule } from './promotion_rules';
|
9
|
+
import { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
10
|
+
import { SkuListPromotionRule } from './sku_list_promotion_rules';
|
11
|
+
import { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
12
|
+
import { Attachment } from './attachments';
|
13
|
+
declare type ExternalPromotionRel = ResourceId & {
|
14
|
+
type: typeof ExternalPromotions.TYPE;
|
15
|
+
};
|
16
|
+
declare type MarketRel = ResourceId & {
|
17
|
+
type: 'markets';
|
18
|
+
};
|
19
|
+
declare type PromotionRuleRel = ResourceId & {
|
20
|
+
type: 'promotion_rules';
|
21
|
+
};
|
22
|
+
declare type OrderAmountPromotionRuleRel = ResourceId & {
|
23
|
+
type: 'order_amount_promotion_rules';
|
24
|
+
};
|
25
|
+
declare type SkuListPromotionRuleRel = ResourceId & {
|
26
|
+
type: 'sku_list_promotion_rules';
|
27
|
+
};
|
28
|
+
declare type CouponCodesPromotionRuleRel = ResourceId & {
|
29
|
+
type: 'coupon_codes_promotion_rules';
|
30
|
+
};
|
31
|
+
interface ExternalPromotion extends Resource {
|
32
|
+
name?: string;
|
33
|
+
starts_at?: string;
|
34
|
+
expires_at?: string;
|
35
|
+
total_usage_limit?: number;
|
36
|
+
total_usage_count?: number;
|
37
|
+
active?: boolean;
|
38
|
+
promotion_url?: string;
|
39
|
+
market?: Market;
|
40
|
+
promotion_rules?: PromotionRule[];
|
41
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
42
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
43
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
44
|
+
attachments?: Attachment[];
|
45
|
+
}
|
46
|
+
interface ExternalPromotionCreate extends ResourceCreate {
|
47
|
+
name: string;
|
48
|
+
starts_at: string;
|
49
|
+
expires_at: string;
|
50
|
+
total_usage_limit: number;
|
51
|
+
promotion_url: string;
|
52
|
+
market?: MarketRel;
|
53
|
+
promotion_rules?: PromotionRuleRel[];
|
54
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
55
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
56
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
57
|
+
}
|
58
|
+
interface ExternalPromotionUpdate extends ResourceUpdate {
|
59
|
+
name?: string;
|
60
|
+
starts_at?: string;
|
61
|
+
expires_at?: string;
|
62
|
+
total_usage_limit?: number;
|
63
|
+
promotion_url?: string;
|
64
|
+
market?: MarketRel;
|
65
|
+
promotion_rules?: PromotionRuleRel[];
|
66
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
67
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
68
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
69
|
+
}
|
70
|
+
declare class ExternalPromotions extends ApiResource {
|
71
|
+
static readonly TYPE: 'external_promotions';
|
72
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPromotion>>;
|
73
|
+
create(resource: ExternalPromotionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
74
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
75
|
+
update(resource: ExternalPromotionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalPromotion>;
|
76
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
77
|
+
isExternalPromotion(resource: any): resource is ExternalPromotion;
|
78
|
+
relationship(id: string | ResourceId): ExternalPromotionRel;
|
79
|
+
type(): string;
|
80
|
+
}
|
81
|
+
export default ExternalPromotions;
|
82
|
+
export { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate };
|