@teemill/product-catalog 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +3 -3
- package/dist/apis/ProductsApi.js +18 -5
- package/dist/apis/VariantsApi.d.ts +4 -3
- package/dist/apis/VariantsApi.js +21 -5
- package/dist/models/ApiError.d.ts +1 -1
- package/dist/models/ApiError.js +1 -1
- package/dist/models/Attribute.d.ts +1 -1
- package/dist/models/Attribute.js +1 -1
- package/dist/models/AttributeThumbnail.d.ts +1 -1
- package/dist/models/AttributeThumbnail.js +1 -1
- package/dist/models/Image.d.ts +1 -1
- package/dist/models/Image.js +1 -1
- package/dist/models/Price.d.ts +1 -1
- package/dist/models/Price.js +1 -1
- package/dist/models/Product.d.ts +1 -1
- package/dist/models/Product.js +1 -1
- package/dist/models/ProductsResponse.d.ts +1 -1
- package/dist/models/ProductsResponse.js +1 -1
- package/dist/models/Stock.d.ts +1 -1
- package/dist/models/Stock.js +1 -1
- package/dist/models/Variant.d.ts +1 -1
- package/dist/models/Variant.js +1 -1
- package/dist/models/VariantProduct.d.ts +1 -1
- package/dist/models/VariantProduct.js +1 -1
- package/dist/models/VariantsResponse.d.ts +1 -1
- package/dist/models/VariantsResponse.js +1 -1
- package/dist/runtime.d.ts +6 -1
- package/dist/runtime.js +7 -4
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +27 -5
- package/src/apis/VariantsApi.ts +32 -5
- package/src/models/ApiError.ts +1 -1
- package/src/models/Attribute.ts +1 -1
- package/src/models/AttributeThumbnail.ts +1 -1
- package/src/models/Image.ts +1 -1
- package/src/models/Price.ts +1 -1
- package/src/models/Product.ts +1 -1
- package/src/models/ProductsResponse.ts +1 -1
- package/src/models/Stock.ts +1 -1
- package/src/models/Variant.ts +1 -1
- package/src/models/VariantProduct.ts +1 -1
- package/src/models/VariantsResponse.ts +1 -1
- package/src/runtime.ts +14 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
7.
|
|
1
|
+
7.3.0-SNAPSHOT
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/product-catalog@1.
|
|
1
|
+
## @teemill/product-catalog@1.4.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.
|
|
39
|
+
npm install @teemill/product-catalog@1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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,
|
|
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,
|
|
48
|
+
getProducts(project: string, optionalParameters?: runtime.OptionalOnly<GetProductsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
|
|
49
49
|
}
|
package/dist/apis/ProductsApi.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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,
|
|
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
|
|
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,
|
|
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
|
|
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.0
|
|
6
6
|
* Contact: hello@teemill.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,6 +18,7 @@ export interface GetVariantRequest {
|
|
|
18
18
|
}
|
|
19
19
|
export interface ListVariantsRequest {
|
|
20
20
|
project: string;
|
|
21
|
+
search?: string;
|
|
21
22
|
pageToken?: number;
|
|
22
23
|
pageSize?: number;
|
|
23
24
|
fields?: string;
|
|
@@ -35,7 +36,7 @@ export declare class VariantsApi extends runtime.BaseAPI {
|
|
|
35
36
|
* Gets a variant by the given id
|
|
36
37
|
* Get variant
|
|
37
38
|
*/
|
|
38
|
-
getVariant(project: string, variantId: string,
|
|
39
|
+
getVariant(project: string, variantId: string, optionalParameters?: runtime.OptionalOnly<GetVariantRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Variant>;
|
|
39
40
|
/**
|
|
40
41
|
* Lists all variants
|
|
41
42
|
* List variants
|
|
@@ -45,5 +46,5 @@ export declare class VariantsApi extends runtime.BaseAPI {
|
|
|
45
46
|
* Lists all variants
|
|
46
47
|
* List variants
|
|
47
48
|
*/
|
|
48
|
-
listVariants(project: string,
|
|
49
|
+
listVariants(project: string, optionalParameters?: runtime.OptionalOnly<ListVariantsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VariantsResponse>;
|
|
49
50
|
}
|
package/dist/apis/VariantsApi.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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,
|
|
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
|
|
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()];
|
|
@@ -160,6 +172,9 @@ var VariantsApi = /** @class */ (function (_super) {
|
|
|
160
172
|
if (requestParameters.project !== undefined) {
|
|
161
173
|
queryParameters['project'] = requestParameters.project;
|
|
162
174
|
}
|
|
175
|
+
if (requestParameters.search !== undefined) {
|
|
176
|
+
queryParameters['search'] = requestParameters.search;
|
|
177
|
+
}
|
|
163
178
|
if (requestParameters.pageToken !== undefined) {
|
|
164
179
|
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
165
180
|
}
|
|
@@ -200,12 +215,13 @@ var VariantsApi = /** @class */ (function (_super) {
|
|
|
200
215
|
* Lists all variants
|
|
201
216
|
* List variants
|
|
202
217
|
*/
|
|
203
|
-
VariantsApi.prototype.listVariants = function (project,
|
|
218
|
+
VariantsApi.prototype.listVariants = function (project, optionalParameters, initOverrides) {
|
|
219
|
+
if (optionalParameters === void 0) { optionalParameters = {}; }
|
|
204
220
|
return __awaiter(this, void 0, void 0, function () {
|
|
205
221
|
var response;
|
|
206
222
|
return __generator(this, function (_a) {
|
|
207
223
|
switch (_a.label) {
|
|
208
|
-
case 0: return [4 /*yield*/, this.listVariantsRaw({ project: project
|
|
224
|
+
case 0: return [4 /*yield*/, this.listVariantsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
|
|
209
225
|
case 1:
|
|
210
226
|
response = _a.sent();
|
|
211
227
|
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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/ApiError.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Attribute.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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/models/Image.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Image.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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/models/Price.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Price.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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/models/Product.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Product.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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/models/Stock.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Stock.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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/models/Variant.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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/models/Variant.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
5
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
8
|
+
* The version of the OpenAPI document: 1.4.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -76,7 +76,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
76
76
|
};
|
|
77
77
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
78
|
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
79
|
-
exports.BASE_PATH = "
|
|
79
|
+
exports.BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
|
|
80
80
|
var Configuration = /** @class */ (function () {
|
|
81
81
|
function Configuration(configuration) {
|
|
82
82
|
if (configuration === void 0) { configuration = {}; }
|
|
@@ -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
package/src/apis/ProductsApi.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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,19 @@ export class ProductsApi extends runtime.BaseAPI {
|
|
|
94
94
|
* Gets a product by the given id
|
|
95
95
|
* Get product
|
|
96
96
|
*/
|
|
97
|
-
async getProduct(
|
|
98
|
-
|
|
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,productId: productId,
|
|
105
|
+
...optionalParameters,
|
|
106
|
+
},
|
|
107
|
+
initOverrides
|
|
108
|
+
);
|
|
109
|
+
|
|
99
110
|
return await response.value();
|
|
100
111
|
}
|
|
101
112
|
|
|
@@ -151,8 +162,19 @@ export class ProductsApi extends runtime.BaseAPI {
|
|
|
151
162
|
* Lists all products
|
|
152
163
|
* List products
|
|
153
164
|
*/
|
|
154
|
-
async getProducts(
|
|
155
|
-
|
|
165
|
+
async getProducts(
|
|
166
|
+
project: string,
|
|
167
|
+
optionalParameters: runtime.OptionalOnly<GetProductsRequest> = {},
|
|
168
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
169
|
+
): Promise<ProductsResponse> {
|
|
170
|
+
const response = await this.getProductsRaw(
|
|
171
|
+
{
|
|
172
|
+
project: project,
|
|
173
|
+
...optionalParameters,
|
|
174
|
+
},
|
|
175
|
+
initOverrides
|
|
176
|
+
);
|
|
177
|
+
|
|
156
178
|
return await response.value();
|
|
157
179
|
}
|
|
158
180
|
|
package/src/apis/VariantsApi.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.0
|
|
8
8
|
* Contact: hello@teemill.com
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -36,6 +36,7 @@ export interface GetVariantRequest {
|
|
|
36
36
|
|
|
37
37
|
export interface ListVariantsRequest {
|
|
38
38
|
project: string;
|
|
39
|
+
search?: string;
|
|
39
40
|
pageToken?: number;
|
|
40
41
|
pageSize?: number;
|
|
41
42
|
fields?: string;
|
|
@@ -94,8 +95,19 @@ export class VariantsApi extends runtime.BaseAPI {
|
|
|
94
95
|
* Gets a variant by the given id
|
|
95
96
|
* Get variant
|
|
96
97
|
*/
|
|
97
|
-
async getVariant(
|
|
98
|
-
|
|
98
|
+
async getVariant(
|
|
99
|
+
project: string, variantId: string,
|
|
100
|
+
optionalParameters: runtime.OptionalOnly<GetVariantRequest> = {},
|
|
101
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
102
|
+
): Promise<Variant> {
|
|
103
|
+
const response = await this.getVariantRaw(
|
|
104
|
+
{
|
|
105
|
+
project: project,variantId: variantId,
|
|
106
|
+
...optionalParameters,
|
|
107
|
+
},
|
|
108
|
+
initOverrides
|
|
109
|
+
);
|
|
110
|
+
|
|
99
111
|
return await response.value();
|
|
100
112
|
}
|
|
101
113
|
|
|
@@ -114,6 +126,10 @@ export class VariantsApi extends runtime.BaseAPI {
|
|
|
114
126
|
queryParameters['project'] = requestParameters.project;
|
|
115
127
|
}
|
|
116
128
|
|
|
129
|
+
if (requestParameters.search !== undefined) {
|
|
130
|
+
queryParameters['search'] = requestParameters.search;
|
|
131
|
+
}
|
|
132
|
+
|
|
117
133
|
if (requestParameters.pageToken !== undefined) {
|
|
118
134
|
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
119
135
|
}
|
|
@@ -151,8 +167,19 @@ export class VariantsApi extends runtime.BaseAPI {
|
|
|
151
167
|
* Lists all variants
|
|
152
168
|
* List variants
|
|
153
169
|
*/
|
|
154
|
-
async listVariants(
|
|
155
|
-
|
|
170
|
+
async listVariants(
|
|
171
|
+
project: string,
|
|
172
|
+
optionalParameters: runtime.OptionalOnly<ListVariantsRequest> = {},
|
|
173
|
+
initOverrides?: RequestInit | runtime.InitOverrideFunction
|
|
174
|
+
): Promise<VariantsResponse> {
|
|
175
|
+
const response = await this.listVariantsRaw(
|
|
176
|
+
{
|
|
177
|
+
project: project,
|
|
178
|
+
...optionalParameters,
|
|
179
|
+
},
|
|
180
|
+
initOverrides
|
|
181
|
+
);
|
|
182
|
+
|
|
156
183
|
return await response.value();
|
|
157
184
|
}
|
|
158
185
|
|
package/src/models/ApiError.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Attribute.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Image.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Price.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Product.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Stock.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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/models/Variant.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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.
|
|
7
|
+
* The version of the OpenAPI document: 1.4.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,7 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
export
|
|
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
|
+
|
|
22
|
+
export const BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
|
|
17
23
|
|
|
18
24
|
export interface ConfigurationParameters {
|
|
19
25
|
basePath?: string; // override base path
|
|
@@ -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);
|