@commercelayer/sdk 6.47.0 → 6.48.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
@@ -6670,11 +6670,26 @@ interface FlexPromotion extends Resource {
6670
6670
  * @example ```"pending"```
6671
6671
  */
6672
6672
  status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6673
+ /**
6674
+ * The discount rule to be applied.
6675
+ * @example ```{}```
6676
+ */
6677
+ rules: Record<string, any>;
6678
+ /**
6679
+ * The rule outcomes.
6680
+ * @example ```[]```
6681
+ */
6682
+ rule_outcomes?: Record<string, any> | null;
6673
6683
  /**
6674
6684
  * Time at which this resource was disabled.
6675
6685
  * @example ```"2018-01-01T12:00:00.000Z"```
6676
6686
  */
6677
6687
  disabled_at?: string | null;
6688
+ /**
6689
+ * The payload used to evaluate the rules.
6690
+ * @example ```{}```
6691
+ */
6692
+ resource_payload?: Record<string, any> | null;
6678
6693
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
6679
6694
  coupons?: Coupon[] | null;
6680
6695
  attachments?: Attachment[] | null;
@@ -9898,6 +9913,11 @@ interface Order extends Resource {
9898
9913
  * @example ```"john@example.com"```
9899
9914
  */
9900
9915
  customer_email?: string | null;
9916
+ /**
9917
+ * The type of the associated customer. One of 'new', or 'returning'.
9918
+ * @example ```"returning"```
9919
+ */
9920
+ customer_type?: 'new' | 'returning' | null;
9901
9921
  /**
9902
9922
  * The preferred language code (ISO 639-1) to be used when communicating with the customer. This can be useful when sending the order to 3rd party marketing tools and CRMs. If the language is supported, the hosted checkout will be localized accordingly.
9903
9923
  * @example ```"it"```
@@ -11640,7 +11660,7 @@ type ShippingMethodRel$2 = ResourceRel & {
11640
11660
  type TagRel$2 = ResourceRel & {
11641
11661
  type: TagType;
11642
11662
  };
11643
- type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort;
11663
+ type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at' | 'delivered_at'> & ResourceSort;
11644
11664
  interface Shipment extends Resource {
11645
11665
  readonly type: ShipmentType;
11646
11666
  /**
@@ -11753,6 +11773,11 @@ interface Shipment extends Resource {
11753
11773
  * @example ```"2018-01-01T12:00:00.000Z"```
11754
11774
  */
11755
11775
  shipped_at?: string | null;
11776
+ /**
11777
+ * Time at which the shipment was delivered.
11778
+ * @example ```"2018-01-01T12:00:00.000Z"```
11779
+ */
11780
+ delivered_at?: string | null;
11756
11781
  order?: Order | null;
11757
11782
  shipping_category?: ShippingCategory | null;
11758
11783
  inventory_stock_location?: InventoryStockLocation | null;
@@ -12346,6 +12371,11 @@ interface Sku extends Resource {
12346
12371
  * Indicates if the SKU doesn't track the stock inventory.
12347
12372
  */
12348
12373
  do_not_track?: boolean | null;
12374
+ /**
12375
+ * Aggregated information about the SKU's inventory. Returned only when retrieving a single SKU.
12376
+ * @example ```{"available":true,"quantity":10,"levels":[{"quantity":4,"delivery_lead_times":[{"shipping_method":{"name":"Standard Shipping","reference":null,"price_amount_cents":700,"free_over_amount_cents":9900,"formatted_price_amount":"€7,00","formatted_free_over_amount":"€99,00"},"min":{"hours":72,"days":3},"max":{"hours":120,"days":5}},{"shipping_method":{"name":"Express Delivery","reference":null,"price_amount_cents":1200,"free_over_amount_cents":null,"formatted_price_amount":"€12,00","formatted_free_over_amount":null},"min":{"hours":48,"days":2},"max":{"hours":72,"days":3}}]},{"quantity":6,"delivery_lead_times":[{"shipping_method":{"name":"Standard Shipping","reference":null,"price_amount_cents":700,"free_over_amount_cents":9900,"formatted_price_amount":"€7,00","formatted_free_over_amount":"€99,00"},"min":{"hours":96,"days":4},"max":{"hours":144,"days":6}},{"shipping_method":{"name":"Express Delivery","reference":null,"price_amount_cents":1200,"free_over_amount_cents":null,"formatted_price_amount":"€12,00","formatted_free_over_amount":null},"min":{"hours":72,"days":3},"max":{"hours":96,"days":4}}]}]}```
12377
+ */
12378
+ inventory?: Record<string, any> | null;
12349
12379
  /**
12350
12380
  * The custom_claim attached to the current JWT (if any).
12351
12381
  * @example ```{}```
@@ -12812,11 +12842,26 @@ interface Price extends Resource {
12812
12842
  * @example ```"€130,00"```
12813
12843
  */
12814
12844
  formatted_compare_at_amount?: string | null;
12845
+ /**
12846
+ * The rule outcomes.
12847
+ * @example ```[]```
12848
+ */
12849
+ rule_outcomes?: Record<string, any> | null;
12815
12850
  /**
12816
12851
  * Time at which the resource was processed by API.
12817
12852
  * @example ```"2018-01-01T12:00:00.000Z"```
12818
12853
  */
12819
12854
  processed_at?: string | null;
12855
+ /**
12856
+ * The rules (using Rules Engine) to be applied.
12857
+ * @example ```{}```
12858
+ */
12859
+ rules?: Record<string, any> | null;
12860
+ /**
12861
+ * The payload used to evaluate the rules.
12862
+ * @example ```{}```
12863
+ */
12864
+ resource_payload?: Record<string, any> | null;
12820
12865
  /**
12821
12866
  * The custom_claim attached to the current JWT (if any).
12822
12867
  * @example ```{}```
@@ -13063,6 +13108,21 @@ interface PriceList extends Resource {
13063
13108
  * @example ```true```
13064
13109
  */
13065
13110
  tax_included?: boolean | null;
13111
+ /**
13112
+ * The rule outcomes.
13113
+ * @example ```[]```
13114
+ */
13115
+ rule_outcomes?: Record<string, any> | null;
13116
+ /**
13117
+ * The rules (using Rules Engine) to be applied.
13118
+ * @example ```{}```
13119
+ */
13120
+ rules?: Record<string, any> | null;
13121
+ /**
13122
+ * The payload used to evaluate the rules.
13123
+ * @example ```{}```
13124
+ */
13125
+ resource_payload?: Record<string, any> | null;
13066
13126
  prices?: Price[] | null;
13067
13127
  price_list_schedulers?: PriceListScheduler[] | null;
13068
13128
  attachments?: Attachment[] | null;
@@ -17525,7 +17585,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
17525
17585
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
17526
17586
  declare class CommerceLayerClient {
17527
17587
  #private;
17528
- readonly openApiSchemaVersion = "7.9.5";
17588
+ readonly openApiSchemaVersion = "7.9.6";
17529
17589
  constructor(config: CommerceLayerInitConfig);
17530
17590
  get addresses(): Addresses;
17531
17591
  get adjustments(): Adjustments;
package/lib/index.d.ts CHANGED
@@ -6670,11 +6670,26 @@ interface FlexPromotion extends Resource {
6670
6670
  * @example ```"pending"```
6671
6671
  */
6672
6672
  status?: 'disabled' | 'expired' | 'pending' | 'active' | 'inactive' | null;
6673
+ /**
6674
+ * The discount rule to be applied.
6675
+ * @example ```{}```
6676
+ */
6677
+ rules: Record<string, any>;
6678
+ /**
6679
+ * The rule outcomes.
6680
+ * @example ```[]```
6681
+ */
6682
+ rule_outcomes?: Record<string, any> | null;
6673
6683
  /**
6674
6684
  * Time at which this resource was disabled.
6675
6685
  * @example ```"2018-01-01T12:00:00.000Z"```
6676
6686
  */
6677
6687
  disabled_at?: string | null;
6688
+ /**
6689
+ * The payload used to evaluate the rules.
6690
+ * @example ```{}```
6691
+ */
6692
+ resource_payload?: Record<string, any> | null;
6678
6693
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
6679
6694
  coupons?: Coupon[] | null;
6680
6695
  attachments?: Attachment[] | null;
@@ -9898,6 +9913,11 @@ interface Order extends Resource {
9898
9913
  * @example ```"john@example.com"```
9899
9914
  */
9900
9915
  customer_email?: string | null;
9916
+ /**
9917
+ * The type of the associated customer. One of 'new', or 'returning'.
9918
+ * @example ```"returning"```
9919
+ */
9920
+ customer_type?: 'new' | 'returning' | null;
9901
9921
  /**
9902
9922
  * The preferred language code (ISO 639-1) to be used when communicating with the customer. This can be useful when sending the order to 3rd party marketing tools and CRMs. If the language is supported, the hosted checkout will be localized accordingly.
9903
9923
  * @example ```"it"```
@@ -11640,7 +11660,7 @@ type ShippingMethodRel$2 = ResourceRel & {
11640
11660
  type TagRel$2 = ResourceRel & {
11641
11661
  type: TagType;
11642
11662
  };
11643
- type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at'> & ResourceSort;
11663
+ type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cents' | 'get_rates_started_at' | 'get_rates_completed_at' | 'purchase_started_at' | 'purchase_completed_at' | 'purchase_failed_at' | 'on_hold_at' | 'picking_at' | 'packing_at' | 'ready_to_ship_at' | 'shipped_at' | 'delivered_at'> & ResourceSort;
11644
11664
  interface Shipment extends Resource {
11645
11665
  readonly type: ShipmentType;
11646
11666
  /**
@@ -11753,6 +11773,11 @@ interface Shipment extends Resource {
11753
11773
  * @example ```"2018-01-01T12:00:00.000Z"```
11754
11774
  */
11755
11775
  shipped_at?: string | null;
11776
+ /**
11777
+ * Time at which the shipment was delivered.
11778
+ * @example ```"2018-01-01T12:00:00.000Z"```
11779
+ */
11780
+ delivered_at?: string | null;
11756
11781
  order?: Order | null;
11757
11782
  shipping_category?: ShippingCategory | null;
11758
11783
  inventory_stock_location?: InventoryStockLocation | null;
@@ -12346,6 +12371,11 @@ interface Sku extends Resource {
12346
12371
  * Indicates if the SKU doesn't track the stock inventory.
12347
12372
  */
12348
12373
  do_not_track?: boolean | null;
12374
+ /**
12375
+ * Aggregated information about the SKU's inventory. Returned only when retrieving a single SKU.
12376
+ * @example ```{"available":true,"quantity":10,"levels":[{"quantity":4,"delivery_lead_times":[{"shipping_method":{"name":"Standard Shipping","reference":null,"price_amount_cents":700,"free_over_amount_cents":9900,"formatted_price_amount":"€7,00","formatted_free_over_amount":"€99,00"},"min":{"hours":72,"days":3},"max":{"hours":120,"days":5}},{"shipping_method":{"name":"Express Delivery","reference":null,"price_amount_cents":1200,"free_over_amount_cents":null,"formatted_price_amount":"€12,00","formatted_free_over_amount":null},"min":{"hours":48,"days":2},"max":{"hours":72,"days":3}}]},{"quantity":6,"delivery_lead_times":[{"shipping_method":{"name":"Standard Shipping","reference":null,"price_amount_cents":700,"free_over_amount_cents":9900,"formatted_price_amount":"€7,00","formatted_free_over_amount":"€99,00"},"min":{"hours":96,"days":4},"max":{"hours":144,"days":6}},{"shipping_method":{"name":"Express Delivery","reference":null,"price_amount_cents":1200,"free_over_amount_cents":null,"formatted_price_amount":"€12,00","formatted_free_over_amount":null},"min":{"hours":72,"days":3},"max":{"hours":96,"days":4}}]}]}```
12377
+ */
12378
+ inventory?: Record<string, any> | null;
12349
12379
  /**
12350
12380
  * The custom_claim attached to the current JWT (if any).
12351
12381
  * @example ```{}```
@@ -12812,11 +12842,26 @@ interface Price extends Resource {
12812
12842
  * @example ```"€130,00"```
12813
12843
  */
12814
12844
  formatted_compare_at_amount?: string | null;
12845
+ /**
12846
+ * The rule outcomes.
12847
+ * @example ```[]```
12848
+ */
12849
+ rule_outcomes?: Record<string, any> | null;
12815
12850
  /**
12816
12851
  * Time at which the resource was processed by API.
12817
12852
  * @example ```"2018-01-01T12:00:00.000Z"```
12818
12853
  */
12819
12854
  processed_at?: string | null;
12855
+ /**
12856
+ * The rules (using Rules Engine) to be applied.
12857
+ * @example ```{}```
12858
+ */
12859
+ rules?: Record<string, any> | null;
12860
+ /**
12861
+ * The payload used to evaluate the rules.
12862
+ * @example ```{}```
12863
+ */
12864
+ resource_payload?: Record<string, any> | null;
12820
12865
  /**
12821
12866
  * The custom_claim attached to the current JWT (if any).
12822
12867
  * @example ```{}```
@@ -13063,6 +13108,21 @@ interface PriceList extends Resource {
13063
13108
  * @example ```true```
13064
13109
  */
13065
13110
  tax_included?: boolean | null;
13111
+ /**
13112
+ * The rule outcomes.
13113
+ * @example ```[]```
13114
+ */
13115
+ rule_outcomes?: Record<string, any> | null;
13116
+ /**
13117
+ * The rules (using Rules Engine) to be applied.
13118
+ * @example ```{}```
13119
+ */
13120
+ rules?: Record<string, any> | null;
13121
+ /**
13122
+ * The payload used to evaluate the rules.
13123
+ * @example ```{}```
13124
+ */
13125
+ resource_payload?: Record<string, any> | null;
13066
13126
  prices?: Price[] | null;
13067
13127
  price_list_schedulers?: PriceListScheduler[] | null;
13068
13128
  attachments?: Attachment[] | null;
@@ -17525,7 +17585,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
17525
17585
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
17526
17586
  declare class CommerceLayerClient {
17527
17587
  #private;
17528
- readonly openApiSchemaVersion = "7.9.5";
17588
+ readonly openApiSchemaVersion = "7.9.6";
17529
17589
  constructor(config: CommerceLayerInitConfig);
17530
17590
  get addresses(): Addresses;
17531
17591
  get adjustments(): Adjustments;