@teemill/product-catalog 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ProductsApi.d.ts +30 -2
  4. package/dist/apis/ProductsApi.js +129 -1
  5. package/dist/apis/VariantsApi.d.ts +1 -1
  6. package/dist/apis/VariantsApi.js +1 -1
  7. package/dist/models/ApiError.d.ts +1 -1
  8. package/dist/models/ApiError.js +1 -1
  9. package/dist/models/Attribute.d.ts +1 -1
  10. package/dist/models/Attribute.js +1 -1
  11. package/dist/models/AttributeThumbnail.d.ts +1 -1
  12. package/dist/models/AttributeThumbnail.js +1 -1
  13. package/dist/models/CreateProductRequest.d.ts +75 -0
  14. package/dist/models/CreateProductRequest.js +68 -0
  15. package/dist/models/CreateProductRequestAdditionalFilesInner.d.ts +31 -0
  16. package/dist/models/CreateProductRequestAdditionalFilesInner.js +50 -0
  17. package/dist/models/CreateProductRequestVariantsInner.d.ts +52 -0
  18. package/dist/models/CreateProductRequestVariantsInner.js +59 -0
  19. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +59 -0
  20. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.js +68 -0
  21. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +37 -0
  22. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.js +52 -0
  23. package/dist/models/Image.d.ts +1 -1
  24. package/dist/models/Image.js +1 -1
  25. package/dist/models/Price.d.ts +1 -1
  26. package/dist/models/Price.js +1 -1
  27. package/dist/models/Product.d.ts +8 -1
  28. package/dist/models/Product.js +4 -1
  29. package/dist/models/ProductAdditionalFilesInner.d.ts +37 -0
  30. package/dist/models/ProductAdditionalFilesInner.js +52 -0
  31. package/dist/models/ProductsResponse.d.ts +1 -1
  32. package/dist/models/ProductsResponse.js +1 -1
  33. package/dist/models/Stock.d.ts +1 -1
  34. package/dist/models/Stock.js +1 -1
  35. package/dist/models/Variant.d.ts +1 -1
  36. package/dist/models/Variant.js +1 -1
  37. package/dist/models/VariantProduct.d.ts +1 -1
  38. package/dist/models/VariantProduct.js +1 -1
  39. package/dist/models/VariantsResponse.d.ts +1 -1
  40. package/dist/models/VariantsResponse.js +1 -1
  41. package/dist/models/index.d.ts +6 -0
  42. package/dist/models/index.js +6 -0
  43. package/dist/runtime.d.ts +1 -1
  44. package/dist/runtime.js +1 -1
  45. package/package.json +1 -1
  46. package/src/apis/ProductsApi.ts +130 -1
  47. package/src/apis/VariantsApi.ts +1 -1
  48. package/src/models/ApiError.ts +1 -1
  49. package/src/models/Attribute.ts +1 -1
  50. package/src/models/AttributeThumbnail.ts +1 -1
  51. package/src/models/CreateProductRequest.ts +136 -0
  52. package/src/models/CreateProductRequestAdditionalFilesInner.ts +65 -0
  53. package/src/models/CreateProductRequestVariantsInner.ts +108 -0
  54. package/src/models/CreateProductRequestVariantsInnerApplicationsInner.ts +101 -0
  55. package/src/models/CreateProductRequestVariantsInnerAttributesInner.ts +73 -0
  56. package/src/models/Image.ts +1 -1
  57. package/src/models/Price.ts +1 -1
  58. package/src/models/Product.ts +15 -1
  59. package/src/models/ProductAdditionalFilesInner.ts +73 -0
  60. package/src/models/ProductsResponse.ts +1 -1
  61. package/src/models/Stock.ts +1 -1
  62. package/src/models/Variant.ts +1 -1
  63. package/src/models/VariantProduct.ts +1 -1
  64. package/src/models/VariantsResponse.ts +1 -1
  65. package/src/models/index.ts +6 -0
  66. package/src/runtime.ts +1 -1
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.4.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,18 +16,26 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  ApiError,
19
+ CreateProductRequest,
19
20
  Product,
