@commercelayer/sdk 2.1.0 → 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.
Files changed (107) hide show
  1. package/lib/api.d.ts +6 -3
  2. package/lib/commercelayer.d.ts +3 -0
  3. package/lib/index.d.ts +1 -1
  4. package/lib/interceptor.d.ts +2 -1
  5. package/lib/model.d.ts +4 -1
  6. package/lib/resources/addresses.d.ts +2 -1
  7. package/lib/resources/adjustments.d.ts +2 -1
  8. package/lib/resources/adyen_gateways.d.ts +2 -1
  9. package/lib/resources/adyen_payments.d.ts +2 -1
  10. package/lib/resources/application.d.ts +2 -1
  11. package/lib/resources/attachments.d.ts +2 -1
  12. package/lib/resources/authorizations.d.ts +2 -1
  13. package/lib/resources/avalara_accounts.d.ts +2 -1
  14. package/lib/resources/billing_info_validation_rules.d.ts +2 -1
  15. package/lib/resources/bing_geocoders.d.ts +2 -1
  16. package/lib/resources/braintree_gateways.d.ts +2 -1
  17. package/lib/resources/braintree_payments.d.ts +2 -1
  18. package/lib/resources/bundles.d.ts +2 -1
  19. package/lib/resources/captures.d.ts +2 -1
  20. package/lib/resources/carrier_accounts.d.ts +2 -1
  21. package/lib/resources/checkout_com_gateways.d.ts +2 -1
  22. package/lib/resources/checkout_com_payments.d.ts +2 -1
  23. package/lib/resources/coupon_codes_promotion_rules.d.ts +13 -4
  24. package/lib/resources/coupon_recipients.d.ts +46 -0
  25. package/lib/resources/coupons.d.ts +5 -1
  26. package/lib/resources/customer_addresses.d.ts +2 -1
  27. package/lib/resources/customer_groups.d.ts +2 -1
  28. package/lib/resources/customer_password_resets.d.ts +2 -1
  29. package/lib/resources/customer_payment_sources.d.ts +2 -1
  30. package/lib/resources/customer_subscriptions.d.ts +2 -1
  31. package/lib/resources/customers.d.ts +2 -1
  32. package/lib/resources/delivery_lead_times.d.ts +2 -1
  33. package/lib/resources/event_callbacks.d.ts +4 -2
  34. package/lib/resources/external_gateways.d.ts +2 -1
  35. package/lib/resources/external_payments.d.ts +2 -1
  36. package/lib/resources/external_promotions.d.ts +2 -1
  37. package/lib/resources/external_tax_calculators.d.ts +2 -1
  38. package/lib/resources/fixed_amount_promotions.d.ts +2 -1
  39. package/lib/resources/fixed_price_promotions.d.ts +93 -0
  40. package/lib/resources/free_gift_promotions.d.ts +91 -0
  41. package/lib/resources/free_shipping_promotions.d.ts +2 -1
  42. package/lib/resources/geocoders.d.ts +2 -1
  43. package/lib/resources/gift_card_recipients.d.ts +2 -1
  44. package/lib/resources/gift_cards.d.ts +2 -1
  45. package/lib/resources/google_geocoders.d.ts +2 -1
  46. package/lib/resources/imports.d.ts +2 -1
  47. package/lib/resources/in_stock_subscriptions.d.ts +2 -1
  48. package/lib/resources/inventory_models.d.ts +2 -1
  49. package/lib/resources/inventory_return_locations.d.ts +2 -1
  50. package/lib/resources/inventory_stock_locations.d.ts +2 -1
  51. package/lib/resources/line_item_options.d.ts +2 -1
  52. package/lib/resources/line_items.d.ts +2 -1
  53. package/lib/resources/manual_gateways.d.ts +2 -1
  54. package/lib/resources/manual_tax_calculators.d.ts +2 -1
  55. package/lib/resources/markets.d.ts +2 -1
  56. package/lib/resources/merchants.d.ts +2 -1
  57. package/lib/resources/order_amount_promotion_rules.d.ts +13 -4
  58. package/lib/resources/order_copies.d.ts +2 -1
  59. package/lib/resources/order_subscriptions.d.ts +2 -1
  60. package/lib/resources/order_validation_rules.d.ts +2 -1
  61. package/lib/resources/orders.d.ts +2 -1
  62. package/lib/resources/organization.d.ts +2 -1
  63. package/lib/resources/packages.d.ts +2 -1
  64. package/lib/resources/parcel_line_items.d.ts +2 -1
  65. package/lib/resources/parcels.d.ts +2 -1
  66. package/lib/resources/payment_gateways.d.ts +2 -1
  67. package/lib/resources/payment_methods.d.ts +2 -1
  68. package/lib/resources/paypal_gateways.d.ts +2 -1
  69. package/lib/resources/paypal_payments.d.ts +2 -1
  70. package/lib/resources/percentage_discount_promotions.d.ts +2 -1
  71. package/lib/resources/price_lists.d.ts +2 -1
  72. package/lib/resources/prices.d.ts +2 -1
  73. package/lib/resources/promotion_rules.d.ts +5 -2
  74. package/lib/resources/promotions.d.ts +2 -1
  75. package/lib/resources/refunds.d.ts +2 -1
  76. package/lib/resources/return_line_items.d.ts +2 -1
  77. package/lib/resources/returns.d.ts +2 -1
  78. package/lib/resources/shipments.d.ts +2 -1
  79. package/lib/resources/shipping_categories.d.ts +2 -1
  80. package/lib/resources/shipping_methods.d.ts +2 -1
  81. package/lib/resources/shipping_zones.d.ts +2 -1
  82. package/lib/resources/sku_list_items.d.ts +2 -1
  83. package/lib/resources/sku_list_promotion_rules.d.ts +16 -4
  84. package/lib/resources/sku_lists.d.ts +2 -1
  85. package/lib/resources/sku_options.d.ts +2 -1
  86. package/lib/resources/skus.d.ts +2 -1
  87. package/lib/resources/stock_items.d.ts +2 -1
  88. package/lib/resources/stock_line_items.d.ts +2 -1
  89. package/lib/resources/stock_locations.d.ts +2 -1
  90. package/lib/resources/stock_transfers.d.ts +2 -1
  91. package/lib/resources/stripe_gateways.d.ts +2 -1
  92. package/lib/resources/stripe_payments.d.ts +2 -1
  93. package/lib/resources/tax_calculators.d.ts +2 -1
  94. package/lib/resources/tax_categories.d.ts +2 -1
  95. package/lib/resources/tax_rules.d.ts +2 -1
  96. package/lib/resources/taxjar_accounts.d.ts +2 -1
  97. package/lib/resources/transactions.d.ts +2 -1
  98. package/lib/resources/voids.d.ts +2 -1
  99. package/lib/resources/webhooks.d.ts +3 -2
  100. package/lib/resources/wire_transfers.d.ts +2 -1
  101. package/lib/sdk.cjs.development.js +1007 -82
  102. package/lib/sdk.cjs.development.js.map +1 -1
  103. package/lib/sdk.cjs.production.min.js +1 -1
  104. package/lib/sdk.cjs.production.min.js.map +1 -1
  105. package/lib/sdk.esm.js +1007 -82
  106. package/lib/sdk.esm.js.map +1 -1
  107. package/package.json +3 -2
