@commercelayer/sdk 3.7.0 → 3.9.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 +8 -3
- package/lib/cjs/api.js +1 -1
- package/lib/cjs/client.js +1 -1
- package/lib/cjs/commercelayer.d.ts +5 -0
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/config.d.ts +1 -1
- package/lib/cjs/config.js +1 -1
- package/lib/cjs/error.d.ts +26 -1
- package/lib/cjs/error.js +1 -1
- package/lib/cjs/interceptor.d.ts +19 -1
- package/lib/cjs/jsonapi.js +1 -1
- package/lib/cjs/model.d.ts +6 -1
- package/lib/cjs/resource.js +1 -1
- package/lib/cjs/resources/adyen_gateways.js +1 -1
- package/lib/cjs/resources/application.d.ts +1 -1
- package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
- package/lib/cjs/resources/braintree_gateways.js +1 -1
- package/lib/cjs/resources/bundles.d.ts +6 -0
- package/lib/cjs/resources/checkout_com_gateways.js +1 -1
- package/lib/cjs/resources/customer_addresses.d.ts +2 -0
- package/lib/cjs/resources/customer_password_resets.d.ts +2 -0
- package/lib/cjs/resources/customer_subscriptions.d.ts +2 -0
- package/lib/cjs/resources/customers.d.ts +2 -0
- package/lib/cjs/resources/events.d.ts +22 -0
- package/lib/cjs/resources/events.js +1 -0
- package/lib/cjs/resources/external_gateways.js +1 -1
- package/lib/cjs/resources/external_promotions.js +1 -1
- package/lib/cjs/resources/external_tax_calculators.js +1 -1
- package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
- package/lib/cjs/resources/free_gift_promotions.js +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +2 -0
- package/lib/cjs/resources/imports.d.ts +2 -0
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +2 -0
- package/lib/cjs/resources/line_item_options.js +1 -1
- package/lib/cjs/resources/manual_gateways.js +1 -1
- package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
- package/lib/cjs/resources/order_copies.d.ts +2 -0
- package/lib/cjs/resources/order_subscriptions.d.ts +2 -0
- package/lib/cjs/resources/order_validation_rules.js +1 -1
- package/lib/cjs/resources/orders.d.ts +8 -0
- package/lib/cjs/resources/organization.js +1 -1
- package/lib/cjs/resources/parcels.d.ts +4 -2
- package/lib/cjs/resources/payment_methods.js +1 -1
- package/lib/cjs/resources/paypal_gateways.js +1 -1
- package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
- package/lib/cjs/resources/price_tiers.d.ts +26 -0
- package/lib/cjs/resources/price_tiers.js +1 -0
- package/lib/cjs/resources/price_volume_tiers.d.ts +44 -0
- package/lib/cjs/resources/price_volume_tiers.js +1 -0
- package/lib/cjs/resources/prices.d.ts +9 -0
- package/lib/cjs/resources/refunds.d.ts +2 -0
- package/lib/cjs/resources/returns.d.ts +2 -0
- package/lib/cjs/resources/shipments.d.ts +3 -0
- package/lib/cjs/resources/shipping_method_tiers.d.ts +26 -0
- package/lib/cjs/resources/shipping_method_tiers.js +1 -0
- package/lib/cjs/resources/shipping_methods.d.ts +30 -2
- package/lib/cjs/resources/shipping_weight_tiers.d.ts +44 -0
- package/lib/cjs/resources/shipping_weight_tiers.js +1 -0
- package/lib/cjs/resources/sku_lists.js +1 -1
- package/lib/cjs/resources/sku_options.js +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +2 -0
- package/lib/cjs/resources/stripe_gateways.js +1 -1
- package/lib/cjs/resources/tax_calculators.js +1 -1
- package/lib/cjs/util.d.ts +5 -1
- package/lib/esm/api.d.ts +8 -3
- package/lib/esm/api.js +1 -1
- package/lib/esm/client.js +1 -1
- package/lib/esm/commercelayer.d.ts +5 -0
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/config.d.ts +1 -1
- package/lib/esm/config.js +1 -1
- package/lib/esm/error.d.ts +26 -1
- package/lib/esm/error.js +1 -1
- package/lib/esm/interceptor.d.ts +19 -1
- package/lib/esm/jsonapi.js +1 -1
- package/lib/esm/model.d.ts +6 -1
- package/lib/esm/resource.js +1 -1
- package/lib/esm/resources/addresses.js +1 -1
- package/lib/esm/resources/adjustments.js +1 -1
- package/lib/esm/resources/adyen_gateways.js +1 -1
- package/lib/esm/resources/application.d.ts +1 -1
- package/lib/esm/resources/avalara_accounts.d.ts +3 -0
- package/lib/esm/resources/avalara_accounts.js +1 -1
- package/lib/esm/resources/billing_info_validation_rules.js +1 -1
- package/lib/esm/resources/bing_geocoders.js +1 -1
- package/lib/esm/resources/braintree_gateways.js +1 -1
- package/lib/esm/resources/bundles.d.ts +6 -0
- package/lib/esm/resources/bundles.js +1 -1
- package/lib/esm/resources/carrier_accounts.js +1 -1
- package/lib/esm/resources/checkout_com_gateways.js +1 -1
- package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
- package/lib/esm/resources/coupons.js +1 -1
- package/lib/esm/resources/customer_addresses.d.ts +2 -0
- package/lib/esm/resources/customer_password_resets.d.ts +2 -0
- package/lib/esm/resources/customer_subscriptions.d.ts +2 -0
- package/lib/esm/resources/customers.d.ts +2 -0
- package/lib/esm/resources/event_callbacks.js +1 -1
- package/lib/esm/resources/events.d.ts +22 -0
- package/lib/esm/resources/events.js +1 -0
- package/lib/esm/resources/external_promotions.js +1 -1
- package/lib/esm/resources/external_tax_calculators.js +1 -1
- package/lib/esm/resources/fixed_amount_promotions.js +1 -1
- package/lib/esm/resources/fixed_price_promotions.js +1 -1
- package/lib/esm/resources/free_gift_promotions.js +1 -1
- package/lib/esm/resources/free_shipping_promotions.js +1 -1
- package/lib/esm/resources/geocoders.js +1 -1
- package/lib/esm/resources/gift_cards.d.ts +2 -0
- package/lib/esm/resources/google_geocoders.js +1 -1
- package/lib/esm/resources/imports.d.ts +2 -0
- package/lib/esm/resources/in_stock_subscriptions.d.ts +2 -0
- package/lib/esm/resources/inventory_models.js +1 -1
- package/lib/esm/resources/inventory_return_locations.js +1 -1
- package/lib/esm/resources/inventory_stock_locations.js +1 -1
- package/lib/esm/resources/klarna_gateways.js +1 -1
- package/lib/esm/resources/line_item_options.js +1 -1
- package/lib/esm/resources/manual_gateways.js +1 -1
- package/lib/esm/resources/manual_tax_calculators.js +1 -1
- package/lib/esm/resources/markets.js +1 -1
- package/lib/esm/resources/merchants.js +1 -1
- package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
- package/lib/esm/resources/order_copies.d.ts +2 -0
- package/lib/esm/resources/order_subscriptions.d.ts +2 -0
- package/lib/esm/resources/order_validation_rules.js +1 -1
- package/lib/esm/resources/orders.d.ts +8 -0
- package/lib/esm/resources/organization.js +1 -1
- package/lib/esm/resources/parcels.d.ts +4 -2
- package/lib/esm/resources/payment_gateways.js +1 -1
- package/lib/esm/resources/payment_methods.js +1 -1
- package/lib/esm/resources/paypal_gateways.js +1 -1
- package/lib/esm/resources/percentage_discount_promotions.js +1 -1
- package/lib/esm/resources/price_tiers.d.ts +26 -0
- package/lib/esm/resources/price_tiers.js +1 -0
- package/lib/esm/resources/price_volume_tiers.d.ts +44 -0
- package/lib/esm/resources/price_volume_tiers.js +1 -0
- package/lib/esm/resources/prices.d.ts +9 -0
- package/lib/esm/resources/promotion_rules.js +1 -1
- package/lib/esm/resources/promotions.js +1 -1
- package/lib/esm/resources/refunds.d.ts +2 -0
- package/lib/esm/resources/returns.d.ts +2 -0
- package/lib/esm/resources/shipments.d.ts +3 -0
- package/lib/esm/resources/shipping_categories.js +1 -1
- package/lib/esm/resources/shipping_method_tiers.d.ts +26 -0
- package/lib/esm/resources/shipping_method_tiers.js +1 -0
- package/lib/esm/resources/shipping_methods.d.ts +30 -2
- package/lib/esm/resources/shipping_weight_tiers.d.ts +44 -0
- package/lib/esm/resources/shipping_weight_tiers.js +1 -0
- package/lib/esm/resources/shipping_zones.js +1 -1
- package/lib/esm/resources/sku_list_items.js +1 -1
- package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
- package/lib/esm/resources/sku_lists.js +1 -1
- package/lib/esm/resources/sku_options.js +1 -1
- package/lib/esm/resources/stock_items.js +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +2 -0
- package/lib/esm/resources/stripe_gateways.js +1 -1
- package/lib/esm/resources/tax_calculators.js +1 -1
- package/lib/esm/resources/tax_categories.js +1 -1
- package/lib/esm/resources/tax_rules.js +1 -1
- package/lib/esm/resources/taxjar_accounts.js +1 -1
- package/lib/esm/resources/webhooks.js +1 -1
- package/lib/esm/util.d.ts +5 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/lib/api.d.ts +0 -1
- package/lib/api.js +0 -1
- package/lib/client.d.ts +0 -2
- package/lib/client.js +0 -1
- package/lib/commercelayer.d.ts +0 -1
- package/lib/commercelayer.js +0 -1
- package/lib/common.d.ts +0 -1
- package/lib/common.js +0 -1
- package/lib/config.d.ts +0 -1
- package/lib/config.js +0 -1
- package/lib/debug.d.ts +0 -1
- package/lib/debug.js +0 -1
- package/lib/error.d.ts +0 -1
- package/lib/error.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/interceptor.d.ts +0 -1
- package/lib/interceptor.js +0 -1
- package/lib/jsonapi.d.ts +0 -1
- package/lib/jsonapi.js +0 -1
- package/lib/model.d.ts +0 -1
- package/lib/model.js +0 -1
- package/lib/query.d.ts +0 -1
- package/lib/query.js +0 -1
- package/lib/resource.d.ts +0 -1
- package/lib/resource.js +0 -1
- package/lib/resources/addresses.d.ts +0 -1
- package/lib/resources/addresses.js +0 -1
- package/lib/resources/adjustments.d.ts +0 -1
- package/lib/resources/adjustments.js +0 -1
- package/lib/resources/adyen_gateways.d.ts +0 -1
- package/lib/resources/adyen_gateways.js +0 -1
- package/lib/resources/adyen_payments.d.ts +0 -1
- package/lib/resources/adyen_payments.js +0 -1
- package/lib/resources/application.d.ts +0 -1
- package/lib/resources/application.js +0 -1
- package/lib/resources/attachments.d.ts +0 -1
- package/lib/resources/attachments.js +0 -1
- package/lib/resources/authorizations.d.ts +0 -1
- package/lib/resources/authorizations.js +0 -1
- package/lib/resources/avalara_accounts.d.ts +0 -1
- package/lib/resources/avalara_accounts.js +0 -1
- package/lib/resources/billing_info_validation_rules.d.ts +0 -1
- package/lib/resources/billing_info_validation_rules.js +0 -1
- package/lib/resources/bing_geocoders.d.ts +0 -1
- package/lib/resources/bing_geocoders.js +0 -1
- package/lib/resources/braintree_gateways.d.ts +0 -1
- package/lib/resources/braintree_gateways.js +0 -1
- package/lib/resources/braintree_payments.d.ts +0 -1
- package/lib/resources/braintree_payments.js +0 -1
- package/lib/resources/bundles.d.ts +0 -1
- package/lib/resources/bundles.js +0 -1
- package/lib/resources/captures.d.ts +0 -1
- package/lib/resources/captures.js +0 -1
- package/lib/resources/carrier_accounts.d.ts +0 -1
- package/lib/resources/carrier_accounts.js +0 -1
- package/lib/resources/checkout_com_gateways.d.ts +0 -1
- package/lib/resources/checkout_com_gateways.js +0 -1
- package/lib/resources/checkout_com_payments.d.ts +0 -1
- package/lib/resources/checkout_com_payments.js +0 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +0 -1
- package/lib/resources/coupon_codes_promotion_rules.js +0 -1
- package/lib/resources/coupon_recipients.d.ts +0 -1
- package/lib/resources/coupon_recipients.js +0 -1
- package/lib/resources/coupons.d.ts +0 -1
- package/lib/resources/coupons.js +0 -1
- package/lib/resources/customer_addresses.d.ts +0 -1
- package/lib/resources/customer_addresses.js +0 -1
- package/lib/resources/customer_groups.d.ts +0 -1
- package/lib/resources/customer_groups.js +0 -1
- package/lib/resources/customer_password_resets.d.ts +0 -1
- package/lib/resources/customer_password_resets.js +0 -1
- package/lib/resources/customer_payment_sources.d.ts +0 -1
- package/lib/resources/customer_payment_sources.js +0 -1
- package/lib/resources/customer_subscriptions.d.ts +0 -1
- package/lib/resources/customer_subscriptions.js +0 -1
- package/lib/resources/customers.d.ts +0 -1
- package/lib/resources/customers.js +0 -1
- package/lib/resources/delivery_lead_times.d.ts +0 -1
- package/lib/resources/delivery_lead_times.js +0 -1
- package/lib/resources/event_callbacks.d.ts +0 -1
- package/lib/resources/event_callbacks.js +0 -1
- package/lib/resources/external_gateways.d.ts +0 -1
- package/lib/resources/external_gateways.js +0 -1
- package/lib/resources/external_payments.d.ts +0 -1
- package/lib/resources/external_payments.js +0 -1
- package/lib/resources/external_promotions.d.ts +0 -1
- package/lib/resources/external_promotions.js +0 -1
- package/lib/resources/external_tax_calculators.d.ts +0 -1
- package/lib/resources/external_tax_calculators.js +0 -1
- package/lib/resources/fixed_amount_promotions.d.ts +0 -1
- package/lib/resources/fixed_amount_promotions.js +0 -1
- package/lib/resources/fixed_price_promotions.d.ts +0 -1
- package/lib/resources/fixed_price_promotions.js +0 -1
- package/lib/resources/free_gift_promotions.d.ts +0 -1
- package/lib/resources/free_gift_promotions.js +0 -1
- package/lib/resources/free_shipping_promotions.d.ts +0 -1
- package/lib/resources/free_shipping_promotions.js +0 -1
- package/lib/resources/geocoders.d.ts +0 -1
- package/lib/resources/geocoders.js +0 -1
- package/lib/resources/gift_card_recipients.d.ts +0 -1
- package/lib/resources/gift_card_recipients.js +0 -1
- package/lib/resources/gift_cards.d.ts +0 -1
- package/lib/resources/gift_cards.js +0 -1
- package/lib/resources/google_geocoders.d.ts +0 -1
- package/lib/resources/google_geocoders.js +0 -1
- package/lib/resources/imports.d.ts +0 -1
- package/lib/resources/imports.js +0 -1
- package/lib/resources/in_stock_subscriptions.d.ts +0 -1
- package/lib/resources/in_stock_subscriptions.js +0 -1
- package/lib/resources/inventory_models.d.ts +0 -1
- package/lib/resources/inventory_models.js +0 -1
- package/lib/resources/inventory_return_locations.d.ts +0 -1
- package/lib/resources/inventory_return_locations.js +0 -1
- package/lib/resources/inventory_stock_locations.d.ts +0 -1
- package/lib/resources/inventory_stock_locations.js +0 -1
- package/lib/resources/klarna_gateways.d.ts +0 -1
- package/lib/resources/klarna_gateways.js +0 -1
- package/lib/resources/klarna_payments.d.ts +0 -1
- package/lib/resources/klarna_payments.js +0 -1
- package/lib/resources/line_item_options.d.ts +0 -1
- package/lib/resources/line_item_options.js +0 -1
- package/lib/resources/line_items.d.ts +0 -1
- package/lib/resources/line_items.js +0 -1
- package/lib/resources/manual_gateways.d.ts +0 -1
- package/lib/resources/manual_gateways.js +0 -1
- package/lib/resources/manual_tax_calculators.d.ts +0 -1
- package/lib/resources/manual_tax_calculators.js +0 -1
- package/lib/resources/markets.d.ts +0 -1
- package/lib/resources/markets.js +0 -1
- package/lib/resources/merchants.d.ts +0 -1
- package/lib/resources/merchants.js +0 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +0 -1
- package/lib/resources/order_amount_promotion_rules.js +0 -1
- package/lib/resources/order_copies.d.ts +0 -1
- package/lib/resources/order_copies.js +0 -1
- package/lib/resources/order_subscriptions.d.ts +0 -1
- package/lib/resources/order_subscriptions.js +0 -1
- package/lib/resources/order_validation_rules.d.ts +0 -1
- package/lib/resources/order_validation_rules.js +0 -1
- package/lib/resources/orders.d.ts +0 -1
- package/lib/resources/orders.js +0 -1
- package/lib/resources/organization.d.ts +0 -1
- package/lib/resources/organization.js +0 -1
- package/lib/resources/packages.d.ts +0 -1
- package/lib/resources/packages.js +0 -1
- package/lib/resources/parcel_line_items.d.ts +0 -1
- package/lib/resources/parcel_line_items.js +0 -1
- package/lib/resources/parcels.d.ts +0 -1
- package/lib/resources/parcels.js +0 -1
- package/lib/resources/payment_gateways.d.ts +0 -1
- package/lib/resources/payment_gateways.js +0 -1
- package/lib/resources/payment_methods.d.ts +0 -1
- package/lib/resources/payment_methods.js +0 -1
- package/lib/resources/paypal_gateways.d.ts +0 -1
- package/lib/resources/paypal_gateways.js +0 -1
- package/lib/resources/paypal_payments.d.ts +0 -1
- package/lib/resources/paypal_payments.js +0 -1
- package/lib/resources/percentage_discount_promotions.d.ts +0 -1
- package/lib/resources/percentage_discount_promotions.js +0 -1
- package/lib/resources/price_lists.d.ts +0 -1
- package/lib/resources/price_lists.js +0 -1
- package/lib/resources/prices.d.ts +0 -1
- package/lib/resources/prices.js +0 -1
- package/lib/resources/promotion_rules.d.ts +0 -1
- package/lib/resources/promotion_rules.js +0 -1
- package/lib/resources/promotions.d.ts +0 -1
- package/lib/resources/promotions.js +0 -1
- package/lib/resources/refunds.d.ts +0 -1
- package/lib/resources/refunds.js +0 -1
- package/lib/resources/return_line_items.d.ts +0 -1
- package/lib/resources/return_line_items.js +0 -1
- package/lib/resources/returns.d.ts +0 -1
- package/lib/resources/returns.js +0 -1
- package/lib/resources/shipments.d.ts +0 -1
- package/lib/resources/shipments.js +0 -1
- package/lib/resources/shipping_categories.d.ts +0 -1
- package/lib/resources/shipping_categories.js +0 -1
- package/lib/resources/shipping_methods.d.ts +0 -1
- package/lib/resources/shipping_methods.js +0 -1
- package/lib/resources/shipping_zones.d.ts +0 -1
- package/lib/resources/shipping_zones.js +0 -1
- package/lib/resources/sku_list_items.d.ts +0 -1
- package/lib/resources/sku_list_items.js +0 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +0 -1
- package/lib/resources/sku_list_promotion_rules.js +0 -1
- package/lib/resources/sku_lists.d.ts +0 -1
- package/lib/resources/sku_lists.js +0 -1
- package/lib/resources/sku_options.d.ts +0 -1
- package/lib/resources/sku_options.js +0 -1
- package/lib/resources/skus.d.ts +0 -1
- package/lib/resources/skus.js +0 -1
- package/lib/resources/stock_items.d.ts +0 -1
- package/lib/resources/stock_items.js +0 -1
- package/lib/resources/stock_line_items.d.ts +0 -1
- package/lib/resources/stock_line_items.js +0 -1
- package/lib/resources/stock_locations.d.ts +0 -1
- package/lib/resources/stock_locations.js +0 -1
- package/lib/resources/stock_transfers.d.ts +0 -1
- package/lib/resources/stock_transfers.js +0 -1
- package/lib/resources/stripe_gateways.d.ts +0 -1
- package/lib/resources/stripe_gateways.js +0 -1
- package/lib/resources/stripe_payments.d.ts +0 -1
- package/lib/resources/stripe_payments.js +0 -1
- package/lib/resources/tax_calculators.d.ts +0 -1
- package/lib/resources/tax_calculators.js +0 -1
- package/lib/resources/tax_categories.d.ts +0 -1
- package/lib/resources/tax_categories.js +0 -1
- package/lib/resources/tax_rules.d.ts +0 -1
- package/lib/resources/tax_rules.js +0 -1
- package/lib/resources/taxjar_accounts.d.ts +0 -1
- package/lib/resources/taxjar_accounts.js +0 -1
- package/lib/resources/transactions.d.ts +0 -1
- package/lib/resources/transactions.js +0 -1
- package/lib/resources/voids.d.ts +0 -1
- package/lib/resources/voids.js +0 -1
- package/lib/resources/webhooks.d.ts +0 -1
- package/lib/resources/webhooks.js +0 -1
- package/lib/resources/wire_transfers.d.ts +0 -1
- package/lib/resources/wire_transfers.js +0 -1
- package/lib/static.d.ts +0 -1
- package/lib/static.js +0 -1
- package/lib/util.d.ts +0 -2
- package/lib/util.js +0 -1
@@ -1,6 +1,7 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Customer } from './customers';
|
4
|
+
import { Event } from './events';
|
4
5
|
declare type CustomerPasswordResetRel = ResourceRel & {
|
5
6
|
type: typeof CustomerPasswordResets.TYPE;
|
6
7
|
};
|
@@ -9,6 +10,7 @@ interface CustomerPasswordReset extends Resource {
|
|
9
10
|
reset_password_token?: string;
|
10
11
|
reset_password_at?: string;
|
11
12
|
customer?: Customer;
|
13
|
+
events?: Event[];
|
12
14
|
}
|
13
15
|
interface CustomerPasswordResetCreate extends ResourceCreate {
|
14
16
|
customer_email: string;
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Customer } from './customers';
|
4
|
+
import { Event } from './events';
|
4
5
|
declare type CustomerSubscriptionRel = ResourceRel & {
|
5
6
|
type: typeof CustomerSubscriptions.TYPE;
|
6
7
|
};
|
7
8
|
interface CustomerSubscription extends Resource {
|
8
9
|
customer_email?: string;
|
9
10
|
customer?: Customer;
|
11
|
+
events?: Event[];
|
10
12
|
}
|
11
13
|
interface CustomerSubscriptionCreate extends ResourceCreate {
|
12
14
|
customer_email: string;
|
@@ -8,6 +8,7 @@ import { Order } from './orders';
|
|
8
8
|
import { OrderSubscription } from './order_subscriptions';
|
9
9
|
import { Return } from './returns';
|
10
10
|
import { Attachment } from './attachments';
|
11
|
+
import { Event } from './events';
|
11
12
|
declare type CustomerRel = ResourceRel & {
|
12
13
|
type: typeof Customers.TYPE;
|
13
14
|
};
|
@@ -26,6 +27,7 @@ interface Customer extends Resource {
|
|
26
27
|
order_subscriptions?: OrderSubscription[];
|
27
28
|
returns?: Return[];
|
28
29
|
attachments?: Attachment[];
|
30
|
+
events?: Event[];
|
29
31
|
}
|
30
32
|
interface CustomerCreate extends ResourceCreate {
|
31
33
|
email: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}isEventCallback(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="event_callbacks";export default t;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { EventCallback } from './event_callbacks';
|
4
|
+
import { Webhook } from './webhooks';
|
5
|
+
declare type EventRel = ResourceRel & {
|
6
|
+
type: typeof Events.TYPE;
|
7
|
+
};
|
8
|
+
interface Event extends Resource {
|
9
|
+
name?: string;
|
10
|
+
last_event_callbacks?: EventCallback[];
|
11
|
+
webhooks?: Webhook[];
|
12
|
+
}
|
13
|
+
declare class Events extends ApiResource {
|
14
|
+
static readonly TYPE: 'events';
|
15
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
16
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Event>;
|
17
|
+
isEvent(resource: any): resource is Event;
|
18
|
+
relationship(id: string | ResourceId | null): EventRel;
|
19
|
+
type(): string;
|
20
|
+
}
|
21
|
+
export default Events;
|
22
|
+
export { Event };
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,p){return this.resources.retrieve({type:r.TYPE,id:e},t,p)}isEvent(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="events";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isExternalPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class t extends a{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)}isExternalTaxCalculator(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="external_tax_calculators";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isFixedAmountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="fixed_amount_promotions";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isFixedPricePromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="fixed_price_promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isFreeGiftPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_gift_promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isFreeShippingPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_shipping_promotions";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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 retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isGeocoder(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="geocoders";export default r;
|
@@ -3,6 +3,7 @@ import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import { Market } from './markets';
|
4
4
|
import { GiftCardRecipient } from './gift_card_recipients';
|
5
5
|
import { Attachment } from './attachments';
|
6
|
+
import { Event } from './events';
|
6
7
|
declare type GiftCardRel = ResourceRel & {
|
7
8
|
type: typeof GiftCards.TYPE;
|
8
9
|
};
|
@@ -34,6 +35,7 @@ interface GiftCard extends Resource {
|
|
34
35
|
market?: Market;
|
35
36
|
gift_card_recipient?: GiftCardRecipient;
|
36
37
|
attachments?: Attachment[];
|
38
|
+
events?: Event[];
|
37
39
|
}
|
38
40
|
interface GiftCardCreate extends ResourceCreate {
|
39
41
|
code?: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isGoogleGeocoder(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="google_geocoders";export default t;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { Event } from './events';
|
3
4
|
declare type ImportRel = ResourceRel & {
|
4
5
|
type: typeof Imports.TYPE;
|
5
6
|
};
|
@@ -19,6 +20,7 @@ interface Import extends Resource {
|
|
19
20
|
errors_log?: object;
|
20
21
|
warnings_log?: object;
|
21
22
|
cleanup_records?: boolean;
|
23
|
+
events?: Event[];
|
22
24
|
}
|
23
25
|
interface ImportCreate extends ResourceCreate {
|
24
26
|
resource_type: string;
|
@@ -3,6 +3,7 @@ import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
|
3
3
|
import { Market } from './markets';
|
4
4
|
import { Customer } from './customers';
|
5
5
|
import { Sku } from './skus';
|
6
|
+
import { Event } from './events';
|
6
7
|
declare type InStockSubscriptionRel = ResourceRel & {
|
7
8
|
type: typeof InStockSubscriptions.TYPE;
|
8
9
|
};
|
@@ -23,6 +24,7 @@ interface InStockSubscription extends Resource {
|
|
23
24
|
market?: Market;
|
24
25
|
customer?: Customer;
|
25
26
|
sku?: Sku;
|
27
|
+
events?: Event[];
|
26
28
|
}
|
27
29
|
interface InStockSubscriptionCreate extends ResourceCreate {
|
28
30
|
customer_email?: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isInventoryModel(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="inventory_models";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isInventoryReturnLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_return_locations";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isInventoryStockLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_stock_locations";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isKlarnaGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="klarna_gateways";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as r}from"../resource";class t extends r{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,i){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async retrieve(e,s,i){return this.resources.retrieve({type:t.TYPE,id:e},s,i)}async update(e,s,i){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,i)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isLineItemOption(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="line_item_options";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isManualGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="manual_gateways";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isManualTaxCalculator(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="manual_tax_calculators";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMarket(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="markets";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isMerchant(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="merchants";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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)}isOrderAmountPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_amount_promotion_rules";export default r;
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, Res
|
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { OrderSubscription } from './order_subscriptions';
|
5
|
+
import { Event } from './events';
|
5
6
|
declare type OrderCopyRel = ResourceRel & {
|
6
7
|
type: typeof OrderCopies.TYPE;
|
7
8
|
};
|
@@ -21,6 +22,7 @@ interface OrderCopy extends Resource {
|
|
21
22
|
source_order?: Order;
|
22
23
|
target_order?: Order;
|
23
24
|
order_subscription?: OrderSubscription;
|
25
|
+
events?: Event[];
|
24
26
|
}
|
25
27
|
interface OrderCopyCreate extends ResourceCreate {
|
26
28
|
place_target_order?: boolean;
|
@@ -4,6 +4,7 @@ import { Market } from './markets';
|
|
4
4
|
import { Order } from './orders';
|
5
5
|
import { Customer } from './customers';
|
6
6
|
import { OrderCopy } from './order_copies';
|
7
|
+
import { Event } from './events';
|
7
8
|
declare type OrderSubscriptionRel = ResourceRel & {
|
8
9
|
type: typeof OrderSubscriptions.TYPE;
|
9
10
|
};
|
@@ -31,6 +32,7 @@ interface OrderSubscription extends Resource {
|
|
31
32
|
customer?: Customer;
|
32
33
|
order_copies?: OrderCopy[];
|
33
34
|
orders?: Order[];
|
35
|
+
events?: Event[];
|
34
36
|
}
|
35
37
|
interface OrderSubscriptionCreate extends ResourceCreate {
|
36
38
|
frequency: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as s}from"../resource";class
|
1
|
+
import{ApiResource as s}from"../resource";class r extends s{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,i){return this.resources.retrieve({type:r.TYPE,id:e},t,i)}isOrderValidationRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="order_validation_rules";export default r;
|
@@ -5,6 +5,8 @@ import { Customer } from './customers';
|
|
5
5
|
import { Address } from './addresses';
|
6
6
|
import { PaymentMethod } from './payment_methods';
|
7
7
|
import { CustomerPaymentSource } from './customer_payment_sources';
|
8
|
+
import { Sku } from './skus';
|
9
|
+
import { Bundle } from './bundles';
|
8
10
|
import { AdyenPayment } from './adyen_payments';
|
9
11
|
import { BraintreePayment } from './braintree_payments';
|
10
12
|
import { CheckoutComPayment } from './checkout_com_payments';
|
@@ -22,6 +24,7 @@ import { Refund } from './refunds';
|
|
22
24
|
import { OrderSubscription } from './order_subscriptions';
|
23
25
|
import { OrderCopy } from './order_copies';
|
24
26
|
import { Attachment } from './attachments';
|
27
|
+
import { Event } from './events';
|
25
28
|
declare type OrderRel = ResourceRel & {
|
26
29
|
type: typeof Orders.TYPE;
|
27
30
|
};
|
@@ -165,6 +168,8 @@ interface Order extends Resource {
|
|
165
168
|
billing_address?: Address;
|
166
169
|
available_payment_methods?: PaymentMethod[];
|
167
170
|
available_customer_payment_sources?: CustomerPaymentSource[];
|
171
|
+
available_free_skus?: Sku[];
|
172
|
+
available_free_bundles?: Bundle[];
|
168
173
|
payment_method?: PaymentMethod;
|
169
174
|
payment_source?: AdyenPayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | StripePayment | WireTransfer;
|
170
175
|
line_items?: LineItem[];
|
@@ -177,6 +182,7 @@ interface Order extends Resource {
|
|
177
182
|
order_subscriptions?: OrderSubscription[];
|
178
183
|
order_copies?: OrderCopy[];
|
179
184
|
attachments?: Attachment[];
|
185
|
+
events?: Event[];
|
180
186
|
}
|
181
187
|
interface OrderCreate extends ResourceCreate {
|
182
188
|
autorefresh?: boolean;
|
@@ -230,6 +236,8 @@ interface OrderUpdate extends ResourceUpdate {
|
|
230
236
|
_customer_payment_source_id?: string;
|
231
237
|
_shipping_address_same_as_billing?: boolean;
|
232
238
|
_billing_address_same_as_shipping?: boolean;
|
239
|
+
_commit_invoice?: boolean;
|
240
|
+
_refund_invoice?: boolean;
|
233
241
|
_save_payment_source_to_customer_wallet?: boolean;
|
234
242
|
_save_shipping_address_to_customer_address_book?: boolean;
|
235
243
|
_save_billing_address_to_customer_address_book?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class r extends i{async retrieve(e,t){return this.resources.singleton({type:r.TYPE},e,t)}isOrganization(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="organization";export default r;
|
@@ -4,6 +4,7 @@ import { Shipment } from './shipments';
|
|
4
4
|
import { Package } from './packages';
|
5
5
|
import { ParcelLineItem } from './parcel_line_items';
|
6
6
|
import { Attachment } from './attachments';
|
7
|
+
import { Event } from './events';
|
7
8
|
declare type ParcelRel = ResourceRel & {
|
8
9
|
type: typeof Parcels.TYPE;
|
9
10
|
};
|
@@ -42,10 +43,11 @@ interface Parcel extends Resource {
|
|
42
43
|
package?: Package;
|
43
44
|
parcel_line_items?: ParcelLineItem[];
|
44
45
|
attachments?: Attachment[];
|
46
|
+
events?: Event[];
|
45
47
|
}
|
46
48
|
interface ParcelCreate extends ResourceCreate {
|
47
|
-
weight
|
48
|
-
unit_of_weight
|
49
|
+
weight: number;
|
50
|
+
unit_of_weight: string;
|
49
51
|
eel_pfc?: string;
|
50
52
|
contents_type?: string;
|
51
53
|
contents_explanation?: string;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}isPaymentGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_gateways";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as i}from"../resource";class
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPaymentMethod(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="payment_methods";export default t;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isPaypalGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="paypal_gateways";export default s;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
1
|
+
import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isPercentageDiscountPromotion(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="percentage_discount_promotions";export default t;
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { Price } from './prices';
|
4
|
+
import { Attachment } from './attachments';
|
5
|
+
declare type PriceTierRel = ResourceRel & {
|
6
|
+
type: typeof PriceTiers.TYPE;
|
7
|
+
};
|
8
|
+
interface PriceTier extends Resource {
|
9
|
+
name?: string;
|
10
|
+
up_to?: number;
|
11
|
+
price_amount_cents?: number;
|
12
|
+
price_amount_float?: number;
|
13
|
+
formatted_price_amount?: string;
|
14
|
+
price?: Price;
|
15
|
+
attachments?: Attachment[];
|
16
|
+
}
|
17
|
+
declare class PriceTiers extends ApiResource {
|
18
|
+
static readonly TYPE: 'price_tiers';
|
19
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceTier>>;
|
20
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceTier>;
|
21
|
+
isPriceTier(resource: any): resource is PriceTier;
|
22
|
+
relationship(id: string | ResourceId | null): PriceTierRel;
|
23
|
+
type(): string;
|
24
|
+
}
|
25
|
+
export default PriceTiers;
|
26
|
+
export { PriceTier };
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as s}from"../resource";class e extends s{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,p){return this.resources.retrieve({type:e.TYPE,id:t},r,p)}isPriceTier(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="price_tiers";export default e;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
|
2
|
+
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
|
+
import { Price } from './prices';
|
4
|
+
import { Attachment } from './attachments';
|
5
|
+
declare type PriceVolumeTierRel = ResourceRel & {
|
6
|
+
type: typeof PriceVolumeTiers.TYPE;
|
7
|
+
};
|
8
|
+
declare type PriceRel = ResourceRel & {
|
9
|
+
type: 'prices';
|
10
|
+
};
|
11
|
+
interface PriceVolumeTier extends Resource {
|
12
|
+
name?: string;
|
13
|
+
up_to?: number;
|
14
|
+
price_amount_cents?: number;
|
15
|
+
price_amount_float?: number;
|
16
|
+
formatted_price_amount?: string;
|
17
|
+
price?: Price;
|
18
|
+
attachments?: Attachment[];
|
19
|
+
}
|
20
|
+
interface PriceVolumeTierCreate extends ResourceCreate {
|
21
|
+
name: string;
|
22
|
+
up_to?: number;
|
23
|
+
price_amount_cents: number;
|
24
|
+
price: PriceRel;
|
25
|
+
}
|
26
|
+
interface PriceVolumeTierUpdate extends ResourceUpdate {
|
27
|
+
name?: string;
|
28
|
+
up_to?: number;
|
29
|
+
price_amount_cents?: number;
|
30
|
+
price?: PriceRel;
|
31
|
+
}
|
32
|
+
declare class PriceVolumeTiers extends ApiResource {
|
33
|
+
static readonly TYPE: 'price_volume_tiers';
|
34
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PriceVolumeTier>>;
|
35
|
+
create(resource: PriceVolumeTierCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
|
36
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
|
37
|
+
update(resource: PriceVolumeTierUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PriceVolumeTier>;
|
38
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
39
|
+
isPriceVolumeTier(resource: any): resource is PriceVolumeTier;
|
40
|
+
relationship(id: string | ResourceId | null): PriceVolumeTierRel;
|
41
|
+
type(): string;
|
42
|
+
}
|
43
|
+
export default PriceVolumeTiers;
|
44
|
+
export { PriceVolumeTier, PriceVolumeTierCreate, PriceVolumeTierUpdate };
|
@@ -0,0 +1 @@
|
|
1
|
+
import{ApiResource as n}from"../resource";class e extends n{async list(t,s){return this.resources.list({type:e.TYPE},t,s)}async create(t,s,r){return this.resources.create(Object.assign(Object.assign({},t),{type:e.TYPE}),s,r)}async retrieve(t,s,r){return this.resources.retrieve({type:e.TYPE,id:t},s,r)}async update(t,s,r){return this.resources.update(Object.assign(Object.assign({},t),{type:e.TYPE}),s,r)}async delete(t,s){await this.resources.delete({type:e.TYPE,id:t},s)}isPriceVolumeTier(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="price_volume_tiers";export default e;
|
@@ -2,6 +2,8 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
|
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { PriceList } from './price_lists';
|
4
4
|
import { Sku } from './skus';
|
5
|
+
import { PriceTier } from './price_tiers';
|
6
|
+
import { PriceVolumeTier } from './price_volume_tiers';
|
5
7
|
import { Attachment } from './attachments';
|
6
8
|
declare type PriceRel = ResourceRel & {
|
7
9
|
type: typeof Prices.TYPE;
|
@@ -12,6 +14,9 @@ declare type PriceListRel = ResourceRel & {
|
|
12
14
|
declare type SkuRel = ResourceRel & {
|
13
15
|
type: 'skus';
|
14
16
|
};
|
17
|
+
declare type PriceTierRel = ResourceRel & {
|
18
|
+
type: 'price_tiers';
|
19
|
+
};
|
15
20
|
interface Price extends Resource {
|
16
21
|
currency_code?: string;
|
17
22
|
sku_code?: string;
|
@@ -23,6 +28,8 @@ interface Price extends Resource {
|
|
23
28
|
formatted_compare_at_amount?: string;
|
24
29
|
price_list?: PriceList;
|
25
30
|
sku?: Sku;
|
31
|
+
price_tiers?: PriceTier[];
|
32
|
+
price_volume_tiers?: PriceVolumeTier[];
|
26
33
|
attachments?: Attachment[];
|
27
34
|
}
|
28
35
|
interface PriceCreate extends ResourceCreate {
|
@@ -31,6 +38,7 @@ interface PriceCreate extends ResourceCreate {
|
|
31
38
|
compare_at_amount_cents: number;
|
32
39
|
price_list: PriceListRel;
|
33
40
|
sku?: SkuRel;
|
41
|
+
price_tiers?: PriceTierRel[];
|
34
42
|
}
|
35
43
|
interface PriceUpdate extends ResourceUpdate {
|
36
44
|
sku_code?: string;
|
@@ -38,6 +46,7 @@ interface PriceUpdate extends ResourceUpdate {
|
|
38
46
|
compare_at_amount_cents?: number;
|
39
47
|
price_list?: PriceListRel;
|
40
48
|
sku?: SkuRel;
|
49
|
+
price_tiers?: PriceTierRel[];
|
41
50
|
}
|
42
51
|
declare class Prices extends ApiResource {
|
43
52
|
static readonly TYPE: 'prices';
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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 retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotionRule(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotion_rules";export default r;
|
@@ -1 +1 @@
|
|
1
|
-
import{ApiResource as
|
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 retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="promotions";export default r;
|
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
|
|
2
2
|
import { QueryParamsList, QueryParamsRetrieve } from '../query';
|
3
3
|
import { Order } from './orders';
|
4
4
|
import { Capture } from './captures';
|
5
|
+
import { Event } from './events';
|
5
6
|
declare type RefundRel = ResourceRel & {
|
6
7
|
type: typeof Refunds.TYPE;
|
7
8
|
};
|
@@ -19,6 +20,7 @@ interface Refund extends Resource {
|
|
19
20
|
gateway_transaction_id?: string;
|
20
21
|
order?: Order;
|
21
22
|
reference_capture?: Capture;
|
23
|
+
events?: Event[];
|
22
24
|
}
|
23
25
|
declare class Refunds extends ApiResource {
|
24
26
|
static readonly TYPE: 'refunds';
|
@@ -6,6 +6,7 @@ import { StockLocation } from './stock_locations';
|
|
6
6
|
import { Address } from './addresses';
|
7
7
|
import { ReturnLineItem } from './return_line_items';
|
8
8
|
import { Attachment } from './attachments';
|
9
|
+
import { Event } from './events';
|
9
10
|
declare type ReturnRel = ResourceRel & {
|
10
11
|
type: typeof Returns.TYPE;
|
11
12
|
};
|
@@ -33,6 +34,7 @@ interface Return extends Resource {
|
|
33
34
|
destination_address?: Address;
|
34
35
|
return_line_items?: ReturnLineItem[];
|
35
36
|
attachments?: Attachment[];
|
37
|
+
events?: Event[];
|
36
38
|
}
|
37
39
|
interface ReturnCreate extends ResourceCreate {
|
38
40
|
order: OrderRel;
|
@@ -11,6 +11,7 @@ import { StockTransfer } from './stock_transfers';
|
|
11
11
|
import { CarrierAccount } from './carrier_accounts';
|
12
12
|
import { Parcel } from './parcels';
|
13
13
|
import { Attachment } from './attachments';
|
14
|
+
import { Event } from './events';
|
14
15
|
declare type ShipmentRel = ResourceRel & {
|
15
16
|
type: typeof Shipments.TYPE;
|
16
17
|
};
|
@@ -29,6 +30,7 @@ interface Shipment extends Resource {
|
|
29
30
|
rates?: object[];
|
30
31
|
purchase_error_code?: string;
|
31
32
|
purchase_error_message?: string;
|
33
|
+
get_rates_errors?: object[];
|
32
34
|
get_rates_started_at?: string;
|
33
35
|
get_rates_completed_at?: string;
|
34
36
|
purchase_started_at?: string;
|
@@ -51,6 +53,7 @@ interface Shipment extends Resource {
|
|
51
53
|
carrier_accounts?: CarrierAccount[];
|
52
54
|
parcels?: Parcel[];
|
53
55
|
attachments?: Attachment[];
|
56
|
+
events?: Event[];
|
54
57
|
}
|
55
58
|
interface ShipmentUpdate extends ResourceUpdate {
|
56
59
|
_on_hold?: boolean;
|