@commercelayer/sdk 6.2.0 → 6.4.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
@@ -4946,6 +4946,11 @@ interface GiftCard extends Resource {
4946
4946
  * @example ```"[object Object],[object Object]"```
4947
4947
  */
4948
4948
  balance_log: Array<Record<string, any>>;
4949
+ /**
4950
+ * The gift card usage log. Tracks all the gift card usage actions by orders..
4951
+ * @example ```"[object Object]"```
4952
+ */
4953
+ usage_log: Record<string, any>;
4949
4954
  /**
4950
4955
  * Indicates if the gift card can be used only one..
4951
4956
  */
@@ -8482,6 +8487,11 @@ interface OrderUpdate extends ResourceUpdate {
8482
8487
  * @example ```"true"```
8483
8488
  */
8484
8489
  _refund?: boolean | null;
8490
+ /**
8491
+ * Send this attribute if you want to mark as fulfilled a shipped/delivered order..
8492
+ * @example ```"true"```
8493
+ */
8494
+ _fulfill?: boolean | null;
8485
8495
  /**
8486
8496
  * Send this attribute if you want to force tax calculation for this order (a tax calculator must be associated to the order's market)..
8487
8497
  * @example ```"true"```
@@ -8626,6 +8636,7 @@ declare class Orders extends ApiResource<Order> {
8626
8636
  _authorization_amount_cents(id: string | Order, triggerValue: number, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8627
8637
  _capture(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8628
8638
  _refund(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8639
+ _fulfill(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8629
8640
  _update_taxes(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8630
8641
  _nullify_payment_source(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8631
8642
  _billing_address_clone_id(id: string | Order, triggerValue: string, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
@@ -9944,15 +9955,15 @@ type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cen
9944
9955
  interface Shipment extends Resource {
9945
9956
  readonly type: ShipmentType;
9946
9957
  /**
9947
- * Unique identifier for the shipment.
9958
+ * Unique identifier for the shipment..
9948
9959
  * @example ```"#1234/S/001"```
9949
9960
  */
9950
- number?: string | null;
9961
+ number: string;
9951
9962
  /**
9952
- * The shipment status, one of 'draft', 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', or 'shipped'..
9963
+ * The shipment status, one of 'draft', 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'..
9953
9964
  * @example ```"draft"```
9954
9965
  */
9955
- status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped';
9966
+ status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered';
9956
9967
  /**
9957
9968
  * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order..
9958
9969
  * @example ```"EUR"```
@@ -10081,6 +10092,11 @@ interface ShipmentCreate extends ResourceCreate {
10081
10092
  tags?: TagRel$3[] | null;
10082
10093
  }
10083
10094
  interface ShipmentUpdate extends ResourceUpdate {
10095
+ /**
10096
+ * Unique identifier for the shipment..
10097
+ * @example ```"#1234/S/001"```
10098
+ */
10099
+ number?: string | null;
10084
10100
  /**
10085
10101
  * Send this attribute if you want to mark this shipment as upcoming..
10086
10102
  * @example ```"true"```
@@ -10111,6 +10127,11 @@ interface ShipmentUpdate extends ResourceUpdate {
10111
10127
  * @example ```"true"```
10112
10128
  */
10113
10129
  _ship?: boolean | null;
10130
+ /**
10131
+ * Send this attribute if you want to mark this shipment as delivered..
10132
+ * @example ```"true"```
10133
+ */
10134
+ _deliver?: boolean | null;
10114
10135
  /**
10115
10136
  * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress..
10116
10137
  * @example ```"true"```
@@ -10176,6 +10197,7 @@ declare class Shipments extends ApiResource<Shipment> {
10176
10197
  _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10177
10198
  _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10178
10199
  _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10200
+ _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10179
10201
  _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10180
10202
  _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10181
10203
  _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
@@ -10245,6 +10267,11 @@ interface StockTransfer extends Resource {
10245
10267
  versions?: Version[] | null;
10246
10268
  }
10247
10269
  interface StockTransferCreate extends ResourceCreate {
10270
+ /**
10271
+ * Unique identifier for the stock transfer (numeric)..
10272
+ * @example ```"1234"```
10273
+ */
10274
+ number?: string | null;
10248
10275
  /**
10249
10276
  * The code of the associated SKU..
10250
10277
  * @example ```"TSHIRTMM000000FFFFFFXLXX"```
@@ -10262,6 +10289,11 @@ interface StockTransferCreate extends ResourceCreate {
10262
10289
  line_item?: LineItemRel | null;
10263
10290
  }
10264
10291
  interface StockTransferUpdate extends ResourceUpdate {
10292
+ /**
10293
+ * Unique identifier for the stock transfer (numeric)..
10294
+ * @example ```"1234"```
10295
+ */
10296
+ number?: string | null;
10265
10297
  /**
10266
10298
  * The code of the associated SKU..
10267
10299
  * @example ```"TSHIRTMM000000FFFFFFXLXX"```
@@ -15000,7 +15032,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
15000
15032
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
15001
15033
  declare class CommerceLayerClient {
15002
15034
  #private;
15003
- readonly openApiSchemaVersion = "5.3.1";
15035
+ readonly openApiSchemaVersion = "5.3.3";
15004
15036
  constructor(config: CommerceLayerInitConfig);
15005
15037
  get addresses(): Addresses;
15006
15038
  get adjustments(): Adjustments;
package/lib/index.d.ts CHANGED
@@ -4946,6 +4946,11 @@ interface GiftCard extends Resource {
4946
4946
  * @example ```"[object Object],[object Object]"```
4947
4947
  */
4948
4948
  balance_log: Array<Record<string, any>>;
4949
+ /**
4950
+ * The gift card usage log. Tracks all the gift card usage actions by orders..
4951
+ * @example ```"[object Object]"```
4952
+ */
4953
+ usage_log: Record<string, any>;
4949
4954
  /**
4950
4955
  * Indicates if the gift card can be used only one..
4951
4956
  */
@@ -8482,6 +8487,11 @@ interface OrderUpdate extends ResourceUpdate {
8482
8487
  * @example ```"true"```
8483
8488
  */
8484
8489
  _refund?: boolean | null;
8490
+ /**
8491
+ * Send this attribute if you want to mark as fulfilled a shipped/delivered order..
8492
+ * @example ```"true"```
8493
+ */
8494
+ _fulfill?: boolean | null;
8485
8495
  /**
8486
8496
  * Send this attribute if you want to force tax calculation for this order (a tax calculator must be associated to the order's market)..
8487
8497
  * @example ```"true"```
@@ -8626,6 +8636,7 @@ declare class Orders extends ApiResource<Order> {
8626
8636
  _authorization_amount_cents(id: string | Order, triggerValue: number, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8627
8637
  _capture(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8628
8638
  _refund(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8639
+ _fulfill(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8629
8640
  _update_taxes(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8630
8641
  _nullify_payment_source(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
8631
8642
  _billing_address_clone_id(id: string | Order, triggerValue: string, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
@@ -9944,15 +9955,15 @@ type ShipmentSort = Pick<Shipment, 'id' | 'number' | 'status' | 'cost_amount_cen
9944
9955
  interface Shipment extends Resource {
9945
9956
  readonly type: ShipmentType;
9946
9957
  /**
9947
- * Unique identifier for the shipment.
9958
+ * Unique identifier for the shipment..
9948
9959
  * @example ```"#1234/S/001"```
9949
9960
  */
9950
- number?: string | null;
9961
+ number: string;
9951
9962
  /**
9952
- * The shipment status, one of 'draft', 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', or 'shipped'..
9963
+ * The shipment status, one of 'draft', 'upcoming', 'cancelled', 'on_hold', 'picking', 'packing', 'ready_to_ship', 'shipped', or 'delivered'..
9953
9964
  * @example ```"draft"```
9954
9965
  */
9955
- status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped';
9966
+ status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped' | 'delivered';
9956
9967
  /**
9957
9968
  * The international 3-letter currency code as defined by the ISO 4217 standard, automatically inherited from the associated order..
9958
9969
  * @example ```"EUR"```
@@ -10081,6 +10092,11 @@ interface ShipmentCreate extends ResourceCreate {
10081
10092
  tags?: TagRel$3[] | null;
10082
10093
  }
10083
10094
  interface ShipmentUpdate extends ResourceUpdate {
10095
+ /**
10096
+ * Unique identifier for the shipment..
10097
+ * @example ```"#1234/S/001"```
10098
+ */
10099
+ number?: string | null;
10084
10100
  /**
10085
10101
  * Send this attribute if you want to mark this shipment as upcoming..
10086
10102
  * @example ```"true"```
@@ -10111,6 +10127,11 @@ interface ShipmentUpdate extends ResourceUpdate {
10111
10127
  * @example ```"true"```
10112
10128
  */
10113
10129
  _ship?: boolean | null;
10130
+ /**
10131
+ * Send this attribute if you want to mark this shipment as delivered..
10132
+ * @example ```"true"```
10133
+ */
10134
+ _deliver?: boolean | null;
10114
10135
  /**
10115
10136
  * Send this attribute if you want to automatically reserve the stock for each of the associated stock line item. Can be done only when fulfillment is in progress..
10116
10137
  * @example ```"true"```
@@ -10176,6 +10197,7 @@ declare class Shipments extends ApiResource<Shipment> {
10176
10197
  _packing(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10177
10198
  _ready_to_ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10178
10199
  _ship(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10200
+ _deliver(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10179
10201
  _reserve_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10180
10202
  _release_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
10181
10203
  _decrement_stock(id: string | Shipment, params?: QueryParamsRetrieve<Shipment>, options?: ResourcesConfig): Promise<Shipment>;
@@ -10245,6 +10267,11 @@ interface StockTransfer extends Resource {
10245
10267
  versions?: Version[] | null;
10246
10268
  }
10247
10269
  interface StockTransferCreate extends ResourceCreate {
10270
+ /**
10271
+ * Unique identifier for the stock transfer (numeric)..
10272
+ * @example ```"1234"```
10273
+ */
10274
+ number?: string | null;
10248
10275
  /**
10249
10276
  * The code of the associated SKU..
10250
10277
  * @example ```"TSHIRTMM000000FFFFFFXLXX"```
@@ -10262,6 +10289,11 @@ interface StockTransferCreate extends ResourceCreate {
10262
10289
  line_item?: LineItemRel | null;
10263
10290
  }
10264
10291
  interface StockTransferUpdate extends ResourceUpdate {
10292
+ /**
10293
+ * Unique identifier for the stock transfer (numeric)..
10294
+ * @example ```"1234"```
10295
+ */
10296
+ number?: string | null;
10265
10297
  /**
10266
10298
  * The code of the associated SKU..
10267
10299
  * @example ```"TSHIRTMM000000FFFFFFXLXX"```
@@ -15000,7 +15032,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
15000
15032
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
15001
15033
  declare class CommerceLayerClient {
15002
15034
  #private;
15003
- readonly openApiSchemaVersion = "5.3.1";
15035
+ readonly openApiSchemaVersion = "5.3.3";
15004
15036
  constructor(config: CommerceLayerInitConfig);
15005
15037
  get addresses(): Addresses;
15006
15038
  get adjustments(): Adjustments;