@@ -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.0
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.3
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -40,6 +40,7 @@ declare class OrderCopies extends ApiResource {
40
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
41
  isOrderCopy(resource: any): resource is OrderCopy;
42
42
  relationship(id: string | ResourceId): OrderCopyRel;
43
+ type(): string;
43
44
  }
44
45
  export default OrderCopies;
45
46
  export { OrderCopy, OrderCopyCreate };
@@ -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.0
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';
@@ -60,6 +60,7 @@ declare class OrderSubscriptions extends ApiResource {
60
60
  delete(id: string, options?: ResourcesConfig): Promise<void>;
61
61
  isOrderSubscription(resource: any): resource is OrderSubscription;
62
62
  relationship(id: string | ResourceId): OrderSubscriptionRel;
63
+ type(): string;
63
64
  }
64
65
  export default OrderSubscriptions;
65
66
  export { OrderSubscription, OrderSubscriptionCreate, OrderSubscriptionUpdate };
@@ -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.0
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 } from '../query';
@@ -16,6 +16,7 @@ declare class OrderValidationRules extends ApiResource {
16
16
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<OrderValidationRule>>;
17
17
  isOrderValidationRule(resource: any): resource is OrderValidationRule;
18
18
  relationship(id: string | ResourceId): OrderValidationRuleRel;
19
+ type(): string;
19
20
  }
