@teemill/product-catalog 1.43.0 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/product-catalog@1.43.0
1
+ ## @teemill/product-catalog@1.45.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/product-catalog@1.43.0 --save
39
+ npm install @teemill/product-catalog@1.45.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage your Product Catalog. A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
6
6
  *
7
- * The version of the OpenAPI document: 1.43.0
7
+ * The version of the OpenAPI document: 1.45.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -146,7 +146,13 @@ export interface ApplicationSet {
146
146
  * @type {string}
147
147
  * @memberof ApplicationSet
148
148
  */
149
- 'id'?: string;
149
+ 'id': string;
150
+ /**
151
+ * A reference to the resource location
152
+ * @type {string}
153
+ * @memberof ApplicationSet
154
+ */
155
+ 'ref': string;
150
156
  /**
151
157
  * Name of the application set
152
158
  * @type {string}
@@ -182,7 +188,19 @@ export interface ApplicationSet {
182
188
  * @type {Array<ApplicationSetRecord>}
183
189
  * @memberof ApplicationSet
184
190
  */
185
- 'records'?: Array<ApplicationSetRecord>;
191
+ 'records': Array<ApplicationSetRecord>;
192
+ /**
193
+ *
194
+ * @type {string}
195
+ * @memberof ApplicationSet
196
+ */
197
+ 'createdAt': string;
198
+ /**
199
+ *
200
+ * @type {string}
201
+ * @memberof ApplicationSet
202
+ */
203
+ 'updatedAt': string;
186
204
  }
187
205
  /**
188
206
  *
@@ -267,10 +285,10 @@ export interface Attribute {
267
285
  'value': string;
268
286
  /**
269
287
  *
270
- * @type {CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail}
288
+ * @type {AttributeThumbnail}
271
289
  * @memberof Attribute
272
290
  */
273
- 'thumbnail'?: CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail;
291
+ 'thumbnail'?: AttributeThumbnail;
274
292
  /**
275
293
  * Attribute tags
276
294
  * @type {Array<string>}
@@ -278,6 +296,34 @@ export interface Attribute {
278
296
  */
279
297
  'tags'?: Array<string>;
280
298
  }
299
+ /**
300
+ * Attribute thumbnail, intended for interfaces like storefront colour selector.
301
+ * @export
302
+ * @interface AttributeThumbnail
303
+ */
304
+ export interface AttributeThumbnail {
305
+ /**
306
+ *
307
+ * @type {string}
308
+ * @memberof AttributeThumbnail
309
+ */
310
+ 'type'?: AttributeThumbnailTypeEnum;
311
+ /**
312
+ *
313
+ * @type {string}
314
+ * @memberof AttributeThumbnail
315
+ */
316
+ 'value'?: string;
317
+ }
318
+
319
+ export const AttributeThumbnailTypeEnum = {
320
+ Text: 'text',
321
+ Color: 'color',
322
+ Image: 'image'
323
+ } as const;
324
+
325
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
326
+
281
327
  /**
282
328
  *
283
329
  * @export
@@ -338,7 +384,7 @@ export interface CreateApplicationSetRequest {
338
384
  * @type {string}
339
385
  * @memberof CreateApplicationSetRequest
340
386
  */
341
- 'name'?: string;
387
+ 'name': string;
342
388
  /**
343
389
  * Description of the application set
344
390
  * @type {string}
@@ -350,25 +396,25 @@ export interface CreateApplicationSetRequest {
350
396
  * @type {number}
351
397
  * @memberof CreateApplicationSetRequest
352
398
  */
353
- 'width'?: number;
399
+ 'width': number;
354
400
  /**
355
401
  * The height, in pixels of the images in the set
356
402
  * @type {number}
357
403
  * @memberof CreateApplicationSetRequest
358
404
  */
359
- 'height'?: number;
405
+ 'height': number;
360
406
  /**
361
407
  * The DPI used when printing the images in the set
362
408
  * @type {number}
363
409
  * @memberof CreateApplicationSetRequest
364
410
  */
365
- 'dpi'?: number;
411
+ 'dpi': number;
366
412
  /**
367
413
  * List of application set records
368
414
  * @type {Array<CreateApplicationSetRequestRecordsInner>}
369
415
  * @memberof CreateApplicationSetRequest
370
416
  */
