@teemill/gfn-catalog 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.openapi-generator/FILES +21 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +45 -0
  5. package/dist/apis/ProductsApi.d.ts +33 -0
  6. package/dist/apis/ProductsApi.js +160 -0
  7. package/dist/apis/VariantsApi.d.ts +48 -0
  8. package/dist/apis/VariantsApi.js +229 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +20 -0
  11. package/dist/index.d.ts +3 -0
  12. package/dist/index.js +21 -0
  13. package/dist/models/ApiError.d.ts +37 -0
  14. package/dist/models/ApiError.js +53 -0
  15. package/dist/models/Attribute.d.ts +50 -0
  16. package/dist/models/Attribute.js +59 -0
  17. package/dist/models/AttributeThumbnail.d.ts +46 -0
  18. package/dist/models/AttributeThumbnail.js +60 -0
  19. package/dist/models/Image.d.ts +67 -0
  20. package/dist/models/Image.js +62 -0
  21. package/dist/models/Product.d.ts +56 -0
  22. package/dist/models/Product.js +60 -0
  23. package/dist/models/ProductsResponse.d.ts +32 -0
  24. package/dist/models/ProductsResponse.js +51 -0
  25. package/dist/models/Variant.d.ts +64 -0
  26. package/dist/models/Variant.js +65 -0
  27. package/dist/models/VariantProduct.d.ts +37 -0
  28. package/dist/models/VariantProduct.js +52 -0
  29. package/dist/models/VariantsResponse.d.ts +32 -0
  30. package/dist/models/VariantsResponse.js +51 -0
  31. package/dist/models/index.d.ts +9 -0
  32. package/dist/models/index.js +27 -0
  33. package/dist/runtime.d.ts +187 -0
  34. package/dist/runtime.js +565 -0
  35. package/package.json +19 -0
  36. package/src/apis/ProductsApi.ts +103 -0
  37. package/src/apis/VariantsApi.ts +176 -0
  38. package/src/apis/index.ts +4 -0
  39. package/src/index.ts +5 -0
  40. package/src/models/ApiError.ts +74 -0
  41. package/src/models/Attribute.ts +98 -0
  42. package/src/models/AttributeThumbnail.ts +85 -0
  43. package/src/models/Image.ts +113 -0
  44. package/src/models/Product.ts +105 -0
  45. package/src/models/ProductsResponse.ts +72 -0
  46. package/src/models/Variant.ts +126 -0
  47. package/src/models/VariantProduct.ts +73 -0
  48. package/src/models/VariantsResponse.ts +72 -0
  49. package/src/models/index.ts +11 -0
  50. package/src/runtime.ts +441 -0
  51. package/tsconfig.json +20 -0