20
21
  export default OrderValidationRules;
21
22
  export { OrderValidationRule };
@@ -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.0
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';
@@ -249,6 +249,7 @@ declare class Orders extends ApiResource {
249
249
  delete(id: string, options?: ResourcesConfig): Promise<void>;
250
250
  isOrder(resource: any): resource is Order;
251
251
  relationship(id: string | ResourceId): OrderRel;
252
+ type(): string;
252
253
  }
253
254
  export default Orders;
254
255
  export { Order, OrderCreate, OrderUpdate };
@@ -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.0
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';
@@ -28,6 +28,7 @@ declare class Organizations extends ApiResource {
28
28
  retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Organization>;
29
29
  isOrganization(resource: any): resource is Organization;
30
30
  relationship(id: string | ResourceId): OrganizationRel;
31
+ type(): string;
31
32
  }
32
33
  export default Organizations;
33
34
  export { Organization };
@@ -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.0
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';
@@ -51,6 +51,7 @@ declare class Packages extends ApiResource {
51
51
  delete(id: string, options?: ResourcesConfig): Promise<void>;
52
52
  isPackage(resource: any): resource is Package;
53
53
  relationship(id: string | ResourceId): PackageRel;
54
+ type(): string;
54
55
  }
55
56
  export default Packages;
56
57
  export { Package, PackageCreate, PackageUpdate };
@@ -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.0
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';
@@ -45,6 +45,7 @@ declare class ParcelLineItems extends ApiResource {
45
45
  delete(id: string, options?: ResourcesConfig): Promise<void>;
46
46
  isParcelLineItem(resource: any): resource is ParcelLineItem;
47
47
  relationship(id: string | ResourceId): ParcelLineItemRel;
48
+ type(): string;
48
49
  }
49
50
  export default ParcelLineItems;
50
51
  export { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate };
@@ -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.0
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';
@@ -102,6 +102,7 @@ declare class Parcels extends ApiResource {
102
102
  delete(id: string, options?: ResourcesConfig): Promise<void>;
103
103
  isParcel(resource: any): resource is Parcel;
104
104
  relationship(id: string | ResourceId): ParcelRel;
105
+ type(): string;
105
106
  }
106
107
  export default Parcels;
107
108
  export { Parcel, ParcelCreate, ParcelUpdate };
@@ -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.0
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';
@@ -27,6 +27,7 @@ declare class PaymentGateways extends ApiResource {
27
27
  delete(id: string, options?: ResourcesConfig): Promise<void>;
28
28
  isPaymentGateway(resource: any): resource is PaymentGateway;
29
29
  relationship(id: string | ResourceId): PaymentGatewayRel;
30
+ type(): string;
30
31
  }
31
32
  export default PaymentGateways;
32
33
  export { PaymentGateway, PaymentGatewayCreate, PaymentGatewayUpdate };
@@ -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.0
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';
@@ -48,6 +48,7 @@ declare class PaymentMethods extends ApiResource {
48
48
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
49
  isPaymentMethod(resource: any): resource is PaymentMethod;
50
50
  relationship(id: string | ResourceId): PaymentMethodRel;
51
+ type(): string;
51
52
  }
52
53
  export default PaymentMethods;
53
54
  export { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate };
@@ -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.0
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';
@@ -35,6 +35,7 @@ declare class PaypalGateways extends ApiResource {
35
35
  delete(id: string, options?: ResourcesConfig): Promise<void>;
36
36
  isPaypalGateway(resource: any): resource is PaypalGateway;
37
37
  relationship(id: string | ResourceId): PaypalGatewayRel;
38
+ type(): string;
38
39
  }
39
40
  export default PaypalGateways;
40
41
  export { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate };
