@commercelayer/sdk 6.26.0 → 6.27.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/lib/index.d.mts +44 -6
- package/lib/index.d.ts +44 -6
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/package.json +2 -2
package/LICENSE
CHANGED
package/lib/index.d.mts
CHANGED
@@ -1094,6 +1094,7 @@ interface PaymentMethod extends Resource {
|
|
1094
1094
|
market?: Market | null;
|
1095
1095
|
payment_gateway?: PaymentGateway | null;
|
1096
1096
|
store?: Store | null;
|
1097
|
+
orders?: Order[] | null;
|
1097
1098
|
attachments?: Attachment[] | null;
|
1098
1099
|
versions?: Version[] | null;
|
1099
1100
|
}
|
@@ -1217,6 +1218,7 @@ declare class PaymentMethods extends ApiResource<PaymentMethod> {
|
|
1217
1218
|
market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market>;
|
1218
1219
|
payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway>;
|
1219
1220
|
store(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store>;
|
1221
|
+
orders(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
1220
1222
|
attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
1221
1223
|
versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
1222
1224
|
_disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod>;
|
@@ -14730,7 +14732,13 @@ interface CleanupCreate extends ResourceCreate {
|
|
14730
14732
|
*/
|
14731
14733
|
filters?: Record<string, any> | null;
|
14732
14734
|
}
|
14733
|
-
|
14735
|
+
interface CleanupUpdate extends ResourceUpdate {
|
14736
|
+
/**
|
14737
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
14738
|
+
* @example ```"true"```
|
14739
|
+
*/
|
14740
|
+
_interrupt?: boolean | null;
|
14741
|
+
}
|
14734
14742
|
declare class Cleanups extends ApiResource<Cleanup> {
|
14735
14743
|
static readonly TYPE: CleanupType;
|
14736
14744
|
create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup>;
|
@@ -14738,6 +14746,7 @@ declare class Cleanups extends ApiResource<Cleanup> {
|
|
14738
14746
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
14739
14747
|
events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
14740
14748
|
versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
14749
|
+
_interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup>;
|
14741
14750
|
isCleanup(resource: any): resource is Cleanup;
|
14742
14751
|
relationship(id: string | ResourceId | null): CleanupRel;
|
14743
14752
|
relationshipToMany(...ids: string[]): CleanupRel[];
|
@@ -14825,10 +14834,15 @@ interface Export extends Resource {
|
|
14825
14834
|
*/
|
14826
14835
|
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
14827
14836
|
/**
|
14828
|
-
* List of related resources that should be included in the export.
|
14837
|
+
* List of related resources that should be included in the export (redundant when 'fields' are specified).
|
14829
14838
|
* @example ```"prices.price_tiers"```
|
14830
14839
|
*/
|
14831
14840
|
includes?: string[] | null;
|
14841
|
+
/**
|
14842
|
+
* List of fields to export for the main and related resources (automatically included). Pass the asterisk '*' to include all exportable fields for the main and related resources.
|
14843
|
+
* @example ```"code,name,prices.*,prices.price_tiers.price_amount_cents"```
|
14844
|
+
*/
|
14845
|
+
fields?: string[] | null;
|
14832
14846
|
/**
|
14833
14847
|
* The filters used to select the records to be exported.
|
14834
14848
|
* @example ```"[object Object]"```
|
@@ -14863,6 +14877,11 @@ interface Export extends Resource {
|
|
14863
14877
|
* @example ```"http://cl_exports.s3.amazonaws.com/"```
|
14864
14878
|
*/
|
14865
14879
|
attachment_url?: string | null;
|
14880
|
+
/**
|
14881
|
+
* Contains the exports errors, if any.
|
14882
|
+
* @example ```"[object Object]"```
|
14883
|
+
*/
|
14884
|
+
errors_log?: Record<string, any> | null;
|
14866
14885
|
events?: Event[] | null;
|
14867
14886
|
}
|
14868
14887
|
interface ExportCreate extends ResourceCreate {
|
@@ -14877,10 +14896,15 @@ interface ExportCreate extends ResourceCreate {
|
|
14877
14896
|
*/
|
14878
14897
|
format?: string | null;
|
14879
14898
|
/**
|
14880
|
-
* List of related resources that should be included in the export.
|
14899
|
+
* List of related resources that should be included in the export (redundant when 'fields' are specified).
|
14881
14900
|
* @example ```"prices.price_tiers"```
|
14882
14901
|
*/
|
14883
14902
|
includes?: string[] | null;
|
14903
|
+
/**
|
14904
|
+
* List of fields to export for the main and related resources (automatically included). Pass the asterisk '*' to include all exportable fields for the main and related resources.
|
14905
|
+
* @example ```"code,name,prices.*,prices.price_tiers.price_amount_cents"```
|
14906
|
+
*/
|
14907
|
+
fields?: string[] | null;
|
14884
14908
|
/**
|
14885
14909
|
* The filters used to select the records to be exported.
|
14886
14910
|
* @example ```"[object Object]"```
|
@@ -14891,13 +14915,20 @@ interface ExportCreate extends ResourceCreate {
|
|
14891
14915
|
*/
|
14892
14916
|
dry_data?: boolean | null;
|
14893
14917
|
}
|
14894
|
-
|
14918
|
+
interface ExportUpdate extends ResourceUpdate {
|
14919
|
+
/**
|
14920
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
14921
|
+
* @example ```"true"```
|
14922
|
+
*/
|
14923
|
+
_interrupt?: boolean | null;
|
14924
|
+
}
|
14895
14925
|
declare class Exports extends ApiResource<Export> {
|
14896
14926
|
static readonly TYPE: ExportType;
|
14897
14927
|
create(resource: ExportCreate, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14898
14928
|
update(resource: ExportUpdate, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14899
14929
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
14900
14930
|
events(exportId: string | Export, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
14931
|
+
_interrupt(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14901
14932
|
isExport(resource: any): resource is Export;
|
14902
14933
|
relationship(id: string | ResourceId | null): ExportRel;
|
14903
14934
|
relationshipToMany(...ids: string[]): ExportRel[];
|
@@ -15204,13 +15235,20 @@ interface ImportCreate extends ResourceCreate {
|
|
15204
15235
|
*/
|
15205
15236
|
inputs: Array<Record<string, any>>;
|
15206
15237
|
}
|
15207
|
-
|
15238
|
+
interface ImportUpdate extends ResourceUpdate {
|
15239
|
+
/**
|
15240
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
15241
|
+
* @example ```"true"```
|
15242
|
+
*/
|
15243
|
+
_interrupt?: boolean | null;
|
15244
|
+
}
|
15208
15245
|
declare class Imports extends ApiResource<Import> {
|
15209
15246
|
static readonly TYPE: ImportType;
|
15210
15247
|
create(resource: ImportCreate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15211
15248
|
update(resource: ImportUpdate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15212
15249
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
15213
15250
|
events(importId: string | Import, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
15251
|
+
_interrupt(id: string | Import, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15214
15252
|
isImport(resource: any): resource is Import;
|
15215
15253
|
relationship(id: string | ResourceId | null): ImportRel;
|
15216
15254
|
relationshipToMany(...ids: string[]): ImportRel[];
|
@@ -16204,7 +16242,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
16204
16242
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
16205
16243
|
declare class CommerceLayerClient {
|
16206
16244
|
#private;
|
16207
|
-
readonly openApiSchemaVersion = "7.
|
16245
|
+
readonly openApiSchemaVersion = "7.6.0";
|
16208
16246
|
constructor(config: CommerceLayerInitConfig);
|
16209
16247
|
get addresses(): Addresses;
|
16210
16248
|
get adjustments(): Adjustments;
|
package/lib/index.d.ts
CHANGED
@@ -1094,6 +1094,7 @@ interface PaymentMethod extends Resource {
|
|
1094
1094
|
market?: Market | null;
|
1095
1095
|
payment_gateway?: PaymentGateway | null;
|
1096
1096
|
store?: Store | null;
|
1097
|
+
orders?: Order[] | null;
|
1097
1098
|
attachments?: Attachment[] | null;
|
1098
1099
|
versions?: Version[] | null;
|
1099
1100
|
}
|
@@ -1217,6 +1218,7 @@ declare class PaymentMethods extends ApiResource<PaymentMethod> {
|
|
1217
1218
|
market(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Market>, options?: ResourcesConfig): Promise<Market>;
|
1218
1219
|
payment_gateway(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentGateway>, options?: ResourcesConfig): Promise<PaymentGateway>;
|
1219
1220
|
store(paymentMethodId: string | PaymentMethod, params?: QueryParamsRetrieve<Store>, options?: ResourcesConfig): Promise<Store>;
|
1221
|
+
orders(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>>;
|
1220
1222
|
attachments(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
|
1221
1223
|
versions(paymentMethodId: string | PaymentMethod, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
1222
1224
|
_disable(id: string | PaymentMethod, params?: QueryParamsRetrieve<PaymentMethod>, options?: ResourcesConfig): Promise<PaymentMethod>;
|
@@ -14730,7 +14732,13 @@ interface CleanupCreate extends ResourceCreate {
|
|
14730
14732
|
*/
|
14731
14733
|
filters?: Record<string, any> | null;
|
14732
14734
|
}
|
14733
|
-
|
14735
|
+
interface CleanupUpdate extends ResourceUpdate {
|
14736
|
+
/**
|
14737
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
14738
|
+
* @example ```"true"```
|
14739
|
+
*/
|
14740
|
+
_interrupt?: boolean | null;
|
14741
|
+
}
|
14734
14742
|
declare class Cleanups extends ApiResource<Cleanup> {
|
14735
14743
|
static readonly TYPE: CleanupType;
|
14736
14744
|
create(resource: CleanupCreate, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup>;
|
@@ -14738,6 +14746,7 @@ declare class Cleanups extends ApiResource<Cleanup> {
|
|
14738
14746
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
14739
14747
|
events(cleanupId: string | Cleanup, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
14740
14748
|
versions(cleanupId: string | Cleanup, params?: QueryParamsList<Version>, options?: ResourcesConfig): Promise<ListResponse<Version>>;
|
14749
|
+
_interrupt(id: string | Cleanup, params?: QueryParamsRetrieve<Cleanup>, options?: ResourcesConfig): Promise<Cleanup>;
|
14741
14750
|
isCleanup(resource: any): resource is Cleanup;
|
14742
14751
|
relationship(id: string | ResourceId | null): CleanupRel;
|
14743
14752
|
relationshipToMany(...ids: string[]): CleanupRel[];
|
@@ -14825,10 +14834,15 @@ interface Export extends Resource {
|
|
14825
14834
|
*/
|
14826
14835
|
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
14827
14836
|
/**
|
14828
|
-
* List of related resources that should be included in the export.
|
14837
|
+
* List of related resources that should be included in the export (redundant when 'fields' are specified).
|
14829
14838
|
* @example ```"prices.price_tiers"```
|
14830
14839
|
*/
|
14831
14840
|
includes?: string[] | null;
|
14841
|
+
/**
|
14842
|
+
* List of fields to export for the main and related resources (automatically included). Pass the asterisk '*' to include all exportable fields for the main and related resources.
|
14843
|
+
* @example ```"code,name,prices.*,prices.price_tiers.price_amount_cents"```
|
14844
|
+
*/
|
14845
|
+
fields?: string[] | null;
|
14832
14846
|
/**
|
14833
14847
|
* The filters used to select the records to be exported.
|
14834
14848
|
* @example ```"[object Object]"```
|
@@ -14863,6 +14877,11 @@ interface Export extends Resource {
|
|
14863
14877
|
* @example ```"http://cl_exports.s3.amazonaws.com/"```
|
14864
14878
|
*/
|
14865
14879
|
attachment_url?: string | null;
|
14880
|
+
/**
|
14881
|
+
* Contains the exports errors, if any.
|
14882
|
+
* @example ```"[object Object]"```
|
14883
|
+
*/
|
14884
|
+
errors_log?: Record<string, any> | null;
|
14866
14885
|
events?: Event[] | null;
|
14867
14886
|
}
|
14868
14887
|
interface ExportCreate extends ResourceCreate {
|
@@ -14877,10 +14896,15 @@ interface ExportCreate extends ResourceCreate {
|
|
14877
14896
|
*/
|
14878
14897
|
format?: string | null;
|
14879
14898
|
/**
|
14880
|
-
* List of related resources that should be included in the export.
|
14899
|
+
* List of related resources that should be included in the export (redundant when 'fields' are specified).
|
14881
14900
|
* @example ```"prices.price_tiers"```
|
14882
14901
|
*/
|
14883
14902
|
includes?: string[] | null;
|
14903
|
+
/**
|
14904
|
+
* List of fields to export for the main and related resources (automatically included). Pass the asterisk '*' to include all exportable fields for the main and related resources.
|
14905
|
+
* @example ```"code,name,prices.*,prices.price_tiers.price_amount_cents"```
|
14906
|
+
*/
|
14907
|
+
fields?: string[] | null;
|
14884
14908
|
/**
|
14885
14909
|
* The filters used to select the records to be exported.
|
14886
14910
|
* @example ```"[object Object]"```
|
@@ -14891,13 +14915,20 @@ interface ExportCreate extends ResourceCreate {
|
|
14891
14915
|
*/
|
14892
14916
|
dry_data?: boolean | null;
|
14893
14917
|
}
|
14894
|
-
|
14918
|
+
interface ExportUpdate extends ResourceUpdate {
|
14919
|
+
/**
|
14920
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
14921
|
+
* @example ```"true"```
|
14922
|
+
*/
|
14923
|
+
_interrupt?: boolean | null;
|
14924
|
+
}
|
14895
14925
|
declare class Exports extends ApiResource<Export> {
|
14896
14926
|
static readonly TYPE: ExportType;
|
14897
14927
|
create(resource: ExportCreate, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14898
14928
|
update(resource: ExportUpdate, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14899
14929
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
14900
14930
|
events(exportId: string | Export, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
14931
|
+
_interrupt(id: string | Export, params?: QueryParamsRetrieve<Export>, options?: ResourcesConfig): Promise<Export>;
|
14901
14932
|
isExport(resource: any): resource is Export;
|
14902
14933
|
relationship(id: string | ResourceId | null): ExportRel;
|
14903
14934
|
relationshipToMany(...ids: string[]): ExportRel[];
|
@@ -15204,13 +15235,20 @@ interface ImportCreate extends ResourceCreate {
|
|
15204
15235
|
*/
|
15205
15236
|
inputs: Array<Record<string, any>>;
|
15206
15237
|
}
|
15207
|
-
|
15238
|
+
interface ImportUpdate extends ResourceUpdate {
|
15239
|
+
/**
|
15240
|
+
* Send this attribute if you want to mark status as 'interrupted'.
|
15241
|
+
* @example ```"true"```
|
15242
|
+
*/
|
15243
|
+
_interrupt?: boolean | null;
|
15244
|
+
}
|
15208
15245
|
declare class Imports extends ApiResource<Import> {
|
15209
15246
|
static readonly TYPE: ImportType;
|
15210
15247
|
create(resource: ImportCreate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15211
15248
|
update(resource: ImportUpdate, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15212
15249
|
delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
|
15213
15250
|
events(importId: string | Import, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>>;
|
15251
|
+
_interrupt(id: string | Import, params?: QueryParamsRetrieve<Import>, options?: ResourcesConfig): Promise<Import>;
|
15214
15252
|
isImport(resource: any): resource is Import;
|
15215
15253
|
relationship(id: string | ResourceId | null): ImportRel;
|
15216
15254
|
relationshipToMany(...ids: string[]): ImportRel[];
|
@@ -16204,7 +16242,7 @@ type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
|
16204
16242
|
type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
16205
16243
|
declare class CommerceLayerClient {
|
16206
16244
|
#private;
|
16207
|
-
readonly openApiSchemaVersion = "7.
|
16245
|
+
readonly openApiSchemaVersion = "7.6.0";
|
16208
16246
|
constructor(config: CommerceLayerInitConfig);
|
16209
16247
|
get addresses(): Addresses;
|
16210
16248
|
get adjustments(): Adjustments;
|