@commercelayer/sdk 2.3.13 → 3.1.0
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/cjs/api.d.ts +1 -1
- package/lib/cjs/client.d.ts +1 -1
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.d.ts +1 -0
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +1 -1
- package/lib/cjs/error.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/jsonapi.d.ts +0 -2
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +2 -2
- package/lib/cjs/query.d.ts +3 -37
- package/lib/cjs/query.js +1 -1
- package/lib/cjs/resource.d.ts +1 -1
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/addresses.d.ts +0 -4
- package/lib/cjs/resources/adjustments.d.ts +0 -4
- package/lib/cjs/resources/adyen_gateways.d.ts +0 -4
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/adyen_payments.d.ts +1 -6
- package/lib/cjs/resources/adyen_payments.js +1 -1
- package/lib/cjs/resources/application.d.ts +0 -4
- package/lib/cjs/resources/attachments.d.ts +1 -5
- package/lib/cjs/resources/authorizations.d.ts +0 -4
- package/lib/cjs/resources/avalara_accounts.d.ts +0 -4
- package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -5
- package/lib/cjs/resources/bing_geocoders.d.ts +0 -4
- package/lib/cjs/resources/braintree_gateways.d.ts +0 -4
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/braintree_payments.d.ts +1 -5
- package/lib/cjs/resources/braintree_payments.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +1 -5
- package/lib/cjs/resources/captures.d.ts +0 -4
- package/lib/cjs/resources/carrier_accounts.d.ts +0 -4
- package/lib/cjs/resources/checkout_com_gateways.d.ts +0 -4
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/checkout_com_payments.d.ts +1 -6
- package/lib/cjs/resources/checkout_com_payments.js +1 -1
- package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -5
- package/lib/cjs/resources/coupon_recipients.d.ts +0 -4
- package/lib/cjs/resources/coupons.d.ts +4 -5
- package/lib/cjs/resources/customer_addresses.d.ts +2 -6
- package/lib/cjs/resources/customer_groups.d.ts +0 -4
- package/lib/cjs/resources/customer_password_resets.d.ts +0 -4
- package/lib/cjs/resources/customer_payment_sources.d.ts +2 -6
- package/lib/cjs/resources/customer_subscriptions.d.ts +0 -4
- package/lib/cjs/resources/customers.d.ts +0 -4
- package/lib/cjs/resources/delivery_lead_times.d.ts +2 -6
- package/lib/cjs/resources/delivery_lead_times.js +1 -1
- package/lib/cjs/resources/event_callbacks.d.ts +0 -4
- package/lib/cjs/resources/external_gateways.d.ts +0 -4
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_payments.d.ts +1 -5
- package/lib/cjs/resources/external_payments.js +1 -1
- package/lib/cjs/resources/external_promotions.d.ts +0 -4
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.d.ts +0 -4
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -4
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -5
- package/lib/cjs/resources/free_gift_promotions.d.ts +1 -5
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/free_shipping_promotions.d.ts +0 -4
- package/lib/cjs/resources/geocoders.d.ts +2 -5
- package/lib/cjs/resources/geocoders.js +1 -1
- package/lib/cjs/resources/gift_card_recipients.d.ts +0 -4
- package/lib/cjs/resources/gift_card_recipients.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +0 -4
- package/lib/cjs/resources/google_geocoders.d.ts +0 -4
- package/lib/cjs/resources/imports.d.ts +0 -4
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -7
- package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
- package/lib/cjs/resources/inventory_models.d.ts +0 -4
- package/lib/cjs/resources/inventory_return_locations.d.ts +2 -6
- package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -6
- package/lib/cjs/resources/line_item_options.d.ts +2 -6
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/line_items.d.ts +1 -5
- package/lib/cjs/resources/line_items.js +1 -1
- package/lib/cjs/resources/manual_gateways.d.ts +0 -4
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/manual_tax_calculators.d.ts +0 -4
- package/lib/cjs/resources/markets.d.ts +3 -7
- package/lib/cjs/resources/merchants.d.ts +1 -5
- package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -5
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
- package/lib/cjs/resources/order_copies.d.ts +1 -5
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -5
- package/lib/cjs/resources/order_validation_rules.d.ts +2 -5
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +0 -4
- package/lib/cjs/resources/organization.d.ts +0 -4
- package/lib/cjs/resources/organization.js +1 -1
- package/lib/cjs/resources/packages.d.ts +1 -5
- package/lib/cjs/resources/parcel_line_items.d.ts +2 -6
- package/lib/cjs/resources/parcels.d.ts +2 -6
- package/lib/cjs/resources/payment_gateways.d.ts +2 -15
- package/lib/cjs/resources/payment_gateways.js +1 -1
- package/lib/cjs/resources/payment_methods.d.ts +5 -6
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.d.ts +0 -4
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/paypal_payments.d.ts +1 -5
- package/lib/cjs/resources/paypal_payments.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -4
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/price_lists.d.ts +0 -4
- package/lib/cjs/resources/prices.d.ts +1 -5
- package/lib/cjs/resources/promotion_rules.d.ts +2 -5
- package/lib/cjs/resources/promotion_rules.js +1 -1
- package/lib/cjs/resources/promotions.d.ts +2 -5
- package/lib/cjs/resources/promotions.js +1 -1
- package/lib/cjs/resources/refunds.d.ts +0 -4
- package/lib/cjs/resources/return_line_items.d.ts +2 -6
- package/lib/cjs/resources/return_line_items.js +1 -1
- package/lib/cjs/resources/returns.d.ts +1 -5
- package/lib/cjs/resources/shipments.d.ts +0 -4
- package/lib/cjs/resources/shipping_categories.d.ts +0 -4
- package/lib/cjs/resources/shipping_methods.d.ts +3 -7
- package/lib/cjs/resources/shipping_methods.js +1 -1
- package/lib/cjs/resources/shipping_zones.d.ts +0 -4
- package/lib/cjs/resources/sku_list_items.d.ts +7 -8
- package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -5
- package/lib/cjs/resources/sku_lists.d.ts +0 -4
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.d.ts +1 -5
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/skus.d.ts +1 -5
- package/lib/cjs/resources/stock_items.d.ts +1 -5
- package/lib/cjs/resources/stock_line_items.d.ts +0 -4
- package/lib/cjs/resources/stock_locations.d.ts +1 -5
- package/lib/cjs/resources/stock_transfers.d.ts +3 -7
- package/lib/cjs/resources/stripe_gateways.d.ts +0 -4
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/stripe_payments.d.ts +1 -5
- package/lib/cjs/resources/stripe_payments.js +1 -1
- package/lib/cjs/resources/tax_calculators.d.ts +2 -5
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/resources/tax_categories.d.ts +2 -6
- package/lib/cjs/resources/tax_rules.d.ts +1 -5
- package/lib/cjs/resources/taxjar_accounts.d.ts +0 -4
- package/lib/cjs/resources/transactions.d.ts +2 -5
- package/lib/cjs/resources/transactions.js +1 -1
- package/lib/cjs/resources/voids.d.ts +0 -4
- package/lib/cjs/resources/webhooks.d.ts +0 -4
- package/lib/cjs/resources/wire_transfers.d.ts +1 -5
- package/lib/cjs/static.js +1 -1
- package/lib/esm/api.d.ts +1 -1
- package/lib/esm/client.d.ts +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +1 -0
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +1 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/jsonapi.d.ts +0 -2
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +2 -2
- package/lib/esm/query.d.ts +3 -37
- package/lib/esm/query.js +1 -1
- package/lib/esm/resource.d.ts +1 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.d.ts +0 -4
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.d.ts +0 -4
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.d.ts +0 -4
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/adyen_payments.d.ts +1 -6
- package/lib/esm/resources/adyen_payments.js +1 -1
- package/lib/esm/resources/application.d.ts +0 -4
- package/lib/esm/resources/application.js +1 -1
- package/lib/esm/resources/attachments.d.ts +1 -5
- package/lib/esm/resources/attachments.js +1 -1
- package/lib/esm/resources/authorizations.d.ts +0 -4
- package/lib/esm/resources/authorizations.js +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +0 -4
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -5
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.d.ts +0 -4
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.d.ts +0 -4
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/braintree_payments.d.ts +1 -5
- package/lib/esm/resources/braintree_payments.js +1 -1
- package/lib/esm/resources/bundles.d.ts +1 -5
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/captures.d.ts +0 -4
- package/lib/esm/resources/captures.js +1 -1
- package/lib/esm/resources/carrier_accounts.d.ts +0 -4
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.d.ts +0 -4
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/checkout_com_payments.d.ts +1 -6
- package/lib/esm/resources/checkout_com_payments.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -5
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupon_recipients.d.ts +0 -4
- package/lib/esm/resources/coupon_recipients.js +1 -1
- package/lib/esm/resources/coupons.d.ts +4 -5
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +2 -6
- package/lib/esm/resources/customer_addresses.js +1 -1
- package/lib/esm/resources/customer_groups.d.ts +0 -4
- package/lib/esm/resources/customer_groups.js +1 -1
- package/lib/esm/resources/customer_password_resets.d.ts +0 -4
- package/lib/esm/resources/customer_password_resets.js +1 -1
- package/lib/esm/resources/customer_payment_sources.d.ts +2 -6
- package/lib/esm/resources/customer_payment_sources.js +1 -1
- package/lib/esm/resources/customer_subscriptions.d.ts +0 -4
- package/lib/esm/resources/customer_subscriptions.js +1 -1
- package/lib/esm/resources/customers.d.ts +0 -4
- package/lib/esm/resources/customers.js +1 -1
- package/lib/esm/resources/delivery_lead_times.d.ts +2 -6
- package/lib/esm/resources/delivery_lead_times.js +1 -1
- package/lib/esm/resources/event_callbacks.d.ts +0 -4
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/external_gateways.d.ts +0 -4
- package/lib/esm/resources/external_payments.d.ts +1 -5
- package/lib/esm/resources/external_promotions.d.ts +0 -4
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.d.ts +0 -4
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.d.ts +0 -4
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.d.ts +1 -5
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.d.ts +1 -5
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.d.ts +0 -4
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.d.ts +2 -5
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_card_recipients.d.ts +0 -4
- package/lib/esm/resources/gift_card_recipients.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +0 -4
- package/lib/esm/resources/gift_cards.js +1 -1
- package/lib/esm/resources/google_geocoders.d.ts +0 -4
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/imports.d.ts +0 -4
- package/lib/esm/resources/imports.js +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -7
- package/lib/esm/resources/in_stock_subscriptions.js +1 -1
- package/lib/esm/resources/inventory_models.d.ts +0 -4
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.d.ts +2 -6
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.d.ts +2 -6
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/line_item_options.d.ts +2 -6
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/line_items.d.ts +1 -5
- package/lib/esm/resources/line_items.js +1 -1
- package/lib/esm/resources/manual_gateways.d.ts +0 -4
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.d.ts +0 -4
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.d.ts +3 -7
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.d.ts +1 -5
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -5
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +1 -5
- package/lib/esm/resources/order_copies.js +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +1 -5
- package/lib/esm/resources/order_subscriptions.js +1 -1
- package/lib/esm/resources/order_validation_rules.d.ts +2 -5
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +0 -4
- package/lib/esm/resources/orders.js +1 -1
- package/lib/esm/resources/organization.d.ts +0 -4
- package/lib/esm/resources/organization.js +1 -1
- package/lib/esm/resources/packages.d.ts +1 -5
- package/lib/esm/resources/packages.js +1 -1
- package/lib/esm/resources/parcel_line_items.d.ts +2 -6
- package/lib/esm/resources/parcel_line_items.js +1 -1
- package/lib/esm/resources/parcels.d.ts +2 -6
- package/lib/esm/resources/parcels.js +1 -1
- package/lib/esm/resources/payment_gateways.d.ts +2 -15
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.d.ts +5 -6
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.d.ts +0 -4
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/paypal_payments.d.ts +1 -5
- package/lib/esm/resources/paypal_payments.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.d.ts +0 -4
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_lists.d.ts +0 -4
- package/lib/esm/resources/price_lists.js +1 -1
- package/lib/esm/resources/prices.d.ts +1 -5
- package/lib/esm/resources/prices.js +1 -1
- package/lib/esm/resources/promotion_rules.d.ts +2 -5
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.d.ts +2 -5
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +0 -4
- package/lib/esm/resources/refunds.js +1 -1
- package/lib/esm/resources/return_line_items.d.ts +2 -6
- package/lib/esm/resources/return_line_items.js +1 -1
- package/lib/esm/resources/returns.d.ts +1 -5
- package/lib/esm/resources/returns.js +1 -1
- package/lib/esm/resources/shipments.d.ts +0 -4
- package/lib/esm/resources/shipments.js +1 -1
- package/lib/esm/resources/shipping_categories.d.ts +0 -4
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_methods.d.ts +3 -7
- package/lib/esm/resources/shipping_methods.js +1 -1
- package/lib/esm/resources/shipping_zones.d.ts +0 -4
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.d.ts +7 -8
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -5
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.d.ts +0 -4
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.d.ts +1 -5
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/skus.d.ts +1 -5
- package/lib/esm/resources/skus.js +1 -1
- package/lib/esm/resources/stock_items.d.ts +1 -5
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_line_items.d.ts +0 -4
- package/lib/esm/resources/stock_line_items.js +1 -1
- package/lib/esm/resources/stock_locations.d.ts +1 -5
- package/lib/esm/resources/stock_locations.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +3 -7
- package/lib/esm/resources/stock_transfers.js +1 -1
- package/lib/esm/resources/stripe_gateways.d.ts +0 -4
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/stripe_payments.d.ts +1 -5
- package/lib/esm/resources/stripe_payments.js +1 -1
- package/lib/esm/resources/tax_calculators.d.ts +2 -5
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.d.ts +2 -6
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.d.ts +1 -5
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.d.ts +0 -4
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/transactions.d.ts +2 -5
- package/lib/esm/resources/transactions.js +1 -1
- package/lib/esm/resources/voids.d.ts +0 -4
- package/lib/esm/resources/voids.js +1 -1
- package/lib/esm/resources/webhooks.d.ts +0 -4
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/resources/wire_transfers.d.ts +1 -5
- package/lib/esm/resources/wire_transfers.js +1 -1
- package/lib/esm/static.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -14
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Sku } from './skus';
|
@@ -38,9 +34,9 @@ interface StockTransfer extends Resource {
|
|
38
34
|
interface StockTransferCreate extends ResourceCreate {
|
39
35
|
sku_code?: string;
|
40
36
|
quantity: number;
|
41
|
-
sku
|
42
|
-
origin_stock_location
|
43
|
-
destination_stock_location
|
37
|
+
sku: SkuRel;
|
38
|
+
origin_stock_location: StockLocationRel;
|
39
|
+
destination_stock_location: StockLocationRel;
|
44
40
|
shipment?: ShipmentRel;
|
45
41
|
line_item?: LineItemRel;
|
46
42
|
}
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PaymentMethod } from './payment_methods';
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:StripeGateways.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -22,7 +18,7 @@ interface StripePayment extends Resource {
|
|
22
18
|
}
|
23
19
|
interface StripePaymentCreate extends ResourceCreate {
|
24
20
|
options?: object;
|
25
|
-
order
|
21
|
+
order: OrderRel;
|
26
22
|
}
|
27
23
|
interface StripePaymentUpdate extends ResourceUpdate {
|
28
24
|
options?: object;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
|
@@ -1,9 +1,5 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
2
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { TaxCategory } from './tax_categories';
|
8
4
|
import { Market } from './markets';
|
9
5
|
import { Attachment } from './attachments';
|
@@ -19,6 +15,7 @@ interface TaxCalculator extends Resource {
|
|
19
15
|
declare class TaxCalculators extends ApiResource {
|
20
16
|
static readonly TYPE: 'tax_calculators';
|
21
17
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
|
18
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
|
22
19
|
isTaxCalculator(resource: any): resource is TaxCalculator;
|
23
20
|
relationship(id: string | ResourceId): TaxCalculatorRel;
|
24
21
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Sku } from './skus';
|
@@ -38,8 +34,8 @@ interface TaxCategory extends Resource {
|
|
38
34
|
interface TaxCategoryCreate extends ResourceCreate {
|
39
35
|
code: string;
|
40
36
|
sku_code?: string;
|
41
|
-
sku
|
42
|
-
tax_calculator
|
37
|
+
sku: SkuRel;
|
38
|
+
tax_calculator: AvalaraAccountRel | TaxjarAccountRel | ManualTaxCalculatorRel | ExternalTaxCalculatorRel;
|
43
39
|
}
|
44
40
|
interface TaxCategoryUpdate extends ResourceUpdate {
|
45
41
|
code?: string;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { ManualTaxCalculator } from './manual_tax_calculators';
|
@@ -40,7 +36,7 @@ interface TaxRuleCreate extends ResourceCreate {
|
|
40
36
|
payment_method_taxable?: boolean;
|
41
37
|
gift_card_taxable?: boolean;
|
42
38
|
adjustment_taxable?: boolean;
|
43
|
-
manual_tax_calculator
|
39
|
+
manual_tax_calculator: ManualTaxCalculatorRel;
|
44
40
|
}
|
45
41
|
interface TaxRuleUpdate extends ResourceUpdate {
|
46
42
|
name?: string;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { TaxCategory } from './tax_categories';
|
@@ -1,9 +1,5 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
2
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
8
4
|
declare type TransactionRel = ResourceId & {
|
9
5
|
type: typeof Transactions.TYPE;
|
@@ -25,6 +21,7 @@ interface Transaction extends Resource {
|
|
25
21
|
declare class Transactions extends ApiResource {
|
26
22
|
static readonly TYPE: 'transactions';
|
27
23
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
|
24
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
|
28
25
|
isTransaction(resource: any): resource is Transaction;
|
29
26
|
relationship(id: string | ResourceId): TransactionRel;
|
30
27
|
type(): string;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Transactions.TYPE},e,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Transactions.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:Transactions.TYPE,id:e},t,r)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { EventCallback } from './event_callbacks';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -15,7 +11,7 @@ interface WireTransfer extends Resource {
|
|
15
11
|
order?: Order;
|
16
12
|
}
|
17
13
|
interface WireTransferCreate extends ResourceCreate {
|
18
|
-
order
|
14
|
+
order: OrderRel;
|
19
15
|
}
|
20
16
|
interface WireTransferUpdate extends ResourceUpdate {
|
21
17
|
order?: OrderRel;
|
package/lib/cjs/static.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&__createBinding(r,e,t);return __setModuleDefault(r,e),r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
|
package/lib/esm/api.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
*
|
3
|
+
* OpenAPI schema, version 2.7.6
|
4
4
|
**/
|
5
5
|
export { default as Addresses } from './resources/addresses';
|
6
6
|
export { default as Adjustments } from './resources/adjustments';
|
package/lib/esm/client.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Method } from 'axios';
|
2
|
-
import { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
2
|
+
import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
|
3
3
|
import type { InterceptorManager } from './interceptor';
|
4
4
|
declare type RequestConfig = {
|
5
5
|
timeout?: number;
|
package/lib/esm/client.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var l=this&&this.__classPrivateFieldSet||function(t,e,a,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(t,a):r?r.value=a:e.set(t,a),a},c=this&&this.__classPrivateFieldGet||function(t,e,a,s){if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?s:a==="a"?s.call(t):s?s.value:e.get(t)},n,i;import u from"axios";import{SdkError as T,ApiError as y,ErrorType as o}from"./error";import h from"./config";const f=(t,e)=>`https://${t.toLowerCase()}.${e||h.default.domain}/api`,b=t=>{let e=new T({message:t.message,type:o.GENERIC});if(u.isAxiosError(t))if(t.response){const a=new y(e);a.type=o.RESPONSE,a.status=t.response.status,a.code=String(a.status),a.errors=t.response.data.errors,e=a}else t.request?(e.type=o.REQUEST,e.request=t.request):e.type=o.CLIENT;else u.isCancel(t)?e.type=o.CANCEL:e.source=t;throw e};class m{constructor(e){n.set(this,void 0),i.set(this,void 0),this.baseUrl=f(e.organization,e.domain),l(this,n,e.accessToken,"f");const a={timeout:e.timeout||h.client.timeout};l(this,i,u.create(Object.assign({baseURL:this.baseUrl,timeout:h.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+c(this,n,"f")}},a)),"f"),this.interceptors=c(this,i,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new m(e)}config(e){const a=c(this,i,"f").defaults;e.timeout&&(a.timeout=e.timeout),e.organization&&(this.baseUrl=f(e.organization,e.domain)),e.accessToken&&l(this,n,e.accessToken,"f")}async request(e,a,s,r){const w=s?{data:s}:void 0,p=a,E=(r==null?void 0:r.organization)?f(r.organization,r.domain):void 0,v=(r==null?void 0:r.accessToken)?{Authorization:"Bearer "+r.accessToken}:void 0;return c(this,i,"f").request(Object.assign({method:e,baseURL:E,url:p,data:w,headers:v},r)).then(d=>d.data).catch(d=>b(d))}}n=new WeakMap,i=new WeakMap;export default m;
|
@@ -7,6 +7,7 @@ declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
7
7
|
declare type CommerceLayerConfig = SdkConfig & ResourcesConfig;
|
8
8
|
declare class CommerceLayerClient {
|
9
9
|
#private;
|
10
|
+
static get openApiSchemaVersion(): string;
|
10
11
|
addresses: api.Addresses;
|
11
12
|
adjustments: api.Adjustments;
|
12
13
|
adyen_gateways: api.AdyenGateways;
|
package/lib/esm/commercelayer.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as
|
1
|
+
var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as w}from"./static";import f from"./resource";const u="2.7.6";class p{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new f(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}static get openApiSchemaVersion(){return u}get currentOrganization(){return s(this,h,"f")}config(i){!i||(i.organization&&c(this,h,i.organization,"f"),s(this,t,"f").config(i))}resources(){return w.resources()}isApiError(i){return w.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const m=o=>new p(o);export default m;
|
package/lib/esm/common.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
import{resourceList as p}from"./api";const e=t=>t&&t.type&&t.id&&p.includes(t.type),i=t=>t&&typeof t.type!="undefined"&&t.type&&p.includes(t.type);export{e as isResourceId,i as isResourceType};
|
package/lib/esm/error.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var e;(function(t){t.CLIENT="client",t.REQUEST="request",t.RESPONSE="response",t.GENERIC="generic",t.CANCEL="cancel"})(e||(e={}));class r extends Error{constructor(s){super(s.message);this.name=this.constructor.name,this.type=s.type||e.GENERIC}static isSdkError(s){return s&&["SdkError","ApiError"].includes(s.name)&&Object.values(e).includes(s.type)}}class n extends r{constructor(s){super(Object.assign(Object.assign({},s),{type:e.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(s){return r.isSdkError(s)&&s.name==="ApiError"&&s.type===e.RESPONSE}first(){var s;return((s=this.errors)===null||s===void 0?void 0:s.length)>0?this.errors[0]:void 0}}export{r as SdkError,n as ApiError,e as ErrorType};
|
package/lib/esm/jsonapi.d.ts
CHANGED
@@ -1,7 +1,5 @@
|
|
1
|
-
import { Value } from 'json-typescript';
|
2
1
|
import { DocWithData, ResourceObject } from 'jsonapi-typescript';
|
3
2
|
import type { ResourceCreate, ResourceUpdate, ResourceId, ResourceType, Resource } from './resource';
|
4
|
-
export type { DocWithData, Value as JSONValue };
|
5
3
|
declare const denormalize: <R extends Resource>(response: DocWithData) => R | R[];
|
6
4
|
declare const normalize: (resource: (ResourceCreate & ResourceType) | (ResourceUpdate & ResourceId)) => ResourceObject;
|
7
5
|
export { denormalize, normalize };
|
package/lib/esm/jsonapi.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{isResourceId as
|
1
|
+
import{isResourceId as r}from"./common";const d=t=>{let i;t.links&&delete t.links;const e=t.data,n=t.included;return Array.isArray(e)?i=e.map(a=>o(a,n)):i=o(e,n),i},l=(t,i=[])=>i.find(n=>t.id===n.id&&t.type===n.type)||t,o=(t,i)=>{const e=Object.assign({id:t.id,type:t.type},t.attributes);return t.relationships&&Object.keys(t.relationships).forEach(n=>{const a=t.relationships[n].data;a?Array.isArray(a)?e[n]=a.map(s=>o(l(s,i),i)):e[n]=o(l(a,i),i):a===null&&(e[n]=null)}),e},c=t=>{const i={},e={};for(const a in t){if(["type","id"].includes(a))continue;const s=t[a];s&&(r(s)||Array.isArray(s)&&r(s[0]))?e[a]={data:s}:i[a]=s}const n={type:t.type,attributes:i,relationships:e};return r(t)&&(n.id=t.id),n};export{d as denormalize,c as normalize};
|
package/lib/esm/model.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
*
|
3
|
+
* OpenAPI schema, version 2.7.6
|
4
4
|
**/
|
5
5
|
export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
|
6
6
|
export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
|
@@ -62,7 +62,7 @@ export type { Organization } from './resources/organization';
|
|
62
62
|
export type { Package, PackageCreate, PackageUpdate } from './resources/packages';
|
63
63
|
export type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate } from './resources/parcel_line_items';
|
64
64
|
export type { Parcel, ParcelCreate, ParcelUpdate } from './resources/parcels';
|
65
|
-
export type { PaymentGateway
|
65
|
+
export type { PaymentGateway } from './resources/payment_gateways';
|
66
66
|
export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './resources/payment_methods';
|
67
67
|
export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
|
68
68
|
export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
|
package/lib/esm/query.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
+
import { ResourceType } from "./resource";
|
1
2
|
interface QueryParamsRetrieve {
|
2
3
|
include?: string[];
|
3
|
-
fields?: {
|
4
|
+
fields?: string[] | {
|
4
5
|
[key: string]: string[];
|
5
6
|
};
|
6
7
|
}
|
@@ -16,42 +17,7 @@ interface QueryParamsList extends QueryParamsRetrieve {
|
|
16
17
|
}
|
17
18
|
declare type QueryParams = QueryParamsRetrieve | QueryParamsList;
|
18
19
|
export { QueryParamsRetrieve, QueryParamsList, QueryParams };
|
19
|
-
declare
|
20
|
-
declare class QueryBuilderRetrieve {
|
21
|
-
#private;
|
22
|
-
constructor(resource?: string);
|
23
|
-
include(...resources: string[]): QueryBuilderRetrieve;
|
24
|
-
field(field: string, resource?: string): QueryBuilderRetrieve;
|
25
|
-
fields(fields: string[], resource?: string): QueryBuilderRetrieve;
|
26
|
-
clear(): QueryBuilderRetrieve;
|
27
|
-
build(): QueryParams;
|
28
|
-
generate(): {
|
29
|
-
[key: string]: string;
|
30
|
-
};
|
31
|
-
}
|
32
|
-
declare class QueryBuilderList extends QueryBuilderRetrieve {
|
33
|
-
#private;
|
34
|
-
constructor(resource?: string);
|
35
|
-
include(...resources: string[]): QueryBuilderList;
|
36
|
-
field(field: string, resource?: string): QueryBuilderList;
|
37
|
-
fields(fields: string[], resource?: string): QueryBuilderList;
|
38
|
-
pageNumber(num: number): QueryBuilderList;
|
39
|
-
pageSize(size: number): QueryBuilderList;
|
40
|
-
page(num: number, size: number): QueryBuilderList;
|
41
|
-
sort(field: string, descending?: boolean): QueryBuilderList;
|
42
|
-
filter(field: string | string[], predicate: FilterPredicate, value: string | number | boolean | string[], resource?: string): QueryBuilderList;
|
43
|
-
clear(): QueryBuilderList;
|
44
|
-
build(): QueryParams;
|
45
|
-
generate(): {
|
46
|
-
[key: string]: string;
|
47
|
-
};
|
48
|
-
}
|
49
|
-
declare class QueryBuilder extends QueryBuilderList {
|
50
|
-
constructor(resource?: string);
|
51
|
-
}
|
52
|
-
export default QueryBuilder;
|
53
|
-
export { QueryBuilderRetrieve, QueryBuilderList };
|
54
|
-
declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined) => {
|
20
|
+
declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: ResourceType) => {
|
55
21
|
[key: string]: string;
|
56
22
|
};
|
57
23
|
export { generateQueryStringParams };
|
package/lib/esm/query.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
const r=e=>e.filters||e.pageNumber||e.pageSize||e.sort,o=(e,n)=>{const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&(Array.isArray(e.fields)&&(e.fields={[n.type]:e.fields}),Object.entries(e.fields).forEach(([t,f])=>{i[`fields[${t}]`]=f.join(",")})),r(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([t,f])=>`${f==="desc"?"-":""}${t}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([t,f])=>{i[`filter[q][${t}]`]=String(f)}))),i};export{o as generateQueryStringParams};
|
package/lib/esm/resource.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ApiClientConfig, ApiClientInitConfig } from './client';
|
2
|
-
import { JSONValue } from './jsonapi';
|
3
2
|
import { QueryParamsRetrieve, QueryParamsList } from './query';
|
4
3
|
import { ResourceTypeLock } from './api';
|
5
4
|
import { InterceptorManager } from './interceptor';
|
5
|
+
import { Value as JSONValue } from 'json-typescript';
|
6
6
|
declare type Metadata = {
|
7
7
|
[key: string]: JSONValue;
|
8
8
|
};
|
package/lib/esm/resource.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
var
|
1
|
+
var w=this&&this.__classPrivateFieldSet||function(s,t,a,e,r){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?s!==t||!r:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?r.call(s,a):r?r.value=a:t.set(s,a),a},c=this&&this.__classPrivateFieldGet||function(s,t,a,e){if(a==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?s!==t||!e:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?e:a==="a"?e.call(s):e?e.value:t.get(s)},n,h;import y from"./client";import{denormalize as u,normalize as m}from"./jsonapi";import{generateQueryStringParams as o}from"./query";import g from"./config";class b extends Array{constructor(t,a){super(...a||[]);this.meta=t}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}}class p{constructor(t){n.set(this,void 0),h.set(this,{}),w(this,n,y.create(t),"f"),this.config(t)}get interceptors(){return c(this,n,"f").interceptors}config(t){!t||c(this,n,"f").config(t)}async singleton(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await c(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:r}));return u(i)}async retrieve(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await c(this,n,"f").request("get",`${t.type}/${t.id}`,void 0,Object.assign(Object.assign({},e),{params:r}));return u(i)}async list(t,a,e){var r,i;const d=o(a,t);(e==null?void 0:e.params)&&Object.assign(d,e==null?void 0:e.params);const l=await c(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:d})),f=u(l),v={pageCount:Number((r=l.meta)===null||r===void 0?void 0:r.page_count),recordCount:Number((i=l.meta)===null||i===void 0?void 0:i.record_count),currentPage:(a==null?void 0:a.pageNumber)||g.default.pageNumber,recordsPerPage:(a==null?void 0:a.pageSize)||g.default.pageSize};return new b(v,f)}async create(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=m(t),d=await c(this,n,"f").request("post",t.type,i,Object.assign(Object.assign({},e),{params:r}));return u(d)}async update(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=m(t),d=await c(this,n,"f").request("patch",`${t.type}/${t.id}`,i,Object.assign(Object.assign({},e),{params:r}));return u(d)}async delete(t,a){await c(this,n,"f").request("delete",`${t.type}/${t.id}`,void 0,a)}}n=new WeakMap,h=new WeakMap;class j{constructor(t){this.resources=t}}export default p;export{j as ApiResource};
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Geocoder } from './geocoders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class e extends a{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async create(t,r,i){return this.resources.create(Object.assign(Object.assign({},t),{type:e.TYPE}),r,i)}async retrieve(t,r,i){return this.resources.retrieve({type:e.TYPE,id:t},r,i)}async update(t,r,i){return this.resources.update(Object.assign(Object.assign({},t),{type:e.TYPE}),r,i)}async delete(t,r){await this.resources.delete({type:e.TYPE,id:t},r)}isAddress(t){return t.type&&t.type===e.TYPE}relationship(t){return typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="addresses";export default e;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
declare type AdjustmentRel = ResourceId & {
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isAdjustment(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adjustments";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { PaymentMethod } from './payment_methods';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAdyenGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="adyen_gateways";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -22,13 +18,12 @@ interface AdyenPayment extends Resource {
|
|
22
18
|
payment_gateway?: PaymentGateway;
|
23
19
|
}
|
24
20
|
interface AdyenPaymentCreate extends ResourceCreate {
|
25
|
-
order
|
21
|
+
order: OrderRel;
|
26
22
|
}
|
27
23
|
interface AdyenPaymentUpdate extends ResourceUpdate {
|
28
24
|
payment_request_data?: object;
|
29
25
|
payment_request_details?: object;
|
30
26
|
payment_response?: object;
|
31
|
-
_authorize?: boolean;
|
32
27
|
_details?: boolean;
|
33
28
|
order?: OrderRel;
|
34
29
|
}
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAdyenPayment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="adyen_payments";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourcesConfig, ResourceId } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsRetrieve } from '../query';
|
7
3
|
declare type ApplicationRel = ResourceId & {
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as n}from"../resource";class t extends n{async retrieve(e,r){return this.resources.singleton({type:t.TYPE},e,r)}isApplication(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="application";export default t;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Bundle } from './bundles';
|
@@ -137,7 +133,7 @@ interface AttachmentCreate extends ResourceCreate {
|
|
137
133
|
name: string;
|
138
134
|
description?: string;
|
139
135
|
url?: string;
|
140
|
-
attachable
|
136
|
+
attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
|
141
137
|
}
|
142
138
|
interface AttachmentUpdate extends ResourceUpdate {
|
143
139
|
name?: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isAttachment(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="attachments";export default r;
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/**
|
2
|
-
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
|
4
|
-
**/
|
5
1
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
2
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
3
|
import { Order } from './orders';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as p}from"../resource";class t extends p{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
|