@teemill/product-catalog 1.11.1 → 1.13.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 (202) hide show
  1. package/.openapi-generator/FILES +6 -29
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1598 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +1126 -0
  9. package/dist/api.js +819 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +1126 -0
  17. package/dist/esm/api.js +808 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/esm/index.d.ts +13 -3
  25. package/dist/esm/index.js +13 -3
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/index.ts +18 -0
  30. package/package.json +15 -3
  31. package/tsconfig.json +4 -6
  32. package/dist/apis/ProductsApi.d.ts +0 -107
  33. package/dist/apis/ProductsApi.js +0 -304
  34. package/dist/apis/VariantsApi.d.ts +0 -50
  35. package/dist/apis/VariantsApi.js +0 -131
  36. package/dist/apis/index.d.ts +0 -2
  37. package/dist/apis/index.js +0 -20
  38. package/dist/esm/apis/ProductsApi.d.ts +0 -107
  39. package/dist/esm/apis/ProductsApi.js +0 -300
  40. package/dist/esm/apis/VariantsApi.d.ts +0 -50
  41. package/dist/esm/apis/VariantsApi.js +0 -127
  42. package/dist/esm/apis/index.d.ts +0 -2
  43. package/dist/esm/apis/index.js +0 -4
  44. package/dist/esm/models/ApiError.d.ts +0 -37
  45. package/dist/esm/models/ApiError.js +0 -42
  46. package/dist/esm/models/Attribute.d.ts +0 -50
  47. package/dist/esm/models/Attribute.js +0 -49
  48. package/dist/esm/models/AttributeThumbnail.d.ts +0 -46
  49. package/dist/esm/models/AttributeThumbnail.js +0 -48
  50. package/dist/esm/models/CreateProductRequest.d.ts +0 -88
  51. package/dist/esm/models/CreateProductRequest.js +0 -63
  52. package/dist/esm/models/CreateProductRequestAdditionalFilesInner.d.ts +0 -31
  53. package/dist/esm/models/CreateProductRequestAdditionalFilesInner.js +0 -43
  54. package/dist/esm/models/CreateProductRequestImagesInner.d.ts +0 -31
  55. package/dist/esm/models/CreateProductRequestImagesInner.js +0 -38
  56. package/dist/esm/models/CreateProductRequestSeoMetadata.d.ts +0 -31
  57. package/dist/esm/models/CreateProductRequestSeoMetadata.js +0 -38
  58. package/dist/esm/models/CreateProductRequestVariantsInner.d.ts +0 -59
  59. package/dist/esm/models/CreateProductRequestVariantsInner.js +0 -57
  60. package/dist/esm/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +0 -63
  61. package/dist/esm/models/CreateProductRequestVariantsInnerApplicationsInner.js +0 -67
  62. package/dist/esm/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +0 -37
  63. package/dist/esm/models/CreateProductRequestVariantsInnerAttributesInner.js +0 -46
  64. package/dist/esm/models/CreateProductRequestVariantsInnerImagesInner.d.ts +0 -31
  65. package/dist/esm/models/CreateProductRequestVariantsInnerImagesInner.js +0 -43
  66. package/dist/esm/models/CreateProductRequestVariantsInnerRetailPrice.d.ts +0 -37
  67. package/dist/esm/models/CreateProductRequestVariantsInnerRetailPrice.js +0 -46
  68. package/dist/esm/models/CreateProductVariant.d.ts +0 -59
  69. package/dist/esm/models/CreateProductVariant.js +0 -54
  70. package/dist/esm/models/CreateProductVariantApplicationsInner.d.ts +0 -54
  71. package/dist/esm/models/CreateProductVariantApplicationsInner.js +0 -58
  72. package/dist/esm/models/CreateProductVariantAttributesInner.d.ts +0 -37
  73. package/dist/esm/models/CreateProductVariantAttributesInner.js +0 -44
  74. package/dist/esm/models/CreateProductVariantRetailPrice.d.ts +0 -37
  75. package/dist/esm/models/CreateProductVariantRetailPrice.js +0 -44
  76. package/dist/esm/models/Image.d.ts +0 -67
  77. package/dist/esm/models/Image.js +0 -50
  78. package/dist/esm/models/ImportProducts200Response.d.ts +0 -31
  79. package/dist/esm/models/ImportProducts200Response.js +0 -38
  80. package/dist/esm/models/ModelFile.d.ts +0 -31
  81. package/dist/esm/models/ModelFile.js +0 -38
  82. package/dist/esm/models/Price.d.ts +0 -37
  83. package/dist/esm/models/Price.js +0 -40
  84. package/dist/esm/models/Product.d.ts +0 -113
  85. package/dist/esm/models/Product.js +0 -71
  86. package/dist/esm/models/ProductAdditionalFilesInner.d.ts +0 -37
  87. package/dist/esm/models/ProductAdditionalFilesInner.js +0 -40
  88. package/dist/esm/models/ProductsResponse.d.ts +0 -38
  89. package/dist/esm/models/ProductsResponse.js +0 -41
  90. package/dist/esm/models/SeoMetadata.d.ts +0 -31
  91. package/dist/esm/models/SeoMetadata.js +0 -38
  92. package/dist/esm/models/Stock.d.ts +0 -31
  93. package/dist/esm/models/Stock.js +0 -38
  94. package/dist/esm/models/UpdateProductRequest.d.ts +0 -87
  95. package/dist/esm/models/UpdateProductRequest.js +0 -58
  96. package/dist/esm/models/Variant.d.ts +0 -114
  97. package/dist/esm/models/Variant.js +0 -71
  98. package/dist/esm/models/VariantProduct.d.ts +0 -37
  99. package/dist/esm/models/VariantProduct.js +0 -40
  100. package/dist/esm/models/VariantsResponse.d.ts +0 -38
  101. package/dist/esm/models/VariantsResponse.js +0 -41
  102. package/dist/esm/models/index.d.ts +0 -23
  103. package/dist/esm/models/index.js +0 -25
  104. package/dist/esm/runtime.d.ts +0 -187
  105. package/dist/esm/runtime.js +0 -333
  106. package/dist/models/ApiError.d.ts +0 -37
  107. package/dist/models/ApiError.js +0 -49
  108. package/dist/models/Attribute.d.ts +0 -50
  109. package/dist/models/Attribute.js +0 -56
  110. package/dist/models/AttributeThumbnail.d.ts +0 -46
  111. package/dist/models/AttributeThumbnail.js +0 -55
  112. package/dist/models/CreateProductRequest.d.ts +0 -88
  113. package/dist/models/CreateProductRequest.js +0 -70
  114. package/dist/models/CreateProductRequestAdditionalFilesInner.d.ts +0 -31
  115. package/dist/models/CreateProductRequestAdditionalFilesInner.js +0 -50
  116. package/dist/models/CreateProductRequestImagesInner.d.ts +0 -31
  117. package/dist/models/CreateProductRequestImagesInner.js +0 -45
  118. package/dist/models/CreateProductRequestSeoMetadata.d.ts +0 -31
  119. package/dist/models/CreateProductRequestSeoMetadata.js +0 -45
  120. package/dist/models/CreateProductRequestVariantsInner.d.ts +0 -59
  121. package/dist/models/CreateProductRequestVariantsInner.js +0 -64
  122. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.d.ts +0 -63
  123. package/dist/models/CreateProductRequestVariantsInnerApplicationsInner.js +0 -74
  124. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.d.ts +0 -37
  125. package/dist/models/CreateProductRequestVariantsInnerAttributesInner.js +0 -53
  126. package/dist/models/CreateProductRequestVariantsInnerImagesInner.d.ts +0 -31
  127. package/dist/models/CreateProductRequestVariantsInnerImagesInner.js +0 -50
  128. package/dist/models/CreateProductRequestVariantsInnerRetailPrice.d.ts +0 -37
  129. package/dist/models/CreateProductRequestVariantsInnerRetailPrice.js +0 -53
  130. package/dist/models/CreateProductVariant.d.ts +0 -59
  131. package/dist/models/CreateProductVariant.js +0 -61
  132. package/dist/models/CreateProductVariantApplicationsInner.d.ts +0 -54
  133. package/dist/models/CreateProductVariantApplicationsInner.js +0 -65
  134. package/dist/models/CreateProductVariantAttributesInner.d.ts +0 -37
  135. package/dist/models/CreateProductVariantAttributesInner.js +0 -51
  136. package/dist/models/CreateProductVariantRetailPrice.d.ts +0 -37
  137. package/dist/models/CreateProductVariantRetailPrice.js +0 -51
  138. package/dist/models/Image.d.ts +0 -67
  139. package/dist/models/Image.js +0 -57
  140. package/dist/models/ImportProducts200Response.d.ts +0 -31
  141. package/dist/models/ImportProducts200Response.js +0 -45
  142. package/dist/models/ModelFile.d.ts +0 -31
  143. package/dist/models/ModelFile.js +0 -45
  144. package/dist/models/Price.d.ts +0 -37
  145. package/dist/models/Price.js +0 -47
  146. package/dist/models/Product.d.ts +0 -113
  147. package/dist/models/Product.js +0 -78
  148. package/dist/models/ProductAdditionalFilesInner.d.ts +0 -37
  149. package/dist/models/ProductAdditionalFilesInner.js +0 -47
  150. package/dist/models/ProductsResponse.d.ts +0 -38
  151. package/dist/models/ProductsResponse.js +0 -48
  152. package/dist/models/SeoMetadata.d.ts +0 -31
  153. package/dist/models/SeoMetadata.js +0 -45
  154. package/dist/models/Stock.d.ts +0 -31
  155. package/dist/models/Stock.js +0 -45
  156. package/dist/models/UpdateProductRequest.d.ts +0 -87
  157. package/dist/models/UpdateProductRequest.js +0 -65
  158. package/dist/models/Variant.d.ts +0 -114
  159. package/dist/models/Variant.js +0 -78
  160. package/dist/models/VariantProduct.d.ts +0 -37
  161. package/dist/models/VariantProduct.js +0 -47
  162. package/dist/models/VariantsResponse.d.ts +0 -38
  163. package/dist/models/VariantsResponse.js +0 -48
  164. package/dist/models/index.d.ts +0 -23
  165. package/dist/models/index.js +0 -41
  166. package/dist/runtime.d.ts +0 -187
  167. package/dist/runtime.js +0 -349
  168. package/src/apis/ProductsApi.ts +0 -453
  169. package/src/apis/VariantsApi.ts +0 -186
  170. package/src/apis/index.ts +0 -4
  171. package/src/index.ts +0 -5
  172. package/src/models/ApiError.ts +0 -69
  173. package/src/models/Attribute.ts +0 -93
  174. package/src/models/AttributeThumbnail.ts +0 -80
  175. package/src/models/CreateProductRequest.ts +0 -153
  176. package/src/models/CreateProductRequestAdditionalFilesInner.ts +0 -65
  177. package/src/models/CreateProductRequestImagesInner.ts +0 -60
  178. package/src/models/CreateProductRequestSeoMetadata.ts +0 -60
  179. package/src/models/CreateProductRequestVariantsInner.ts +0 -124
  180. package/src/models/CreateProductRequestVariantsInnerApplicationsInner.ts +0 -108
  181. package/src/models/CreateProductRequestVariantsInnerAttributesInner.ts +0 -75
  182. package/src/models/CreateProductRequestVariantsInnerImagesInner.ts +0 -65
  183. package/src/models/CreateProductRequestVariantsInnerRetailPrice.ts +0 -75
  184. package/src/models/CreateProductVariant.ts +0 -119
  185. package/src/models/CreateProductVariantApplicationsInner.ts +0 -93
  186. package/src/models/CreateProductVariantAttributesInner.ts +0 -70
  187. package/src/models/CreateProductVariantRetailPrice.ts +0 -70
  188. package/src/models/Image.ts +0 -108
  189. package/src/models/ImportProducts200Response.ts +0 -60
  190. package/src/models/ModelFile.ts +0 -60
  191. package/src/models/Price.ts +0 -68
  192. package/src/models/Product.ts +0 -190
  193. package/src/models/ProductAdditionalFilesInner.ts +0 -68
  194. package/src/models/ProductsResponse.ts +0 -75
  195. package/src/models/SeoMetadata.ts +0 -60
  196. package/src/models/Stock.ts +0 -60
  197. package/src/models/UpdateProductRequest.ts +0 -145
  198. package/src/models/Variant.ts +0 -195
  199. package/src/models/VariantProduct.ts +0 -68
  200. package/src/models/VariantsResponse.ts +0 -75
  201. package/src/models/index.ts +0 -25
  202. package/src/runtime.ts +0 -441
