@teemill/product-catalog 1.2.0 → 1.3.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 (45) hide show
  1. package/.openapi-generator/VERSION +1 -1
  2. package/README.md +2 -2
  3. package/dist/apis/ProductsApi.d.ts +3 -3
  4. package/dist/apis/ProductsApi.js +18 -5
  5. package/dist/apis/VariantsApi.d.ts +3 -3
  6. package/dist/apis/VariantsApi.js +18 -5
  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/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 +1 -1
  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/runtime.d.ts +6 -1
  30. package/dist/runtime.js +6 -3
  31. package/package.json +1 -1
  32. package/src/apis/ProductsApi.ts +28 -5
  33. package/src/apis/VariantsApi.ts +28 -5
  34. package/src/models/ApiError.ts +1 -1
  35. package/src/models/Attribute.ts +1 -1
  36. package/src/models/AttributeThumbnail.ts +1 -1
  37. package/src/models/Image.ts +1 -1
  38. package/src/models/Price.ts +1 -1
  39. package/src/models/Product.ts +1 -1
  40. package/src/models/ProductsResponse.ts +1 -1
  41. package/src/models/Stock.ts +1 -1
  42. package/src/models/Variant.ts +1 -1
  43. package/src/models/VariantProduct.ts +1 -1
  44. package/src/models/VariantsResponse.ts +1 -1
  45. package/src/runtime.ts +13 -3
