@teemill/gfn-catalog 1.0.1 → 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 (55) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +2 -2
  4. package/dist/apis/ProductsApi.d.ts +1 -1
  5. package/dist/apis/ProductsApi.js +1 -1
  6. package/dist/apis/VariantsApi.d.ts +17 -2
  7. package/dist/apis/VariantsApi.js +70 -1
  8. package/dist/models/ApiError.d.ts +1 -1
  9. package/dist/models/ApiError.js +10 -14
  10. package/dist/models/Attribute.d.ts +1 -1
  11. package/dist/models/Attribute.js +15 -18
  12. package/dist/models/AttributeThumbnail.d.ts +1 -1
  13. package/dist/models/AttributeThumbnail.js +9 -14
  14. package/dist/models/Image.d.ts +1 -1
  15. package/dist/models/Image.js +19 -24
  16. package/dist/models/Product.d.ts +19 -1
  17. package/dist/models/Product.js +20 -18
  18. package/dist/models/ProductsResponse.d.ts +1 -1
  19. package/dist/models/ProductsResponse.js +9 -14
  20. package/dist/models/Stock.d.ts +31 -0
  21. package/dist/models/Stock.js +45 -0
  22. package/dist/models/StockResponse.d.ts +38 -0
  23. package/dist/models/StockResponse.js +48 -0
  24. package/dist/models/Variant.d.ts +15 -1
  25. package/dist/models/Variant.js +25 -22
  26. package/dist/models/VariantManufacturerOrigin.d.ts +37 -0
  27. package/dist/models/VariantManufacturerOrigin.js +47 -0
  28. package/dist/models/VariantProduct.d.ts +1 -1
  29. package/dist/models/VariantProduct.js +9 -14
  30. package/dist/models/VariantStock.d.ts +50 -0
  31. package/dist/models/VariantStock.js +52 -0
  32. package/dist/models/VariantsResponse.d.ts +1 -1
  33. package/dist/models/VariantsResponse.js +9 -14
  34. package/dist/models/index.d.ts +4 -0
  35. package/dist/models/index.js +4 -0
  36. package/dist/runtime.d.ts +1 -1
  37. package/dist/runtime.js +2 -2
  38. package/package.json +1 -1
  39. package/src/apis/ProductsApi.ts +1 -1
  40. package/src/apis/VariantsApi.ts +74 -1
  41. package/src/models/ApiError.ts +10 -15
  42. package/src/models/Attribute.ts +14 -19
  43. package/src/models/AttributeThumbnail.ts +10 -15
  44. package/src/models/Image.ts +20 -25
  45. package/src/models/Product.ts +38 -19
  46. package/src/models/ProductsResponse.ts +10 -15
  47. package/src/models/Stock.ts +60 -0
  48. package/src/models/StockResponse.ts +75 -0
  49. package/src/models/Variant.ts +46 -23
  50. package/src/models/VariantManufacturerOrigin.ts +68 -0
  51. package/src/models/VariantProduct.ts +10 -15
  52. package/src/models/VariantStock.ts +91 -0
  53. package/src/models/VariantsResponse.ts +10 -15
  54. package/src/models/index.ts +4 -0
  55. package/src/runtime.ts +2 -2
@@ -12,8 +12,12 @@ src/models/AttributeThumbnail.ts
12
12
  src/models/Image.ts
13
13
  src/models/Product.ts
14
14
  src/models/ProductsResponse.ts
15
+ src/models/Stock.ts
16
+ src/models/StockResponse.ts
15
17
  src/models/Variant.ts
18
+ src/models/VariantManufacturerOrigin.ts
16
19
  src/models/VariantProduct.ts
20
+ src/models/VariantStock.ts
17
21
  src/models/VariantsResponse.ts
18
22
  src/models/index.ts
19
23
  src/runtime.ts
