@commercelayer/sdk 5.2.1 → 5.2.3

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 (49) hide show
  1. package/lib/cjs/client.js +3 -0
  2. package/lib/cjs/commercelayer.d.ts +2 -2
  3. package/lib/cjs/commercelayer.js +1 -1
  4. package/lib/cjs/error.d.ts +1 -0
  5. package/lib/cjs/resources/external_promotions.d.ts +3 -0
  6. package/lib/cjs/resources/external_promotions.js +4 -0
  7. package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
  8. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  9. package/lib/cjs/resources/fixed_price_promotions.d.ts +8 -8
  10. package/lib/cjs/resources/fixed_price_promotions.js +4 -4
  11. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -8
  12. package/lib/cjs/resources/free_gift_promotions.js +4 -4
  13. package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
  14. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  15. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +3 -0
  16. package/lib/cjs/resources/orders.d.ts +1 -0
  17. package/lib/cjs/resources/percentage_discount_promotions.d.ts +8 -8
  18. package/lib/cjs/resources/percentage_discount_promotions.js +4 -4
  19. package/lib/cjs/resources/promotions.d.ts +3 -0
  20. package/lib/cjs/resources/promotions.js +4 -0
  21. package/lib/cjs/resources/shipping_methods.d.ts +6 -0
  22. package/lib/cjs/resources/stripe_payments.d.ts +1 -0
  23. package/lib/cjs/util.d.ts +1 -0
  24. package/lib/esm/client.js +3 -0
  25. package/lib/esm/commercelayer.d.ts +2 -2
  26. package/lib/esm/commercelayer.js +1 -1
  27. package/lib/esm/error.d.ts +1 -0
  28. package/lib/esm/resources/external_promotions.d.ts +3 -0
  29. package/lib/esm/resources/external_promotions.js +4 -0
  30. package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
  31. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  32. package/lib/esm/resources/fixed_price_promotions.d.ts +8 -8
  33. package/lib/esm/resources/fixed_price_promotions.js +4 -4
  34. package/lib/esm/resources/free_gift_promotions.d.ts +8 -8
  35. package/lib/esm/resources/free_gift_promotions.js +4 -4
  36. package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
  37. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  38. package/lib/esm/resources/order_amount_promotion_rules.d.ts +3 -0
  39. package/lib/esm/resources/orders.d.ts +1 -0
  40. package/lib/esm/resources/percentage_discount_promotions.d.ts +8 -8
  41. package/lib/esm/resources/percentage_discount_promotions.js +4 -4
  42. package/lib/esm/resources/promotions.d.ts +3 -0
  43. package/lib/esm/resources/promotions.js +4 -0
  44. package/lib/esm/resources/shipping_methods.d.ts +6 -0
  45. package/lib/esm/resources/stripe_payments.d.ts +1 -0
  46. package/lib/esm/util.d.ts +1 -0
  47. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  48. package/lib/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +6 -6
package/lib/cjs/client.js CHANGED
@@ -31,8 +31,11 @@ const handleError = (error) => {
31
31
  const apiError = new error_1.ApiError(sdkError);
32
32
  apiError.type = error_1.ErrorType.RESPONSE;
33
33
  apiError.status = error.response.status;
34
+ apiError.statusText = error.response.statusText;
34
35
  apiError.code = String(apiError.status);
35
36
  apiError.errors = error.response.data.errors;
37
+ if (!apiError.message && apiError.statusText)
38
+ apiError.message = apiError.statusText;
36
39
  sdkError = apiError;
37
40
  }