@@ -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.0
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';
@@ -43,6 +43,7 @@ declare class PaypalPayments extends ApiResource {
43
43
  delete(id: string, options?: ResourcesConfig): Promise<void>;
44
44
  isPaypalPayment(resource: any): resource is PaypalPayment;
45
45
  relationship(id: string | ResourceId): PaypalPaymentRel;
46
+ type(): string;
46
47
  }
47
48
  export default PaypalPayments;
48
49
  export { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate };
@@ -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.0
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';
@@ -85,6 +85,7 @@ declare class PercentageDiscountPromotions extends ApiResource {
85
85
  delete(id: string, options?: ResourcesConfig): Promise<void>;
86
86
  isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
87
87
  relationship(id: string | ResourceId): PercentageDiscountPromotionRel;
88
+ type(): string;
88
89
  }
89
90
  export default PercentageDiscountPromotions;
90
91
  export { PercentageDiscountPromotion, PercentageDiscountPromotionCreate, PercentageDiscountPromotionUpdate };
@@ -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.0
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';
@@ -35,6 +35,7 @@ declare class PriceLists extends ApiResource {
35
35
  delete(id: string, options?: ResourcesConfig): Promise<void>;
36
36
  isPriceList(resource: any): resource is PriceList;
37
37
  relationship(id: string | ResourceId): PriceListRel;
38
+ type(): string;
38
39
  }
39
40
  export default PriceLists;
40
41
  export { PriceList, PriceListCreate, PriceListUpdate };
@@ -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.0
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';
@@ -52,6 +52,7 @@ declare class Prices extends ApiResource {
52
52
  delete(id: string, options?: ResourcesConfig): Promise<void>;
53
53
  isPrice(resource: any): resource is Price;
54
54
  relationship(id: string | ResourceId): PriceRel;
55
+ type(): string;
55
56
  }
56
57
  export default Prices;
57
58
  export { Price, PriceCreate, PriceUpdate };
@@ -1,24 +1,27 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.0
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 } 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
  declare type PromotionRuleRel = ResourceId & {
12
14
  type: typeof PromotionRules.TYPE;
13
15
  };
14
16
  interface PromotionRule extends Resource {
15
- promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | ExternalPromotion;
17
+ promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
16
18
  }
17
19
  declare class PromotionRules extends ApiResource {
18
20
  static readonly TYPE: 'promotion_rules';
19
21
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PromotionRule>>;
20
22
  isPromotionRule(resource: any): resource is PromotionRule;
21
23
  relationship(id: string | ResourceId): PromotionRuleRel;
24
+ type(): string;
22
25
  }
23
26
  export default PromotionRules;
24
27
  export { PromotionRule };
@@ -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.0
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 } from '../query';
@@ -32,6 +32,7 @@ declare class Promotions extends ApiResource {
32
32
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Promotion>>;
33
33
  isPromotion(resource: any): resource is Promotion;
34
34
  relationship(id: string | ResourceId): PromotionRel;
35
+ type(): string;
35
36
  }
36
37
  export default Promotions;
37
38
  export { Promotion };
@@ -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.0
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';
@@ -30,6 +30,7 @@ declare class Refunds extends ApiResource {
30
30
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Refund>;
31
31
  isRefund(resource: any): resource is Refund;
32
32
  relationship(id: string | ResourceId): RefundRel;
33
+ type(): string;
33
34
  }
34
35
  export default Refunds;
35
36
  export { Refund };
@@ -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.0
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';
@@ -45,6 +45,7 @@ declare class ReturnLineItems extends ApiResource {
45
45
  delete(id: string, options?: ResourcesConfig): Promise<void>;
46
46
  isReturnLineItem(resource: any): resource is ReturnLineItem;
47
47
  relationship(id: string | ResourceId): ReturnLineItemRel;
48
+ type(): string;
48
49
  }
49
50
  export default ReturnLineItems;
50
51
  export { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate };
@@ -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.0
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';
@@ -63,6 +63,7 @@ declare class Returns extends ApiResource {
63
63
  delete(id: string, options?: ResourcesConfig): Promise<void>;
64
64
  isReturn(resource: any): resource is Return;
65
65
  relationship(id: string | ResourceId): ReturnRel;
66
+ type(): string;
66
67
  }
