@commercetools/importapi-sdk 1.21.0 → 2.1.1
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 +29 -0
- package/README.md +100 -18
- package/dist/commercetools-importapi-sdk.browser.cjs.js +1 -198
- package/dist/commercetools-importapi-sdk.browser.esm.js +1 -198
- package/dist/commercetools-importapi-sdk.cjs.dev.js +1 -198
- package/dist/commercetools-importapi-sdk.cjs.prod.js +1 -198
- package/dist/commercetools-importapi-sdk.esm.js +1 -198
- 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 +2 -3
- 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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @commercetools/importapi-sdk
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#165](https://github.com/commercetools/commercetools-sdk-typescript/pull/165) [`1b305a1`](https://github.com/commercetools/commercetools-sdk-typescript/commit/1b305a18602f6daceab31d7691f5b0239db2ad23) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated SDKs
|
|
8
|
+
|
|
9
|
+
## 2.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#148](https://github.com/commercetools/commercetools-sdk-typescript/pull/148) [`0281529`](https://github.com/commercetools/commercetools-sdk-typescript/commit/028152987cd191db2458e5b327ff275a1e6cb36e) Thanks [@github-actions](https://github.com/apps/github-actions)! - Update generated SDKs
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`fcd35a0`](https://github.com/commercetools/commercetools-sdk-typescript/commit/fcd35a0f26b2780d0004c4e9d7b48233a86c2453)]:
|
|
18
|
+
- @commercetools/sdk-client-v2@1.0.1
|
|
19
|
+
|
|
20
|
+
## 2.0.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#161](https://github.com/commercetools/commercetools-sdk-typescript/pull/161) [`f28520f`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f28520f8caa16f8203a3790e354ffc3cffc43068) Thanks [@ajimae](https://github.com/ajimae)! - Restructure dependencies, remove sdk-client-v2 from devDependencies into dependencies.
|
|
25
|
+
|
|
26
|
+
## 2.0.0
|
|
27
|
+
|
|
28
|
+
### Major Changes
|
|
29
|
+
|
|
30
|
+
- [#154](https://github.com/commercetools/commercetools-sdk-typescript/pull/154) [`25f1dea`](https://github.com/commercetools/commercetools-sdk-typescript/commit/25f1dea23eccdfdda01e9144ec2afe968ead58f2) Thanks [@jherey](https://github.com/jherey)! - This is the first major release of the sdk client
|
|
31
|
+
|
|
3
32
|
## 1.21.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,36 +1,108 @@
|
|
|
1
1
|
# Typescript SDK for commercetools import API
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Usage examples
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
npm install --save @commercetools/importapi-sdk
|
|
7
|
-
```
|
|
5
|
+
### Browser environment
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
```html
|
|
8
|
+
<script src="https://unpkg.com/@commercetools/sdk-client-v2@latest/dist/commercetools-sdk-client-v2.umd.js"></script>
|
|
9
|
+
<script src="https://unpkg.com/@commercetools/importapi-sdk@latest/dist/commercetools-importapi-sdk.umd.js"></script>
|
|
10
|
+
```
|
|
10
11
|
|
|
11
12
|
```html
|
|
12
|
-
<script src="https://unpkg.com/browse/@commercetools/importapi-sdk/dist/importapi-sdk.umd.js"></script>
|
|
13
13
|
<script>
|
|
14
|
-
// global:
|
|
14
|
+
// global: @commercetools/sdk-client-v2
|
|
15
|
+
// global: @commercetools/importapi-sdk
|
|
16
|
+
;(function () {
|
|
17
|
+
// We can now access the sdk-client-v2 and importapi-sdk object as:
|
|
18
|
+
// const { ClientBuilder } = this['@commercetools/sdk-client-v2']
|
|
19
|
+
// const { createApiBuilderFromCtpClient } = this['@commercetools/importapi-sdk']
|
|
20
|
+
// or
|
|
21
|
+
// const { ClientBuilder } = window['@commercetools/sdk-client-v2']
|
|
22
|
+
// const { createApiBuilderFromCtpClient } = window['@commercetools/importapi-sdk']
|
|
23
|
+
})()
|
|
15
24
|
</script>
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
###
|
|
27
|
+
### Node environment
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install --save @commercetools/sdk-client-v2
|
|
31
|
+
npm install --save @commercetools/importapi-sdk
|
|
32
|
+
```
|
|
19
33
|
|
|
20
34
|
```ts
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
const {
|
|
36
|
+
ClientBuilder,
|
|
37
|
+
createAuthForClientCredentialsFlow,
|
|
38
|
+
createHttpClient,
|
|
39
|
+
} = require('@commercetools/sdk-client-v2')
|
|
40
|
+
const { createApiBuilderFromCtpClient } = require('@commercetools/importapi-sdk')
|
|
41
|
+
const fetch = require('node-fetch')
|
|
42
|
+
|
|
43
|
+
const projectKey = 'mc-project-key'
|
|
44
|
+
const authMiddlewareOptions = {
|
|
45
|
+
host: 'https://auth.europe-west1.gcp.commercetools.com',
|
|
46
|
+
projectKey,
|
|
47
|
+
credentials: {
|
|
48
|
+
clientId: 'mc-client-id',
|
|
49
|
+
clientSecret: 'mc-client-secrets',
|
|
50
|
+
},
|
|
51
|
+
oauthUri: 'https://auth.europe-west1.gcp.commercetools.com',
|
|
52
|
+
scopes: [`manage_project:${projectKey}`],
|
|
53
|
+
fetch,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const httpMiddlewareOptions = {
|
|
57
|
+
host: 'https://api.europe-west1.gcp.commercetools.com',
|
|
58
|
+
fetch,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const client = new ClientBuilder()
|
|
62
|
+
.withProjectKey(projectKey)
|
|
63
|
+
.withMiddleware(createAuthForClientCredentialsFlow(authMiddlewareOptions))
|
|
64
|
+
.withMiddleware(createHttpClient(httpMiddlewareOptions))
|
|
65
|
+
.withUserAgentMiddleware()
|
|
66
|
+
.build()
|
|
67
|
+
|
|
68
|
+
// or
|
|
69
|
+
const client = new ClientBuilder()
|
|
70
|
+
.withProjectKey(projectKey)
|
|
71
|
+
.withClientCredentialsFlow(authMiddlewareOptions)
|
|
72
|
+
.withHttpMiddleware(httpMiddlewareOptions)
|
|
73
|
+
.withUserAgentMiddleware()
|
|
74
|
+
.build()
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
const apiRoot = createApiBuilderFromCtpClient(client)
|
|
78
|
+
|
|
79
|
+
// calling the importapi functions
|
|
80
|
+
// get project details
|
|
81
|
+
apiRoot
|
|
82
|
+
.withProjectKey({
|
|
83
|
+
projectKey,
|
|
84
|
+
})
|
|
85
|
+
.get()
|
|
86
|
+
.execute()
|
|
87
|
+
.then((x) => {
|
|
88
|
+
/*...*/
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
// -----------------------------------------------------------------------
|
|
93
|
+
// The sdk-client-v2 also has support for the old syntax
|
|
24
94
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
95
|
+
createClient,
|
|
96
|
+
createHttpClient,
|
|
97
|
+
createAuthForClientCredentialsFlow,
|
|
98
|
+
} from '@commercetools/sdk-client-v2'
|
|
99
|
+
import { createApiBuilderFromCtpClient } from '@commercetools/importapi-sdk')
|
|
28
100
|
import fetch from 'node-fetch'
|
|
29
101
|
|
|
30
102
|
const projectKey = 'some_project_key'
|
|
31
103
|
|
|
32
|
-
const authMiddleware =
|
|
33
|
-
host: 'https://auth.europe-west1.gcp.commercetools.com
|
|
104
|
+
const authMiddleware = createAuthForClientCredentialsFlow({
|
|
105
|
+
host: 'https://auth.europe-west1.gcp.commercetools.com',
|
|
34
106
|
projectKey,
|
|
35
107
|
credentials: {
|
|
36
108
|
clientId: 'some_id',
|
|
@@ -39,7 +111,7 @@ const authMiddleware = createAuthMiddlewareForClientCredentialsFlow({
|
|
|
39
111
|
fetch,
|
|
40
112
|
})
|
|
41
113
|
|
|
42
|
-
const httpMiddleware =
|
|
114
|
+
const httpMiddleware = createHttpClient({
|
|
43
115
|
host: 'https://import.europe-west1.gcp.commercetools.com',
|
|
44
116
|
fetch,
|
|
45
117
|
})
|
|
@@ -48,5 +120,15 @@ const ctpClient = createClient({
|
|
|
48
120
|
middlewares: [authMiddleware, httpMiddleware],
|
|
49
121
|
})
|
|
50
122
|
|
|
51
|
-
const apiRoot
|
|
123
|
+
const apiRoot = createApiBuilderFromCtpClient(ctpClient)
|
|
124
|
+
|
|
125
|
+
apiRoot
|
|
126
|
+
.withProjectKey({
|
|
127
|
+
projectKey,
|
|
128
|
+
})
|
|
129
|
+
.get()
|
|
130
|
+
.execute()
|
|
131
|
+
.then((x) => {
|
|
132
|
+
/*...*/
|
|
133
|
+
})
|
|
52
134
|
```
|
|
@@ -885,194 +885,6 @@ class ByProjectKeyImportSummariesRequestBuilder {
|
|
|
885
885
|
|
|
886
886
|
}
|
|
887
887
|
|
|
888
|
-
/**
|
|
889
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
890
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
891
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
892
|
-
*/
|
|
893
|
-
class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
894
|
-
constructor(args) {
|
|
895
|
-
this.args = args;
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* Creates a request for creating new Inventories or updating existing ones.
|
|
899
|
-
*/
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
post(methodArgs) {
|
|
903
|
-
return new ApiRequest({
|
|
904
|
-
baseUri: this.args.baseUri,
|
|
905
|
-
method: 'POST',
|
|
906
|
-
uriTemplate: '/{projectKey}/inventories/import-containers/{importContainerKey}',
|
|
907
|
-
pathVariables: this.args.pathArgs,
|
|
908
|
-
headers: {
|
|
909
|
-
'Content-Type': 'application/json',
|
|
910
|
-
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
911
|
-
},
|
|
912
|
-
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
913
|
-
}, this.args.executeRequest);
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
/**
|
|
919
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
920
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
921
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
922
|
-
*/
|
|
923
|
-
class ByProjectKeyInventoriesImportContainersRequestBuilder {
|
|
924
|
-
constructor(args) {
|
|
925
|
-
this.args = args;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
withImportContainerKeyValue(childPathArgs) {
|
|
929
|
-
return new ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder({
|
|
930
|
-
pathArgs: { ...this.args.pathArgs,
|
|
931
|
-
...childPathArgs
|
|
932
|
-
},
|
|
933
|
-
executeRequest: this.args.executeRequest,
|
|
934
|
-
baseUri: this.args.baseUri
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
/**
|
|
941
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
942
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
943
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
944
|
-
*/
|
|
945
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder {
|
|
946
|
-
constructor(args) {
|
|
947
|
-
this.args = args;
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* Retrieves the import operation with the given id.
|
|
951
|
-
*
|
|
952
|
-
*/
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
get(methodArgs) {
|
|
956
|
-
return new ApiRequest({
|
|
957
|
-
baseUri: this.args.baseUri,
|
|
958
|
-
method: 'GET',
|
|
959
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}/import-operations/{id}',
|
|
960
|
-
pathVariables: this.args.pathArgs,
|
|
961
|
-
headers: { ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
962
|
-
}
|
|
963
|
-
}, this.args.executeRequest);
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
970
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
971
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
972
|
-
*/
|
|
973
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder {
|
|
974
|
-
constructor(args) {
|
|
975
|
-
this.args = args;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
withIdValue(childPathArgs) {
|
|
979
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder({
|
|
980
|
-
pathArgs: { ...this.args.pathArgs,
|
|
981
|
-
...childPathArgs
|
|
982
|
-
},
|
|
983
|
-
executeRequest: this.args.executeRequest,
|
|
984
|
-
baseUri: this.args.baseUri
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* Retrieves all inventory import operations of an import sink key.
|
|
989
|
-
*/
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
get(methodArgs) {
|
|
993
|
-
return new ApiRequest({
|
|
994
|
-
baseUri: this.args.baseUri,
|
|
995
|
-
method: 'GET',
|
|
996
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}/import-operations',
|
|
997
|
-
pathVariables: this.args.pathArgs,
|
|
998
|
-
headers: { ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
999
|
-
},
|
|
1000
|
-
queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
|
|
1001
|
-
}, this.args.executeRequest);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1008
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1009
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1010
|
-
*/
|
|
1011
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder {
|
|
1012
|
-
constructor(args) {
|
|
1013
|
-
this.args = args;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
importOperations() {
|
|
1017
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder({
|
|
1018
|
-
pathArgs: { ...this.args.pathArgs
|
|
1019
|
-
},
|
|
1020
|
-
executeRequest: this.args.executeRequest,
|
|
1021
|
-
baseUri: this.args.baseUri
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
/**
|
|
1025
|
-
* Creates import request for creating new inventories or updating existing ones.
|
|
1026
|
-
*/
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
post(methodArgs) {
|
|
1030
|
-
return new ApiRequest({
|
|
1031
|
-
baseUri: this.args.baseUri,
|
|
1032
|
-
method: 'POST',
|
|
1033
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}',
|
|
1034
|
-
pathVariables: this.args.pathArgs,
|
|
1035
|
-
headers: {
|
|
1036
|
-
'Content-Type': 'application/json',
|
|
1037
|
-
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
1038
|
-
},
|
|
1039
|
-
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1040
|
-
}, this.args.executeRequest);
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
/**
|
|
1046
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1047
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1048
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1049
|
-
*/
|
|
1050
|
-
class ByProjectKeyInventoriesRequestBuilder {
|
|
1051
|
-
constructor(args) {
|
|
1052
|
-
this.args = args;
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
importContainers() {
|
|
1056
|
-
return new ByProjectKeyInventoriesImportContainersRequestBuilder({
|
|
1057
|
-
pathArgs: { ...this.args.pathArgs
|
|
1058
|
-
},
|
|
1059
|
-
executeRequest: this.args.executeRequest,
|
|
1060
|
-
baseUri: this.args.baseUri
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
importSinkKeyWithImportSinkKeyValue(childPathArgs) {
|
|
1065
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder({
|
|
1066
|
-
pathArgs: { ...this.args.pathArgs,
|
|
1067
|
-
...childPathArgs
|
|
1068
|
-
},
|
|
1069
|
-
executeRequest: this.args.executeRequest,
|
|
1070
|
-
baseUri: this.args.baseUri
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
888
|
/**
|
|
1077
889
|
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1078
890
|
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
@@ -2715,15 +2527,6 @@ class ByProjectKeyRequestBuilder {
|
|
|
2715
2527
|
});
|
|
2716
2528
|
}
|
|
2717
2529
|
|
|
2718
|
-
inventories() {
|
|
2719
|
-
return new ByProjectKeyInventoriesRequestBuilder({
|
|
2720
|
-
pathArgs: { ...this.args.pathArgs
|
|
2721
|
-
},
|
|
2722
|
-
executeRequest: this.args.executeRequest,
|
|
2723
|
-
baseUri: this.args.baseUri
|
|
2724
|
-
});
|
|
2725
|
-
}
|
|
2726
|
-
|
|
2727
2530
|
}
|
|
2728
2531
|
|
|
2729
2532
|
class ApiRoot {
|
|
@@ -2733,7 +2536,7 @@ class ApiRoot {
|
|
|
2733
2536
|
_defineProperty(this, "baseUri", void 0);
|
|
2734
2537
|
|
|
2735
2538
|
this.executeRequest = args.executeRequest;
|
|
2736
|
-
this.baseUri = args.baseUri
|
|
2539
|
+
this.baseUri = args.baseUri || 'https://import.europe-west1.gcp.commercetools.com';
|
|
2737
2540
|
}
|
|
2738
2541
|
|
|
2739
2542
|
withProjectKeyValue(childPathArgs) {
|
|
@@ -881,194 +881,6 @@ class ByProjectKeyImportSummariesRequestBuilder {
|
|
|
881
881
|
|
|
882
882
|
}
|
|
883
883
|
|
|
884
|
-
/**
|
|
885
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
886
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
887
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
888
|
-
*/
|
|
889
|
-
class ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder {
|
|
890
|
-
constructor(args) {
|
|
891
|
-
this.args = args;
|
|
892
|
-
}
|
|
893
|
-
/**
|
|
894
|
-
* Creates a request for creating new Inventories or updating existing ones.
|
|
895
|
-
*/
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
post(methodArgs) {
|
|
899
|
-
return new ApiRequest({
|
|
900
|
-
baseUri: this.args.baseUri,
|
|
901
|
-
method: 'POST',
|
|
902
|
-
uriTemplate: '/{projectKey}/inventories/import-containers/{importContainerKey}',
|
|
903
|
-
pathVariables: this.args.pathArgs,
|
|
904
|
-
headers: {
|
|
905
|
-
'Content-Type': 'application/json',
|
|
906
|
-
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
907
|
-
},
|
|
908
|
-
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
909
|
-
}, this.args.executeRequest);
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
916
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
917
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
918
|
-
*/
|
|
919
|
-
class ByProjectKeyInventoriesImportContainersRequestBuilder {
|
|
920
|
-
constructor(args) {
|
|
921
|
-
this.args = args;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
withImportContainerKeyValue(childPathArgs) {
|
|
925
|
-
return new ByProjectKeyInventoriesImportContainersByImportContainerKeyRequestBuilder({
|
|
926
|
-
pathArgs: { ...this.args.pathArgs,
|
|
927
|
-
...childPathArgs
|
|
928
|
-
},
|
|
929
|
-
executeRequest: this.args.executeRequest,
|
|
930
|
-
baseUri: this.args.baseUri
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
938
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
939
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
940
|
-
*/
|
|
941
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder {
|
|
942
|
-
constructor(args) {
|
|
943
|
-
this.args = args;
|
|
944
|
-
}
|
|
945
|
-
/**
|
|
946
|
-
* Retrieves the import operation with the given id.
|
|
947
|
-
*
|
|
948
|
-
*/
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
get(methodArgs) {
|
|
952
|
-
return new ApiRequest({
|
|
953
|
-
baseUri: this.args.baseUri,
|
|
954
|
-
method: 'GET',
|
|
955
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}/import-operations/{id}',
|
|
956
|
-
pathVariables: this.args.pathArgs,
|
|
957
|
-
headers: { ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
958
|
-
}
|
|
959
|
-
}, this.args.executeRequest);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
966
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
967
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
968
|
-
*/
|
|
969
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder {
|
|
970
|
-
constructor(args) {
|
|
971
|
-
this.args = args;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
withIdValue(childPathArgs) {
|
|
975
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsByIdRequestBuilder({
|
|
976
|
-
pathArgs: { ...this.args.pathArgs,
|
|
977
|
-
...childPathArgs
|
|
978
|
-
},
|
|
979
|
-
executeRequest: this.args.executeRequest,
|
|
980
|
-
baseUri: this.args.baseUri
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* Retrieves all inventory import operations of an import sink key.
|
|
985
|
-
*/
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
get(methodArgs) {
|
|
989
|
-
return new ApiRequest({
|
|
990
|
-
baseUri: this.args.baseUri,
|
|
991
|
-
method: 'GET',
|
|
992
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}/import-operations',
|
|
993
|
-
pathVariables: this.args.pathArgs,
|
|
994
|
-
headers: { ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
995
|
-
},
|
|
996
|
-
queryParams: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.queryArgs
|
|
997
|
-
}, this.args.executeRequest);
|
|
998
|
-
}
|
|
999
|
-
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
/**
|
|
1003
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1004
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1005
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1006
|
-
*/
|
|
1007
|
-
class ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder {
|
|
1008
|
-
constructor(args) {
|
|
1009
|
-
this.args = args;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
importOperations() {
|
|
1013
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyImportOperationsRequestBuilder({
|
|
1014
|
-
pathArgs: { ...this.args.pathArgs
|
|
1015
|
-
},
|
|
1016
|
-
executeRequest: this.args.executeRequest,
|
|
1017
|
-
baseUri: this.args.baseUri
|
|
1018
|
-
});
|
|
1019
|
-
}
|
|
1020
|
-
/**
|
|
1021
|
-
* Creates import request for creating new inventories or updating existing ones.
|
|
1022
|
-
*/
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
post(methodArgs) {
|
|
1026
|
-
return new ApiRequest({
|
|
1027
|
-
baseUri: this.args.baseUri,
|
|
1028
|
-
method: 'POST',
|
|
1029
|
-
uriTemplate: '/{projectKey}/inventories/importSinkKey={importSinkKey}',
|
|
1030
|
-
pathVariables: this.args.pathArgs,
|
|
1031
|
-
headers: {
|
|
1032
|
-
'Content-Type': 'application/json',
|
|
1033
|
-
...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
|
|
1034
|
-
},
|
|
1035
|
-
body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
|
|
1036
|
-
}, this.args.executeRequest);
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1043
|
-
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
1044
|
-
* For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
|
|
1045
|
-
*/
|
|
1046
|
-
class ByProjectKeyInventoriesRequestBuilder {
|
|
1047
|
-
constructor(args) {
|
|
1048
|
-
this.args = args;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
importContainers() {
|
|
1052
|
-
return new ByProjectKeyInventoriesImportContainersRequestBuilder({
|
|
1053
|
-
pathArgs: { ...this.args.pathArgs
|
|
1054
|
-
},
|
|
1055
|
-
executeRequest: this.args.executeRequest,
|
|
1056
|
-
baseUri: this.args.baseUri
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
importSinkKeyWithImportSinkKeyValue(childPathArgs) {
|
|
1061
|
-
return new ByProjectKeyInventoriesImportSinkKeyByImportSinkKeyRequestBuilder({
|
|
1062
|
-
pathArgs: { ...this.args.pathArgs,
|
|
1063
|
-
...childPathArgs
|
|
1064
|
-
},
|
|
1065
|
-
executeRequest: this.args.executeRequest,
|
|
1066
|
-
baseUri: this.args.baseUri
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
884
|
/**
|
|
1073
885
|
* Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
|
|
1074
886
|
* Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
|
|
@@ -2711,15 +2523,6 @@ class ByProjectKeyRequestBuilder {
|
|
|
2711
2523
|
});
|
|
2712
2524
|
}
|
|
2713
2525
|
|
|
2714
|
-
inventories() {
|
|
2715
|
-
return new ByProjectKeyInventoriesRequestBuilder({
|
|
2716
|
-
pathArgs: { ...this.args.pathArgs
|
|
2717
|
-
},
|
|
2718
|
-
executeRequest: this.args.executeRequest,
|
|
2719
|
-
baseUri: this.args.baseUri
|
|
2720
|
-
});
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
2526
|
}
|
|
2724
2527
|
|
|
2725
2528
|
class ApiRoot {
|
|
@@ -2729,7 +2532,7 @@ class ApiRoot {
|
|
|
2729
2532
|
_defineProperty(this, "baseUri", void 0);
|
|
2730
2533
|
|
|
2731
2534
|
this.executeRequest = args.executeRequest;
|
|
2732
|
-
this.baseUri = args.baseUri
|
|
2535
|
+
this.baseUri = args.baseUri || 'https://import.europe-west1.gcp.commercetools.com';
|
|
2733
2536
|
}
|
|
2734
2537
|
|
|
2735
2538
|
withProjectKeyValue(childPathArgs) {
|