@teemill/product-catalog 1.0.2 → 1.2.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 (48) hide show
  1. package/.openapi-generator/FILES +1 -1
  2. package/README.md +2 -2
  3. package/dist/apis/ProductsApi.d.ts +3 -3
  4. package/dist/apis/ProductsApi.js +35 -15
  5. package/dist/apis/VariantsApi.d.ts +3 -3
  6. package/dist/apis/VariantsApi.js +35 -15
  7. package/dist/models/ApiError.d.ts +1 -1
  8. package/dist/models/ApiError.js +1 -1
  9. package/dist/models/Attribute.d.ts +16 -3
  10. package/dist/models/Attribute.js +10 -3
  11. package/dist/models/AttributeThumbnail.d.ts +46 -0
  12. package/dist/models/AttributeThumbnail.js +60 -0
  13. package/dist/models/Image.d.ts +1 -1
  14. package/dist/models/Image.js +1 -1
  15. package/dist/models/Price.d.ts +1 -1
  16. package/dist/models/Price.js +1 -1
  17. package/dist/models/Product.d.ts +1 -1
  18. package/dist/models/Product.js +1 -1
  19. package/dist/models/ProductsResponse.d.ts +1 -1
  20. package/dist/models/ProductsResponse.js +1 -1
  21. package/dist/models/Stock.d.ts +1 -1
  22. package/dist/models/Stock.js +1 -1
  23. package/dist/models/Variant.d.ts +2 -2
  24. package/dist/models/Variant.js +1 -1
  25. package/dist/models/VariantProduct.d.ts +1 -1
  26. package/dist/models/VariantProduct.js +1 -1
  27. package/dist/models/VariantsResponse.d.ts +1 -1
  28. package/dist/models/VariantsResponse.js +1 -1
  29. package/dist/models/index.d.ts +1 -0
  30. package/dist/models/index.js +1 -0
  31. package/dist/runtime.d.ts +1 -1
  32. package/dist/runtime.js +1 -1
  33. package/package.json +1 -1
  34. package/src/apis/ProductsApi.ts +15 -5
  35. package/src/apis/VariantsApi.ts +15 -5
  36. package/src/models/ApiError.ts +1 -1
  37. package/src/models/Attribute.ts +30 -5
  38. package/src/models/AttributeThumbnail.ts +85 -0
  39. package/src/models/Image.ts +1 -1
  40. package/src/models/Price.ts +1 -1
  41. package/src/models/Product.ts +1 -1
  42. package/src/models/ProductsResponse.ts +1 -1
  43. package/src/models/Stock.ts +1 -1
  44. package/src/models/Variant.ts +2 -2
  45. package/src/models/VariantProduct.ts +1 -1
  46. package/src/models/VariantsResponse.ts +1 -1
  47. package/src/models/index.ts +1 -0
  48. package/src/runtime.ts +1 -1
@@ -1,6 +1,5 @@
1
1
  .gitignore
2
2
  .npmignore
3
- .openapi-generator-ignore
4
3
  README.md
5
4
  package.json
6
5
  src/apis/ProductsApi.ts
@@ -9,6 +8,7 @@ src/apis/index.ts
9
8
  src/index.ts
10
9
  src/models/ApiError.ts
11
10
  src/models/Attribute.ts
11
+ src/models/AttributeThumbnail.ts
12
12
  src/models/Image.ts
13
13
  src/models/Price.ts
14
14
  src/models/Product.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/product-catalog@1.0.2