371
- 'records'?: Array<CreateApplicationSetRequestRecordsInner>;
417
+ 'records': Array<CreateApplicationSetRequestRecordsInner>;
372
418
  }
373
419
  /**
374
420
  *
@@ -377,7 +423,7 @@ export interface CreateApplicationSetRequest {
377
423
  */
378
424
  export interface CreateApplicationSetRequestRecordsInner {
379
425
  /**
380
- * List of attributes this record applies to
426
+ * List of attributes this record applies to. Providing an empty array will apply the application set to all variants.
381
427
  * @type {Array<CreateApplicationSetRequestRecordsInnerAttributesInner>}
382
428
  * @memberof CreateApplicationSetRequestRecordsInner
383
429
  */
@@ -400,48 +446,14 @@ export interface CreateApplicationSetRequestRecordsInnerAttributesInner {
400
446
  * @type {string}
401
447
  * @memberof CreateApplicationSetRequestRecordsInnerAttributesInner
402
448
  */
403
- 'name'?: string;
449
+ 'name': string;
404
450
  /**
405
451
  * The value of the option this record applies to
406
452
  * @type {string}
407
453
  * @memberof CreateApplicationSetRequestRecordsInnerAttributesInner
408
454
  */
409
- 'value'?: string;
410
- /**
411
- *
412
- * @type {CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail}
413
- * @memberof CreateApplicationSetRequestRecordsInnerAttributesInner
414
- */
415
- 'thumbnail'?: CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail;
455
+ 'value': string;
416
456
  }
417
- /**
418
- * Attribute thumbnail, intended for interfaces like storefront colour selector.
419
- * @export
420
- * @interface CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail
421
- */
422
- export interface CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail {
423
- /**
424
- *
425
- * @type {string}
426
- * @memberof CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail
427
- */
428
- 'type'?: CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnailTypeEnum;
429
- /**
430
- *
431
- * @type {string}
432
- * @memberof CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnail
433
- */
434
- 'value'?: string;
435
- }
436
-
437
- export const CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnailTypeEnum = {
438
- Text: 'text',
439
- Color: 'color',
440
- Image: 'image'
441
- } as const;
442
-
443
- export type CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnailTypeEnum = typeof CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnailTypeEnum[keyof typeof CreateApplicationSetRequestRecordsInnerAttributesInnerThumbnailTypeEnum];
444
-
445
457
  /**
446
458
  *
447
459
  * @export
@@ -758,12 +770,6 @@ export interface CreateProductVariant {
758
770
  * @memberof CreateProductVariant
759
771
  */
760
772
  'images'?: Array<CreateProductVariantImagesInner>;
761
- /**
762
- * List of application set UUIDs to associate with this variant
763
- * @type {Array<string>}
764
- * @memberof CreateProductVariant
765
- */
766
- 'applicationSets'?: Array<string>;
767
773
  /**
768
774
  * The GTIN (Global Trade Item Number) or EAN (European Article Number) of the variant. Please note that a barcode can only be attached after the Barcodes module has been installed.
769
775
  * @type {string}
@@ -803,6 +809,38 @@ export interface CreateProductVideosInner {
803
809
  */
804
810
  'src'?: string;
805
811
  }
812
+ /**
813
+ *
814
+ * @export
815
+ * @interface DuplicateProducts202Response
816
+ */
817
+ export interface DuplicateProducts202Response {
818
+ /**
819
+ * A message describing the duplication status
820
+ * @type {string}
821
+ * @memberof DuplicateProducts202Response
822
+ */
823
+ 'message'?: string;
824
+ }
825
+ /**
826
+ *
827
+ * @export
828
+ * @interface DuplicateProductsRequest
829
+ */
830
+ export interface DuplicateProductsRequest {
831
+ /**
832
+ * A set of product IDs to duplicate.
833
+ * @type {Array<string>}
834
+ * @memberof DuplicateProductsRequest
835
+ */
836
+ 'ids': Array<string>;
837
+ /**
838
+ * A set of project IDs to duplicate the products to.
839
+ * @type {Array<string>}
840
+ * @memberof DuplicateProductsRequest
841
+ */
842
+ 'projects': Array<string>;
843
+ }
806
844
  /**
807
845
  * Image description
808
846
  * @export
@@ -1349,12 +1387,6 @@ export interface TargetSearchPhraseData {
1349
1387
  * @interface UpdateApplicationSetRequest
1350
1388
  */