@@ -0,0 +1,72 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Manage Teemill GFN Products For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Product } from './Product';
17
+ import {
18
+ ProductFromJSON,
19
+ ProductFromJSONTyped,
20
+ ProductToJSON,
21
+ } from './Product';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface ProductsResponse
27
+ */
28
+ export interface ProductsResponse {
29
+ /**
30
+ *
31
+ * @type {Array<Product>}
32
+ * @memberof ProductsResponse
33
+ */
34
+ products?: Array<Product>;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the ProductsResponse interface.
39
+ */
40
+ export function instanceOfProductsResponse(value: object): boolean {
41
+ let isInstance = true;
42
+
43
+ return isInstance;
44
+ }
45
+
46
+ export function ProductsResponseFromJSON(json: any): ProductsResponse {
47
+ return ProductsResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function ProductsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductsResponse {
51
+ if ((json === undefined) || (json === null)) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'products': !exists(json, 'products') ? undefined : ((json['products'] as Array<any>).map(ProductFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function ProductsResponseToJSON(value?: ProductsResponse | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'products': value.products === undefined ? undefined : ((value.products as Array<any>).map(ProductToJSON)),
70
+ };
71
+ }
72
+
@@ -0,0 +1,126 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Manage Teemill GFN Products For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Attribute } from './Attribute';
17
+ import {
18
+ AttributeFromJSON,
19
+ AttributeFromJSONTyped,
20
+ AttributeToJSON,
21
+ } from './Attribute';
22
+ import type { Image } from './Image';
23
+ import {
24
+ ImageFromJSON,
25
+ ImageFromJSONTyped,
26
+ ImageToJSON,
27
+ } from './Image';
28
+ import type { VariantProduct } from './VariantProduct';
29
+ import {
30
+ VariantProductFromJSON,
31
+ VariantProductFromJSONTyped,
32
+ VariantProductToJSON,
33
+ } from './VariantProduct';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface Variant
39
+ */
40
+ export interface Variant {
41
+ /**
42
+ * Unique object identifier
43
+ * @type {string}
44
+ * @memberof Variant
45
+ */
46
+ id?: string;
47
+ /**
48
+ * A reference to the resource location
49
+ * @type {string}
50
+ * @memberof Variant
51
+ */
52
+ ref?: string;
53
+ /**
54
+ *
55
+ * @type {VariantProduct}
56
+ * @memberof Variant
57
+ */
58
+ product?: VariantProduct;
59
+ /**
60
+ *
61
+ * @type {string}
62
+ * @memberof Variant
63
+ */
64
+ sku: string;
65
+ /**
66
+ * Attributes associated to a variant such as Colour and Size. An attribute can have thumbnail type of `text`, `color`, or `image`. Attribute tags are intended for grouping and filtering, e.g. by a group of colours.
67
+ * @type {Array<Attribute>}
68
+ * @memberof Variant
69
+ */
70
+ attributes: Array<Attribute>;
71
+ /**
72
+ * Images
73
+ * @type {Array<Image>}
74
+ * @memberof Variant
75
+ */
76
+ images?: Array<Image>;
77
+ }
78
+
79
+ /**
80
+ * Check if a given object implements the Variant interface.
81
+ */
82
+ export function instanceOfVariant(value: object): boolean {
83
+ let isInstance = true;
84
+ isInstance = isInstance && "sku" in value;
85
+ isInstance = isInstance && "attributes" in value;
86
+
87
+ return isInstance;
88
+ }
89
+
90
+ export function VariantFromJSON(json: any): Variant {
91
+ return VariantFromJSONTyped(json, false);
92
+ }
93
+
94
+ export function VariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): Variant {
95
+ if ((json === undefined) || (json === null)) {
96
+ return json;
97
+ }
98
+ return {
99
+
100
+ 'id': !exists(json, 'id') ? undefined : json['id'],
101
+ 'ref': !exists(json, 'ref') ? undefined : json['ref'],
102
+ 'product': !exists(json, 'product') ? undefined : VariantProductFromJSON(json['product']),
103
+ 'sku': json['sku'],
104
+ 'attributes': ((json['attributes'] as Array<any>).map(AttributeFromJSON)),
105
+ 'images': !exists(json, 'images') ? undefined : ((json['images'] as Array<any>).map(ImageFromJSON)),
106
+ };
107
+ }
108
+
109
+ export function VariantToJSON(value?: Variant | null): any {
110
+ if (value === undefined) {
111
+ return undefined;
112
+ }
113
+ if (value === null) {
114
+ return null;
115
+ }
116
+ return {
117
+
118
+ 'id': value.id,
119
+ 'ref': value.ref,
120
+ 'product': VariantProductToJSON(value.product),
121
+ 'sku': value.sku,
122
+ 'attributes': ((value.attributes as Array<any>).map(AttributeToJSON)),
123
+ 'images': value.images === undefined ? undefined : ((value.images as Array<any>).map(ImageToJSON)),
124
+ };
125
+ }
126
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Manage Teemill GFN Products For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface VariantProduct
20
+ */
21
+ export interface VariantProduct {
22
+ /**
23
+ * Unique object identifier
24
+ * @type {string}
25
+ * @memberof VariantProduct
26
+ */
27
+ id?: string;
28
+ /**
29
+ * A reference to the resource location
30
+ * @type {string}
31
+ * @memberof VariantProduct
32
+ */
33
+ ref?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the VariantProduct interface.
38
+ */
39
+ export function instanceOfVariantProduct(value: object): boolean {
40
+ let isInstance = true;
41
+
42
+ return isInstance;
43
+ }
44
+
45
+ export function VariantProductFromJSON(json: any): VariantProduct {
46
+ return VariantProductFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function VariantProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantProduct {
50
+ if ((json === undefined) || (json === null)) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'id': !exists(json, 'id') ? undefined : json['id'],
56
+ 'ref': !exists(json, 'ref') ? undefined : json['ref'],
57
+ };
58
+ }
59
+
60
+ export function VariantProductToJSON(value?: VariantProduct | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'id': value.id,
70
+ 'ref': value.ref,
71
+ };
72
+ }
73
+
@@ -0,0 +1,72 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GFN Catalog API
5
+ * Manage Teemill GFN Products For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ * Contact: hello@teemill.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Variant } from './Variant';
17
+ import {
18
+ VariantFromJSON,
19
+ VariantFromJSONTyped,
20
+ VariantToJSON,
21
+ } from './Variant';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface VariantsResponse
27
+ */
28
+ export interface VariantsResponse {
29
+ /**
30
+ *
31
+ * @type {Array<Variant>}
32
+ * @memberof VariantsResponse
33
+ */
34
+ variants?: Array<Variant>;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the VariantsResponse interface.
39
+ */
40
+ export function instanceOfVariantsResponse(value: object): boolean {
41
+ let isInstance = true;
42
+
43
+ return isInstance;
44
+ }
45
+
46
+ export function VariantsResponseFromJSON(json: any): VariantsResponse {
47
+ return VariantsResponseFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function VariantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): VariantsResponse {
51
+ if ((json === undefined) || (json === null)) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'variants': !exists(json, 'variants') ? undefined : ((json['variants'] as Array<any>).map(VariantFromJSON)),
57
+ };
58
+ }
59
+
60
+ export function VariantsResponseToJSON(value?: VariantsResponse | null): any {
61
+ if (value === undefined) {
62
+ return undefined;
63
+ }
64
+ if (value === null) {
65
+ return null;
66
+ }
67
+ return {
68
+
69
+ 'variants': value.variants === undefined ? undefined : ((value.variants as Array<any>).map(VariantToJSON)),
70
+ };
71
+ }
72
+
@@ -0,0 +1,11 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './ApiError';
4
+ export * from './Attribute';
5
+ export * from './AttributeThumbnail';
6
+ export * from './Image';
7
+ export * from './Product';
8
+ export * from './ProductsResponse';
9
+ export * from './Variant';
10
+ export * from './VariantProduct';
11
+ export * from './VariantsResponse';