@@ -1 +1 @@
1
- 7.3.0
1
+ 7.4.0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/gfn-catalog@1.0.1
1
+ ## @teemill/gfn-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/gfn-catalog@1.0.1 --save
39
+ npm install @teemill/gfn-catalog@1.2.0 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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).
@@ -10,12 +10,17 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { Variant, VariantsResponse } from '../models/index';
13
+ import type { StockResponse, Variant, VariantsResponse } from '../models/index';
14
14
  export interface GetVariantRequest {
15
15
  project: string;
16
16
  variantId: string;
17
17
  fields?: string;
18
18
  }
19
+ export interface ListStockRequest {
20
+ project: string;
21
+ pageToken?: number;
22
+ pageSize?: number;
23
+ }
19
24
  export interface ListVariantsRequest {
20
25
  project: string;
21
26
  pageToken?: number;
@@ -37,6 +42,16 @@ export declare class VariantsApi extends runtime.BaseAPI {
37
42
  * Get a GFN variant
38
43
  */
39
44
  getVariant(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetVariantRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
45
+ /**
46
+ * Lists the stock levels for all GFN variants available to the project.
47
+ * List GFN variant stock
48
+ */
49
+ listStockRaw(requestParameters: ListStockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StockResponse>>;
50
+ /**
51
+ * Lists the stock levels for all GFN variants available to the project.
52
+ * List GFN variant stock
53
+ */
54
+ listStock(project: string, optionalParameters?: runtime.OptionalOnly<ListStockRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StockResponse>;
40
55
  /**
41
56
  * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
42
57
  * List GFN variants
@@ -5,7 +5,7 @@
5
5
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -155,6 +155,75 @@ var VariantsApi = /** @class */ (function (_super) {
155
155
  });
156
156
  });
157
157
  };
158
+ /**
159
+ * Lists the stock levels for all GFN variants available to the project.
160
+ * List GFN variant stock
161
+ */
162
+ VariantsApi.prototype.listStockRaw = function (requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function () {
164
+ var queryParameters, headerParameters, _a, _b, response;
165
+ return __generator(this, function (_c) {
166
+ switch (_c.label) {
167
+ case 0:
168
+ if (requestParameters.project === null || requestParameters.project === undefined) {
169
+ throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling listStock.');
170
+ }
171
+ queryParameters = {};
172
+ if (requestParameters.project !== undefined) {
173
+ queryParameters['project'] = requestParameters.project;
174
+ }
175
+ if (requestParameters.pageToken !== undefined) {
176
+ queryParameters['pageToken'] = requestParameters.pageToken;
177
+ }
178
+ if (requestParameters.pageSize !== undefined) {
179
+ queryParameters['pageSize'] = requestParameters.pageSize;
180
+ }
181
+ headerParameters = {};
182
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
183
+ // oauth required
184
+ _a = headerParameters;
185
+ _b = "Authorization";
186
+ return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
187
+ case 1:
188
+ // oauth required
189
+ _a[_b] = _c.sent();
190
+ _c.label = 2;
191
+ case 2:
192
+ if (this.configuration && this.configuration.apiKey) {
193
+ headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
194
+ }
195
+ return [4 /*yield*/, this.request({
196
+ path: "/v1/gfn/catalog/stock",
197
+ method: 'GET',
198
+ headers: headerParameters,
199
+ query: queryParameters,
200
+ }, initOverrides)];
201
+ case 3:
202
+ response = _c.sent();
203
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.StockResponseFromJSON)(jsonValue); })];
204
+ }
205
+ });
206
+ });
207
+ };
208
+ /**
209
+ * Lists the stock levels for all GFN variants available to the project.
210
+ * List GFN variant stock
211
+ */
212
+ VariantsApi.prototype.listStock = function (project, optionalParameters, initOverrides) {
213
+ if (optionalParameters === void 0) { optionalParameters = {}; }
214
+ return __awaiter(this, void 0, void 0, function () {
215
+ var response;
216
+ return __generator(this, function (_a) {
217
+ switch (_a.label) {
218
+ case 0: return [4 /*yield*/, this.listStockRaw(__assign({ project: project }, optionalParameters), initOverrides)];
219
+ case 1:
220
+ response = _a.sent();
221
+ return [4 /*yield*/, response.value()];
222
+ case 2: return [2 /*return*/, _a.sent()];
223
+ }
224
+ });
225
+ });
226
+ };
158
227
  /**
159
228
  * Lists all GFN variants available to the project. Can be filtered by product ID, SKU, and attribute values using the search parameter.
160
229
  * List GFN variants
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -14,14 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the ApiError interface.
20
19
  */
