@commercelayer/sdk 6.55.0 → 6.57.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
@@ -10946,6 +10946,11 @@ interface OrderUpdate extends ResourceUpdate {
10946
10946
  * @example ```true```
10947
10947
  */
10948
10948
  _refresh?: boolean | null;
10949
+ /**
10950
+ * Send this attribute if you want to refresh the prices of the line items associated to this order. Cannot be passed by sales channels.
10951
+ * @example ```true```
10952
+ */
10953
+ _refresh_prices?: boolean | null;
10949
10954
  /**
10950
10955
  * Send this attribute if you want to trigger the external validation for the order.
10951
10956
  * @example ```true```
@@ -11067,6 +11072,7 @@ declare class Orders extends ApiResource<Order> {
11067
11072
  _save_shipping_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11068
11073
  _save_billing_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11069
11074
  _refresh(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11075
+ _refresh_prices(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11070
11076
  _validate(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11071
11077
  _create_subscriptions(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11072
11078
  _start_editing(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
@@ -15554,7 +15560,7 @@ interface Application extends Resource {
15554
15560
  * The application's kind. One of 'sales_channel', 'integration', or 'webapp'.
15555
15561
  * @example ```"sales-channel"```
15556
15562
  */
15557
- kind?: 'dashboard' | 'user' | 'metrics' | 'contentful' | 'bundles' | 'customers' | 'datocms' | 'exports' | 'external' | 'generic' | 'gift_cards' | 'imports' | 'integration' | 'inventory' | 'orders' | 'price_lists' | 'promotions' | 'resources' | 'returns' | 'sales_channel' | 'sanity' | 'shipments' | 'skus' | 'sku_lists' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webapp' | 'webhooks' | 'zapier' | null;
15563
+ kind?: 'dashboard' | 'user' | 'contentful' | 'bundles' | 'customers' | 'datocms' | 'exports' | 'external' | 'generic' | 'gift_cards' | 'imports' | 'integration' | 'inventory' | 'metrics' | 'orders' | 'price_lists' | 'promotions' | 'resources' | 'returns' | 'sales_channel' | 'sanity' | 'shipments' | 'skus' | 'sku_lists' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webapp' | 'webhooks' | 'zapier' | null;
15558
15564
  /**
15559
15565
  * Indicates if the application has public access.
15560
15566
  * @example ```true```
@@ -16336,7 +16342,7 @@ type ExportType = 'exports';
16336
16342
  type ExportRel = ResourceRel & {
16337
16343
  type: ExportType;
16338
16344
  };
16339
- type ExportSort = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'attachment_url'> & ResourceSort;
16345
+ type ExportSort = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'processed_count' | 'attachment_url'> & ResourceSort;
16340
16346
  interface Export extends Resource {
16341
16347
  readonly type: ExportType;
16342
16348
  /**
@@ -16350,10 +16356,10 @@ interface Export extends Resource {
16350
16356
  */
16351
16357
  format?: string | null;
16352
16358
  /**
16353
- * The export job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.
16359
+ * The export job status. One of 'pending' (default), 'in_progress', 'interrupted', 'completed', or 'failed'.
16354
16360
  * @example ```"in_progress"```
16355
16361
  */
16356
- status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
16362
+ status: 'pending' | 'in_progress' | 'interrupted' | 'completed' | 'failed';
16357
16363
  /**
16358
16364
  * List of related resources that should be included in the export (redundant when 'fields' are specified).
16359
16365
  * @example ```["prices.price_tiers"]```
@@ -16373,6 +16379,11 @@ interface Export extends Resource {
16373
16379
  * Send this attribute if you want to skip exporting redundant attributes (IDs, timestamps, blanks, etc.), useful when combining export and import to duplicate your dataset.
16374
16380
  */
16375
16381
  dry_data?: boolean | null;
16382
+ /**
16383
+ * Send this attribute to apply JWT scope–based sales channel filtering to the exported data.
16384
+ * @example ```true```
16385
+ */
16386
+ jwt_filters?: boolean | null;
16376
16387
  /**
16377
16388
  * Time at which the export was started.
16378
16389
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -16383,6 +16394,11 @@ interface Export extends Resource {
16383
16394
  * @example ```"2018-01-01T12:00:00.000Z"```
16384
16395
  */
16385
16396
  completed_at?: string | null;
16397
+ /**
16398
+ * Estimated time at which the export should complete (dynamically refres^hed).
16399
+ * @example ```"2018-01-01T12:00:00.000Z"```
16400
+ */
16401
+ estimated_completion_at?: string | null;
16386
16402
  /**
16387
16403
  * Time at which the export was interrupted.
16388
16404
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -16393,6 +16409,16 @@ interface Export extends Resource {
16393
16409
  * @example ```300```
16394
16410
  */
16395
16411
  records_count?: number | null;
16412
+ /**
16413
+ * Indicates how many records have been processed in real time.
16414
+ * @example ```270```
16415
+ */
16416
+ processed_count?: number | null;
16417
+ /**
16418
+ * The percentage of progress of the export.
16419
+ * @example ```30```
16420
+ */
16421
+ progress?: number | null;
16396
16422
  /**
16397
16423
  * The URL to the output file, which will be generated upon export completion.
16398
16424
  * @example ```"http://cl_exports.s3.amazonaws.com/"```
@@ -16437,8 +16463,18 @@ interface ExportCreate extends ResourceCreate {
16437
16463
  * Send this attribute if you want to skip exporting redundant attributes (IDs, timestamps, blanks, etc.), useful when combining export and import to duplicate your dataset.
16438
16464
  */
16439
16465
  dry_data?: boolean | null;
16466
+ /**
16467
+ * Send this attribute to apply JWT scope–based sales channel filtering to the exported data.
16468
+ * @example ```true```
16469
+ */
16470
+ jwt_filters?: boolean | null;
16440
16471
  }
