@revenexx/sdk 0.0.4 → 0.0.5
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/dist/cjs/sdk.js +7445 -1584
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +7422 -1585
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +7445 -1584
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/address-type.ts +4 -0
- package/src/enums/cart-export-format.ts +4 -0
- package/src/enums/cart-io-apply-mode.ts +5 -0
- package/src/enums/cart-io-direction.ts +4 -0
- package/src/enums/cart-io-entity.ts +4 -0
- package/src/enums/cart-io-format.ts +4 -0
- package/src/enums/cart-item-type.ts +5 -0
- package/src/enums/channel-status.ts +4 -0
- package/src/enums/channel-type.ts +7 -0
- package/src/enums/contact-role.ts +6 -0
- package/src/enums/contact-status.ts +5 -0
- package/src/enums/location-type.ts +6 -0
- package/src/enums/market-status.ts +4 -0
- package/src/enums/order-comment-visibility.ts +4 -0
- package/src/enums/order-item-type.ts +5 -0
- package/src/enums/order-payment-status.ts +9 -0
- package/src/enums/organization-status.ts +4 -0
- package/src/enums/page-status.ts +5 -0
- package/src/enums/payment-fee-type.ts +5 -0
- package/src/enums/payment-method-kind.ts +4 -0
- package/src/enums/price-entry-type.ts +4 -0
- package/src/enums/price-list-status.ts +4 -0
- package/src/enums/shipping-method-matrix-basis.ts +6 -0
- package/src/enums/shipping-method-pricing-type.ts +5 -0
- package/src/index.ts +24 -0
- package/src/models.ts +4303 -941
- package/src/services/apps.ts +154 -154
- package/src/services/avatars.ts +57 -57
- package/src/services/carts.ts +739 -104
- package/src/services/channels.ts +147 -19
- package/src/services/customers.ts +801 -69
- package/src/services/greetings.ts +18 -18
- package/src/services/inventories.ts +620 -65
- package/src/services/locale.ts +16 -16
- package/src/services/markets.ts +373 -75
- package/src/services/messaging.ts +273 -273
- package/src/services/orders.ts +692 -137
- package/src/services/pages.ts +377 -157
- package/src/services/payments.ts +591 -64
- package/src/services/prices.ts +524 -59
- package/src/services/products.ts +1836 -272
- package/src/services/search.ts +24 -24
- package/src/services/shipping.ts +444 -59
- package/src/services/sites.ts +116 -116
- package/src/services/storage.ts +72 -72
- package/src/services/tokens.ts +14 -14
- package/types/enums/address-type.d.ts +4 -0
- package/types/enums/cart-export-format.d.ts +4 -0
- package/types/enums/cart-io-apply-mode.d.ts +5 -0
- package/types/enums/cart-io-direction.d.ts +4 -0
- package/types/enums/cart-io-entity.d.ts +4 -0
- package/types/enums/cart-io-format.d.ts +4 -0
- package/types/enums/cart-item-type.d.ts +5 -0
- package/types/enums/channel-status.d.ts +4 -0
- package/types/enums/channel-type.d.ts +7 -0
- package/types/enums/contact-role.d.ts +6 -0
- package/types/enums/contact-status.d.ts +5 -0
- package/types/enums/location-type.d.ts +6 -0
- package/types/enums/market-status.d.ts +4 -0
- package/types/enums/order-comment-visibility.d.ts +4 -0
- package/types/enums/order-item-type.d.ts +5 -0
- package/types/enums/order-payment-status.d.ts +9 -0
- package/types/enums/organization-status.d.ts +4 -0
- package/types/enums/page-status.d.ts +5 -0
- package/types/enums/payment-fee-type.d.ts +5 -0
- package/types/enums/payment-method-kind.d.ts +4 -0
- package/types/enums/price-entry-type.d.ts +4 -0
- package/types/enums/price-list-status.d.ts +4 -0
- package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
- package/types/enums/shipping-method-pricing-type.d.ts +5 -0
- package/types/index.d.ts +24 -0
- package/types/models.d.ts +4214 -970
- package/types/services/carts.d.ts +271 -12
- package/types/services/channels.d.ts +54 -2
- package/types/services/customers.d.ts +295 -12
- package/types/services/inventories.d.ts +225 -11
- package/types/services/markets.d.ts +123 -6
- package/types/services/orders.d.ts +238 -16
- package/types/services/pages.d.ts +95 -6
- package/types/services/payments.d.ts +221 -7
- package/types/services/prices.d.ts +198 -6
- package/types/services/products.d.ts +646 -32
- package/types/services/shipping.d.ts +165 -6
package/src/services/products.ts
CHANGED
|
@@ -18,7 +18,7 @@ export class Products {
|
|
|
18
18
|
productsList(): Promise<{}> {
|
|
19
19
|
|
|
20
20
|
const apiPath = '/v1/products';
|
|
21
|
-
const
|
|
21
|
+
const apiPayload: Payload = {};
|
|
22
22
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23
23
|
|
|
24
24
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -28,19 +28,113 @@ export class Products {
|
|
|
28
28
|
'get',
|
|
29
29
|
uri,
|
|
30
30
|
apiHeaders,
|
|
31
|
-
|
|
31
|
+
apiPayload
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
+
* @param {string} params.sku -
|
|
38
|
+
* @param {object} params.attributeValues -
|
|
39
|
+
* @param {object} params.completeness -
|
|
40
|
+
* @param {string} params.deletedAt -
|
|
41
|
+
* @param {boolean} params.enabled -
|
|
42
|
+
* @param {string} params.familyId -
|
|
43
|
+
* @param {string} params.familyVariantId -
|
|
44
|
+
* @param {string} params.kind -
|
|
45
|
+
* @param {string} params.parentId -
|
|
46
|
+
* @param {object} params.quantifiedAssociations -
|
|
37
47
|
* @throws {RevenexxException}
|
|
38
48
|
* @returns {Promise<Models.Products>}
|
|
39
49
|
*/
|
|
40
|
-
productsCreate(): Promise<Models.Products
|
|
50
|
+
productsCreate(params: { sku: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object }): Promise<Models.Products>;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param {string} sku -
|
|
54
|
+
* @param {object} attributeValues -
|
|
55
|
+
* @param {object} completeness -
|
|
56
|
+
* @param {string} deletedAt -
|
|
57
|
+
* @param {boolean} enabled -
|
|
58
|
+
* @param {string} familyId -
|
|
59
|
+
* @param {string} familyVariantId -
|
|
60
|
+
* @param {string} kind -
|
|
61
|
+
* @param {string} parentId -
|
|
62
|
+
* @param {object} quantifiedAssociations -
|
|
63
|
+
* @throws {RevenexxException}
|
|
64
|
+
* @returns {Promise<Models.Products>}
|
|
65
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
66
|
+
*/
|
|
67
|
+
productsCreate(sku: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object): Promise<Models.Products>;
|
|
68
|
+
productsCreate(
|
|
69
|
+
paramsOrFirst: { sku: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object } | string,
|
|
70
|
+
...rest: [(object)?, (object)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (string)?, (object)?]
|
|
71
|
+
): Promise<Models.Products> {
|
|
72
|
+
let params: { sku: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object };
|
|
73
|
+
|
|
74
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
75
|
+
params = (paramsOrFirst || {}) as { sku: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object };
|
|
76
|
+
} else {
|
|
77
|
+
params = {
|
|
78
|
+
sku: paramsOrFirst as string,
|
|
79
|
+
attributeValues: rest[0] as object,
|
|
80
|
+
completeness: rest[1] as object,
|
|
81
|
+
deletedAt: rest[2] as string,
|
|
82
|
+
enabled: rest[3] as boolean,
|
|
83
|
+
familyId: rest[4] as string,
|
|
84
|
+
familyVariantId: rest[5] as string,
|
|
85
|
+
kind: rest[6] as string,
|
|
86
|
+
parentId: rest[7] as string,
|
|
87
|
+
quantifiedAssociations: rest[8] as object
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const sku = params.sku;
|
|
92
|
+
const attributeValues = params.attributeValues;
|
|
93
|
+
const completeness = params.completeness;
|
|
94
|
+
const deletedAt = params.deletedAt;
|
|
95
|
+
const enabled = params.enabled;
|
|
96
|
+
const familyId = params.familyId;
|
|
97
|
+
const familyVariantId = params.familyVariantId;
|
|
98
|
+
const kind = params.kind;
|
|
99
|
+
const parentId = params.parentId;
|
|
100
|
+
const quantifiedAssociations = params.quantifiedAssociations;
|
|
101
|
+
|
|
102
|
+
if (typeof sku === 'undefined') {
|
|
103
|
+
throw new RevenexxException('Missing required parameter: "sku"');
|
|
104
|
+
}
|
|
41
105
|
|
|
42
106
|
const apiPath = '/v1/products';
|
|
43
|
-
const
|
|
107
|
+
const apiPayload: Payload = {};
|
|
108
|
+
if (typeof attributeValues !== 'undefined') {
|
|
109
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
110
|
+
}
|
|
111
|
+
if (typeof completeness !== 'undefined') {
|
|
112
|
+
apiPayload['completeness'] = completeness;
|
|
113
|
+
}
|
|
114
|
+
if (typeof deletedAt !== 'undefined') {
|
|
115
|
+
apiPayload['deleted_at'] = deletedAt;
|
|
116
|
+
}
|
|
117
|
+
if (typeof enabled !== 'undefined') {
|
|
118
|
+
apiPayload['enabled'] = enabled;
|
|
119
|
+
}
|
|
120
|
+
if (typeof familyId !== 'undefined') {
|
|
121
|
+
apiPayload['family_id'] = familyId;
|
|
122
|
+
}
|
|
123
|
+
if (typeof familyVariantId !== 'undefined') {
|
|
124
|
+
apiPayload['family_variant_id'] = familyVariantId;
|
|
125
|
+
}
|
|
126
|
+
if (typeof kind !== 'undefined') {
|
|
127
|
+
apiPayload['kind'] = kind;
|
|
128
|
+
}
|
|
129
|
+
if (typeof parentId !== 'undefined') {
|
|
130
|
+
apiPayload['parent_id'] = parentId;
|
|
131
|
+
}
|
|
132
|
+
if (typeof quantifiedAssociations !== 'undefined') {
|
|
133
|
+
apiPayload['quantified_associations'] = quantifiedAssociations;
|
|
134
|
+
}
|
|
135
|
+
if (typeof sku !== 'undefined') {
|
|
136
|
+
apiPayload['sku'] = sku;
|
|
137
|
+
}
|
|
44
138
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45
139
|
|
|
46
140
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -51,7 +145,7 @@ export class Products {
|
|
|
51
145
|
'post',
|
|
52
146
|
uri,
|
|
53
147
|
apiHeaders,
|
|
54
|
-
|
|
148
|
+
apiPayload
|
|
55
149
|
);
|
|
56
150
|
}
|
|
57
151
|
|
|
@@ -63,7 +157,7 @@ export class Products {
|
|
|
63
157
|
productsAssetFamiliesList(): Promise<{}> {
|
|
64
158
|
|
|
65
159
|
const apiPath = '/v1/products/asset_families';
|
|
66
|
-
const
|
|
160
|
+
const apiPayload: Payload = {};
|
|
67
161
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
68
162
|
|
|
69
163
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -73,19 +167,64 @@ export class Products {
|
|
|
73
167
|
'get',
|
|
74
168
|
uri,
|
|
75
169
|
apiHeaders,
|
|
76
|
-
|
|
170
|
+
apiPayload
|
|
77
171
|
);
|
|
78
172
|
}
|
|
79
173
|
|
|
80
174
|
/**
|
|
81
175
|
*
|
|
176
|
+
* @param {string} params.code -
|
|
177
|
+
* @param {object} params.labels -
|
|
178
|
+
* @param {object} params.namingConvention -
|
|
179
|
+
* @throws {RevenexxException}
|
|
180
|
+
* @returns {Promise<Models.AssetFamilies>}
|
|
181
|
+
*/
|
|
182
|
+
productsAssetFamiliesCreate(params: { code: string, labels?: object, namingConvention?: object }): Promise<Models.AssetFamilies>;
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @param {string} code -
|
|
186
|
+
* @param {object} labels -
|
|
187
|
+
* @param {object} namingConvention -
|
|
82
188
|
* @throws {RevenexxException}
|
|
83
189
|
* @returns {Promise<Models.AssetFamilies>}
|
|
190
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
84
191
|
*/
|
|
85
|
-
productsAssetFamiliesCreate(): Promise<Models.AssetFamilies
|
|
192
|
+
productsAssetFamiliesCreate(code: string, labels?: object, namingConvention?: object): Promise<Models.AssetFamilies>;
|
|
193
|
+
productsAssetFamiliesCreate(
|
|
194
|
+
paramsOrFirst: { code: string, labels?: object, namingConvention?: object } | string,
|
|
195
|
+
...rest: [(object)?, (object)?]
|
|
196
|
+
): Promise<Models.AssetFamilies> {
|
|
197
|
+
let params: { code: string, labels?: object, namingConvention?: object };
|
|
198
|
+
|
|
199
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
200
|
+
params = (paramsOrFirst || {}) as { code: string, labels?: object, namingConvention?: object };
|
|
201
|
+
} else {
|
|
202
|
+
params = {
|
|
203
|
+
code: paramsOrFirst as string,
|
|
204
|
+
labels: rest[0] as object,
|
|
205
|
+
namingConvention: rest[1] as object
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const code = params.code;
|
|
210
|
+
const labels = params.labels;
|
|
211
|
+
const namingConvention = params.namingConvention;
|
|
212
|
+
|
|
213
|
+
if (typeof code === 'undefined') {
|
|
214
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
215
|
+
}
|
|
86
216
|
|
|
87
217
|
const apiPath = '/v1/products/asset_families';
|
|
88
|
-
const
|
|
218
|
+
const apiPayload: Payload = {};
|
|
219
|
+
if (typeof code !== 'undefined') {
|
|
220
|
+
apiPayload['code'] = code;
|
|
221
|
+
}
|
|
222
|
+
if (typeof labels !== 'undefined') {
|
|
223
|
+
apiPayload['labels'] = labels;
|
|
224
|
+
}
|
|
225
|
+
if (typeof namingConvention !== 'undefined') {
|
|
226
|
+
apiPayload['naming_convention'] = namingConvention;
|
|
227
|
+
}
|
|
89
228
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90
229
|
|
|
91
230
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -96,7 +235,7 @@ export class Products {
|
|
|
96
235
|
'post',
|
|
97
236
|
uri,
|
|
98
237
|
apiHeaders,
|
|
99
|
-
|
|
238
|
+
apiPayload
|
|
100
239
|
);
|
|
101
240
|
}
|
|
102
241
|
|
|
@@ -135,7 +274,7 @@ export class Products {
|
|
|
135
274
|
}
|
|
136
275
|
|
|
137
276
|
const apiPath = '/v1/products/asset_families/{id}'.replace('{id}', id);
|
|
138
|
-
const
|
|
277
|
+
const apiPayload: Payload = {};
|
|
139
278
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
140
279
|
|
|
141
280
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -145,7 +284,7 @@ export class Products {
|
|
|
145
284
|
'delete',
|
|
146
285
|
uri,
|
|
147
286
|
apiHeaders,
|
|
148
|
-
|
|
287
|
+
apiPayload
|
|
149
288
|
);
|
|
150
289
|
}
|
|
151
290
|
|
|
@@ -184,7 +323,7 @@ export class Products {
|
|
|
184
323
|
}
|
|
185
324
|
|
|
186
325
|
const apiPath = '/v1/products/asset_families/{id}'.replace('{id}', id);
|
|
187
|
-
const
|
|
326
|
+
const apiPayload: Payload = {};
|
|
188
327
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
189
328
|
|
|
190
329
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -194,46 +333,68 @@ export class Products {
|
|
|
194
333
|
'get',
|
|
195
334
|
uri,
|
|
196
335
|
apiHeaders,
|
|
197
|
-
|
|
336
|
+
apiPayload
|
|
198
337
|
);
|
|
199
338
|
}
|
|
200
339
|
|
|
201
340
|
/**
|
|
202
341
|
*
|
|
203
342
|
* @param {string} params.id -
|
|
343
|
+
* @param {string} params.code -
|
|
344
|
+
* @param {object} params.labels -
|
|
345
|
+
* @param {object} params.namingConvention -
|
|
204
346
|
* @throws {RevenexxException}
|
|
205
347
|
* @returns {Promise<Models.AssetFamilies>}
|
|
206
348
|
*/
|
|
207
|
-
productsAssetFamiliesUpdate(params: { id: string }): Promise<Models.AssetFamilies>;
|
|
349
|
+
productsAssetFamiliesUpdate(params: { id: string, code?: string, labels?: object, namingConvention?: object }): Promise<Models.AssetFamilies>;
|
|
208
350
|
/**
|
|
209
351
|
*
|
|
210
352
|
* @param {string} id -
|
|
353
|
+
* @param {string} code -
|
|
354
|
+
* @param {object} labels -
|
|
355
|
+
* @param {object} namingConvention -
|
|
211
356
|
* @throws {RevenexxException}
|
|
212
357
|
* @returns {Promise<Models.AssetFamilies>}
|
|
213
358
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
214
359
|
*/
|
|
215
|
-
productsAssetFamiliesUpdate(id: string): Promise<Models.AssetFamilies>;
|
|
360
|
+
productsAssetFamiliesUpdate(id: string, code?: string, labels?: object, namingConvention?: object): Promise<Models.AssetFamilies>;
|
|
216
361
|
productsAssetFamiliesUpdate(
|
|
217
|
-
paramsOrFirst: { id: string } | string
|
|
362
|
+
paramsOrFirst: { id: string, code?: string, labels?: object, namingConvention?: object } | string,
|
|
363
|
+
...rest: [(string)?, (object)?, (object)?]
|
|
218
364
|
): Promise<Models.AssetFamilies> {
|
|
219
|
-
let params: { id: string };
|
|
365
|
+
let params: { id: string, code?: string, labels?: object, namingConvention?: object };
|
|
220
366
|
|
|
221
367
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
222
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
368
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, labels?: object, namingConvention?: object };
|
|
223
369
|
} else {
|
|
224
370
|
params = {
|
|
225
|
-
id: paramsOrFirst as string
|
|
371
|
+
id: paramsOrFirst as string,
|
|
372
|
+
code: rest[0] as string,
|
|
373
|
+
labels: rest[1] as object,
|
|
374
|
+
namingConvention: rest[2] as object
|
|
226
375
|
};
|
|
227
376
|
}
|
|
228
377
|
|
|
229
378
|
const id = params.id;
|
|
379
|
+
const code = params.code;
|
|
380
|
+
const labels = params.labels;
|
|
381
|
+
const namingConvention = params.namingConvention;
|
|
230
382
|
|
|
231
383
|
if (typeof id === 'undefined') {
|
|
232
384
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
233
385
|
}
|
|
234
386
|
|
|
235
387
|
const apiPath = '/v1/products/asset_families/{id}'.replace('{id}', id);
|
|
236
|
-
const
|
|
388
|
+
const apiPayload: Payload = {};
|
|
389
|
+
if (typeof code !== 'undefined') {
|
|
390
|
+
apiPayload['code'] = code;
|
|
391
|
+
}
|
|
392
|
+
if (typeof labels !== 'undefined') {
|
|
393
|
+
apiPayload['labels'] = labels;
|
|
394
|
+
}
|
|
395
|
+
if (typeof namingConvention !== 'undefined') {
|
|
396
|
+
apiPayload['naming_convention'] = namingConvention;
|
|
397
|
+
}
|
|
237
398
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
238
399
|
|
|
239
400
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -244,7 +405,7 @@ export class Products {
|
|
|
244
405
|
'put',
|
|
245
406
|
uri,
|
|
246
407
|
apiHeaders,
|
|
247
|
-
|
|
408
|
+
apiPayload
|
|
248
409
|
);
|
|
249
410
|
}
|
|
250
411
|
|
|
@@ -256,7 +417,7 @@ export class Products {
|
|
|
256
417
|
productsAssetsList(): Promise<{}> {
|
|
257
418
|
|
|
258
419
|
const apiPath = '/v1/products/assets';
|
|
259
|
-
const
|
|
420
|
+
const apiPayload: Payload = {};
|
|
260
421
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
261
422
|
|
|
262
423
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -266,19 +427,74 @@ export class Products {
|
|
|
266
427
|
'get',
|
|
267
428
|
uri,
|
|
268
429
|
apiHeaders,
|
|
269
|
-
|
|
430
|
+
apiPayload
|
|
270
431
|
);
|
|
271
432
|
}
|
|
272
433
|
|
|
273
434
|
/**
|
|
274
435
|
*
|
|
436
|
+
* @param {string} params.assetFamilyId -
|
|
437
|
+
* @param {string} params.code -
|
|
438
|
+
* @param {object} params.attributeValues -
|
|
439
|
+
* @param {string} params.mediaUuid -
|
|
275
440
|
* @throws {RevenexxException}
|
|
276
441
|
* @returns {Promise<Models.Assets>}
|
|
277
442
|
*/
|
|
278
|
-
productsAssetsCreate(): Promise<Models.Assets
|
|
443
|
+
productsAssetsCreate(params: { assetFamilyId: string, code: string, attributeValues?: object, mediaUuid?: string }): Promise<Models.Assets>;
|
|
444
|
+
/**
|
|
445
|
+
*
|
|
446
|
+
* @param {string} assetFamilyId -
|
|
447
|
+
* @param {string} code -
|
|
448
|
+
* @param {object} attributeValues -
|
|
449
|
+
* @param {string} mediaUuid -
|
|
450
|
+
* @throws {RevenexxException}
|
|
451
|
+
* @returns {Promise<Models.Assets>}
|
|
452
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
453
|
+
*/
|
|
454
|
+
productsAssetsCreate(assetFamilyId: string, code: string, attributeValues?: object, mediaUuid?: string): Promise<Models.Assets>;
|
|
455
|
+
productsAssetsCreate(
|
|
456
|
+
paramsOrFirst: { assetFamilyId: string, code: string, attributeValues?: object, mediaUuid?: string } | string,
|
|
457
|
+
...rest: [(string)?, (object)?, (string)?]
|
|
458
|
+
): Promise<Models.Assets> {
|
|
459
|
+
let params: { assetFamilyId: string, code: string, attributeValues?: object, mediaUuid?: string };
|
|
460
|
+
|
|
461
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
462
|
+
params = (paramsOrFirst || {}) as { assetFamilyId: string, code: string, attributeValues?: object, mediaUuid?: string };
|
|
463
|
+
} else {
|
|
464
|
+
params = {
|
|
465
|
+
assetFamilyId: paramsOrFirst as string,
|
|
466
|
+
code: rest[0] as string,
|
|
467
|
+
attributeValues: rest[1] as object,
|
|
468
|
+
mediaUuid: rest[2] as string
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const assetFamilyId = params.assetFamilyId;
|
|
473
|
+
const code = params.code;
|
|
474
|
+
const attributeValues = params.attributeValues;
|
|
475
|
+
const mediaUuid = params.mediaUuid;
|
|
476
|
+
|
|
477
|
+
if (typeof assetFamilyId === 'undefined') {
|
|
478
|
+
throw new RevenexxException('Missing required parameter: "assetFamilyId"');
|
|
479
|
+
}
|
|
480
|
+
if (typeof code === 'undefined') {
|
|
481
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
482
|
+
}
|
|
279
483
|
|
|
280
484
|
const apiPath = '/v1/products/assets';
|
|
281
|
-
const
|
|
485
|
+
const apiPayload: Payload = {};
|
|
486
|
+
if (typeof assetFamilyId !== 'undefined') {
|
|
487
|
+
apiPayload['asset_family_id'] = assetFamilyId;
|
|
488
|
+
}
|
|
489
|
+
if (typeof attributeValues !== 'undefined') {
|
|
490
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
491
|
+
}
|
|
492
|
+
if (typeof code !== 'undefined') {
|
|
493
|
+
apiPayload['code'] = code;
|
|
494
|
+
}
|
|
495
|
+
if (typeof mediaUuid !== 'undefined') {
|
|
496
|
+
apiPayload['media_uuid'] = mediaUuid;
|
|
497
|
+
}
|
|
282
498
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
283
499
|
|
|
284
500
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -289,7 +505,7 @@ export class Products {
|
|
|
289
505
|
'post',
|
|
290
506
|
uri,
|
|
291
507
|
apiHeaders,
|
|
292
|
-
|
|
508
|
+
apiPayload
|
|
293
509
|
);
|
|
294
510
|
}
|
|
295
511
|
|
|
@@ -328,7 +544,7 @@ export class Products {
|
|
|
328
544
|
}
|
|
329
545
|
|
|
330
546
|
const apiPath = '/v1/products/assets/{id}'.replace('{id}', id);
|
|
331
|
-
const
|
|
547
|
+
const apiPayload: Payload = {};
|
|
332
548
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
333
549
|
|
|
334
550
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -338,7 +554,7 @@ export class Products {
|
|
|
338
554
|
'delete',
|
|
339
555
|
uri,
|
|
340
556
|
apiHeaders,
|
|
341
|
-
|
|
557
|
+
apiPayload
|
|
342
558
|
);
|
|
343
559
|
}
|
|
344
560
|
|
|
@@ -377,7 +593,7 @@ export class Products {
|
|
|
377
593
|
}
|
|
378
594
|
|
|
379
595
|
const apiPath = '/v1/products/assets/{id}'.replace('{id}', id);
|
|
380
|
-
const
|
|
596
|
+
const apiPayload: Payload = {};
|
|
381
597
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
382
598
|
|
|
383
599
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -387,46 +603,75 @@ export class Products {
|
|
|
387
603
|
'get',
|
|
388
604
|
uri,
|
|
389
605
|
apiHeaders,
|
|
390
|
-
|
|
606
|
+
apiPayload
|
|
391
607
|
);
|
|
392
608
|
}
|
|
393
609
|
|
|
394
610
|
/**
|
|
395
611
|
*
|
|
396
612
|
* @param {string} params.id -
|
|
613
|
+
* @param {string} params.assetFamilyId -
|
|
614
|
+
* @param {object} params.attributeValues -
|
|
615
|
+
* @param {string} params.code -
|
|
616
|
+
* @param {string} params.mediaUuid -
|
|
397
617
|
* @throws {RevenexxException}
|
|
398
618
|
* @returns {Promise<Models.Assets>}
|
|
399
619
|
*/
|
|
400
|
-
productsAssetsUpdate(params: { id: string }): Promise<Models.Assets>;
|
|
620
|
+
productsAssetsUpdate(params: { id: string, assetFamilyId?: string, attributeValues?: object, code?: string, mediaUuid?: string }): Promise<Models.Assets>;
|
|
401
621
|
/**
|
|
402
622
|
*
|
|
403
623
|
* @param {string} id -
|
|
624
|
+
* @param {string} assetFamilyId -
|
|
625
|
+
* @param {object} attributeValues -
|
|
626
|
+
* @param {string} code -
|
|
627
|
+
* @param {string} mediaUuid -
|
|
404
628
|
* @throws {RevenexxException}
|
|
405
629
|
* @returns {Promise<Models.Assets>}
|
|
406
630
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
407
631
|
*/
|
|
408
|
-
productsAssetsUpdate(id: string): Promise<Models.Assets>;
|
|
632
|
+
productsAssetsUpdate(id: string, assetFamilyId?: string, attributeValues?: object, code?: string, mediaUuid?: string): Promise<Models.Assets>;
|
|
409
633
|
productsAssetsUpdate(
|
|
410
|
-
paramsOrFirst: { id: string } | string
|
|
634
|
+
paramsOrFirst: { id: string, assetFamilyId?: string, attributeValues?: object, code?: string, mediaUuid?: string } | string,
|
|
635
|
+
...rest: [(string)?, (object)?, (string)?, (string)?]
|
|
411
636
|
): Promise<Models.Assets> {
|
|
412
|
-
let params: { id: string };
|
|
637
|
+
let params: { id: string, assetFamilyId?: string, attributeValues?: object, code?: string, mediaUuid?: string };
|
|
413
638
|
|
|
414
639
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
415
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
640
|
+
params = (paramsOrFirst || {}) as { id: string, assetFamilyId?: string, attributeValues?: object, code?: string, mediaUuid?: string };
|
|
416
641
|
} else {
|
|
417
642
|
params = {
|
|
418
|
-
id: paramsOrFirst as string
|
|
643
|
+
id: paramsOrFirst as string,
|
|
644
|
+
assetFamilyId: rest[0] as string,
|
|
645
|
+
attributeValues: rest[1] as object,
|
|
646
|
+
code: rest[2] as string,
|
|
647
|
+
mediaUuid: rest[3] as string
|
|
419
648
|
};
|
|
420
649
|
}
|
|
421
650
|
|
|
422
651
|
const id = params.id;
|
|
652
|
+
const assetFamilyId = params.assetFamilyId;
|
|
653
|
+
const attributeValues = params.attributeValues;
|
|
654
|
+
const code = params.code;
|
|
655
|
+
const mediaUuid = params.mediaUuid;
|
|
423
656
|
|
|
424
657
|
if (typeof id === 'undefined') {
|
|
425
658
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
426
659
|
}
|
|
427
660
|
|
|
428
661
|
const apiPath = '/v1/products/assets/{id}'.replace('{id}', id);
|
|
429
|
-
const
|
|
662
|
+
const apiPayload: Payload = {};
|
|
663
|
+
if (typeof assetFamilyId !== 'undefined') {
|
|
664
|
+
apiPayload['asset_family_id'] = assetFamilyId;
|
|
665
|
+
}
|
|
666
|
+
if (typeof attributeValues !== 'undefined') {
|
|
667
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
668
|
+
}
|
|
669
|
+
if (typeof code !== 'undefined') {
|
|
670
|
+
apiPayload['code'] = code;
|
|
671
|
+
}
|
|
672
|
+
if (typeof mediaUuid !== 'undefined') {
|
|
673
|
+
apiPayload['media_uuid'] = mediaUuid;
|
|
674
|
+
}
|
|
430
675
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
431
676
|
|
|
432
677
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -437,7 +682,7 @@ export class Products {
|
|
|
437
682
|
'put',
|
|
438
683
|
uri,
|
|
439
684
|
apiHeaders,
|
|
440
|
-
|
|
685
|
+
apiPayload
|
|
441
686
|
);
|
|
442
687
|
}
|
|
443
688
|
|
|
@@ -449,7 +694,7 @@ export class Products {
|
|
|
449
694
|
productsAssociationTypesList(): Promise<{}> {
|
|
450
695
|
|
|
451
696
|
const apiPath = '/v1/products/association_types';
|
|
452
|
-
const
|
|
697
|
+
const apiPayload: Payload = {};
|
|
453
698
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
454
699
|
|
|
455
700
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -459,19 +704,71 @@ export class Products {
|
|
|
459
704
|
'get',
|
|
460
705
|
uri,
|
|
461
706
|
apiHeaders,
|
|
462
|
-
|
|
707
|
+
apiPayload
|
|
463
708
|
);
|
|
464
709
|
}
|
|
465
710
|
|
|
466
711
|
/**
|
|
467
712
|
*
|
|
713
|
+
* @param {string} params.code -
|
|
714
|
+
* @param {boolean} params.isQuantified -
|
|
715
|
+
* @param {boolean} params.isTwoWay -
|
|
716
|
+
* @param {object} params.labels -
|
|
468
717
|
* @throws {RevenexxException}
|
|
469
718
|
* @returns {Promise<Models.AssociationTypes>}
|
|
470
719
|
*/
|
|
471
|
-
productsAssociationTypesCreate(): Promise<Models.AssociationTypes
|
|
720
|
+
productsAssociationTypesCreate(params: { code: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object }): Promise<Models.AssociationTypes>;
|
|
721
|
+
/**
|
|
722
|
+
*
|
|
723
|
+
* @param {string} code -
|
|
724
|
+
* @param {boolean} isQuantified -
|
|
725
|
+
* @param {boolean} isTwoWay -
|
|
726
|
+
* @param {object} labels -
|
|
727
|
+
* @throws {RevenexxException}
|
|
728
|
+
* @returns {Promise<Models.AssociationTypes>}
|
|
729
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
730
|
+
*/
|
|
731
|
+
productsAssociationTypesCreate(code: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object): Promise<Models.AssociationTypes>;
|
|
732
|
+
productsAssociationTypesCreate(
|
|
733
|
+
paramsOrFirst: { code: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object } | string,
|
|
734
|
+
...rest: [(boolean)?, (boolean)?, (object)?]
|
|
735
|
+
): Promise<Models.AssociationTypes> {
|
|
736
|
+
let params: { code: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object };
|
|
737
|
+
|
|
738
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
739
|
+
params = (paramsOrFirst || {}) as { code: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object };
|
|
740
|
+
} else {
|
|
741
|
+
params = {
|
|
742
|
+
code: paramsOrFirst as string,
|
|
743
|
+
isQuantified: rest[0] as boolean,
|
|
744
|
+
isTwoWay: rest[1] as boolean,
|
|
745
|
+
labels: rest[2] as object
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
const code = params.code;
|
|
750
|
+
const isQuantified = params.isQuantified;
|
|
751
|
+
const isTwoWay = params.isTwoWay;
|
|
752
|
+
const labels = params.labels;
|
|
753
|
+
|
|
754
|
+
if (typeof code === 'undefined') {
|
|
755
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
756
|
+
}
|
|
472
757
|
|
|
473
758
|
const apiPath = '/v1/products/association_types';
|
|
474
|
-
const
|
|
759
|
+
const apiPayload: Payload = {};
|
|
760
|
+
if (typeof code !== 'undefined') {
|
|
761
|
+
apiPayload['code'] = code;
|
|
762
|
+
}
|
|
763
|
+
if (typeof isQuantified !== 'undefined') {
|
|
764
|
+
apiPayload['is_quantified'] = isQuantified;
|
|
765
|
+
}
|
|
766
|
+
if (typeof isTwoWay !== 'undefined') {
|
|
767
|
+
apiPayload['is_two_way'] = isTwoWay;
|
|
768
|
+
}
|
|
769
|
+
if (typeof labels !== 'undefined') {
|
|
770
|
+
apiPayload['labels'] = labels;
|
|
771
|
+
}
|
|
475
772
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
476
773
|
|
|
477
774
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -482,7 +779,7 @@ export class Products {
|
|
|
482
779
|
'post',
|
|
483
780
|
uri,
|
|
484
781
|
apiHeaders,
|
|
485
|
-
|
|
782
|
+
apiPayload
|
|
486
783
|
);
|
|
487
784
|
}
|
|
488
785
|
|
|
@@ -521,7 +818,7 @@ export class Products {
|
|
|
521
818
|
}
|
|
522
819
|
|
|
523
820
|
const apiPath = '/v1/products/association_types/{id}'.replace('{id}', id);
|
|
524
|
-
const
|
|
821
|
+
const apiPayload: Payload = {};
|
|
525
822
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
526
823
|
|
|
527
824
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -531,7 +828,7 @@ export class Products {
|
|
|
531
828
|
'delete',
|
|
532
829
|
uri,
|
|
533
830
|
apiHeaders,
|
|
534
|
-
|
|
831
|
+
apiPayload
|
|
535
832
|
);
|
|
536
833
|
}
|
|
537
834
|
|
|
@@ -570,7 +867,7 @@ export class Products {
|
|
|
570
867
|
}
|
|
571
868
|
|
|
572
869
|
const apiPath = '/v1/products/association_types/{id}'.replace('{id}', id);
|
|
573
|
-
const
|
|
870
|
+
const apiPayload: Payload = {};
|
|
574
871
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
575
872
|
|
|
576
873
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -580,46 +877,75 @@ export class Products {
|
|
|
580
877
|
'get',
|
|
581
878
|
uri,
|
|
582
879
|
apiHeaders,
|
|
583
|
-
|
|
880
|
+
apiPayload
|
|
584
881
|
);
|
|
585
882
|
}
|
|
586
883
|
|
|
587
884
|
/**
|
|
588
885
|
*
|
|
589
886
|
* @param {string} params.id -
|
|
887
|
+
* @param {string} params.code -
|
|
888
|
+
* @param {boolean} params.isQuantified -
|
|
889
|
+
* @param {boolean} params.isTwoWay -
|
|
890
|
+
* @param {object} params.labels -
|
|
590
891
|
* @throws {RevenexxException}
|
|
591
892
|
* @returns {Promise<Models.AssociationTypes>}
|
|
592
893
|
*/
|
|
593
|
-
productsAssociationTypesUpdate(params: { id: string }): Promise<Models.AssociationTypes>;
|
|
894
|
+
productsAssociationTypesUpdate(params: { id: string, code?: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object }): Promise<Models.AssociationTypes>;
|
|
594
895
|
/**
|
|
595
896
|
*
|
|
596
897
|
* @param {string} id -
|
|
898
|
+
* @param {string} code -
|
|
899
|
+
* @param {boolean} isQuantified -
|
|
900
|
+
* @param {boolean} isTwoWay -
|
|
901
|
+
* @param {object} labels -
|
|
597
902
|
* @throws {RevenexxException}
|
|
598
903
|
* @returns {Promise<Models.AssociationTypes>}
|
|
599
904
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
600
905
|
*/
|
|
601
|
-
productsAssociationTypesUpdate(id: string): Promise<Models.AssociationTypes>;
|
|
906
|
+
productsAssociationTypesUpdate(id: string, code?: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object): Promise<Models.AssociationTypes>;
|
|
602
907
|
productsAssociationTypesUpdate(
|
|
603
|
-
paramsOrFirst: { id: string } | string
|
|
908
|
+
paramsOrFirst: { id: string, code?: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object } | string,
|
|
909
|
+
...rest: [(string)?, (boolean)?, (boolean)?, (object)?]
|
|
604
910
|
): Promise<Models.AssociationTypes> {
|
|
605
|
-
let params: { id: string };
|
|
911
|
+
let params: { id: string, code?: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object };
|
|
606
912
|
|
|
607
913
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
608
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
914
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, isQuantified?: boolean, isTwoWay?: boolean, labels?: object };
|
|
609
915
|
} else {
|
|
610
916
|
params = {
|
|
611
|
-
id: paramsOrFirst as string
|
|
917
|
+
id: paramsOrFirst as string,
|
|
918
|
+
code: rest[0] as string,
|
|
919
|
+
isQuantified: rest[1] as boolean,
|
|
920
|
+
isTwoWay: rest[2] as boolean,
|
|
921
|
+
labels: rest[3] as object
|
|
612
922
|
};
|
|
613
923
|
}
|
|
614
924
|
|
|
615
925
|
const id = params.id;
|
|
926
|
+
const code = params.code;
|
|
927
|
+
const isQuantified = params.isQuantified;
|
|
928
|
+
const isTwoWay = params.isTwoWay;
|
|
929
|
+
const labels = params.labels;
|
|
616
930
|
|
|
617
931
|
if (typeof id === 'undefined') {
|
|
618
932
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
619
933
|
}
|
|
620
934
|
|
|
621
935
|
const apiPath = '/v1/products/association_types/{id}'.replace('{id}', id);
|
|
622
|
-
const
|
|
936
|
+
const apiPayload: Payload = {};
|
|
937
|
+
if (typeof code !== 'undefined') {
|
|
938
|
+
apiPayload['code'] = code;
|
|
939
|
+
}
|
|
940
|
+
if (typeof isQuantified !== 'undefined') {
|
|
941
|
+
apiPayload['is_quantified'] = isQuantified;
|
|
942
|
+
}
|
|
943
|
+
if (typeof isTwoWay !== 'undefined') {
|
|
944
|
+
apiPayload['is_two_way'] = isTwoWay;
|
|
945
|
+
}
|
|
946
|
+
if (typeof labels !== 'undefined') {
|
|
947
|
+
apiPayload['labels'] = labels;
|
|
948
|
+
}
|
|
623
949
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
624
950
|
|
|
625
951
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -630,7 +956,7 @@ export class Products {
|
|
|
630
956
|
'put',
|
|
631
957
|
uri,
|
|
632
958
|
apiHeaders,
|
|
633
|
-
|
|
959
|
+
apiPayload
|
|
634
960
|
);
|
|
635
961
|
}
|
|
636
962
|
|
|
@@ -642,7 +968,7 @@ export class Products {
|
|
|
642
968
|
productsAttributeGroupsList(): Promise<{}> {
|
|
643
969
|
|
|
644
970
|
const apiPath = '/v1/products/attribute_groups';
|
|
645
|
-
const
|
|
971
|
+
const apiPayload: Payload = {};
|
|
646
972
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
647
973
|
|
|
648
974
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -652,19 +978,64 @@ export class Products {
|
|
|
652
978
|
'get',
|
|
653
979
|
uri,
|
|
654
980
|
apiHeaders,
|
|
655
|
-
|
|
981
|
+
apiPayload
|
|
656
982
|
);
|
|
657
983
|
}
|
|
658
984
|
|
|
659
985
|
/**
|
|
660
986
|
*
|
|
987
|
+
* @param {string} params.code -
|
|
988
|
+
* @param {object} params.labels -
|
|
989
|
+
* @param {number} params.position -
|
|
990
|
+
* @throws {RevenexxException}
|
|
991
|
+
* @returns {Promise<Models.AttributeGroups>}
|
|
992
|
+
*/
|
|
993
|
+
productsAttributeGroupsCreate(params: { code: string, labels?: object, position?: number }): Promise<Models.AttributeGroups>;
|
|
994
|
+
/**
|
|
995
|
+
*
|
|
996
|
+
* @param {string} code -
|
|
997
|
+
* @param {object} labels -
|
|
998
|
+
* @param {number} position -
|
|
661
999
|
* @throws {RevenexxException}
|
|
662
1000
|
* @returns {Promise<Models.AttributeGroups>}
|
|
1001
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
663
1002
|
*/
|
|
664
|
-
productsAttributeGroupsCreate(): Promise<Models.AttributeGroups
|
|
1003
|
+
productsAttributeGroupsCreate(code: string, labels?: object, position?: number): Promise<Models.AttributeGroups>;
|
|
1004
|
+
productsAttributeGroupsCreate(
|
|
1005
|
+
paramsOrFirst: { code: string, labels?: object, position?: number } | string,
|
|
1006
|
+
...rest: [(object)?, (number)?]
|
|
1007
|
+
): Promise<Models.AttributeGroups> {
|
|
1008
|
+
let params: { code: string, labels?: object, position?: number };
|
|
1009
|
+
|
|
1010
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1011
|
+
params = (paramsOrFirst || {}) as { code: string, labels?: object, position?: number };
|
|
1012
|
+
} else {
|
|
1013
|
+
params = {
|
|
1014
|
+
code: paramsOrFirst as string,
|
|
1015
|
+
labels: rest[0] as object,
|
|
1016
|
+
position: rest[1] as number
|
|
1017
|
+
};
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
const code = params.code;
|
|
1021
|
+
const labels = params.labels;
|
|
1022
|
+
const position = params.position;
|
|
1023
|
+
|
|
1024
|
+
if (typeof code === 'undefined') {
|
|
1025
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
1026
|
+
}
|
|
665
1027
|
|
|
666
1028
|
const apiPath = '/v1/products/attribute_groups';
|
|
667
|
-
const
|
|
1029
|
+
const apiPayload: Payload = {};
|
|
1030
|
+
if (typeof code !== 'undefined') {
|
|
1031
|
+
apiPayload['code'] = code;
|
|
1032
|
+
}
|
|
1033
|
+
if (typeof labels !== 'undefined') {
|
|
1034
|
+
apiPayload['labels'] = labels;
|
|
1035
|
+
}
|
|
1036
|
+
if (typeof position !== 'undefined') {
|
|
1037
|
+
apiPayload['position'] = position;
|
|
1038
|
+
}
|
|
668
1039
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
669
1040
|
|
|
670
1041
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -675,7 +1046,7 @@ export class Products {
|
|
|
675
1046
|
'post',
|
|
676
1047
|
uri,
|
|
677
1048
|
apiHeaders,
|
|
678
|
-
|
|
1049
|
+
apiPayload
|
|
679
1050
|
);
|
|
680
1051
|
}
|
|
681
1052
|
|
|
@@ -714,7 +1085,7 @@ export class Products {
|
|
|
714
1085
|
}
|
|
715
1086
|
|
|
716
1087
|
const apiPath = '/v1/products/attribute_groups/{id}'.replace('{id}', id);
|
|
717
|
-
const
|
|
1088
|
+
const apiPayload: Payload = {};
|
|
718
1089
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
719
1090
|
|
|
720
1091
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -724,7 +1095,7 @@ export class Products {
|
|
|
724
1095
|
'delete',
|
|
725
1096
|
uri,
|
|
726
1097
|
apiHeaders,
|
|
727
|
-
|
|
1098
|
+
apiPayload
|
|
728
1099
|
);
|
|
729
1100
|
}
|
|
730
1101
|
|
|
@@ -763,7 +1134,7 @@ export class Products {
|
|
|
763
1134
|
}
|
|
764
1135
|
|
|
765
1136
|
const apiPath = '/v1/products/attribute_groups/{id}'.replace('{id}', id);
|
|
766
|
-
const
|
|
1137
|
+
const apiPayload: Payload = {};
|
|
767
1138
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
768
1139
|
|
|
769
1140
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -773,46 +1144,68 @@ export class Products {
|
|
|
773
1144
|
'get',
|
|
774
1145
|
uri,
|
|
775
1146
|
apiHeaders,
|
|
776
|
-
|
|
1147
|
+
apiPayload
|
|
777
1148
|
);
|
|
778
1149
|
}
|
|
779
1150
|
|
|
780
1151
|
/**
|
|
781
1152
|
*
|
|
782
1153
|
* @param {string} params.id -
|
|
1154
|
+
* @param {string} params.code -
|
|
1155
|
+
* @param {object} params.labels -
|
|
1156
|
+
* @param {number} params.position -
|
|
783
1157
|
* @throws {RevenexxException}
|
|
784
1158
|
* @returns {Promise<Models.AttributeGroups>}
|
|
785
1159
|
*/
|
|
786
|
-
productsAttributeGroupsUpdate(params: { id: string }): Promise<Models.AttributeGroups>;
|
|
1160
|
+
productsAttributeGroupsUpdate(params: { id: string, code?: string, labels?: object, position?: number }): Promise<Models.AttributeGroups>;
|
|
787
1161
|
/**
|
|
788
1162
|
*
|
|
789
1163
|
* @param {string} id -
|
|
1164
|
+
* @param {string} code -
|
|
1165
|
+
* @param {object} labels -
|
|
1166
|
+
* @param {number} position -
|
|
790
1167
|
* @throws {RevenexxException}
|
|
791
1168
|
* @returns {Promise<Models.AttributeGroups>}
|
|
792
1169
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
793
1170
|
*/
|
|
794
|
-
productsAttributeGroupsUpdate(id: string): Promise<Models.AttributeGroups>;
|
|
1171
|
+
productsAttributeGroupsUpdate(id: string, code?: string, labels?: object, position?: number): Promise<Models.AttributeGroups>;
|
|
795
1172
|
productsAttributeGroupsUpdate(
|
|
796
|
-
paramsOrFirst: { id: string } | string
|
|
1173
|
+
paramsOrFirst: { id: string, code?: string, labels?: object, position?: number } | string,
|
|
1174
|
+
...rest: [(string)?, (object)?, (number)?]
|
|
797
1175
|
): Promise<Models.AttributeGroups> {
|
|
798
|
-
let params: { id: string };
|
|
1176
|
+
let params: { id: string, code?: string, labels?: object, position?: number };
|
|
799
1177
|
|
|
800
1178
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
801
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
1179
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, labels?: object, position?: number };
|
|
802
1180
|
} else {
|
|
803
1181
|
params = {
|
|
804
|
-
id: paramsOrFirst as string
|
|
1182
|
+
id: paramsOrFirst as string,
|
|
1183
|
+
code: rest[0] as string,
|
|
1184
|
+
labels: rest[1] as object,
|
|
1185
|
+
position: rest[2] as number
|
|
805
1186
|
};
|
|
806
1187
|
}
|
|
807
1188
|
|
|
808
1189
|
const id = params.id;
|
|
1190
|
+
const code = params.code;
|
|
1191
|
+
const labels = params.labels;
|
|
1192
|
+
const position = params.position;
|
|
809
1193
|
|
|
810
1194
|
if (typeof id === 'undefined') {
|
|
811
1195
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
812
1196
|
}
|
|
813
1197
|
|
|
814
1198
|
const apiPath = '/v1/products/attribute_groups/{id}'.replace('{id}', id);
|
|
815
|
-
const
|
|
1199
|
+
const apiPayload: Payload = {};
|
|
1200
|
+
if (typeof code !== 'undefined') {
|
|
1201
|
+
apiPayload['code'] = code;
|
|
1202
|
+
}
|
|
1203
|
+
if (typeof labels !== 'undefined') {
|
|
1204
|
+
apiPayload['labels'] = labels;
|
|
1205
|
+
}
|
|
1206
|
+
if (typeof position !== 'undefined') {
|
|
1207
|
+
apiPayload['position'] = position;
|
|
1208
|
+
}
|
|
816
1209
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
817
1210
|
|
|
818
1211
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -823,7 +1216,7 @@ export class Products {
|
|
|
823
1216
|
'put',
|
|
824
1217
|
uri,
|
|
825
1218
|
apiHeaders,
|
|
826
|
-
|
|
1219
|
+
apiPayload
|
|
827
1220
|
);
|
|
828
1221
|
}
|
|
829
1222
|
|
|
@@ -835,7 +1228,7 @@ export class Products {
|
|
|
835
1228
|
productsAttributeOptionsList(): Promise<{}> {
|
|
836
1229
|
|
|
837
1230
|
const apiPath = '/v1/products/attribute_options';
|
|
838
|
-
const
|
|
1231
|
+
const apiPayload: Payload = {};
|
|
839
1232
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
840
1233
|
|
|
841
1234
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -845,19 +1238,81 @@ export class Products {
|
|
|
845
1238
|
'get',
|
|
846
1239
|
uri,
|
|
847
1240
|
apiHeaders,
|
|
848
|
-
|
|
1241
|
+
apiPayload
|
|
849
1242
|
);
|
|
850
1243
|
}
|
|
851
1244
|
|
|
852
1245
|
/**
|
|
853
1246
|
*
|
|
1247
|
+
* @param {string} params.attributeId -
|
|
1248
|
+
* @param {string} params.code -
|
|
1249
|
+
* @param {object} params.labels -
|
|
1250
|
+
* @param {number} params.position -
|
|
1251
|
+
* @param {object} params.swatch -
|
|
854
1252
|
* @throws {RevenexxException}
|
|
855
1253
|
* @returns {Promise<Models.AttributeOptions>}
|
|
856
1254
|
*/
|
|
857
|
-
productsAttributeOptionsCreate(): Promise<Models.AttributeOptions
|
|
1255
|
+
productsAttributeOptionsCreate(params: { attributeId: string, code: string, labels?: object, position?: number, swatch?: object }): Promise<Models.AttributeOptions>;
|
|
1256
|
+
/**
|
|
1257
|
+
*
|
|
1258
|
+
* @param {string} attributeId -
|
|
1259
|
+
* @param {string} code -
|
|
1260
|
+
* @param {object} labels -
|
|
1261
|
+
* @param {number} position -
|
|
1262
|
+
* @param {object} swatch -
|
|
1263
|
+
* @throws {RevenexxException}
|
|
1264
|
+
* @returns {Promise<Models.AttributeOptions>}
|
|
1265
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1266
|
+
*/
|
|
1267
|
+
productsAttributeOptionsCreate(attributeId: string, code: string, labels?: object, position?: number, swatch?: object): Promise<Models.AttributeOptions>;
|
|
1268
|
+
productsAttributeOptionsCreate(
|
|
1269
|
+
paramsOrFirst: { attributeId: string, code: string, labels?: object, position?: number, swatch?: object } | string,
|
|
1270
|
+
...rest: [(string)?, (object)?, (number)?, (object)?]
|
|
1271
|
+
): Promise<Models.AttributeOptions> {
|
|
1272
|
+
let params: { attributeId: string, code: string, labels?: object, position?: number, swatch?: object };
|
|
1273
|
+
|
|
1274
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1275
|
+
params = (paramsOrFirst || {}) as { attributeId: string, code: string, labels?: object, position?: number, swatch?: object };
|
|
1276
|
+
} else {
|
|
1277
|
+
params = {
|
|
1278
|
+
attributeId: paramsOrFirst as string,
|
|
1279
|
+
code: rest[0] as string,
|
|
1280
|
+
labels: rest[1] as object,
|
|
1281
|
+
position: rest[2] as number,
|
|
1282
|
+
swatch: rest[3] as object
|
|
1283
|
+
};
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
const attributeId = params.attributeId;
|
|
1287
|
+
const code = params.code;
|
|
1288
|
+
const labels = params.labels;
|
|
1289
|
+
const position = params.position;
|
|
1290
|
+
const swatch = params.swatch;
|
|
1291
|
+
|
|
1292
|
+
if (typeof attributeId === 'undefined') {
|
|
1293
|
+
throw new RevenexxException('Missing required parameter: "attributeId"');
|
|
1294
|
+
}
|
|
1295
|
+
if (typeof code === 'undefined') {
|
|
1296
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
1297
|
+
}
|
|
858
1298
|
|
|
859
1299
|
const apiPath = '/v1/products/attribute_options';
|
|
860
|
-
const
|
|
1300
|
+
const apiPayload: Payload = {};
|
|
1301
|
+
if (typeof attributeId !== 'undefined') {
|
|
1302
|
+
apiPayload['attribute_id'] = attributeId;
|
|
1303
|
+
}
|
|
1304
|
+
if (typeof code !== 'undefined') {
|
|
1305
|
+
apiPayload['code'] = code;
|
|
1306
|
+
}
|
|
1307
|
+
if (typeof labels !== 'undefined') {
|
|
1308
|
+
apiPayload['labels'] = labels;
|
|
1309
|
+
}
|
|
1310
|
+
if (typeof position !== 'undefined') {
|
|
1311
|
+
apiPayload['position'] = position;
|
|
1312
|
+
}
|
|
1313
|
+
if (typeof swatch !== 'undefined') {
|
|
1314
|
+
apiPayload['swatch'] = swatch;
|
|
1315
|
+
}
|
|
861
1316
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
862
1317
|
|
|
863
1318
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -868,7 +1323,7 @@ export class Products {
|
|
|
868
1323
|
'post',
|
|
869
1324
|
uri,
|
|
870
1325
|
apiHeaders,
|
|
871
|
-
|
|
1326
|
+
apiPayload
|
|
872
1327
|
);
|
|
873
1328
|
}
|
|
874
1329
|
|
|
@@ -907,7 +1362,7 @@ export class Products {
|
|
|
907
1362
|
}
|
|
908
1363
|
|
|
909
1364
|
const apiPath = '/v1/products/attribute_options/{id}'.replace('{id}', id);
|
|
910
|
-
const
|
|
1365
|
+
const apiPayload: Payload = {};
|
|
911
1366
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
912
1367
|
|
|
913
1368
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -917,7 +1372,7 @@ export class Products {
|
|
|
917
1372
|
'delete',
|
|
918
1373
|
uri,
|
|
919
1374
|
apiHeaders,
|
|
920
|
-
|
|
1375
|
+
apiPayload
|
|
921
1376
|
);
|
|
922
1377
|
}
|
|
923
1378
|
|
|
@@ -956,7 +1411,7 @@ export class Products {
|
|
|
956
1411
|
}
|
|
957
1412
|
|
|
958
1413
|
const apiPath = '/v1/products/attribute_options/{id}'.replace('{id}', id);
|
|
959
|
-
const
|
|
1414
|
+
const apiPayload: Payload = {};
|
|
960
1415
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
961
1416
|
|
|
962
1417
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -966,46 +1421,82 @@ export class Products {
|
|
|
966
1421
|
'get',
|
|
967
1422
|
uri,
|
|
968
1423
|
apiHeaders,
|
|
969
|
-
|
|
1424
|
+
apiPayload
|
|
970
1425
|
);
|
|
971
1426
|
}
|
|
972
1427
|
|
|
973
1428
|
/**
|
|
974
1429
|
*
|
|
975
1430
|
* @param {string} params.id -
|
|
1431
|
+
* @param {string} params.attributeId -
|
|
1432
|
+
* @param {string} params.code -
|
|
1433
|
+
* @param {object} params.labels -
|
|
1434
|
+
* @param {number} params.position -
|
|
1435
|
+
* @param {object} params.swatch -
|
|
976
1436
|
* @throws {RevenexxException}
|
|
977
1437
|
* @returns {Promise<Models.AttributeOptions>}
|
|
978
1438
|
*/
|
|
979
|
-
productsAttributeOptionsUpdate(params: { id: string }): Promise<Models.AttributeOptions>;
|
|
1439
|
+
productsAttributeOptionsUpdate(params: { id: string, attributeId?: string, code?: string, labels?: object, position?: number, swatch?: object }): Promise<Models.AttributeOptions>;
|
|
980
1440
|
/**
|
|
981
1441
|
*
|
|
982
1442
|
* @param {string} id -
|
|
1443
|
+
* @param {string} attributeId -
|
|
1444
|
+
* @param {string} code -
|
|
1445
|
+
* @param {object} labels -
|
|
1446
|
+
* @param {number} position -
|
|
1447
|
+
* @param {object} swatch -
|
|
983
1448
|
* @throws {RevenexxException}
|
|
984
1449
|
* @returns {Promise<Models.AttributeOptions>}
|
|
985
1450
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
986
1451
|
*/
|
|
987
|
-
productsAttributeOptionsUpdate(id: string): Promise<Models.AttributeOptions>;
|
|
1452
|
+
productsAttributeOptionsUpdate(id: string, attributeId?: string, code?: string, labels?: object, position?: number, swatch?: object): Promise<Models.AttributeOptions>;
|
|
988
1453
|
productsAttributeOptionsUpdate(
|
|
989
|
-
paramsOrFirst: { id: string } | string
|
|
1454
|
+
paramsOrFirst: { id: string, attributeId?: string, code?: string, labels?: object, position?: number, swatch?: object } | string,
|
|
1455
|
+
...rest: [(string)?, (string)?, (object)?, (number)?, (object)?]
|
|
990
1456
|
): Promise<Models.AttributeOptions> {
|
|
991
|
-
let params: { id: string };
|
|
1457
|
+
let params: { id: string, attributeId?: string, code?: string, labels?: object, position?: number, swatch?: object };
|
|
992
1458
|
|
|
993
1459
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
994
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
1460
|
+
params = (paramsOrFirst || {}) as { id: string, attributeId?: string, code?: string, labels?: object, position?: number, swatch?: object };
|
|
995
1461
|
} else {
|
|
996
1462
|
params = {
|
|
997
|
-
id: paramsOrFirst as string
|
|
1463
|
+
id: paramsOrFirst as string,
|
|
1464
|
+
attributeId: rest[0] as string,
|
|
1465
|
+
code: rest[1] as string,
|
|
1466
|
+
labels: rest[2] as object,
|
|
1467
|
+
position: rest[3] as number,
|
|
1468
|
+
swatch: rest[4] as object
|
|
998
1469
|
};
|
|
999
1470
|
}
|
|
1000
1471
|
|
|
1001
1472
|
const id = params.id;
|
|
1473
|
+
const attributeId = params.attributeId;
|
|
1474
|
+
const code = params.code;
|
|
1475
|
+
const labels = params.labels;
|
|
1476
|
+
const position = params.position;
|
|
1477
|
+
const swatch = params.swatch;
|
|
1002
1478
|
|
|
1003
1479
|
if (typeof id === 'undefined') {
|
|
1004
1480
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1005
1481
|
}
|
|
1006
1482
|
|
|
1007
1483
|
const apiPath = '/v1/products/attribute_options/{id}'.replace('{id}', id);
|
|
1008
|
-
const
|
|
1484
|
+
const apiPayload: Payload = {};
|
|
1485
|
+
if (typeof attributeId !== 'undefined') {
|
|
1486
|
+
apiPayload['attribute_id'] = attributeId;
|
|
1487
|
+
}
|
|
1488
|
+
if (typeof code !== 'undefined') {
|
|
1489
|
+
apiPayload['code'] = code;
|
|
1490
|
+
}
|
|
1491
|
+
if (typeof labels !== 'undefined') {
|
|
1492
|
+
apiPayload['labels'] = labels;
|
|
1493
|
+
}
|
|
1494
|
+
if (typeof position !== 'undefined') {
|
|
1495
|
+
apiPayload['position'] = position;
|
|
1496
|
+
}
|
|
1497
|
+
if (typeof swatch !== 'undefined') {
|
|
1498
|
+
apiPayload['swatch'] = swatch;
|
|
1499
|
+
}
|
|
1009
1500
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1010
1501
|
|
|
1011
1502
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1016,7 +1507,7 @@ export class Products {
|
|
|
1016
1507
|
'put',
|
|
1017
1508
|
uri,
|
|
1018
1509
|
apiHeaders,
|
|
1019
|
-
|
|
1510
|
+
apiPayload
|
|
1020
1511
|
);
|
|
1021
1512
|
}
|
|
1022
1513
|
|
|
@@ -1028,7 +1519,7 @@ export class Products {
|
|
|
1028
1519
|
productsAttributesList(): Promise<{}> {
|
|
1029
1520
|
|
|
1030
1521
|
const apiPath = '/v1/products/attributes';
|
|
1031
|
-
const
|
|
1522
|
+
const apiPayload: Payload = {};
|
|
1032
1523
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1033
1524
|
|
|
1034
1525
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1038,19 +1529,144 @@ export class Products {
|
|
|
1038
1529
|
'get',
|
|
1039
1530
|
uri,
|
|
1040
1531
|
apiHeaders,
|
|
1041
|
-
|
|
1532
|
+
apiPayload
|
|
1042
1533
|
);
|
|
1043
1534
|
}
|
|
1044
1535
|
|
|
1045
1536
|
/**
|
|
1046
1537
|
*
|
|
1538
|
+
* @param {string} params.code -
|
|
1539
|
+
* @param {string} params.type -
|
|
1540
|
+
* @param {object} params.config -
|
|
1541
|
+
* @param {string} params.entityRef -
|
|
1542
|
+
* @param {string} params.entityType -
|
|
1543
|
+
* @param {string} params.groupId -
|
|
1544
|
+
* @param {boolean} params.isFilterable -
|
|
1545
|
+
* @param {boolean} params.isUnique -
|
|
1546
|
+
* @param {object} params.labels -
|
|
1547
|
+
* @param {boolean} params.localizable -
|
|
1548
|
+
* @param {number} params.position -
|
|
1549
|
+
* @param {boolean} params.scopable -
|
|
1550
|
+
* @param {boolean} params.usableInGrid -
|
|
1551
|
+
* @param {object} params.validation -
|
|
1552
|
+
* @throws {RevenexxException}
|
|
1553
|
+
* @returns {Promise<Models.Attributes>}
|
|
1554
|
+
*/
|
|
1555
|
+
productsAttributesCreate(params: { code: string, type: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, usableInGrid?: boolean, validation?: object }): Promise<Models.Attributes>;
|
|
1556
|
+
/**
|
|
1557
|
+
*
|
|
1558
|
+
* @param {string} code -
|
|
1559
|
+
* @param {string} type -
|
|
1560
|
+
* @param {object} config -
|
|
1561
|
+
* @param {string} entityRef -
|
|
1562
|
+
* @param {string} entityType -
|
|
1563
|
+
* @param {string} groupId -
|
|
1564
|
+
* @param {boolean} isFilterable -
|
|
1565
|
+
* @param {boolean} isUnique -
|
|
1566
|
+
* @param {object} labels -
|
|
1567
|
+
* @param {boolean} localizable -
|
|
1568
|
+
* @param {number} position -
|
|
1569
|
+
* @param {boolean} scopable -
|
|
1570
|
+
* @param {boolean} usableInGrid -
|
|
1571
|
+
* @param {object} validation -
|
|
1047
1572
|
* @throws {RevenexxException}
|
|
1048
1573
|
* @returns {Promise<Models.Attributes>}
|
|
1574
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1049
1575
|
*/
|
|
1050
|
-
productsAttributesCreate(): Promise<Models.Attributes
|
|
1576
|
+
productsAttributesCreate(code: string, type: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, usableInGrid?: boolean, validation?: object): Promise<Models.Attributes>;
|
|
1577
|
+
productsAttributesCreate(
|
|
1578
|
+
paramsOrFirst: { code: string, type: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, usableInGrid?: boolean, validation?: object } | string,
|
|
1579
|
+
...rest: [(string)?, (object)?, (string)?, (string)?, (string)?, (boolean)?, (boolean)?, (object)?, (boolean)?, (number)?, (boolean)?, (boolean)?, (object)?]
|
|
1580
|
+
): Promise<Models.Attributes> {
|
|
1581
|
+
let params: { code: string, type: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, usableInGrid?: boolean, validation?: object };
|
|
1582
|
+
|
|
1583
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1584
|
+
params = (paramsOrFirst || {}) as { code: string, type: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, usableInGrid?: boolean, validation?: object };
|
|
1585
|
+
} else {
|
|
1586
|
+
params = {
|
|
1587
|
+
code: paramsOrFirst as string,
|
|
1588
|
+
type: rest[0] as string,
|
|
1589
|
+
config: rest[1] as object,
|
|
1590
|
+
entityRef: rest[2] as string,
|
|
1591
|
+
entityType: rest[3] as string,
|
|
1592
|
+
groupId: rest[4] as string,
|
|
1593
|
+
isFilterable: rest[5] as boolean,
|
|
1594
|
+
isUnique: rest[6] as boolean,
|
|
1595
|
+
labels: rest[7] as object,
|
|
1596
|
+
localizable: rest[8] as boolean,
|
|
1597
|
+
position: rest[9] as number,
|
|
1598
|
+
scopable: rest[10] as boolean,
|
|
1599
|
+
usableInGrid: rest[11] as boolean,
|
|
1600
|
+
validation: rest[12] as object
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
const code = params.code;
|
|
1605
|
+
const type = params.type;
|
|
1606
|
+
const config = params.config;
|
|
1607
|
+
const entityRef = params.entityRef;
|
|
1608
|
+
const entityType = params.entityType;
|
|
1609
|
+
const groupId = params.groupId;
|
|
1610
|
+
const isFilterable = params.isFilterable;
|
|
1611
|
+
const isUnique = params.isUnique;
|
|
1612
|
+
const labels = params.labels;
|
|
1613
|
+
const localizable = params.localizable;
|
|
1614
|
+
const position = params.position;
|
|
1615
|
+
const scopable = params.scopable;
|
|
1616
|
+
const usableInGrid = params.usableInGrid;
|
|
1617
|
+
const validation = params.validation;
|
|
1618
|
+
|
|
1619
|
+
if (typeof code === 'undefined') {
|
|
1620
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
1621
|
+
}
|
|
1622
|
+
if (typeof type === 'undefined') {
|
|
1623
|
+
throw new RevenexxException('Missing required parameter: "type"');
|
|
1624
|
+
}
|
|
1051
1625
|
|
|
1052
1626
|
const apiPath = '/v1/products/attributes';
|
|
1053
|
-
const
|
|
1627
|
+
const apiPayload: Payload = {};
|
|
1628
|
+
if (typeof code !== 'undefined') {
|
|
1629
|
+
apiPayload['code'] = code;
|
|
1630
|
+
}
|
|
1631
|
+
if (typeof config !== 'undefined') {
|
|
1632
|
+
apiPayload['config'] = config;
|
|
1633
|
+
}
|
|
1634
|
+
if (typeof entityRef !== 'undefined') {
|
|
1635
|
+
apiPayload['entity_ref'] = entityRef;
|
|
1636
|
+
}
|
|
1637
|
+
if (typeof entityType !== 'undefined') {
|
|
1638
|
+
apiPayload['entity_type'] = entityType;
|
|
1639
|
+
}
|
|
1640
|
+
if (typeof groupId !== 'undefined') {
|
|
1641
|
+
apiPayload['group_id'] = groupId;
|
|
1642
|
+
}
|
|
1643
|
+
if (typeof isFilterable !== 'undefined') {
|
|
1644
|
+
apiPayload['is_filterable'] = isFilterable;
|
|
1645
|
+
}
|
|
1646
|
+
if (typeof isUnique !== 'undefined') {
|
|
1647
|
+
apiPayload['is_unique'] = isUnique;
|
|
1648
|
+
}
|
|
1649
|
+
if (typeof labels !== 'undefined') {
|
|
1650
|
+
apiPayload['labels'] = labels;
|
|
1651
|
+
}
|
|
1652
|
+
if (typeof localizable !== 'undefined') {
|
|
1653
|
+
apiPayload['localizable'] = localizable;
|
|
1654
|
+
}
|
|
1655
|
+
if (typeof position !== 'undefined') {
|
|
1656
|
+
apiPayload['position'] = position;
|
|
1657
|
+
}
|
|
1658
|
+
if (typeof scopable !== 'undefined') {
|
|
1659
|
+
apiPayload['scopable'] = scopable;
|
|
1660
|
+
}
|
|
1661
|
+
if (typeof type !== 'undefined') {
|
|
1662
|
+
apiPayload['type'] = type;
|
|
1663
|
+
}
|
|
1664
|
+
if (typeof usableInGrid !== 'undefined') {
|
|
1665
|
+
apiPayload['usable_in_grid'] = usableInGrid;
|
|
1666
|
+
}
|
|
1667
|
+
if (typeof validation !== 'undefined') {
|
|
1668
|
+
apiPayload['validation'] = validation;
|
|
1669
|
+
}
|
|
1054
1670
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1055
1671
|
|
|
1056
1672
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1061,7 +1677,7 @@ export class Products {
|
|
|
1061
1677
|
'post',
|
|
1062
1678
|
uri,
|
|
1063
1679
|
apiHeaders,
|
|
1064
|
-
|
|
1680
|
+
apiPayload
|
|
1065
1681
|
);
|
|
1066
1682
|
}
|
|
1067
1683
|
|
|
@@ -1100,7 +1716,7 @@ export class Products {
|
|
|
1100
1716
|
}
|
|
1101
1717
|
|
|
1102
1718
|
const apiPath = '/v1/products/attributes/{id}'.replace('{id}', id);
|
|
1103
|
-
const
|
|
1719
|
+
const apiPayload: Payload = {};
|
|
1104
1720
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1105
1721
|
|
|
1106
1722
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1110,7 +1726,7 @@ export class Products {
|
|
|
1110
1726
|
'delete',
|
|
1111
1727
|
uri,
|
|
1112
1728
|
apiHeaders,
|
|
1113
|
-
|
|
1729
|
+
apiPayload
|
|
1114
1730
|
);
|
|
1115
1731
|
}
|
|
1116
1732
|
|
|
@@ -1149,7 +1765,7 @@ export class Products {
|
|
|
1149
1765
|
}
|
|
1150
1766
|
|
|
1151
1767
|
const apiPath = '/v1/products/attributes/{id}'.replace('{id}', id);
|
|
1152
|
-
const
|
|
1768
|
+
const apiPayload: Payload = {};
|
|
1153
1769
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1154
1770
|
|
|
1155
1771
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1159,46 +1775,145 @@ export class Products {
|
|
|
1159
1775
|
'get',
|
|
1160
1776
|
uri,
|
|
1161
1777
|
apiHeaders,
|
|
1162
|
-
|
|
1778
|
+
apiPayload
|
|
1163
1779
|
);
|
|
1164
1780
|
}
|
|
1165
1781
|
|
|
1166
1782
|
/**
|
|
1167
1783
|
*
|
|
1168
1784
|
* @param {string} params.id -
|
|
1785
|
+
* @param {string} params.code -
|
|
1786
|
+
* @param {object} params.config -
|
|
1787
|
+
* @param {string} params.entityRef -
|
|
1788
|
+
* @param {string} params.entityType -
|
|
1789
|
+
* @param {string} params.groupId -
|
|
1790
|
+
* @param {boolean} params.isFilterable -
|
|
1791
|
+
* @param {boolean} params.isUnique -
|
|
1792
|
+
* @param {object} params.labels -
|
|
1793
|
+
* @param {boolean} params.localizable -
|
|
1794
|
+
* @param {number} params.position -
|
|
1795
|
+
* @param {boolean} params.scopable -
|
|
1796
|
+
* @param {string} params.type -
|
|
1797
|
+
* @param {boolean} params.usableInGrid -
|
|
1798
|
+
* @param {object} params.validation -
|
|
1169
1799
|
* @throws {RevenexxException}
|
|
1170
1800
|
* @returns {Promise<Models.Attributes>}
|
|
1171
1801
|
*/
|
|
1172
|
-
productsAttributesUpdate(params: { id: string }): Promise<Models.Attributes>;
|
|
1802
|
+
productsAttributesUpdate(params: { id: string, code?: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, type?: string, usableInGrid?: boolean, validation?: object }): Promise<Models.Attributes>;
|
|
1173
1803
|
/**
|
|
1174
1804
|
*
|
|
1175
1805
|
* @param {string} id -
|
|
1806
|
+
* @param {string} code -
|
|
1807
|
+
* @param {object} config -
|
|
1808
|
+
* @param {string} entityRef -
|
|
1809
|
+
* @param {string} entityType -
|
|
1810
|
+
* @param {string} groupId -
|
|
1811
|
+
* @param {boolean} isFilterable -
|
|
1812
|
+
* @param {boolean} isUnique -
|
|
1813
|
+
* @param {object} labels -
|
|
1814
|
+
* @param {boolean} localizable -
|
|
1815
|
+
* @param {number} position -
|
|
1816
|
+
* @param {boolean} scopable -
|
|
1817
|
+
* @param {string} type -
|
|
1818
|
+
* @param {boolean} usableInGrid -
|
|
1819
|
+
* @param {object} validation -
|
|
1176
1820
|
* @throws {RevenexxException}
|
|
1177
1821
|
* @returns {Promise<Models.Attributes>}
|
|
1178
1822
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1179
1823
|
*/
|
|
1180
|
-
productsAttributesUpdate(id: string): Promise<Models.Attributes>;
|
|
1824
|
+
productsAttributesUpdate(id: string, code?: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, type?: string, usableInGrid?: boolean, validation?: object): Promise<Models.Attributes>;
|
|
1181
1825
|
productsAttributesUpdate(
|
|
1182
|
-
paramsOrFirst: { id: string } | string
|
|
1826
|
+
paramsOrFirst: { id: string, code?: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, type?: string, usableInGrid?: boolean, validation?: object } | string,
|
|
1827
|
+
...rest: [(string)?, (object)?, (string)?, (string)?, (string)?, (boolean)?, (boolean)?, (object)?, (boolean)?, (number)?, (boolean)?, (string)?, (boolean)?, (object)?]
|
|
1183
1828
|
): Promise<Models.Attributes> {
|
|
1184
|
-
let params: { id: string };
|
|
1829
|
+
let params: { id: string, code?: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, type?: string, usableInGrid?: boolean, validation?: object };
|
|
1185
1830
|
|
|
1186
1831
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1187
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
1832
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, config?: object, entityRef?: string, entityType?: string, groupId?: string, isFilterable?: boolean, isUnique?: boolean, labels?: object, localizable?: boolean, position?: number, scopable?: boolean, type?: string, usableInGrid?: boolean, validation?: object };
|
|
1188
1833
|
} else {
|
|
1189
1834
|
params = {
|
|
1190
|
-
id: paramsOrFirst as string
|
|
1835
|
+
id: paramsOrFirst as string,
|
|
1836
|
+
code: rest[0] as string,
|
|
1837
|
+
config: rest[1] as object,
|
|
1838
|
+
entityRef: rest[2] as string,
|
|
1839
|
+
entityType: rest[3] as string,
|
|
1840
|
+
groupId: rest[4] as string,
|
|
1841
|
+
isFilterable: rest[5] as boolean,
|
|
1842
|
+
isUnique: rest[6] as boolean,
|
|
1843
|
+
labels: rest[7] as object,
|
|
1844
|
+
localizable: rest[8] as boolean,
|
|
1845
|
+
position: rest[9] as number,
|
|
1846
|
+
scopable: rest[10] as boolean,
|
|
1847
|
+
type: rest[11] as string,
|
|
1848
|
+
usableInGrid: rest[12] as boolean,
|
|
1849
|
+
validation: rest[13] as object
|
|
1191
1850
|
};
|
|
1192
1851
|
}
|
|
1193
1852
|
|
|
1194
1853
|
const id = params.id;
|
|
1854
|
+
const code = params.code;
|
|
1855
|
+
const config = params.config;
|
|
1856
|
+
const entityRef = params.entityRef;
|
|
1857
|
+
const entityType = params.entityType;
|
|
1858
|
+
const groupId = params.groupId;
|
|
1859
|
+
const isFilterable = params.isFilterable;
|
|
1860
|
+
const isUnique = params.isUnique;
|
|
1861
|
+
const labels = params.labels;
|
|
1862
|
+
const localizable = params.localizable;
|
|
1863
|
+
const position = params.position;
|
|
1864
|
+
const scopable = params.scopable;
|
|
1865
|
+
const type = params.type;
|
|
1866
|
+
const usableInGrid = params.usableInGrid;
|
|
1867
|
+
const validation = params.validation;
|
|
1195
1868
|
|
|
1196
1869
|
if (typeof id === 'undefined') {
|
|
1197
1870
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1198
1871
|
}
|
|
1199
1872
|
|
|
1200
1873
|
const apiPath = '/v1/products/attributes/{id}'.replace('{id}', id);
|
|
1201
|
-
const
|
|
1874
|
+
const apiPayload: Payload = {};
|
|
1875
|
+
if (typeof code !== 'undefined') {
|
|
1876
|
+
apiPayload['code'] = code;
|
|
1877
|
+
}
|
|
1878
|
+
if (typeof config !== 'undefined') {
|
|
1879
|
+
apiPayload['config'] = config;
|
|
1880
|
+
}
|
|
1881
|
+
if (typeof entityRef !== 'undefined') {
|
|
1882
|
+
apiPayload['entity_ref'] = entityRef;
|
|
1883
|
+
}
|
|
1884
|
+
if (typeof entityType !== 'undefined') {
|
|
1885
|
+
apiPayload['entity_type'] = entityType;
|
|
1886
|
+
}
|
|
1887
|
+
if (typeof groupId !== 'undefined') {
|
|
1888
|
+
apiPayload['group_id'] = groupId;
|
|
1889
|
+
}
|
|
1890
|
+
if (typeof isFilterable !== 'undefined') {
|
|
1891
|
+
apiPayload['is_filterable'] = isFilterable;
|
|
1892
|
+
}
|
|
1893
|
+
if (typeof isUnique !== 'undefined') {
|
|
1894
|
+
apiPayload['is_unique'] = isUnique;
|
|
1895
|
+
}
|
|
1896
|
+
if (typeof labels !== 'undefined') {
|
|
1897
|
+
apiPayload['labels'] = labels;
|
|
1898
|
+
}
|
|
1899
|
+
if (typeof localizable !== 'undefined') {
|
|
1900
|
+
apiPayload['localizable'] = localizable;
|
|
1901
|
+
}
|
|
1902
|
+
if (typeof position !== 'undefined') {
|
|
1903
|
+
apiPayload['position'] = position;
|
|
1904
|
+
}
|
|
1905
|
+
if (typeof scopable !== 'undefined') {
|
|
1906
|
+
apiPayload['scopable'] = scopable;
|
|
1907
|
+
}
|
|
1908
|
+
if (typeof type !== 'undefined') {
|
|
1909
|
+
apiPayload['type'] = type;
|
|
1910
|
+
}
|
|
1911
|
+
if (typeof usableInGrid !== 'undefined') {
|
|
1912
|
+
apiPayload['usable_in_grid'] = usableInGrid;
|
|
1913
|
+
}
|
|
1914
|
+
if (typeof validation !== 'undefined') {
|
|
1915
|
+
apiPayload['validation'] = validation;
|
|
1916
|
+
}
|
|
1202
1917
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1203
1918
|
|
|
1204
1919
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1209,7 +1924,7 @@ export class Products {
|
|
|
1209
1924
|
'put',
|
|
1210
1925
|
uri,
|
|
1211
1926
|
apiHeaders,
|
|
1212
|
-
|
|
1927
|
+
apiPayload
|
|
1213
1928
|
);
|
|
1214
1929
|
}
|
|
1215
1930
|
|
|
@@ -1221,7 +1936,7 @@ export class Products {
|
|
|
1221
1936
|
productsCategoriesList(): Promise<{}> {
|
|
1222
1937
|
|
|
1223
1938
|
const apiPath = '/v1/products/categories';
|
|
1224
|
-
const
|
|
1939
|
+
const apiPayload: Payload = {};
|
|
1225
1940
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1226
1941
|
|
|
1227
1942
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1231,19 +1946,85 @@ export class Products {
|
|
|
1231
1946
|
'get',
|
|
1232
1947
|
uri,
|
|
1233
1948
|
apiHeaders,
|
|
1234
|
-
|
|
1949
|
+
apiPayload
|
|
1235
1950
|
);
|
|
1236
1951
|
}
|
|
1237
1952
|
|
|
1238
1953
|
/**
|
|
1239
1954
|
*
|
|
1955
|
+
* @param {string} params.code -
|
|
1956
|
+
* @param {object} params.labels -
|
|
1957
|
+
* @param {string} params.parentId -
|
|
1958
|
+
* @param {string} params.xpath -
|
|
1959
|
+
* @param {number} params.position -
|
|
1960
|
+
* @param {object} params.values -
|
|
1240
1961
|
* @throws {RevenexxException}
|
|
1241
1962
|
* @returns {Promise<Models.Categories>}
|
|
1242
1963
|
*/
|
|
1243
|
-
productsCategoriesCreate(): Promise<Models.Categories
|
|
1964
|
+
productsCategoriesCreate(params: { code: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object }): Promise<Models.Categories>;
|
|
1965
|
+
/**
|
|
1966
|
+
*
|
|
1967
|
+
* @param {string} code -
|
|
1968
|
+
* @param {object} labels -
|
|
1969
|
+
* @param {string} parentId -
|
|
1970
|
+
* @param {string} xpath -
|
|
1971
|
+
* @param {number} position -
|
|
1972
|
+
* @param {object} values -
|
|
1973
|
+
* @throws {RevenexxException}
|
|
1974
|
+
* @returns {Promise<Models.Categories>}
|
|
1975
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1976
|
+
*/
|
|
1977
|
+
productsCategoriesCreate(code: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object): Promise<Models.Categories>;
|
|
1978
|
+
productsCategoriesCreate(
|
|
1979
|
+
paramsOrFirst: { code: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object } | string,
|
|
1980
|
+
...rest: [(object)?, (string)?, (string)?, (number)?, (object)?]
|
|
1981
|
+
): Promise<Models.Categories> {
|
|
1982
|
+
let params: { code: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object };
|
|
1983
|
+
|
|
1984
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1985
|
+
params = (paramsOrFirst || {}) as { code: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object };
|
|
1986
|
+
} else {
|
|
1987
|
+
params = {
|
|
1988
|
+
code: paramsOrFirst as string,
|
|
1989
|
+
labels: rest[0] as object,
|
|
1990
|
+
parentId: rest[1] as string,
|
|
1991
|
+
xpath: rest[2] as string,
|
|
1992
|
+
position: rest[3] as number,
|
|
1993
|
+
values: rest[4] as object
|
|
1994
|
+
};
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
const code = params.code;
|
|
1998
|
+
const labels = params.labels;
|
|
1999
|
+
const parentId = params.parentId;
|
|
2000
|
+
const xpath = params.xpath;
|
|
2001
|
+
const position = params.position;
|
|
2002
|
+
const values = params.values;
|
|
2003
|
+
|
|
2004
|
+
if (typeof code === 'undefined') {
|
|
2005
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
2006
|
+
}
|
|
1244
2007
|
|
|
1245
2008
|
const apiPath = '/v1/products/categories';
|
|
1246
|
-
const
|
|
2009
|
+
const apiPayload: Payload = {};
|
|
2010
|
+
if (typeof code !== 'undefined') {
|
|
2011
|
+
apiPayload['code'] = code;
|
|
2012
|
+
}
|
|
2013
|
+
if (typeof labels !== 'undefined') {
|
|
2014
|
+
apiPayload['labels'] = labels;
|
|
2015
|
+
}
|
|
2016
|
+
if (typeof parentId !== 'undefined') {
|
|
2017
|
+
apiPayload['parent_id'] = parentId;
|
|
2018
|
+
}
|
|
2019
|
+
if (typeof xpath !== 'undefined') {
|
|
2020
|
+
apiPayload['path'] = xpath;
|
|
2021
|
+
}
|
|
2022
|
+
if (typeof position !== 'undefined') {
|
|
2023
|
+
apiPayload['position'] = position;
|
|
2024
|
+
}
|
|
2025
|
+
if (typeof values !== 'undefined') {
|
|
2026
|
+
apiPayload['values'] = values;
|
|
2027
|
+
}
|
|
1247
2028
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1248
2029
|
|
|
1249
2030
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1254,7 +2035,7 @@ export class Products {
|
|
|
1254
2035
|
'post',
|
|
1255
2036
|
uri,
|
|
1256
2037
|
apiHeaders,
|
|
1257
|
-
|
|
2038
|
+
apiPayload
|
|
1258
2039
|
);
|
|
1259
2040
|
}
|
|
1260
2041
|
|
|
@@ -1293,7 +2074,7 @@ export class Products {
|
|
|
1293
2074
|
}
|
|
1294
2075
|
|
|
1295
2076
|
const apiPath = '/v1/products/categories/{id}'.replace('{id}', id);
|
|
1296
|
-
const
|
|
2077
|
+
const apiPayload: Payload = {};
|
|
1297
2078
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1298
2079
|
|
|
1299
2080
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1303,7 +2084,7 @@ export class Products {
|
|
|
1303
2084
|
'delete',
|
|
1304
2085
|
uri,
|
|
1305
2086
|
apiHeaders,
|
|
1306
|
-
|
|
2087
|
+
apiPayload
|
|
1307
2088
|
);
|
|
1308
2089
|
}
|
|
1309
2090
|
|
|
@@ -1342,7 +2123,7 @@ export class Products {
|
|
|
1342
2123
|
}
|
|
1343
2124
|
|
|
1344
2125
|
const apiPath = '/v1/products/categories/{id}'.replace('{id}', id);
|
|
1345
|
-
const
|
|
2126
|
+
const apiPayload: Payload = {};
|
|
1346
2127
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1347
2128
|
|
|
1348
2129
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1352,46 +2133,89 @@ export class Products {
|
|
|
1352
2133
|
'get',
|
|
1353
2134
|
uri,
|
|
1354
2135
|
apiHeaders,
|
|
1355
|
-
|
|
2136
|
+
apiPayload
|
|
1356
2137
|
);
|
|
1357
2138
|
}
|
|
1358
2139
|
|
|
1359
2140
|
/**
|
|
1360
2141
|
*
|
|
1361
2142
|
* @param {string} params.id -
|
|
2143
|
+
* @param {string} params.code -
|
|
2144
|
+
* @param {object} params.labels -
|
|
2145
|
+
* @param {string} params.parentId -
|
|
2146
|
+
* @param {string} params.xpath -
|
|
2147
|
+
* @param {number} params.position -
|
|
2148
|
+
* @param {object} params.values -
|
|
1362
2149
|
* @throws {RevenexxException}
|
|
1363
2150
|
* @returns {Promise<Models.Categories>}
|
|
1364
2151
|
*/
|
|
1365
|
-
productsCategoriesUpdate(params: { id: string }): Promise<Models.Categories>;
|
|
2152
|
+
productsCategoriesUpdate(params: { id: string, code?: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object }): Promise<Models.Categories>;
|
|
1366
2153
|
/**
|
|
1367
2154
|
*
|
|
1368
2155
|
* @param {string} id -
|
|
2156
|
+
* @param {string} code -
|
|
2157
|
+
* @param {object} labels -
|
|
2158
|
+
* @param {string} parentId -
|
|
2159
|
+
* @param {string} xpath -
|
|
2160
|
+
* @param {number} position -
|
|
2161
|
+
* @param {object} values -
|
|
1369
2162
|
* @throws {RevenexxException}
|
|
1370
2163
|
* @returns {Promise<Models.Categories>}
|
|
1371
2164
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1372
2165
|
*/
|
|
1373
|
-
productsCategoriesUpdate(id: string): Promise<Models.Categories>;
|
|
2166
|
+
productsCategoriesUpdate(id: string, code?: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object): Promise<Models.Categories>;
|
|
1374
2167
|
productsCategoriesUpdate(
|
|
1375
|
-
paramsOrFirst: { id: string } | string
|
|
2168
|
+
paramsOrFirst: { id: string, code?: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object } | string,
|
|
2169
|
+
...rest: [(string)?, (object)?, (string)?, (string)?, (number)?, (object)?]
|
|
1376
2170
|
): Promise<Models.Categories> {
|
|
1377
|
-
let params: { id: string };
|
|
2171
|
+
let params: { id: string, code?: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object };
|
|
1378
2172
|
|
|
1379
2173
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1380
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
2174
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, labels?: object, parentId?: string, xpath?: string, position?: number, values?: object };
|
|
1381
2175
|
} else {
|
|
1382
2176
|
params = {
|
|
1383
|
-
id: paramsOrFirst as string
|
|
2177
|
+
id: paramsOrFirst as string,
|
|
2178
|
+
code: rest[0] as string,
|
|
2179
|
+
labels: rest[1] as object,
|
|
2180
|
+
parentId: rest[2] as string,
|
|
2181
|
+
xpath: rest[3] as string,
|
|
2182
|
+
position: rest[4] as number,
|
|
2183
|
+
values: rest[5] as object
|
|
1384
2184
|
};
|
|
1385
2185
|
}
|
|
1386
2186
|
|
|
1387
2187
|
const id = params.id;
|
|
2188
|
+
const code = params.code;
|
|
2189
|
+
const labels = params.labels;
|
|
2190
|
+
const parentId = params.parentId;
|
|
2191
|
+
const xpath = params.xpath;
|
|
2192
|
+
const position = params.position;
|
|
2193
|
+
const values = params.values;
|
|
1388
2194
|
|
|
1389
2195
|
if (typeof id === 'undefined') {
|
|
1390
2196
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1391
2197
|
}
|
|
1392
2198
|
|
|
1393
2199
|
const apiPath = '/v1/products/categories/{id}'.replace('{id}', id);
|
|
1394
|
-
const
|
|
2200
|
+
const apiPayload: Payload = {};
|
|
2201
|
+
if (typeof code !== 'undefined') {
|
|
2202
|
+
apiPayload['code'] = code;
|
|
2203
|
+
}
|
|
2204
|
+
if (typeof labels !== 'undefined') {
|
|
2205
|
+
apiPayload['labels'] = labels;
|
|
2206
|
+
}
|
|
2207
|
+
if (typeof parentId !== 'undefined') {
|
|
2208
|
+
apiPayload['parent_id'] = parentId;
|
|
2209
|
+
}
|
|
2210
|
+
if (typeof xpath !== 'undefined') {
|
|
2211
|
+
apiPayload['path'] = xpath;
|
|
2212
|
+
}
|
|
2213
|
+
if (typeof position !== 'undefined') {
|
|
2214
|
+
apiPayload['position'] = position;
|
|
2215
|
+
}
|
|
2216
|
+
if (typeof values !== 'undefined') {
|
|
2217
|
+
apiPayload['values'] = values;
|
|
2218
|
+
}
|
|
1395
2219
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1396
2220
|
|
|
1397
2221
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1402,7 +2226,7 @@ export class Products {
|
|
|
1402
2226
|
'put',
|
|
1403
2227
|
uri,
|
|
1404
2228
|
apiHeaders,
|
|
1405
|
-
|
|
2229
|
+
apiPayload
|
|
1406
2230
|
);
|
|
1407
2231
|
}
|
|
1408
2232
|
|
|
@@ -1414,7 +2238,7 @@ export class Products {
|
|
|
1414
2238
|
productsFamiliesList(): Promise<{}> {
|
|
1415
2239
|
|
|
1416
2240
|
const apiPath = '/v1/products/families';
|
|
1417
|
-
const
|
|
2241
|
+
const apiPayload: Payload = {};
|
|
1418
2242
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1419
2243
|
|
|
1420
2244
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1424,19 +2248,71 @@ export class Products {
|
|
|
1424
2248
|
'get',
|
|
1425
2249
|
uri,
|
|
1426
2250
|
apiHeaders,
|
|
1427
|
-
|
|
2251
|
+
apiPayload
|
|
1428
2252
|
);
|
|
1429
2253
|
}
|
|
1430
2254
|
|
|
1431
2255
|
/**
|
|
1432
2256
|
*
|
|
2257
|
+
* @param {string} params.code -
|
|
2258
|
+
* @param {string} params.imageAttribute -
|
|
2259
|
+
* @param {string} params.labelAttribute -
|
|
2260
|
+
* @param {object} params.labels -
|
|
1433
2261
|
* @throws {RevenexxException}
|
|
1434
2262
|
* @returns {Promise<Models.Families>}
|
|
1435
2263
|
*/
|
|
1436
|
-
productsFamiliesCreate(): Promise<Models.Families
|
|
2264
|
+
productsFamiliesCreate(params: { code: string, imageAttribute?: string, labelAttribute?: string, labels?: object }): Promise<Models.Families>;
|
|
2265
|
+
/**
|
|
2266
|
+
*
|
|
2267
|
+
* @param {string} code -
|
|
2268
|
+
* @param {string} imageAttribute -
|
|
2269
|
+
* @param {string} labelAttribute -
|
|
2270
|
+
* @param {object} labels -
|
|
2271
|
+
* @throws {RevenexxException}
|
|
2272
|
+
* @returns {Promise<Models.Families>}
|
|
2273
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2274
|
+
*/
|
|
2275
|
+
productsFamiliesCreate(code: string, imageAttribute?: string, labelAttribute?: string, labels?: object): Promise<Models.Families>;
|
|
2276
|
+
productsFamiliesCreate(
|
|
2277
|
+
paramsOrFirst: { code: string, imageAttribute?: string, labelAttribute?: string, labels?: object } | string,
|
|
2278
|
+
...rest: [(string)?, (string)?, (object)?]
|
|
2279
|
+
): Promise<Models.Families> {
|
|
2280
|
+
let params: { code: string, imageAttribute?: string, labelAttribute?: string, labels?: object };
|
|
2281
|
+
|
|
2282
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2283
|
+
params = (paramsOrFirst || {}) as { code: string, imageAttribute?: string, labelAttribute?: string, labels?: object };
|
|
2284
|
+
} else {
|
|
2285
|
+
params = {
|
|
2286
|
+
code: paramsOrFirst as string,
|
|
2287
|
+
imageAttribute: rest[0] as string,
|
|
2288
|
+
labelAttribute: rest[1] as string,
|
|
2289
|
+
labels: rest[2] as object
|
|
2290
|
+
};
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
const code = params.code;
|
|
2294
|
+
const imageAttribute = params.imageAttribute;
|
|
2295
|
+
const labelAttribute = params.labelAttribute;
|
|
2296
|
+
const labels = params.labels;
|
|
2297
|
+
|
|
2298
|
+
if (typeof code === 'undefined') {
|
|
2299
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
2300
|
+
}
|
|
1437
2301
|
|
|
1438
2302
|
const apiPath = '/v1/products/families';
|
|
1439
|
-
const
|
|
2303
|
+
const apiPayload: Payload = {};
|
|
2304
|
+
if (typeof code !== 'undefined') {
|
|
2305
|
+
apiPayload['code'] = code;
|
|
2306
|
+
}
|
|
2307
|
+
if (typeof imageAttribute !== 'undefined') {
|
|
2308
|
+
apiPayload['image_attribute'] = imageAttribute;
|
|
2309
|
+
}
|
|
2310
|
+
if (typeof labelAttribute !== 'undefined') {
|
|
2311
|
+
apiPayload['label_attribute'] = labelAttribute;
|
|
2312
|
+
}
|
|
2313
|
+
if (typeof labels !== 'undefined') {
|
|
2314
|
+
apiPayload['labels'] = labels;
|
|
2315
|
+
}
|
|
1440
2316
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1441
2317
|
|
|
1442
2318
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1447,7 +2323,7 @@ export class Products {
|
|
|
1447
2323
|
'post',
|
|
1448
2324
|
uri,
|
|
1449
2325
|
apiHeaders,
|
|
1450
|
-
|
|
2326
|
+
apiPayload
|
|
1451
2327
|
);
|
|
1452
2328
|
}
|
|
1453
2329
|
|
|
@@ -1486,7 +2362,7 @@ export class Products {
|
|
|
1486
2362
|
}
|
|
1487
2363
|
|
|
1488
2364
|
const apiPath = '/v1/products/families/{id}'.replace('{id}', id);
|
|
1489
|
-
const
|
|
2365
|
+
const apiPayload: Payload = {};
|
|
1490
2366
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1491
2367
|
|
|
1492
2368
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1496,7 +2372,7 @@ export class Products {
|
|
|
1496
2372
|
'delete',
|
|
1497
2373
|
uri,
|
|
1498
2374
|
apiHeaders,
|
|
1499
|
-
|
|
2375
|
+
apiPayload
|
|
1500
2376
|
);
|
|
1501
2377
|
}
|
|
1502
2378
|
|
|
@@ -1535,7 +2411,7 @@ export class Products {
|
|
|
1535
2411
|
}
|
|
1536
2412
|
|
|
1537
2413
|
const apiPath = '/v1/products/families/{id}'.replace('{id}', id);
|
|
1538
|
-
const
|
|
2414
|
+
const apiPayload: Payload = {};
|
|
1539
2415
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1540
2416
|
|
|
1541
2417
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1545,46 +2421,75 @@ export class Products {
|
|
|
1545
2421
|
'get',
|
|
1546
2422
|
uri,
|
|
1547
2423
|
apiHeaders,
|
|
1548
|
-
|
|
2424
|
+
apiPayload
|
|
1549
2425
|
);
|
|
1550
2426
|
}
|
|
1551
2427
|
|
|
1552
2428
|
/**
|
|
1553
2429
|
*
|
|
1554
2430
|
* @param {string} params.id -
|
|
2431
|
+
* @param {string} params.code -
|
|
2432
|
+
* @param {string} params.imageAttribute -
|
|
2433
|
+
* @param {string} params.labelAttribute -
|
|
2434
|
+
* @param {object} params.labels -
|
|
1555
2435
|
* @throws {RevenexxException}
|
|
1556
2436
|
* @returns {Promise<Models.Families>}
|
|
1557
2437
|
*/
|
|
1558
|
-
productsFamiliesUpdate(params: { id: string }): Promise<Models.Families>;
|
|
2438
|
+
productsFamiliesUpdate(params: { id: string, code?: string, imageAttribute?: string, labelAttribute?: string, labels?: object }): Promise<Models.Families>;
|
|
1559
2439
|
/**
|
|
1560
2440
|
*
|
|
1561
2441
|
* @param {string} id -
|
|
2442
|
+
* @param {string} code -
|
|
2443
|
+
* @param {string} imageAttribute -
|
|
2444
|
+
* @param {string} labelAttribute -
|
|
2445
|
+
* @param {object} labels -
|
|
1562
2446
|
* @throws {RevenexxException}
|
|
1563
2447
|
* @returns {Promise<Models.Families>}
|
|
1564
2448
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1565
2449
|
*/
|
|
1566
|
-
productsFamiliesUpdate(id: string): Promise<Models.Families>;
|
|
2450
|
+
productsFamiliesUpdate(id: string, code?: string, imageAttribute?: string, labelAttribute?: string, labels?: object): Promise<Models.Families>;
|
|
1567
2451
|
productsFamiliesUpdate(
|
|
1568
|
-
paramsOrFirst: { id: string } | string
|
|
2452
|
+
paramsOrFirst: { id: string, code?: string, imageAttribute?: string, labelAttribute?: string, labels?: object } | string,
|
|
2453
|
+
...rest: [(string)?, (string)?, (string)?, (object)?]
|
|
1569
2454
|
): Promise<Models.Families> {
|
|
1570
|
-
let params: { id: string };
|
|
2455
|
+
let params: { id: string, code?: string, imageAttribute?: string, labelAttribute?: string, labels?: object };
|
|
1571
2456
|
|
|
1572
2457
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1573
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
2458
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, imageAttribute?: string, labelAttribute?: string, labels?: object };
|
|
1574
2459
|
} else {
|
|
1575
2460
|
params = {
|
|
1576
|
-
id: paramsOrFirst as string
|
|
2461
|
+
id: paramsOrFirst as string,
|
|
2462
|
+
code: rest[0] as string,
|
|
2463
|
+
imageAttribute: rest[1] as string,
|
|
2464
|
+
labelAttribute: rest[2] as string,
|
|
2465
|
+
labels: rest[3] as object
|
|
1577
2466
|
};
|
|
1578
2467
|
}
|
|
1579
2468
|
|
|
1580
2469
|
const id = params.id;
|
|
2470
|
+
const code = params.code;
|
|
2471
|
+
const imageAttribute = params.imageAttribute;
|
|
2472
|
+
const labelAttribute = params.labelAttribute;
|
|
2473
|
+
const labels = params.labels;
|
|
1581
2474
|
|
|
1582
2475
|
if (typeof id === 'undefined') {
|
|
1583
2476
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1584
2477
|
}
|
|
1585
2478
|
|
|
1586
2479
|
const apiPath = '/v1/products/families/{id}'.replace('{id}', id);
|
|
1587
|
-
const
|
|
2480
|
+
const apiPayload: Payload = {};
|
|
2481
|
+
if (typeof code !== 'undefined') {
|
|
2482
|
+
apiPayload['code'] = code;
|
|
2483
|
+
}
|
|
2484
|
+
if (typeof imageAttribute !== 'undefined') {
|
|
2485
|
+
apiPayload['image_attribute'] = imageAttribute;
|
|
2486
|
+
}
|
|
2487
|
+
if (typeof labelAttribute !== 'undefined') {
|
|
2488
|
+
apiPayload['label_attribute'] = labelAttribute;
|
|
2489
|
+
}
|
|
2490
|
+
if (typeof labels !== 'undefined') {
|
|
2491
|
+
apiPayload['labels'] = labels;
|
|
2492
|
+
}
|
|
1588
2493
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1589
2494
|
|
|
1590
2495
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1595,7 +2500,7 @@ export class Products {
|
|
|
1595
2500
|
'put',
|
|
1596
2501
|
uri,
|
|
1597
2502
|
apiHeaders,
|
|
1598
|
-
|
|
2503
|
+
apiPayload
|
|
1599
2504
|
);
|
|
1600
2505
|
}
|
|
1601
2506
|
|
|
@@ -1607,7 +2512,7 @@ export class Products {
|
|
|
1607
2512
|
productsFamilyAttributesList(): Promise<{}> {
|
|
1608
2513
|
|
|
1609
2514
|
const apiPath = '/v1/products/family_attributes';
|
|
1610
|
-
const
|
|
2515
|
+
const apiPayload: Payload = {};
|
|
1611
2516
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1612
2517
|
|
|
1613
2518
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1617,19 +2522,81 @@ export class Products {
|
|
|
1617
2522
|
'get',
|
|
1618
2523
|
uri,
|
|
1619
2524
|
apiHeaders,
|
|
1620
|
-
|
|
2525
|
+
apiPayload
|
|
1621
2526
|
);
|
|
1622
2527
|
}
|
|
1623
2528
|
|
|
1624
2529
|
/**
|
|
1625
2530
|
*
|
|
2531
|
+
* @param {string} params.attributeId -
|
|
2532
|
+
* @param {string} params.familyId -
|
|
2533
|
+
* @param {boolean} params.isRequired -
|
|
2534
|
+
* @param {number} params.position -
|
|
2535
|
+
* @param {object} params.requiredChannels -
|
|
2536
|
+
* @throws {RevenexxException}
|
|
2537
|
+
* @returns {Promise<Models.FamilyAttributes>}
|
|
2538
|
+
*/
|
|
2539
|
+
productsFamilyAttributesCreate(params: { attributeId: string, familyId: string, isRequired?: boolean, position?: number, requiredChannels?: object }): Promise<Models.FamilyAttributes>;
|
|
2540
|
+
/**
|
|
2541
|
+
*
|
|
2542
|
+
* @param {string} attributeId -
|
|
2543
|
+
* @param {string} familyId -
|
|
2544
|
+
* @param {boolean} isRequired -
|
|
2545
|
+
* @param {number} position -
|
|
2546
|
+
* @param {object} requiredChannels -
|
|
1626
2547
|
* @throws {RevenexxException}
|
|
1627
2548
|
* @returns {Promise<Models.FamilyAttributes>}
|
|
2549
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1628
2550
|
*/
|
|
1629
|
-
productsFamilyAttributesCreate(): Promise<Models.FamilyAttributes
|
|
2551
|
+
productsFamilyAttributesCreate(attributeId: string, familyId: string, isRequired?: boolean, position?: number, requiredChannels?: object): Promise<Models.FamilyAttributes>;
|
|
2552
|
+
productsFamilyAttributesCreate(
|
|
2553
|
+
paramsOrFirst: { attributeId: string, familyId: string, isRequired?: boolean, position?: number, requiredChannels?: object } | string,
|
|
2554
|
+
...rest: [(string)?, (boolean)?, (number)?, (object)?]
|
|
2555
|
+
): Promise<Models.FamilyAttributes> {
|
|
2556
|
+
let params: { attributeId: string, familyId: string, isRequired?: boolean, position?: number, requiredChannels?: object };
|
|
2557
|
+
|
|
2558
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2559
|
+
params = (paramsOrFirst || {}) as { attributeId: string, familyId: string, isRequired?: boolean, position?: number, requiredChannels?: object };
|
|
2560
|
+
} else {
|
|
2561
|
+
params = {
|
|
2562
|
+
attributeId: paramsOrFirst as string,
|
|
2563
|
+
familyId: rest[0] as string,
|
|
2564
|
+
isRequired: rest[1] as boolean,
|
|
2565
|
+
position: rest[2] as number,
|
|
2566
|
+
requiredChannels: rest[3] as object
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
const attributeId = params.attributeId;
|
|
2571
|
+
const familyId = params.familyId;
|
|
2572
|
+
const isRequired = params.isRequired;
|
|
2573
|
+
const position = params.position;
|
|
2574
|
+
const requiredChannels = params.requiredChannels;
|
|
2575
|
+
|
|
2576
|
+
if (typeof attributeId === 'undefined') {
|
|
2577
|
+
throw new RevenexxException('Missing required parameter: "attributeId"');
|
|
2578
|
+
}
|
|
2579
|
+
if (typeof familyId === 'undefined') {
|
|
2580
|
+
throw new RevenexxException('Missing required parameter: "familyId"');
|
|
2581
|
+
}
|
|
1630
2582
|
|
|
1631
2583
|
const apiPath = '/v1/products/family_attributes';
|
|
1632
|
-
const
|
|
2584
|
+
const apiPayload: Payload = {};
|
|
2585
|
+
if (typeof attributeId !== 'undefined') {
|
|
2586
|
+
apiPayload['attribute_id'] = attributeId;
|
|
2587
|
+
}
|
|
2588
|
+
if (typeof familyId !== 'undefined') {
|
|
2589
|
+
apiPayload['family_id'] = familyId;
|
|
2590
|
+
}
|
|
2591
|
+
if (typeof isRequired !== 'undefined') {
|
|
2592
|
+
apiPayload['is_required'] = isRequired;
|
|
2593
|
+
}
|
|
2594
|
+
if (typeof position !== 'undefined') {
|
|
2595
|
+
apiPayload['position'] = position;
|
|
2596
|
+
}
|
|
2597
|
+
if (typeof requiredChannels !== 'undefined') {
|
|
2598
|
+
apiPayload['required_channels'] = requiredChannels;
|
|
2599
|
+
}
|
|
1633
2600
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1634
2601
|
|
|
1635
2602
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1640,7 +2607,7 @@ export class Products {
|
|
|
1640
2607
|
'post',
|
|
1641
2608
|
uri,
|
|
1642
2609
|
apiHeaders,
|
|
1643
|
-
|
|
2610
|
+
apiPayload
|
|
1644
2611
|
);
|
|
1645
2612
|
}
|
|
1646
2613
|
|
|
@@ -1679,7 +2646,7 @@ export class Products {
|
|
|
1679
2646
|
}
|
|
1680
2647
|
|
|
1681
2648
|
const apiPath = '/v1/products/family_attributes/{id}'.replace('{id}', id);
|
|
1682
|
-
const
|
|
2649
|
+
const apiPayload: Payload = {};
|
|
1683
2650
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1684
2651
|
|
|
1685
2652
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1689,7 +2656,7 @@ export class Products {
|
|
|
1689
2656
|
'delete',
|
|
1690
2657
|
uri,
|
|
1691
2658
|
apiHeaders,
|
|
1692
|
-
|
|
2659
|
+
apiPayload
|
|
1693
2660
|
);
|
|
1694
2661
|
}
|
|
1695
2662
|
|
|
@@ -1728,7 +2695,7 @@ export class Products {
|
|
|
1728
2695
|
}
|
|
1729
2696
|
|
|
1730
2697
|
const apiPath = '/v1/products/family_attributes/{id}'.replace('{id}', id);
|
|
1731
|
-
const
|
|
2698
|
+
const apiPayload: Payload = {};
|
|
1732
2699
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1733
2700
|
|
|
1734
2701
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1738,46 +2705,82 @@ export class Products {
|
|
|
1738
2705
|
'get',
|
|
1739
2706
|
uri,
|
|
1740
2707
|
apiHeaders,
|
|
1741
|
-
|
|
2708
|
+
apiPayload
|
|
1742
2709
|
);
|
|
1743
2710
|
}
|
|
1744
2711
|
|
|
1745
2712
|
/**
|
|
1746
2713
|
*
|
|
1747
2714
|
* @param {string} params.id -
|
|
2715
|
+
* @param {string} params.attributeId -
|
|
2716
|
+
* @param {string} params.familyId -
|
|
2717
|
+
* @param {boolean} params.isRequired -
|
|
2718
|
+
* @param {number} params.position -
|
|
2719
|
+
* @param {object} params.requiredChannels -
|
|
1748
2720
|
* @throws {RevenexxException}
|
|
1749
2721
|
* @returns {Promise<Models.FamilyAttributes>}
|
|
1750
2722
|
*/
|
|
1751
|
-
productsFamilyAttributesUpdate(params: { id: string }): Promise<Models.FamilyAttributes>;
|
|
2723
|
+
productsFamilyAttributesUpdate(params: { id: string, attributeId?: string, familyId?: string, isRequired?: boolean, position?: number, requiredChannels?: object }): Promise<Models.FamilyAttributes>;
|
|
1752
2724
|
/**
|
|
1753
2725
|
*
|
|
1754
2726
|
* @param {string} id -
|
|
2727
|
+
* @param {string} attributeId -
|
|
2728
|
+
* @param {string} familyId -
|
|
2729
|
+
* @param {boolean} isRequired -
|
|
2730
|
+
* @param {number} position -
|
|
2731
|
+
* @param {object} requiredChannels -
|
|
1755
2732
|
* @throws {RevenexxException}
|
|
1756
2733
|
* @returns {Promise<Models.FamilyAttributes>}
|
|
1757
2734
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1758
2735
|
*/
|
|
1759
|
-
productsFamilyAttributesUpdate(id: string): Promise<Models.FamilyAttributes>;
|
|
2736
|
+
productsFamilyAttributesUpdate(id: string, attributeId?: string, familyId?: string, isRequired?: boolean, position?: number, requiredChannels?: object): Promise<Models.FamilyAttributes>;
|
|
1760
2737
|
productsFamilyAttributesUpdate(
|
|
1761
|
-
paramsOrFirst: { id: string } | string
|
|
2738
|
+
paramsOrFirst: { id: string, attributeId?: string, familyId?: string, isRequired?: boolean, position?: number, requiredChannels?: object } | string,
|
|
2739
|
+
...rest: [(string)?, (string)?, (boolean)?, (number)?, (object)?]
|
|
1762
2740
|
): Promise<Models.FamilyAttributes> {
|
|
1763
|
-
let params: { id: string };
|
|
2741
|
+
let params: { id: string, attributeId?: string, familyId?: string, isRequired?: boolean, position?: number, requiredChannels?: object };
|
|
1764
2742
|
|
|
1765
2743
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1766
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
2744
|
+
params = (paramsOrFirst || {}) as { id: string, attributeId?: string, familyId?: string, isRequired?: boolean, position?: number, requiredChannels?: object };
|
|
1767
2745
|
} else {
|
|
1768
2746
|
params = {
|
|
1769
|
-
id: paramsOrFirst as string
|
|
2747
|
+
id: paramsOrFirst as string,
|
|
2748
|
+
attributeId: rest[0] as string,
|
|
2749
|
+
familyId: rest[1] as string,
|
|
2750
|
+
isRequired: rest[2] as boolean,
|
|
2751
|
+
position: rest[3] as number,
|
|
2752
|
+
requiredChannels: rest[4] as object
|
|
1770
2753
|
};
|
|
1771
2754
|
}
|
|
1772
2755
|
|
|
1773
2756
|
const id = params.id;
|
|
2757
|
+
const attributeId = params.attributeId;
|
|
2758
|
+
const familyId = params.familyId;
|
|
2759
|
+
const isRequired = params.isRequired;
|
|
2760
|
+
const position = params.position;
|
|
2761
|
+
const requiredChannels = params.requiredChannels;
|
|
1774
2762
|
|
|
1775
2763
|
if (typeof id === 'undefined') {
|
|
1776
2764
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1777
2765
|
}
|
|
1778
2766
|
|
|
1779
2767
|
const apiPath = '/v1/products/family_attributes/{id}'.replace('{id}', id);
|
|
1780
|
-
const
|
|
2768
|
+
const apiPayload: Payload = {};
|
|
2769
|
+
if (typeof attributeId !== 'undefined') {
|
|
2770
|
+
apiPayload['attribute_id'] = attributeId;
|
|
2771
|
+
}
|
|
2772
|
+
if (typeof familyId !== 'undefined') {
|
|
2773
|
+
apiPayload['family_id'] = familyId;
|
|
2774
|
+
}
|
|
2775
|
+
if (typeof isRequired !== 'undefined') {
|
|
2776
|
+
apiPayload['is_required'] = isRequired;
|
|
2777
|
+
}
|
|
2778
|
+
if (typeof position !== 'undefined') {
|
|
2779
|
+
apiPayload['position'] = position;
|
|
2780
|
+
}
|
|
2781
|
+
if (typeof requiredChannels !== 'undefined') {
|
|
2782
|
+
apiPayload['required_channels'] = requiredChannels;
|
|
2783
|
+
}
|
|
1781
2784
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1782
2785
|
|
|
1783
2786
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1788,7 +2791,7 @@ export class Products {
|
|
|
1788
2791
|
'put',
|
|
1789
2792
|
uri,
|
|
1790
2793
|
apiHeaders,
|
|
1791
|
-
|
|
2794
|
+
apiPayload
|
|
1792
2795
|
);
|
|
1793
2796
|
}
|
|
1794
2797
|
|
|
@@ -1800,7 +2803,7 @@ export class Products {
|
|
|
1800
2803
|
productsFamilyVariantsList(): Promise<{}> {
|
|
1801
2804
|
|
|
1802
2805
|
const apiPath = '/v1/products/family_variants';
|
|
1803
|
-
const
|
|
2806
|
+
const apiPayload: Payload = {};
|
|
1804
2807
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1805
2808
|
|
|
1806
2809
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1810,19 +2813,74 @@ export class Products {
|
|
|
1810
2813
|
'get',
|
|
1811
2814
|
uri,
|
|
1812
2815
|
apiHeaders,
|
|
1813
|
-
|
|
2816
|
+
apiPayload
|
|
1814
2817
|
);
|
|
1815
2818
|
}
|
|
1816
2819
|
|
|
1817
2820
|
/**
|
|
1818
2821
|
*
|
|
2822
|
+
* @param {string} params.code -
|
|
2823
|
+
* @param {string} params.familyId -
|
|
2824
|
+
* @param {object} params.axes -
|
|
2825
|
+
* @param {object} params.labels -
|
|
1819
2826
|
* @throws {RevenexxException}
|
|
1820
2827
|
* @returns {Promise<Models.FamilyVariants>}
|
|
1821
2828
|
*/
|
|
1822
|
-
productsFamilyVariantsCreate(): Promise<Models.FamilyVariants
|
|
2829
|
+
productsFamilyVariantsCreate(params: { code: string, familyId: string, axes?: object, labels?: object }): Promise<Models.FamilyVariants>;
|
|
2830
|
+
/**
|
|
2831
|
+
*
|
|
2832
|
+
* @param {string} code -
|
|
2833
|
+
* @param {string} familyId -
|
|
2834
|
+
* @param {object} axes -
|
|
2835
|
+
* @param {object} labels -
|
|
2836
|
+
* @throws {RevenexxException}
|
|
2837
|
+
* @returns {Promise<Models.FamilyVariants>}
|
|
2838
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2839
|
+
*/
|
|
2840
|
+
productsFamilyVariantsCreate(code: string, familyId: string, axes?: object, labels?: object): Promise<Models.FamilyVariants>;
|
|
2841
|
+
productsFamilyVariantsCreate(
|
|
2842
|
+
paramsOrFirst: { code: string, familyId: string, axes?: object, labels?: object } | string,
|
|
2843
|
+
...rest: [(string)?, (object)?, (object)?]
|
|
2844
|
+
): Promise<Models.FamilyVariants> {
|
|
2845
|
+
let params: { code: string, familyId: string, axes?: object, labels?: object };
|
|
2846
|
+
|
|
2847
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2848
|
+
params = (paramsOrFirst || {}) as { code: string, familyId: string, axes?: object, labels?: object };
|
|
2849
|
+
} else {
|
|
2850
|
+
params = {
|
|
2851
|
+
code: paramsOrFirst as string,
|
|
2852
|
+
familyId: rest[0] as string,
|
|
2853
|
+
axes: rest[1] as object,
|
|
2854
|
+
labels: rest[2] as object
|
|
2855
|
+
};
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
const code = params.code;
|
|
2859
|
+
const familyId = params.familyId;
|
|
2860
|
+
const axes = params.axes;
|
|
2861
|
+
const labels = params.labels;
|
|
2862
|
+
|
|
2863
|
+
if (typeof code === 'undefined') {
|
|
2864
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
2865
|
+
}
|
|
2866
|
+
if (typeof familyId === 'undefined') {
|
|
2867
|
+
throw new RevenexxException('Missing required parameter: "familyId"');
|
|
2868
|
+
}
|
|
1823
2869
|
|
|
1824
2870
|
const apiPath = '/v1/products/family_variants';
|
|
1825
|
-
const
|
|
2871
|
+
const apiPayload: Payload = {};
|
|
2872
|
+
if (typeof axes !== 'undefined') {
|
|
2873
|
+
apiPayload['axes'] = axes;
|
|
2874
|
+
}
|
|
2875
|
+
if (typeof code !== 'undefined') {
|
|
2876
|
+
apiPayload['code'] = code;
|
|
2877
|
+
}
|
|
2878
|
+
if (typeof familyId !== 'undefined') {
|
|
2879
|
+
apiPayload['family_id'] = familyId;
|
|
2880
|
+
}
|
|
2881
|
+
if (typeof labels !== 'undefined') {
|
|
2882
|
+
apiPayload['labels'] = labels;
|
|
2883
|
+
}
|
|
1826
2884
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1827
2885
|
|
|
1828
2886
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1833,7 +2891,7 @@ export class Products {
|
|
|
1833
2891
|
'post',
|
|
1834
2892
|
uri,
|
|
1835
2893
|
apiHeaders,
|
|
1836
|
-
|
|
2894
|
+
apiPayload
|
|
1837
2895
|
);
|
|
1838
2896
|
}
|
|
1839
2897
|
|
|
@@ -1872,7 +2930,7 @@ export class Products {
|
|
|
1872
2930
|
}
|
|
1873
2931
|
|
|
1874
2932
|
const apiPath = '/v1/products/family_variants/{id}'.replace('{id}', id);
|
|
1875
|
-
const
|
|
2933
|
+
const apiPayload: Payload = {};
|
|
1876
2934
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1877
2935
|
|
|
1878
2936
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1882,7 +2940,7 @@ export class Products {
|
|
|
1882
2940
|
'delete',
|
|
1883
2941
|
uri,
|
|
1884
2942
|
apiHeaders,
|
|
1885
|
-
|
|
2943
|
+
apiPayload
|
|
1886
2944
|
);
|
|
1887
2945
|
}
|
|
1888
2946
|
|
|
@@ -1921,7 +2979,7 @@ export class Products {
|
|
|
1921
2979
|
}
|
|
1922
2980
|
|
|
1923
2981
|
const apiPath = '/v1/products/family_variants/{id}'.replace('{id}', id);
|
|
1924
|
-
const
|
|
2982
|
+
const apiPayload: Payload = {};
|
|
1925
2983
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1926
2984
|
|
|
1927
2985
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1931,46 +2989,75 @@ export class Products {
|
|
|
1931
2989
|
'get',
|
|
1932
2990
|
uri,
|
|
1933
2991
|
apiHeaders,
|
|
1934
|
-
|
|
2992
|
+
apiPayload
|
|
1935
2993
|
);
|
|
1936
2994
|
}
|
|
1937
2995
|
|
|
1938
2996
|
/**
|
|
1939
2997
|
*
|
|
1940
2998
|
* @param {string} params.id -
|
|
2999
|
+
* @param {object} params.axes -
|
|
3000
|
+
* @param {string} params.code -
|
|
3001
|
+
* @param {string} params.familyId -
|
|
3002
|
+
* @param {object} params.labels -
|
|
1941
3003
|
* @throws {RevenexxException}
|
|
1942
3004
|
* @returns {Promise<Models.FamilyVariants>}
|
|
1943
3005
|
*/
|
|
1944
|
-
productsFamilyVariantsUpdate(params: { id: string }): Promise<Models.FamilyVariants>;
|
|
3006
|
+
productsFamilyVariantsUpdate(params: { id: string, axes?: object, code?: string, familyId?: string, labels?: object }): Promise<Models.FamilyVariants>;
|
|
1945
3007
|
/**
|
|
1946
3008
|
*
|
|
1947
3009
|
* @param {string} id -
|
|
3010
|
+
* @param {object} axes -
|
|
3011
|
+
* @param {string} code -
|
|
3012
|
+
* @param {string} familyId -
|
|
3013
|
+
* @param {object} labels -
|
|
1948
3014
|
* @throws {RevenexxException}
|
|
1949
3015
|
* @returns {Promise<Models.FamilyVariants>}
|
|
1950
3016
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1951
3017
|
*/
|
|
1952
|
-
productsFamilyVariantsUpdate(id: string): Promise<Models.FamilyVariants>;
|
|
3018
|
+
productsFamilyVariantsUpdate(id: string, axes?: object, code?: string, familyId?: string, labels?: object): Promise<Models.FamilyVariants>;
|
|
1953
3019
|
productsFamilyVariantsUpdate(
|
|
1954
|
-
paramsOrFirst: { id: string } | string
|
|
3020
|
+
paramsOrFirst: { id: string, axes?: object, code?: string, familyId?: string, labels?: object } | string,
|
|
3021
|
+
...rest: [(object)?, (string)?, (string)?, (object)?]
|
|
1955
3022
|
): Promise<Models.FamilyVariants> {
|
|
1956
|
-
let params: { id: string };
|
|
3023
|
+
let params: { id: string, axes?: object, code?: string, familyId?: string, labels?: object };
|
|
1957
3024
|
|
|
1958
3025
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1959
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
3026
|
+
params = (paramsOrFirst || {}) as { id: string, axes?: object, code?: string, familyId?: string, labels?: object };
|
|
1960
3027
|
} else {
|
|
1961
3028
|
params = {
|
|
1962
|
-
id: paramsOrFirst as string
|
|
3029
|
+
id: paramsOrFirst as string,
|
|
3030
|
+
axes: rest[0] as object,
|
|
3031
|
+
code: rest[1] as string,
|
|
3032
|
+
familyId: rest[2] as string,
|
|
3033
|
+
labels: rest[3] as object
|
|
1963
3034
|
};
|
|
1964
3035
|
}
|
|
1965
3036
|
|
|
1966
3037
|
const id = params.id;
|
|
3038
|
+
const axes = params.axes;
|
|
3039
|
+
const code = params.code;
|
|
3040
|
+
const familyId = params.familyId;
|
|
3041
|
+
const labels = params.labels;
|
|
1967
3042
|
|
|
1968
3043
|
if (typeof id === 'undefined') {
|
|
1969
3044
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
1970
3045
|
}
|
|
1971
3046
|
|
|
1972
3047
|
const apiPath = '/v1/products/family_variants/{id}'.replace('{id}', id);
|
|
1973
|
-
const
|
|
3048
|
+
const apiPayload: Payload = {};
|
|
3049
|
+
if (typeof axes !== 'undefined') {
|
|
3050
|
+
apiPayload['axes'] = axes;
|
|
3051
|
+
}
|
|
3052
|
+
if (typeof code !== 'undefined') {
|
|
3053
|
+
apiPayload['code'] = code;
|
|
3054
|
+
}
|
|
3055
|
+
if (typeof familyId !== 'undefined') {
|
|
3056
|
+
apiPayload['family_id'] = familyId;
|
|
3057
|
+
}
|
|
3058
|
+
if (typeof labels !== 'undefined') {
|
|
3059
|
+
apiPayload['labels'] = labels;
|
|
3060
|
+
}
|
|
1974
3061
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1975
3062
|
|
|
1976
3063
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -1981,7 +3068,7 @@ export class Products {
|
|
|
1981
3068
|
'put',
|
|
1982
3069
|
uri,
|
|
1983
3070
|
apiHeaders,
|
|
1984
|
-
|
|
3071
|
+
apiPayload
|
|
1985
3072
|
);
|
|
1986
3073
|
}
|
|
1987
3074
|
|
|
@@ -1993,7 +3080,7 @@ export class Products {
|
|
|
1993
3080
|
productsMeasurementFamiliesList(): Promise<{}> {
|
|
1994
3081
|
|
|
1995
3082
|
const apiPath = '/v1/products/measurement_families';
|
|
1996
|
-
const
|
|
3083
|
+
const apiPayload: Payload = {};
|
|
1997
3084
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1998
3085
|
|
|
1999
3086
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2003,19 +3090,74 @@ export class Products {
|
|
|
2003
3090
|
'get',
|
|
2004
3091
|
uri,
|
|
2005
3092
|
apiHeaders,
|
|
2006
|
-
|
|
3093
|
+
apiPayload
|
|
2007
3094
|
);
|
|
2008
3095
|
}
|
|
2009
3096
|
|
|
2010
3097
|
/**
|
|
2011
3098
|
*
|
|
3099
|
+
* @param {string} params.code -
|
|
3100
|
+
* @param {string} params.standardUnit -
|
|
3101
|
+
* @param {object} params.labels -
|
|
3102
|
+
* @param {object} params.units -
|
|
2012
3103
|
* @throws {RevenexxException}
|
|
2013
3104
|
* @returns {Promise<Models.MeasurementFamilies>}
|
|
2014
3105
|
*/
|
|
2015
|
-
productsMeasurementFamiliesCreate(): Promise<Models.MeasurementFamilies
|
|
3106
|
+
productsMeasurementFamiliesCreate(params: { code: string, standardUnit: string, labels?: object, units?: object }): Promise<Models.MeasurementFamilies>;
|
|
3107
|
+
/**
|
|
3108
|
+
*
|
|
3109
|
+
* @param {string} code -
|
|
3110
|
+
* @param {string} standardUnit -
|
|
3111
|
+
* @param {object} labels -
|
|
3112
|
+
* @param {object} units -
|
|
3113
|
+
* @throws {RevenexxException}
|
|
3114
|
+
* @returns {Promise<Models.MeasurementFamilies>}
|
|
3115
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3116
|
+
*/
|
|
3117
|
+
productsMeasurementFamiliesCreate(code: string, standardUnit: string, labels?: object, units?: object): Promise<Models.MeasurementFamilies>;
|
|
3118
|
+
productsMeasurementFamiliesCreate(
|
|
3119
|
+
paramsOrFirst: { code: string, standardUnit: string, labels?: object, units?: object } | string,
|
|
3120
|
+
...rest: [(string)?, (object)?, (object)?]
|
|
3121
|
+
): Promise<Models.MeasurementFamilies> {
|
|
3122
|
+
let params: { code: string, standardUnit: string, labels?: object, units?: object };
|
|
3123
|
+
|
|
3124
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3125
|
+
params = (paramsOrFirst || {}) as { code: string, standardUnit: string, labels?: object, units?: object };
|
|
3126
|
+
} else {
|
|
3127
|
+
params = {
|
|
3128
|
+
code: paramsOrFirst as string,
|
|
3129
|
+
standardUnit: rest[0] as string,
|
|
3130
|
+
labels: rest[1] as object,
|
|
3131
|
+
units: rest[2] as object
|
|
3132
|
+
};
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
const code = params.code;
|
|
3136
|
+
const standardUnit = params.standardUnit;
|
|
3137
|
+
const labels = params.labels;
|
|
3138
|
+
const units = params.units;
|
|
3139
|
+
|
|
3140
|
+
if (typeof code === 'undefined') {
|
|
3141
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
3142
|
+
}
|
|
3143
|
+
if (typeof standardUnit === 'undefined') {
|
|
3144
|
+
throw new RevenexxException('Missing required parameter: "standardUnit"');
|
|
3145
|
+
}
|
|
2016
3146
|
|
|
2017
3147
|
const apiPath = '/v1/products/measurement_families';
|
|
2018
|
-
const
|
|
3148
|
+
const apiPayload: Payload = {};
|
|
3149
|
+
if (typeof code !== 'undefined') {
|
|
3150
|
+
apiPayload['code'] = code;
|
|
3151
|
+
}
|
|
3152
|
+
if (typeof labels !== 'undefined') {
|
|
3153
|
+
apiPayload['labels'] = labels;
|
|
3154
|
+
}
|
|
3155
|
+
if (typeof standardUnit !== 'undefined') {
|
|
3156
|
+
apiPayload['standard_unit'] = standardUnit;
|
|
3157
|
+
}
|
|
3158
|
+
if (typeof units !== 'undefined') {
|
|
3159
|
+
apiPayload['units'] = units;
|
|
3160
|
+
}
|
|
2019
3161
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2020
3162
|
|
|
2021
3163
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2026,7 +3168,7 @@ export class Products {
|
|
|
2026
3168
|
'post',
|
|
2027
3169
|
uri,
|
|
2028
3170
|
apiHeaders,
|
|
2029
|
-
|
|
3171
|
+
apiPayload
|
|
2030
3172
|
);
|
|
2031
3173
|
}
|
|
2032
3174
|
|
|
@@ -2065,7 +3207,7 @@ export class Products {
|
|
|
2065
3207
|
}
|
|
2066
3208
|
|
|
2067
3209
|
const apiPath = '/v1/products/measurement_families/{id}'.replace('{id}', id);
|
|
2068
|
-
const
|
|
3210
|
+
const apiPayload: Payload = {};
|
|
2069
3211
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2070
3212
|
|
|
2071
3213
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2075,7 +3217,7 @@ export class Products {
|
|
|
2075
3217
|
'delete',
|
|
2076
3218
|
uri,
|
|
2077
3219
|
apiHeaders,
|
|
2078
|
-
|
|
3220
|
+
apiPayload
|
|
2079
3221
|
);
|
|
2080
3222
|
}
|
|
2081
3223
|
|
|
@@ -2114,7 +3256,7 @@ export class Products {
|
|
|
2114
3256
|
}
|
|
2115
3257
|
|
|
2116
3258
|
const apiPath = '/v1/products/measurement_families/{id}'.replace('{id}', id);
|
|
2117
|
-
const
|
|
3259
|
+
const apiPayload: Payload = {};
|
|
2118
3260
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2119
3261
|
|
|
2120
3262
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2124,46 +3266,75 @@ export class Products {
|
|
|
2124
3266
|
'get',
|
|
2125
3267
|
uri,
|
|
2126
3268
|
apiHeaders,
|
|
2127
|
-
|
|
3269
|
+
apiPayload
|
|
2128
3270
|
);
|
|
2129
3271
|
}
|
|
2130
3272
|
|
|
2131
3273
|
/**
|
|
2132
3274
|
*
|
|
2133
3275
|
* @param {string} params.id -
|
|
3276
|
+
* @param {string} params.code -
|
|
3277
|
+
* @param {object} params.labels -
|
|
3278
|
+
* @param {string} params.standardUnit -
|
|
3279
|
+
* @param {object} params.units -
|
|
2134
3280
|
* @throws {RevenexxException}
|
|
2135
3281
|
* @returns {Promise<Models.MeasurementFamilies>}
|
|
2136
3282
|
*/
|
|
2137
|
-
productsMeasurementFamiliesUpdate(params: { id: string }): Promise<Models.MeasurementFamilies>;
|
|
3283
|
+
productsMeasurementFamiliesUpdate(params: { id: string, code?: string, labels?: object, standardUnit?: string, units?: object }): Promise<Models.MeasurementFamilies>;
|
|
2138
3284
|
/**
|
|
2139
3285
|
*
|
|
2140
3286
|
* @param {string} id -
|
|
3287
|
+
* @param {string} code -
|
|
3288
|
+
* @param {object} labels -
|
|
3289
|
+
* @param {string} standardUnit -
|
|
3290
|
+
* @param {object} units -
|
|
2141
3291
|
* @throws {RevenexxException}
|
|
2142
3292
|
* @returns {Promise<Models.MeasurementFamilies>}
|
|
2143
3293
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2144
3294
|
*/
|
|
2145
|
-
productsMeasurementFamiliesUpdate(id: string): Promise<Models.MeasurementFamilies>;
|
|
3295
|
+
productsMeasurementFamiliesUpdate(id: string, code?: string, labels?: object, standardUnit?: string, units?: object): Promise<Models.MeasurementFamilies>;
|
|
2146
3296
|
productsMeasurementFamiliesUpdate(
|
|
2147
|
-
paramsOrFirst: { id: string } | string
|
|
3297
|
+
paramsOrFirst: { id: string, code?: string, labels?: object, standardUnit?: string, units?: object } | string,
|
|
3298
|
+
...rest: [(string)?, (object)?, (string)?, (object)?]
|
|
2148
3299
|
): Promise<Models.MeasurementFamilies> {
|
|
2149
|
-
let params: { id: string };
|
|
3300
|
+
let params: { id: string, code?: string, labels?: object, standardUnit?: string, units?: object };
|
|
2150
3301
|
|
|
2151
3302
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2152
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
3303
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, labels?: object, standardUnit?: string, units?: object };
|
|
2153
3304
|
} else {
|
|
2154
3305
|
params = {
|
|
2155
|
-
id: paramsOrFirst as string
|
|
3306
|
+
id: paramsOrFirst as string,
|
|
3307
|
+
code: rest[0] as string,
|
|
3308
|
+
labels: rest[1] as object,
|
|
3309
|
+
standardUnit: rest[2] as string,
|
|
3310
|
+
units: rest[3] as object
|
|
2156
3311
|
};
|
|
2157
3312
|
}
|
|
2158
3313
|
|
|
2159
3314
|
const id = params.id;
|
|
3315
|
+
const code = params.code;
|
|
3316
|
+
const labels = params.labels;
|
|
3317
|
+
const standardUnit = params.standardUnit;
|
|
3318
|
+
const units = params.units;
|
|
2160
3319
|
|
|
2161
3320
|
if (typeof id === 'undefined') {
|
|
2162
3321
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
2163
3322
|
}
|
|
2164
3323
|
|
|
2165
3324
|
const apiPath = '/v1/products/measurement_families/{id}'.replace('{id}', id);
|
|
2166
|
-
const
|
|
3325
|
+
const apiPayload: Payload = {};
|
|
3326
|
+
if (typeof code !== 'undefined') {
|
|
3327
|
+
apiPayload['code'] = code;
|
|
3328
|
+
}
|
|
3329
|
+
if (typeof labels !== 'undefined') {
|
|
3330
|
+
apiPayload['labels'] = labels;
|
|
3331
|
+
}
|
|
3332
|
+
if (typeof standardUnit !== 'undefined') {
|
|
3333
|
+
apiPayload['standard_unit'] = standardUnit;
|
|
3334
|
+
}
|
|
3335
|
+
if (typeof units !== 'undefined') {
|
|
3336
|
+
apiPayload['units'] = units;
|
|
3337
|
+
}
|
|
2167
3338
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2168
3339
|
|
|
2169
3340
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2174,7 +3345,7 @@ export class Products {
|
|
|
2174
3345
|
'put',
|
|
2175
3346
|
uri,
|
|
2176
3347
|
apiHeaders,
|
|
2177
|
-
|
|
3348
|
+
apiPayload
|
|
2178
3349
|
);
|
|
2179
3350
|
}
|
|
2180
3351
|
|
|
@@ -2186,7 +3357,7 @@ export class Products {
|
|
|
2186
3357
|
productsProductAssociationsList(): Promise<{}> {
|
|
2187
3358
|
|
|
2188
3359
|
const apiPath = '/v1/products/product_associations';
|
|
2189
|
-
const
|
|
3360
|
+
const apiPayload: Payload = {};
|
|
2190
3361
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2191
3362
|
|
|
2192
3363
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2196,19 +3367,84 @@ export class Products {
|
|
|
2196
3367
|
'get',
|
|
2197
3368
|
uri,
|
|
2198
3369
|
apiHeaders,
|
|
2199
|
-
|
|
3370
|
+
apiPayload
|
|
2200
3371
|
);
|
|
2201
3372
|
}
|
|
2202
3373
|
|
|
2203
3374
|
/**
|
|
2204
3375
|
*
|
|
3376
|
+
* @param {string} params.associationTypeId -
|
|
3377
|
+
* @param {string} params.productId -
|
|
3378
|
+
* @param {string} params.targetProductId -
|
|
3379
|
+
* @param {number} params.position -
|
|
3380
|
+
* @param {number} params.quantity -
|
|
2205
3381
|
* @throws {RevenexxException}
|
|
2206
3382
|
* @returns {Promise<Models.ProductAssociations>}
|
|
2207
3383
|
*/
|
|
2208
|
-
productsProductAssociationsCreate(): Promise<Models.ProductAssociations
|
|
3384
|
+
productsProductAssociationsCreate(params: { associationTypeId: string, productId: string, targetProductId: string, position?: number, quantity?: number }): Promise<Models.ProductAssociations>;
|
|
3385
|
+
/**
|
|
3386
|
+
*
|
|
3387
|
+
* @param {string} associationTypeId -
|
|
3388
|
+
* @param {string} productId -
|
|
3389
|
+
* @param {string} targetProductId -
|
|
3390
|
+
* @param {number} position -
|
|
3391
|
+
* @param {number} quantity -
|
|
3392
|
+
* @throws {RevenexxException}
|
|
3393
|
+
* @returns {Promise<Models.ProductAssociations>}
|
|
3394
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3395
|
+
*/
|
|
3396
|
+
productsProductAssociationsCreate(associationTypeId: string, productId: string, targetProductId: string, position?: number, quantity?: number): Promise<Models.ProductAssociations>;
|
|
3397
|
+
productsProductAssociationsCreate(
|
|
3398
|
+
paramsOrFirst: { associationTypeId: string, productId: string, targetProductId: string, position?: number, quantity?: number } | string,
|
|
3399
|
+
...rest: [(string)?, (string)?, (number)?, (number)?]
|
|
3400
|
+
): Promise<Models.ProductAssociations> {
|
|
3401
|
+
let params: { associationTypeId: string, productId: string, targetProductId: string, position?: number, quantity?: number };
|
|
3402
|
+
|
|
3403
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3404
|
+
params = (paramsOrFirst || {}) as { associationTypeId: string, productId: string, targetProductId: string, position?: number, quantity?: number };
|
|
3405
|
+
} else {
|
|
3406
|
+
params = {
|
|
3407
|
+
associationTypeId: paramsOrFirst as string,
|
|
3408
|
+
productId: rest[0] as string,
|
|
3409
|
+
targetProductId: rest[1] as string,
|
|
3410
|
+
position: rest[2] as number,
|
|
3411
|
+
quantity: rest[3] as number
|
|
3412
|
+
};
|
|
3413
|
+
}
|
|
3414
|
+
|
|
3415
|
+
const associationTypeId = params.associationTypeId;
|
|
3416
|
+
const productId = params.productId;
|
|
3417
|
+
const targetProductId = params.targetProductId;
|
|
3418
|
+
const position = params.position;
|
|
3419
|
+
const quantity = params.quantity;
|
|
3420
|
+
|
|
3421
|
+
if (typeof associationTypeId === 'undefined') {
|
|
3422
|
+
throw new RevenexxException('Missing required parameter: "associationTypeId"');
|
|
3423
|
+
}
|
|
3424
|
+
if (typeof productId === 'undefined') {
|
|
3425
|
+
throw new RevenexxException('Missing required parameter: "productId"');
|
|
3426
|
+
}
|
|
3427
|
+
if (typeof targetProductId === 'undefined') {
|
|
3428
|
+
throw new RevenexxException('Missing required parameter: "targetProductId"');
|
|
3429
|
+
}
|
|
2209
3430
|
|
|
2210
3431
|
const apiPath = '/v1/products/product_associations';
|
|
2211
|
-
const
|
|
3432
|
+
const apiPayload: Payload = {};
|
|
3433
|
+
if (typeof associationTypeId !== 'undefined') {
|
|
3434
|
+
apiPayload['association_type_id'] = associationTypeId;
|
|
3435
|
+
}
|
|
3436
|
+
if (typeof position !== 'undefined') {
|
|
3437
|
+
apiPayload['position'] = position;
|
|
3438
|
+
}
|
|
3439
|
+
if (typeof productId !== 'undefined') {
|
|
3440
|
+
apiPayload['product_id'] = productId;
|
|
3441
|
+
}
|
|
3442
|
+
if (typeof quantity !== 'undefined') {
|
|
3443
|
+
apiPayload['quantity'] = quantity;
|
|
3444
|
+
}
|
|
3445
|
+
if (typeof targetProductId !== 'undefined') {
|
|
3446
|
+
apiPayload['target_product_id'] = targetProductId;
|
|
3447
|
+
}
|
|
2212
3448
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2213
3449
|
|
|
2214
3450
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2219,7 +3455,7 @@ export class Products {
|
|
|
2219
3455
|
'post',
|
|
2220
3456
|
uri,
|
|
2221
3457
|
apiHeaders,
|
|
2222
|
-
|
|
3458
|
+
apiPayload
|
|
2223
3459
|
);
|
|
2224
3460
|
}
|
|
2225
3461
|
|
|
@@ -2258,7 +3494,7 @@ export class Products {
|
|
|
2258
3494
|
}
|
|
2259
3495
|
|
|
2260
3496
|
const apiPath = '/v1/products/product_associations/{id}'.replace('{id}', id);
|
|
2261
|
-
const
|
|
3497
|
+
const apiPayload: Payload = {};
|
|
2262
3498
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2263
3499
|
|
|
2264
3500
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2268,7 +3504,7 @@ export class Products {
|
|
|
2268
3504
|
'delete',
|
|
2269
3505
|
uri,
|
|
2270
3506
|
apiHeaders,
|
|
2271
|
-
|
|
3507
|
+
apiPayload
|
|
2272
3508
|
);
|
|
2273
3509
|
}
|
|
2274
3510
|
|
|
@@ -2307,7 +3543,7 @@ export class Products {
|
|
|
2307
3543
|
}
|
|
2308
3544
|
|
|
2309
3545
|
const apiPath = '/v1/products/product_associations/{id}'.replace('{id}', id);
|
|
2310
|
-
const
|
|
3546
|
+
const apiPayload: Payload = {};
|
|
2311
3547
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2312
3548
|
|
|
2313
3549
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2317,46 +3553,82 @@ export class Products {
|
|
|
2317
3553
|
'get',
|
|
2318
3554
|
uri,
|
|
2319
3555
|
apiHeaders,
|
|
2320
|
-
|
|
3556
|
+
apiPayload
|
|
2321
3557
|
);
|
|
2322
3558
|
}
|
|
2323
3559
|
|
|
2324
3560
|
/**
|
|
2325
3561
|
*
|
|
2326
3562
|
* @param {string} params.id -
|
|
3563
|
+
* @param {string} params.associationTypeId -
|
|
3564
|
+
* @param {number} params.position -
|
|
3565
|
+
* @param {string} params.productId -
|
|
3566
|
+
* @param {number} params.quantity -
|
|
3567
|
+
* @param {string} params.targetProductId -
|
|
2327
3568
|
* @throws {RevenexxException}
|
|
2328
3569
|
* @returns {Promise<Models.ProductAssociations>}
|
|
2329
3570
|
*/
|
|
2330
|
-
productsProductAssociationsUpdate(params: { id: string }): Promise<Models.ProductAssociations>;
|
|
3571
|
+
productsProductAssociationsUpdate(params: { id: string, associationTypeId?: string, position?: number, productId?: string, quantity?: number, targetProductId?: string }): Promise<Models.ProductAssociations>;
|
|
2331
3572
|
/**
|
|
2332
3573
|
*
|
|
2333
3574
|
* @param {string} id -
|
|
3575
|
+
* @param {string} associationTypeId -
|
|
3576
|
+
* @param {number} position -
|
|
3577
|
+
* @param {string} productId -
|
|
3578
|
+
* @param {number} quantity -
|
|
3579
|
+
* @param {string} targetProductId -
|
|
2334
3580
|
* @throws {RevenexxException}
|
|
2335
3581
|
* @returns {Promise<Models.ProductAssociations>}
|
|
2336
3582
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2337
3583
|
*/
|
|
2338
|
-
productsProductAssociationsUpdate(id: string): Promise<Models.ProductAssociations>;
|
|
3584
|
+
productsProductAssociationsUpdate(id: string, associationTypeId?: string, position?: number, productId?: string, quantity?: number, targetProductId?: string): Promise<Models.ProductAssociations>;
|
|
2339
3585
|
productsProductAssociationsUpdate(
|
|
2340
|
-
paramsOrFirst: { id: string } | string
|
|
3586
|
+
paramsOrFirst: { id: string, associationTypeId?: string, position?: number, productId?: string, quantity?: number, targetProductId?: string } | string,
|
|
3587
|
+
...rest: [(string)?, (number)?, (string)?, (number)?, (string)?]
|
|
2341
3588
|
): Promise<Models.ProductAssociations> {
|
|
2342
|
-
let params: { id: string };
|
|
3589
|
+
let params: { id: string, associationTypeId?: string, position?: number, productId?: string, quantity?: number, targetProductId?: string };
|
|
2343
3590
|
|
|
2344
3591
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2345
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
3592
|
+
params = (paramsOrFirst || {}) as { id: string, associationTypeId?: string, position?: number, productId?: string, quantity?: number, targetProductId?: string };
|
|
2346
3593
|
} else {
|
|
2347
3594
|
params = {
|
|
2348
|
-
id: paramsOrFirst as string
|
|
3595
|
+
id: paramsOrFirst as string,
|
|
3596
|
+
associationTypeId: rest[0] as string,
|
|
3597
|
+
position: rest[1] as number,
|
|
3598
|
+
productId: rest[2] as string,
|
|
3599
|
+
quantity: rest[3] as number,
|
|
3600
|
+
targetProductId: rest[4] as string
|
|
2349
3601
|
};
|
|
2350
3602
|
}
|
|
2351
3603
|
|
|
2352
3604
|
const id = params.id;
|
|
3605
|
+
const associationTypeId = params.associationTypeId;
|
|
3606
|
+
const position = params.position;
|
|
3607
|
+
const productId = params.productId;
|
|
3608
|
+
const quantity = params.quantity;
|
|
3609
|
+
const targetProductId = params.targetProductId;
|
|
2353
3610
|
|
|
2354
3611
|
if (typeof id === 'undefined') {
|
|
2355
3612
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
2356
3613
|
}
|
|
2357
3614
|
|
|
2358
3615
|
const apiPath = '/v1/products/product_associations/{id}'.replace('{id}', id);
|
|
2359
|
-
const
|
|
3616
|
+
const apiPayload: Payload = {};
|
|
3617
|
+
if (typeof associationTypeId !== 'undefined') {
|
|
3618
|
+
apiPayload['association_type_id'] = associationTypeId;
|
|
3619
|
+
}
|
|
3620
|
+
if (typeof position !== 'undefined') {
|
|
3621
|
+
apiPayload['position'] = position;
|
|
3622
|
+
}
|
|
3623
|
+
if (typeof productId !== 'undefined') {
|
|
3624
|
+
apiPayload['product_id'] = productId;
|
|
3625
|
+
}
|
|
3626
|
+
if (typeof quantity !== 'undefined') {
|
|
3627
|
+
apiPayload['quantity'] = quantity;
|
|
3628
|
+
}
|
|
3629
|
+
if (typeof targetProductId !== 'undefined') {
|
|
3630
|
+
apiPayload['target_product_id'] = targetProductId;
|
|
3631
|
+
}
|
|
2360
3632
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2361
3633
|
|
|
2362
3634
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2367,7 +3639,7 @@ export class Products {
|
|
|
2367
3639
|
'put',
|
|
2368
3640
|
uri,
|
|
2369
3641
|
apiHeaders,
|
|
2370
|
-
|
|
3642
|
+
apiPayload
|
|
2371
3643
|
);
|
|
2372
3644
|
}
|
|
2373
3645
|
|
|
@@ -2379,7 +3651,7 @@ export class Products {
|
|
|
2379
3651
|
productsProductCategoriesList(): Promise<{}> {
|
|
2380
3652
|
|
|
2381
3653
|
const apiPath = '/v1/products/product_categories';
|
|
2382
|
-
const
|
|
3654
|
+
const apiPayload: Payload = {};
|
|
2383
3655
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2384
3656
|
|
|
2385
3657
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2389,19 +3661,67 @@ export class Products {
|
|
|
2389
3661
|
'get',
|
|
2390
3662
|
uri,
|
|
2391
3663
|
apiHeaders,
|
|
2392
|
-
|
|
3664
|
+
apiPayload
|
|
2393
3665
|
);
|
|
2394
3666
|
}
|
|
2395
3667
|
|
|
2396
3668
|
/**
|
|
2397
3669
|
*
|
|
3670
|
+
* @param {string} params.categoryId -
|
|
3671
|
+
* @param {string} params.productId -
|
|
3672
|
+
* @param {number} params.position -
|
|
2398
3673
|
* @throws {RevenexxException}
|
|
2399
3674
|
* @returns {Promise<Models.ProductCategories>}
|
|
2400
3675
|
*/
|
|
2401
|
-
productsProductCategoriesCreate(): Promise<Models.ProductCategories
|
|
3676
|
+
productsProductCategoriesCreate(params: { categoryId: string, productId: string, position?: number }): Promise<Models.ProductCategories>;
|
|
3677
|
+
/**
|
|
3678
|
+
*
|
|
3679
|
+
* @param {string} categoryId -
|
|
3680
|
+
* @param {string} productId -
|
|
3681
|
+
* @param {number} position -
|
|
3682
|
+
* @throws {RevenexxException}
|
|
3683
|
+
* @returns {Promise<Models.ProductCategories>}
|
|
3684
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3685
|
+
*/
|
|
3686
|
+
productsProductCategoriesCreate(categoryId: string, productId: string, position?: number): Promise<Models.ProductCategories>;
|
|
3687
|
+
productsProductCategoriesCreate(
|
|
3688
|
+
paramsOrFirst: { categoryId: string, productId: string, position?: number } | string,
|
|
3689
|
+
...rest: [(string)?, (number)?]
|
|
3690
|
+
): Promise<Models.ProductCategories> {
|
|
3691
|
+
let params: { categoryId: string, productId: string, position?: number };
|
|
3692
|
+
|
|
3693
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3694
|
+
params = (paramsOrFirst || {}) as { categoryId: string, productId: string, position?: number };
|
|
3695
|
+
} else {
|
|
3696
|
+
params = {
|
|
3697
|
+
categoryId: paramsOrFirst as string,
|
|
3698
|
+
productId: rest[0] as string,
|
|
3699
|
+
position: rest[1] as number
|
|
3700
|
+
};
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
const categoryId = params.categoryId;
|
|
3704
|
+
const productId = params.productId;
|
|
3705
|
+
const position = params.position;
|
|
3706
|
+
|
|
3707
|
+
if (typeof categoryId === 'undefined') {
|
|
3708
|
+
throw new RevenexxException('Missing required parameter: "categoryId"');
|
|
3709
|
+
}
|
|
3710
|
+
if (typeof productId === 'undefined') {
|
|
3711
|
+
throw new RevenexxException('Missing required parameter: "productId"');
|
|
3712
|
+
}
|
|
2402
3713
|
|
|
2403
3714
|
const apiPath = '/v1/products/product_categories';
|
|
2404
|
-
const
|
|
3715
|
+
const apiPayload: Payload = {};
|
|
3716
|
+
if (typeof categoryId !== 'undefined') {
|
|
3717
|
+
apiPayload['category_id'] = categoryId;
|
|
3718
|
+
}
|
|
3719
|
+
if (typeof position !== 'undefined') {
|
|
3720
|
+
apiPayload['position'] = position;
|
|
3721
|
+
}
|
|
3722
|
+
if (typeof productId !== 'undefined') {
|
|
3723
|
+
apiPayload['product_id'] = productId;
|
|
3724
|
+
}
|
|
2405
3725
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2406
3726
|
|
|
2407
3727
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2412,7 +3732,7 @@ export class Products {
|
|
|
2412
3732
|
'post',
|
|
2413
3733
|
uri,
|
|
2414
3734
|
apiHeaders,
|
|
2415
|
-
|
|
3735
|
+
apiPayload
|
|
2416
3736
|
);
|
|
2417
3737
|
}
|
|
2418
3738
|
|
|
@@ -2451,7 +3771,7 @@ export class Products {
|
|
|
2451
3771
|
}
|
|
2452
3772
|
|
|
2453
3773
|
const apiPath = '/v1/products/product_categories/{id}'.replace('{id}', id);
|
|
2454
|
-
const
|
|
3774
|
+
const apiPayload: Payload = {};
|
|
2455
3775
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2456
3776
|
|
|
2457
3777
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2461,7 +3781,7 @@ export class Products {
|
|
|
2461
3781
|
'delete',
|
|
2462
3782
|
uri,
|
|
2463
3783
|
apiHeaders,
|
|
2464
|
-
|
|
3784
|
+
apiPayload
|
|
2465
3785
|
);
|
|
2466
3786
|
}
|
|
2467
3787
|
|
|
@@ -2500,7 +3820,7 @@ export class Products {
|
|
|
2500
3820
|
}
|
|
2501
3821
|
|
|
2502
3822
|
const apiPath = '/v1/products/product_categories/{id}'.replace('{id}', id);
|
|
2503
|
-
const
|
|
3823
|
+
const apiPayload: Payload = {};
|
|
2504
3824
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2505
3825
|
|
|
2506
3826
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2510,46 +3830,68 @@ export class Products {
|
|
|
2510
3830
|
'get',
|
|
2511
3831
|
uri,
|
|
2512
3832
|
apiHeaders,
|
|
2513
|
-
|
|
3833
|
+
apiPayload
|
|
2514
3834
|
);
|
|
2515
3835
|
}
|
|
2516
3836
|
|
|
2517
3837
|
/**
|
|
2518
3838
|
*
|
|
2519
3839
|
* @param {string} params.id -
|
|
3840
|
+
* @param {string} params.categoryId -
|
|
3841
|
+
* @param {number} params.position -
|
|
3842
|
+
* @param {string} params.productId -
|
|
2520
3843
|
* @throws {RevenexxException}
|
|
2521
3844
|
* @returns {Promise<Models.ProductCategories>}
|
|
2522
3845
|
*/
|
|
2523
|
-
productsProductCategoriesUpdate(params: { id: string }): Promise<Models.ProductCategories>;
|
|
3846
|
+
productsProductCategoriesUpdate(params: { id: string, categoryId?: string, position?: number, productId?: string }): Promise<Models.ProductCategories>;
|
|
2524
3847
|
/**
|
|
2525
3848
|
*
|
|
2526
3849
|
* @param {string} id -
|
|
3850
|
+
* @param {string} categoryId -
|
|
3851
|
+
* @param {number} position -
|
|
3852
|
+
* @param {string} productId -
|
|
2527
3853
|
* @throws {RevenexxException}
|
|
2528
3854
|
* @returns {Promise<Models.ProductCategories>}
|
|
2529
3855
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2530
3856
|
*/
|
|
2531
|
-
productsProductCategoriesUpdate(id: string): Promise<Models.ProductCategories>;
|
|
3857
|
+
productsProductCategoriesUpdate(id: string, categoryId?: string, position?: number, productId?: string): Promise<Models.ProductCategories>;
|
|
2532
3858
|
productsProductCategoriesUpdate(
|
|
2533
|
-
paramsOrFirst: { id: string } | string
|
|
3859
|
+
paramsOrFirst: { id: string, categoryId?: string, position?: number, productId?: string } | string,
|
|
3860
|
+
...rest: [(string)?, (number)?, (string)?]
|
|
2534
3861
|
): Promise<Models.ProductCategories> {
|
|
2535
|
-
let params: { id: string };
|
|
3862
|
+
let params: { id: string, categoryId?: string, position?: number, productId?: string };
|
|
2536
3863
|
|
|
2537
3864
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2538
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
3865
|
+
params = (paramsOrFirst || {}) as { id: string, categoryId?: string, position?: number, productId?: string };
|
|
2539
3866
|
} else {
|
|
2540
3867
|
params = {
|
|
2541
|
-
id: paramsOrFirst as string
|
|
3868
|
+
id: paramsOrFirst as string,
|
|
3869
|
+
categoryId: rest[0] as string,
|
|
3870
|
+
position: rest[1] as number,
|
|
3871
|
+
productId: rest[2] as string
|
|
2542
3872
|
};
|
|
2543
3873
|
}
|
|
2544
3874
|
|
|
2545
3875
|
const id = params.id;
|
|
3876
|
+
const categoryId = params.categoryId;
|
|
3877
|
+
const position = params.position;
|
|
3878
|
+
const productId = params.productId;
|
|
2546
3879
|
|
|
2547
3880
|
if (typeof id === 'undefined') {
|
|
2548
3881
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
2549
3882
|
}
|
|
2550
3883
|
|
|
2551
3884
|
const apiPath = '/v1/products/product_categories/{id}'.replace('{id}', id);
|
|
2552
|
-
const
|
|
3885
|
+
const apiPayload: Payload = {};
|
|
3886
|
+
if (typeof categoryId !== 'undefined') {
|
|
3887
|
+
apiPayload['category_id'] = categoryId;
|
|
3888
|
+
}
|
|
3889
|
+
if (typeof position !== 'undefined') {
|
|
3890
|
+
apiPayload['position'] = position;
|
|
3891
|
+
}
|
|
3892
|
+
if (typeof productId !== 'undefined') {
|
|
3893
|
+
apiPayload['product_id'] = productId;
|
|
3894
|
+
}
|
|
2553
3895
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2554
3896
|
|
|
2555
3897
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2560,7 +3902,7 @@ export class Products {
|
|
|
2560
3902
|
'put',
|
|
2561
3903
|
uri,
|
|
2562
3904
|
apiHeaders,
|
|
2563
|
-
|
|
3905
|
+
apiPayload
|
|
2564
3906
|
);
|
|
2565
3907
|
}
|
|
2566
3908
|
|
|
@@ -2572,7 +3914,7 @@ export class Products {
|
|
|
2572
3914
|
productsReferenceEntitiesList(): Promise<{}> {
|
|
2573
3915
|
|
|
2574
3916
|
const apiPath = '/v1/products/reference_entities';
|
|
2575
|
-
const
|
|
3917
|
+
const apiPayload: Payload = {};
|
|
2576
3918
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2577
3919
|
|
|
2578
3920
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2582,19 +3924,64 @@ export class Products {
|
|
|
2582
3924
|
'get',
|
|
2583
3925
|
uri,
|
|
2584
3926
|
apiHeaders,
|
|
2585
|
-
|
|
3927
|
+
apiPayload
|
|
2586
3928
|
);
|
|
2587
3929
|
}
|
|
2588
3930
|
|
|
2589
3931
|
/**
|
|
2590
3932
|
*
|
|
3933
|
+
* @param {string} params.code -
|
|
3934
|
+
* @param {string} params.image -
|
|
3935
|
+
* @param {object} params.labels -
|
|
2591
3936
|
* @throws {RevenexxException}
|
|
2592
3937
|
* @returns {Promise<Models.ReferenceEntities>}
|
|
2593
3938
|
*/
|
|
2594
|
-
productsReferenceEntitiesCreate(): Promise<Models.ReferenceEntities
|
|
3939
|
+
productsReferenceEntitiesCreate(params: { code: string, image?: string, labels?: object }): Promise<Models.ReferenceEntities>;
|
|
3940
|
+
/**
|
|
3941
|
+
*
|
|
3942
|
+
* @param {string} code -
|
|
3943
|
+
* @param {string} image -
|
|
3944
|
+
* @param {object} labels -
|
|
3945
|
+
* @throws {RevenexxException}
|
|
3946
|
+
* @returns {Promise<Models.ReferenceEntities>}
|
|
3947
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3948
|
+
*/
|
|
3949
|
+
productsReferenceEntitiesCreate(code: string, image?: string, labels?: object): Promise<Models.ReferenceEntities>;
|
|
3950
|
+
productsReferenceEntitiesCreate(
|
|
3951
|
+
paramsOrFirst: { code: string, image?: string, labels?: object } | string,
|
|
3952
|
+
...rest: [(string)?, (object)?]
|
|
3953
|
+
): Promise<Models.ReferenceEntities> {
|
|
3954
|
+
let params: { code: string, image?: string, labels?: object };
|
|
3955
|
+
|
|
3956
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3957
|
+
params = (paramsOrFirst || {}) as { code: string, image?: string, labels?: object };
|
|
3958
|
+
} else {
|
|
3959
|
+
params = {
|
|
3960
|
+
code: paramsOrFirst as string,
|
|
3961
|
+
image: rest[0] as string,
|
|
3962
|
+
labels: rest[1] as object
|
|
3963
|
+
};
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
const code = params.code;
|
|
3967
|
+
const image = params.image;
|
|
3968
|
+
const labels = params.labels;
|
|
3969
|
+
|
|
3970
|
+
if (typeof code === 'undefined') {
|
|
3971
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
3972
|
+
}
|
|
2595
3973
|
|
|
2596
3974
|
const apiPath = '/v1/products/reference_entities';
|
|
2597
|
-
const
|
|
3975
|
+
const apiPayload: Payload = {};
|
|
3976
|
+
if (typeof code !== 'undefined') {
|
|
3977
|
+
apiPayload['code'] = code;
|
|
3978
|
+
}
|
|
3979
|
+
if (typeof image !== 'undefined') {
|
|
3980
|
+
apiPayload['image'] = image;
|
|
3981
|
+
}
|
|
3982
|
+
if (typeof labels !== 'undefined') {
|
|
3983
|
+
apiPayload['labels'] = labels;
|
|
3984
|
+
}
|
|
2598
3985
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2599
3986
|
|
|
2600
3987
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2605,7 +3992,7 @@ export class Products {
|
|
|
2605
3992
|
'post',
|
|
2606
3993
|
uri,
|
|
2607
3994
|
apiHeaders,
|
|
2608
|
-
|
|
3995
|
+
apiPayload
|
|
2609
3996
|
);
|
|
2610
3997
|
}
|
|
2611
3998
|
|
|
@@ -2644,7 +4031,7 @@ export class Products {
|
|
|
2644
4031
|
}
|
|
2645
4032
|
|
|
2646
4033
|
const apiPath = '/v1/products/reference_entities/{id}'.replace('{id}', id);
|
|
2647
|
-
const
|
|
4034
|
+
const apiPayload: Payload = {};
|
|
2648
4035
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2649
4036
|
|
|
2650
4037
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2654,7 +4041,7 @@ export class Products {
|
|
|
2654
4041
|
'delete',
|
|
2655
4042
|
uri,
|
|
2656
4043
|
apiHeaders,
|
|
2657
|
-
|
|
4044
|
+
apiPayload
|
|
2658
4045
|
);
|
|
2659
4046
|
}
|
|
2660
4047
|
|
|
@@ -2693,7 +4080,7 @@ export class Products {
|
|
|
2693
4080
|
}
|
|
2694
4081
|
|
|
2695
4082
|
const apiPath = '/v1/products/reference_entities/{id}'.replace('{id}', id);
|
|
2696
|
-
const
|
|
4083
|
+
const apiPayload: Payload = {};
|
|
2697
4084
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2698
4085
|
|
|
2699
4086
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2703,46 +4090,68 @@ export class Products {
|
|
|
2703
4090
|
'get',
|
|
2704
4091
|
uri,
|
|
2705
4092
|
apiHeaders,
|
|
2706
|
-
|
|
4093
|
+
apiPayload
|
|
2707
4094
|
);
|
|
2708
4095
|
}
|
|
2709
4096
|
|
|
2710
4097
|
/**
|
|
2711
4098
|
*
|
|
2712
4099
|
* @param {string} params.id -
|
|
4100
|
+
* @param {string} params.code -
|
|
4101
|
+
* @param {string} params.image -
|
|
4102
|
+
* @param {object} params.labels -
|
|
2713
4103
|
* @throws {RevenexxException}
|
|
2714
4104
|
* @returns {Promise<Models.ReferenceEntities>}
|
|
2715
4105
|
*/
|
|
2716
|
-
productsReferenceEntitiesUpdate(params: { id: string }): Promise<Models.ReferenceEntities>;
|
|
4106
|
+
productsReferenceEntitiesUpdate(params: { id: string, code?: string, image?: string, labels?: object }): Promise<Models.ReferenceEntities>;
|
|
2717
4107
|
/**
|
|
2718
4108
|
*
|
|
2719
4109
|
* @param {string} id -
|
|
4110
|
+
* @param {string} code -
|
|
4111
|
+
* @param {string} image -
|
|
4112
|
+
* @param {object} labels -
|
|
2720
4113
|
* @throws {RevenexxException}
|
|
2721
4114
|
* @returns {Promise<Models.ReferenceEntities>}
|
|
2722
4115
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2723
4116
|
*/
|
|
2724
|
-
productsReferenceEntitiesUpdate(id: string): Promise<Models.ReferenceEntities>;
|
|
4117
|
+
productsReferenceEntitiesUpdate(id: string, code?: string, image?: string, labels?: object): Promise<Models.ReferenceEntities>;
|
|
2725
4118
|
productsReferenceEntitiesUpdate(
|
|
2726
|
-
paramsOrFirst: { id: string } | string
|
|
4119
|
+
paramsOrFirst: { id: string, code?: string, image?: string, labels?: object } | string,
|
|
4120
|
+
...rest: [(string)?, (string)?, (object)?]
|
|
2727
4121
|
): Promise<Models.ReferenceEntities> {
|
|
2728
|
-
let params: { id: string };
|
|
4122
|
+
let params: { id: string, code?: string, image?: string, labels?: object };
|
|
2729
4123
|
|
|
2730
4124
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2731
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
4125
|
+
params = (paramsOrFirst || {}) as { id: string, code?: string, image?: string, labels?: object };
|
|
2732
4126
|
} else {
|
|
2733
4127
|
params = {
|
|
2734
|
-
id: paramsOrFirst as string
|
|
4128
|
+
id: paramsOrFirst as string,
|
|
4129
|
+
code: rest[0] as string,
|
|
4130
|
+
image: rest[1] as string,
|
|
4131
|
+
labels: rest[2] as object
|
|
2735
4132
|
};
|
|
2736
4133
|
}
|
|
2737
4134
|
|
|
2738
4135
|
const id = params.id;
|
|
4136
|
+
const code = params.code;
|
|
4137
|
+
const image = params.image;
|
|
4138
|
+
const labels = params.labels;
|
|
2739
4139
|
|
|
2740
4140
|
if (typeof id === 'undefined') {
|
|
2741
4141
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
2742
4142
|
}
|
|
2743
4143
|
|
|
2744
4144
|
const apiPath = '/v1/products/reference_entities/{id}'.replace('{id}', id);
|
|
2745
|
-
const
|
|
4145
|
+
const apiPayload: Payload = {};
|
|
4146
|
+
if (typeof code !== 'undefined') {
|
|
4147
|
+
apiPayload['code'] = code;
|
|
4148
|
+
}
|
|
4149
|
+
if (typeof image !== 'undefined') {
|
|
4150
|
+
apiPayload['image'] = image;
|
|
4151
|
+
}
|
|
4152
|
+
if (typeof labels !== 'undefined') {
|
|
4153
|
+
apiPayload['labels'] = labels;
|
|
4154
|
+
}
|
|
2746
4155
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2747
4156
|
|
|
2748
4157
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2753,7 +4162,7 @@ export class Products {
|
|
|
2753
4162
|
'put',
|
|
2754
4163
|
uri,
|
|
2755
4164
|
apiHeaders,
|
|
2756
|
-
|
|
4165
|
+
apiPayload
|
|
2757
4166
|
);
|
|
2758
4167
|
}
|
|
2759
4168
|
|
|
@@ -2765,7 +4174,7 @@ export class Products {
|
|
|
2765
4174
|
productsReferenceEntityRecordsList(): Promise<{}> {
|
|
2766
4175
|
|
|
2767
4176
|
const apiPath = '/v1/products/reference_entity_records';
|
|
2768
|
-
const
|
|
4177
|
+
const apiPayload: Payload = {};
|
|
2769
4178
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2770
4179
|
|
|
2771
4180
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2775,19 +4184,74 @@ export class Products {
|
|
|
2775
4184
|
'get',
|
|
2776
4185
|
uri,
|
|
2777
4186
|
apiHeaders,
|
|
2778
|
-
|
|
4187
|
+
apiPayload
|
|
2779
4188
|
);
|
|
2780
4189
|
}
|
|
2781
4190
|
|
|
2782
4191
|
/**
|
|
2783
4192
|
*
|
|
4193
|
+
* @param {string} params.code -
|
|
4194
|
+
* @param {string} params.referenceEntityId -
|
|
4195
|
+
* @param {object} params.attributeValues -
|
|
4196
|
+
* @param {object} params.labels -
|
|
4197
|
+
* @throws {RevenexxException}
|
|
4198
|
+
* @returns {Promise<Models.ReferenceEntityRecords>}
|
|
4199
|
+
*/
|
|
4200
|
+
productsReferenceEntityRecordsCreate(params: { code: string, referenceEntityId: string, attributeValues?: object, labels?: object }): Promise<Models.ReferenceEntityRecords>;
|
|
4201
|
+
/**
|
|
4202
|
+
*
|
|
4203
|
+
* @param {string} code -
|
|
4204
|
+
* @param {string} referenceEntityId -
|
|
4205
|
+
* @param {object} attributeValues -
|
|
4206
|
+
* @param {object} labels -
|
|
2784
4207
|
* @throws {RevenexxException}
|
|
2785
4208
|
* @returns {Promise<Models.ReferenceEntityRecords>}
|
|
4209
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2786
4210
|
*/
|
|
2787
|
-
productsReferenceEntityRecordsCreate(): Promise<Models.ReferenceEntityRecords
|
|
4211
|
+
productsReferenceEntityRecordsCreate(code: string, referenceEntityId: string, attributeValues?: object, labels?: object): Promise<Models.ReferenceEntityRecords>;
|
|
4212
|
+
productsReferenceEntityRecordsCreate(
|
|
4213
|
+
paramsOrFirst: { code: string, referenceEntityId: string, attributeValues?: object, labels?: object } | string,
|
|
4214
|
+
...rest: [(string)?, (object)?, (object)?]
|
|
4215
|
+
): Promise<Models.ReferenceEntityRecords> {
|
|
4216
|
+
let params: { code: string, referenceEntityId: string, attributeValues?: object, labels?: object };
|
|
4217
|
+
|
|
4218
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4219
|
+
params = (paramsOrFirst || {}) as { code: string, referenceEntityId: string, attributeValues?: object, labels?: object };
|
|
4220
|
+
} else {
|
|
4221
|
+
params = {
|
|
4222
|
+
code: paramsOrFirst as string,
|
|
4223
|
+
referenceEntityId: rest[0] as string,
|
|
4224
|
+
attributeValues: rest[1] as object,
|
|
4225
|
+
labels: rest[2] as object
|
|
4226
|
+
};
|
|
4227
|
+
}
|
|
4228
|
+
|
|
4229
|
+
const code = params.code;
|
|
4230
|
+
const referenceEntityId = params.referenceEntityId;
|
|
4231
|
+
const attributeValues = params.attributeValues;
|
|
4232
|
+
const labels = params.labels;
|
|
4233
|
+
|
|
4234
|
+
if (typeof code === 'undefined') {
|
|
4235
|
+
throw new RevenexxException('Missing required parameter: "code"');
|
|
4236
|
+
}
|
|
4237
|
+
if (typeof referenceEntityId === 'undefined') {
|
|
4238
|
+
throw new RevenexxException('Missing required parameter: "referenceEntityId"');
|
|
4239
|
+
}
|
|
2788
4240
|
|
|
2789
4241
|
const apiPath = '/v1/products/reference_entity_records';
|
|
2790
|
-
const
|
|
4242
|
+
const apiPayload: Payload = {};
|
|
4243
|
+
if (typeof attributeValues !== 'undefined') {
|
|
4244
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
4245
|
+
}
|
|
4246
|
+
if (typeof code !== 'undefined') {
|
|
4247
|
+
apiPayload['code'] = code;
|
|
4248
|
+
}
|
|
4249
|
+
if (typeof labels !== 'undefined') {
|
|
4250
|
+
apiPayload['labels'] = labels;
|
|
4251
|
+
}
|
|
4252
|
+
if (typeof referenceEntityId !== 'undefined') {
|
|
4253
|
+
apiPayload['reference_entity_id'] = referenceEntityId;
|
|
4254
|
+
}
|
|
2791
4255
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2792
4256
|
|
|
2793
4257
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2798,7 +4262,7 @@ export class Products {
|
|
|
2798
4262
|
'post',
|
|
2799
4263
|
uri,
|
|
2800
4264
|
apiHeaders,
|
|
2801
|
-
|
|
4265
|
+
apiPayload
|
|
2802
4266
|
);
|
|
2803
4267
|
}
|
|
2804
4268
|
|
|
@@ -2837,7 +4301,7 @@ export class Products {
|
|
|
2837
4301
|
}
|
|
2838
4302
|
|
|
2839
4303
|
const apiPath = '/v1/products/reference_entity_records/{id}'.replace('{id}', id);
|
|
2840
|
-
const
|
|
4304
|
+
const apiPayload: Payload = {};
|
|
2841
4305
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2842
4306
|
|
|
2843
4307
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2847,7 +4311,7 @@ export class Products {
|
|
|
2847
4311
|
'delete',
|
|
2848
4312
|
uri,
|
|
2849
4313
|
apiHeaders,
|
|
2850
|
-
|
|
4314
|
+
apiPayload
|
|
2851
4315
|
);
|
|
2852
4316
|
}
|
|
2853
4317
|
|
|
@@ -2886,7 +4350,7 @@ export class Products {
|
|
|
2886
4350
|
}
|
|
2887
4351
|
|
|
2888
4352
|
const apiPath = '/v1/products/reference_entity_records/{id}'.replace('{id}', id);
|
|
2889
|
-
const
|
|
4353
|
+
const apiPayload: Payload = {};
|
|
2890
4354
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2891
4355
|
|
|
2892
4356
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2896,46 +4360,75 @@ export class Products {
|
|
|
2896
4360
|
'get',
|
|
2897
4361
|
uri,
|
|
2898
4362
|
apiHeaders,
|
|
2899
|
-
|
|
4363
|
+
apiPayload
|
|
2900
4364
|
);
|
|
2901
4365
|
}
|
|
2902
4366
|
|
|
2903
4367
|
/**
|
|
2904
4368
|
*
|
|
2905
4369
|
* @param {string} params.id -
|
|
4370
|
+
* @param {object} params.attributeValues -
|
|
4371
|
+
* @param {string} params.code -
|
|
4372
|
+
* @param {object} params.labels -
|
|
4373
|
+
* @param {string} params.referenceEntityId -
|
|
2906
4374
|
* @throws {RevenexxException}
|
|
2907
4375
|
* @returns {Promise<Models.ReferenceEntityRecords>}
|
|
2908
4376
|
*/
|
|
2909
|
-
productsReferenceEntityRecordsUpdate(params: { id: string }): Promise<Models.ReferenceEntityRecords>;
|
|
4377
|
+
productsReferenceEntityRecordsUpdate(params: { id: string, attributeValues?: object, code?: string, labels?: object, referenceEntityId?: string }): Promise<Models.ReferenceEntityRecords>;
|
|
2910
4378
|
/**
|
|
2911
4379
|
*
|
|
2912
4380
|
* @param {string} id -
|
|
4381
|
+
* @param {object} attributeValues -
|
|
4382
|
+
* @param {string} code -
|
|
4383
|
+
* @param {object} labels -
|
|
4384
|
+
* @param {string} referenceEntityId -
|
|
2913
4385
|
* @throws {RevenexxException}
|
|
2914
4386
|
* @returns {Promise<Models.ReferenceEntityRecords>}
|
|
2915
4387
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2916
4388
|
*/
|
|
2917
|
-
productsReferenceEntityRecordsUpdate(id: string): Promise<Models.ReferenceEntityRecords>;
|
|
4389
|
+
productsReferenceEntityRecordsUpdate(id: string, attributeValues?: object, code?: string, labels?: object, referenceEntityId?: string): Promise<Models.ReferenceEntityRecords>;
|
|
2918
4390
|
productsReferenceEntityRecordsUpdate(
|
|
2919
|
-
paramsOrFirst: { id: string } | string
|
|
4391
|
+
paramsOrFirst: { id: string, attributeValues?: object, code?: string, labels?: object, referenceEntityId?: string } | string,
|
|
4392
|
+
...rest: [(object)?, (string)?, (object)?, (string)?]
|
|
2920
4393
|
): Promise<Models.ReferenceEntityRecords> {
|
|
2921
|
-
let params: { id: string };
|
|
4394
|
+
let params: { id: string, attributeValues?: object, code?: string, labels?: object, referenceEntityId?: string };
|
|
2922
4395
|
|
|
2923
4396
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2924
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
4397
|
+
params = (paramsOrFirst || {}) as { id: string, attributeValues?: object, code?: string, labels?: object, referenceEntityId?: string };
|
|
2925
4398
|
} else {
|
|
2926
4399
|
params = {
|
|
2927
|
-
id: paramsOrFirst as string
|
|
4400
|
+
id: paramsOrFirst as string,
|
|
4401
|
+
attributeValues: rest[0] as object,
|
|
4402
|
+
code: rest[1] as string,
|
|
4403
|
+
labels: rest[2] as object,
|
|
4404
|
+
referenceEntityId: rest[3] as string
|
|
2928
4405
|
};
|
|
2929
4406
|
}
|
|
2930
4407
|
|
|
2931
4408
|
const id = params.id;
|
|
4409
|
+
const attributeValues = params.attributeValues;
|
|
4410
|
+
const code = params.code;
|
|
4411
|
+
const labels = params.labels;
|
|
4412
|
+
const referenceEntityId = params.referenceEntityId;
|
|
2932
4413
|
|
|
2933
4414
|
if (typeof id === 'undefined') {
|
|
2934
4415
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
2935
4416
|
}
|
|
2936
4417
|
|
|
2937
4418
|
const apiPath = '/v1/products/reference_entity_records/{id}'.replace('{id}', id);
|
|
2938
|
-
const
|
|
4419
|
+
const apiPayload: Payload = {};
|
|
4420
|
+
if (typeof attributeValues !== 'undefined') {
|
|
4421
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
4422
|
+
}
|
|
4423
|
+
if (typeof code !== 'undefined') {
|
|
4424
|
+
apiPayload['code'] = code;
|
|
4425
|
+
}
|
|
4426
|
+
if (typeof labels !== 'undefined') {
|
|
4427
|
+
apiPayload['labels'] = labels;
|
|
4428
|
+
}
|
|
4429
|
+
if (typeof referenceEntityId !== 'undefined') {
|
|
4430
|
+
apiPayload['reference_entity_id'] = referenceEntityId;
|
|
4431
|
+
}
|
|
2939
4432
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2940
4433
|
|
|
2941
4434
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2946,7 +4439,7 @@ export class Products {
|
|
|
2946
4439
|
'put',
|
|
2947
4440
|
uri,
|
|
2948
4441
|
apiHeaders,
|
|
2949
|
-
|
|
4442
|
+
apiPayload
|
|
2950
4443
|
);
|
|
2951
4444
|
}
|
|
2952
4445
|
|
|
@@ -2985,7 +4478,7 @@ export class Products {
|
|
|
2985
4478
|
}
|
|
2986
4479
|
|
|
2987
4480
|
const apiPath = '/v1/products/{id}'.replace('{id}', id);
|
|
2988
|
-
const
|
|
4481
|
+
const apiPayload: Payload = {};
|
|
2989
4482
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2990
4483
|
|
|
2991
4484
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2995,7 +4488,7 @@ export class Products {
|
|
|
2995
4488
|
'delete',
|
|
2996
4489
|
uri,
|
|
2997
4490
|
apiHeaders,
|
|
2998
|
-
|
|
4491
|
+
apiPayload
|
|
2999
4492
|
);
|
|
3000
4493
|
}
|
|
3001
4494
|
|
|
@@ -3034,7 +4527,7 @@ export class Products {
|
|
|
3034
4527
|
}
|
|
3035
4528
|
|
|
3036
4529
|
const apiPath = '/v1/products/{id}'.replace('{id}', id);
|
|
3037
|
-
const
|
|
4530
|
+
const apiPayload: Payload = {};
|
|
3038
4531
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3039
4532
|
|
|
3040
4533
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3044,46 +4537,117 @@ export class Products {
|
|
|
3044
4537
|
'get',
|
|
3045
4538
|
uri,
|
|
3046
4539
|
apiHeaders,
|
|
3047
|
-
|
|
4540
|
+
apiPayload
|
|
3048
4541
|
);
|
|
3049
4542
|
}
|
|
3050
4543
|
|
|
3051
4544
|
/**
|
|
3052
4545
|
*
|
|
3053
4546
|
* @param {string} params.id -
|
|
4547
|
+
* @param {object} params.attributeValues -
|
|
4548
|
+
* @param {object} params.completeness -
|
|
4549
|
+
* @param {string} params.deletedAt -
|
|
4550
|
+
* @param {boolean} params.enabled -
|
|
4551
|
+
* @param {string} params.familyId -
|
|
4552
|
+
* @param {string} params.familyVariantId -
|
|
4553
|
+
* @param {string} params.kind -
|
|
4554
|
+
* @param {string} params.parentId -
|
|
4555
|
+
* @param {object} params.quantifiedAssociations -
|
|
4556
|
+
* @param {string} params.sku -
|
|
3054
4557
|
* @throws {RevenexxException}
|
|
3055
4558
|
* @returns {Promise<Models.Products>}
|
|
3056
4559
|
*/
|
|
3057
|
-
productsUpdate(params: { id: string }): Promise<Models.Products>;
|
|
4560
|
+
productsUpdate(params: { id: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object, sku?: string }): Promise<Models.Products>;
|
|
3058
4561
|
/**
|
|
3059
4562
|
*
|
|
3060
4563
|
* @param {string} id -
|
|
4564
|
+
* @param {object} attributeValues -
|
|
4565
|
+
* @param {object} completeness -
|
|
4566
|
+
* @param {string} deletedAt -
|
|
4567
|
+
* @param {boolean} enabled -
|
|
4568
|
+
* @param {string} familyId -
|
|
4569
|
+
* @param {string} familyVariantId -
|
|
4570
|
+
* @param {string} kind -
|
|
4571
|
+
* @param {string} parentId -
|
|
4572
|
+
* @param {object} quantifiedAssociations -
|
|
4573
|
+
* @param {string} sku -
|
|
3061
4574
|
* @throws {RevenexxException}
|
|
3062
4575
|
* @returns {Promise<Models.Products>}
|
|
3063
4576
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3064
4577
|
*/
|
|
3065
|
-
productsUpdate(id: string): Promise<Models.Products>;
|
|
4578
|
+
productsUpdate(id: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object, sku?: string): Promise<Models.Products>;
|
|
3066
4579
|
productsUpdate(
|
|
3067
|
-
paramsOrFirst: { id: string } | string
|
|
4580
|
+
paramsOrFirst: { id: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object, sku?: string } | string,
|
|
4581
|
+
...rest: [(object)?, (object)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (string)?, (object)?, (string)?]
|
|
3068
4582
|
): Promise<Models.Products> {
|
|
3069
|
-
let params: { id: string };
|
|
4583
|
+
let params: { id: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object, sku?: string };
|
|
3070
4584
|
|
|
3071
4585
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3072
|
-
params = (paramsOrFirst || {}) as { id: string };
|
|
4586
|
+
params = (paramsOrFirst || {}) as { id: string, attributeValues?: object, completeness?: object, deletedAt?: string, enabled?: boolean, familyId?: string, familyVariantId?: string, kind?: string, parentId?: string, quantifiedAssociations?: object, sku?: string };
|
|
3073
4587
|
} else {
|
|
3074
4588
|
params = {
|
|
3075
|
-
id: paramsOrFirst as string
|
|
4589
|
+
id: paramsOrFirst as string,
|
|
4590
|
+
attributeValues: rest[0] as object,
|
|
4591
|
+
completeness: rest[1] as object,
|
|
4592
|
+
deletedAt: rest[2] as string,
|
|
4593
|
+
enabled: rest[3] as boolean,
|
|
4594
|
+
familyId: rest[4] as string,
|
|
4595
|
+
familyVariantId: rest[5] as string,
|
|
4596
|
+
kind: rest[6] as string,
|
|
4597
|
+
parentId: rest[7] as string,
|
|
4598
|
+
quantifiedAssociations: rest[8] as object,
|
|
4599
|
+
sku: rest[9] as string
|
|
3076
4600
|
};
|
|
3077
4601
|
}
|
|
3078
4602
|
|
|
3079
4603
|
const id = params.id;
|
|
4604
|
+
const attributeValues = params.attributeValues;
|
|
4605
|
+
const completeness = params.completeness;
|
|
4606
|
+
const deletedAt = params.deletedAt;
|
|
4607
|
+
const enabled = params.enabled;
|
|
4608
|
+
const familyId = params.familyId;
|
|
4609
|
+
const familyVariantId = params.familyVariantId;
|
|
4610
|
+
const kind = params.kind;
|
|
4611
|
+
const parentId = params.parentId;
|
|
4612
|
+
const quantifiedAssociations = params.quantifiedAssociations;
|
|
4613
|
+
const sku = params.sku;
|
|
3080
4614
|
|
|
3081
4615
|
if (typeof id === 'undefined') {
|
|
3082
4616
|
throw new RevenexxException('Missing required parameter: "id"');
|
|
3083
4617
|
}
|
|
3084
4618
|
|
|
3085
4619
|
const apiPath = '/v1/products/{id}'.replace('{id}', id);
|
|
3086
|
-
const
|
|
4620
|
+
const apiPayload: Payload = {};
|
|
4621
|
+
if (typeof attributeValues !== 'undefined') {
|
|
4622
|
+
apiPayload['attribute_values'] = attributeValues;
|
|
4623
|
+
}
|
|
4624
|
+
if (typeof completeness !== 'undefined') {
|
|
4625
|
+
apiPayload['completeness'] = completeness;
|
|
4626
|
+
}
|
|
4627
|
+
if (typeof deletedAt !== 'undefined') {
|
|
4628
|
+
apiPayload['deleted_at'] = deletedAt;
|
|
4629
|
+
}
|
|
4630
|
+
if (typeof enabled !== 'undefined') {
|
|
4631
|
+
apiPayload['enabled'] = enabled;
|
|
4632
|
+
}
|
|
4633
|
+
if (typeof familyId !== 'undefined') {
|
|
4634
|
+
apiPayload['family_id'] = familyId;
|
|
4635
|
+
}
|
|
4636
|
+
if (typeof familyVariantId !== 'undefined') {
|
|
4637
|
+
apiPayload['family_variant_id'] = familyVariantId;
|
|
4638
|
+
}
|
|
4639
|
+
if (typeof kind !== 'undefined') {
|
|
4640
|
+
apiPayload['kind'] = kind;
|
|
4641
|
+
}
|
|
4642
|
+
if (typeof parentId !== 'undefined') {
|
|
4643
|
+
apiPayload['parent_id'] = parentId;
|
|
4644
|
+
}
|
|
4645
|
+
if (typeof quantifiedAssociations !== 'undefined') {
|
|
4646
|
+
apiPayload['quantified_associations'] = quantifiedAssociations;
|
|
4647
|
+
}
|
|
4648
|
+
if (typeof sku !== 'undefined') {
|
|
4649
|
+
apiPayload['sku'] = sku;
|
|
4650
|
+
}
|
|
3087
4651
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3088
4652
|
|
|
3089
4653
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3094,7 +4658,7 @@ export class Products {
|
|
|
3094
4658
|
'put',
|
|
3095
4659
|
uri,
|
|
3096
4660
|
apiHeaders,
|
|
3097
|
-
|
|
4661
|
+
apiPayload
|
|
3098
4662
|
);
|
|
3099
4663
|
}
|
|
3100
4664
|
}
|