@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 BingGeocoders extends ApiResource {
|
7
|
+
// static readonly PATH = 'bing_geocoders'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: BingGeocoders.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: BingGeocoders.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: BingGeocoders.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: BingGeocoders.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: BingGeocoders.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isBingGeocoder(resource) {
|
25
|
+
return resource.type && (resource.type === BingGeocoders.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(BingGeocoders.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(BingGeocoders.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: BingGeocoders.TYPE } : { id: id.id, type: BingGeocoders.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return BingGeocoders.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
BingGeocoders.TYPE = 'bing_geocoders';
|
45
|
+
export default BingGeocoders;
|
@@ -0,0 +1,58 @@
|
|
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 { BraintreePayment } from './braintree_payments';
|
9
|
+
declare type BraintreeGatewayRel = ResourceId & {
|
10
|
+
type: typeof BraintreeGateways.TYPE;
|
11
|
+
};
|
12
|
+
declare type BraintreePaymentRel = ResourceId & {
|
13
|
+
type: 'braintree_payments';
|
14
|
+
};
|
15
|
+
interface BraintreeGateway extends Resource {
|
16
|
+
name?: string;
|
17
|
+
descriptor_name?: string;
|
18
|
+
descriptor_phone?: string;
|
19
|
+
descriptor_url?: string;
|
20
|
+
webhook_endpoint_url?: string;
|
21
|
+
payment_methods?: PaymentMethod[];
|
22
|
+
braintree_payments?: BraintreePayment[];
|
23
|
+
}
|
24
|
+
interface BraintreeGatewayCreate extends ResourceCreate {
|
25
|
+
name: string;
|
26
|
+
merchant_account_id: string;
|
27
|
+
merchant_id: string;
|
28
|
+
public_key: string;
|
29
|
+
private_key: string;
|
30
|
+
descriptor_name?: string;
|
31
|
+
descriptor_phone?: string;
|
32
|
+
descriptor_url?: string;
|
33
|
+
braintree_payments?: BraintreePaymentRel[];
|
34
|
+
}
|
35
|
+
interface BraintreeGatewayUpdate extends ResourceUpdate {
|
36
|
+
name?: string;
|
37
|
+
merchant_account_id?: string;
|
38
|
+
merchant_id?: string;
|
39
|
+
public_key?: string;
|
40
|
+
private_key?: string;
|
41
|
+
descriptor_name?: string;
|
42
|
+
descriptor_phone?: string;
|
43
|
+
descriptor_url?: string;
|
44
|
+
braintree_payments?: BraintreePaymentRel[];
|
45
|
+
}
|
46
|
+
declare class BraintreeGateways extends ApiResource {
|
47
|
+
static readonly TYPE: 'braintree_gateways';
|
48
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreeGateway>>;
|
49
|
+
create(resource: BraintreeGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
50
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
51
|
+
update(resource: BraintreeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreeGateway>;
|
52
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
53
|
+
isBraintreeGateway(resource: any): resource is BraintreeGateway;
|
54
|
+
relationship(id: string | ResourceId): BraintreeGatewayRel;
|
55
|
+
type(): string;
|
56
|
+
}
|
57
|
+
export default BraintreeGateways;
|
58
|
+
export { BraintreeGateway, BraintreeGatewayCreate, BraintreeGatewayUpdate };
|
@@ -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 BraintreeGateways extends ApiResource {
|
7
|
+
// static readonly PATH = 'braintree_gateways'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: BraintreeGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: BraintreeGateways.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: BraintreeGateways.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: BraintreeGateways.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: BraintreeGateways.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isBraintreeGateway(resource) {
|
25
|
+
return resource.type && (resource.type === BraintreeGateways.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(BraintreeGateways.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(BraintreeGateways.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: BraintreeGateways.TYPE } : { id: id.id, type: BraintreeGateways.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return BraintreeGateways.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
BraintreeGateways.TYPE = 'braintree_gateways';
|
45
|
+
export default BraintreeGateways;
|
@@ -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 { Order } from './orders';
|
8
|
+
import { PaymentGateway } from './payment_gateways';
|
9
|
+
declare type BraintreePaymentRel = ResourceId & {
|
10
|
+
type: typeof BraintreePayments.TYPE;
|
11
|
+
};
|
12
|
+
declare type OrderRel = ResourceId & {
|
13
|
+
type: 'orders';
|
14
|
+
};
|
15
|
+
interface BraintreePayment extends Resource {
|
16
|
+
client_token?: string;
|
17
|
+
payment_method_nonce?: string;
|
18
|
+
payment_id?: string;
|
19
|
+
local?: boolean;
|
20
|
+
options?: object;
|
21
|
+
order?: Order;
|
22
|
+
payment_gateway?: PaymentGateway;
|
23
|
+
}
|
24
|
+
interface BraintreePaymentCreate extends ResourceCreate {
|
25
|
+
payment_id?: string;
|
26
|
+
local?: boolean;
|
27
|
+
options?: object;
|
28
|
+
order?: OrderRel;
|
29
|
+
}
|
30
|
+
interface BraintreePaymentUpdate extends ResourceUpdate {
|
31
|
+
payment_method_nonce?: string;
|
32
|
+
payment_id?: string;
|
33
|
+
local?: boolean;
|
34
|
+
options?: object;
|
35
|
+
order?: OrderRel;
|
36
|
+
}
|
37
|
+
declare class BraintreePayments extends ApiResource {
|
38
|
+
static readonly TYPE: 'braintree_payments';
|
39
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<BraintreePayment>>;
|
40
|
+
create(resource: BraintreePaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
41
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
42
|
+
update(resource: BraintreePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BraintreePayment>;
|
43
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
44
|
+
isBraintreePayment(resource: any): resource is BraintreePayment;
|
45
|
+
relationship(id: string | ResourceId): BraintreePaymentRel;
|
46
|
+
type(): string;
|
47
|
+
}
|
48
|
+
export default BraintreePayments;
|
49
|
+
export { BraintreePayment, BraintreePaymentCreate, BraintreePaymentUpdate };
|
@@ -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 BraintreePayments extends ApiResource {
|
7
|
+
// static readonly PATH = 'braintree_payments'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: BraintreePayments.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: BraintreePayments.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: BraintreePayments.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: BraintreePayments.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: BraintreePayments.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isBraintreePayment(resource) {
|
25
|
+
return resource.type && (resource.type === BraintreePayments.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(BraintreePayments.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(BraintreePayments.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: BraintreePayments.TYPE } : { id: id.id, type: BraintreePayments.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return BraintreePayments.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
BraintreePayments.TYPE = 'braintree_payments';
|
45
|
+
export default BraintreePayments;
|
@@ -0,0 +1,69 @@
|
|
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 { SkuList } from './sku_lists';
|
9
|
+
import { Sku } from './skus';
|
10
|
+
import { Attachment } from './attachments';
|
11
|
+
declare type BundleRel = ResourceId & {
|
12
|
+
type: typeof Bundles.TYPE;
|
13
|
+
};
|
14
|
+
declare type MarketRel = ResourceId & {
|
15
|
+
type: 'markets';
|
16
|
+
};
|
17
|
+
declare type SkuListRel = ResourceId & {
|
18
|
+
type: 'sku_lists';
|
19
|
+
};
|
20
|
+
interface Bundle extends Resource {
|
21
|
+
code?: string;
|
22
|
+
name?: string;
|
23
|
+
description?: string;
|
24
|
+
image_url?: string;
|
25
|
+
price_amount_cents?: number;
|
26
|
+
price_amount_float?: number;
|
27
|
+
formatted_price_amount?: string;
|
28
|
+
compare_at_amount_cents?: number;
|
29
|
+
compare_at_amount_float?: number;
|
30
|
+
formatted_compare_at_amount?: string;
|
31
|
+
skus_count?: number;
|
32
|
+
market?: Market;
|
33
|
+
sku_list?: SkuList;
|
34
|
+
skus?: Sku[];
|
35
|
+
attachments?: Attachment[];
|
36
|
+
}
|
37
|
+
interface BundleCreate extends ResourceCreate {
|
38
|
+
code: string;
|
39
|
+
name: string;
|
40
|
+
description?: string;
|
41
|
+
image_url?: string;
|
42
|
+
price_amount_cents: number;
|
43
|
+
compare_at_amount_cents: number;
|
44
|
+
_compute_compare_at_amount?: boolean;
|
45
|
+
market?: MarketRel;
|
46
|
+
sku_list?: SkuListRel;
|
47
|
+
}
|
48
|
+
interface BundleUpdate extends ResourceUpdate {
|
49
|
+
code?: string;
|
50
|
+
name?: string;
|
51
|
+
description?: string;
|
52
|
+
image_url?: string;
|
53
|
+
price_amount_cents?: number;
|
54
|
+
compare_at_amount_cents?: number;
|
55
|
+
_compute_compare_at_amount?: boolean;
|
56
|
+
}
|
57
|
+
declare class Bundles extends ApiResource {
|
58
|
+
static readonly TYPE: 'bundles';
|
59
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
|
60
|
+
create(resource: BundleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
61
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
62
|
+
update(resource: BundleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Bundle>;
|
63
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
64
|
+
isBundle(resource: any): resource is Bundle;
|
65
|
+
relationship(id: string | ResourceId): BundleRel;
|
66
|
+
type(): string;
|
67
|
+
}
|
68
|
+
export default Bundles;
|
69
|
+
export { Bundle, BundleCreate, BundleUpdate };
|
@@ -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 Bundles extends ApiResource {
|
7
|
+
// static readonly PATH = 'bundles'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: Bundles.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Bundles.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: Bundles.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Bundles.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: Bundles.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isBundle(resource) {
|
25
|
+
return resource.type && (resource.type === Bundles.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(Bundles.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(Bundles.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: Bundles.TYPE } : { id: id.id, type: Bundles.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return Bundles.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
Bundles.TYPE = 'bundles';
|
45
|
+
export default Bundles;
|
@@ -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, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { Order } from './orders';
|
8
|
+
import { Authorization } from './authorizations';
|
9
|
+
import { Refund } from './refunds';
|
10
|
+
declare type CaptureRel = ResourceId & {
|
11
|
+
type: typeof Captures.TYPE;
|
12
|
+
};
|
13
|
+
interface Capture extends Resource {
|
14
|
+
number?: string;
|
15
|
+
currency_code?: string;
|
16
|
+
amount_cents?: number;
|
17
|
+
amount_float?: number;
|
18
|
+
formatted_amount?: string;
|
19
|
+
succeeded?: boolean;
|
20
|
+
message?: string;
|
21
|
+
error_code?: string;
|
22
|
+
error_detail?: string;
|
23
|
+
token?: string;
|
24
|
+
gateway_transaction_id?: string;
|
25
|
+
refund_amount_cents?: number;
|
26
|
+
refund_amount_float?: number;
|
27
|
+
formatted_refund_amount?: string;
|
28
|
+
refund_balance_cents?: number;
|
29
|
+
refund_balance_float?: number;
|
30
|
+
formatted_refund_balance?: string;
|
31
|
+
order?: Order;
|
32
|
+
reference_authorization?: Authorization;
|
33
|
+
refunds?: Refund[];
|
34
|
+
}
|
35
|
+
interface CaptureUpdate extends ResourceUpdate {
|
36
|
+
_refund?: boolean;
|
37
|
+
_refund_amount_cents?: number;
|
38
|
+
}
|
39
|
+
declare class Captures extends ApiResource {
|
40
|
+
static readonly TYPE: 'captures';
|
41
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
|
42
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
43
|
+
update(resource: CaptureUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
|
44
|
+
isCapture(resource: any): resource is Capture;
|
45
|
+
relationship(id: string | ResourceId): CaptureRel;
|
46
|
+
type(): string;
|
47
|
+
}
|
48
|
+
export default Captures;
|
49
|
+
export { Capture, CaptureUpdate };
|
@@ -0,0 +1,39 @@
|
|
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 Captures extends ApiResource {
|
7
|
+
// static readonly PATH = 'captures'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: Captures.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async retrieve(id, params, options) {
|
12
|
+
return this.resources.retrieve({ type: Captures.TYPE, id }, params, options);
|
13
|
+
}
|
14
|
+
async update(resource, params, options) {
|
15
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: Captures.TYPE }), params, options);
|
16
|
+
}
|
17
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
18
|
+
isCapture(resource) {
|
19
|
+
return resource.type && (resource.type === Captures.TYPE);
|
20
|
+
}
|
21
|
+
/*
|
22
|
+
filter(): QueryBuilderRetrieve {
|
23
|
+
return new QueryBuilderRetrieve(Captures.TYPE)
|
24
|
+
}
|
25
|
+
*/
|
26
|
+
/*
|
27
|
+
filterList(): QueryBuilderList {
|
28
|
+
return new QueryBuilderList(Captures.TYPE)
|
29
|
+
}
|
30
|
+
*/
|
31
|
+
relationship(id) {
|
32
|
+
return (typeof id === 'string') ? { id, type: Captures.TYPE } : { id: id.id, type: Captures.TYPE };
|
33
|
+
}
|
34
|
+
type() {
|
35
|
+
return Captures.TYPE;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
Captures.TYPE = 'captures';
|
39
|
+
export default Captures;
|
@@ -0,0 +1,28 @@
|
|
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 { Market } from './markets';
|
8
|
+
import { Attachment } from './attachments';
|
9
|
+
declare type CarrierAccountRel = ResourceId & {
|
10
|
+
type: typeof CarrierAccounts.TYPE;
|
11
|
+
};
|
12
|
+
interface CarrierAccount extends Resource {
|
13
|
+
name?: string;
|
14
|
+
easypost_type?: string;
|
15
|
+
easypost_id?: string;
|
16
|
+
market?: Market;
|
17
|
+
attachments?: Attachment[];
|
18
|
+
}
|
19
|
+
declare class CarrierAccounts extends ApiResource {
|
20
|
+
static readonly TYPE: 'carrier_accounts';
|
21
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
|
22
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CarrierAccount>;
|
23
|
+
isCarrierAccount(resource: any): resource is CarrierAccount;
|
24
|
+
relationship(id: string | ResourceId): CarrierAccountRel;
|
25
|
+
type(): string;
|
26
|
+
}
|
27
|
+
export default CarrierAccounts;
|
28
|
+
export { CarrierAccount };
|
@@ -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 CarrierAccounts extends ApiResource {
|
7
|
+
// static readonly PATH = 'carrier_accounts'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: CarrierAccounts.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async retrieve(id, params, options) {
|
12
|
+
return this.resources.retrieve({ type: CarrierAccounts.TYPE, id }, params, options);
|
13
|
+
}
|
14
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
15
|
+
isCarrierAccount(resource) {
|
16
|
+
return resource.type && (resource.type === CarrierAccounts.TYPE);
|
17
|
+
}
|
18
|
+
/*
|
19
|
+
filter(): QueryBuilderRetrieve {
|
20
|
+
return new QueryBuilderRetrieve(CarrierAccounts.TYPE)
|
21
|
+
}
|
22
|
+
*/
|
23
|
+
/*
|
24
|
+
filterList(): QueryBuilderList {
|
25
|
+
return new QueryBuilderList(CarrierAccounts.TYPE)
|
26
|
+
}
|
27
|
+
*/
|
28
|
+
relationship(id) {
|
29
|
+
return (typeof id === 'string') ? { id, type: CarrierAccounts.TYPE } : { id: id.id, type: CarrierAccounts.TYPE };
|
30
|
+
}
|
31
|
+
type() {
|
32
|
+
return CarrierAccounts.TYPE;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
CarrierAccounts.TYPE = 'carrier_accounts';
|
36
|
+
export default CarrierAccounts;
|
@@ -0,0 +1,47 @@
|
|
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 { CheckoutComPayment } from './checkout_com_payments';
|
9
|
+
declare type CheckoutComGatewayRel = ResourceId & {
|
10
|
+
type: typeof CheckoutComGateways.TYPE;
|
11
|
+
};
|
12
|
+
declare type CheckoutComPaymentRel = ResourceId & {
|
13
|
+
type: 'checkout_com_payments';
|
14
|
+
};
|
15
|
+
interface CheckoutComGateway extends Resource {
|
16
|
+
name?: string;
|
17
|
+
webhook_endpoint_id?: string;
|
18
|
+
webhook_endpoint_secret?: string;
|
19
|
+
webhook_endpoint_url?: string;
|
20
|
+
payment_methods?: PaymentMethod[];
|
21
|
+
checkout_com_payments?: CheckoutComPayment[];
|
22
|
+
}
|
23
|
+
interface CheckoutComGatewayCreate extends ResourceCreate {
|
24
|
+
name: string;
|
25
|
+
secret_key: string;
|
26
|
+
public_key: string;
|
27
|
+
checkout_com_payments?: CheckoutComPaymentRel[];
|
28
|
+
}
|
29
|
+
interface CheckoutComGatewayUpdate extends ResourceUpdate {
|
30
|
+
name?: string;
|
31
|
+
secret_key?: string;
|
32
|
+
public_key?: string;
|
33
|
+
checkout_com_payments?: CheckoutComPaymentRel[];
|
34
|
+
}
|
35
|
+
declare class CheckoutComGateways extends ApiResource {
|
36
|
+
static readonly TYPE: 'checkout_com_gateways';
|
37
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CheckoutComGateway>>;
|
38
|
+
create(resource: CheckoutComGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
39
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
40
|
+
update(resource: CheckoutComGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComGateway>;
|
41
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
42
|
+
isCheckoutComGateway(resource: any): resource is CheckoutComGateway;
|
43
|
+
relationship(id: string | ResourceId): CheckoutComGatewayRel;
|
44
|
+
type(): string;
|
45
|
+
}
|
46
|
+
export default CheckoutComGateways;
|
47
|
+
export { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate };
|
@@ -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 CheckoutComGateways extends ApiResource {
|
7
|
+
// static readonly PATH = 'checkout_com_gateways'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: CheckoutComGateways.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: CheckoutComGateways.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: CheckoutComGateways.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: CheckoutComGateways.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: CheckoutComGateways.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isCheckoutComGateway(resource) {
|
25
|
+
return resource.type && (resource.type === CheckoutComGateways.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(CheckoutComGateways.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(CheckoutComGateways.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: CheckoutComGateways.TYPE } : { id: id.id, type: CheckoutComGateways.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return CheckoutComGateways.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
CheckoutComGateways.TYPE = 'checkout_com_gateways';
|
45
|
+
export default CheckoutComGateways;
|
@@ -0,0 +1,53 @@
|
|
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 CheckoutComPaymentRel = ResourceId & {
|
10
|
+
type: typeof CheckoutComPayments.TYPE;
|
11
|
+
};
|
12
|
+
declare type OrderRel = ResourceId & {
|
13
|
+
type: 'orders';
|
14
|
+
};
|
15
|
+
interface CheckoutComPayment extends Resource {
|
16
|
+
payment_type?: string;
|
17
|
+
token?: string;
|
18
|
+
session_id?: string;
|
19
|
+
source_id?: string;
|
20
|
+
customer_token?: string;
|
21
|
+
redirect_uri?: string;
|
22
|
+
payment_response?: object;
|
23
|
+
order?: Order;
|
24
|
+
payment_gateway?: PaymentGateway;
|
25
|
+
}
|
26
|
+
interface CheckoutComPaymentCreate extends ResourceCreate {
|
27
|
+
payment_type: string;
|
28
|
+
token: string;
|
29
|
+
session_id?: string;
|
30
|
+
order?: OrderRel;
|
31
|
+
}
|
32
|
+
interface CheckoutComPaymentUpdate extends ResourceUpdate {
|
33
|
+
payment_type?: string;
|
34
|
+
token?: string;
|
35
|
+
session_id?: string;
|
36
|
+
_authorize?: boolean;
|
37
|
+
_details?: boolean;
|
38
|
+
_refresh?: boolean;
|
39
|
+
order?: OrderRel;
|
40
|
+
}
|
41
|
+
declare class CheckoutComPayments extends ApiResource {
|
42
|
+
static readonly TYPE: 'checkout_com_payments';
|
43
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CheckoutComPayment>>;
|
44
|
+
create(resource: CheckoutComPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
45
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
46
|
+
update(resource: CheckoutComPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CheckoutComPayment>;
|
47
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
48
|
+
isCheckoutComPayment(resource: any): resource is CheckoutComPayment;
|
49
|
+
relationship(id: string | ResourceId): CheckoutComPaymentRel;
|
50
|
+
type(): string;
|
51
|
+
}
|
52
|
+
export default CheckoutComPayments;
|
53
|
+
export { CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate };
|