@teemill/product-catalog 1.0.2
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 +22 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/ProductsApi.d.ts +49 -0
- package/dist/apis/ProductsApi.js +199 -0
- package/dist/apis/VariantsApi.d.ts +49 -0
- package/dist/apis/VariantsApi.js +199 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/ApiError.d.ts +37 -0
- package/dist/models/ApiError.js +53 -0
- package/dist/models/Attribute.d.ts +37 -0
- package/dist/models/Attribute.js +52 -0
- package/dist/models/Image.d.ts +67 -0
- package/dist/models/Image.js +62 -0
- package/dist/models/Price.d.ts +37 -0
- package/dist/models/Price.js +52 -0
- package/dist/models/Product.d.ts +93 -0
- package/dist/models/Product.js +73 -0
- package/dist/models/ProductsResponse.d.ts +38 -0
- package/dist/models/ProductsResponse.js +53 -0
- package/dist/models/Stock.d.ts +31 -0
- package/dist/models/Stock.js +50 -0
- package/dist/models/Variant.d.ts +114 -0
- package/dist/models/Variant.js +81 -0
- package/dist/models/VariantProduct.d.ts +37 -0
- package/dist/models/VariantProduct.js +52 -0
- package/dist/models/VariantsResponse.d.ts +38 -0
- package/dist/models/VariantsResponse.js +53 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +28 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +562 -0
- package/package.json +19 -0
- package/src/apis/ProductsApi.ts +149 -0
- package/src/apis/VariantsApi.ts +149 -0
- package/src/apis/index.ts +4 -0
- package/src/index.ts +5 -0
- package/src/models/ApiError.ts +74 -0
- package/src/models/Attribute.ts +73 -0
- package/src/models/Image.ts +113 -0
- package/src/models/Price.ts +73 -0
- package/src/models/Product.ts +159 -0
- package/src/models/ProductsResponse.ts +80 -0
- package/src/models/Stock.ts +65 -0
- package/src/models/Variant.ts +200 -0
- package/src/models/VariantProduct.ts +73 -0
- package/src/models/VariantsResponse.ts +80 -0
- package/src/models/index.ts +12 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.json +20 -0
|
@@ -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.0.2
|
|
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 Stock
|
|
16
|
+
*/
|
|
17
|
+
export interface Stock {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof Stock
|
|
22
|
+
*/
|
|
23
|
+
level?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the Stock interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfStock(value: object): boolean;
|
|
29
|
+
export declare function StockFromJSON(json: any): Stock;
|
|
30
|
+
export declare function StockFromJSONTyped(json: any, ignoreDiscriminator: boolean): Stock;
|
|
31
|
+
export declare function StockToJSON(value?: Stock | 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.0.2
|
|
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.StockToJSON = exports.StockFromJSONTyped = exports.StockFromJSON = exports.instanceOfStock = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the Stock interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfStock(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfStock = instanceOfStock;
|
|
26
|
+
function StockFromJSON(json) {
|
|
27
|
+
return StockFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.StockFromJSON = StockFromJSON;
|
|
30
|
+
function StockFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'level': !(0, runtime_1.exists)(json, 'level') ? undefined : json['level'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.StockFromJSONTyped = StockFromJSONTyped;
|
|
39
|
+
function StockToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'level': value.level,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.StockToJSON = StockToJSON;
|
|
@@ -0,0 +1,114 @@
|
|
|
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.0.2
|
|
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 { Attribute } from './Attribute';
|
|
13
|
+
import type { Image } from './Image';
|
|
14
|
+
import type { Price } from './Price';
|
|
15
|
+
import type { Stock } from './Stock';
|
|
16
|
+
import type { VariantProduct } from './VariantProduct';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
* @interface Variant
|
|
21
|
+
*/
|
|
22
|
+
export interface Variant {
|
|
23
|
+
/**
|
|
24
|
+
* Unique object identifier
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof Variant
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Attributes associated to a variant such as Colour and Size
|
|
31
|
+
* @type {Array<Attribute>}
|
|
32
|
+
* @memberof Variant
|
|
33
|
+
*/
|
|
34
|
+
attributes: Array<Attribute>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Variant
|
|
39
|
+
*/
|
|
40
|
+
sku: string;
|
|
41
|
+
/**
|
|
42
|
+
* A reference to the resource location
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof Variant
|
|
45
|
+
*/
|
|
46
|
+
ref?: string;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {VariantProduct}
|
|
50
|
+
* @memberof Variant
|
|
51
|
+
*/
|
|
52
|
+
product?: VariantProduct;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof Variant
|
|
57
|
+
*/
|
|
58
|
+
readonly sortOrder?: number;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {Price}
|
|
62
|
+
* @memberof Variant
|
|
63
|
+
*/
|
|
64
|
+
retailPrice?: Price;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {Price}
|
|
68
|
+
* @memberof Variant
|
|
69
|
+
*/
|
|
70
|
+
salePrice?: Price;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {Price}
|
|
74
|
+
* @memberof Variant
|
|
75
|
+
*/
|
|
76
|
+
readonly price?: Price;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Stock}
|
|
80
|
+
* @memberof Variant
|
|
81
|
+
*/
|
|
82
|
+
stock?: Stock;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Date}
|
|
86
|
+
* @memberof Variant
|
|
87
|
+
*/
|
|
88
|
+
createdAt?: Date;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {Date}
|
|
92
|
+
* @memberof Variant
|
|
93
|
+
*/
|
|
94
|
+
updatedAt?: Date;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {Date}
|
|
98
|
+
* @memberof Variant
|
|
99
|
+
*/
|
|
100
|
+
publishedAt?: Date;
|
|
101
|
+
/**
|
|
102
|
+
* Images
|
|
103
|
+
* @type {Array<Image>}
|
|
104
|
+
* @memberof Variant
|
|
105
|
+
*/
|
|
106
|
+
images?: Array<Image>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Check if a given object implements the Variant interface.
|
|
110
|
+
*/
|
|
111
|
+
export declare function instanceOfVariant(value: object): boolean;
|
|
112
|
+
export declare function VariantFromJSON(json: any): Variant;
|
|
113
|
+
export declare function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant;
|
|
114
|
+
export declare function VariantToJSON(value?: Variant | null): any;
|
|
@@ -0,0 +1,81 @@
|
|
|
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.0.2
|
|
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.VariantToJSON = exports.VariantFromJSONTyped = exports.VariantFromJSON = exports.instanceOfVariant = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var Attribute_1 = require("./Attribute");
|
|
19
|
+
var Image_1 = require("./Image");
|
|
20
|
+
var Price_1 = require("./Price");
|
|
21
|
+
var Stock_1 = require("./Stock");
|
|
22
|
+
var VariantProduct_1 = require("./VariantProduct");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the Variant interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfVariant(value) {
|
|
27
|
+
var isInstance = true;
|
|
28
|
+
isInstance = isInstance && "attributes" in value;
|
|
29
|
+
isInstance = isInstance && "sku" in value;
|
|
30
|
+
return isInstance;
|
|
31
|
+
}
|
|
32
|
+
exports.instanceOfVariant = instanceOfVariant;
|
|
33
|
+
function VariantFromJSON(json) {
|
|
34
|
+
return VariantFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
exports.VariantFromJSON = VariantFromJSON;
|
|
37
|
+
function VariantFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if ((json === undefined) || (json === null)) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
|
|
43
|
+
'attributes': (json['attributes'].map(Attribute_1.AttributeFromJSON)),
|
|
44
|
+
'sku': json['sku'],
|
|
45
|
+
'ref': !(0, runtime_1.exists)(json, 'ref') ? undefined : json['ref'],
|
|
46
|
+
'product': !(0, runtime_1.exists)(json, 'product') ? undefined : (0, VariantProduct_1.VariantProductFromJSON)(json['product']),
|
|
47
|
+
'sortOrder': !(0, runtime_1.exists)(json, 'sortOrder') ? undefined : json['sortOrder'],
|
|
48
|
+
'retailPrice': !(0, runtime_1.exists)(json, 'retailPrice') ? undefined : (0, Price_1.PriceFromJSON)(json['retailPrice']),
|
|
49
|
+
'salePrice': !(0, runtime_1.exists)(json, 'salePrice') ? undefined : (0, Price_1.PriceFromJSON)(json['salePrice']),
|
|
50
|
+
'price': !(0, runtime_1.exists)(json, 'price') ? undefined : (0, Price_1.PriceFromJSON)(json['price']),
|
|
51
|
+
'stock': !(0, runtime_1.exists)(json, 'stock') ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
|
|
52
|
+
'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
|
|
53
|
+
'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
|
|
54
|
+
'publishedAt': !(0, runtime_1.exists)(json, 'publishedAt') ? undefined : (new Date(json['publishedAt'])),
|
|
55
|
+
'images': !(0, runtime_1.exists)(json, 'images') ? undefined : (json['images'].map(Image_1.ImageFromJSON)),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
exports.VariantFromJSONTyped = VariantFromJSONTyped;
|
|
59
|
+
function VariantToJSON(value) {
|
|
60
|
+
if (value === undefined) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
if (value === null) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'id': value.id,
|
|
68
|
+
'attributes': (value.attributes.map(Attribute_1.AttributeToJSON)),
|
|
69
|
+
'sku': value.sku,
|
|
70
|
+
'ref': value.ref,
|
|
71
|
+
'product': (0, VariantProduct_1.VariantProductToJSON)(value.product),
|
|
72
|
+
'retailPrice': (0, Price_1.PriceToJSON)(value.retailPrice),
|
|
73
|
+
'salePrice': (0, Price_1.PriceToJSON)(value.salePrice),
|
|
74
|
+
'stock': (0, Stock_1.StockToJSON)(value.stock),
|
|
75
|
+
'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
76
|
+
'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
|
|
77
|
+
'publishedAt': value.publishedAt === undefined ? undefined : (value.publishedAt.toISOString()),
|
|
78
|
+
'images': value.images === undefined ? undefined : (value.images.map(Image_1.ImageToJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
exports.VariantToJSON = VariantToJSON;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.0.2
|
|
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 VariantProduct
|
|
16
|
+
*/
|
|
17
|
+
export interface VariantProduct {
|
|
18
|
+
/**
|
|
19
|
+
* Unique object identifier
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof VariantProduct
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* A reference to the resource location
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof VariantProduct
|
|
28
|
+
*/
|
|
29
|
+
ref?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the VariantProduct interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfVariantProduct(value: object): boolean;
|
|
35
|
+
export declare function VariantProductFromJSON(json: any): VariantProduct;
|
|
36
|
+
export declare function VariantProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantProduct;
|
|
37
|
+
export declare function VariantProductToJSON(value?: VariantProduct | null): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.0.2
|
|
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.VariantProductToJSON = exports.VariantProductFromJSONTyped = exports.VariantProductFromJSON = exports.instanceOfVariantProduct = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the VariantProduct interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfVariantProduct(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfVariantProduct = instanceOfVariantProduct;
|
|
26
|
+
function VariantProductFromJSON(json) {
|
|
27
|
+
return VariantProductFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.VariantProductFromJSON = VariantProductFromJSON;
|
|
30
|
+
function VariantProductFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
|
|
36
|
+
'ref': !(0, runtime_1.exists)(json, 'ref') ? undefined : json['ref'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.VariantProductFromJSONTyped = VariantProductFromJSONTyped;
|
|
40
|
+
function VariantProductToJSON(value) {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (value === null) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
'id': value.id,
|
|
49
|
+
'ref': value.ref,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
exports.VariantProductToJSON = VariantProductToJSON;
|
|
@@ -0,0 +1,38 @@
|
|
|
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.0.2
|
|
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 { Variant } from './Variant';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface VariantsResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface VariantsResponse {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Variant>}
|
|
22
|
+
* @memberof VariantsResponse
|
|
23
|
+
*/
|
|
24
|
+
variants?: Array<Variant>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof VariantsResponse
|
|
29
|
+
*/
|
|
30
|
+
nextPageToken?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the VariantsResponse interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfVariantsResponse(value: object): boolean;
|
|
36
|
+
export declare function VariantsResponseFromJSON(json: any): VariantsResponse;
|
|
37
|
+
export declare function VariantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantsResponse;
|
|
38
|
+
export declare function VariantsResponseToJSON(value?: VariantsResponse | null): any;
|
|
@@ -0,0 +1,53 @@
|
|
|
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.0.2
|
|
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.VariantsResponseToJSON = exports.VariantsResponseFromJSONTyped = exports.VariantsResponseFromJSON = exports.instanceOfVariantsResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var Variant_1 = require("./Variant");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the VariantsResponse interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfVariantsResponse(value) {
|
|
23
|
+
var isInstance = true;
|
|
24
|
+
return isInstance;
|
|
25
|
+
}
|
|
26
|
+
exports.instanceOfVariantsResponse = instanceOfVariantsResponse;
|
|
27
|
+
function VariantsResponseFromJSON(json) {
|
|
28
|
+
return VariantsResponseFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.VariantsResponseFromJSON = VariantsResponseFromJSON;
|
|
31
|
+
function VariantsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'variants': !(0, runtime_1.exists)(json, 'variants') ? undefined : (json['variants'].map(Variant_1.VariantFromJSON)),
|
|
37
|
+
'nextPageToken': !(0, runtime_1.exists)(json, 'nextPageToken') ? undefined : json['nextPageToken'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.VariantsResponseFromJSONTyped = VariantsResponseFromJSONTyped;
|
|
41
|
+
function VariantsResponseToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'variants': value.variants === undefined ? undefined : (value.variants.map(Variant_1.VariantToJSON)),
|
|
50
|
+
'nextPageToken': value.nextPageToken,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.VariantsResponseToJSON = VariantsResponseToJSON;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './ApiError';
|
|
2
|
+
export * from './Attribute';
|
|
3
|
+
export * from './Image';
|
|
4
|
+
export * from './Price';
|
|
5
|
+
export * from './Product';
|
|
6
|
+
export * from './ProductsResponse';
|
|
7
|
+
export * from './Stock';
|
|
8
|
+
export * from './Variant';
|
|
9
|
+
export * from './VariantProduct';
|
|
10
|
+
export * from './VariantsResponse';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./ApiError"), exports);
|
|
20
|
+
__exportStar(require("./Attribute"), exports);
|
|
21
|
+
__exportStar(require("./Image"), exports);
|
|
22
|
+
__exportStar(require("./Price"), exports);
|
|
23
|
+
__exportStar(require("./Product"), exports);
|
|
24
|
+
__exportStar(require("./ProductsResponse"), exports);
|
|
25
|
+
__exportStar(require("./Stock"), exports);
|
|
26
|
+
__exportStar(require("./Variant"), exports);
|
|
27
|
+
__exportStar(require("./VariantProduct"), exports);
|
|
28
|
+
__exportStar(require("./VariantsResponse"), exports);
|
|
@@ -0,0 +1,182 @@
|
|
|
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.0.2
|
|
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
|
+
export declare const BASE_PATH: string;
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
basePath?: string;
|
|
15
|
+
fetchApi?: FetchAPI;
|
|
16
|
+
middleware?: Middleware[];
|
|
17
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
apiKey?: string | ((name: string) => string);
|
|
21
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
+
headers?: HTTPHeaders;
|
|
23
|
+
credentials?: RequestCredentials;
|
|
24
|
+
}
|
|
25
|
+
export declare class Configuration {
|
|
26
|
+
private configuration;
|
|
27
|
+
constructor(configuration?: ConfigurationParameters);
|
|
28
|
+
set config(configuration: Configuration);
|
|
29
|
+
get basePath(): string;
|
|
30
|
+
get fetchApi(): FetchAPI | undefined;
|
|
31
|
+
get middleware(): Middleware[];
|
|
32
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
33
|
+
get username(): string | undefined;
|
|
34
|
+
get password(): string | undefined;
|
|
35
|
+
get apiKey(): ((name: string) => string) | undefined;
|
|
36
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
37
|
+
get headers(): HTTPHeaders | undefined;
|
|
38
|
+
get credentials(): RequestCredentials | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare const DefaultConfig: Configuration;
|
|
41
|
+
/**
|
|
42
|
+
* This is the base class for all generated API classes.
|
|
43
|
+
*/
|
|
44
|
+
export declare class BaseAPI {
|
|
45
|
+
protected configuration: Configuration;
|
|
46
|
+
private static readonly jsonRegex;
|
|
47
|
+
private middleware;
|
|
48
|
+
constructor(configuration?: Configuration);
|
|
49
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
51
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
52
|
+
/**
|
|
53
|
+
* Check if the given MIME is a JSON MIME.
|
|
54
|
+
* JSON MIME examples:
|
|
55
|
+
* application/json
|
|
56
|
+
* application/json; charset=UTF8
|
|
57
|
+
* APPLICATION/JSON
|
|
58
|
+
* application/vnd.company+json
|
|
59
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
60
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
63
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
64
|
+
private createFetchParams;
|
|
65
|
+
private fetchApi;
|
|
66
|
+
/**
|
|
67
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
68
|
+
* and then shallow cloning data members.
|
|
69
|
+
*/
|
|
70
|
+
private clone;
|
|
71
|
+
}
|
|
72
|
+
export declare class ResponseError extends Error {
|
|
73
|
+
response: Response;
|
|
74
|
+
name: "ResponseError";
|
|
75
|
+
constructor(response: Response, msg?: string);
|
|
76
|
+
}
|
|
77
|
+
export declare class FetchError extends Error {
|
|
78
|
+
cause: Error;
|
|
79
|
+
name: "FetchError";
|
|
80
|
+
constructor(cause: Error, msg?: string);
|
|
81
|
+
}
|
|
82
|
+
export declare class RequiredError extends Error {
|
|
83
|
+
field: string;
|
|
84
|
+
name: "RequiredError";
|
|
85
|
+
constructor(field: string, msg?: string);
|
|
86
|
+
}
|
|
87
|
+
export declare const COLLECTION_FORMATS: {
|
|
88
|
+
csv: string;
|
|
89
|
+
ssv: string;
|
|
90
|
+
tsv: string;
|
|
91
|
+
pipes: string;
|
|
92
|
+
};
|
|
93
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
94
|
+
export type Json = any;
|
|
95
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
96
|
+
export type HTTPHeaders = {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
export type HTTPQuery = {
|
|
100
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
101
|
+
};
|
|
102
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
103
|
+
export type HTTPRequestInit = {
|
|
104
|
+
headers?: HTTPHeaders;
|
|
105
|
+
method: HTTPMethod;
|
|
106
|
+
credentials?: RequestCredentials;
|
|
107
|
+
body?: HTTPBody;
|
|
108
|
+
};
|
|
109
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
110
|
+
export type InitOverrideFunction = (requestContext: {
|
|
111
|
+
init: HTTPRequestInit;
|
|
112
|
+
context: RequestOpts;
|
|
113
|
+
}) => Promise<RequestInit>;
|
|
114
|
+
export interface FetchParams {
|
|
115
|
+
url: string;
|
|
116
|
+
init: RequestInit;
|
|
117
|
+
}
|
|
118
|
+
export interface RequestOpts {
|
|
119
|
+
path: string;
|
|
120
|
+
method: HTTPMethod;
|
|
121
|
+
headers: HTTPHeaders;
|
|
122
|
+
query?: HTTPQuery;
|
|
123
|
+
body?: HTTPBody;
|
|
124
|
+
}
|
|
125
|
+
export declare function exists(json: any, key: string): boolean;
|
|
126
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
127
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
128
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
129
|
+
export interface Consume {
|
|
130
|
+
contentType: string;
|
|
131
|
+
}
|
|
132
|
+
export interface RequestContext {
|
|
133
|
+
fetch: FetchAPI;
|
|
134
|
+
url: string;
|
|
135
|
+
init: RequestInit;
|
|
136
|
+
}
|
|
137
|
+
export interface ResponseContext {
|
|
138
|
+
fetch: FetchAPI;
|
|
139
|
+
url: string;
|
|
140
|
+
init: RequestInit;
|
|
141
|
+
response: Response;
|
|
142
|
+
}
|
|
143
|
+
export interface ErrorContext {
|
|
144
|
+
fetch: FetchAPI;
|
|
145
|
+
url: string;
|
|
146
|
+
init: RequestInit;
|
|
147
|
+
error: unknown;
|
|
148
|
+
response?: Response;
|
|
149
|
+
}
|
|
150
|
+
export interface Middleware {
|
|
151
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
152
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
153
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
154
|
+
}
|
|
155
|
+
export interface ApiResponse<T> {
|
|
156
|
+
raw: Response;
|
|
157
|
+
value(): Promise<T>;
|
|
158
|
+
}
|
|
159
|
+
export interface ResponseTransformer<T> {
|
|
160
|
+
(json: any): T;
|
|
161
|
+
}
|
|
162
|
+
export declare class JSONApiResponse<T> {
|
|
163
|
+
raw: Response;
|
|
164
|
+
private transformer;
|
|
165
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
166
|
+
value(): Promise<T>;
|
|
167
|
+
}
|
|
168
|
+
export declare class VoidApiResponse {
|
|
169
|
+
raw: Response;
|
|
170
|
+
constructor(raw: Response);
|
|
171
|
+
value(): Promise<void>;
|
|
172
|
+
}
|
|
173
|
+
export declare class BlobApiResponse {
|
|
174
|
+
raw: Response;
|
|
175
|
+
constructor(raw: Response);
|
|
176
|
+
value(): Promise<Blob>;
|
|
177
|
+
}
|
|
178
|
+
export declare class TextApiResponse {
|
|
179
|
+
raw: Response;
|
|
180
|
+
constructor(raw: Response);
|
|
181
|
+
value(): Promise<string>;
|
|
182
|
+
}
|