@teemill/product-catalog 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/.openapi-generator/VERSION +1 -1
- package/README.md +2 -2
- package/dist/apis/ProductsApi.d.ts +30 -2
- package/dist/apis/ProductsApi.js +129 -1
- package/dist/apis/VariantsApi.d.ts +2 -1
- package/dist/apis/VariantsApi.js +4 -1
- 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/CreateProductRequest.d.ts +75 -0
- package/dist/models/CreateProductRequest.js +68 -0
- package/dist/models/CreateProductRequestAdditionalFilesInner.d.ts +31 -0
- package/dist/models/CreateProductRequestAdditionalFilesInner.js +50 -0
- package/dist/models/CreateProductRequestVariantsInner.d.ts +52 -0
- package/dist/models/CreateProductRequestVariantsInner.js +59 -0
- package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +59 -0
- package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.js +68 -0
- package/dist/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +37 -0
- package/dist/models/CreateProductRequestVariantsInnerAttributesInner.js +52 -0
- 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 +8 -1
- package/dist/models/Product.js +4 -1
- package/dist/models/ProductAdditionalFilesInner.d.ts +37 -0
- package/dist/models/ProductAdditionalFilesInner.js +52 -0
- 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/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/package.json +1 -1
- package/src/apis/ProductsApi.ts +131 -3
- package/src/apis/VariantsApi.ts +7 -3
- package/src/models/ApiError.ts +1 -1
- package/src/models/Attribute.ts +1 -1
- package/src/models/AttributeThumbnail.ts +1 -1
- package/src/models/CreateProductRequest.ts +136 -0
- package/src/models/CreateProductRequestAdditionalFilesInner.ts +65 -0
- package/src/models/CreateProductRequestVariantsInner.ts +108 -0
- package/src/models/CreateProductRequestVariantsInnerApplicationsInner.ts +101 -0
- package/src/models/CreateProductRequestVariantsInnerAttributesInner.ts +73 -0
- package/src/models/Image.ts +1 -1
- package/src/models/Price.ts +1 -1
- package/src/models/Product.ts +15 -1
- package/src/models/ProductAdditionalFilesInner.ts +73 -0
- 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/models/index.ts +6 -0
- package/src/runtime.ts +2 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -9,9 +9,15 @@ src/index.ts
|
|
|
9
9
|
src/models/ApiError.ts
|
|
10
10
|
src/models/Attribute.ts
|
|
11
11
|
src/models/AttributeThumbnail.ts
|
|
12
|
+
src/models/CreateProductRequest.ts
|
|
13
|
+
src/models/CreateProductRequestAdditionalFilesInner.ts
|
|
14
|
+
src/models/CreateProductRequestVariantsInner.ts
|
|
15
|
+
src/models/CreateProductRequestVariantsInnerApplicationsInner.ts
|
|
16
|
+
src/models/CreateProductRequestVariantsInnerAttributesInner.ts
|
|
12
17
|
src/models/Image.ts
|
|
13
18
|
src/models/Price.ts
|
|
14
19
|
src/models/Product.ts
|
|
20
|
+
src/models/ProductAdditionalFilesInner.ts
|
|
15
21
|
src/models/ProductsResponse.ts
|
|
16
22
|
src/models/Stock.ts
|
|
17
23
|
src/models/Variant.ts
|
|
@@ -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.5.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.5.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.5.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,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Product, ProductsResponse } from '../models/index';
|
|
13
|
+
import type { CreateProductRequest, Product, ProductsResponse } from '../models/index';
|
|
14
|
+
export interface CreateProductOperationRequest {
|
|
15
|
+
project: string;
|
|
16
|
+
createProductRequest?: CreateProductRequest;
|
|
17
|
+
}
|
|
14
18
|
export interface GetProductRequest {
|
|
15
19
|
project: string;
|
|
16
20
|
productId: string;
|
|
@@ -22,10 +26,24 @@ export interface GetProductsRequest {
|
|
|
22
26
|
pageSize?: number;
|
|
23
27
|
fields?: string;
|
|
24
28
|
}
|
|
29
|
+
export interface ImportProductsRequest {
|
|
30
|
+
project: string;
|
|
31
|
+
body?: string;
|
|
32
|
+
}
|
|
25
33
|
/**
|
|
26
34
|
*
|
|
27
35
|
*/
|
|
28
36
|
export declare class ProductsApi extends runtime.BaseAPI {
|
|
37
|
+
/**
|
|
38
|
+
* Creates a catalog product
|
|
39
|
+
* Create catalog product
|
|
40
|
+
*/
|
|
41
|
+
createProductRaw(requestParameters: CreateProductOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Product>>;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a catalog product
|
|
44
|
+
* Create catalog product
|
|
45
|
+
*/
|
|
46
|
+
createProduct(project: string, optionalParameters?: runtime.OptionalOnly<CreateProductOperationRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Product>;
|
|
29
47
|
/**
|
|
30
48
|
* Gets a product by the given id
|
|
31
49
|
* Get product
|
|
@@ -46,4 +64,14 @@ export declare class ProductsApi extends runtime.BaseAPI {
|
|
|
46
64
|
* List products
|
|
47
65
|
*/
|
|
48
66
|
getProducts(project: string, optionalParameters?: runtime.OptionalOnly<GetProductsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductsResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Import products
|
|
69
|
+
* Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
|
|
70
|
+
*/
|
|
71
|
+
importProductsRaw(requestParameters: ImportProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
72
|
+
/**
|
|
73
|
+
* Import products
|
|
74
|
+
* Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
|
|
75
|
+
*/
|
|
76
|
+
importProducts(project: string, optionalParameters?: runtime.OptionalOnly<ImportProductsRequest>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
49
77
|
}
|
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.5.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -86,6 +86,71 @@ var ProductsApi = /** @class */ (function (_super) {
|
|
|
86
86
|
function ProductsApi() {
|
|
87
87
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Creates a catalog product
|
|
91
|
+
* Create catalog product
|
|
92
|
+
*/
|
|
93
|
+
ProductsApi.prototype.createProductRaw = function (requestParameters, initOverrides) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
96
|
+
return __generator(this, function (_c) {
|
|
97
|
+
switch (_c.label) {
|
|
98
|
+
case 0:
|
|
99
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
100
|
+
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling createProduct.');
|
|
101
|
+
}
|
|
102
|
+
queryParameters = {};
|
|
103
|
+
if (requestParameters.project !== undefined) {
|
|
104
|
+
queryParameters['project'] = requestParameters.project;
|
|
105
|
+
}
|
|
106
|
+
headerParameters = {};
|
|
107
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
108
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
109
|
+
// oauth required
|
|
110
|
+
_a = headerParameters;
|
|
111
|
+
_b = "Authorization";
|
|
112
|
+
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
113
|
+
case 1:
|
|
114
|
+
// oauth required
|
|
115
|
+
_a[_b] = _c.sent();
|
|
116
|
+
_c.label = 2;
|
|
117
|
+
case 2:
|
|
118
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
119
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
120
|
+
}
|
|
121
|
+
return [4 /*yield*/, this.request({
|
|
122
|
+
path: "/v1/catalog/products",
|
|
123
|
+
method: 'POST',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
body: (0, index_1.CreateProductRequestToJSON)(requestParameters.createProductRequest),
|
|
127
|
+
}, initOverrides)];
|
|
128
|
+
case 3:
|
|
129
|
+
response = _c.sent();
|
|
130
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductFromJSON)(jsonValue); })];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Creates a catalog product
|
|
137
|
+
* Create catalog product
|
|
138
|
+
*/
|
|
139
|
+
ProductsApi.prototype.createProduct = function (project, optionalParameters, initOverrides) {
|
|
140
|
+
if (optionalParameters === void 0) { optionalParameters = {}; }
|
|
141
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
+
var response;
|
|
143
|
+
return __generator(this, function (_a) {
|
|
144
|
+
switch (_a.label) {
|
|
145
|
+
case 0: return [4 /*yield*/, this.createProductRaw(__assign({ project: project }, optionalParameters), initOverrides)];
|
|
146
|
+
case 1:
|
|
147
|
+
response = _a.sent();
|
|
148
|
+
return [4 /*yield*/, response.value()];
|
|
149
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
};
|
|
89
154
|
/**
|
|
90
155
|
* Gets a product by the given id
|
|
91
156
|
* Get product
|
|
@@ -227,6 +292,69 @@ var ProductsApi = /** @class */ (function (_super) {
|
|
|
227
292
|
});
|
|
228
293
|
});
|
|
229
294
|
};
|
|
295
|
+
/**
|
|
296
|
+
* Import products
|
|
297
|
+
* Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
|
|
298
|
+
*/
|
|
299
|
+
ProductsApi.prototype.importProductsRaw = function (requestParameters, initOverrides) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
301
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
302
|
+
return __generator(this, function (_c) {
|
|
303
|
+
switch (_c.label) {
|
|
304
|
+
case 0:
|
|
305
|
+
if (requestParameters.project === null || requestParameters.project === undefined) {
|
|
306
|
+
throw new runtime.RequiredError('project', 'Required parameter requestParameters.project was null or undefined when calling importProducts.');
|
|
307
|
+
}
|
|
308
|
+
queryParameters = {};
|
|
309
|
+
if (requestParameters.project !== undefined) {
|
|
310
|
+
queryParameters['project'] = requestParameters.project;
|
|
311
|
+
}
|
|
312
|
+
headerParameters = {};
|
|
313
|
+
headerParameters['Content-Type'] = 'text/csv';
|
|
314
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
315
|
+
// oauth required
|
|
316
|
+
_a = headerParameters;
|
|
317
|
+
_b = "Authorization";
|
|
318
|
+
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
319
|
+
case 1:
|
|
320
|
+
// oauth required
|
|
321
|
+
_a[_b] = _c.sent();
|
|
322
|
+
_c.label = 2;
|
|
323
|
+
case 2:
|
|
324
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
325
|
+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
326
|
+
}
|
|
327
|
+
return [4 /*yield*/, this.request({
|
|
328
|
+
path: "/v1/catalog/products/import",
|
|
329
|
+
method: 'POST',
|
|
330
|
+
headers: headerParameters,
|
|
331
|
+
query: queryParameters,
|
|
332
|
+
body: requestParameters.body,
|
|
333
|
+
}, initOverrides)];
|
|
334
|
+
case 3:
|
|
335
|
+
response = _c.sent();
|
|
336
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Import products
|
|
343
|
+
* Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
|
|
344
|
+
*/
|
|
345
|
+
ProductsApi.prototype.importProducts = function (project, optionalParameters, initOverrides) {
|
|
346
|
+
if (optionalParameters === void 0) { optionalParameters = {}; }
|
|
347
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
348
|
+
return __generator(this, function (_a) {
|
|
349
|
+
switch (_a.label) {
|
|
350
|
+
case 0: return [4 /*yield*/, this.importProductsRaw(__assign({ project: project }, optionalParameters), initOverrides)];
|
|
351
|
+
case 1:
|
|
352
|
+
_a.sent();
|
|
353
|
+
return [2 /*return*/];
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
};
|
|
230
358
|
return ProductsApi;
|
|
231
359
|
}(runtime.BaseAPI));
|
|
232
360
|
exports.ProductsApi = ProductsApi;
|
|
@@ -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.5.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;
|
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.5.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -172,6 +172,9 @@ var VariantsApi = /** @class */ (function (_super) {
|
|
|
172
172
|
if (requestParameters.project !== undefined) {
|
|
173
173
|
queryParameters['project'] = requestParameters.project;
|
|
174
174
|
}
|
|
175
|
+
if (requestParameters.search !== undefined) {
|
|
176
|
+
queryParameters['search'] = requestParameters.search;
|
|
177
|
+
}
|
|
175
178
|
if (requestParameters.pageToken !== undefined) {
|
|
176
179
|
queryParameters['pageToken'] = requestParameters.pageToken;
|
|
177
180
|
}
|
|
@@ -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.5.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.5.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.5.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.5.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.5.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.5.0
|
|
9
9
|
* Contact: hello@teemill.com
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Catalog API
|
|
3
|
+
* Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.5.0
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateProductRequestAdditionalFilesInner } from './CreateProductRequestAdditionalFilesInner';
|
|
13
|
+
import type { CreateProductRequestVariantsInner } from './CreateProductRequestVariantsInner';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface CreateProductRequest
|
|
18
|
+
*/
|
|
19
|
+
export interface CreateProductRequest {
|
|
20
|
+
/**
|
|
21
|
+
* GFN product ref
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof CreateProductRequest
|
|
24
|
+
*/
|
|
25
|
+
gfnProductRef: string;
|
|
26
|
+
/**
|
|
27
|
+
* Product title
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof CreateProductRequest
|
|
30
|
+
*/
|
|
31
|
+
title?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Product description
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof CreateProductRequest
|
|
36
|
+
*/
|
|
37
|
+
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the product is enabled
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof CreateProductRequest
|
|
42
|
+
*/
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* A custom url slug for the product
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof CreateProductRequest
|
|
48
|
+
*/
|
|
49
|
+
slug?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Product tags
|
|
52
|
+
* @type {Array<string>}
|
|
53
|
+
* @memberof CreateProductRequest
|
|
54
|
+
*/
|
|
55
|
+
tags?: Array<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Variants
|
|
58
|
+
* @type {Array<CreateProductRequestVariantsInner>}
|
|
59
|
+
* @memberof CreateProductRequest
|
|
60
|
+
*/
|
|
61
|
+
variants: Array<CreateProductRequestVariantsInner>;
|
|
62
|
+
/**
|
|
63
|
+
* Additional files
|
|
64
|
+
* @type {Array<CreateProductRequestAdditionalFilesInner>}
|
|
65
|
+
* @memberof CreateProductRequest
|
|
66
|
+
*/
|
|
67
|
+
additionalFiles?: Array<CreateProductRequestAdditionalFilesInner>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the CreateProductRequest interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfCreateProductRequest(value: object): boolean;
|
|
73
|
+
export declare function CreateProductRequestFromJSON(json: any): CreateProductRequest;
|
|
74
|
+
export declare function CreateProductRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequest;
|
|
75
|
+
export declare function CreateProductRequestToJSON(value?: CreateProductRequest | null): any;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Product Catalog API
|
|
6
|
+
* Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.5.0
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateProductRequestToJSON = exports.CreateProductRequestFromJSONTyped = exports.CreateProductRequestFromJSON = exports.instanceOfCreateProductRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var CreateProductRequestAdditionalFilesInner_1 = require("./CreateProductRequestAdditionalFilesInner");
|
|
19
|
+
var CreateProductRequestVariantsInner_1 = require("./CreateProductRequestVariantsInner");
|
|
20
|
+
/**
|
|
21
|
+
* Check if a given object implements the CreateProductRequest interface.
|
|
22
|
+
*/
|
|
23
|
+
function instanceOfCreateProductRequest(value) {
|
|
24
|
+
var isInstance = true;
|
|
25
|
+
isInstance = isInstance && "gfnProductRef" in value;
|
|
26
|
+
isInstance = isInstance && "variants" in value;
|
|
27
|
+
return isInstance;
|
|
28
|
+
}
|
|
29
|
+
exports.instanceOfCreateProductRequest = instanceOfCreateProductRequest;
|
|
30
|
+
function CreateProductRequestFromJSON(json) {
|
|
31
|
+
return CreateProductRequestFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
exports.CreateProductRequestFromJSON = CreateProductRequestFromJSON;
|
|
34
|
+
function CreateProductRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if ((json === undefined) || (json === null)) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'gfnProductRef': json['gfnProductRef'],
|
|
40
|
+
'title': !(0, runtime_1.exists)(json, 'title') ? undefined : json['title'],
|
|
41
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
42
|
+
'enabled': !(0, runtime_1.exists)(json, 'enabled') ? undefined : json['enabled'],
|
|
43
|
+
'slug': !(0, runtime_1.exists)(json, 'slug') ? undefined : json['slug'],
|
|
44
|
+
'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
|
|
45
|
+
'variants': (json['variants'].map(CreateProductRequestVariantsInner_1.CreateProductRequestVariantsInnerFromJSON)),
|
|
46
|
+
'additionalFiles': !(0, runtime_1.exists)(json, 'additionalFiles') ? undefined : (json['additionalFiles'].map(CreateProductRequestAdditionalFilesInner_1.CreateProductRequestAdditionalFilesInnerFromJSON)),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
exports.CreateProductRequestFromJSONTyped = CreateProductRequestFromJSONTyped;
|
|
50
|
+
function CreateProductRequestToJSON(value) {
|
|
51
|
+
if (value === undefined) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
if (value === null) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
'gfnProductRef': value.gfnProductRef,
|
|
59
|
+
'title': value.title,
|
|
60
|
+
'description': value.description,
|
|
61
|
+
'enabled': value.enabled,
|
|
62
|
+
'slug': value.slug,
|
|
63
|
+
'tags': value.tags,
|
|
64
|
+
'variants': (value.variants.map(CreateProductRequestVariantsInner_1.CreateProductRequestVariantsInnerToJSON)),
|
|
65
|
+
'additionalFiles': value.additionalFiles === undefined ? undefined : (value.additionalFiles.map(CreateProductRequestAdditionalFilesInner_1.CreateProductRequestAdditionalFilesInnerToJSON)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.CreateProductRequestToJSON = CreateProductRequestToJSON;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Catalog API
|
|
3
|
+
* Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.5.0
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateProductRequestAdditionalFilesInner
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateProductRequestAdditionalFilesInner {
|
|
18
|
+
/**
|
|
19
|
+
* File url
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateProductRequestAdditionalFilesInner
|
|
22
|
+
*/
|
|
23
|
+
src?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CreateProductRequestAdditionalFilesInner interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfCreateProductRequestAdditionalFilesInner(value: object): boolean;
|
|
29
|
+
export declare function CreateProductRequestAdditionalFilesInnerFromJSON(json: any): CreateProductRequestAdditionalFilesInner;
|
|
30
|
+
export declare function CreateProductRequestAdditionalFilesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestAdditionalFilesInner;
|
|
31
|
+
export declare function CreateProductRequestAdditionalFilesInnerToJSON(value?: CreateProductRequestAdditionalFilesInner | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Product Catalog API
|
|
6
|
+
* Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.5.0
|
|
9
|
+
* Contact: hello@teemill.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CreateProductRequestAdditionalFilesInnerToJSON = exports.CreateProductRequestAdditionalFilesInnerFromJSONTyped = exports.CreateProductRequestAdditionalFilesInnerFromJSON = exports.instanceOfCreateProductRequestAdditionalFilesInner = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the CreateProductRequestAdditionalFilesInner interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfCreateProductRequestAdditionalFilesInner(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfCreateProductRequestAdditionalFilesInner = instanceOfCreateProductRequestAdditionalFilesInner;
|
|
26
|
+
function CreateProductRequestAdditionalFilesInnerFromJSON(json) {
|
|
27
|
+
return CreateProductRequestAdditionalFilesInnerFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.CreateProductRequestAdditionalFilesInnerFromJSON = CreateProductRequestAdditionalFilesInnerFromJSON;
|
|
30
|
+
function CreateProductRequestAdditionalFilesInnerFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'src': !(0, runtime_1.exists)(json, 'src') ? undefined : json['src'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.CreateProductRequestAdditionalFilesInnerFromJSONTyped = CreateProductRequestAdditionalFilesInnerFromJSONTyped;
|
|
39
|
+
function CreateProductRequestAdditionalFilesInnerToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'src': value.src,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.CreateProductRequestAdditionalFilesInnerToJSON = CreateProductRequestAdditionalFilesInnerToJSON;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Catalog API
|
|
3
|
+
* Manage Teemill Product Catalog For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.5.0
|
|
6
|
+
* Contact: hello@teemill.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CreateProductRequestVariantsInnerApplicationsInner } from './CreateProductRequestVariantsInnerApplicationsInner';
|
|
13
|
+
import type { CreateProductRequestVariantsInnerAttributesInner } from './CreateProductRequestVariantsInnerAttributesInner';
|
|
14
|
+
import type { Price } from './Price';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface CreateProductRequestVariantsInner
|
|
19
|
+
*/
|
|
20
|
+
export interface CreateProductRequestVariantsInner {
|
|
21
|
+
/**
|
|
22
|
+
* Variant attributes
|
|
23
|
+
* @type {Array<CreateProductRequestVariantsInnerAttributesInner>}
|
|
24
|
+
* @memberof CreateProductRequestVariantsInner
|
|
25
|
+
*/
|
|
26
|
+
attributes?: Array<CreateProductRequestVariantsInnerAttributesInner>;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Price}
|
|
30
|
+
* @memberof CreateProductRequestVariantsInner
|
|
31
|
+
*/
|
|
32
|
+
retailPrice?: Price;
|
|
33
|
+
/**
|
|
34
|
+
* A custom sku
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof CreateProductRequestVariantsInner
|
|
37
|
+
*/
|
|
38
|
+
sku?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Design applications.
|
|
41
|
+
* @type {Array<CreateProductRequestVariantsInnerApplicationsInner>}
|
|
42
|
+
* @memberof CreateProductRequestVariantsInner
|
|
43
|
+
*/
|
|
44
|
+
applications?: Array<CreateProductRequestVariantsInnerApplicationsInner>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the CreateProductRequestVariantsInner interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfCreateProductRequestVariantsInner(value: object): boolean;
|
|
50
|
+
export declare function CreateProductRequestVariantsInnerFromJSON(json: any): CreateProductRequestVariantsInner;
|
|
51
|
+
export declare function CreateProductRequestVariantsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateProductRequestVariantsInner;
|
|
52
|
+
export declare function CreateProductRequestVariantsInnerToJSON(value?: CreateProductRequestVariantsInner | null): any;
|