38
41
  else if (error.request) {
@@ -2,7 +2,7 @@ import * as api from './api';
2
2
  import type { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
4
  import { type ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "4.2.4";
5
+ declare const OPEN_API_SCHEMA_VERSION = "4.3.0";
6
6
  export { OPEN_API_SCHEMA_VERSION };
7
7
  type SdkConfig = Record<string, unknown>;
8
8
  type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
10
  declare class CommerceLayerClient {
11
11
  #private;
12
12
  static get openApiSchemaVersion(): string;
13
- readonly openApiSchemaVersion = "4.2.4";
13
+ readonly openApiSchemaVersion = "4.3.0";
14
14
  addresses: api.Addresses;
15
15
  adjustments: api.Adjustments;
16
16
  adyen_gateways: api.AdyenGateways;
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
45
45
  const debug_1 = __importDefault(require("./debug"));
46
46
  const debug = (0, debug_1.default)('commercelayer');
47
47
  // Autogenerated schema version number, do not remove this line
48
- const OPEN_API_SCHEMA_VERSION = '4.2.4';
48
+ const OPEN_API_SCHEMA_VERSION = '4.3.0';
49
49
  exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
50
50
  class CommerceLayerClient {
51
51
  static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
@@ -22,6 +22,7 @@ declare class ApiError extends SdkError {
22
22
  static isApiError(error: any): error is ApiError;
23
23
  errors: any[];
24
24
  status?: number;
25
+ statusText?: string;
25
26
  constructor(error: SdkError);
26
27
  first(): any;
27
28
  }
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
@@ -47,6 +48,7 @@ interface ExternalPromotion extends Resource {
47
48
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
48
49
  sku_list_promotion_rule?: SkuListPromotionRule | null;
49
50
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
51
+ sku_list?: SkuList | null;
50
52
  attachments?: Attachment[] | null;
51
53
  events?: Event[] | null;
52
54
  tags?: Tag[] | null;
@@ -88,6 +90,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
88
90
  order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
89
91
  sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
90
92
  coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
93
+ sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
91
94
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
92
95
  events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
93
96
  tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -27,6 +27,10 @@ class ExternalPromotions extends resource_1.ApiResource {
27
27
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(externalPromotionId, params, options) {
31
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(externalPromotionId, params, options) {
31
35
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
@@ -48,6 +49,7 @@ interface FixedAmountPromotion extends Resource {
48
49
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
49
50
  sku_list_promotion_rule?: SkuListPromotionRule | null;
50
51
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
52
+ sku_list?: SkuList | null;
51
53
  attachments?: Attachment[] | null;
52
54
  events?: Event[] | null;
53
55
  tags?: Tag[] | null;
@@ -89,6 +91,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
89
91
  order_amount_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
90
92
  sku_list_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
91
93
  coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
94
+ sku_list(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
92
95
  attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
93
96
  events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
94
97
  tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -27,6 +27,10 @@ class FixedAmountPromotions extends resource_1.ApiResource {
27
27
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(fixedAmountPromotionId, params, options) {
31
+ const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(fixedAmountPromotionId, params, options) {
31
35
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/attachments`, params, options);
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type FixedPricePromotionType = 'fixed_price_promotions';
15
15
  type FixedPricePromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface FixedPricePromotion extends Resource {
40
40
  readonly type: FixedPricePromotionType;
41
41
  name: string;
@@ -53,10 +53,10 @@ interface FixedPricePromotion extends Resource {
53
53
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
54
54
  sku_list_promotion_rule?: SkuListPromotionRule | null;
55
55
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
56
+ sku_list?: SkuList | null;
56
57
  attachments?: Attachment[] | null;
57
58
  events?: Event[] | null;
58
59
  tags?: Tag[] | null;
59
- sku_list?: SkuList | null;
60
60
  skus?: Sku[] | null;
61
61
  }
62
62
  interface FixedPricePromotionCreate extends ResourceCreate {
@@ -71,8 +71,8 @@ interface FixedPricePromotionCreate extends ResourceCreate {
71
71
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
72
72
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
73
73
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
74
- tags?: TagRel[] | null;
75
74
  sku_list: SkuListRel;
75
+ tags?: TagRel[] | null;
76
76
  }
77
77
  interface FixedPricePromotionUpdate extends ResourceUpdate {
78
78
  name?: string | null;
@@ -86,8 +86,8 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
86
86
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
87
87
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
88
88
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
89
- tags?: TagRel[] | null;
90
89
  sku_list?: SkuListRel | null;
90
+ tags?: TagRel[] | null;
91
91
  }
92
92
  declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
93
93
  static readonly TYPE: FixedPricePromotionType;
@@ -98,10 +98,10 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
98
98
  order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
99
99
  sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
100
100
  coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
101
+ sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
101
102
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
102
103
  events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
103
104
  tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
104
- sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
105
105
  skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
106
106
  isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
107
107
  relationship(id: string | ResourceId | null): FixedPricePromotionRel;
@@ -27,6 +27,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
27
27
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(fixedPricePromotionId, params, options) {
31
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(fixedPricePromotionId, params, options) {
31
35
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class FixedPricePromotions extends resource_1.ApiResource {
39
43
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(fixedPricePromotionId, params, options) {
43
- const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(fixedPricePromotionId, params, options) {
47
47
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type FreeGiftPromotionType = 'free_gift_promotions';
15
15
  type FreeGiftPromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface FreeGiftPromotion extends Resource {
40
40
  readonly type: FreeGiftPromotionType;
41
41
  name: string;
@@ -51,10 +51,10 @@ interface FreeGiftPromotion extends Resource {
51
51
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
52
52
  sku_list_promotion_rule?: SkuListPromotionRule | null;
53
53
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
54
+ sku_list?: SkuList | null;
54
55
  attachments?: Attachment[] | null;
55
56
  events?: Event[] | null;
56
57
  tags?: Tag[] | null;
57
- sku_list?: SkuList | null;
58
58
  skus?: Sku[] | null;
59
59
  }
60
60
  interface FreeGiftPromotionCreate extends ResourceCreate {
@@ -69,8 +69,8 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
69
69
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
70
70
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
71
71
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
72
- tags?: TagRel[] | null;
73
72
  sku_list: SkuListRel;
73
+ tags?: TagRel[] | null;
74
74
  }
75
75
  interface FreeGiftPromotionUpdate extends ResourceUpdate {
76
76
  name?: string | null;
@@ -84,8 +84,8 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
84
84
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
85
85
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
86
86
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
87
- tags?: TagRel[] | null;
88
87
  sku_list?: SkuListRel | null;
88
+ tags?: TagRel[] | null;
89
89
  }
90
90
  declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
91
91
  static readonly TYPE: FreeGiftPromotionType;
@@ -96,10 +96,10 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
96
96
  order_amount_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
97
97
  sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
98
98
  coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
99
+ sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
99
100
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
100
101
  events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
101
102
  tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
102
- sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
103
103
  skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
104
  isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
105
105
  relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
@@ -27,6 +27,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
27
27
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(freeGiftPromotionId, params, options) {
31
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(freeGiftPromotionId, params, options) {
31
35
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class FreeGiftPromotions extends resource_1.ApiResource {
39
43
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(freeGiftPromotionId, params, options) {
43
- const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(freeGiftPromotionId, params, options) {
47
47
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
@@ -45,6 +46,7 @@ interface FreeShippingPromotion extends Resource {
45
46
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
46
47
  sku_list_promotion_rule?: SkuListPromotionRule | null;
47
48
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
49
+ sku_list?: SkuList | null;
48
50
  attachments?: Attachment[] | null;
49
51
  events?: Event[] | null;
50
52
  tags?: Tag[] | null;
@@ -84,6 +86,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
84
86
  order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
85
87
  sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
86
88
  coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
89
+ sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
87
90
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
88
91
  events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
89
92
  tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -27,6 +27,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
27
27
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(freeShippingPromotionId, params, options) {
31
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(freeShippingPromotionId, params, options) {
31
35
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options);
@@ -34,14 +34,17 @@ interface OrderAmountPromotionRule extends Resource {
34
34
  order_amount_cents?: number | null;
35
35
  order_amount_float?: number | null;
36
36
  formatted_order_amount?: string | null;
37
+ use_subtotal?: boolean | null;
37
38
  promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
38
39
  }
39
40
  interface OrderAmountPromotionRuleCreate extends ResourceCreate {
40
41
  order_amount_cents?: number | null;
42
+ use_subtotal?: boolean | null;
41
43
  promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
42
44
  }
43
45
  interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
44
46
  order_amount_cents?: number | null;
47
+ use_subtotal?: boolean | null;
45
48
  promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
46
49
  }
47
50
  declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {
@@ -166,6 +166,7 @@ interface Order extends Resource {
166
166
  line_item_options_count?: number | null;
167
167
  shipments_count?: number | null;
168
168
  tax_calculations_count?: number | null;
169
+ validations_count?: number | null;
169
170
  payment_source_details?: Record<string, any> | null;
170
171
  token?: string | null;
171
172
  cart_url?: string | null;
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type PercentageDiscountPromotionType = 'percentage_discount_promotions';
15
15
  type PercentageDiscountPromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface PercentageDiscountPromotion extends Resource {
40
40
  readonly type: PercentageDiscountPromotionType;
41
41
  name: string;
@@ -51,10 +51,10 @@ interface PercentageDiscountPromotion extends Resource {
51
51
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
52
52
  sku_list_promotion_rule?: SkuListPromotionRule | null;
53
53
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
54
+ sku_list?: SkuList | null;
54
55
  attachments?: Attachment[] | null;
55
56
  events?: Event[] | null;
56
57
  tags?: Tag[] | null;
57
- sku_list?: SkuList | null;
58
58
  skus?: Sku[] | null;
59
59
  }
60
60
  interface PercentageDiscountPromotionCreate extends ResourceCreate {
@@ -69,8 +69,8 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
69
69
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
70
70
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
71
71
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
72
- tags?: TagRel[] | null;
73
72
  sku_list?: SkuListRel | null;
73
+ tags?: TagRel[] | null;
74
74
  }
75
75
  interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
76
76
  name?: string | null;
@@ -84,8 +84,8 @@ interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
84
84
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
85
85
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
86
86
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
87
- tags?: TagRel[] | null;
88
87
  sku_list?: SkuListRel | null;
88
+ tags?: TagRel[] | null;
89
89
  }
90
90
  declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion> {
91
91
  static readonly TYPE: PercentageDiscountPromotionType;
@@ -96,10 +96,10 @@ declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscoun
96
96
  order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
97
97
  sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
98
98
  coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
99
+ sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
99
100
  attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
100
101
  events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
101
102
  tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
102
- sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
103
103
  skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
104
  isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
105
105
  relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
@@ -27,6 +27,10 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
27
27
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(percentageDiscountPromotionId, params, options) {
31
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(percentageDiscountPromotionId, params, options) {
31
35
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
39
43
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(percentageDiscountPromotionId, params, options) {
43
- const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(percentageDiscountPromotionId, params, options) {
47
47
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag } from './tags';
@@ -27,6 +28,7 @@ interface Promotion extends Resource {
27
28
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
28
29
  sku_list_promotion_rule?: SkuListPromotionRule | null;
29
30
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
31
+ sku_list?: SkuList | null;
30
32
  attachments?: Attachment[] | null;
31
33
  events?: Event[] | null;
32
34
  tags?: Tag[] | null;
@@ -37,6 +39,7 @@ declare class Promotions extends ApiResource<Promotion> {
37
39
  order_amount_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
38
40
  sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
39
41
  coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
42
+ sku_list(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
40
43
  attachments(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
41
44
  events(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
42
45
  tags(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -18,6 +18,10 @@ class Promotions extends resource_1.ApiResource {
18
18
  const _promotionId = promotionId.id || promotionId;
19
19
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `promotions/${_promotionId}/coupon_codes_promotion_rule`, params, options);
20
20
  }
21
+ async sku_list(promotionId, params, options) {
22
+ const _promotionId = promotionId.id || promotionId;
23
+ return this.resources.fetch({ type: 'sku_lists' }, `promotions/${_promotionId}/sku_list`, params, options);
24
+ }
21
25
  async attachments(promotionId, params, options) {
22
26
  const _promotionId = promotionId.id || promotionId;
23
27
  return this.resources.fetch({ type: 'attachments' }, `promotions/${_promotionId}/attachments`, params, options);
@@ -33,6 +33,7 @@ interface ShippingMethod extends Resource {
33
33
  name: string;
34
34
  scheme?: string | null;
35
35
  currency_code?: string | null;
36
+ external_prices_url?: string | null;
36
37
  disabled_at?: string | null;
37
38
  price_amount_cents: number;
38
39
  price_amount_float?: number | null;
@@ -40,6 +41,7 @@ interface ShippingMethod extends Resource {
40
41
  free_over_amount_cents?: number | null;
41
42
  free_over_amount_float?: number | null;
42
43
  formatted_free_over_amount?: string | null;
44
+ use_subtotal?: boolean | null;
43
45
  price_amount_for_shipment_cents?: number | null;
44
46
  price_amount_for_shipment_float?: number | null;
45
47
  formatted_price_amount_for_shipment?: string | null;
@@ -59,8 +61,10 @@ interface ShippingMethodCreate extends ResourceCreate {
59
61
  name: string;
60
62
  scheme?: string | null;
61
63
  currency_code?: string | null;
64
+ external_prices_url?: string | null;
62
65
  price_amount_cents: number;
63
66
  free_over_amount_cents?: number | null;
67
+ use_subtotal?: boolean | null;
64
68
  min_weight?: number | null;
65
69
  max_weight?: number | null;
66
70
  unit_of_weight?: string | null;
@@ -74,10 +78,12 @@ interface ShippingMethodUpdate extends ResourceUpdate {
74
78
  name?: string | null;
75
79
  scheme?: string | null;
76
80
  currency_code?: string | null;
81
+ external_prices_url?: string | null;
77
82
  _disable?: boolean | null;
78
83
  _enable?: boolean | null;
79
84
  price_amount_cents?: number | null;
80
85
  free_over_amount_cents?: number | null;
86
+ use_subtotal?: boolean | null;
81
87
  min_weight?: number | null;
82
88
  max_weight?: number | null;
83
89
  unit_of_weight?: string | null;
@@ -30,6 +30,7 @@ interface StripePaymentCreate extends ResourceCreate {
30
30
  }
31
31
  interface StripePaymentUpdate extends ResourceUpdate {
32
32
  options?: Record<string, any> | null;
33
+ _update?: boolean | null;
33
34
  _refresh?: boolean | null;
34
35
  order?: OrderRel | null;
35
36
  }
package/lib/cjs/util.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
+ /// <reference types="node" />
5
6
  import type { ObjectType } from "./common";
6
7
  declare const sleep: (ms: number) => Promise<NodeJS.Timeout>;
7
8
  declare const sortObjectFields: (obj: ObjectType) => ObjectType;
package/lib/esm/client.js CHANGED
@@ -26,8 +26,11 @@ const handleError = (error) => {
26
26
  const apiError = new ApiError(sdkError);
27
27
  apiError.type = ErrorType.RESPONSE;
28
28
  apiError.status = error.response.status;
29
+ apiError.statusText = error.response.statusText;
29
30
  apiError.code = String(apiError.status);
30
31
  apiError.errors = error.response.data.errors;
32
+ if (!apiError.message && apiError.statusText)
33
+ apiError.message = apiError.statusText;
31
34
  sdkError = apiError;
32
35
  }
33
36
  else if (error.request) {
@@ -2,7 +2,7 @@ import * as api from './api';
2
2
  import type { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
4
  import { type ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "4.2.4";
5
+ declare const OPEN_API_SCHEMA_VERSION = "4.3.0";
6
6
  export { OPEN_API_SCHEMA_VERSION };
7
7
  type SdkConfig = Record<string, unknown>;
8
8
  type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
10
  declare class CommerceLayerClient {
11
11
  #private;
12
12
  static get openApiSchemaVersion(): string;
13
- readonly openApiSchemaVersion = "4.2.4";
13
+ readonly openApiSchemaVersion = "4.3.0";
14
14
  addresses: api.Addresses;
15
15
  adjustments: api.Adjustments;
16
16
  adyen_gateways: api.AdyenGateways;
@@ -16,7 +16,7 @@ import ResourceAdapter from './resource';
16
16
  import Debug from './debug';
17
17
  const debug = Debug('commercelayer');
18
18
  // Autogenerated schema version number, do not remove this line
19
- const OPEN_API_SCHEMA_VERSION = '4.2.4';
19
+ const OPEN_API_SCHEMA_VERSION = '4.3.0';
20
20
  export { OPEN_API_SCHEMA_VERSION };
21
21
  class CommerceLayerClient {
22
22
  static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
@@ -22,6 +22,7 @@ declare class ApiError extends SdkError {
22
22
  static isApiError(error: any): error is ApiError;
23
23
  errors: any[];
24
24
  status?: number;
25
+ statusText?: string;
25
26
  constructor(error: SdkError);
26
27
  first(): any;
27
28
  }