16441
16472
  interface ExportUpdate extends ResourceUpdate {
16473
+ /**
16474
+ * Send this attribute if you want to restart an 'interrupted' export.
16475
+ * @example ```true```
16476
+ */
16477
+ _start?: boolean | null;
16442
16478
  /**
16443
16479
  * Send this attribute if you want to mark status as 'interrupted'.
16444
16480
  * @example ```true```
@@ -16453,6 +16489,7 @@ declare class Exports extends ApiResource<Export> {
16453
16489
  events(exportId: string | Export, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
16454
16490
  versions(exportId: string | Export, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
16455
16491
  event_stores(exportId: string | Export, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>>;
16492
+ _start(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
16456
16493
  _interrupt(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
16457
16494
  isExport(resource: any): resource is Export;
16458
16495
  relationship(id: string | ResourceId | null): ExportRel;
@@ -18234,7 +18271,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
18234
18271
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
18235
18272
  declare class CommerceLayerClient {
18236
18273
  #private;
18237
- readonly openApiSchemaVersion = "7.9.14";
18274
+ readonly openApiSchemaVersion = "7.9.16";
18238
18275
  constructor(config: CommerceLayerInitConfig);
18239
18276
  get addresses(): Addresses;
18240
18277
  get adjustments(): Adjustments;
package/lib/index.d.ts CHANGED
@@ -10946,6 +10946,11 @@ interface OrderUpdate extends ResourceUpdate {
10946
10946
  * @example ```true```
10947
10947
  */
10948
10948
  _refresh?: boolean | null;
10949
+ /**
10950
+ * Send this attribute if you want to refresh the prices of the line items associated to this order. Cannot be passed by sales channels.
10951
+ * @example ```true```
10952
+ */
10953
+ _refresh_prices?: boolean | null;
10949
10954
  /**
10950
10955
  * Send this attribute if you want to trigger the external validation for the order.
10951
10956
  * @example ```true```
@@ -11067,6 +11072,7 @@ declare class Orders extends ApiResource<Order> {
11067
11072
  _save_shipping_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11068
11073
  _save_billing_address_to_customer_address_book(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11069
11074
  _refresh(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11075
+ _refresh_prices(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11070
11076
  _validate(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11071
11077
  _create_subscriptions(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
11072
11078
  _start_editing(id: string | Order, params?: QueryParamsRetrieve<Order>, options?: ResourcesConfig): Promise<Order>;
@@ -15554,7 +15560,7 @@ interface Application extends Resource {
15554
15560
  * The application's kind. One of 'sales_channel', 'integration', or 'webapp'.
15555
15561
  * @example ```"sales-channel"```
15556
15562
  */
15557
- kind?: 'dashboard' | 'user' | 'metrics' | 'contentful' | 'bundles' | 'customers' | 'datocms' | 'exports' | 'external' | 'generic' | 'gift_cards' | 'imports' | 'integration' | 'inventory' | 'orders' | 'price_lists' | 'promotions' | 'resources' | 'returns' | 'sales_channel' | 'sanity' | 'shipments' | 'skus' | 'sku_lists' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webapp' | 'webhooks' | 'zapier' | null;
15563
+ kind?: 'dashboard' | 'user' | 'contentful' | 'bundles' | 'customers' | 'datocms' | 'exports' | 'external' | 'generic' | 'gift_cards' | 'imports' | 'integration' | 'inventory' | 'metrics' | 'orders' | 'price_lists' | 'promotions' | 'resources' | 'returns' | 'sales_channel' | 'sanity' | 'shipments' | 'skus' | 'sku_lists' | 'stock_transfers' | 'subscriptions' | 'tags' | 'webapp' | 'webhooks' | 'zapier' | null;
15558
15564
  /**
15559
15565
  * Indicates if the application has public access.
15560
15566
  * @example ```true```
@@ -16336,7 +16342,7 @@ type ExportType = 'exports';
16336
16342
  type ExportRel = ResourceRel & {
16337
16343
  type: ExportType;
16338
16344
  };
16339
- type ExportSort = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'attachment_url'> & ResourceSort;
16345
+ type ExportSort = Pick<Export, 'id' | 'resource_type' | 'format' | 'status' | 'started_at' | 'completed_at' | 'interrupted_at' | 'records_count' | 'processed_count' | 'attachment_url'> & ResourceSort;
16340
16346
  interface Export extends Resource {
16341
16347
  readonly type: ExportType;
16342
16348
  /**
@@ -16350,10 +16356,10 @@ interface Export extends Resource {
16350
16356
  */
16351
16357
  format?: string | null;
16352
16358
  /**
16353
- * The export job status. One of 'pending' (default), 'in_progress', 'interrupted', or 'completed'.
16359
+ * The export job status. One of 'pending' (default), 'in_progress', 'interrupted', 'completed', or 'failed'.
16354
16360
  * @example ```"in_progress"```
16355
16361
  */
16356
- status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
16362
+ status: 'pending' | 'in_progress' | 'interrupted' | 'completed' | 'failed';
16357
16363
  /**
16358
16364
  * List of related resources that should be included in the export (redundant when 'fields' are specified).
16359
16365
  * @example ```["prices.price_tiers"]```
@@ -16373,6 +16379,11 @@ interface Export extends Resource {
16373
16379
  * Send this attribute if you want to skip exporting redundant attributes (IDs, timestamps, blanks, etc.), useful when combining export and import to duplicate your dataset.
16374
16380
  */
16375
16381
  dry_data?: boolean | null;
16382
+ /**
16383
+ * Send this attribute to apply JWT scope–based sales channel filtering to the exported data.
16384
+ * @example ```true```
16385
+ */
16386
+ jwt_filters?: boolean | null;
16376
16387
  /**
16377
16388
  * Time at which the export was started.
16378
16389
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -16383,6 +16394,11 @@ interface Export extends Resource {
16383
16394
  * @example ```"2018-01-01T12:00:00.000Z"```
16384
16395
  */
16385
16396
  completed_at?: string | null;
16397
+ /**
16398
+ * Estimated time at which the export should complete (dynamically refres^hed).
16399
+ * @example ```"2018-01-01T12:00:00.000Z"```
16400
+ */
16401
+ estimated_completion_at?: string | null;
16386
16402
  /**
16387
16403
  * Time at which the export was interrupted.
16388
16404
  * @example ```"2018-01-01T12:00:00.000Z"```
@@ -16393,6 +16409,16 @@ interface Export extends Resource {
16393
16409
  * @example ```300```
16394
16410
  */
16395
16411
  records_count?: number | null;
16412
+ /**
16413
+ * Indicates how many records have been processed in real time.
16414
+ * @example ```270```
16415
+ */
16416
+ processed_count?: number | null;
16417
+ /**
16418
+ * The percentage of progress of the export.
16419
+ * @example ```30```
16420
+ */
16421
+ progress?: number | null;
16396
16422
  /**
16397
16423
  * The URL to the output file, which will be generated upon export completion.
16398
16424
  * @example ```"http://cl_exports.s3.amazonaws.com/"```
@@ -16437,8 +16463,18 @@ interface ExportCreate extends ResourceCreate {
16437
16463
  * Send this attribute if you want to skip exporting redundant attributes (IDs, timestamps, blanks, etc.), useful when combining export and import to duplicate your dataset.
16438
16464
  */
16439
16465
  dry_data?: boolean | null;
16466
+ /**
16467
+ * Send this attribute to apply JWT scope–based sales channel filtering to the exported data.
16468
+ * @example ```true```
16469
+ */
16470
+ jwt_filters?: boolean | null;
16440
16471
  }
