@commercetools/importapi-sdk 2.0.0 → 2.2.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/CHANGELOG.md +36 -0
- package/README.md +1 -1
- package/dist/commercetools-importapi-sdk.browser.cjs.js +1 -200
- package/dist/commercetools-importapi-sdk.browser.esm.js +1 -200
- package/dist/commercetools-importapi-sdk.cjs.dev.js +1 -200
- package/dist/commercetools-importapi-sdk.cjs.prod.js +1 -200
- package/dist/commercetools-importapi-sdk.esm.js +1 -200
- package/dist/declarations/src/generated/client/by-project-key-request-builder.d.ts +0 -2
- package/dist/declarations/src/generated/index.d.ts +0 -1
- package/dist/declarations/src/generated/models/common.d.ts +1 -1
- package/dist/declarations/src/generated/models/importoperations.d.ts +1 -1
- package/dist/declarations/src/generated/models/importrequests.d.ts +1 -15
- package/package.json +4 -5
- package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-by-import-container-key-request-builder.d.ts +0 -35
- package/dist/declarations/src/generated/client/import-containers/by-project-key-inventories-import-containers-request-builder.d.ts +0 -26
- package/dist/declarations/src/generated/client/import-operations/by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder.d.ts +0 -37
- package/dist/declarations/src/generated/client/import-operations/by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-request-builder.d.ts +0 -48
- package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-import-sink-key-by-import-sink-key-request-builder.d.ts +0 -37
- package/dist/declarations/src/generated/client/inventories/by-project-key-inventories-request-builder.d.ts +0 -28
- package/dist/declarations/src/generated/models/inventories.d.ts +0 -44
|
@@ -453,7 +453,7 @@ export interface PriceTier {
|
|
|
453
453
|
* The type of the import resource.
|
|
454
454
|
*
|
|
455
455
|
*/
|
|
456
|
-
export declare type ImportResourceType = 'category' | 'customer' | '
|
|
456
|
+
export declare type ImportResourceType = 'category' | 'customer' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch';
|
|
457
457
|
/**
|
|
458
458
|
* The type of the referenced resource.
|
|
459
459
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { ProcessingState, UnresolvedReferences } from './common';
|
|
7
7
|
import { ErrorObject } from './errors';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Import Operation describes the import status of a specific resource.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export interface ImportOperation {
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { CategoryImport } from './categories';
|
|
7
7
|
import { CustomerImport } from './customers';
|
|
8
8
|
import { ImportOperationStatus } from './importoperations';
|
|
9
|
-
import { InventoryImport } from './inventories';
|
|
10
9
|
import { OrderPatchImport } from './order-patches';
|
|
11
10
|
import { OrderImport } from './orders';
|
|
12
11
|
import { PriceImport } from './prices';
|
|
@@ -18,7 +17,7 @@ import { ProductVariantImport, ProductVariantPatch } from './productvariants';
|
|
|
18
17
|
* An import request batches multiple import resources of the same import resource type for processing by an import container.
|
|
19
18
|
*
|
|
20
19
|
*/
|
|
21
|
-
export declare type ImportRequest = CategoryImportRequest | CustomerImportRequest |
|
|
20
|
+
export declare type ImportRequest = CategoryImportRequest | CustomerImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest;
|
|
22
21
|
/**
|
|
23
22
|
* A list of the ID's and validation statuses of newly created [ImportOperations](#importoperation).
|
|
24
23
|
* Used as a response at each resource-specific import endpoint, for example, at [Import Categories](/category#import-categories) and [Import ProductTypes](/product-type#import-producttypes).
|
|
@@ -160,16 +159,3 @@ export interface CustomerImportRequest {
|
|
|
160
159
|
*/
|
|
161
160
|
readonly resources: CustomerImport[];
|
|
162
161
|
}
|
|
163
|
-
/**
|
|
164
|
-
* The request body to [import Inventories](#import-inventories). Contains data for [Inventories](/../api//projects/inventory#inventoryentry) to be created or updated in a commercetools Project.
|
|
165
|
-
*
|
|
166
|
-
*/
|
|
167
|
-
export interface InventoryImportRequest {
|
|
168
|
-
readonly type: 'inventory';
|
|
169
|
-
/**
|
|
170
|
-
* The inventory import resources of this request.
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*/
|
|
174
|
-
readonly resources: InventoryImport[];
|
|
175
|
-
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"name": "@commercetools/importapi-sdk",
|
|
7
|
-
"version": "2.
|
|
7
|
+
"version": "2.2.0",
|
|
8
8
|
"description": "Type script sdk for commercetools import features",
|
|
9
9
|
"keywords": ["commercetools", "typescript", "sdk", "import"],
|
|
10
10
|
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/importapi-sdk",
|
|
@@ -23,16 +23,15 @@
|
|
|
23
23
|
"./dist/commercetools-importapi-sdk.esm.js": "./dist/commercetools-importapi-sdk.browser.esm.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@commercetools/sdk-client": "^
|
|
26
|
+
"@commercetools/sdk-client-v2": "^1.1.0",
|
|
27
27
|
"@commercetools/sdk-middleware-auth": "^6.0.4",
|
|
28
28
|
"@commercetools/sdk-middleware-http": "^6.0.4",
|
|
29
29
|
"@commercetools/sdk-middleware-logger": "^2.1.1",
|
|
30
30
|
"querystring": "^0.2.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
35
|
-
"organize-imports-cli": "0.8.0",
|
|
33
|
+
"@types/uuid": "8.3.4",
|
|
34
|
+
"organize-imports-cli": "0.9.0",
|
|
36
35
|
"tsconfig-replace-paths": "0.0.11",
|
|
37
36
|
"uuid": "8.3.2"
|
|
38
37
|
},
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ImportResponse, InventoryImportRequest } from '../../models/importrequests';
|
|
7
|
-
import { executeRequest } from '../../shared/utils/common-types';
|
|
8
|
-
import { ApiRequest } from '../../shared/utils/requests-utils';
|
|
9
|
-
export declare class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
10
|
-
protected readonly args: {
|
|
11
|
-
pathArgs: {
|
|
12
|
-
projectKey: string;
|
|
13
|
-
importContainerKey: string;
|
|
14
|
-
};
|
|
15
|
-
executeRequest: executeRequest;
|
|
16
|
-
baseUri?: string;
|
|
17
|
-
};
|
|
18
|
-
constructor(args: {
|
|
19
|
-
pathArgs: {
|
|
20
|
-
projectKey: string;
|
|
21
|
-
importContainerKey: string;
|
|
22
|
-
};
|
|
23
|
-
executeRequest: executeRequest;
|
|
24
|
-
baseUri?: string;
|
|
25
|
-
});
|
|
26
|
-
/**
|
|
27
|
-
* Creates a request for creating new Inventories or updating existing ones.
|
|
28
|
-
*/
|
|
29
|
-
post(methodArgs: {
|
|
30
|
-
body: InventoryImportRequest;
|
|
31
|
-
headers?: {
|
|
32
|
-
[key: string]: string | string[];
|
|
33
|
-
};
|
|
34
|
-
}): ApiRequest<ImportResponse>;
|
|
35
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { executeRequest } from '../../shared/utils/common-types';
|
|
7
|
-
import { ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder } from './by-project-key-inventories-import-containers-by-import-container-key-request-builder';
|
|
8
|
-
export declare class ByProjectKeyInventoriesImportContainersRequestBuilder {
|
|
9
|
-
protected readonly args: {
|
|
10
|
-
pathArgs: {
|
|
11
|
-
projectKey: string;
|
|
12
|
-
};
|
|
13
|
-
executeRequest: executeRequest;
|
|
14
|
-
baseUri?: string;
|
|
15
|
-
};
|
|
16
|
-
constructor(args: {
|
|
17
|
-
pathArgs: {
|
|
18
|
-
projectKey: string;
|
|
19
|
-
};
|
|
20
|
-
executeRequest: executeRequest;
|
|
21
|
-
baseUri?: string;
|
|
22
|
-
});
|
|
23
|
-
withImportContainerKeyValue(childPathArgs: {
|
|
24
|
-
importContainerKey: string;
|
|
25
|
-
}): ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder;
|
|
26
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ImportOperation } from '../../models/importoperations';
|
|
7
|
-
import { executeRequest } from '../../shared/utils/common-types';
|
|
8
|
-
import { ApiRequest } from '../../shared/utils/requests-utils';
|
|
9
|
-
export declare class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder {
|
|
10
|
-
protected readonly args: {
|
|
11
|
-
pathArgs: {
|
|
12
|
-
projectKey: string;
|
|
13
|
-
importSinkKey: string;
|
|
14
|
-
id: string;
|
|
15
|
-
};
|
|
16
|
-
executeRequest: executeRequest;
|
|
17
|
-
baseUri?: string;
|
|
18
|
-
};
|
|
19
|
-
constructor(args: {
|
|
20
|
-
pathArgs: {
|
|
21
|
-
projectKey: string;
|
|
22
|
-
importSinkKey: string;
|
|
23
|
-
id: string;
|
|
24
|
-
};
|
|
25
|
-
executeRequest: executeRequest;
|
|
26
|
-
baseUri?: string;
|
|
27
|
-
});
|
|
28
|
-
/**
|
|
29
|
-
* Retrieves the import operation with the given id.
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
get(methodArgs?: {
|
|
33
|
-
headers?: {
|
|
34
|
-
[key: string]: string | string[];
|
|
35
|
-
};
|
|
36
|
-
}): ApiRequest<ImportOperation>;
|
|
37
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ProcessingState } from '../../models/common';
|
|
7
|
-
import { ImportOperationPagedResponse } from '../../models/importoperations';
|
|
8
|
-
import { executeRequest, QueryParam } from '../../shared/utils/common-types';
|
|
9
|
-
import { ApiRequest } from '../../shared/utils/requests-utils';
|
|
10
|
-
import { ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder } from './by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-by-id-request-builder';
|
|
11
|
-
export declare class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder {
|
|
12
|
-
protected readonly args: {
|
|
13
|
-
pathArgs: {
|
|
14
|
-
projectKey: string;
|
|
15
|
-
importSinkKey: string;
|
|
16
|
-
};
|
|
17
|
-
executeRequest: executeRequest;
|
|
18
|
-
baseUri?: string;
|
|
19
|
-
};
|
|
20
|
-
constructor(args: {
|
|
21
|
-
pathArgs: {
|
|
22
|
-
projectKey: string;
|
|
23
|
-
importSinkKey: string;
|
|
24
|
-
};
|
|
25
|
-
executeRequest: executeRequest;
|
|
26
|
-
baseUri?: string;
|
|
27
|
-
});
|
|
28
|
-
withIdValue(childPathArgs: {
|
|
29
|
-
id: string;
|
|
30
|
-
}): ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder;
|
|
31
|
-
/**
|
|
32
|
-
* Retrieves all inventory import operations of an import sink key.
|
|
33
|
-
*/
|
|
34
|
-
get(methodArgs?: {
|
|
35
|
-
queryArgs?: {
|
|
36
|
-
limit?: number;
|
|
37
|
-
offset?: number;
|
|
38
|
-
sort?: string | string[];
|
|
39
|
-
resourceKey?: string;
|
|
40
|
-
state?: ProcessingState;
|
|
41
|
-
debug?: boolean;
|
|
42
|
-
[key: string]: QueryParam;
|
|
43
|
-
};
|
|
44
|
-
headers?: {
|
|
45
|
-
[key: string]: string | string[];
|
|
46
|
-
};
|
|
47
|
-
}): ApiRequest<ImportOperationPagedResponse>;
|
|
48
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ImportResponse, InventoryImportRequest } from '../../models/importrequests';
|
|
7
|
-
import { executeRequest } from '../../shared/utils/common-types';
|
|
8
|
-
import { ApiRequest } from '../../shared/utils/requests-utils';
|
|
9
|
-
import { ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder } from '../import-operations/by-project-key-inventories-import-sink-key-by-import-sink-key-import-operations-request-builder';
|
|
10
|
-
export declare class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder {
|
|
11
|
-
protected readonly args: {
|
|
12
|
-
pathArgs: {
|
|
13
|
-
projectKey: string;
|
|
14
|
-
importSinkKey: string;
|
|
15
|
-
};
|
|
16
|
-
executeRequest: executeRequest;
|
|
17
|
-
baseUri?: string;
|
|
18
|
-
};
|
|
19
|
-
constructor(args: {
|
|
20
|
-
pathArgs: {
|
|
21
|
-
projectKey: string;
|
|
22
|
-
importSinkKey: string;
|
|
23
|
-
};
|
|
24
|
-
executeRequest: executeRequest;
|
|
25
|
-
baseUri?: string;
|
|
26
|
-
});
|
|
27
|
-
importOperations(): ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder;
|
|
28
|
-
/**
|
|
29
|
-
* Creates import request for creating new inventories or updating existing ones.
|
|
30
|
-
*/
|
|
31
|
-
post(methodArgs: {
|
|
32
|
-
body: InventoryImportRequest;
|
|
33
|
-
headers?: {
|
|
34
|
-
[key: string]: string | string[];
|
|
35
|
-
};
|
|
36
|
-
}): ApiRequest<ImportResponse>;
|
|
37
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { executeRequest } from '../../shared/utils/common-types';
|
|
7
|
-
import { ByProjectKeyInventoriesImportContainersRequestBuilder } from '../import-containers/by-project-key-inventories-import-containers-request-builder';
|
|
8
|
-
import { ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder } from './by-project-key-inventories-import-sink-key-by-import-sink-key-request-builder';
|
|
9
|
-
export declare class ByProjectKeyInventoriesRequestBuilder {
|
|
10
|
-
protected readonly args: {
|
|
11
|
-
pathArgs: {
|
|
12
|
-
projectKey: string;
|
|
13
|
-
};
|
|
14
|
-
executeRequest: executeRequest;
|
|
15
|
-
baseUri?: string;
|
|
16
|
-
};
|
|
17
|
-
constructor(args: {
|
|
18
|
-
pathArgs: {
|
|
19
|
-
projectKey: string;
|
|
20
|
-
};
|
|
21
|
-
executeRequest: executeRequest;
|
|
22
|
-
baseUri?: string;
|
|
23
|
-
});
|
|
24
|
-
importContainers(): ByProjectKeyInventoriesImportContainersRequestBuilder;
|
|
25
|
-
importSinkKeyWithImportSinkKeyValue(childPathArgs: {
|
|
26
|
-
importSinkKey: string;
|
|
27
|
-
}): ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder;
|
|
28
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
3
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
4
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
5
|
-
*/
|
|
6
|
-
import { ChannelKeyReference, ImportResource } from './common';
|
|
7
|
-
import { Custom } from './customfields';
|
|
8
|
-
/**
|
|
9
|
-
* The data representation for an Inventory to be imported that is persisted as a [Inventory](/../api/projects/inventory#top) in the Project.
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
export interface InventoryImport extends ImportResource {
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
|
-
readonly sku: string;
|
|
17
|
-
/**
|
|
18
|
-
* Maps to `Inventory.quantityOnStock`
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
readonly quantityOnStock: number;
|
|
23
|
-
/**
|
|
24
|
-
* Maps to `Inventory.restockableInDays`
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
readonly restockableInDays?: number;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
readonly expectedDelivery?: string;
|
|
33
|
-
/**
|
|
34
|
-
* References a channel by key.
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
readonly supplyChannel?: ChannelKeyReference;
|
|
38
|
-
/**
|
|
39
|
-
* Maps to `Inventory.custom`.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
readonly custom?: Custom;
|
|
44
|
-
}
|