@commercelayer/sdk 2.1.3 → 2.2.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/api.d.ts +6 -3
- package/lib/commercelayer.d.ts +3 -0
- package/lib/model.d.ts +4 -1
- package/lib/resources/addresses.d.ts +1 -1
- package/lib/resources/adjustments.d.ts +1 -1
- package/lib/resources/adyen_gateways.d.ts +1 -1
- package/lib/resources/adyen_payments.d.ts +1 -1
- package/lib/resources/application.d.ts +1 -1
- package/lib/resources/attachments.d.ts +1 -1
- package/lib/resources/authorizations.d.ts +1 -1
- package/lib/resources/avalara_accounts.d.ts +1 -1
- package/lib/resources/billing_info_validation_rules.d.ts +1 -1
- package/lib/resources/bing_geocoders.d.ts +1 -1
- package/lib/resources/braintree_gateways.d.ts +1 -1
- package/lib/resources/braintree_payments.d.ts +1 -1
- package/lib/resources/bundles.d.ts +1 -1
- package/lib/resources/captures.d.ts +1 -1
- package/lib/resources/carrier_accounts.d.ts +1 -1
- package/lib/resources/checkout_com_gateways.d.ts +1 -1
- package/lib/resources/checkout_com_payments.d.ts +1 -1
- package/lib/resources/coupon_codes_promotion_rules.d.ts +12 -4
- package/lib/resources/coupon_recipients.d.ts +46 -0
- package/lib/resources/coupons.d.ts +4 -1
- package/lib/resources/customer_addresses.d.ts +1 -1
- package/lib/resources/customer_groups.d.ts +1 -1
- package/lib/resources/customer_password_resets.d.ts +1 -1
- package/lib/resources/customer_payment_sources.d.ts +1 -1
- package/lib/resources/customer_subscriptions.d.ts +1 -1
- package/lib/resources/customers.d.ts +1 -1
- package/lib/resources/delivery_lead_times.d.ts +1 -1
- package/lib/resources/event_callbacks.d.ts +3 -2
- package/lib/resources/external_gateways.d.ts +1 -1
- package/lib/resources/external_payments.d.ts +1 -1
- package/lib/resources/external_promotions.d.ts +1 -1
- package/lib/resources/external_tax_calculators.d.ts +1 -1
- package/lib/resources/fixed_amount_promotions.d.ts +1 -1
- package/lib/resources/fixed_price_promotions.d.ts +93 -0
- package/lib/resources/free_gift_promotions.d.ts +91 -0
- package/lib/resources/free_shipping_promotions.d.ts +1 -1
- package/lib/resources/geocoders.d.ts +1 -1
- package/lib/resources/gift_card_recipients.d.ts +1 -1
- package/lib/resources/gift_cards.d.ts +1 -1
- package/lib/resources/google_geocoders.d.ts +1 -1
- package/lib/resources/imports.d.ts +1 -1
- package/lib/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/resources/inventory_models.d.ts +1 -1
- package/lib/resources/inventory_return_locations.d.ts +1 -1
- package/lib/resources/inventory_stock_locations.d.ts +1 -1
- package/lib/resources/line_item_options.d.ts +1 -1
- package/lib/resources/line_items.d.ts +1 -1
- package/lib/resources/manual_gateways.d.ts +1 -1
- package/lib/resources/manual_tax_calculators.d.ts +1 -1
- package/lib/resources/markets.d.ts +1 -1
- package/lib/resources/merchants.d.ts +1 -1
- package/lib/resources/order_amount_promotion_rules.d.ts +12 -4
- package/lib/resources/order_copies.d.ts +1 -1
- package/lib/resources/order_subscriptions.d.ts +1 -1
- package/lib/resources/order_validation_rules.d.ts +1 -1
- package/lib/resources/orders.d.ts +1 -1
- package/lib/resources/organization.d.ts +1 -1
- package/lib/resources/packages.d.ts +1 -1
- package/lib/resources/parcel_line_items.d.ts +1 -1
- package/lib/resources/parcels.d.ts +1 -1
- package/lib/resources/payment_gateways.d.ts +1 -1
- package/lib/resources/payment_methods.d.ts +1 -1
- package/lib/resources/paypal_gateways.d.ts +1 -1
- package/lib/resources/paypal_payments.d.ts +1 -1
- package/lib/resources/percentage_discount_promotions.d.ts +1 -1
- package/lib/resources/price_lists.d.ts +1 -1
- package/lib/resources/prices.d.ts +1 -1
- package/lib/resources/promotion_rules.d.ts +4 -2
- package/lib/resources/promotions.d.ts +1 -1
- package/lib/resources/refunds.d.ts +1 -1
- package/lib/resources/return_line_items.d.ts +1 -1
- package/lib/resources/returns.d.ts +1 -1
- package/lib/resources/shipments.d.ts +1 -1
- package/lib/resources/shipping_categories.d.ts +1 -1
- package/lib/resources/shipping_methods.d.ts +1 -1
- package/lib/resources/shipping_zones.d.ts +1 -1
- package/lib/resources/sku_list_items.d.ts +1 -1
- package/lib/resources/sku_list_promotion_rules.d.ts +15 -4
- package/lib/resources/sku_lists.d.ts +1 -1
- package/lib/resources/sku_options.d.ts +1 -1
- package/lib/resources/skus.d.ts +1 -1
- package/lib/resources/stock_items.d.ts +1 -1
- package/lib/resources/stock_line_items.d.ts +1 -1
- package/lib/resources/stock_locations.d.ts +1 -1
- package/lib/resources/stock_transfers.d.ts +1 -1
- package/lib/resources/stripe_gateways.d.ts +1 -1
- package/lib/resources/stripe_payments.d.ts +1 -1
- package/lib/resources/tax_calculators.d.ts +1 -1
- package/lib/resources/tax_categories.d.ts +1 -1
- package/lib/resources/tax_rules.d.ts +1 -1
- package/lib/resources/taxjar_accounts.d.ts +1 -1
- package/lib/resources/transactions.d.ts +1 -1
- package/lib/resources/voids.d.ts +1 -1
- package/lib/resources/webhooks.d.ts +2 -2
- package/lib/resources/wire_transfers.d.ts +1 -1
- package/lib/sdk.cjs.development.js +558 -1
- package/lib/sdk.cjs.development.js.map +1 -1
- package/lib/sdk.cjs.production.min.js +1 -1
- package/lib/sdk.cjs.production.min.js.map +1 -1
- package/lib/sdk.esm.js +558 -1
- package/lib/sdk.esm.js.map +1 -1
- package/package.json +2 -3
package/lib/api.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
export { default as Addresses } from './resources/addresses';
|
6
6
|
export { default as Adjustments } from './resources/adjustments';
|
@@ -20,6 +20,7 @@ export { default as CarrierAccounts } from './resources/carrier_accounts';
|
|
20
20
|
export { default as CheckoutComGateways } from './resources/checkout_com_gateways';
|
21
21
|
export { default as CheckoutComPayments } from './resources/checkout_com_payments';
|
22
22
|
export { default as CouponCodesPromotionRules } from './resources/coupon_codes_promotion_rules';
|
23
|
+
export { default as CouponRecipients } from './resources/coupon_recipients';
|
23
24
|
export { default as Coupons } from './resources/coupons';
|
24
25
|
export { default as CustomerAddresses } from './resources/customer_addresses';
|
25
26
|
export { default as CustomerGroups } from './resources/customer_groups';
|
@@ -34,6 +35,8 @@ export { default as ExternalPayments } from './resources/external_payments';
|
|
34
35
|
export { default as ExternalPromotions } from './resources/external_promotions';
|
35
36
|
export { default as ExternalTaxCalculators } from './resources/external_tax_calculators';
|
36
37
|
export { default as FixedAmountPromotions } from './resources/fixed_amount_promotions';
|
38
|
+
export { default as FixedPricePromotions } from './resources/fixed_price_promotions';
|
39
|
+
export { default as FreeGiftPromotions } from './resources/free_gift_promotions';
|
37
40
|
export { default as FreeShippingPromotions } from './resources/free_shipping_promotions';
|
38
41
|
export { default as Geocoders } from './resources/geocoders';
|
39
42
|
export { default as GiftCardRecipients } from './resources/gift_card_recipients';
|
@@ -94,5 +97,5 @@ export { default as Transactions } from './resources/transactions';
|
|
94
97
|
export { default as Voids } from './resources/voids';
|
95
98
|
export { default as Webhooks } from './resources/webhooks';
|
96
99
|
export { default as WireTransfers } from './resources/wire_transfers';
|
97
|
-
export declare type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
98
|
-
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "coupon_codes_promotion_rules", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_methods", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
100
|
+
export declare type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
|
101
|
+
export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_methods", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
|
package/lib/commercelayer.d.ts
CHANGED
@@ -25,6 +25,7 @@ declare class CommerceLayerClient {
|
|
25
25
|
checkout_com_gateways: api.CheckoutComGateways;
|
26
26
|
checkout_com_payments: api.CheckoutComPayments;
|
27
27
|
coupon_codes_promotion_rules: api.CouponCodesPromotionRules;
|
28
|
+
coupon_recipients: api.CouponRecipients;
|
28
29
|
coupons: api.Coupons;
|
29
30
|
customer_addresses: api.CustomerAddresses;
|
30
31
|
customer_groups: api.CustomerGroups;
|
@@ -39,6 +40,8 @@ declare class CommerceLayerClient {
|
|
39
40
|
external_promotions: api.ExternalPromotions;
|
40
41
|
external_tax_calculators: api.ExternalTaxCalculators;
|
41
42
|
fixed_amount_promotions: api.FixedAmountPromotions;
|
43
|
+
fixed_price_promotions: api.FixedPricePromotions;
|
44
|
+
free_gift_promotions: api.FreeGiftPromotions;
|
42
45
|
free_shipping_promotions: api.FreeShippingPromotions;
|
43
46
|
geocoders: api.Geocoders;
|
44
47
|
gift_card_recipients: api.GiftCardRecipients;
|
package/lib/model.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
|
6
6
|
export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
|
@@ -20,6 +20,7 @@ export type { CarrierAccount } from './resources/carrier_accounts';
|
|
20
20
|
export type { CheckoutComGateway, CheckoutComGatewayCreate, CheckoutComGatewayUpdate } from './resources/checkout_com_gateways';
|
21
21
|
export type { CheckoutComPayment, CheckoutComPaymentCreate, CheckoutComPaymentUpdate } from './resources/checkout_com_payments';
|
22
22
|
export type { CouponCodesPromotionRule, CouponCodesPromotionRuleCreate, CouponCodesPromotionRuleUpdate } from './resources/coupon_codes_promotion_rules';
|
23
|
+
export type { CouponRecipient, CouponRecipientCreate, CouponRecipientUpdate } from './resources/coupon_recipients';
|
23
24
|
export type { Coupon, CouponCreate, CouponUpdate } from './resources/coupons';
|
24
25
|
export type { CustomerAddress, CustomerAddressCreate, CustomerAddressUpdate } from './resources/customer_addresses';
|
25
26
|
export type { CustomerGroup, CustomerGroupCreate, CustomerGroupUpdate } from './resources/customer_groups';
|
@@ -34,6 +35,8 @@ export type { ExternalPayment, ExternalPaymentCreate, ExternalPaymentUpdate } fr
|
|
34
35
|
export type { ExternalPromotion, ExternalPromotionCreate, ExternalPromotionUpdate } from './resources/external_promotions';
|
35
36
|
export type { ExternalTaxCalculator, ExternalTaxCalculatorCreate, ExternalTaxCalculatorUpdate } from './resources/external_tax_calculators';
|
36
37
|
export type { FixedAmountPromotion, FixedAmountPromotionCreate, FixedAmountPromotionUpdate } from './resources/fixed_amount_promotions';
|
38
|
+
export type { FixedPricePromotion, FixedPricePromotionCreate, FixedPricePromotionUpdate } from './resources/fixed_price_promotions';
|
39
|
+
export type { FreeGiftPromotion, FreeGiftPromotionCreate, FreeGiftPromotionUpdate } from './resources/free_gift_promotions';
|
37
40
|
export type { FreeShippingPromotion, FreeShippingPromotionCreate, FreeShippingPromotionUpdate } from './resources/free_shipping_promotions';
|
38
41
|
export type { Geocoder } from './resources/geocoders';
|
39
42
|
export type { GiftCardRecipient, GiftCardRecipientCreate, GiftCardRecipientUpdate } from './resources/gift_card_recipients';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourcesConfig, ResourceId } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,12 +1,14 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
7
|
import { PercentageDiscountPromotion } from './percentage_discount_promotions';
|
8
8
|
import { FreeShippingPromotion } from './free_shipping_promotions';
|
9
9
|
import { FixedAmountPromotion } from './fixed_amount_promotions';
|
10
|
+
import { FreeGiftPromotion } from './free_gift_promotions';
|
11
|
+
import { FixedPricePromotion } from './fixed_price_promotions';
|
10
12
|
import { ExternalPromotion } from './external_promotions';
|
11
13
|
import { Coupon } from './coupons';
|
12
14
|
declare type CouponCodesPromotionRuleRel = ResourceId & {
|
@@ -21,6 +23,12 @@ declare type FreeShippingPromotionRel = ResourceId & {
|
|
21
23
|
declare type FixedAmountPromotionRel = ResourceId & {
|
22
24
|
type: 'fixed_amount_promotions';
|
23
25
|
};
|
26
|
+
declare type FreeGiftPromotionRel = ResourceId & {
|
27
|
+
type: 'free_gift_promotions';
|
28
|
+
};
|
29
|
+
declare type FixedPricePromotionRel = ResourceId & {
|
30
|
+
type: 'fixed_price_promotions';
|
31
|
+
};
|
24
32
|
declare type ExternalPromotionRel = ResourceId & {
|
25
33
|
type: 'external_promotions';
|
26
34
|
};
|
@@ -28,15 +36,15 @@ declare type CouponRel = ResourceId & {
|
|
28
36
|
type: 'coupons';
|
29
37
|
};
|
30
38
|
interface CouponCodesPromotionRule extends Resource {
|
31
|
-
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | ExternalPromotion;
|
39
|
+
promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
|
32
40
|
coupons?: Coupon[];
|
33
41
|
}
|
34
42
|
interface CouponCodesPromotionRuleCreate extends ResourceCreate {
|
35
|
-
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | ExternalPromotionRel;
|
43
|
+
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
|
36
44
|
coupons?: CouponRel[];
|
37
45
|
}
|
38
46
|
interface CouponCodesPromotionRuleUpdate extends ResourceUpdate {
|
39
|
-
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | ExternalPromotionRel;
|
47
|
+
promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
|
40
48
|
coupons?: CouponRel[];
|
41
49
|
}
|
42
50
|
declare class CouponCodesPromotionRules extends ApiResource {
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { Customer } from './customers';
|
8
|
+
import { Attachment } from './attachments';
|
9
|
+
declare type CouponRecipientRel = ResourceId & {
|
10
|
+
type: typeof CouponRecipients.TYPE;
|
11
|
+
};
|
12
|
+
declare type CustomerRel = ResourceId & {
|
13
|
+
type: 'customers';
|
14
|
+
};
|
15
|
+
interface CouponRecipient extends Resource {
|
16
|
+
email?: string;
|
17
|
+
first_name?: string;
|
18
|
+
last_name?: string;
|
19
|
+
customer?: Customer;
|
20
|
+
attachments?: Attachment[];
|
21
|
+
}
|
22
|
+
interface CouponRecipientCreate extends ResourceCreate {
|
23
|
+
email: string;
|
24
|
+
first_name?: string;
|
25
|
+
last_name?: string;
|
26
|
+
customer?: CustomerRel;
|
27
|
+
}
|
28
|
+
interface CouponRecipientUpdate extends ResourceUpdate {
|
29
|
+
email?: string;
|
30
|
+
first_name?: string;
|
31
|
+
last_name?: string;
|
32
|
+
customer?: CustomerRel;
|
33
|
+
}
|
34
|
+
declare class CouponRecipients extends ApiResource {
|
35
|
+
static readonly TYPE: 'coupon_recipients';
|
36
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CouponRecipient>>;
|
37
|
+
create(resource: CouponRecipientCreate, options?: ResourcesConfig): Promise<CouponRecipient>;
|
38
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponRecipient>;
|
39
|
+
update(resource: CouponRecipientUpdate, options?: ResourcesConfig): Promise<CouponRecipient>;
|
40
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
41
|
+
isCouponRecipient(resource: any): resource is CouponRecipient;
|
42
|
+
relationship(id: string | ResourceId): CouponRecipientRel;
|
43
|
+
type(): string;
|
44
|
+
}
|
45
|
+
export default CouponRecipients;
|
46
|
+
export { CouponRecipient, CouponRecipientCreate, CouponRecipientUpdate };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -15,16 +15,19 @@ interface Coupon extends Resource {
|
|
15
15
|
code?: string;
|
16
16
|
usage_limit?: number;
|
17
17
|
usage_count?: number;
|
18
|
+
recipient_email?: string;
|
18
19
|
promotion_rule?: CouponCodesPromotionRule;
|
19
20
|
}
|
20
21
|
interface CouponCreate extends ResourceCreate {
|
21
22
|
code: string;
|
22
23
|
usage_limit: number;
|
24
|
+
recipient_email?: string;
|
23
25
|
promotion_rule?: CouponCodesPromotionRuleRel;
|
24
26
|
}
|
25
27
|
interface CouponUpdate extends ResourceUpdate {
|
26
28
|
code?: string;
|
27
29
|
usage_limit?: number;
|
30
|
+
recipient_email?: string;
|
28
31
|
promotion_rule?: CouponCodesPromotionRuleRel;
|
29
32
|
}
|
30
33
|
declare class Coupons extends ApiResource {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
-
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
7
|
import { Webhook } from './webhooks';
|
8
8
|
declare type EventCallbackRel = ResourceId & {
|
9
9
|
type: typeof EventCallbacks.TYPE;
|
@@ -18,6 +18,7 @@ interface EventCallback extends Resource {
|
|
18
18
|
declare class EventCallbacks extends ApiResource {
|
19
19
|
static readonly TYPE: 'event_callbacks';
|
20
20
|
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
|
21
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<EventCallback>;
|
21
22
|
isEventCallback(resource: any): resource is EventCallback;
|
22
23
|
relationship(id: string | ResourceId): EventCallbackRel;
|
23
24
|
type(): string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* ©2021 Commerce Layer Inc.
|
3
|
-
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
4
|
**/
|
5
5
|
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
6
|
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/**
|
2
|
+
* ©2021 Commerce Layer Inc.
|
3
|
+
* Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
|
4
|
+
**/
|
5
|
+
import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
|
6
|
+
import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
|
7
|
+
import { Market } from './markets';
|
8
|
+
import { PromotionRule } from './promotion_rules';
|
9
|
+
import { OrderAmountPromotionRule } from './order_amount_promotion_rules';
|
10
|
+
import { SkuListPromotionRule } from './sku_list_promotion_rules';
|
11
|
+
import { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
|
12
|
+
import { Attachment } from './attachments';
|
13
|
+
import { SkuList } from './sku_lists';
|
14
|
+
import { Sku } from './skus';
|
15
|
+
declare type FixedPricePromotionRel = ResourceId & {
|
16
|
+
type: typeof FixedPricePromotions.TYPE;
|
17
|
+
};
|
18
|
+
declare type MarketRel = ResourceId & {
|
19
|
+
type: 'markets';
|
20
|
+
};
|
21
|
+
declare type PromotionRuleRel = ResourceId & {
|
22
|
+
type: 'promotion_rules';
|
23
|
+
};
|
24
|
+
declare type OrderAmountPromotionRuleRel = ResourceId & {
|
25
|
+
type: 'order_amount_promotion_rules';
|
26
|
+
};
|
27
|
+
declare type SkuListPromotionRuleRel = ResourceId & {
|
28
|
+
type: 'sku_list_promotion_rules';
|
29
|
+
};
|
30
|
+
declare type CouponCodesPromotionRuleRel = ResourceId & {
|
31
|
+
type: 'coupon_codes_promotion_rules';
|
32
|
+
};
|
33
|
+
declare type SkuListRel = ResourceId & {
|
34
|
+
type: 'sku_lists';
|
35
|
+
};
|
36
|
+
interface FixedPricePromotion extends Resource {
|
37
|
+
name?: string;
|
38
|
+
starts_at?: string;
|
39
|
+
expires_at?: string;
|
40
|
+
total_usage_limit?: number;
|
41
|
+
total_usage_count?: number;
|
42
|
+
active?: boolean;
|
43
|
+
fixed_amount_cents?: number;
|
44
|
+
fixed_amount_float?: number;
|
45
|
+
formatted_fixed_amount?: string;
|
46
|
+
market?: Market;
|
47
|
+
promotion_rules?: PromotionRule[];
|
48
|
+
order_amount_promotion_rule?: OrderAmountPromotionRule;
|
49
|
+
sku_list_promotion_rule?: SkuListPromotionRule;
|
50
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRule;
|
51
|
+
attachments?: Attachment[];
|
52
|
+
sku_list?: SkuList;
|
53
|
+
skus?: Sku[];
|
54
|
+
}
|
55
|
+
interface FixedPricePromotionCreate extends ResourceCreate {
|
56
|
+
name: string;
|
57
|
+
starts_at: string;
|
58
|
+
expires_at: string;
|
59
|
+
total_usage_limit: number;
|
60
|
+
fixed_amount_cents: number;
|
61
|
+
market?: MarketRel;
|
62
|
+
promotion_rules?: PromotionRuleRel[];
|
63
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
64
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
65
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
66
|
+
sku_list?: SkuListRel;
|
67
|
+
}
|
68
|
+
interface FixedPricePromotionUpdate extends ResourceUpdate {
|
69
|
+
name?: string;
|
70
|
+
starts_at?: string;
|
71
|
+
expires_at?: string;
|
72
|
+
total_usage_limit?: number;
|
73
|
+
fixed_amount_cents?: number;
|
74
|
+
market?: MarketRel;
|
75
|
+
promotion_rules?: PromotionRuleRel[];
|
76
|
+
order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
|
77
|
+
sku_list_promotion_rule?: SkuListPromotionRuleRel;
|
78
|
+
coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
|
79
|
+
sku_list?: SkuListRel;
|
80
|
+
}
|
81
|
+
declare class FixedPricePromotions extends ApiResource {
|
82
|
+
static readonly TYPE: 'fixed_price_promotions';
|
83
|
+
list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<FixedPricePromotion>>;
|
84
|
+
create(resource: FixedPricePromotionCreate, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
85
|
+
retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
86
|
+
update(resource: FixedPricePromotionUpdate, options?: ResourcesConfig): Promise<FixedPricePromotion>;
|
87
|
+
delete(id: string, options?: ResourcesConfig): Promise<void>;
|
88
|
+
isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
|
89
|
+
relationship(id: string | ResourceId): FixedPricePromotionRel;
|
90
|
+
type(): string;
|
91
|
+
}
|
92
|
+
export default FixedPricePromotions;
|
93
|
+
export { FixedPricePromotion, FixedPricePromotionCreate, FixedPricePromotionUpdate };
|