@commercelayer/sdk 6.12.0 → 6.13.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/index.d.mts CHANGED
@@ -57,7 +57,7 @@ type RequestConfig = {
57
57
  refreshToken?: RefreshToken;
58
58
  };
59
59
  type ApiConfig = {
60
- organization: string;
60
+ organization?: string;
61
61
  domain?: string;
62
62
  accessToken: string;
63
63
  };
@@ -935,11 +935,11 @@ type MarketRel$j = ResourceRel & {
935
935
  type PaymentGatewayRel = ResourceRel & {
936
936
  type: PaymentGatewayType;
937
937
  };
938
- type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort;
938
+ type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'name' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort;
939
939
  interface PaymentMethod extends Resource {
940
940
  readonly type: PaymentMethodType;
941
941
  /**
942
- * Payment source type, titleized.
942
+ * The payment method's internal name.
943
943
  * @example ```"Stripe Payment"```
944
944
  */
945
945
  name?: string | null;
@@ -1008,6 +1008,11 @@ interface PaymentMethod extends Resource {
1008
1008
  versions?: Version[] | null;
1009
1009
  }
1010
1010
  interface PaymentMethodCreate extends ResourceCreate {
1011
+ /**
1012
+ * The payment method's internal name.
1013
+ * @example ```"Stripe Payment"```
1014
+ */
1015
+ name?: string | null;
1011
1016
  /**
1012
1017
  * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'credit_cards', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.
1013
1018
  * @example ```"stripe_payments"```
@@ -1058,6 +1063,11 @@ interface PaymentMethodCreate extends ResourceCreate {
1058
1063
  payment_gateway: PaymentGatewayRel;
1059
1064
  }
1060
1065
  interface PaymentMethodUpdate extends ResourceUpdate {
1066
+ /**
1067
+ * The payment method's internal name.
1068
+ * @example ```"Stripe Payment"```
1069
+ */
1070
+ name?: string | null;
1061
1071
  /**
1062
1072
  * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'credit_cards', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.
1063
1073
  * @example ```"stripe_payments"```
@@ -3763,10 +3773,10 @@ interface Link extends Resource {
3763
3773
  */
3764
3774
  active?: boolean | null;
3765
3775
  /**
3766
- * The link status. One of 'expired', 'pending', 'active', or 'disabled'.
3776
+ * The link status. One of 'disabled', 'expired', 'pending', or 'active'.
3767
3777
  * @example ```"pending"```
3768
3778
  */
3769
- status?: 'expired' | 'pending' | 'active' | 'disabled' | null;
3779
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | null;
3770
3780
  /**
3771
3781
  * The link URL second level domain.
3772
3782
  * @example ```"commercelayer.link"```
@@ -4942,10 +4952,10 @@ interface ExternalPromotion extends Resource {
4942
4952
  */
4943
4953
  active?: boolean | null;
4944
4954
  /**
4945
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
4955
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
4946
4956
  * @example ```"pending"```
4947
4957
  */
4948
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
4958
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
4949
4959
  /**
4950
4960
  * Time at which this resource was disabled.
4951
4961
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5208,10 +5218,10 @@ interface FixedAmountPromotion extends Resource {
5208
5218
  */
5209
5219
  active?: boolean | null;
5210
5220
  /**
5211
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5221
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5212
5222
  * @example ```"pending"```
5213
5223
  */
5214
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5224
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5215
5225
  /**
5216
5226
  * Time at which this resource was disabled.
5217
5227
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5482,10 +5492,10 @@ interface FixedPricePromotion extends Resource {
5482
5492
  */
5483
5493
  active?: boolean | null;
5484
5494
  /**
5485
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5495
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5486
5496
  * @example ```"pending"```
5487
5497
  */
5488
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5498
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5489
5499
  /**
5490
5500
  * Time at which this resource was disabled.
5491
5501
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5801,10 +5811,10 @@ interface FreeGiftPromotion extends Resource {
5801
5811
  */
5802
5812
  active?: boolean | null;
5803
5813
  /**
5804
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5814
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5805
5815
  * @example ```"pending"```
5806
5816
  */
5807
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5817
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5808
5818
  /**
5809
5819
  * Time at which this resource was disabled.
5810
5820
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6102,10 +6112,10 @@ interface BuyXPayYPromotion extends Resource {
6102
6112
  */
6103
6113
  active?: boolean | null;
6104
6114
  /**
6105
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6115
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6106
6116
  * @example ```"pending"```
6107
6117
  */
6108
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6118
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6109
6119
  /**
6110
6120
  * Time at which this resource was disabled.
6111
6121
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6465,10 +6475,10 @@ interface FreeShippingPromotion extends Resource {
6465
6475
  */
6466
6476
  active?: boolean | null;
6467
6477
  /**
6468
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6478
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6469
6479
  * @example ```"pending"```
6470
6480
  */
6471
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6481
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6472
6482
  /**
6473
6483
  * Time at which this resource was disabled.
6474
6484
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6782,10 +6792,10 @@ interface PercentageDiscountPromotion extends Resource {
6782
6792
  */
6783
6793
  active?: boolean | null;
6784
6794
  /**
6785
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6795
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6786
6796
  * @example ```"pending"```
6787
6797
  */
6788
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6798
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6789
6799
  /**
6790
6800
  * Time at which this resource was disabled.
6791
6801
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -11671,10 +11681,10 @@ interface PriceListScheduler extends Resource {
11671
11681
  */
11672
11682
  active?: boolean | null;
11673
11683
  /**
11674
- * The price list scheduler status. One of 'expired', 'pending', 'active', or 'disabled'.
11684
+ * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.
11675
11685
  * @example ```"pending"```
11676
11686
  */
11677
- status?: 'expired' | 'pending' | 'active' | 'disabled' | null;
11687
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | null;
11678
11688
  /**
11679
11689
  * Time at which this resource was disabled.
11680
11690
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -11982,10 +11992,10 @@ interface Promotion extends Resource {
11982
11992
  */
11983
11993
  active?: boolean | null;
11984
11994
  /**
11985
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
11995
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
11986
11996
  * @example ```"pending"```
11987
11997
  */
11988
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
11998
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
11989
11999
  /**
11990
12000
  * Time at which this resource was disabled.
11991
12001
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -15449,7 +15459,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
15449
15459
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
15450
15460
  declare class CommerceLayerClient {
15451
15461
  #private;
15452
- readonly openApiSchemaVersion = "6.2.0";
15462
+ readonly openApiSchemaVersion = "6.2.1";
15453
15463
  constructor(config: CommerceLayerInitConfig);
15454
15464
  get addresses(): Addresses;
15455
15465
  get adjustments(): Adjustments;
package/lib/index.d.ts CHANGED
@@ -57,7 +57,7 @@ type RequestConfig = {
57
57
  refreshToken?: RefreshToken;
58
58
  };
59
59
  type ApiConfig = {
60
- organization: string;
60
+ organization?: string;
61
61
  domain?: string;
62
62
  accessToken: string;
63
63
  };
@@ -935,11 +935,11 @@ type MarketRel$j = ResourceRel & {
935
935
  type PaymentGatewayRel = ResourceRel & {
936
936
  type: PaymentGatewayType;
937
937
  };
938
- type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort;
938
+ type PaymentMethodSort = Pick<PaymentMethod, 'id' | 'name' | 'payment_source_type' | 'currency_code' | 'price_amount_cents' | 'disabled_at'> & ResourceSort;
939
939
  interface PaymentMethod extends Resource {
940
940
  readonly type: PaymentMethodType;
941
941
  /**
942
- * Payment source type, titleized.
942
+ * The payment method's internal name.
943
943
  * @example ```"Stripe Payment"```
944
944
  */
945
945
  name?: string | null;
@@ -1008,6 +1008,11 @@ interface PaymentMethod extends Resource {
1008
1008
  versions?: Version[] | null;
1009
1009
  }
1010
1010
  interface PaymentMethodCreate extends ResourceCreate {
1011
+ /**
1012
+ * The payment method's internal name.
1013
+ * @example ```"Stripe Payment"```
1014
+ */
1015
+ name?: string | null;
1011
1016
  /**
1012
1017
  * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'credit_cards', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.
1013
1018
  * @example ```"stripe_payments"```
@@ -1058,6 +1063,11 @@ interface PaymentMethodCreate extends ResourceCreate {
1058
1063
  payment_gateway: PaymentGatewayRel;
1059
1064
  }
1060
1065
  interface PaymentMethodUpdate extends ResourceUpdate {
1066
+ /**
1067
+ * The payment method's internal name.
1068
+ * @example ```"Stripe Payment"```
1069
+ */
1070
+ name?: string | null;
1061
1071
  /**
1062
1072
  * The payment source type. One of 'adyen_payments', 'axerve_payments', 'braintree_payments', 'checkout_com_payments', 'credit_cards', 'external_payments', 'klarna_payments', 'paypal_payments', 'satispay_payments', 'stripe_payments', or 'wire_transfers'.
1063
1073
  * @example ```"stripe_payments"```
@@ -3763,10 +3773,10 @@ interface Link extends Resource {
3763
3773
  */
3764
3774
  active?: boolean | null;
3765
3775
  /**
3766
- * The link status. One of 'expired', 'pending', 'active', or 'disabled'.
3776
+ * The link status. One of 'disabled', 'expired', 'pending', or 'active'.
3767
3777
  * @example ```"pending"```
3768
3778
  */
3769
- status?: 'expired' | 'pending' | 'active' | 'disabled' | null;
3779
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | null;
3770
3780
  /**
3771
3781
  * The link URL second level domain.
3772
3782
  * @example ```"commercelayer.link"```
@@ -4942,10 +4952,10 @@ interface ExternalPromotion extends Resource {
4942
4952
  */
4943
4953
  active?: boolean | null;
4944
4954
  /**
4945
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
4955
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
4946
4956
  * @example ```"pending"```
4947
4957
  */
4948
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
4958
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
4949
4959
  /**
4950
4960
  * Time at which this resource was disabled.
4951
4961
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5208,10 +5218,10 @@ interface FixedAmountPromotion extends Resource {
5208
5218
  */
5209
5219
  active?: boolean | null;
5210
5220
  /**
5211
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5221
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5212
5222
  * @example ```"pending"```
5213
5223
  */
5214
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5224
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5215
5225
  /**
5216
5226
  * Time at which this resource was disabled.
5217
5227
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5482,10 +5492,10 @@ interface FixedPricePromotion extends Resource {
5482
5492
  */
5483
5493
  active?: boolean | null;
5484
5494
  /**
5485
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5495
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5486
5496
  * @example ```"pending"```
5487
5497
  */
5488
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5498
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5489
5499
  /**
5490
5500
  * Time at which this resource was disabled.
5491
5501
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -5801,10 +5811,10 @@ interface FreeGiftPromotion extends Resource {
5801
5811
  */
5802
5812
  active?: boolean | null;
5803
5813
  /**
5804
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
5814
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
5805
5815
  * @example ```"pending"```
5806
5816
  */
5807
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
5817
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
5808
5818
  /**
5809
5819
  * Time at which this resource was disabled.
5810
5820
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6102,10 +6112,10 @@ interface BuyXPayYPromotion extends Resource {
6102
6112
  */
6103
6113
  active?: boolean | null;
6104
6114
  /**
6105
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6115
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6106
6116
  * @example ```"pending"```
6107
6117
  */
6108
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6118
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6109
6119
  /**
6110
6120
  * Time at which this resource was disabled.
6111
6121
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6465,10 +6475,10 @@ interface FreeShippingPromotion extends Resource {
6465
6475
  */
6466
6476
  active?: boolean | null;
6467
6477
  /**
6468
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6478
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6469
6479
  * @example ```"pending"```
6470
6480
  */
6471
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6481
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6472
6482
  /**
6473
6483
  * Time at which this resource was disabled.
6474
6484
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -6782,10 +6792,10 @@ interface PercentageDiscountPromotion extends Resource {
6782
6792
  */
6783
6793
  active?: boolean | null;
6784
6794
  /**
6785
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
6795
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
6786
6796
  * @example ```"pending"```
6787
6797
  */
6788
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
6798
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6789
6799
  /**
6790
6800
  * Time at which this resource was disabled.
6791
6801
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -11671,10 +11681,10 @@ interface PriceListScheduler extends Resource {
11671
11681
  */
11672
11682
  active?: boolean | null;
11673
11683
  /**
11674
- * The price list scheduler status. One of 'expired', 'pending', 'active', or 'disabled'.
11684
+ * The price list scheduler status. One of 'disabled', 'expired', 'pending', or 'active'.
11675
11685
  * @example ```"pending"```
11676
11686
  */
11677
- status?: 'expired' | 'pending' | 'active' | 'disabled' | null;
11687
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | null;
11678
11688
  /**
11679
11689
  * Time at which this resource was disabled.
11680
11690
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -11982,10 +11992,10 @@ interface Promotion extends Resource {
11982
11992
  */
11983
11993
  active?: boolean | null;
11984
11994
  /**
11985
- * The promotion status. One of 'expired', 'pending', 'active', 'inactive', or 'disabled'.
11995
+ * The promotion status. One of 'disabled', 'expired', 'pending', 'active', or 'inactive'.
11986
11996
  * @example ```"pending"```
11987
11997
  */
11988
- status?: 'expired' | 'pending' | 'active' | 'inactive' | 'disabled' | null;
11998
+ status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
11989
11999
  /**
11990
12000
  * Time at which this resource was disabled.
11991
12001
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -15449,7 +15459,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
15449
15459
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
15450
15460
  declare class CommerceLayerClient {
15451
15461
  #private;
15452
- readonly openApiSchemaVersion = "6.2.0";
15462
+ readonly openApiSchemaVersion = "6.2.1";
15453
15463
  constructor(config: CommerceLayerInitConfig);
15454
15464
  get addresses(): Addresses;
15455
15465
  get adjustments(): Adjustments;