@@ -1,333 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Product Catalog API
5
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
6
- *
7
- * The version of the OpenAPI document: 1.11.1
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- export const BASE_PATH = "https://api.teemill.com".replace(/\/+$/, "");
24
- export class Configuration {
25
- constructor(configuration = {}) {
26
- this.configuration = configuration;
27
- }
28
- set config(configuration) {
29
- this.configuration = configuration;
30
- }
31
- get basePath() {
32
- return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
33
- }
34
- get fetchApi() {
35
- return this.configuration.fetchApi;
36
- }
37
- get middleware() {
38
- return this.configuration.middleware || [];
39
- }
40
- get queryParamsStringify() {
41
- return this.configuration.queryParamsStringify || querystring;
42
- }
43
- get username() {
44
- return this.configuration.username;
45
- }
46
- get password() {
47
- return this.configuration.password;
48
- }
49
- get apiKey() {
50
- const apiKey = this.configuration.apiKey;
51
- if (apiKey) {
52
- return typeof apiKey === 'function' ? apiKey : () => apiKey;
53
- }
54
- return undefined;
55
- }
56
- get accessToken() {
57
- const accessToken = this.configuration.accessToken;
58
- if (accessToken) {
59
- return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
60
- }
61
- return undefined;
62
- }
63
- get headers() {
64
- return this.configuration.headers;
65
- }
66
- get credentials() {
67
- return this.configuration.credentials;
68
- }
69
- }
70
- export const DefaultConfig = new Configuration();
71
- /**
72
- * This is the base class for all generated API classes.
73
- */
74
- export class BaseAPI {
75
- constructor(configuration = DefaultConfig) {
76
- this.configuration = configuration;
77
- this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
78
- let fetchParams = { url, init };
79
- for (const middleware of this.middleware) {
80
- if (middleware.pre) {
81
- fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
82
- }
83
- }
84
- let response = undefined;
85
- try {
86
- response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
87
- }
88
- catch (e) {
89
- for (const middleware of this.middleware) {
90
- if (middleware.onError) {
91
- response = (yield middleware.onError({
92
- fetch: this.fetchApi,
93
- url: fetchParams.url,
94
- init: fetchParams.init,
95
- error: e,
96
- response: response ? response.clone() : undefined,
97
- })) || response;
98
- }
99
- }
100
- if (response === undefined) {
101
- if (e instanceof Error) {
102
- throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
103
- }
104
- else {
105
- throw e;
106
- }
107
- }
108
- }
109
- for (const middleware of this.middleware) {
110
- if (middleware.post) {
111
- response = (yield middleware.post({
112
- fetch: this.fetchApi,
113
- url: fetchParams.url,
114
- init: fetchParams.init,
115
- response: response.clone(),
116
- })) || response;
117
- }
118
- }
119
- return response;
120
- });
121
- this.middleware = configuration.middleware;
122
- }
123
- isResponseError(error) {
124
- return error instanceof Error && error.name === 'ResponseError';
125
- }
126
- withMiddleware(...middlewares) {
127
- const next = this.clone();
128
- next.middleware = next.middleware.concat(...middlewares);
129
- return next;
130
- }
131
- withPreMiddleware(...preMiddlewares) {
132
- const middlewares = preMiddlewares.map((pre) => ({ pre }));
133
- return this.withMiddleware(...middlewares);
134
- }
135
- withPostMiddleware(...postMiddlewares) {
136
- const middlewares = postMiddlewares.map((post) => ({ post }));
137
- return this.withMiddleware(...middlewares);
138
- }
139
- /**
140
- * Check if the given MIME is a JSON MIME.
141
- * JSON MIME examples:
142
- * application/json
143
- * application/json; charset=UTF8
144
- * APPLICATION/JSON
145
- * application/vnd.company+json
146
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
147
- * @return True if the given MIME is JSON, false otherwise.
148
- */
149
- isJsonMime(mime) {
150
- if (!mime) {
151
- return false;
152
- }
153
- return BaseAPI.jsonRegex.test(mime);
154
- }
155
- request(context, initOverrides) {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- const { url, init } = yield this.createFetchParams(context, initOverrides);
158
- const response = yield this.fetchApi(url, init);
159
- if (response && (response.status >= 200 && response.status < 300)) {
160
- return response;
161
- }
162
- throw new ResponseError(response, 'Response returned an error code');
163
- });
164
- }
165
- createFetchParams(context, initOverrides) {
166
- return __awaiter(this, void 0, void 0, function* () {
167
- let url = this.configuration.basePath + context.path;
168
- if (context.query !== undefined && Object.keys(context.query).length !== 0) {
169
- // only add the querystring to the URL if there are query parameters.
170
- // this is done to avoid urls ending with a "?" character which buggy webservers
171
- // do not handle correctly sometimes.
172
- url += '?' + this.configuration.queryParamsStringify(context.query);
173
- }
174
- const headers = Object.assign({}, this.configuration.headers, context.headers);
175
- Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
176
- const initOverrideFn = typeof initOverrides === "function"
177
- ? initOverrides
178
- : () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
179
- const initParams = {
180
- method: context.method,
181
- headers,
182
- body: context.body,
183
- credentials: this.configuration.credentials,
184
- };
185
- const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
186
- init: initParams,
187
- context,
188
- })));
189
- let body;
190
- if (isFormData(overriddenInit.body)
191
- || (overriddenInit.body instanceof URLSearchParams)
192
- || isBlob(overriddenInit.body)) {
193
- body = overriddenInit.body;
194
- }
195
- else if (this.isJsonMime(headers['Content-Type'])) {
196
- body = JSON.stringify(overriddenInit.body);
197
- }
198
- else {
199
- body = overriddenInit.body;
200
- }
201
- const init = Object.assign(Object.assign({}, overriddenInit), { body });
202
- return { url, init };
203
- });
204
- }
205
- /**
206
- * Create a shallow clone of `this` by constructing a new instance
207
- * and then shallow cloning data members.
208
- */
209
- clone() {
210
- const constructor = this.constructor;
211
- const next = new constructor(this.configuration);
212
- next.middleware = this.middleware.slice();
213
- return next;
214
- }
215
- }
216
- BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
217
- ;
218
- function isBlob(value) {
219
- return typeof Blob !== 'undefined' && value instanceof Blob;
220
- }
221
- function isFormData(value) {
222
- return typeof FormData !== "undefined" && value instanceof FormData;
223
- }
224
- export class ResponseError extends Error {
225
- constructor(response, msg) {
226
- super(msg);
227
- this.response = response;
228
- this.name = "ResponseError";
229
- }
230
- }
231
- export class FetchError extends Error {
232
- constructor(cause, msg) {
233
- super(msg);
234
- this.cause = cause;
235
- this.name = "FetchError";
236
- }
237
- }
238
- export class RequiredError extends Error {
239
- constructor(field, msg) {
240
- super(msg);
241
- this.field = field;
242
- this.name = "RequiredError";
243
- }
244
- }
245
- export const COLLECTION_FORMATS = {
246
- csv: ",",
247
- ssv: " ",
248
- tsv: "\t",
249
- pipes: "|",
250
- };
251
- export function exists(json, key) {
252
- const value = json[key];
253
- return value !== null && value !== undefined;
254
- }
255
- export function querystring(params, prefix = '') {
256
- return Object.keys(params)
257
- .map(key => querystringSingleKey(key, params[key], prefix))
258
- .filter(part => part.length > 0)
259
- .join('&');
260
- }
261
- function querystringSingleKey(key, value, keyPrefix = '') {
262
- const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
263
- if (value instanceof Array) {
264
- const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
265
- .join(`&${encodeURIComponent(fullKey)}[]=`);
266
- return `${encodeURIComponent(fullKey)}[]=${multiValue}`;
267
- }
268
- if (value instanceof Set) {
269
- const valueAsArray = Array.from(value);
270
- return querystringSingleKey(key, valueAsArray, keyPrefix);
271
- }
272
- if (value instanceof Date) {
273
- return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
274
- }
275
- if (value instanceof Object) {
276
- return querystring(value, fullKey);
277
- }
278
- return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
279
- }
280
- export function mapValues(data, fn) {
281
- return Object.keys(data).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: fn(data[key]) })), {});
282
- }
283
- export function canConsumeForm(consumes) {
284
- for (const consume of consumes) {
285
- if ('multipart/form-data' === consume.contentType) {
286
- return true;
287
- }
288
- }
289
- return false;
290
- }
291
- export class JSONApiResponse {
292
- constructor(raw, transformer = (jsonValue) => jsonValue) {
293
- this.raw = raw;
294
- this.transformer = transformer;
295
- }
296
- value() {
297
- return __awaiter(this, void 0, void 0, function* () {
298
- return this.transformer(yield this.raw.json());
299
- });
300
- }
301
- }
302
- export class VoidApiResponse {
303
- constructor(raw) {
304
- this.raw = raw;
305
- }
306
- value() {
307
- return __awaiter(this, void 0, void 0, function* () {
308
- return undefined;
309
- });
310
- }
311
- }
312
- export class BlobApiResponse {
313
- constructor(raw) {
314
- this.raw = raw;
315
- }
316
- value() {
317
- return __awaiter(this, void 0, void 0, function* () {
318
- return yield this.raw.blob();
319
- });
320
- }
321
- ;
322
- }
323
- export class TextApiResponse {
324
- constructor(raw) {
325
- this.raw = raw;
326
- }
327
- value() {
328
- return __awaiter(this, void 0, void 0, function* () {
329
- return yield this.raw.text();
330
- });
331
- }
332
- ;
333
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * Product Catalog API
3
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
- *
5
- * The version of the OpenAPI document: 1.11.1
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 ApiError
16
- */
17
- export interface ApiError {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof ApiError
22
- */
23
- code?: string;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof ApiError
28
- */
29
- message: string;
30
- }
31
- /**
32
- * Check if a given object implements the ApiError interface.
33
- */
34
- export declare function instanceOfApiError(value: object): boolean;
35
- export declare function ApiErrorFromJSON(json: any): ApiError;
36
- export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
37
- export declare function ApiErrorToJSON(value?: ApiError | null): any;
@@ -1,49 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Product Catalog API
6
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
- *
8
- * The version of the OpenAPI document: 1.11.1
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.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
17
- /**
18
- * Check if a given object implements the ApiError interface.
19
- */
20
- function instanceOfApiError(value) {
21
- if (!('message' in value))
22
- return false;
23
- return true;
24
- }
25
- exports.instanceOfApiError = instanceOfApiError;
26
- function ApiErrorFromJSON(json) {
27
- return ApiErrorFromJSONTyped(json, false);
28
- }
29
- exports.ApiErrorFromJSON = ApiErrorFromJSON;
30
- function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
31
- if (json == null) {
32
- return json;
33
- }
34
- return {
35
- 'code': json['code'] == null ? undefined : json['code'],
36
- 'message': json['message'],
37
- };
38
- }
39
- exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
40
- function ApiErrorToJSON(value) {
41
- if (value == null) {
42
- return value;
43
- }
44
- return {
45
- 'code': value['code'],
46
- 'message': value['message'],
47
- };
48
- }
49
- exports.ApiErrorToJSON = ApiErrorToJSON;
@@ -1,50 +0,0 @@
1
- /**
2
- * Product Catalog API
3
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
- *
5
- * The version of the OpenAPI document: 1.11.1
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 { AttributeThumbnail } from './AttributeThumbnail';
13
- /**
14
- *
15
- * @export
16
- * @interface Attribute
17
- */
18
- export interface Attribute {
19
- /**
20
- * Attribute name
21
- * @type {string}
22
- * @memberof Attribute
23
- */
24
- name: string;
25
- /**
26
- * Attribute value
27
- * @type {string}
28
- * @memberof Attribute
29
- */
30
- value: string;
31
- /**
32
- *
33
- * @type {AttributeThumbnail}
34
- * @memberof Attribute
35
- */
36
- thumbnail?: AttributeThumbnail;
37
- /**
38
- * Attribute tags
39
- * @type {Array<string>}
40
- * @memberof Attribute
41
- */
42
- tags?: Array<string>;
43
- }
44
- /**
45
- * Check if a given object implements the Attribute interface.
46
- */
47
- export declare function instanceOfAttribute(value: object): boolean;
48
- export declare function AttributeFromJSON(json: any): Attribute;
49
- export declare function AttributeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Attribute;
50
- export declare function AttributeToJSON(value?: Attribute | null): any;
@@ -1,56 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Product Catalog API
6
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
- *
8
- * The version of the OpenAPI document: 1.11.1
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.AttributeToJSON = exports.AttributeFromJSONTyped = exports.AttributeFromJSON = exports.instanceOfAttribute = void 0;
17
- const AttributeThumbnail_1 = require("./AttributeThumbnail");
18
- /**
19
- * Check if a given object implements the Attribute interface.
20
- */
21
- function instanceOfAttribute(value) {
22
- if (!('name' in value))
23
- return false;
24
- if (!('value' in value))
25
- return false;
26
- return true;
27
- }
28
- exports.instanceOfAttribute = instanceOfAttribute;
29
- function AttributeFromJSON(json) {
30
- return AttributeFromJSONTyped(json, false);
31
- }
32
- exports.AttributeFromJSON = AttributeFromJSON;
33
- function AttributeFromJSONTyped(json, ignoreDiscriminator) {
34
- if (json == null) {
35
- return json;
36
- }
37
- return {
38
- 'name': json['name'],
39
- 'value': json['value'],
40
- 'thumbnail': json['thumbnail'] == null ? undefined : (0, AttributeThumbnail_1.AttributeThumbnailFromJSON)(json['thumbnail']),
41
- 'tags': json['tags'] == null ? undefined : json['tags'],
42
- };
43
- }
44
- exports.AttributeFromJSONTyped = AttributeFromJSONTyped;
45
- function AttributeToJSON(value) {
46
- if (value == null) {
47
- return value;
48
- }
49
- return {
50
- 'name': value['name'],
51
- 'value': value['value'],
52
- 'thumbnail': (0, AttributeThumbnail_1.AttributeThumbnailToJSON)(value['thumbnail']),
53
- 'tags': value['tags'],
54
- };
55
- }
56
- exports.AttributeToJSON = AttributeToJSON;
@@ -1,46 +0,0 @@
1
- /**
2
- * Product Catalog API
3
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
4
- *
5
- * The version of the OpenAPI document: 1.11.1
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
- * Attribute thumbnail, intended for interfaces like storefront colour selector.
14
- * @export
15
- * @interface AttributeThumbnail
16
- */
17
- export interface AttributeThumbnail {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof AttributeThumbnail
22
- */
23
- type?: AttributeThumbnailTypeEnum;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof AttributeThumbnail
28
- */
29
- value?: string;
30
- }
31
- /**
32
- * @export
33
- */
34
- export declare const AttributeThumbnailTypeEnum: {
35
- readonly Text: "text";
36
- readonly Color: "color";
37
- readonly Image: "image";
38
- };
39
- export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
40
- /**
41
- * Check if a given object implements the AttributeThumbnail interface.
42
- */
43
- export declare function instanceOfAttributeThumbnail(value: object): boolean;
44
- export declare function AttributeThumbnailFromJSON(json: any): AttributeThumbnail;
45
- export declare function AttributeThumbnailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AttributeThumbnail;
46
- export declare function AttributeThumbnailToJSON(value?: AttributeThumbnail | null): any;
@@ -1,55 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Product Catalog API
6
- * Manage Product Catalog A catalog product is an object that represents a product listing that can be purchased from the given project. It contains a combination of design applications and a warehouse product, plus listing information such as title, description and tags.
7
- *
8
- * The version of the OpenAPI document: 1.11.1
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.AttributeThumbnailToJSON = exports.AttributeThumbnailFromJSONTyped = exports.AttributeThumbnailFromJSON = exports.instanceOfAttributeThumbnail = exports.AttributeThumbnailTypeEnum = void 0;
17
- /**
18
- * @export
19
- */
20
- exports.AttributeThumbnailTypeEnum = {
21
- Text: 'text',
22
- Color: 'color',
23
- Image: 'image'
24
- };
25
- /**
26
- * Check if a given object implements the AttributeThumbnail interface.
27
- */
28
- function instanceOfAttributeThumbnail(value) {
29
- return true;
30
- }
31
- exports.instanceOfAttributeThumbnail = instanceOfAttributeThumbnail;
32
- function AttributeThumbnailFromJSON(json) {
33
- return AttributeThumbnailFromJSONTyped(json, false);
34
- }
35
- exports.AttributeThumbnailFromJSON = AttributeThumbnailFromJSON;
36
- function AttributeThumbnailFromJSONTyped(json, ignoreDiscriminator) {
37
- if (json == null) {
38
- return json;
39
- }
40
- return {
41
- 'type': json['type'] == null ? undefined : json['type'],
42
- 'value': json['value'] == null ? undefined : json['value'],
43
- };
44
- }
45
- exports.AttributeThumbnailFromJSONTyped = AttributeThumbnailFromJSONTyped;
46
- function AttributeThumbnailToJSON(value) {
47
- if (value == null) {
48
- return value;
49
- }
50
- return {
51
- 'type': value['type'],
52
- 'value': value['value'],
53
- };
54
- }
55
- exports.AttributeThumbnailToJSON = AttributeThumbnailToJSON;