16441
16472
  interface ExportUpdate extends ResourceUpdate {
16473
+ /**
16474
+ * Send this attribute if you want to restart an 'interrupted' export.
16475
+ * @example ```true```
16476
+ */
16477
+ _start?: boolean | null;
16442
16478
  /**
16443
16479
  * Send this attribute if you want to mark status as 'interrupted'.
16444
16480
  * @example ```true```
@@ -16453,6 +16489,7 @@ declare class Exports extends ApiResource<Export> {
16453
16489
  events(exportId: string | Export, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
16454
16490
  versions(exportId: string | Export, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
16455
16491
  event_stores(exportId: string | Export, params?: QueryParamsList<EventStore>, options?: ResourcesConfig): Promise<ListResponse<EventStore>>;
16492
+ _start(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
16456
16493
  _interrupt(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
16457
16494
  isExport(resource: any): resource is Export;
16458
16495
  relationship(id: string | ResourceId | null): ExportRel;
@@ -18234,7 +18271,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
18234
18271
  type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
18235
18272
  declare class CommerceLayerClient {
18236
18273
  #private;
18237
- readonly openApiSchemaVersion = "7.9.14";
18274
+ readonly openApiSchemaVersion = "7.9.16";
18238
18275
  constructor(config: CommerceLayerInitConfig);
18239
18276
  get addresses(): Addresses;
18240
18277
  get adjustments(): Adjustments;