21
20
  function instanceOfApiError(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "message" in value;
24
- return isInstance;
21
+ if (!('message' in value))
22
+ return false;
23
+ return true;
25
24
  }
26
25
  exports.instanceOfApiError = instanceOfApiError;
27
26
  function ApiErrorFromJSON(json) {
@@ -29,25 +28,22 @@ function ApiErrorFromJSON(json) {
29
28
  }
30
29
  exports.ApiErrorFromJSON = ApiErrorFromJSON;
31
30
  function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
33
32
  return json;
34
33
  }
35
34
  return {
36
- 'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
35
+ 'code': json['code'] == null ? undefined : json['code'],
37
36
  'message': json['message'],
38
37
  };
39
38
  }
40
39
  exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
41
40
  function ApiErrorToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
41
+ if (value == null) {
42
+ return value;
47
43
  }
48
44
  return {
49
- 'code': value.code,
50
- 'message': value.message,
45
+ 'code': value['code'],
46
+ 'message': value['message'],
51
47
  };
52
48
  }
53
49
  exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -14,16 +14,16 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AttributeToJSON = exports.AttributeFromJSONTyped = exports.AttributeFromJSON = exports.instanceOfAttribute = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var AttributeThumbnail_1 = require("./AttributeThumbnail");
19
18
  /**
20
19
  * Check if a given object implements the Attribute interface.
21
20
  */
22
21
  function instanceOfAttribute(value) {
23
- var isInstance = true;
24
- isInstance = isInstance && "name" in value;
25
- isInstance = isInstance && "value" in value;
26
- return isInstance;
22
+ if (!('name' in value))
23
+ return false;
24
+ if (!('value' in value))
25
+ return false;
26
+ return true;
27
27
  }
28
28
  exports.instanceOfAttribute = instanceOfAttribute;