67
68
  export default Returns;
68
69
  export { Return, ReturnCreate, ReturnUpdate };
@@ -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.0
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';
@@ -74,6 +74,7 @@ declare class Shipments extends ApiResource {
74
74
  update(resource: ShipmentUpdate, options?: ResourcesConfig): Promise<Shipment>;
75
75
  isShipment(resource: any): resource is Shipment;
76
76
  relationship(id: string | ResourceId): ShipmentRel;
77
+ type(): string;
77
78
  }
78
79
  export default Shipments;
79
80
  export { Shipment, ShipmentUpdate };
@@ -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.0
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';
@@ -29,6 +29,7 @@ declare class ShippingCategories extends ApiResource {
29
29
  delete(id: string, options?: ResourcesConfig): Promise<void>;
30
30
  isShippingCategory(resource: any): resource is ShippingCategory;
31
31
  relationship(id: string | ResourceId): ShippingCategoryRel;
32
+ type(): string;
32
33
  }
33
34
  export default ShippingCategories;
34
35
  export { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate };
@@ -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.0
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';
@@ -65,6 +65,7 @@ declare class ShippingMethods extends ApiResource {
65
65
  delete(id: string, options?: ResourcesConfig): Promise<void>;
66
66
  isShippingMethod(resource: any): resource is ShippingMethod;
67
67
  relationship(id: string | ResourceId): ShippingMethodRel;
68
+ type(): string;
68
69
  }
69
70
  export default ShippingMethods;
70
71
  export { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate };
@@ -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.0
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';
@@ -45,6 +45,7 @@ declare class ShippingZones extends ApiResource {
45
45
  delete(id: string, options?: ResourcesConfig): Promise<void>;
46
46
  isShippingZone(resource: any): resource is ShippingZone;
47
47
  relationship(id: string | ResourceId): ShippingZoneRel;
48
+ type(): string;
48
49
  }
49
50
  export default ShippingZones;
50
51
  export { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate };
@@ -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.0
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';
@@ -40,6 +40,7 @@ declare class SkuListItems extends ApiResource {
40
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
41
  isSkuListItem(resource: any): resource is SkuListItem;
42
42
  relationship(id: string | ResourceId): SkuListItemRel;
43
+ type(): string;
43
44
  }
44
45
  export default SkuListItems;
45
46
  export { SkuListItem, SkuListItemCreate, SkuListItemUpdate };
@@ -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.0
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 { SkuList } from './sku_lists';
12
14
  import { Sku } from './skus';