@@ -1 +1 @@
1
- 7.1.0-SNAPSHOT
1
+ 7.2.0-SNAPSHOT
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @teemill/product-catalog@1.2.0
1
+ ## @teemill/product-catalog@1.3.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.2.0 --save
39
+ npm install @teemill/product-catalog@1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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(project: string, productId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product>;
38
+ getProduct(project: string, productId: string, optionalParameters?: runtime.OptionalOnly<GetProductRequest>, 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(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
48
+ getProducts(project: string, optionalParameters?: runtime.OptionalOnly<GetProductsRequest>, 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.2.0
8
+ * The version of the OpenAPI document: 1.3.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,6 +27,17 @@ var __extends = (this && this.__extends) || (function () {
27
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
28
  };
29
29
  })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
30
41
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
42
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
43
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -129,12 +140,13 @@ var ProductsApi = /** @class */ (function (_super) {
129
140
  * Gets a product by the given id
130
141
  * Get product
131
142
  */
132
- ProductsApi.prototype.getProduct = function (project, productId, fields, initOverrides) {
143
+ ProductsApi.prototype.getProduct = function (project, productId, optionalParameters, initOverrides) {
144
+ if (optionalParameters === void 0) { optionalParameters = {}; }
133
145
  return __awaiter(this, void 0, void 0, function () {
134
146
  var response;
135
147
  return __generator(this, function (_a) {
136
148
  switch (_a.label) {
137
- case 0: return [4 /*yield*/, this.getProductRaw({ project: project, productId: productId, fields: fields }, initOverrides)];
149
+ case 0: return [4 /*yield*/, this.getProductRaw(__assign({ project: project, productId: productId }, optionalParameters), initOverrides)];
138
150
  case 1:
139
151
  response = _a.sent();
140
152
  return [4 /*yield*/, response.value()];
@@ -200,12 +212,13 @@ var ProductsApi = /** @class */ (function (_super) {
200
212
  * Lists all products
201
213
  * List products
202
214
  */
203
- ProductsApi.prototype.getProducts = function (project, pageToken, pageSize, fields, initOverrides) {
215
+ ProductsApi.prototype.getProducts = function (project, optionalParameters, initOverrides) {
216
+ if (optionalParameters === void 0) { optionalParameters = {}; }
204
217
  return __awaiter(this, void 0, void 0, function () {
205
218
  var response;
206
219
  return __generator(this, function (_a) {
207
220
  switch (_a.label) {
208
- case 0: return [4 /*yield*/, this.getProductsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides)];
221
+ case 0: return [4 /*yield*/, this.getProductsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
209
222
  case 1:
210
223
  response = _a.sent();
211
224
  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.2.0
5
+ * The version of the OpenAPI document: 1.3.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(project: string, variantId: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
38
+ getVariant(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetVariantRequest>, 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(project: string, pageToken?: number, pageSize?: number, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
48
+ listVariants(project: string, optionalParameters?: runtime.OptionalOnly<ListVariantsRequest>, 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.2.0
8
+ * The version of the OpenAPI document: 1.3.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -27,6 +27,17 @@ var __extends = (this && this.__extends) || (function () {
27
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
28
  };
29
29
  })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
30
41
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
42
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
43
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -129,12 +140,13 @@ var VariantsApi = /** @class */ (function (_super) {
129
140
  * Gets a variant by the given id
130
141
  * Get variant
131
142
  */
132
- VariantsApi.prototype.getVariant = function (project, variantId, fields, initOverrides) {
143
+ VariantsApi.prototype.getVariant = function (project, variantId, optionalParameters, initOverrides) {
144
+ if (optionalParameters === void 0) { optionalParameters = {}; }
133
145
  return __awaiter(this, void 0, void 0, function () {
134
146
  var response;
135
147
  return __generator(this, function (_a) {
136
148
  switch (_a.label) {
137
- case 0: return [4 /*yield*/, this.getVariantRaw({ project: project, variantId: variantId, fields: fields }, initOverrides)];
149
+ case 0: return [4 /*yield*/, this.getVariantRaw(__assign({ project: project, variantId: variantId }, optionalParameters), initOverrides)];
138
150
  case 1:
139
151
  response = _a.sent();
140
152
  return [4 /*yield*/, response.value()];
@@ -200,12 +212,13 @@ var VariantsApi = /** @class */ (function (_super) {
200
212
  * Lists all variants
201
213
  * List variants
202
214
  */
203
- VariantsApi.prototype.listVariants = function (project, pageToken, pageSize, fields, initOverrides) {
215
+ VariantsApi.prototype.listVariants = function (project, optionalParameters, initOverrides) {
216
+ if (optionalParameters === void 0) { optionalParameters = {}; }
204
217
  return __awaiter(this, void 0, void 0, function () {
205
218
  var response;
206
219
  return __generator(this, function (_a) {
207
220
  switch (_a.label) {
208
- case 0: return [4 /*yield*/, this.listVariantsRaw({ project: project, pageToken: pageToken, pageSize: pageSize, fields: fields }, initOverrides)];
221
+ case 0: return [4 /*yield*/, this.listVariantsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
209
222
  case 1:
210
223
  response = _a.sent();
211
224
  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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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.2.0
5
+ * The version of the OpenAPI document: 1.3.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.2.0
8
+ * The version of the OpenAPI document: 1.3.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/dist/runtime.d.ts CHANGED
@@ -2,13 +2,17 @@
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.2.0
5
+ * The version of the OpenAPI document: 1.3.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
+ export type OptionalProperties<T> = {
13
+ [K in keyof T]-?: undefined extends T[K] ? K : never;
14
+ }[keyof T];
15
+ export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
12
16
  export declare const BASE_PATH: string;
13
17
  export interface ConfigurationParameters {
14
18
  basePath?: string;
@@ -46,6 +50,7 @@ export declare class BaseAPI {
46
50
  private static readonly jsonRegex;
47
51
  private middleware;
48
52
  constructor(configuration?: Configuration);
53
+ isResponseError(error: any): error is ResponseError;
49
54
  withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
50
55
  withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
51
56
  withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
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.2.0
8
+ * The version of the OpenAPI document: 1.3.0
9
9
  * Contact: hello@teemill.com
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -266,6 +266,9 @@ var BaseAPI = /** @class */ (function () {
266
266
  }); };
267
267
  this.middleware = configuration.middleware;
268
268
  }
269
+ BaseAPI.prototype.isResponseError = function (error) {
270
+ return error instanceof Error && error.name === 'ResponseError';
271
+ };
269
272
  BaseAPI.prototype.withMiddleware = function () {
270
273
  var _a;
271
274
  var middlewares = [];
@@ -456,8 +459,8 @@ function querystringSingleKey(key, value, keyPrefix) {
456
459
  var fullKey = keyPrefix + (keyPrefix.length ? "[".concat(key, "]") : key);
457
460
  if (value instanceof Array) {
458
461
  var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
459
- .join("&".concat(encodeURIComponent(fullKey), "="));
460
- return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
462
+ .join("&".concat(encodeURIComponent(fullKey), "[]="));
463
+ return "".concat(encodeURIComponent(fullKey), "[]=").concat(multiValue);
461
464
  }
462
465
  if (value instanceof Set) {
463
466
  var valueAsArray = Array.from(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teemill/product-catalog",
3
- "version": "1.2.0",
3
+ "version": "1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -94,8 +94,20 @@ export class ProductsApi extends runtime.BaseAPI {
94
94
  * Gets a product by the given id
95
95
  * Get product
96
96
  */
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);
97
+ async getProduct(
98
+ project: string, productId: string,
99
+ optionalParameters: runtime.OptionalOnly<GetProductRequest> = {},
100
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
101
+ ): Promise<Product> {
102
+ const response = await this.getProductRaw(
103
+ {
104
+ project: project,
105
+ productId: productId,
106
+ ...optionalParameters,
107
+ },
108
+ initOverrides
109
+ );
110
+
99
111
  return await response.value();
100
112
  }
101
113
 
@@ -151,8 +163,19 @@ export class ProductsApi extends runtime.BaseAPI {
151
163
  * Lists all products
152
164
  * List products
153
165
  */
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);
166
+ async getProducts(
167
+ project: string,
168
+ optionalParameters: runtime.OptionalOnly<GetProductsRequest> = {},
169
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
170
+ ): Promise<ProductsResponse> {
171
+ const response = await this.getProductsRaw(
172
+ {
173
+ project: project,
174
+ ...optionalParameters,
175
+ },
176
+ initOverrides
177
+ );
178
+
156
179
  return await response.value();
157
180
  }
158
181
 
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -94,8 +94,20 @@ export class VariantsApi extends runtime.BaseAPI {
94
94
  * Gets a variant by the given id
95
95
  * Get variant
96
96
  */
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);
97
+ async getVariant(
98
+ project: string, variantId: string,
99
+ optionalParameters: runtime.OptionalOnly<GetVariantRequest> = {},
100
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
101
+ ): Promise<Variant> {
102
+ const response = await this.getVariantRaw(
103
+ {
104
+ project: project,
105
+ variantId: variantId,
106
+ ...optionalParameters,
107
+ },
108
+ initOverrides
109
+ );
110
+
99
111
  return await response.value();
100
112
  }
101
113
 
@@ -151,8 +163,19 @@ export class VariantsApi extends runtime.BaseAPI {
151
163
  * Lists all variants
152
164
  * List variants
153
165
  */
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);
166
+ async listVariants(
167
+ project: string,
168
+ optionalParameters: runtime.OptionalOnly<ListVariantsRequest> = {},
169
+ initOverrides?: RequestInit | runtime.InitOverrideFunction
170
+ ): Promise<VariantsResponse> {
171
+ const response = await this.listVariantsRaw(
172
+ {
173
+ project: project,
174
+ ...optionalParameters,
175
+ },
176
+ initOverrides
177
+ );
178
+
156
179
  return await response.value();
157
180
  }
158
181
 
@@ -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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.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.2.0
7
+ * The version of the OpenAPI document: 1.3.0
8
8
  * Contact: hello@teemill.com
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
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.2.0
7
+ * The version of the OpenAPI document: 1.3.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,12 @@
13
13
  */
14
14
 
15
15
 
16
+ export type OptionalProperties<T> = {
17
+ [K in keyof T]-?: undefined extends T[K] ? K : never
18
+ }[keyof T];
19
+
20
+ export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
21
+
16
22
  export const BASE_PATH = "http://api.localhost".replace(/\/+$/, "");
17
23
 
18
24
  export interface ConfigurationParameters {
@@ -98,6 +104,10 @@ export class BaseAPI {
98
104
  this.middleware = configuration.middleware;
99
105
  }
100
106
 
107
+ isResponseError(error: any): error is ResponseError {
108
+ return error instanceof Error && error.name === 'ResponseError';
109
+ }
110
+
101
111
  withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
102
112
  const next = this.clone<T>();
103
113
  next.middleware = next.middleware.concat(...middlewares);
@@ -326,8 +336,8 @@ function querystringSingleKey(key: string, value: string | number | null | undef
326
336
  const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
327
337
  if (value instanceof Array) {
328
338
  const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
329
- .join(`&${encodeURIComponent(fullKey)}=`);
330
- return `${encodeURIComponent(fullKey)}=${multiValue}`;
339
+ .join(`&${encodeURIComponent(fullKey)}[]=`);
340
+ return `${encodeURIComponent(fullKey)}[]=${multiValue}`;
331
341
  }
332
342
  if (value instanceof Set) {
333
343
  const valueAsArray = Array.from(value);