29
29
  function AttributeFromJSON(json) {
@@ -31,29 +31,26 @@ function AttributeFromJSON(json) {
31
31
  }
32
32
  exports.AttributeFromJSON = AttributeFromJSON;
33
33
  function AttributeFromJSONTyped(json, ignoreDiscriminator) {
34
- if ((json === undefined) || (json === null)) {
34
+ if (json == null) {
35
35
  return json;
36
36
  }
37
37
  return {
38
38
  'name': json['name'],
39
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'],
40
+ 'thumbnail': json['thumbnail'] == null ? undefined : (0, AttributeThumbnail_1.AttributeThumbnailFromJSON)(json['thumbnail']),
41
+ 'tags': json['tags'] == null ? undefined : json['tags'],
42
42
  };
43
43
  }
44
44
  exports.AttributeFromJSONTyped = AttributeFromJSONTyped;
45
45
  function AttributeToJSON(value) {
46
- if (value === undefined) {
47
- return undefined;
48
- }
49
- if (value === null) {
50
- return null;
46
+ if (value == null) {
47
+ return value;
51
48
  }
52
49
  return {
53
- 'name': value.name,
54
- 'value': value.value,
55
- 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value.thumbnail),
56
- 'tags': value.tags,
50
+ 'name': value['name'],
51
+ 'value': value['value'],
52
+ 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value['thumbnail']),
53
+ 'tags': value['tags'],
57
54
  };
58
55
  }
59
56
  exports.AttributeToJSON = AttributeToJSON;
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.AttributeThumbnailToJSON = exports.AttributeThumbnailFromJSONTyped = exports.AttributeThumbnailFromJSON = exports.instanceOfAttributeThumbnail = exports.AttributeThumbnailTypeEnum = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * @export
20
19
  */
@@ -27,8 +26,7 @@ exports.AttributeThumbnailTypeEnum = {
27
26
  * Check if a given object implements the AttributeThumbnail interface.
28
27
  */
29
28
  function instanceOfAttributeThumbnail(value) {
30
- var isInstance = true;
31
- return isInstance;
29
+ return true;
32
30
  }
33
31
  exports.instanceOfAttributeThumbnail = instanceOfAttributeThumbnail;
34
32
  function AttributeThumbnailFromJSON(json) {
@@ -36,25 +34,22 @@ function AttributeThumbnailFromJSON(json) {
36
34
  }
37
35
  exports.AttributeThumbnailFromJSON = AttributeThumbnailFromJSON;
38
36
  function AttributeThumbnailFromJSONTyped(json, ignoreDiscriminator) {
39
- if ((json === undefined) || (json === null)) {
37
+ if (json == null) {
40
38
  return json;
41
39
  }
42
40
  return {
43
- 'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
44
- 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
41
+ 'type': json['type'] == null ? undefined : json['type'],
42
+ 'value': json['value'] == null ? undefined : json['value'],
45
43
  };
46
44
  }
47
45
  exports.AttributeThumbnailFromJSONTyped = AttributeThumbnailFromJSONTyped;
48
46
  function AttributeThumbnailToJSON(value) {
49
- if (value === undefined) {
50
- return undefined;
51
- }
52
- if (value === null) {
53
- return null;
47
+ if (value == null) {
48
+ return value;
54
49
  }
55
50
  return {
56
- 'type': value.type,
57
- 'value': value.value,
51
+ 'type': value['type'],
52
+ 'value': value['value'],
58
53
  };
59
54
  }
60
55
  exports.AttributeThumbnailToJSON = AttributeThumbnailToJSON;
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -14,13 +14,11 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ImageToJSON = exports.ImageFromJSONTyped = exports.ImageFromJSON = exports.instanceOfImage = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Image interface.
20
19
  */
21
20
  function instanceOfImage(value) {
22
- var isInstance = true;
23
- return isInstance;
21
+ return true;
24
22
  }
25
23
  exports.instanceOfImage = instanceOfImage;
26
24
  function ImageFromJSON(json) {
@@ -28,35 +26,32 @@ function ImageFromJSON(json) {
28
26
  }
29
27
  exports.ImageFromJSON = ImageFromJSON;
30
28
  function ImageFromJSONTyped(json, ignoreDiscriminator) {
31
- if ((json === undefined) || (json === null)) {
29
+ if (json == null) {
32
30
  return json;
33
31
  }
34
32
  return {
35
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
36
- 'src': !(0, runtime_1.exists)(json, 'src') ? undefined : json['src'],
37
- 'alt': !(0, runtime_1.exists)(json, 'alt') ? undefined : json['alt'],
38
- 'variantIds': !(0, runtime_1.exists)(json, 'variantIds') ? undefined : json['variantIds'],
39
- 'sortOrder': !(0, runtime_1.exists)(json, 'sortOrder') ? undefined : json['sortOrder'],
40
- 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : json['createdAt'],
41
- 'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : json['updatedAt'],
33
+ 'id': json['id'] == null ? undefined : json['id'],
34
+ 'src': json['src'] == null ? undefined : json['src'],
35
+ 'alt': json['alt'] == null ? undefined : json['alt'],
36
+ 'variantIds': json['variantIds'] == null ? undefined : json['variantIds'],
37
+ 'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
38
+ 'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
39
+ 'updatedAt': json['updatedAt'] == null ? undefined : json['updatedAt'],
42
40
  };
43
41
  }
44
42
  exports.ImageFromJSONTyped = ImageFromJSONTyped;
45
43
  function ImageToJSON(value) {
46
- if (value === undefined) {
47
- return undefined;
48
- }
49
- if (value === null) {
50
- return null;
44
+ if (value == null) {
45
+ return value;
51
46
  }
52
47
  return {
53
- 'id': value.id,
54
- 'src': value.src,
55
- 'alt': value.alt,
56
- 'variantIds': value.variantIds,
57
- 'sortOrder': value.sortOrder,
58
- 'createdAt': value.createdAt,
59
- 'updatedAt': value.updatedAt,
48
+ 'id': value['id'],
49
+ 'src': value['src'],
50
+ 'alt': value['alt'],
51
+ 'variantIds': value['variantIds'],
52
+ 'sortOrder': value['sortOrder'],
53
+ 'createdAt': value['createdAt'],
54
+ 'updatedAt': value['updatedAt'],
60
55
  };
61
56
  }
62
57
  exports.ImageToJSON = ImageToJSON;
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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).
@@ -39,6 +39,24 @@ export interface Product {
39
39
  * @memberof Product
40
40
  */
41
41
  styleCode?: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof Product
46
+ */
47
+ material?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof Product
52
+ */
53
+ description?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof Product
58
+ */
59
+ specifications?: string;
42
60
  }
43
61
  /**
44
62
  * Check if a given object implements the Product interface.
@@ -5,7 +5,7 @@
5
5
  * GFN Catalog API
6
6
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
7
7
  *
8
- * The version of the OpenAPI document: 1.0.1
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).
@@ -14,14 +14,13 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ProductToJSON = exports.ProductFromJSONTyped = exports.ProductFromJSON = exports.instanceOfProduct = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  /**
19
18
  * Check if a given object implements the Product interface.
20
19
  */
21
20
  function instanceOfProduct(value) {
22
- var isInstance = true;
23
- isInstance = isInstance && "title" in value;
24
- return isInstance;
21
+ if (!('title' in value))
22
+ return false;
23
+ return true;
25
24
  }
26
25
  exports.instanceOfProduct = instanceOfProduct;
27
26
  function ProductFromJSON(json) {
@@ -29,29 +28,32 @@ function ProductFromJSON(json) {
29
28
  }
30
29
  exports.ProductFromJSON = ProductFromJSON;
31
30
  function ProductFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
31
+ if (json == null) {
33
32
  return json;
34
33
  }
35
34
  return {
36
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
37
- 'ref': !(0, runtime_1.exists)(json, 'ref') ? undefined : json['ref'],
35
+ 'id': json['id'] == null ? undefined : json['id'],
36
+ 'ref': json['ref'] == null ? undefined : json['ref'],
38
37
  'title': json['title'],
39
- 'styleCode': !(0, runtime_1.exists)(json, 'styleCode') ? undefined : json['styleCode'],
38
+ 'styleCode': json['styleCode'] == null ? undefined : json['styleCode'],
39
+ 'material': json['material'] == null ? undefined : json['material'],
40
+ 'description': json['description'] == null ? undefined : json['description'],
41
+ 'specifications': json['specifications'] == null ? undefined : json['specifications'],
40
42
  };
41
43
  }
42
44
  exports.ProductFromJSONTyped = ProductFromJSONTyped;
43
45
  function ProductToJSON(value) {
44
- if (value === undefined) {
45
- return undefined;
46
- }
47
- if (value === null) {
48
- return null;
46
+ if (value == null) {
47
+ return value;
49
48
  }
50
49
  return {
51
- 'id': value.id,
52
- 'ref': value.ref,
53
- 'title': value.title,
54
- 'styleCode': value.styleCode,
50
+ 'id': value['id'],
51
+ 'ref': value['ref'],
52
+ 'title': value['title'],
53
+ 'styleCode': value['styleCode'],
54
+ 'material': value['material'],
55
+ 'description': value['description'],
56
+ 'specifications': value['specifications'],
55
57
  };
56
58
  }
57
59
  exports.ProductToJSON = ProductToJSON;
@@ -2,7 +2,7 @@
2
2
  * GFN Catalog API
3
3
  * Use this API to access the Global Fulfilment Network, which contains all the warehouse products and variants available to a given project. Warehouse products represent the base products that can be printed on. Products are the top level items, and variants are the different options available for each product. For example, a product might be a T-shirt, and each variant represents a different size and colour combination of that T-shirt. Use references to these warehouse products to create new product listings on your project via the Product Catalog API. Use the variant information to decide which options you would like to offer on each product listing.
4
4
  *
5
- * The version of the OpenAPI document: 1.0.1
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).