@@ -22,6 +24,12 @@ declare type FreeShippingPromotionRel = ResourceId & {
22
24
  declare type FixedAmountPromotionRel = ResourceId & {
23
25
  type: 'fixed_amount_promotions';
24
26
  };
27
+ declare type FreeGiftPromotionRel = ResourceId & {
28
+ type: 'free_gift_promotions';
29
+ };
30
+ declare type FixedPricePromotionRel = ResourceId & {
31
+ type: 'fixed_price_promotions';
32
+ };
25
33
  declare type ExternalPromotionRel = ResourceId & {
26
34
  type: 'external_promotions';
27
35
  };
@@ -30,18 +38,21 @@ declare type SkuListRel = ResourceId & {
30
38
  };
31
39
  interface SkuListPromotionRule extends Resource {
32
40
  all_skus?: boolean;
33
- promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | ExternalPromotion;
41
+ min_quantity?: number;
42
+ promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
34
43
  sku_list?: SkuList;
35
44
  skus?: Sku[];
36
45
  }
37
46
  interface SkuListPromotionRuleCreate extends ResourceCreate {
38
47
  all_skus?: boolean;
39
- promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | ExternalPromotionRel;
48
+ min_quantity?: number;
49
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
40
50
  sku_list?: SkuListRel;
41
51
  }
42
52
  interface SkuListPromotionRuleUpdate extends ResourceUpdate {
43
53
  all_skus?: boolean;
44
- promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | ExternalPromotionRel;
54
+ min_quantity?: number;
55
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
45
56
  sku_list?: SkuListRel;
46
57
  }
47
58
  declare class SkuListPromotionRules extends ApiResource {
@@ -53,6 +64,7 @@ declare class SkuListPromotionRules extends ApiResource {
53
64
  delete(id: string, options?: ResourcesConfig): Promise<void>;
54
65
  isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
55
66
  relationship(id: string | ResourceId): SkuListPromotionRuleRel;
67
+ type(): string;
56
68
  }
57
69
  export default SkuListPromotionRules;
58
70
  export { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate };
@@ -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.0
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';
@@ -44,6 +44,7 @@ declare class SkuLists extends ApiResource {
44
44
  delete(id: string, options?: ResourcesConfig): Promise<void>;
45
45
  isSkuList(resource: any): resource is SkuList;
46
46
  relationship(id: string | ResourceId): SkuListRel;
47
+ type(): string;
47
48
  }
48
49
  export default SkuLists;
49
50
  export { SkuList, SkuListCreate, SkuListUpdate };
@@ -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.0
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';
@@ -49,6 +49,7 @@ declare class SkuOptions extends ApiResource {
49
49
  delete(id: string, options?: ResourcesConfig): Promise<void>;
50
50
  isSkuOption(resource: any): resource is SkuOption;
51
51
  relationship(id: string | ResourceId): SkuOptionRel;
52
+ type(): string;
52
53
  }
53
54
  export default SkuOptions;
54
55
  export { SkuOption, SkuOptionCreate, SkuOptionUpdate };
@@ -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.0
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';
@@ -70,6 +70,7 @@ declare class Skus extends ApiResource {
70
70
  delete(id: string, options?: ResourcesConfig): Promise<void>;
71
71
  isSku(resource: any): resource is Sku;
72
72
  relationship(id: string | ResourceId): SkuRel;
73
+ type(): string;
73
74
  }
74
75
  export default Skus;
75
76
  export { Sku, SkuCreate, SkuUpdate };
@@ -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.0
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';
@@ -44,6 +44,7 @@ declare class StockItems extends ApiResource {
44
44
  delete(id: string, options?: ResourcesConfig): Promise<void>;
45
45
  isStockItem(resource: any): resource is StockItem;
46
46
  relationship(id: string | ResourceId): StockItemRel;
47
+ type(): string;
47
48
  }
48
49
  export default StockItems;
49
50
  export { StockItem, StockItemCreate, StockItemUpdate };
@@ -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.0
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';
@@ -24,6 +24,7 @@ declare class StockLineItems extends ApiResource {
24
24
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
25
25
  isStockLineItem(resource: any): resource is StockLineItem;
26
26
  relationship(id: string | ResourceId): StockLineItemRel;
27
+ type(): string;
27
28
  }
28
29
  export default StockLineItems;
29
30
  export { StockLineItem };
@@ -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.0
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';
@@ -49,6 +49,7 @@ declare class StockLocations extends ApiResource {
49
49
  delete(id: string, options?: ResourcesConfig): Promise<void>;
50
50
  isStockLocation(resource: any): resource is StockLocation;
51
51
  relationship(id: string | ResourceId): StockLocationRel;
52
+ type(): string;
52
53
  }
53
54
  export default StockLocations;
54
55
  export { StockLocation, StockLocationCreate, StockLocationUpdate };
@@ -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.0
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';
@@ -64,6 +64,7 @@ declare class StockTransfers extends ApiResource {
64
64
  delete(id: string, options?: ResourcesConfig): Promise<void>;
65
65
  isStockTransfer(resource: any): resource is StockTransfer;
66
66
  relationship(id: string | ResourceId): StockTransferRel;
67
+ type(): string;
67
68
  }
68
69
  export default StockTransfers;
69
70
  export { StockTransfer, StockTransferCreate, StockTransferUpdate };
@@ -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.0
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';
@@ -34,6 +34,7 @@ declare class StripeGateways extends ApiResource {
34
34
  delete(id: string, options?: ResourcesConfig): Promise<void>;
35
35
  isStripeGateway(resource: any): resource is StripeGateway;
36
36
  relationship(id: string | ResourceId): StripeGatewayRel;
37
+ type(): string;
37
38
  }
38
39
  export default StripeGateways;
39
40
  export { StripeGateway, StripeGatewayCreate, StripeGatewayUpdate };