@commercelayer/sdk 2.3.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 -23
- 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 -5
- 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 -17132
- 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 -17126
- package/lib/sdk.esm.js.map +0 -1
@@ -0,0 +1,25 @@
|
|
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 } from '../query';
|
7
|
+
import { Address } from './addresses';
|
8
|
+
import { Attachment } from './attachments';
|
9
|
+
declare type GeocoderRel = ResourceId & {
|
10
|
+
type: typeof Geocoders.TYPE;
|
11
|
+
};
|
12
|
+
interface Geocoder extends Resource {
|
13
|
+
name?: string;
|
14
|
+
addresses?: Address[];
|
15
|
+
attachments?: Attachment[];
|
16
|
+
}
|
17
|
+
declare class Geocoders extends ApiResource {
|
18
|
+
static readonly TYPE: 'geocoders';
|
19
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Geocoder>>;
|
20
|
+
isGeocoder(resource: any): resource is Geocoder;
|
21
|
+
relationship(id: string | ResourceId): GeocoderRel;
|
22
|
+
type(): string;
|
23
|
+
}
|
24
|
+
export default Geocoders;
|
25
|
+
export { Geocoder };
|
@@ -0,0 +1,33 @@
|
|
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 Geocoders extends ApiResource {
|
7
|
+
// static readonly PATH = 'geocoders'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: Geocoders.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
12
|
+
isGeocoder(resource) {
|
13
|
+
return resource.type && (resource.type === Geocoders.TYPE);
|
14
|
+
}
|
15
|
+
/*
|
16
|
+
filter(): QueryBuilderRetrieve {
|
17
|
+
return new QueryBuilderRetrieve(Geocoders.TYPE)
|
18
|
+
}
|
19
|
+
*/
|
20
|
+
/*
|
21
|
+
filterList(): QueryBuilderList {
|
22
|
+
return new QueryBuilderList(Geocoders.TYPE)
|
23
|
+
}
|
24
|
+
*/
|
25
|
+
relationship(id) {
|
26
|
+
return (typeof id === 'string') ? { id, type: Geocoders.TYPE } : { id: id.id, type: Geocoders.TYPE };
|
27
|
+
}
|
28
|
+
type() {
|
29
|
+
return Geocoders.TYPE;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
Geocoders.TYPE = 'geocoders';
|
33
|
+
export default Geocoders;
|
@@ -0,0 +1,46 @@
|
|
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
|
+
import { Attachment } from './attachments';
|
9
|
+
declare type GiftCardRecipientRel = ResourceId & {
|
10
|
+
type: typeof GiftCardRecipients.TYPE;
|
11
|
+
};
|
12
|
+
declare type CustomerRel = ResourceId & {
|
13
|
+
type: 'customers';
|
14
|
+
};
|
15
|
+
interface GiftCardRecipient extends Resource {
|
16
|
+
email?: string;
|
17
|
+
first_name?: string;
|
18
|
+
last_name?: string;
|
19
|
+
customer?: Customer;
|
20
|
+
attachments?: Attachment[];
|
21
|
+
}
|
22
|
+
interface GiftCardRecipientCreate extends ResourceCreate {
|
23
|
+
email: string;
|
24
|
+
first_name?: string;
|
25
|
+
last_name?: string;
|
26
|
+
customer?: CustomerRel;
|
27
|
+
}
|
28
|
+
interface GiftCardRecipientUpdate extends ResourceUpdate {
|
29
|
+
email?: string;
|
30
|
+
first_name?: string;
|
31
|
+
last_name?: string;
|
32
|
+
customer?: CustomerRel;
|
33
|
+
}
|
34
|
+
declare class GiftCardRecipients extends ApiResource {
|
35
|
+
static readonly TYPE: 'gift_card_recipients';
|
36
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<GiftCardRecipient>>;
|
37
|
+
create(resource: GiftCardRecipientCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCardRecipient>;
|
38
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCardRecipient>;
|
39
|
+
update(resource: GiftCardRecipientUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCardRecipient>;
|
40
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
|
+
isGiftCardRecipient(resource: any): resource is GiftCardRecipient;
|
42
|
+
relationship(id: string | ResourceId): GiftCardRecipientRel;
|
43
|
+
type(): string;
|
44
|
+
}
|
45
|
+
export default GiftCardRecipients;
|
46
|
+
export { GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate };
|
@@ -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 GiftCardRecipients extends ApiResource {
|
7
|
+
// static readonly PATH = 'gift_card_recipients'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: GiftCardRecipients.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: GiftCardRecipients.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: GiftCardRecipients.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCardRecipients.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: GiftCardRecipients.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isGiftCardRecipient(resource) {
|
25
|
+
return resource.type && (resource.type === GiftCardRecipients.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(GiftCardRecipients.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(GiftCardRecipients.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: GiftCardRecipients.TYPE } : { id: id.id, type: GiftCardRecipients.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return GiftCardRecipients.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
GiftCardRecipients.TYPE = 'gift_card_recipients';
|
45
|
+
export default GiftCardRecipients;
|
@@ -0,0 +1,84 @@
|
|
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 { GiftCardRecipient } from './gift_card_recipients';
|
9
|
+
import { Attachment } from './attachments';
|
10
|
+
declare type GiftCardRel = ResourceId & {
|
11
|
+
type: typeof GiftCards.TYPE;
|
12
|
+
};
|
13
|
+
declare type MarketRel = ResourceId & {
|
14
|
+
type: 'markets';
|
15
|
+
};
|
16
|
+
declare type GiftCardRecipientRel = ResourceId & {
|
17
|
+
type: 'gift_card_recipients';
|
18
|
+
};
|
19
|
+
interface GiftCard extends Resource {
|
20
|
+
status?: string;
|
21
|
+
code?: string;
|
22
|
+
currency_code?: string;
|
23
|
+
initial_balance_cents?: number;
|
24
|
+
initial_balance_float?: number;
|
25
|
+
formatted_initial_balance?: string;
|
26
|
+
balance_cents?: number;
|
27
|
+
balance_float?: number;
|
28
|
+
formatted_balance?: string;
|
29
|
+
balance_max_cents?: string;
|
30
|
+
balance_max_float?: number;
|
31
|
+
formatted_balance_max?: string;
|
32
|
+
balance_log?: object[];
|
33
|
+
single_use?: boolean;
|
34
|
+
rechargeable?: boolean;
|
35
|
+
image_url?: string;
|
36
|
+
expires_at?: string;
|
37
|
+
recipient_email?: string;
|
38
|
+
_balance_change_cents?: number;
|
39
|
+
market?: Market;
|
40
|
+
gift_card_recipient?: GiftCardRecipient;
|
41
|
+
attachments?: Attachment[];
|
42
|
+
}
|
43
|
+
interface GiftCardCreate extends ResourceCreate {
|
44
|
+
code?: string;
|
45
|
+
currency_code: string;
|
46
|
+
balance_cents: number;
|
47
|
+
balance_max_cents?: string;
|
48
|
+
single_use?: boolean;
|
49
|
+
rechargeable?: boolean;
|
50
|
+
image_url?: string;
|
51
|
+
expires_at?: string;
|
52
|
+
recipient_email?: string;
|
53
|
+
market?: MarketRel;
|
54
|
+
gift_card_recipient?: GiftCardRecipientRel;
|
55
|
+
}
|
56
|
+
interface GiftCardUpdate extends ResourceUpdate {
|
57
|
+
currency_code?: string;
|
58
|
+
balance_cents?: number;
|
59
|
+
balance_max_cents?: string;
|
60
|
+
single_use?: boolean;
|
61
|
+
rechargeable?: boolean;
|
62
|
+
image_url?: string;
|
63
|
+
expires_at?: string;
|
64
|
+
recipient_email?: string;
|
65
|
+
_purchase?: boolean;
|
66
|
+
_activate?: boolean;
|
67
|
+
_deactivate?: boolean;
|
68
|
+
_balance_change_cents?: number;
|
69
|
+
market?: MarketRel;
|
70
|
+
gift_card_recipient?: GiftCardRecipientRel;
|
71
|
+
}
|
72
|
+
declare class GiftCards extends ApiResource {
|
73
|
+
static readonly TYPE: 'gift_cards';
|
74
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<GiftCard>>;
|
75
|
+
create(resource: GiftCardCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
76
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
77
|
+
update(resource: GiftCardUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
|
78
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
79
|
+
isGiftCard(resource: any): resource is GiftCard;
|
80
|
+
relationship(id: string | ResourceId): GiftCardRel;
|
81
|
+
type(): string;
|
82
|
+
}
|
83
|
+
export default GiftCards;
|
84
|
+
export { GiftCard, GiftCardCreate, GiftCardUpdate };
|
@@ -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 GiftCards extends ApiResource {
|
7
|
+
// static readonly PATH = 'gift_cards'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: GiftCards.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: GiftCards.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: GiftCards.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: GiftCards.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: GiftCards.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isGiftCard(resource) {
|
25
|
+
return resource.type && (resource.type === GiftCards.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(GiftCards.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(GiftCards.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: GiftCards.TYPE } : { id: id.id, type: GiftCards.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return GiftCards.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
GiftCards.TYPE = 'gift_cards';
|
45
|
+
export default GiftCards;
|
@@ -0,0 +1,37 @@
|
|
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 { Address } from './addresses';
|
8
|
+
import { Attachment } from './attachments';
|
9
|
+
declare type GoogleGeocoderRel = ResourceId & {
|
10
|
+
type: typeof GoogleGeocoders.TYPE;
|
11
|
+
};
|
12
|
+
interface GoogleGeocoder extends Resource {
|
13
|
+
name?: string;
|
14
|
+
addresses?: Address[];
|
15
|
+
attachments?: Attachment[];
|
16
|
+
}
|
17
|
+
interface GoogleGeocoderCreate extends ResourceCreate {
|
18
|
+
name: string;
|
19
|
+
api_key: string;
|
20
|
+
}
|
21
|
+
interface GoogleGeocoderUpdate extends ResourceUpdate {
|
22
|
+
name?: string;
|
23
|
+
api_key?: string;
|
24
|
+
}
|
25
|
+
declare class GoogleGeocoders extends ApiResource {
|
26
|
+
static readonly TYPE: 'google_geocoders';
|
27
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<GoogleGeocoder>>;
|
28
|
+
create(resource: GoogleGeocoderCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GoogleGeocoder>;
|
29
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GoogleGeocoder>;
|
30
|
+
update(resource: GoogleGeocoderUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GoogleGeocoder>;
|
31
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
32
|
+
isGoogleGeocoder(resource: any): resource is GoogleGeocoder;
|
33
|
+
relationship(id: string | ResourceId): GoogleGeocoderRel;
|
34
|
+
type(): string;
|
35
|
+
}
|
36
|
+
export default GoogleGeocoders;
|
37
|
+
export { GoogleGeocoder, GoogleGeocoderCreate, GoogleGeocoderUpdate };
|
@@ -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 GoogleGeocoders extends ApiResource {
|
7
|
+
// static readonly PATH = 'google_geocoders'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: GoogleGeocoders.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: GoogleGeocoders.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: GoogleGeocoders.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: GoogleGeocoders.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: GoogleGeocoders.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isGoogleGeocoder(resource) {
|
25
|
+
return resource.type && (resource.type === GoogleGeocoders.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(GoogleGeocoders.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(GoogleGeocoders.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: GoogleGeocoders.TYPE } : { id: id.id, type: GoogleGeocoders.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return GoogleGeocoders.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
GoogleGeocoders.TYPE = 'google_geocoders';
|
45
|
+
export default GoogleGeocoders;
|
@@ -0,0 +1,44 @@
|
|
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, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
declare type ImportRel = ResourceId & {
|
8
|
+
type: typeof Imports.TYPE;
|
9
|
+
};
|
10
|
+
interface Import extends Resource {
|
11
|
+
resource_type?: string;
|
12
|
+
parent_resource_id?: string;
|
13
|
+
status?: string;
|
14
|
+
started_at?: string;
|
15
|
+
completed_at?: string;
|
16
|
+
interrupted_at?: string;
|
17
|
+
inputs?: object[];
|
18
|
+
inputs_size?: number;
|
19
|
+
errors_count?: number;
|
20
|
+
warnings_count?: number;
|
21
|
+
destroyed_count?: number;
|
22
|
+
processed_count?: number;
|
23
|
+
errors_log?: object;
|
24
|
+
warnings_log?: object;
|
25
|
+
cleanup_records?: boolean;
|
26
|
+
}
|
27
|
+
interface ImportCreate extends ResourceCreate {
|
28
|
+
resource_type: string;
|
29
|
+
parent_resource_id?: string;
|
30
|
+
inputs: object[];
|
31
|
+
cleanup_records?: boolean;
|
32
|
+
}
|
33
|
+
declare class Imports extends ApiResource {
|
34
|
+
static readonly TYPE: 'imports';
|
35
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Import>>;
|
36
|
+
create(resource: ImportCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Import>;
|
37
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Import>;
|
38
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
+
isImport(resource: any): resource is Import;
|
40
|
+
relationship(id: string | ResourceId): ImportRel;
|
41
|
+
type(): string;
|
42
|
+
}
|
43
|
+
export default Imports;
|
44
|
+
export { Import, ImportCreate };
|
@@ -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 } from '../resource';
|
6
|
+
class Imports extends ApiResource {
|
7
|
+
// static readonly PATH = 'imports'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: Imports.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: Imports.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: Imports.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async delete(id, options) {
|
18
|
+
await this.resources.delete({ type: Imports.TYPE, id }, options);
|
19
|
+
}
|
20
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
21
|
+
isImport(resource) {
|
22
|
+
return resource.type && (resource.type === Imports.TYPE);
|
23
|
+
}
|
24
|
+
/*
|
25
|
+
filter(): QueryBuilderRetrieve {
|
26
|
+
return new QueryBuilderRetrieve(Imports.TYPE)
|
27
|
+
}
|
28
|
+
*/
|
29
|
+
/*
|
30
|
+
filterList(): QueryBuilderList {
|
31
|
+
return new QueryBuilderList(Imports.TYPE)
|
32
|
+
}
|
33
|
+
*/
|
34
|
+
relationship(id) {
|
35
|
+
return (typeof id === 'string') ? { id, type: Imports.TYPE } : { id: id.id, type: Imports.TYPE };
|
36
|
+
}
|
37
|
+
type() {
|
38
|
+
return Imports.TYPE;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
Imports.TYPE = 'imports';
|
42
|
+
export default Imports;
|
@@ -0,0 +1,60 @@
|
|
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 { Customer } from './customers';
|
9
|
+
import { Sku } from './skus';
|
10
|
+
declare type InStockSubscriptionRel = ResourceId & {
|
11
|
+
type: typeof InStockSubscriptions.TYPE;
|
12
|
+
};
|
13
|
+
declare type MarketRel = ResourceId & {
|
14
|
+
type: 'markets';
|
15
|
+
};
|
16
|
+
declare type CustomerRel = ResourceId & {
|
17
|
+
type: 'customers';
|
18
|
+
};
|
19
|
+
declare type SkuRel = ResourceId & {
|
20
|
+
type: 'skus';
|
21
|
+
};
|
22
|
+
interface InStockSubscription extends Resource {
|
23
|
+
status?: string;
|
24
|
+
customer_email?: string;
|
25
|
+
sku_code?: string;
|
26
|
+
stock_threshold?: number;
|
27
|
+
market?: Market;
|
28
|
+
customer?: Customer;
|
29
|
+
sku?: Sku;
|
30
|
+
}
|
31
|
+
interface InStockSubscriptionCreate extends ResourceCreate {
|
32
|
+
customer_email?: string;
|
33
|
+
sku_code?: string;
|
34
|
+
stock_threshold?: number;
|
35
|
+
market?: MarketRel;
|
36
|
+
customer?: CustomerRel;
|
37
|
+
sku?: SkuRel;
|
38
|
+
}
|
39
|
+
interface InStockSubscriptionUpdate extends ResourceUpdate {
|
40
|
+
sku_code?: string;
|
41
|
+
stock_threshold?: number;
|
42
|
+
_activate?: boolean;
|
43
|
+
_deactivate?: boolean;
|
44
|
+
market?: MarketRel;
|
45
|
+
customer?: CustomerRel;
|
46
|
+
sku?: SkuRel;
|
47
|
+
}
|
48
|
+
declare class InStockSubscriptions extends ApiResource {
|
49
|
+
static readonly TYPE: 'in_stock_subscriptions';
|
50
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InStockSubscription>>;
|
51
|
+
create(resource: InStockSubscriptionCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
|
52
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
|
53
|
+
update(resource: InStockSubscriptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
|
54
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
55
|
+
isInStockSubscription(resource: any): resource is InStockSubscription;
|
56
|
+
relationship(id: string | ResourceId): InStockSubscriptionRel;
|
57
|
+
type(): string;
|
58
|
+
}
|
59
|
+
export default InStockSubscriptions;
|
60
|
+
export { InStockSubscription, InStockSubscriptionCreate, InStockSubscriptionUpdate };
|
@@ -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 InStockSubscriptions extends ApiResource {
|
7
|
+
// static readonly PATH = 'in_stock_subscriptions'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: InStockSubscriptions.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: InStockSubscriptions.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: InStockSubscriptions.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InStockSubscriptions.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: InStockSubscriptions.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isInStockSubscription(resource) {
|
25
|
+
return resource.type && (resource.type === InStockSubscriptions.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(InStockSubscriptions.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(InStockSubscriptions.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: InStockSubscriptions.TYPE } : { id: id.id, type: InStockSubscriptions.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return InStockSubscriptions.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
InStockSubscriptions.TYPE = 'in_stock_subscriptions';
|
45
|
+
export default InStockSubscriptions;
|
@@ -0,0 +1,43 @@
|
|
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 { InventoryStockLocation } from './inventory_stock_locations';
|
8
|
+
import { InventoryReturnLocation } from './inventory_return_locations';
|
9
|
+
import { Attachment } from './attachments';
|
10
|
+
declare type InventoryModelRel = ResourceId & {
|
11
|
+
type: typeof InventoryModels.TYPE;
|
12
|
+
};
|
13
|
+
interface InventoryModel extends Resource {
|
14
|
+
name?: string;
|
15
|
+
strategy?: string;
|
16
|
+
stock_locations_cutoff?: number;
|
17
|
+
inventory_stock_locations?: InventoryStockLocation[];
|
18
|
+
inventory_return_locations?: InventoryReturnLocation[];
|
19
|
+
attachments?: Attachment[];
|
20
|
+
}
|
21
|
+
interface InventoryModelCreate extends ResourceCreate {
|
22
|
+
name: string;
|
23
|
+
strategy: string;
|
24
|
+
stock_locations_cutoff?: number;
|
25
|
+
}
|
26
|
+
interface InventoryModelUpdate extends ResourceUpdate {
|
27
|
+
name?: string;
|
28
|
+
strategy?: string;
|
29
|
+
stock_locations_cutoff?: number;
|
30
|
+
}
|
31
|
+
declare class InventoryModels extends ApiResource {
|
32
|
+
static readonly TYPE: 'inventory_models';
|
33
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryModel>>;
|
34
|
+
create(resource: InventoryModelCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
35
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
36
|
+
update(resource: InventoryModelUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InventoryModel>;
|
37
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
38
|
+
isInventoryModel(resource: any): resource is InventoryModel;
|
39
|
+
relationship(id: string | ResourceId): InventoryModelRel;
|
40
|
+
type(): string;
|
41
|
+
}
|
42
|
+
export default InventoryModels;
|
43
|
+
export { InventoryModel, InventoryModelCreate, InventoryModelUpdate };
|
@@ -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 InventoryModels extends ApiResource {
|
7
|
+
// static readonly PATH = 'inventory_models'
|
8
|
+
async list(params, options) {
|
9
|
+
return this.resources.list({ type: InventoryModels.TYPE }, params, options);
|
10
|
+
}
|
11
|
+
async create(resource, params, options) {
|
12
|
+
return this.resources.create(Object.assign(Object.assign({}, resource), { type: InventoryModels.TYPE }), params, options);
|
13
|
+
}
|
14
|
+
async retrieve(id, params, options) {
|
15
|
+
return this.resources.retrieve({ type: InventoryModels.TYPE, id }, params, options);
|
16
|
+
}
|
17
|
+
async update(resource, params, options) {
|
18
|
+
return this.resources.update(Object.assign(Object.assign({}, resource), { type: InventoryModels.TYPE }), params, options);
|
19
|
+
}
|
20
|
+
async delete(id, options) {
|
21
|
+
await this.resources.delete({ type: InventoryModels.TYPE, id }, options);
|
22
|
+
}
|
23
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
|
24
|
+
isInventoryModel(resource) {
|
25
|
+
return resource.type && (resource.type === InventoryModels.TYPE);
|
26
|
+
}
|
27
|
+
/*
|
28
|
+
filter(): QueryBuilderRetrieve {
|
29
|
+
return new QueryBuilderRetrieve(InventoryModels.TYPE)
|
30
|
+
}
|
31
|
+
*/
|
32
|
+
/*
|
33
|
+
filterList(): QueryBuilderList {
|
34
|
+
return new QueryBuilderList(InventoryModels.TYPE)
|
35
|
+
}
|
36
|
+
*/
|
37
|
+
relationship(id) {
|
38
|
+
return (typeof id === 'string') ? { id, type: InventoryModels.TYPE } : { id: id.id, type: InventoryModels.TYPE };
|
39
|
+
}
|
40
|
+
type() {
|
41
|
+
return InventoryModels.TYPE;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
InventoryModels.TYPE = 'inventory_models';
|
45
|
+
export default InventoryModels;
|