20
21
  ProductsResponse,
21
22
  } from '../models/index';
22
23
  import {
23
24
  ApiErrorFromJSON,
24
25
  ApiErrorToJSON,
26
+ CreateProductRequestFromJSON,
27
+ CreateProductRequestToJSON,
25
28
  ProductFromJSON,
26
29
  ProductToJSON,
27
30
  ProductsResponseFromJSON,
28
31
  ProductsResponseToJSON,
29
32
  } from '../models/index';
30
33
 
34
+ export interface CreateProductOperationRequest {
35
+ project: string;
36
+ createProductRequest?: CreateProductRequest;
37
+ }
38
+
31
39
  export interface GetProductRequest {
32
40
  project: string;
33
41
  productId: string;
@@ -41,11 +49,75 @@ export interface GetProductsRequest {
41
49
  fields?: string;
42
50
  }
43
51
 
52
+ export interface ImportProductsRequest {
53
+ project: string;
54
+ body?: string;
55
+ }
56
+
44
57
  /**
45
58
  *
46
59
  */
47
60
  export class ProductsApi extends runtime.BaseAPI {
48
61
 
62
+ /**
63
+ * Creates a catalog product
64
+ * Create catalog product
65
+ */
66
+ async createProductRaw(requestParameters: CreateProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Product>> {
67
+ if (requestParameters.project === null || requestParameters.project === undefined) {
68
+ throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling createProduct.');
69
+ }
70
+
71
+ const queryParameters: any = {};
72
+
73
+ if (requestParameters.project !== undefined) {
74
+ queryParameters['project'] = requestParameters.project;
75
+ }
76
+
77
+ const headerParameters: runtime.HTTPHeaders = {};
78
+
79
+ headerParameters['Content-Type'] = 'application/json';
80
+
81
+ if (this.configuration && this.configuration.accessToken) {
82
+ // oauth required
83
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
84
+ }
85
+
86
+ if (this.configuration && this.configuration.apiKey) {
87
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
88
+ }
89
+
90
+ const response = await this.request({
91
+ path: `/v1/catalog/products`,
92
+ method: 'POST',
93
+ headers: headerParameters,
94
+ query: queryParameters,
95
+ body: CreateProductRequestToJSON(requestParameters.createProductRequest),
96
+ }, initOverrides);
97
+
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => ProductFromJSON(jsonValue));
99
+ }
100
+
101
+ /**
102
+ * Creates a catalog product
103
+ * Create catalog product
104
+ */
105
+ async createProduct(
106
+ project: string,
107
+ optionalParameters: runtime.OptionalOnly<CreateProductOperationRequest> = {},
108
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
109
+ ): Promise<Product> {
110
+ const response = await this.createProductRaw(
111
+ {
112
+ project: project,
113
+ ...optionalParameters,
114
+ },
115
+ initOverrides
116
+ );
117
+
118
+ return await response.value();
119
+ }
120
+
49
121
  /**
50
122
  * Gets a product by the given id
51
123
  * Get product
@@ -178,4 +250,61 @@ export class ProductsApi extends runtime.BaseAPI {
178
250
  return await response.value();
179
251
  }
180
252
 
253
+ /**
254
+ * Import products
255
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
256
+ */
257
+ async importProductsRaw(requestParameters: ImportProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
258
+ if (requestParameters.project === null || requestParameters.project === undefined) {
259
+ throw new runtime.RequiredError('project','Required parameter requestParameters.project was null or undefined when calling importProducts.');
260
+ }
261
+
262
+ const queryParameters: any = {};
263
+
264
+ if (requestParameters.project !== undefined) {
265
+ queryParameters['project'] = requestParameters.project;
266
+ }
267
+
268
+ const headerParameters: runtime.HTTPHeaders = {};
269
+
270
+ headerParameters['Content-Type'] = 'text/csv';
271
+
272
+ if (this.configuration && this.configuration.accessToken) {
273
+ // oauth required
274
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
275
+ }
276
+
277
+ if (this.configuration && this.configuration.apiKey) {
278
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
279
+ }
280
+
281
+ const response = await this.request({
282
+ path: `/v1/catalog/products/import`,
283
+ method: 'POST',
284
+ headers: headerParameters,
285
+ query: queryParameters,
286
+ body: requestParameters.body as any,
287
+ }, initOverrides);
288
+
289
+ return new runtime.VoidApiResponse(response);
290
+ }
291
+
292
+ /**
293
+ * Import products
294
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
295
+ */
296
+ async importProducts(
297
+ project: string,
298
+ optionalParameters: runtime.OptionalOnly<ImportProductsRequest> = {},
299
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
300
+ ): Promise<void> {
301
+ await this.importProductsRaw(
302
+ {
303
+ project: project,
304
+ ...optionalParameters,
305
+ },
306
+ initOverrides
307
+ );
308
+ }
309
+
181
310
  }
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.4.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.4.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.4.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Product Catalog API
5
5
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
6
  *
7
- * The version of the OpenAPI document: 1.4.0
7
+ * The version of the OpenAPI document: 1.5.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -0,0 +1,136 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Product Catalog API
5
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { CreateProductRequestAdditionalFilesInner } from './CreateProductRequestAdditionalFilesInner';
17
+ import {
18
+ CreateProductRequestAdditionalFilesInnerFromJSON,
19
+ CreateProductRequestAdditionalFilesInnerFromJSONTyped,
20
+ CreateProductRequestAdditionalFilesInnerToJSON,
21
+ } from './CreateProductRequestAdditionalFilesInner';
22
+ import type { CreateProductRequestVariantsInner } from './CreateProductRequestVariantsInner';
23
+ import {
24
+ CreateProductRequestVariantsInnerFromJSON,
25
+ CreateProductRequestVariantsInnerFromJSONTyped,
26
+ CreateProductRequestVariantsInnerToJSON,
27
+ } from './CreateProductRequestVariantsInner';
28
+
29
+ /**
30
+ *
31
+ * @export
32
+ * @interface CreateProductRequest
33
+ */
34
+ export interface CreateProductRequest {
35
+ /**
36
+ * GFN product ref
37
+ * @type {string}
38
+ * @memberof CreateProductRequest
39
+ */
40
+ gfnProductRef: string;
41
+ /**
42
+ * Product title
43
+ * @type {string}
44
+ * @memberof CreateProductRequest
45
+ */
46
+ title?: string;
47
+ /**
48
+ * Product description
49
+ * @type {string}
50
+ * @memberof CreateProductRequest
51
+ */
52
+ description?: string;
53
+ /**
54
+ * Whether the product is enabled
55
+ * @type {boolean}
56
+ * @memberof CreateProductRequest
57
+ */
58
+ enabled?: boolean;
59
+ /**
60
+ * A custom url slug for the product
61
+ * @type {string}
62
+ * @memberof CreateProductRequest
63
+ */
64
+ slug?: string;
65
+ /**
66
+ * Product tags
67
+ * @type {Array<string>}
68
+ * @memberof CreateProductRequest
69
+ */
70
+ tags?: Array<string>;
71
+ /**
72
+ * Variants
73
+ * @type {Array<CreateProductRequestVariantsInner>}
74
+ * @memberof CreateProductRequest
75
+ */
76
+ variants: Array<CreateProductRequestVariantsInner>;
77
+ /**
78
+ * Additional files
79
+ * @type {Array<CreateProductRequestAdditionalFilesInner>}
80
+ * @memberof CreateProductRequest
81
+ */
82
+ additionalFiles?: Array<CreateProductRequestAdditionalFilesInner>;
83
+ }
84
+
85
+ /**
86
+ * Check if a given object implements the CreateProductRequest interface.
87
+ */
88
+ export function instanceOfCreateProductRequest(value: object): boolean {
89
+ let isInstance = true;
90
+ isInstance = isInstance && "gfnProductRef" in value;
91
+ isInstance = isInstance && "variants" in value;
92
+
93
+ return isInstance;
94
+ }
95
+
96
+ export function CreateProductRequestFromJSON(json: any): CreateProductRequest {
97
+ return CreateProductRequestFromJSONTyped(json, false);
98
+ }
99
+
100
+ export function CreateProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequest {
101
+ if ((json === undefined) || (json === null)) {
102
+ return json;
103
+ }
104
+ return {
105
+
106
+ 'gfnProductRef': json['gfnProductRef'],
107
+ 'title': !exists(json, 'title') ? undefined : json['title'],
108
+ 'description': !exists(json, 'description') ? undefined : json['description'],
109
+ 'enabled': !exists(json, 'enabled') ? undefined : json['enabled'],
110
+ 'slug': !exists(json, 'slug') ? undefined : json['slug'],
111
+ 'tags': !exists(json, 'tags') ? undefined : json['tags'],
112
+ 'variants': ((json['variants'] as Array<any>).map(CreateProductRequestVariantsInnerFromJSON)),
113
+ 'additionalFiles': !exists(json, 'additionalFiles') ? undefined : ((json['additionalFiles'] as Array<any>).map(CreateProductRequestAdditionalFilesInnerFromJSON)),
114
+ };
115
+ }
116
+
117
+ export function CreateProductRequestToJSON(value?: CreateProductRequest | null): any {
118
+ if (value === undefined) {
119
+ return undefined;
120
+ }
121
+ if (value === null) {
122
+ return null;
123
+ }
124
+ return {
125
+
126
+ 'gfnProductRef': value.gfnProductRef,
127
+ 'title': value.title,
128
+ 'description': value.description,
129
+ 'enabled': value.enabled,
130
+ 'slug': value.slug,
131
+ 'tags': value.tags,
132
+ 'variants': ((value.variants as Array<any>).map(CreateProductRequestVariantsInnerToJSON)),
133
+ 'additionalFiles': value.additionalFiles === undefined ? undefined : ((value.additionalFiles as Array<any>).map(CreateProductRequestAdditionalFilesInnerToJSON)),
134
+ };
135
+ }
136
+
@@ -0,0 +1,65 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Product Catalog API
5
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CreateProductRequestAdditionalFilesInner
20
+ */
21
+ export interface CreateProductRequestAdditionalFilesInner {
22
+ /**
23
+ * File url
24
+ * @type {string}
25
+ * @memberof CreateProductRequestAdditionalFilesInner
26
+ */
27
+ src?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the CreateProductRequestAdditionalFilesInner interface.
32
+ */
33
+ export function instanceOfCreateProductRequestAdditionalFilesInner(value: object): boolean {
34
+ let isInstance = true;
35
+
36
+ return isInstance;
37
+ }
38
+
39
+ export function CreateProductRequestAdditionalFilesInnerFromJSON(json: any): CreateProductRequestAdditionalFilesInner {
40
+ return CreateProductRequestAdditionalFilesInnerFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function CreateProductRequestAdditionalFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestAdditionalFilesInner {
44
+ if ((json === undefined) || (json === null)) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'src': !exists(json, 'src') ? undefined : json['src'],
50
+ };
51
+ }
52
+
53
+ export function CreateProductRequestAdditionalFilesInnerToJSON(value?: CreateProductRequestAdditionalFilesInner | null): any {
54
+ if (value === undefined) {
55
+ return undefined;
56
+ }
57
+ if (value === null) {
58
+ return null;
59
+ }
60
+ return {
61
+
62
+ 'src': value.src,
63
+ };
64
+ }
65
+
@@ -0,0 +1,108 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Product Catalog API
5
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { CreateProductRequestVariantsInnerApplicationsInner } from './CreateProductRequestVariantsInnerApplicationsInner';
17
+ import {
18
+ CreateProductRequestVariantsInnerApplicationsInnerFromJSON,
19
+ CreateProductRequestVariantsInnerApplicationsInnerFromJSONTyped,
20
+ CreateProductRequestVariantsInnerApplicationsInnerToJSON,
21
+ } from './CreateProductRequestVariantsInnerApplicationsInner';
22
+ import type { CreateProductRequestVariantsInnerAttributesInner } from './CreateProductRequestVariantsInnerAttributesInner';
23
+ import {
24
+ CreateProductRequestVariantsInnerAttributesInnerFromJSON,
25
+ CreateProductRequestVariantsInnerAttributesInnerFromJSONTyped,
26
+ CreateProductRequestVariantsInnerAttributesInnerToJSON,
27
+ } from './CreateProductRequestVariantsInnerAttributesInner';
28
+ import type { Price } from './Price';
29
+ import {
30
+ PriceFromJSON,
31
+ PriceFromJSONTyped,
32
+ PriceToJSON,
33
+ } from './Price';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface CreateProductRequestVariantsInner
39
+ */
40
+ export interface CreateProductRequestVariantsInner {
41
+ /**
42
+ * Variant attributes
43
+ * @type {Array<CreateProductRequestVariantsInnerAttributesInner>}
44
+ * @memberof CreateProductRequestVariantsInner
45
+ */
46
+ attributes?: Array<CreateProductRequestVariantsInnerAttributesInner>;
47
+ /**
48
+ *
49
+ * @type {Price}
50
+ * @memberof CreateProductRequestVariantsInner
51
+ */
52
+ retailPrice?: Price;
53
+ /**
54
+ * A custom sku
55
+ * @type {string}
56
+ * @memberof CreateProductRequestVariantsInner
57
+ */
58
+ sku?: string;
59
+ /**
60
+ * Design applications.
61
+ * @type {Array<CreateProductRequestVariantsInnerApplicationsInner>}
62
+ * @memberof CreateProductRequestVariantsInner
63
+ */
64
+ applications?: Array<CreateProductRequestVariantsInnerApplicationsInner>;
65
+ }
66
+
67
+ /**
68
+ * Check if a given object implements the CreateProductRequestVariantsInner interface.
69
+ */
70
+ export function instanceOfCreateProductRequestVariantsInner(value: object): boolean {
71
+ let isInstance = true;
72
+
73
+ return isInstance;
74
+ }
75
+
76
+ export function CreateProductRequestVariantsInnerFromJSON(json: any): CreateProductRequestVariantsInner {
77
+ return CreateProductRequestVariantsInnerFromJSONTyped(json, false);
78
+ }
79
+
80
+ export function CreateProductRequestVariantsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestVariantsInner {
81
+ if ((json === undefined) || (json === null)) {
82
+ return json;
83
+ }
84
+ return {
85
+
86
+ 'attributes': !exists(json, 'attributes') ? undefined : ((json['attributes'] as Array<any>).map(CreateProductRequestVariantsInnerAttributesInnerFromJSON)),
87
+ 'retailPrice': !exists(json, 'retailPrice') ? undefined : PriceFromJSON(json['retailPrice']),
88
+ 'sku': !exists(json, 'sku') ? undefined : json['sku'],
89
+ 'applications': !exists(json, 'applications') ? undefined : ((json['applications'] as Array<any>).map(CreateProductRequestVariantsInnerApplicationsInnerFromJSON)),
90
+ };
91
+ }
92
+
93
+ export function CreateProductRequestVariantsInnerToJSON(value?: CreateProductRequestVariantsInner | null): any {
94
+ if (value === undefined) {
95
+ return undefined;
96
+ }
97
+ if (value === null) {
98
+ return null;
99
+ }
100
+ return {
101
+
102
+ 'attributes': value.attributes === undefined ? undefined : ((value.attributes as Array<any>).map(CreateProductRequestVariantsInnerAttributesInnerToJSON)),
103
+ 'retailPrice': PriceToJSON(value.retailPrice),
104
+ 'sku': value.sku,
105
+ 'applications': value.applications === undefined ? undefined : ((value.applications as Array<any>).map(CreateProductRequestVariantsInnerApplicationsInnerToJSON)),
106
+ };
107
+ }
108
+
@@ -0,0 +1,101 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Product Catalog API
5
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CreateProductRequestVariantsInnerApplicationsInner
20
+ */
21
+ export interface CreateProductRequestVariantsInnerApplicationsInner {
22
+ /**
23
+ * Technology to use for the application
24
+ * @type {string}
25
+ * @memberof CreateProductRequestVariantsInnerApplicationsInner
26
+ */
27
+ technology?: CreateProductRequestVariantsInnerApplicationsInnerTechnologyEnum;
28
+ /**
29
+ * Placement of the application
30
+ * @type {string}
31
+ * @memberof CreateProductRequestVariantsInnerApplicationsInner
32
+ */
33
+ placement?: CreateProductRequestVariantsInnerApplicationsInnerPlacementEnum;
34
+ /**
35
+ * Design file as either a url or base64 encoded string
36
+ * @type {string}
37
+ * @memberof CreateProductRequestVariantsInnerApplicationsInner
38
+ */
39
+ src?: string;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const CreateProductRequestVariantsInnerApplicationsInnerTechnologyEnum = {
47
+ Dtg: 'dtg',
48
+ Embroidery: 'embroidery'
49
+ } as const;
50
+ export type CreateProductRequestVariantsInnerApplicationsInnerTechnologyEnum = typeof CreateProductRequestVariantsInnerApplicationsInnerTechnologyEnum[keyof typeof CreateProductRequestVariantsInnerApplicationsInnerTechnologyEnum];
51
+
52
+ /**
53
+ * @export
54
+ */
55
+ export const CreateProductRequestVariantsInnerApplicationsInnerPlacementEnum = {
56
+ Front: 'front',
57
+ Back: 'back'
58
+ } as const;
59
+ export type CreateProductRequestVariantsInnerApplicationsInnerPlacementEnum = typeof CreateProductRequestVariantsInnerApplicationsInnerPlacementEnum[keyof typeof CreateProductRequestVariantsInnerApplicationsInnerPlacementEnum];
60
+
61
+
62
+ /**
63
+ * Check if a given object implements the CreateProductRequestVariantsInnerApplicationsInner interface.
64
+ */
65
+ export function instanceOfCreateProductRequestVariantsInnerApplicationsInner(value: object): boolean {
66
+ let isInstance = true;
67
+
68
+ return isInstance;
69
+ }
70
+
71
+ export function CreateProductRequestVariantsInnerApplicationsInnerFromJSON(json: any): CreateProductRequestVariantsInnerApplicationsInner {
72
+ return CreateProductRequestVariantsInnerApplicationsInnerFromJSONTyped(json, false);
73
+ }
74
+
75
+ export function CreateProductRequestVariantsInnerApplicationsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestVariantsInnerApplicationsInner {
76
+ if ((json === undefined) || (json === null)) {
77
+ return json;
78
+ }
79
+ return {
80
+
81
+ 'technology': !exists(json, 'technology') ? undefined : json['technology'],
82
+ 'placement': !exists(json, 'placement') ? undefined : json['placement'],
83
+ 'src': !exists(json, 'src') ? undefined : json['src'],
84
+ };
85
+ }
86
+
87
+ export function CreateProductRequestVariantsInnerApplicationsInnerToJSON(value?: CreateProductRequestVariantsInnerApplicationsInner | null): any {
88
+ if (value === undefined) {
89
+ return undefined;
90
+ }
91
+ if (value === null) {
92
+ return null;
93
+ }
94
+ return {
95
+
96
+ 'technology': value.technology,
97
+ 'placement': value.placement,
98
+ 'src': value.src,
99
+ };
100
+ }
101
+