1351
1389
  export interface UpdateApplicationSetRequest {
1352
- /**
1353
- *
1354
- * @type {string}
1355
- * @memberof UpdateApplicationSetRequest
1356
- */
1357
- 'id'?: string;
1358
1390
  /**
1359
1391
  * Name of the application set
1360
1392
  * @type {string}
@@ -1399,7 +1431,7 @@ export interface UpdateApplicationSetRequest {
1399
1431
  */
1400
1432
  export interface UpdateApplicationSetRequestRecordsInner {
1401
1433
  /**
1402
- * List of attributes this record applies to
1434
+ * List of attributes this record applies to. Providing an empty array will apply the application set to all variants.
1403
1435
  * @type {Array<UpdateApplicationSetRequestRecordsInnerAttributesInner>}
1404
1436
  * @memberof UpdateApplicationSetRequestRecordsInner
1405
1437
  */
@@ -2712,6 +2744,54 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
2712
2744
  options: localVarRequestOptions,
2713
2745
  };
2714
2746
  },
2747
+ /**
2748
+ * Duplicate products by a set of given IDs to a set of given project IDs.
2749
+ * @summary Duplicate products.
2750
+ * @param {string} project What project it is
2751
+ * @param {DuplicateProductsRequest} [duplicateProductsRequest] A set of product IDs to duplicate and the project IDs to duplicate them to.
2752
+ * @param {*} [options] Override http request option.
2753
+ * @throws {RequiredError}
2754
+ */
2755
+ duplicateProducts: async (project: string, duplicateProductsRequest?: DuplicateProductsRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2756
+ // verify required parameter 'project' is not null or undefined
2757
+ assertParamExists('duplicateProducts', 'project', project)
2758
+ const localVarPath = `/v1/catalog/products/duplicate`;
2759
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2760
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2761
+ let baseOptions;
2762
+ if (configuration) {
2763
+ baseOptions = configuration.baseOptions;
2764
+ }
2765
+
2766
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2767
+ const localVarHeaderParameter = {} as any;
2768
+ const localVarQueryParameter = {} as any;
2769
+
2770
+ // authentication session-oauth required
2771
+ // oauth required
2772
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2773
+
2774
+ // authentication api-key required
2775
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2776
+
2777
+ if (project !== undefined) {
2778
+ localVarQueryParameter['project'] = project;
2779
+ }
2780
+
2781
+
2782
+
2783
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2784
+
2785
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2786
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2787
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2788
+ localVarRequestOptions.data = serializeDataIfNeeded(duplicateProductsRequest, localVarRequestOptions, configuration)
2789
+
2790
+ return {
2791
+ url: toPathString(localVarUrlObj),
2792
+ options: localVarRequestOptions,
2793
+ };
2794
+ },
2715
2795
  /**
2716
2796
  * Gets a product by a given ID.
2717
2797
  * @summary Get product
@@ -3070,6 +3150,20 @@ export const ProductsApiFp = function(configuration?: Configuration) {
3070
3150
  const localVarOperationServerBasePath = operationServerMap['ProductsApi.deleteProduct']?.[localVarOperationServerIndex]?.url;
3071
3151
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3072
3152
  },
3153
+ /**
3154
+ * Duplicate products by a set of given IDs to a set of given project IDs.
3155
+ * @summary Duplicate products.
3156
+ * @param {string} project What project it is
3157
+ * @param {DuplicateProductsRequest} [duplicateProductsRequest] A set of product IDs to duplicate and the project IDs to duplicate them to.
3158
+ * @param {*} [options] Override http request option.
3159
+ * @throws {RequiredError}
3160
+ */
3161
+ async duplicateProducts(project: string, duplicateProductsRequest?: DuplicateProductsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DuplicateProducts202Response>> {
3162
+ const localVarAxiosArgs = await localVarAxiosParamCreator.duplicateProducts(project, duplicateProductsRequest, options);
3163
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3164
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.duplicateProducts']?.[localVarOperationServerIndex]?.url;
3165
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3166
+ },
3073
3167
  /**
3074
3168
  * Gets a product by a given ID.
3075
3169
  * @summary Get product
@@ -3190,6 +3284,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
3190
3284
  deleteProduct(requestParameters: ProductsApiDeleteProductRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3191
3285
  return localVarFp.deleteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(axios, basePath));
3192
3286
  },
3287
+ /**
3288
+ * Duplicate products by a set of given IDs to a set of given project IDs.
3289
+ * @summary Duplicate products.
3290
+ * @param {ProductsApiDuplicateProductsRequest} requestParameters Request parameters.
3291
+ * @param {*} [options] Override http request option.
3292
+ * @throws {RequiredError}
3293
+ */
3294
+ duplicateProducts(requestParameters: ProductsApiDuplicateProductsRequest, options?: RawAxiosRequestConfig): AxiosPromise<DuplicateProducts202Response> {
3295
+ return localVarFp.duplicateProducts(requestParameters.project, requestParameters.duplicateProductsRequest, options).then((request) => request(axios, basePath));
3296
+ },
3193
3297
  /**
3194
3298
  * Gets a product by a given ID.
3195
3299
  * @summary Get product
@@ -3295,6 +3399,27 @@ export interface ProductsApiDeleteProductRequest {
3295
3399
  readonly productId: string
3296
3400
  }
3297
3401
 
3402
+ /**
3403
+ * Request parameters for duplicateProducts operation in ProductsApi.
3404
+ * @export
3405
+ * @interface ProductsApiDuplicateProductsRequest
3406
+ */
3407
+ export interface ProductsApiDuplicateProductsRequest {
3408
+ /**
3409
+ * What project it is
3410
+ * @type {string}
3411
+ * @memberof ProductsApiDuplicateProducts
3412
+ */
3413
+ readonly project: string
3414
+
3415
+ /**
3416
+ * A set of product IDs to duplicate and the project IDs to duplicate them to.
3417
+ * @type {DuplicateProductsRequest}
3418
+ * @memberof ProductsApiDuplicateProducts
3419
+ */
3420
+ readonly duplicateProductsRequest?: DuplicateProductsRequest
3421
+ }
3422
+
3298
3423
  /**
3299
3424
  * Request parameters for getProduct operation in ProductsApi.
3300
3425
  * @export
@@ -3494,6 +3619,18 @@ export class ProductsApi extends BaseAPI {
3494
3619
  return ProductsApiFp(this.configuration).deleteProduct(requestParameters.project, requestParameters.productId, options).then((request) => request(this.axios, this.basePath));
3495
3620
  }
3496
3621
 
3622
+ /**
3623
+ * Duplicate products by a set of given IDs to a set of given project IDs.
3624
+ * @summary Duplicate products.
3625
+ * @param {ProductsApiDuplicateProductsRequest} requestParameters Request parameters.
3626
+ * @param {*} [options] Override http request option.
3627
+ * @throws {RequiredError}
3628
+ * @memberof ProductsApi
3629
+ */
3630
+ public duplicateProducts(requestParameters: ProductsApiDuplicateProductsRequest, options?: RawAxiosRequestConfig) {
3631
+ return ProductsApiFp(this.configuration).duplicateProducts(requestParameters.project, requestParameters.duplicateProductsRequest, options).then((request) => request(this.axios, this.basePath));
3632
+ }
3633
+
3497
3634
  /**
3498
3635
  * Gets a product by a given ID.
3499
3636
  * @summary Get product
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage your Product Catalog. A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
6
6
  *
7
- * The version of the OpenAPI document: 1.43.0
7
+ * The version of the OpenAPI document: 1.45.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage your Product Catalog. A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
6
6
  *
7
- * The version of the OpenAPI document: 1.43.0
7
+ * The version of the OpenAPI document: 1.45.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage your Product Catalog. A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
6
6
  *
7
- * The version of the OpenAPI document: 1.43.0
7
+ * The version of the OpenAPI document: 1.45.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).