1
+ ## @teemill/product-catalog@1.2.0
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). 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.0.2 --save
39
+ npm install @teemill/product-catalog@1.2.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -35,7 +35,7 @@ export declare class ProductsApi extends runtime.BaseAPI {
35
35
  * Gets a product by the given id
36
36
  * Get product
37
37
  */
38
- getProduct(requestParameters: GetProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product>;
38
+ getProduct(project: string, productId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product>;
39
39
  /**
40
40
  * Lists all products
41
41
  * List products
@@ -45,5 +45,5 @@ export declare class ProductsApi extends runtime.BaseAPI {
45
45
  * Lists all products
46
46
  * List products
47
47
  */
48
- getProducts(requestParameters: GetProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
48
+ getProducts(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
49
49
  }
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -81,9 +81,9 @@ var ProductsApi = /** @class */ (function (_super) {
81
81
  */
82
82
  ProductsApi.prototype.getProductRaw = function (requestParameters, initOverrides) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, response;
85
- return __generator(this, function (_a) {
86
- switch (_a.label) {
84
+ var queryParameters, headerParameters, _a, _b, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
87
  case 0:
88
88
  if (requestParameters.project === null || requestParameters.project === undefined) {
89
89
  throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getProduct.');
@@ -99,6 +99,16 @@ var ProductsApi = /** @class */ (function (_super) {
99
99
  queryParameters['fields'] = requestParameters.fields;
100
100
  }
101
101
  headerParameters = {};
102
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
103
+ // oauth required
104
+ _a = headerParameters;
105
+ _b = "Authorization";
106
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
107
+ case 1:
108
+ // oauth required
109
+ _a[_b] = _c.sent();
110
+ _c.label = 2;
111
+ case 2:
102
112
  if (this.configuration && this.configuration.apiKey) {
103
113
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
104
114
  }
@@ -108,8 +118,8 @@ var ProductsApi = /** @class */ (function (_super) {
108
118
  headers: headerParameters,
109
119
  query: queryParameters,
110
120
  }, initOverrides)];
111
- case 1:
112
- response = _a.sent();
121
+ case 3:
122
+ response = _c.sent();
113
123
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductFromJSON)(jsonValue); })];
114
124
  }
115
125
  });
@@ -119,12 +129,12 @@ var ProductsApi = /** @class */ (function (_super) {
119
129
  * Gets a product by the given id
120
130
  * Get product
121
131
  */
122
- ProductsApi.prototype.getProduct = function (requestParameters, initOverrides) {
132
+ ProductsApi.prototype.getProduct = function (project, productId, fields, initOverrides) {
123
133
  return __awaiter(this, void 0, void 0, function () {
124
134
  var response;
125
135
  return __generator(this, function (_a) {
126
136
  switch (_a.label) {
127
- case 0: return [4 /*yield*/, this.getProductRaw(requestParameters, initOverrides)];
137
+ case 0: return [4 /*yield*/, this.getProductRaw({ project: project, productId: productId, fields: fields }, initOverrides)];
128
138
  case 1:
129
139
  response = _a.sent();
130
140
  return [4 /*yield*/, response.value()];
@@ -139,9 +149,9 @@ var ProductsApi = /** @class */ (function (_super) {
139
149
  */
140
150
  ProductsApi.prototype.getProductsRaw = function (requestParameters, initOverrides) {
141
151
  return __awaiter(this, void 0, void 0, function () {
142
- var queryParameters, headerParameters, response;
143
- return __generator(this, function (_a) {
144
- switch (_a.label) {
152
+ var queryParameters, headerParameters, _a, _b, response;
153
+ return __generator(this, function (_c) {
154
+ switch (_c.label) {
145
155
  case 0:
146
156
  if (requestParameters.project === null || requestParameters.project === undefined) {
147
157
  throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getProducts.');
@@ -160,6 +170,16 @@ var ProductsApi = /** @class */ (function (_super) {
160
170
  queryParameters['fields'] = requestParameters.fields;
161
171
  }
162
172
  headerParameters = {};
173
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
174
+ // oauth required
175
+ _a = headerParameters;
176
+ _b = "Authorization";
177
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
178
+ case 1:
179
+ // oauth required
180
+ _a[_b] = _c.sent();
181
+ _c.label = 2;
182
+ case 2:
163
183
  if (this.configuration && this.configuration.apiKey) {
164
184
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
165
185
  }
@@ -169,8 +189,8 @@ var ProductsApi = /** @class */ (function (_super) {
169
189
  headers: headerParameters,
170
190
  query: queryParameters,
171
191
  }, initOverrides)];
172
- case 1:
173
- response = _a.sent();
192
+ case 3:
193
+ response = _c.sent();
174
194
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductsResponseFromJSON)(jsonValue); })];
175
195
  }
176
196
  });
@@ -180,12 +200,12 @@ var ProductsApi = /** @class */ (function (_super) {
180
200
  * Lists all products
181
201
  * List products
182
202
  */
183
- ProductsApi.prototype.getProducts = function (requestParameters, initOverrides) {
203
+ ProductsApi.prototype.getProducts = function (project, pageToken, pageSize, fields, initOverrides) {
184
204
  return __awaiter(this, void 0, void 0, function () {
185
205
  var response;
186
206
  return __generator(this, function (_a) {
187
207
  switch (_a.label) {
188
- case 0: return [4 /*yield*/, this.getProductsRaw(requestParameters, initOverrides)];
208
+ case 0: return [4 /*yield*/, this.getProductsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides)];
189
209
  case 1:
190
210
  response = _a.sent();
191
211
  return [4 /*yield*/, response.value()];
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -35,7 +35,7 @@ export declare class VariantsApi extends runtime.BaseAPI {
35
35
  * Gets a variant by the given id
36
36
  * Get variant
37
37
  */
38
- getVariant(requestParameters: GetVariantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
38
+ getVariant(project: string, variantId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
39
39
  /**
40
40
  * Lists all variants
41
41
  * List variants
@@ -45,5 +45,5 @@ export declare class VariantsApi extends runtime.BaseAPI {
45
45
  * Lists all variants
46
46
  * List variants
47
47
  */
48
- listVariants(requestParameters: ListVariantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
48
+ listVariants(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
49
49
  }
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -81,9 +81,9 @@ var VariantsApi = /** @class */ (function (_super) {
81
81
  */
82
82
  VariantsApi.prototype.getVariantRaw = function (requestParameters, initOverrides) {
83
83
  return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, response;
85
- return __generator(this, function (_a) {
86
- switch (_a.label) {
84
+ var queryParameters, headerParameters, _a, _b, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
87
  case 0:
88
88
  if (requestParameters.project === null || requestParameters.project === undefined) {
89
89
  throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling getVariant.');
@@ -99,6 +99,16 @@ var VariantsApi = /** @class */ (function (_super) {
99
99
  queryParameters['fields'] = requestParameters.fields;
100
100
  }
101
101
  headerParameters = {};
102
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
103
+ // oauth required
104
+ _a = headerParameters;
105
+ _b = "Authorization";
106
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
107
+ case 1:
108
+ // oauth required
109
+ _a[_b] = _c.sent();
110
+ _c.label = 2;
111
+ case 2:
102
112
  if (this.configuration && this.configuration.apiKey) {
103
113
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
104
114
  }
@@ -108,8 +118,8 @@ var VariantsApi = /** @class */ (function (_super) {
108
118
  headers: headerParameters,
109
119
  query: queryParameters,
110
120
  }, initOverrides)];
111
- case 1:
112
- response = _a.sent();
121
+ case 3:
122
+ response = _c.sent();
113
123
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VariantFromJSON)(jsonValue); })];
114
124
  }
115
125
  });
@@ -119,12 +129,12 @@ var VariantsApi = /** @class */ (function (_super) {
119
129
  * Gets a variant by the given id
120
130
  * Get variant
121
131
  */
122
- VariantsApi.prototype.getVariant = function (requestParameters, initOverrides) {
132
+ VariantsApi.prototype.getVariant = function (project, variantId, fields, initOverrides) {
123
133
  return __awaiter(this, void 0, void 0, function () {
124
134
  var response;
125
135
  return __generator(this, function (_a) {
126
136
  switch (_a.label) {
127
- case 0: return [4 /*yield*/, this.getVariantRaw(requestParameters, initOverrides)];
137
+ case 0: return [4 /*yield*/, this.getVariantRaw({ project: project, variantId: variantId, fields: fields }, initOverrides)];
128
138
  case 1:
129
139
  response = _a.sent();
130
140
  return [4 /*yield*/, response.value()];
@@ -139,9 +149,9 @@ var VariantsApi = /** @class */ (function (_super) {
139
149
  */
140
150
  VariantsApi.prototype.listVariantsRaw = function (requestParameters, initOverrides) {
141
151
  return __awaiter(this, void 0, void 0, function () {
142
- var queryParameters, headerParameters, response;
143
- return __generator(this, function (_a) {
144
- switch (_a.label) {
152
+ var queryParameters, headerParameters, _a, _b, response;
153
+ return __generator(this, function (_c) {
154
+ switch (_c.label) {
145
155
  case 0:
146
156
  if (requestParameters.project === null || requestParameters.project === undefined) {
147
157
  throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listVariants.');
@@ -160,6 +170,16 @@ var VariantsApi = /** @class */ (function (_super) {
160
170
  queryParameters['fields'] = requestParameters.fields;
161
171
  }
162
172
  headerParameters = {};
173
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
174
+ // oauth required
175
+ _a = headerParameters;
176
+ _b = "Authorization";
177
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
178
+ case 1:
179
+ // oauth required
180
+ _a[_b] = _c.sent();
181
+ _c.label = 2;
182
+ case 2:
163
183
  if (this.configuration && this.configuration.apiKey) {
164
184
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
165
185
  }
@@ -169,8 +189,8 @@ var VariantsApi = /** @class */ (function (_super) {
169
189
  headers: headerParameters,
170
190
  query: queryParameters,
171
191
  }, initOverrides)];
172
- case 1:
173
- response = _a.sent();
192
+ case 3:
193
+ response = _c.sent();
174
194
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.VariantsResponseFromJSON)(jsonValue); })];
175
195
  }
176
196
  });
@@ -180,12 +200,12 @@ var VariantsApi = /** @class */ (function (_super) {
180
200
  * Lists all variants
181
201
  * List variants
182
202
  */
183
- VariantsApi.prototype.listVariants = function (requestParameters, initOverrides) {
203
+ VariantsApi.prototype.listVariants = function (project, pageToken, pageSize, fields, initOverrides) {
184
204
  return __awaiter(this, void 0, void 0, function () {
185
205
  var response;
186
206
  return __generator(this, function (_a) {
187
207
  switch (_a.label) {
188
- case 0: return [4 /*yield*/, this.listVariantsRaw(requestParameters, initOverrides)];
208
+ case 0: return [4 /*yield*/, this.listVariantsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides)];
189
209
  case 1:
190
210
  response = _a.sent();
191
211
  return [4 /*yield*/, response.value()];
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,13 +2,14 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { AttributeThumbnail } from './AttributeThumbnail';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -20,13 +21,25 @@ export interface Attribute {
20
21
  * @type {string}
21
22
  * @memberof Attribute
22
23
  */
23
- name?: string;
24
+ name: string;
24
25
  /**
25
26
  * Attribute value
26
27
  * @type {string}
27
28
  * @memberof Attribute
28
29
  */
29
- value?: string;
30
+ value: string;
31
+ /**
32
+ *
33
+ * @type {AttributeThumbnail}
34
+ * @memberof Attribute
35
+ */
36
+ thumbnail?: AttributeThumbnail;
37
+ /**
38
+ * Attribute tags
39
+ * @type {Array<string>}
40
+ * @memberof Attribute
41
+ */
42
+ tags?: Array<string>;
30
43
  }
31
44
  /**
32
45
  * Check if a given object implements the Attribute interface.
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -15,11 +15,14 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AttributeToJSON = exports.AttributeFromJSONTyped = exports.AttributeFromJSON = exports.instanceOfAttribute = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ var AttributeThumbnail_1 = require("./AttributeThumbnail");
18
19
  /**
19
20
  * Check if a given object implements the Attribute interface.
20
21
  */
21
22
  function instanceOfAttribute(value) {
22
23
  var isInstance = true;
24
+ isInstance = isInstance && "name" in value;
25
+ isInstance = isInstance && "value" in value;
23
26
  return isInstance;
24
27
  }
25
28
  exports.instanceOfAttribute = instanceOfAttribute;
@@ -32,8 +35,10 @@ function AttributeFromJSONTyped(json, ignoreDiscriminator) {
32
35
  return json;
33
36
  }
34
37
  return {
35
- 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
36
- 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
38
+ 'name': json['name'],
39
+ 'value': json['value'],
40
+ 'thumbnail': !(0, runtime_1.exists)(json, 'thumbnail') ? undefined : (0, AttributeThumbnail_1.AttributeThumbnailFromJSON)(json['thumbnail']),
41
+ 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
37
42
  };
38
43
  }
39
44
  exports.AttributeFromJSONTyped = AttributeFromJSONTyped;
@@ -47,6 +52,8 @@ function AttributeToJSON(value) {
47
52
  return {
48
53
  'name': value.name,
49
54
  'value': value.value,
55
+ 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value.thumbnail),
56
+ 'tags': value.tags,
50
57
  };
51
58
  }
52
59
  exports.AttributeToJSON = AttributeToJSON;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Product Catalog API
3
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
6
+ * Contact: hello@teemill.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Attribute thumbnail, intended for interfaces like storefront colour selector
14
+ * @export
15
+ * @interface AttributeThumbnail
16
+ */
17
+ export interface AttributeThumbnail {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AttributeThumbnail
22
+ */
23
+ type?: AttributeThumbnailTypeEnum;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AttributeThumbnail
28
+ */
29
+ value?: string;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const AttributeThumbnailTypeEnum: {
35
+ readonly Text: "text";
36
+ readonly Color: "color";
37
+ readonly Image: "image";
38
+ };
39
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
40
+ /**
41
+ * Check if a given object implements the AttributeThumbnail interface.
42
+ */
43
+ export declare function instanceOfAttributeThumbnail(value: object): boolean;
44
+ export declare function AttributeThumbnailFromJSON(json: any): AttributeThumbnail;
45
+ export declare function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail;
46
+ export declare function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Product Catalog API
6
+ * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
+ *
8
+ * The version of the OpenAPI document: 1.2.0
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AttributeThumbnailToJSON = exports.AttributeThumbnailFromJSONTyped = exports.AttributeThumbnailFromJSON = exports.instanceOfAttributeThumbnail = exports.AttributeThumbnailTypeEnum = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.AttributeThumbnailTypeEnum = {
22
+ Text: 'text',
23
+ Color: 'color',
24
+ Image: 'image'
25
+ };
26
+ /**
27
+ * Check if a given object implements the AttributeThumbnail interface.
28
+ */
29
+ function instanceOfAttributeThumbnail(value) {
30
+ var isInstance = true;
31
+ return isInstance;
32
+ }
33
+ exports.instanceOfAttributeThumbnail = instanceOfAttributeThumbnail;
34
+ function AttributeThumbnailFromJSON(json) {
35
+ return AttributeThumbnailFromJSONTyped(json, false);
36
+ }
37
+ exports.AttributeThumbnailFromJSON = AttributeThumbnailFromJSON;
38
+ function AttributeThumbnailFromJSONTyped(json, ignoreDiscriminator) {
39
+ if ((json === undefined) || (json === null)) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
44
+ 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
45
+ };
46
+ }
47
+ exports.AttributeThumbnailFromJSONTyped = AttributeThumbnailFromJSONTyped;
48
+ function AttributeThumbnailToJSON(value) {
49
+ if (value === undefined) {
50
+ return undefined;
51
+ }
52
+ if (value === null) {
53
+ return null;
54
+ }
55
+ return {
56
+ 'type': value.type,
57
+ 'value': value.value,
58
+ };
59
+ }
60
+ exports.AttributeThumbnailToJSON = AttributeThumbnailToJSON;
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,7 +27,7 @@ export interface Variant {
27
27
  */
28
28
  id?: string;
29
29
  /**
30
- * Attributes associated to a variant such as Colour and Size
30
+ * Attributes associated to a variant such as Colour and Size. An attribute can have thumbnail type of `text`, `color`, or `image`. Attribute tags are intended for grouping and filtering, e.g. by a group of colours.
31
31
  * @type {Array<Attribute>}
32
32
  * @memberof Variant
33
33
  */
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -1,5 +1,6 @@
1
1
  export * from './ApiError';
2
2
  export * from './Attribute';
3
+ export * from './AttributeThumbnail';
3
4
  export * from './Image';
4
5
  export * from './Price';
5
6
  export * from './Product';
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./ApiError"), exports);
20
20
  __exportStar(require("./Attribute"), exports);
21
+ __exportStar(require("./AttributeThumbnail"), exports);
21
22
  __exportStar(require("./Image"), exports);
22
23
  __exportStar(require("./Price"), exports);
23
24
  __exportStar(require("./Product"), exports);
package/dist/runtime.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Product Catalog API
3
3
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
4
4
  *
5
- * The version of the OpenAPI document: 1.0.2
5
+ * The version of the OpenAPI document: 1.2.0
6
6
  * Contact: hello@teemill.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/runtime.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Product Catalog API
6
6
  * Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
7
7
  *
8
- * The version of the OpenAPI document: 1.0.2
8
+ * The version of the OpenAPI document: 1.2.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/product-catalog",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "OpenAPI client for @teemill/product-catalog",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -71,6 +71,11 @@ export class ProductsApi extends runtime.BaseAPI {
71
71
 
72
72
  const headerParameters: runtime.HTTPHeaders = {};
73
73
 
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ // oauth required
76
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
77
+ }
78
+
74
79
  if (this.configuration && this.configuration.apiKey) {
75
80
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
76
81
  }
@@ -89,8 +94,8 @@ export class ProductsApi extends runtime.BaseAPI {
89
94
  * Gets a product by the given id
90
95
  * Get product
91
96
  */
92
- async getProduct(requestParameters: GetProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product> {
93
- const response = await this.getProductRaw(requestParameters, initOverrides);
97
+ async getProduct(project: string, productId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product> {
98
+ const response = await this.getProductRaw({ project: project, productId: productId, fields: fields }, initOverrides);
94
99
  return await response.value();
95
100
  }
96
101
 
@@ -123,6 +128,11 @@ export class ProductsApi extends runtime.BaseAPI {
123
128
 
124
129
  const headerParameters: runtime.HTTPHeaders = {};
125
130
 
131
+ if (this.configuration && this.configuration.accessToken) {
132
+ // oauth required
133
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
134
+ }
135
+
126
136
  if (this.configuration && this.configuration.apiKey) {
127
137
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
128
138
  }
@@ -141,8 +151,8 @@ export class ProductsApi extends runtime.BaseAPI {
141
151
  * Lists all products
142
152
  * List products
143
153
  */
144
- async getProducts(requestParameters: GetProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse> {
145
- const response = await this.getProductsRaw(requestParameters, initOverrides);
154
+ async getProducts(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse> {
155
+ const response = await this.getProductsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides);
146
156
  return await response.value();
147
157
  }
148
158
 
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -71,6 +71,11 @@ export class VariantsApi extends runtime.BaseAPI {
71
71
 
72
72
  const headerParameters: runtime.HTTPHeaders = {};
73
73
 
74
+ if (this.configuration && this.configuration.accessToken) {
75
+ // oauth required
76
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
77
+ }
78
+
74
79
  if (this.configuration && this.configuration.apiKey) {
75
80
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
76
81
  }
@@ -89,8 +94,8 @@ export class VariantsApi extends runtime.BaseAPI {
89
94
  * Gets a variant by the given id
90
95
  * Get variant
91
96
  */
92
- async getVariant(requestParameters: GetVariantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant> {
93
- const response = await this.getVariantRaw(requestParameters, initOverrides);
97
+ async getVariant(project: string, variantId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant> {
98
+ const response = await this.getVariantRaw({ project: project, variantId: variantId, fields: fields }, initOverrides);
94
99
  return await response.value();
95
100
  }
96
101
 
@@ -123,6 +128,11 @@ export class VariantsApi extends runtime.BaseAPI {
123
128
 
124
129
  const headerParameters: runtime.HTTPHeaders = {};
125
130
 
131
+ if (this.configuration && this.configuration.accessToken) {
132
+ // oauth required
133
+ headerParameters["Authorization"] = await this.configuration.accessToken("session-oauth", []);
134
+ }
135
+
126
136
  if (this.configuration && this.configuration.apiKey) {
127
137
  headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
128
138
  }
@@ -141,8 +151,8 @@ export class VariantsApi extends runtime.BaseAPI {
141
151
  * Lists all variants
142
152
  * List variants
143
153
  */
144
- async listVariants(requestParameters: ListVariantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse> {
145
- const response = await this.listVariantsRaw(requestParameters, initOverrides);
154
+ async listVariants(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse> {
155
+ const response = await this.listVariantsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides);
146
156
  return await response.value();
147
157
  }
148
158
 
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,6 +13,13 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { AttributeThumbnail } from './AttributeThumbnail';
17
+ import {
18
+ AttributeThumbnailFromJSON,
19
+ AttributeThumbnailFromJSONTyped,
20
+ AttributeThumbnailToJSON,
21
+ } from './AttributeThumbnail';
22
+
16
23
  /**
17
24
  *
18
25
  * @export
@@ -24,13 +31,25 @@ export interface Attribute {
24
31
  * @type {string}
25
32
  * @memberof Attribute
26
33
  */
27
- name?: string;
34
+ name: string;
28
35
  /**
29
36
  * Attribute value
30
37
  * @type {string}
31
38
  * @memberof Attribute
32
39
  */
33
- value?: string;
40
+ value: string;
41
+ /**
42
+ *
43
+ * @type {AttributeThumbnail}
44
+ * @memberof Attribute
45
+ */
46
+ thumbnail?: AttributeThumbnail;
47
+ /**
48
+ * Attribute tags
49
+ * @type {Array<string>}
50
+ * @memberof Attribute
51
+ */
52
+ tags?: Array<string>;
34
53
  }
35
54
 
36
55
  /**
@@ -38,6 +57,8 @@ export interface Attribute {
38
57
  */
39
58
  export function instanceOfAttribute(value: object): boolean {
40
59
  let isInstance = true;
60
+ isInstance = isInstance && "name" in value;
61
+ isInstance = isInstance && "value" in value;
41
62
 
42
63
  return isInstance;
43
64
  }
@@ -52,8 +73,10 @@ export function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean):
52
73
  }
53
74
  return {
54
75
 
55
- 'name': !exists(json, 'name') ? undefined : json['name'],
56
- 'value': !exists(json, 'value') ? undefined : json['value'],
76
+ 'name': json['name'],
77
+ 'value': json['value'],
78
+ 'thumbnail': !exists(json, 'thumbnail') ? undefined : AttributeThumbnailFromJSON(json['thumbnail']),
79
+ 'tags': !exists(json, 'tags') ? undefined : json['tags'],
57
80
  };
58
81
  }
59
82
 
@@ -68,6 +91,8 @@ export function AttributeToJSON(value?: Attribute | null): any {
68
91
 
69
92
  'name': value.name,
70
93
  'value': value.value,
94
+ 'thumbnail': AttributeThumbnailToJSON(value.thumbnail),
95
+ 'tags': value.tags,
71
96
  };
72
97
  }
73
98
 
@@ -0,0 +1,85 @@
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.2.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
+ * Attribute thumbnail, intended for interfaces like storefront colour selector
18
+ * @export
19
+ * @interface AttributeThumbnail
20
+ */
21
+ export interface AttributeThumbnail {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AttributeThumbnail
26
+ */
27
+ type?: AttributeThumbnailTypeEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AttributeThumbnail
32
+ */
33
+ value?: string;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const AttributeThumbnailTypeEnum = {
41
+ Text: 'text',
42
+ Color: 'color',
43
+ Image: 'image'
44
+ } as const;
45
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
46
+
47
+
48
+ /**
49
+ * Check if a given object implements the AttributeThumbnail interface.
50
+ */
51
+ export function instanceOfAttributeThumbnail(value: object): boolean {
52
+ let isInstance = true;
53
+
54
+ return isInstance;
55
+ }
56
+
57
+ export function AttributeThumbnailFromJSON(json: any): AttributeThumbnail {
58
+ return AttributeThumbnailFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail {
62
+ if ((json === undefined) || (json === null)) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'type': !exists(json, 'type') ? undefined : json['type'],
68
+ 'value': !exists(json, 'value') ? undefined : json['value'],
69
+ };
70
+ }
71
+
72
+ export function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any {
73
+ if (value === undefined) {
74
+ return undefined;
75
+ }
76
+ if (value === null) {
77
+ return null;
78
+ }
79
+ return {
80
+
81
+ 'type': value.type,
82
+ 'value': value.value,
83
+ };
84
+ }
85
+
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -57,7 +57,7 @@ export interface Variant {
57
57
  */
58
58
  id?: string;
59
59
  /**
60
- * Attributes associated to a variant such as Colour and Size
60
+ * Attributes associated to a variant such as Colour and Size. An attribute can have thumbnail type of `text`, `color`, or `image`. Attribute tags are intended for grouping and filtering, e.g. by a group of colours.
61
61
  * @type {Array<Attribute>}
62
62
  * @memberof Variant
63
63
  */
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  export * from './ApiError';
4
4
  export * from './Attribute';
5
+ export * from './AttributeThumbnail';
5
6
  export * from './Image';
6
7
  export * from './Price';
7
8
  export * from './Product';
package/src/runtime.ts CHANGED
@@ -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.0.2
7
+ * The version of the OpenAPI document: 1.2.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).