@commercetools/importapi-sdk 4.4.0 → 4.5.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 CHANGED
@@ -1,5 +1,257 @@
1
1
  # @commercetools/importapi-sdk
2
2
 
3
+ ## 4.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#465](https://github.com/commercetools/commercetools-sdk-typescript/pull/465) [`efa9194`](https://github.com/commercetools/commercetools-sdk-typescript/commit/efa9194bd092bbb653b6d44e76fb90f563f41d53) Thanks [@github-actions](https://github.com/apps/github-actions)! - ## Update generated SDKs
8
+
9
+ **Api changes**
10
+
11
+ <details>
12
+ <summary>Changed Type(s)</summary>
13
+
14
+ - :warning: changed type `AssociateRole` from type `string` to `BaseResource`
15
+ </details>
16
+
17
+ <details>
18
+ <summary>Added Type(s)</summary>
19
+
20
+ - added type `AssociateRoleDraft`
21
+ - added type `AssociateRoleKeyReference`
22
+ - added type `AssociateRolePagedQueryResponse`
23
+ - added type `AssociateRoleReference`
24
+ - added type `AssociateRoleResourceIdentifier`
25
+ - added type `AssociateRoleUpdate`
26
+ - added type `AssociateRoleUpdateAction`
27
+ - added type `Permission`
28
+ - added type `AssociateRoleAddPermissionAction`
29
+ - added type `AssociateRoleChangeBuyerAssignableAction`
30
+ - added type `AssociateRoleRemovePermissionAction`
31
+ - added type `AssociateRoleSetCustomFieldAction`
32
+ - added type `AssociateRoleSetCustomTypeAction`
33
+ - added type `AssociateRoleSetNameAction`
34
+ - added type `AssociateRoleSetPermissionsAction`
35
+ - added type `AssociateRoleAssignment`
36
+ - added type `AssociateRoleAssignmentDraft`
37
+ - added type `AssociateRoleDeprecated`
38
+ - added type `AssociateRoleInheritanceMode`
39
+ - added type `BusinessUnitAssociateMode`
40
+ - added type `InheritedAssociate`
41
+ - added type `InheritedAssociateRoleAssignment`
42
+ - added type `BusinessUnitChangeAssociateModeAction`
43
+ - added type `AssociateMissingPermissionError`
44
+ - added type `GraphQLAssociateMissingPermissionError`
45
+ - added type `AssociateRoleBuyerAssignableChangedMessage`
46
+ - added type `AssociateRoleCreatedMessage`
47
+ - added type `AssociateRoleDeletedMessage`
48
+ - added type `AssociateRoleNameChangedMessage`
49
+ - added type `AssociateRolePermissionAddedMessage`
50
+ - added type `AssociateRolePermissionRemovedMessage`
51
+ - added type `AssociateRolePermissionsSetMessage`
52
+ - added type `BusinessUnitAssociateModeChangedMessage`
53
+ - added type `AssociateRoleBuyerAssignableChangedMessagePayload`
54
+ - added type `AssociateRoleCreatedMessagePayload`
55
+ - added type `AssociateRoleDeletedMessagePayload`
56
+ - added type `AssociateRoleNameChangedMessagePayload`
57
+ - added type `AssociateRolePermissionAddedMessagePayload`
58
+ - added type `AssociateRolePermissionRemovedMessagePayload`
59
+ - added type `AssociateRolePermissionsSetMessagePayload`
60
+ - added type `BusinessUnitAssociateModeChangedMessagePayload`
61
+ - added type `ProjectSetBusinessUnitAssociateRoleOnCreationAction`
62
+ </details>
63
+
64
+ <details>
65
+ <summary>Added Enum(s)</summary>
66
+
67
+ - added enum `associate-role` to type `ReferenceTypeId`
68
+ - added enum `associate-role` to type `MessageSubscriptionResourceTypeId`
69
+ - added enum `associate-role` to type `ResourceTypeId`
70
+ </details>
71
+
72
+ <details>
73
+ <summary>Added Property(s)</summary>
74
+
75
+ - added property `associateRoleAssignments` to type `Associate`
76
+ - added property `associateRoleAssignments` to type `AssociateDraft`
77
+ - added property `associateMode` to type `BusinessUnit`
78
+ - added property `inheritedAssociates` to type `BusinessUnit`
79
+ - added property `associateMode` to type `BusinessUnitDraft`
80
+ - added property `associateMode` to type `Company`
81
+ - added property `inheritedAssociates` to type `Company`
82
+ - added property `associateMode` to type `CompanyDraft`
83
+ - added property `associateMode` to type `Division`
84
+ - added property `inheritedAssociates` to type `Division`
85
+ - added property `associateMode` to type `DivisionDraft`
86
+ - added property `myBusinessUnitAssociateRoleOnCreation` to type `BusinessUnitConfiguration`
87
+ </details>
88
+
89
+ <details>
90
+ <summary>Changed Property(s)</summary>
91
+
92
+ - :warning: changed property `roles` of type `Associate` from type `AssociateRole[]` to `AssociateRoleDeprecated[]`
93
+ - :warning: changed property `roles` of type `AssociateDraft` from type `AssociateRole[]` to `AssociateRoleDeprecated[]`
94
+ </details>
95
+
96
+ <details>
97
+ <summary>MarkDeprecated Property(s)</summary>
98
+
99
+ - marked property `Associate::roles` as deprecated
100
+ - marked property `AssociateDraft::roles` as deprecated
101
+ </details>
102
+
103
+ <details>
104
+ <summary>Added Resource(s)</summary>
105
+
106
+ - added resource `/{projectKey}/as-associate`
107
+ - added resource `/{projectKey}/associate-roles`
108
+ - added resource `/{projectKey}/as-associate/{associateId}`
109
+ - added resource `/{projectKey}/as-associate/{associateId}/business-units`
110
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}`
111
+ - added resource `/{projectKey}/as-associate/{associateId}/business-units/key={key}`
112
+ - added resource `/{projectKey}/as-associate/{associateId}/business-units/{ID}`
113
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/carts`
114
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders`
115
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quotes`
116
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quote-requests`
117
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/carts/key={key}`
118
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/carts/{ID}`
119
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders/quotes`
120
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders/order-number={orderNumber}`
121
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/orders/{ID}`
122
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quotes/key={key}`
123
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quotes/{ID}`
124
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quote-requests/key={key}`
125
+ - added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/quote-requests/{ID}`
126
+ - added resource `/{projectKey}/associate-roles/key={key}`
127
+ - added resource `/{projectKey}/associate-roles/{ID}`
128
+ </details>
129
+
130
+ <details>
131
+ <summary>Added Method(s)</summary>
132
+
133
+ - added method `apiRoot.withProjectKey().associateRoles().get()`
134
+ - added method `apiRoot.withProjectKey().associateRoles().post()`
135
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().get()`
136
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().post()`
137
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().withKey().get()`
138
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().withKey().post()`
139
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().withId().get()`
140
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().businessUnits().withId().post()`
141
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().get()`
142
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().post()`
143
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().get()`
144
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().post()`
145
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quotes().get()`
146
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().get()`
147
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().post()`
148
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withKey().get()`
149
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withKey().post()`
150
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withKey().delete()`
151
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withId().get()`
152
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withId().post()`
153
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().carts().withId().delete()`
154
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().orderQuote().post()`
155
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().withOrderNumber().get()`
156
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().withOrderNumber().post()`
157
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().withId().get()`
158
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().orders().withId().post()`
159
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quotes().withKey().get()`
160
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quotes().withKey().post()`
161
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quotes().withId().get()`
162
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quotes().withId().post()`
163
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().withKey().get()`
164
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().withKey().post()`
165
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().withId().get()`
166
+ - added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().quoteRequests().withId().post()`
167
+ - added method `apiRoot.withProjectKey().associateRoles().withKey().get()`
168
+ - added method `apiRoot.withProjectKey().associateRoles().withKey().post()`
169
+ - added method `apiRoot.withProjectKey().associateRoles().withKey().delete()`
170
+ - added method `apiRoot.withProjectKey().associateRoles().withId().get()`
171
+ - added method `apiRoot.withProjectKey().associateRoles().withId().post()`
172
+ - added method `apiRoot.withProjectKey().associateRoles().withId().delete()`
173
+ </details>
174
+
175
+ **Import changes**
176
+
177
+ <details>
178
+ <summary>Added Enum(s)</summary>
179
+
180
+ - added enum `type` to type `ImportResourceType`
181
+ </details>
182
+
183
+ <details>
184
+ <summary>Added Resource(s)</summary>
185
+
186
+ - added resource `/{projectKey}/types`
187
+ - added resource `/{projectKey}/types/import-containers`
188
+ - added resource `/{projectKey}/types/import-containers/{importContainerKey}`
189
+ </details>
190
+
191
+ <details>
192
+ <summary>Added Method(s)</summary>
193
+
194
+ - added method `apiRoot.withProjectKeyValue().types().importContainers().withImportContainerKeyValue().post()`
195
+ </details>
196
+
197
+ <details>
198
+ <summary>Added Type(s)</summary>
199
+
200
+ - added type `TypeImportRequest`
201
+ - added type `TypeTextInputHint`
202
+ - added type `ResourceTypeId`
203
+ - added type `FieldType`
204
+ - added type `CustomFieldBooleanType`
205
+ - added type `CustomFieldDateTimeType`
206
+ - added type `CustomFieldDateType`
207
+ - added type `CustomFieldEnumType`
208
+ - added type `CustomFieldEnumValue`
209
+ - added type `CustomFieldLocalizedEnumType`
210
+ - added type `CustomFieldLocalizedEnumValue`
211
+ - added type `CustomFieldLocalizedStringType`
212
+ - added type `CustomFieldMoneyType`
213
+ - added type `CustomFieldNumberType`
214
+ - added type `CustomFieldReferenceType`
215
+ - added type `CustomFieldReferenceValue`
216
+ - added type `CustomFieldSetType`
217
+ - added type `CustomFieldStringType`
218
+ - added type `CustomFieldTimeType`
219
+ - added type `FieldDefinition`
220
+ - added type `TypeImport`
221
+ </details>
222
+
223
+ **History changes**
224
+
225
+ <details>
226
+ <summary>Added QueryParameter(s)</summary>
227
+
228
+ - added query parameter `resourceTypes` to method `get /{projectKey}`
229
+ </details>
230
+
231
+ <details>
232
+ <summary>Removed QueryParameter(s)</summary>
233
+
234
+ - :warning: removed query parameter `resourceType` from method `get /{projectKey}`
235
+ </details>
236
+
237
+ <details>
238
+ <summary>Added Type(s)</summary>
239
+
240
+ - added type `SetCountriesChange`
241
+ - added type `SetPurchaseOrderNumberChange`
242
+ - added type `StoreCountry`
243
+ </details>
244
+
245
+ ## 4.4.1
246
+
247
+ ### Patch Changes
248
+
249
+ - [#453](https://github.com/commercetools/commercetools-sdk-typescript/pull/453) [`a83e653`](https://github.com/commercetools/commercetools-sdk-typescript/commit/a83e653c986e50f31f71546edc721263d29990b5) Thanks [@ajimae](https://github.com/ajimae)! - - Remove all `querystring` dependency
250
+ - Add qs dependency to requiring package
251
+ - Refactor code to accommodate new implementation
252
+ - Updated dependencies [[`a83e653`](https://github.com/commercetools/commercetools-sdk-typescript/commit/a83e653c986e50f31f71546edc721263d29990b5)]:
253
+ - @commercetools/sdk-client-v2@2.1.6
254
+
3
255
  ## 4.4.0
4
256
 
5
257
  ### Minor Changes
@@ -2,8 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var querystring = require('querystring');
6
-
7
5
  function _toPrimitive(input, hint) {
8
6
  if (typeof input !== "object" || input === null) return input;
9
7
  var prim = input[Symbol.toPrimitive];
@@ -40,9 +38,20 @@ function _defineProperty(obj, key, value) {
40
38
  * Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
41
39
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
42
40
  */
41
+
43
42
  function isDefined(value) {
44
43
  return typeof value !== 'undefined' && value !== null;
45
44
  }
45
+ function stringify(object) {
46
+ const params = new URLSearchParams(object);
47
+ for (const [key, value] of Object.entries(object)) {
48
+ if (Array.isArray(value)) {
49
+ params.delete(key);
50
+ value.filter(Boolean).forEach(v => params.append(key, v));
51
+ }
52
+ }
53
+ return params.toString();
54
+ }
46
55
  function cleanObject(obj) {
47
56
  return Object.keys(obj).reduce((result, key) => {
48
57
  const value = obj[key];
@@ -67,7 +76,7 @@ function cleanObject(obj) {
67
76
  }
68
77
  function formatQueryString(variableMap) {
69
78
  const map = cleanObject(variableMap);
70
- const result = querystring.stringify(map);
79
+ const result = stringify(map);
71
80
  if (result === '') {
72
81
  return '';
73
82
  }
@@ -1228,6 +1237,80 @@ class ByProjectKeyStandalonePricesRequestBuilder {
1228
1237
  }
1229
1238
  }
1230
1239
 
1240
+ /**
1241
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1242
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1243
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1244
+ */
1245
+ /**
1246
+ **/
1247
+ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1248
+ constructor(args) {
1249
+ this.args = args;
1250
+ }
1251
+ /**
1252
+ * Creates a request for creating new Type or updating existing ones.
1253
+ */
1254
+ post(methodArgs) {
1255
+ return new ApiRequest({
1256
+ baseUri: this.args.baseUri,
1257
+ method: 'POST',
1258
+ uriTemplate: '/{projectKey}/types/import-containers/{importContainerKey}',
1259
+ pathVariables: this.args.pathArgs,
1260
+ headers: {
1261
+ 'Content-Type': 'application/json',
1262
+ ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1263
+ },
1264
+ body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1265
+ }, this.args.executeRequest);
1266
+ }
1267
+ }
1268
+
1269
+ /**
1270
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1271
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1272
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1273
+ */
1274
+ /**
1275
+ **/
1276
+ class ByProjectKeyTypesImportContainersRequestBuilder {
1277
+ constructor(args) {
1278
+ this.args = args;
1279
+ }
1280
+ withImportContainerKeyValue(childPathArgs) {
1281
+ return new ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder({
1282
+ pathArgs: {
1283
+ ...this.args.pathArgs,
1284
+ ...childPathArgs
1285
+ },
1286
+ executeRequest: this.args.executeRequest,
1287
+ baseUri: this.args.baseUri
1288
+ });
1289
+ }
1290
+ }
1291
+
1292
+ /**
1293
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1294
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1295
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1296
+ */
1297
+ /**
1298
+ **/
1299
+ class ByProjectKeyTypesRequestBuilder {
1300
+ constructor(args) {
1301
+ this.args = args;
1302
+ }
1303
+ importContainers() {
1304
+ return new ByProjectKeyTypesImportContainersRequestBuilder({
1305
+ pathArgs: {
1306
+ ...this.args.pathArgs
1307
+ },
1308
+ executeRequest: this.args.executeRequest,
1309
+ baseUri: this.args.baseUri
1310
+ });
1311
+ }
1312
+ }
1313
+
1231
1314
  /**
1232
1315
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1233
1316
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -1365,6 +1448,15 @@ class ByProjectKeyRequestBuilder {
1365
1448
  baseUri: this.args.baseUri
1366
1449
  });
1367
1450
  }
1451
+ types() {
1452
+ return new ByProjectKeyTypesRequestBuilder({
1453
+ pathArgs: {
1454
+ ...this.args.pathArgs
1455
+ },
1456
+ executeRequest: this.args.executeRequest,
1457
+ baseUri: this.args.baseUri
1458
+ });
1459
+ }
1368
1460
  }
1369
1461
 
1370
1462
  class ApiRoot {
@@ -1,5 +1,3 @@
1
- import { stringify } from 'querystring';
2
-
3
1
  function _toPrimitive(input, hint) {
4
2
  if (typeof input !== "object" || input === null) return input;
5
3
  var prim = input[Symbol.toPrimitive];
@@ -36,9 +34,20 @@ function _defineProperty(obj, key, value) {
36
34
  * Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
37
35
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
38
36
  */
37
+
39
38
  function isDefined(value) {
40
39
  return typeof value !== 'undefined' && value !== null;
41
40
  }
41
+ function stringify(object) {
42
+ const params = new URLSearchParams(object);
43
+ for (const [key, value] of Object.entries(object)) {
44
+ if (Array.isArray(value)) {
45
+ params.delete(key);
46
+ value.filter(Boolean).forEach(v => params.append(key, v));
47
+ }
48
+ }
49
+ return params.toString();
50
+ }
42
51
  function cleanObject(obj) {
43
52
  return Object.keys(obj).reduce((result, key) => {
44
53
  const value = obj[key];
@@ -1224,6 +1233,80 @@ class ByProjectKeyStandalonePricesRequestBuilder {
1224
1233
  }
1225
1234
  }
1226
1235
 
1236
+ /**
1237
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1238
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1239
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1240
+ */
1241
+ /**
1242
+ **/
1243
+ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1244
+ constructor(args) {
1245
+ this.args = args;
1246
+ }
1247
+ /**
1248
+ * Creates a request for creating new Type or updating existing ones.
1249
+ */
1250
+ post(methodArgs) {
1251
+ return new ApiRequest({
1252
+ baseUri: this.args.baseUri,
1253
+ method: 'POST',
1254
+ uriTemplate: '/{projectKey}/types/import-containers/{importContainerKey}',
1255
+ pathVariables: this.args.pathArgs,
1256
+ headers: {
1257
+ 'Content-Type': 'application/json',
1258
+ ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1259
+ },
1260
+ body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1261
+ }, this.args.executeRequest);
1262
+ }
1263
+ }
1264
+
1265
+ /**
1266
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1267
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1268
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1269
+ */
1270
+ /**
1271
+ **/
1272
+ class ByProjectKeyTypesImportContainersRequestBuilder {
1273
+ constructor(args) {
1274
+ this.args = args;
1275
+ }
1276
+ withImportContainerKeyValue(childPathArgs) {
1277
+ return new ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder({
1278
+ pathArgs: {
1279
+ ...this.args.pathArgs,
1280
+ ...childPathArgs
1281
+ },
1282
+ executeRequest: this.args.executeRequest,
1283
+ baseUri: this.args.baseUri
1284
+ });
1285
+ }
1286
+ }
1287
+
1288
+ /**
1289
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1290
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1291
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1292
+ */
1293
+ /**
1294
+ **/
1295
+ class ByProjectKeyTypesRequestBuilder {
1296
+ constructor(args) {
1297
+ this.args = args;
1298
+ }
1299
+ importContainers() {
1300
+ return new ByProjectKeyTypesImportContainersRequestBuilder({
1301
+ pathArgs: {
1302
+ ...this.args.pathArgs
1303
+ },
1304
+ executeRequest: this.args.executeRequest,
1305
+ baseUri: this.args.baseUri
1306
+ });
1307
+ }
1308
+ }
1309
+
1227
1310
  /**
1228
1311
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1229
1312
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -1361,6 +1444,15 @@ class ByProjectKeyRequestBuilder {
1361
1444
  baseUri: this.args.baseUri
1362
1445
  });
1363
1446
  }
1447
+ types() {
1448
+ return new ByProjectKeyTypesRequestBuilder({
1449
+ pathArgs: {
1450
+ ...this.args.pathArgs
1451
+ },
1452
+ executeRequest: this.args.executeRequest,
1453
+ baseUri: this.args.baseUri
1454
+ });
1455
+ }
1364
1456
  }
1365
1457
 
1366
1458
  class ApiRoot {
@@ -2,8 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var querystring = require('querystring');
6
-
7
5
  function _toPrimitive(input, hint) {
8
6
  if (typeof input !== "object" || input === null) return input;
9
7
  var prim = input[Symbol.toPrimitive];
@@ -40,9 +38,20 @@ function _defineProperty(obj, key, value) {
40
38
  * Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
41
39
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
42
40
  */
41
+
43
42
  function isDefined(value) {
44
43
  return typeof value !== 'undefined' && value !== null;
45
44
  }
45
+ function stringify(object) {
46
+ const params = new URLSearchParams(object);
47
+ for (const [key, value] of Object.entries(object)) {
48
+ if (Array.isArray(value)) {
49
+ params.delete(key);
50
+ value.filter(Boolean).forEach(v => params.append(key, v));
51
+ }
52
+ }
53
+ return params.toString();
54
+ }
46
55
  function cleanObject(obj) {
47
56
  return Object.keys(obj).reduce((result, key) => {
48
57
  const value = obj[key];
@@ -67,7 +76,7 @@ function cleanObject(obj) {
67
76
  }
68
77
  function formatQueryString(variableMap) {
69
78
  const map = cleanObject(variableMap);
70
- const result = querystring.stringify(map);
79
+ const result = stringify(map);
71
80
  if (result === '') {
72
81
  return '';
73
82
  }
@@ -1228,6 +1237,80 @@ class ByProjectKeyStandalonePricesRequestBuilder {
1228
1237
  }
1229
1238
  }
1230
1239
 
1240
+ /**
1241
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1242
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1243
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1244
+ */
1245
+ /**
1246
+ **/
1247
+ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1248
+ constructor(args) {
1249
+ this.args = args;
1250
+ }
1251
+ /**
1252
+ * Creates a request for creating new Type or updating existing ones.
1253
+ */
1254
+ post(methodArgs) {
1255
+ return new ApiRequest({
1256
+ baseUri: this.args.baseUri,
1257
+ method: 'POST',
1258
+ uriTemplate: '/{projectKey}/types/import-containers/{importContainerKey}',
1259
+ pathVariables: this.args.pathArgs,
1260
+ headers: {
1261
+ 'Content-Type': 'application/json',
1262
+ ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1263
+ },
1264
+ body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1265
+ }, this.args.executeRequest);
1266
+ }
1267
+ }
1268
+
1269
+ /**
1270
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1271
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1272
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1273
+ */
1274
+ /**
1275
+ **/
1276
+ class ByProjectKeyTypesImportContainersRequestBuilder {
1277
+ constructor(args) {
1278
+ this.args = args;
1279
+ }
1280
+ withImportContainerKeyValue(childPathArgs) {
1281
+ return new ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder({
1282
+ pathArgs: {
1283
+ ...this.args.pathArgs,
1284
+ ...childPathArgs
1285
+ },
1286
+ executeRequest: this.args.executeRequest,
1287
+ baseUri: this.args.baseUri
1288
+ });
1289
+ }
1290
+ }
1291
+
1292
+ /**
1293
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1294
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1295
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1296
+ */
1297
+ /**
1298
+ **/
1299
+ class ByProjectKeyTypesRequestBuilder {
1300
+ constructor(args) {
1301
+ this.args = args;
1302
+ }
1303
+ importContainers() {
1304
+ return new ByProjectKeyTypesImportContainersRequestBuilder({
1305
+ pathArgs: {
1306
+ ...this.args.pathArgs
1307
+ },
1308
+ executeRequest: this.args.executeRequest,
1309
+ baseUri: this.args.baseUri
1310
+ });
1311
+ }
1312
+ }
1313
+
1231
1314
  /**
1232
1315
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1233
1316
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -1365,6 +1448,15 @@ class ByProjectKeyRequestBuilder {
1365
1448
  baseUri: this.args.baseUri
1366
1449
  });
1367
1450
  }
1451
+ types() {
1452
+ return new ByProjectKeyTypesRequestBuilder({
1453
+ pathArgs: {
1454
+ ...this.args.pathArgs
1455
+ },
1456
+ executeRequest: this.args.executeRequest,
1457
+ baseUri: this.args.baseUri
1458
+ });
1459
+ }
1368
1460
  }
1369
1461
 
1370
1462
  class ApiRoot {
@@ -2,8 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var querystring = require('querystring');
6
-
7
5
  function _toPrimitive(input, hint) {
8
6
  if (typeof input !== "object" || input === null) return input;
9
7
  var prim = input[Symbol.toPrimitive];
@@ -40,9 +38,20 @@ function _defineProperty(obj, key, value) {
40
38
  * Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
41
39
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
42
40
  */
41
+
43
42
  function isDefined(value) {
44
43
  return typeof value !== 'undefined' && value !== null;
45
44
  }
45
+ function stringify(object) {
46
+ const params = new URLSearchParams(object);
47
+ for (const [key, value] of Object.entries(object)) {
48
+ if (Array.isArray(value)) {
49
+ params.delete(key);
50
+ value.filter(Boolean).forEach(v => params.append(key, v));
51
+ }
52
+ }
53
+ return params.toString();
54
+ }
46
55
  function cleanObject(obj) {
47
56
  return Object.keys(obj).reduce((result, key) => {
48
57
  const value = obj[key];
@@ -67,7 +76,7 @@ function cleanObject(obj) {
67
76
  }
68
77
  function formatQueryString(variableMap) {
69
78
  const map = cleanObject(variableMap);
70
- const result = querystring.stringify(map);
79
+ const result = stringify(map);
71
80
  if (result === '') {
72
81
  return '';
73
82
  }
@@ -1228,6 +1237,80 @@ class ByProjectKeyStandalonePricesRequestBuilder {
1228
1237
  }
1229
1238
  }
1230
1239
 
1240
+ /**
1241
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1242
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1243
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1244
+ */
1245
+ /**
1246
+ **/
1247
+ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1248
+ constructor(args) {
1249
+ this.args = args;
1250
+ }
1251
+ /**
1252
+ * Creates a request for creating new Type or updating existing ones.
1253
+ */
1254
+ post(methodArgs) {
1255
+ return new ApiRequest({
1256
+ baseUri: this.args.baseUri,
1257
+ method: 'POST',
1258
+ uriTemplate: '/{projectKey}/types/import-containers/{importContainerKey}',
1259
+ pathVariables: this.args.pathArgs,
1260
+ headers: {
1261
+ 'Content-Type': 'application/json',
1262
+ ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1263
+ },
1264
+ body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1265
+ }, this.args.executeRequest);
1266
+ }
1267
+ }
1268
+
1269
+ /**
1270
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1271
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1272
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1273
+ */
1274
+ /**
1275
+ **/
1276
+ class ByProjectKeyTypesImportContainersRequestBuilder {
1277
+ constructor(args) {
1278
+ this.args = args;
1279
+ }
1280
+ withImportContainerKeyValue(childPathArgs) {
1281
+ return new ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder({
1282
+ pathArgs: {
1283
+ ...this.args.pathArgs,
1284
+ ...childPathArgs
1285
+ },
1286
+ executeRequest: this.args.executeRequest,
1287
+ baseUri: this.args.baseUri
1288
+ });
1289
+ }
1290
+ }
1291
+
1292
+ /**
1293
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1294
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1295
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1296
+ */
1297
+ /**
1298
+ **/
1299
+ class ByProjectKeyTypesRequestBuilder {
1300
+ constructor(args) {
1301
+ this.args = args;
1302
+ }
1303
+ importContainers() {
1304
+ return new ByProjectKeyTypesImportContainersRequestBuilder({
1305
+ pathArgs: {
1306
+ ...this.args.pathArgs
1307
+ },
1308
+ executeRequest: this.args.executeRequest,
1309
+ baseUri: this.args.baseUri
1310
+ });
1311
+ }
1312
+ }
1313
+
1231
1314
  /**
1232
1315
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1233
1316
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -1365,6 +1448,15 @@ class ByProjectKeyRequestBuilder {
1365
1448
  baseUri: this.args.baseUri
1366
1449
  });
1367
1450
  }
1451
+ types() {
1452
+ return new ByProjectKeyTypesRequestBuilder({
1453
+ pathArgs: {
1454
+ ...this.args.pathArgs
1455
+ },
1456
+ executeRequest: this.args.executeRequest,
1457
+ baseUri: this.args.baseUri
1458
+ });
1459
+ }
1368
1460
  }
1369
1461
 
1370
1462
  class ApiRoot {
@@ -1,5 +1,3 @@
1
- import { stringify } from 'querystring';
2
-
3
1
  function _toPrimitive(input, hint) {
4
2
  if (typeof input !== "object" || input === null) return input;
5
3
  var prim = input[Symbol.toPrimitive];
@@ -36,9 +34,20 @@ function _defineProperty(obj, key, value) {
36
34
  * Please don't change this file manually but run `rmf-codegen generate <raml_file_path> -o <output_path> -t typescript_client` to update it.
37
35
  * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
38
36
  */
37
+
39
38
  function isDefined(value) {
40
39
  return typeof value !== 'undefined' && value !== null;
41
40
  }
41
+ function stringify(object) {
42
+ const params = new URLSearchParams(object);
43
+ for (const [key, value] of Object.entries(object)) {
44
+ if (Array.isArray(value)) {
45
+ params.delete(key);
46
+ value.filter(Boolean).forEach(v => params.append(key, v));
47
+ }
48
+ }
49
+ return params.toString();
50
+ }
42
51
  function cleanObject(obj) {
43
52
  return Object.keys(obj).reduce((result, key) => {
44
53
  const value = obj[key];
@@ -1224,6 +1233,80 @@ class ByProjectKeyStandalonePricesRequestBuilder {
1224
1233
  }
1225
1234
  }
1226
1235
 
1236
+ /**
1237
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1238
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1239
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1240
+ */
1241
+ /**
1242
+ **/
1243
+ class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
1244
+ constructor(args) {
1245
+ this.args = args;
1246
+ }
1247
+ /**
1248
+ * Creates a request for creating new Type or updating existing ones.
1249
+ */
1250
+ post(methodArgs) {
1251
+ return new ApiRequest({
1252
+ baseUri: this.args.baseUri,
1253
+ method: 'POST',
1254
+ uriTemplate: '/{projectKey}/types/import-containers/{importContainerKey}',
1255
+ pathVariables: this.args.pathArgs,
1256
+ headers: {
1257
+ 'Content-Type': 'application/json',
1258
+ ...(methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.headers)
1259
+ },
1260
+ body: methodArgs === null || methodArgs === void 0 ? void 0 : methodArgs.body
1261
+ }, this.args.executeRequest);
1262
+ }
1263
+ }
1264
+
1265
+ /**
1266
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1267
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1268
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1269
+ */
1270
+ /**
1271
+ **/
1272
+ class ByProjectKeyTypesImportContainersRequestBuilder {
1273
+ constructor(args) {
1274
+ this.args = args;
1275
+ }
1276
+ withImportContainerKeyValue(childPathArgs) {
1277
+ return new ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder({
1278
+ pathArgs: {
1279
+ ...this.args.pathArgs,
1280
+ ...childPathArgs
1281
+ },
1282
+ executeRequest: this.args.executeRequest,
1283
+ baseUri: this.args.baseUri
1284
+ });
1285
+ }
1286
+ }
1287
+
1288
+ /**
1289
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1290
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
1291
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
1292
+ */
1293
+ /**
1294
+ **/
1295
+ class ByProjectKeyTypesRequestBuilder {
1296
+ constructor(args) {
1297
+ this.args = args;
1298
+ }
1299
+ importContainers() {
1300
+ return new ByProjectKeyTypesImportContainersRequestBuilder({
1301
+ pathArgs: {
1302
+ ...this.args.pathArgs
1303
+ },
1304
+ executeRequest: this.args.executeRequest,
1305
+ baseUri: this.args.baseUri
1306
+ });
1307
+ }
1308
+ }
1309
+
1227
1310
  /**
1228
1311
  * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
1229
1312
  * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
@@ -1361,6 +1444,15 @@ class ByProjectKeyRequestBuilder {
1361
1444
  baseUri: this.args.baseUri
1362
1445
  });
1363
1446
  }
1447
+ types() {
1448
+ return new ByProjectKeyTypesRequestBuilder({
1449
+ pathArgs: {
1450
+ ...this.args.pathArgs
1451
+ },
1452
+ executeRequest: this.args.executeRequest,
1453
+ baseUri: this.args.baseUri
1454
+ });
1455
+ }
1364
1456
  }
1365
1457
 
1366
1458
  class ApiRoot {
@@ -18,6 +18,7 @@ import { ByProjectKeyProductVariantPatchesRequestBuilder } from './product-varia
18
18
  import { ByProjectKeyProductVariantsRequestBuilder } from './product-variants/by-project-key-product-variants-request-builder';
19
19
  import { ByProjectKeyProductsRequestBuilder } from './products/by-project-key-products-request-builder';
20
20
  import { ByProjectKeyStandalonePricesRequestBuilder } from './standalone-prices/by-project-key-standalone-prices-request-builder';
21
+ import { ByProjectKeyTypesRequestBuilder } from './types/by-project-key-types-request-builder';
21
22
  /**
22
23
  **/
23
24
  export declare class ByProjectKeyRequestBuilder {
@@ -49,4 +50,5 @@ export declare class ByProjectKeyRequestBuilder {
49
50
  orderPatches(): ByProjectKeyOrderPatchesRequestBuilder;
50
51
  customers(): ByProjectKeyCustomersRequestBuilder;
51
52
  inventories(): ByProjectKeyInventoriesRequestBuilder;
53
+ types(): ByProjectKeyTypesRequestBuilder;
52
54
  }
@@ -0,0 +1,37 @@
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, TypeImportRequest } from '../../models/importrequests';
7
+ import { executeRequest } from '../../shared/utils/common-types';
8
+ import { ApiRequest } from '../../shared/utils/requests-utils';
9
+ /**
10
+ **/
11
+ export declare class ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder {
12
+ protected readonly args: {
13
+ pathArgs: {
14
+ projectKey: string;
15
+ importContainerKey: string;
16
+ };
17
+ executeRequest: executeRequest;
18
+ baseUri?: string;
19
+ };
20
+ constructor(args: {
21
+ pathArgs: {
22
+ projectKey: string;
23
+ importContainerKey: string;
24
+ };
25
+ executeRequest: executeRequest;
26
+ baseUri?: string;
27
+ });
28
+ /**
29
+ * Creates a request for creating new Type or updating existing ones.
30
+ */
31
+ post(methodArgs: {
32
+ body: TypeImportRequest;
33
+ headers?: {
34
+ [key: string]: string | string[];
35
+ };
36
+ }): ApiRequest<ImportResponse>;
37
+ }
@@ -0,0 +1,28 @@
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 { ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder } from './by-project-key-types-import-containers-by-import-container-key-request-builder';
8
+ /**
9
+ **/
10
+ export declare class ByProjectKeyTypesImportContainersRequestBuilder {
11
+ protected readonly args: {
12
+ pathArgs: {
13
+ projectKey: string;
14
+ };
15
+ executeRequest: executeRequest;
16
+ baseUri?: string;
17
+ };
18
+ constructor(args: {
19
+ pathArgs: {
20
+ projectKey: string;
21
+ };
22
+ executeRequest: executeRequest;
23
+ baseUri?: string;
24
+ });
25
+ withImportContainerKeyValue(childPathArgs: {
26
+ importContainerKey: string;
27
+ }): ByProjectKeyTypesImportContainersByImportContainerKeyRequestBuilder;
28
+ }
@@ -0,0 +1,26 @@
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 { ByProjectKeyTypesImportContainersRequestBuilder } from '../import-containers/by-project-key-types-import-containers-request-builder';
8
+ /**
9
+ **/
10
+ export declare class ByProjectKeyTypesRequestBuilder {
11
+ protected readonly args: {
12
+ pathArgs: {
13
+ projectKey: string;
14
+ };
15
+ executeRequest: executeRequest;
16
+ baseUri?: string;
17
+ };
18
+ constructor(args: {
19
+ pathArgs: {
20
+ projectKey: string;
21
+ };
22
+ executeRequest: executeRequest;
23
+ baseUri?: string;
24
+ });
25
+ importContainers(): ByProjectKeyTypesImportContainersRequestBuilder;
26
+ }
@@ -22,5 +22,6 @@ export * from './models/products';
22
22
  export * from './models/producttypes';
23
23
  export * from './models/productvariants';
24
24
  export * from './models/standalone-prices';
25
+ export * from './models/types';
25
26
  export * from './shared/utils/common-types';
26
27
  export * from './shared/utils/middleware';
@@ -13,6 +13,7 @@ import { ProductImport } from './products';
13
13
  import { ProductTypeImport } from './producttypes';
14
14
  import { ProductVariantImport } from './productvariants';
15
15
  import { StandalonePriceImport } from './standalone-prices';
16
+ import { TypeImport } from './types';
16
17
  export interface Asset {
17
18
  /**
18
19
  * User-defined identifier for the asset.
@@ -172,7 +173,7 @@ export interface ImportResource {
172
173
  */
173
174
  readonly key: string;
174
175
  }
175
- export type _ImportResource = ImportResource | ProductVariantImport | PriceImport | CategoryImport | StandalonePriceImport | ProductImport | ProductDraftImport | ProductTypeImport | CustomerImport | InventoryImport;
176
+ export type _ImportResource = ImportResource | CategoryImport | CustomerImport | InventoryImport | PriceImport | ProductDraftImport | ProductImport | ProductTypeImport | ProductVariantImport | StandalonePriceImport | TypeImport;
176
177
  /**
177
178
  * References a resource by key.
178
179
  */
@@ -462,10 +463,10 @@ export interface PriceTier {
462
463
  readonly value: TypedMoney;
463
464
  }
464
465
  /**
465
- * The type of the import resource.
466
+ * The resource types that can be imported.
466
467
  *
467
468
  */
468
- export type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch' | 'standalone-price' | string;
469
+ export type ImportResourceType = 'category' | 'customer' | 'inventory' | 'order' | 'order-patch' | 'price' | 'product' | 'product-draft' | 'product-type' | 'product-variant' | 'product-variant-patch' | 'standalone-price' | 'type' | string;
469
470
  /**
470
471
  * The type of the referenced resource.
471
472
  *
@@ -136,7 +136,7 @@ export interface CustomerImport extends ImportResource {
136
136
  */
137
137
  readonly email: string;
138
138
  /**
139
- * Maps to `Customer.password`.
139
+ * Required when `authenticationMode` is set to `Password`. Maps to `Customer.password`.
140
140
  *
141
141
  *
142
142
  */
@@ -15,11 +15,12 @@ import { ProductImport } from './products';
15
15
  import { ProductTypeImport } from './producttypes';
16
16
  import { ProductVariantImport, ProductVariantPatch } from './productvariants';
17
17
  import { StandalonePriceImport } from './standalone-prices';
18
+ import { TypeImport } from './types';
18
19
  /**
19
20
  * An import request batches multiple import resources of the same import resource type for processing by an import container.
20
21
  *
21
22
  */
22
- export type ImportRequest = CategoryImportRequest | CustomerImportRequest | InventoryImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest | StandalonePriceImportRequest;
23
+ export type ImportRequest = CategoryImportRequest | CustomerImportRequest | InventoryImportRequest | OrderImportRequest | OrderPatchImportRequest | PriceImportRequest | ProductDraftImportRequest | ProductImportRequest | ProductTypeImportRequest | ProductVariantImportRequest | ProductVariantPatchRequest | StandalonePriceImportRequest | TypeImportRequest;
23
24
  /**
24
25
  * A list of the ID's and validation statuses of newly created [ImportOperations](#importoperation).
25
26
  * 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).
@@ -187,3 +188,16 @@ export interface InventoryImportRequest {
187
188
  */
188
189
  readonly resources: InventoryImport[];
189
190
  }
191
+ /**
192
+ * The request body to [import Types](#import-types). Contains data for [Types](/../api/projects/types#type) to be created or updated in a Project.
193
+ *
194
+ */
195
+ export interface TypeImportRequest {
196
+ readonly type: 'type';
197
+ /**
198
+ * The type import resources of this request.
199
+ *
200
+ *
201
+ */
202
+ readonly resources: TypeImport[];
203
+ }
@@ -0,0 +1,212 @@
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 { ImportResource, LocalizedString } from './common';
7
+ /**
8
+ * Provides a visual representation type for this field. It is only relevant for string-based field types like [CustomFieldStringType](ctp:import:type:CustomFieldStringType) and [CustomFieldLocalizedStringType](ctp:import:type:CustomFieldLocalizedStringType).
9
+ *
10
+ */
11
+ export type TypeTextInputHint = 'MultiLine' | 'SingleLine' | string;
12
+ /**
13
+ * IDs indicating the [customizable resources and data types](/../api/projects/types#list-of-customizable-data-types). Maps to `Type.resourceTypeId`.
14
+ *
15
+ */
16
+ export type ResourceTypeId = 'address' | 'asset' | 'business-unit' | 'cart-discount' | 'category' | 'channel' | 'custom-line-item' | 'customer' | 'customer-group' | 'discount-code' | 'inventory-entry' | 'line-item' | 'order' | 'order-delivery' | 'order-edit' | 'order-parcel' | 'order-return-item' | 'payment' | 'payment-interface-interaction' | 'product-price' | 'product-selection' | 'quote' | 'review' | 'shipping' | 'shipping-method' | 'shopping-list' | 'shopping-list-text-line-item' | 'standalone-price' | 'store' | 'transaction' | string;
17
+ export type FieldType = CustomFieldBooleanType | CustomFieldDateTimeType | CustomFieldDateType | CustomFieldEnumType | CustomFieldLocalizedEnumType | CustomFieldLocalizedStringType | CustomFieldMoneyType | CustomFieldNumberType | CustomFieldReferenceType | CustomFieldSetType | CustomFieldStringType | CustomFieldTimeType;
18
+ /**
19
+ * Field type for Boolean values.
20
+ */
21
+ export interface CustomFieldBooleanType {
22
+ readonly name: 'Boolean';
23
+ }
24
+ /**
25
+ * Field type for [DateTime](ctp:import:type:DateTime) values.
26
+ */
27
+ export interface CustomFieldDateTimeType {
28
+ readonly name: 'DateTime';
29
+ }
30
+ /**
31
+ * Field type for [Date](ctp:import:type:Date) values.
32
+ */
33
+ export interface CustomFieldDateType {
34
+ readonly name: 'Date';
35
+ }
36
+ /**
37
+ * Field type for enum values.
38
+ */
39
+ export interface CustomFieldEnumType {
40
+ readonly name: 'Enum';
41
+ /**
42
+ * Allowed values.
43
+ *
44
+ */
45
+ readonly values: CustomFieldEnumValue[];
46
+ }
47
+ /**
48
+ * Defines an allowed value of a [CustomFieldEnumType](ctp:import:type:CustomFieldEnumType) field.
49
+ */
50
+ export interface CustomFieldEnumValue {
51
+ /**
52
+ * Key of the value used as a programmatic identifier.
53
+ *
54
+ */
55
+ readonly key: string;
56
+ /**
57
+ * Descriptive label of the value.
58
+ *
59
+ */
60
+ readonly label: string;
61
+ }
62
+ /**
63
+ * Field type for localized enum values.
64
+ */
65
+ export interface CustomFieldLocalizedEnumType {
66
+ readonly name: 'LocalizedEnum';
67
+ /**
68
+ * Allowed values.
69
+ *
70
+ */
71
+ readonly values: CustomFieldLocalizedEnumValue[];
72
+ }
73
+ /**
74
+ * Defines an allowed value of a [CustomFieldLocalizedEnumType](ctp:import:type:CustomFieldLocalizedEnumType) field.
75
+ */
76
+ export interface CustomFieldLocalizedEnumValue {
77
+ /**
78
+ * Key of the value used as a programmatic identifier.
79
+ *
80
+ */
81
+ readonly key: string;
82
+ /**
83
+ * Descriptive localized label of the value.
84
+ *
85
+ */
86
+ readonly label: LocalizedString;
87
+ }
88
+ /**
89
+ * Field type for [LocalizedString](ctp:import:type:LocalizedString) values.
90
+ */
91
+ export interface CustomFieldLocalizedStringType {
92
+ readonly name: 'LocalizedString';
93
+ }
94
+ /**
95
+ * Field type for [CentPrecisionMoney](ctp:import:type:CentPrecisionMoney) values.
96
+ */
97
+ export interface CustomFieldMoneyType {
98
+ readonly name: 'Money';
99
+ }
100
+ /**
101
+ * Field type for number values.
102
+ */
103
+ export interface CustomFieldNumberType {
104
+ readonly name: 'Number';
105
+ }
106
+ /**
107
+ * Field type for [Reference](ctp:import:type:Reference) values.
108
+ */
109
+ export interface CustomFieldReferenceType {
110
+ readonly name: 'Reference';
111
+ /**
112
+ * Resource type the Custom Field can reference.
113
+ *
114
+ */
115
+ readonly referenceTypeId: CustomFieldReferenceValue;
116
+ }
117
+ /**
118
+ * Defines which resource type a [CustomFieldReferenceType](ctp:import:type:CustomFieldReferenceType) can reference.
119
+ */
120
+ export type CustomFieldReferenceValue = 'cart' | 'category' | 'channel' | 'customer' | 'key-value-document' | 'order' | 'product' | 'product-type' | 'review' | 'shipping-method' | 'state' | 'zone' | string;
121
+ /**
122
+ * Values of a SetType Custom Field are sets of values of the specified `elementType` (without duplicate elements).
123
+ */
124
+ export interface CustomFieldSetType {
125
+ readonly name: 'Set';
126
+ /**
127
+ * Field type of the elements in the set.
128
+ *
129
+ */
130
+ readonly elementType: FieldType;
131
+ }
132
+ /**
133
+ * Field type for string values.
134
+ */
135
+ export interface CustomFieldStringType {
136
+ readonly name: 'String';
137
+ }
138
+ /**
139
+ * Field type for [Time](ctp:import:type:Time) values.
140
+ */
141
+ export interface CustomFieldTimeType {
142
+ readonly name: 'Time';
143
+ }
144
+ /**
145
+ * Defines a [Custom Field](/../api/projects/custom-fields) and its meta-information. Maps to `Type.FieldDefinition`.
146
+ *
147
+ */
148
+ export interface FieldDefinition {
149
+ /**
150
+ * Data type of the Custom Field to define.
151
+ *
152
+ */
153
+ readonly type: FieldType;
154
+ /**
155
+ * Name of the Custom Field to define. Must be unique for a given [ResourceTypeId](ctp:import:type:ResourceTypeId). In case there is a FieldDefinition with the same `name` in another Type, both FieldDefinitions must have the same `type`. This value cannot be changed after the Type is imported.
156
+ *
157
+ *
158
+ */
159
+ readonly name: string;
160
+ /**
161
+ * A human-readable label for the field.
162
+ *
163
+ */
164
+ readonly label: LocalizedString;
165
+ /**
166
+ * Defines whether the field is required to have a value. This value cannot be changed after the Type is imported.
167
+ *
168
+ */
169
+ readonly required: boolean;
170
+ /**
171
+ * Provides a visual representation type for this field. It is only relevant for string-based field types like [CustomFieldStringType](ctp:import:type:CustomFieldStringType) and [CustomFieldLocalizedStringType](ctp:import:type:CustomFieldLocalizedStringType).
172
+ *
173
+ *
174
+ */
175
+ readonly inputHint?: TypeTextInputHint;
176
+ }
177
+ /**
178
+ * The data representation for a Type to be imported that is persisted as a [Type](/../api/projects/types#type) in the Project.
179
+ *
180
+ */
181
+ export interface TypeImport extends ImportResource {
182
+ /**
183
+ * User-defined unique identifier for the Type.
184
+ *
185
+ *
186
+ */
187
+ readonly key: string;
188
+ /**
189
+ * Maps to `Type.name`.
190
+ *
191
+ *
192
+ */
193
+ readonly name: LocalizedString;
194
+ /**
195
+ * Maps to `Type.description`.
196
+ *
197
+ *
198
+ */
199
+ readonly description?: LocalizedString;
200
+ /**
201
+ * Maps to `Type.resourceTypeIds`. This value cannot be changed after the Type is imported.
202
+ *
203
+ *
204
+ */
205
+ readonly resourceTypeIds: ResourceTypeId[];
206
+ /**
207
+ * Maps to `Type.fieldDefinitions`.
208
+ *
209
+ *
210
+ */
211
+ readonly fieldDefinitions?: FieldDefinition[];
212
+ }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "name": "@commercetools/importapi-sdk",
7
- "version": "4.4.0",
7
+ "version": "4.5.0",
8
8
  "engines": {
9
9
  "node": ">=14"
10
10
  },
@@ -32,16 +32,15 @@
32
32
  "./dist/commercetools-importapi-sdk.esm.js": "./dist/commercetools-importapi-sdk.browser.esm.js"
33
33
  },
34
34
  "dependencies": {
35
- "@commercetools/sdk-client-v2": "^2.1.5",
35
+ "@commercetools/sdk-client-v2": "^2.1.6",
36
36
  "@commercetools/sdk-middleware-auth": "^7.0.0",
37
37
  "@commercetools/sdk-middleware-http": "^7.0.0",
38
- "@commercetools/sdk-middleware-logger": "^3.0.0",
39
- "querystring": "^0.2.1"
38
+ "@commercetools/sdk-middleware-logger": "^3.0.0"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@types/uuid": "9.0.1",
43
42
  "organize-imports-cli": "0.10.0",
44
- "tsconfig-replace-paths": "0.0.14",
43
+ "tsconfig-replace-paths": "0.0.13",
45
44
  "uuid": "9.0.0"
46
45
  },
47
46
  "scripts": {