@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
package/api.ts ADDED
@@ -0,0 +1,1598 @@
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.13.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
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface ApiError
30
+ */
31
+ export interface ApiError {
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof ApiError
36
+ */
37
+ 'code'?: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof ApiError
42
+ */
43
+ 'message': string;
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface Application
49
+ */
50
+ export interface Application {
51
+ /**
52
+ * Technology to use for the application.
53
+ * @type {string}
54
+ * @memberof Application
55
+ */
56
+ 'technology': string;
57
+ /**
58
+ * Placement of the application. Available placements depend on the chosen product and technology.
59
+ * @type {string}
60
+ * @memberof Application
61
+ */
62
+ 'placement': ApplicationPlacementEnum;
63
+ /**
64
+ * Publicly available design file URL. This will fill the design area of the warehouse product. It will be centered horizontally and aligned to the top of the design area. Accepts PNG and JPEG files.
65
+ * @type {string}
66
+ * @memberof Application
67
+ */
68
+ 'src': string;
69
+ }
70
+
71
+ export const ApplicationPlacementEnum = {
72
+ Front: 'front',
73
+ Back: 'back',
74
+ Left: 'left',
75
+ Right: 'right',
76
+ Neck: 'neck'
77
+ } as const;
78
+
79
+ export type ApplicationPlacementEnum = typeof ApplicationPlacementEnum[keyof typeof ApplicationPlacementEnum];
80
+
81
+ /**
82
+ *
83
+ * @export
84
+ * @interface Attribute
85
+ */
86
+ export interface Attribute {
87
+ /**
88
+ * Attribute name
89
+ * @type {string}
90
+ * @memberof Attribute
91
+ */
92
+ 'name': string;
93
+ /**
94
+ * Attribute value
95
+ * @type {string}
96
+ * @memberof Attribute
97
+ */
98
+ 'value': string;
99
+ /**
100
+ *
101
+ * @type {AttributeThumbnail}
102
+ * @memberof Attribute
103
+ */
104
+ 'thumbnail'?: AttributeThumbnail;
105
+ /**
106
+ * Attribute tags
107
+ * @type {Array<string>}
108
+ * @memberof Attribute
109
+ */
110
+ 'tags'?: Array<string>;
111
+ }
112
+ /**
113
+ * Attribute thumbnail, intended for interfaces like storefront colour selector.
114
+ * @export
115
+ * @interface AttributeThumbnail
116
+ */
117
+ export interface AttributeThumbnail {
118
+ /**
119
+ *
120
+ * @type {string}
121
+ * @memberof AttributeThumbnail
122
+ */
123
+ 'type'?: AttributeThumbnailTypeEnum;
124
+ /**
125
+ *
126
+ * @type {string}
127
+ * @memberof AttributeThumbnail
128
+ */
129
+ 'value'?: string;
130
+ }
131
+
132
+ export const AttributeThumbnailTypeEnum = {
133
+ Text: 'text',
134
+ Color: 'color',
135
+ Image: 'image'
136
+ } as const;
137
+
138
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
139
+
140
+ /**
141
+ *
142
+ * @export
143
+ * @interface CreateProductRequest
144
+ */
145
+ export interface CreateProductRequest {
146
+ /**
147
+ * Reference to the product in the GFN catalog that will be used as a base for this product. A list of available products for the given project can be obtained from the GFN Catalog API.
148
+ * @type {string}
149
+ * @memberof CreateProductRequest
150
+ */
151
+ 'gfnProductRef': string;
152
+ /**
153
+ * Product title
154
+ * @type {string}
155
+ * @memberof CreateProductRequest
156
+ */
157
+ 'title'?: string;
158
+ /**
159
+ * Product description
160
+ * @type {string}
161
+ * @memberof CreateProductRequest
162
+ */
163
+ 'description'?: string;
164
+ /**
165
+ * Whether the product is enabled upon creation.
166
+ * @type {boolean}
167
+ * @memberof CreateProductRequest
168
+ */
169
+ 'enabled'?: boolean;
170
+ /**
171
+ * A custom URL slug for the product. This must be unique for each product on the project.
172
+ * @type {string}
173
+ * @memberof CreateProductRequest
174
+ */
175
+ 'slug'?: string;
176
+ /**
177
+ *
178
+ * @type {CreateProductRequestSeoMetadata}
179
+ * @memberof CreateProductRequest
180
+ */
181
+ 'seoMetadata'?: CreateProductRequestSeoMetadata;
182
+ /**
183
+ * Additional product tags used for searching and filtering.
184
+ * @type {Array<string>}
185
+ * @memberof CreateProductRequest
186
+ */
187
+ 'tags'?: Array<string>;
188
+ /**
189
+ * Variants
190
+ * @type {Array<CreateProductVariant>}
191
+ * @memberof CreateProductRequest
192
+ */
193
+ 'variants': Array<CreateProductVariant>;
194
+ /**
195
+ * Images to attach to the product. For example, photos of models using/wearing the product.
196
+ * @type {Array<CreateProductRequestImagesInner>}
197
+ * @memberof CreateProductRequest
198
+ */
199
+ 'images'?: Array<CreateProductRequestImagesInner>;
200
+ /**
201
+ * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
202
+ * @type {Array<CreateProductRequestImagesInner>}
203
+ * @memberof CreateProductRequest
204
+ */
205
+ 'additionalFiles'?: Array<CreateProductRequestImagesInner>;
206
+ }
207
+ /**
208
+ *
209
+ * @export
210
+ * @interface CreateProductRequestImagesInner
211
+ */
212
+ export interface CreateProductRequestImagesInner {
213
+ /**
214
+ * Publicly available file URL.
215
+ * @type {string}
216
+ * @memberof CreateProductRequestImagesInner
217
+ */
218
+ 'src'?: string;
219
+ }
220
+ /**
221
+ *
222
+ * @export
223
+ * @interface CreateProductRequestSeoMetadata
224
+ */
225
+ export interface CreateProductRequestSeoMetadata {
226
+ /**
227
+ * Meta title for the product. This appears in search engine results and social shares. If not provided, the product title will be used.
228
+ * @type {string}
229
+ * @memberof CreateProductRequestSeoMetadata
230
+ */
231
+ 'title'?: string;
232
+ }
233
+ /**
234
+ *
235
+ * @export
236
+ * @interface CreateProductVariant
237
+ */
238
+ export interface CreateProductVariant {
239
+ /**
240
+ * Attributes associated to a variant such as Colour and Size.
241
+ * @type {Array<CreateProductVariantAttributesInner>}
242
+ * @memberof CreateProductVariant
243
+ */
244
+ 'attributes': Array<CreateProductVariantAttributesInner>;
245
+ /**
246
+ *
247
+ * @type {CreateProductVariantRetailPrice}
248
+ * @memberof CreateProductVariant
249
+ */
250
+ 'retailPrice': CreateProductVariantRetailPrice;
251
+ /**
252
+ * A custom stock keeping unit for the variant.
253
+ * @type {string}
254
+ * @memberof CreateProductVariant
255
+ */
256
+ 'sku'?: string;
257
+ /**
258
+ * Design applications. If not provided, the product will be blank.
259
+ * @type {Array<Application>}
260
+ * @memberof CreateProductVariant
261
+ */
262
+ 'applications'?: Array<Application>;
263
+ /**
264
+ * Only use if you want to override the main product image. If not provided, mockups will be generated using the design applications and the warehouse product provided. Accepts PNG and JPEG files.
265
+ * @type {Array<CreateProductRequestImagesInner>}
266
+ * @memberof CreateProductVariant
267
+ */
268
+ 'images'?: Array<CreateProductRequestImagesInner>;
269
+ }
270
+ /**
271
+ *
272
+ * @export
273
+ * @interface CreateProductVariantAttributesInner
274
+ */
275
+ export interface CreateProductVariantAttributesInner {
276
+ /**
277
+ * Attribute name
278
+ * @type {string}
279
+ * @memberof CreateProductVariantAttributesInner
280
+ */
281
+ 'name': string;
282
+ /**
283
+ * Attribute value
284
+ * @type {string}
285
+ * @memberof CreateProductVariantAttributesInner
286
+ */
287
+ 'value': string;
288
+ }
289
+ /**
290
+ * Variant retail price including tax.
291
+ * @export
292
+ * @interface CreateProductVariantRetailPrice
293
+ */
294
+ export interface CreateProductVariantRetailPrice {
295
+ /**
296
+ * Price including tax in the specified currency.
297
+ * @type {number}
298
+ * @memberof CreateProductVariantRetailPrice
299
+ */
300
+ 'amount': number;
301
+ /**
302
+ * Currency code for the currency the price is valued in.
303
+ * @type {string}
304
+ * @memberof CreateProductVariantRetailPrice
305
+ */
306
+ 'currencyCode': string;
307
+ }
308
+ /**
309
+ * Image description
310
+ * @export
311
+ * @interface Image
312
+ */
313
+ export interface Image {
314
+ /**
315
+ * Unique object identifier
316
+ * @type {string}
317
+ * @memberof Image
318
+ */
319
+ 'id'?: string;
320
+ /**
321
+ *
322
+ * @type {string}
323
+ * @memberof Image
324
+ */
325
+ 'src'?: string;
326
+ /**
327
+ *
328
+ * @type {string}
329
+ * @memberof Image
330
+ */
331
+ 'alt'?: string;
332
+ /**
333
+ * List of variant Ids
334
+ * @type {Array<string>}
335
+ * @memberof Image
336
+ */
337
+ 'variantIds'?: Array<string>;
338
+ /**
339
+ *
340
+ * @type {number}
341
+ * @memberof Image
342
+ */
343
+ 'sortOrder'?: number;
344
+ /**
345
+ *
346
+ * @type {string}
347
+ * @memberof Image
348
+ */
349
+ 'createdAt'?: string;
350
+ /**
351
+ *
352
+ * @type {string}
353
+ * @memberof Image
354
+ */
355
+ 'updatedAt'?: string;
356
+ }
357
+ /**
358
+ *
359
+ * @export
360
+ * @interface ImportProducts200Response
361
+ */
362
+ export interface ImportProducts200Response {
363
+ /**
364
+ * Id of the product import
365
+ * @type {string}
366
+ * @memberof ImportProducts200Response
367
+ */
368
+ 'importId'?: string;
369
+ }
370
+ /**
371
+ *
372
+ * @export
373
+ * @interface ModelFile
374
+ */
375
+ export interface ModelFile {
376
+ /**
377
+ * Publicly available file URL.
378
+ * @type {string}
379
+ * @memberof ModelFile
380
+ */
381
+ 'src'?: string;
382
+ }
383
+ /**
384
+ * Standard price definition that defines the amount, tax rate and currency.
385
+ * @export
386
+ * @interface Price
387
+ */
388
+ export interface Price {
389
+ /**
390
+ * Price including tax in the specified currency.
391
+ * @type {number}
392
+ * @memberof Price
393
+ */
394
+ 'amount'?: number;
395
+ /**
396
+ * Currency code for the currency the price is valued in.
397
+ * @type {string}
398
+ * @memberof Price
399
+ */
400
+ 'currencyCode'?: string;
401
+ }
402
+ /**
403
+ *
404
+ * @export
405
+ * @interface Product
406
+ */
407
+ export interface Product {
408
+ /**
409
+ * Unique object identifier
410
+ * @type {string}
411
+ * @memberof Product
412
+ */
413
+ 'id'?: string;
414
+ /**
415
+ * A reference to the resource location
416
+ * @type {string}
417
+ * @memberof Product
418
+ */
419
+ 'ref'?: string;
420
+ /**
421
+ *
422
+ * @type {string}
423
+ * @memberof Product
424
+ */
425
+ 'title': string;
426
+ /**
427
+ *
428
+ * @type {string}
429
+ * @memberof Product
430
+ */
431
+ 'description': string;
432
+ /**
433
+ *
434
+ * @type {string}
435
+ * @memberof Product
436
+ */
437
+ 'slug'?: string;
438
+ /**
439
+ *
440
+ * @type {boolean}
441
+ * @memberof Product
442
+ */
443
+ 'enabled'?: boolean;
444
+ /**
445
+ *
446
+ * @type {SeoMetadata}
447
+ * @memberof Product
448
+ */
449
+ 'seoMetadata'?: SeoMetadata;
450
+ /**
451
+ *
452
+ * @type {Array<string>}
453
+ * @memberof Product
454
+ */
455
+ 'tags'?: Array<string>;
456
+ /**
457
+ *
458
+ * @type {string}
459
+ * @memberof Product
460
+ */
461
+ 'createdAt'?: string;
462
+ /**
463
+ *
464
+ * @type {string}
465
+ * @memberof Product
466
+ */
467
+ 'updatedAt'?: string;
468
+ /**
469
+ *
470
+ * @type {string}
471
+ * @memberof Product
472
+ */
473
+ 'publishedAt'?: string;
474
+ /**
475
+ * Images
476
+ * @type {Array<Image>}
477
+ * @memberof Product
478
+ */
479
+ 'images'?: Array<Image>;
480
+ /**
481
+ * Variants
482
+ * @type {Array<Variant>}
483
+ * @memberof Product
484
+ */
485
+ 'variants'?: Array<Variant>;
486
+ /**
487
+ * Additional files attached to the product.
488
+ * @type {Array<ProductAdditionalFilesInner>}
489
+ * @memberof Product
490
+ */
491
+ 'additionalFiles'?: Array<ProductAdditionalFilesInner>;
492
+ }
493
+ /**
494
+ *
495
+ * @export
496
+ * @interface ProductAdditionalFilesInner
497
+ */
498
+ export interface ProductAdditionalFilesInner {
499
+ /**
500
+ * Unique object identifier
501
+ * @type {string}
502
+ * @memberof ProductAdditionalFilesInner
503
+ */
504
+ 'id'?: string;
505
+ /**
506
+ * File URL
507
+ * @type {string}
508
+ * @memberof ProductAdditionalFilesInner
509
+ */
510
+ 'src'?: string;
511
+ }
512
+ /**
513
+ *
514
+ * @export
515
+ * @interface ProductsResponse
516
+ */
517
+ export interface ProductsResponse {
518
+ /**
519
+ *
520
+ * @type {Array<Product>}
521
+ * @memberof ProductsResponse
522
+ */
523
+ 'products'?: Array<Product>;
524
+ /**
525
+ *
526
+ * @type {number}
527
+ * @memberof ProductsResponse
528
+ */
529
+ 'nextPageToken'?: number;
530
+ }
531
+ /**
532
+ * SEO metadata for the product
533
+ * @export
534
+ * @interface SeoMetadata
535
+ */
536
+ export interface SeoMetadata {
537
+ /**
538
+ * Meta title for the product. This appears in search engine results and social shares. If not provided, the product title will be used.
539
+ * @type {string}
540
+ * @memberof SeoMetadata
541
+ */
542
+ 'title'?: string;
543
+ }
544
+ /**
545
+ *
546
+ * @export
547
+ * @interface Stock
548
+ */
549
+ export interface Stock {
550
+ /**
551
+ *
552
+ * @type {number}
553
+ * @memberof Stock
554
+ */
555
+ 'level'?: number;
556
+ }
557
+ /**
558
+ *
559
+ * @export
560
+ * @interface UpdateProductRequest
561
+ */
562
+ export interface UpdateProductRequest {
563
+ /**
564
+ * Reference to the product in the GFN catalog that will be used as a base for this product. A list of available products for the given project can be obtained from the GFN Catalog API.
565
+ * @type {string}
566
+ * @memberof UpdateProductRequest
567
+ */
568
+ 'gfnProductRef'?: string;
569
+ /**
570
+ * Product title
571
+ * @type {string}
572
+ * @memberof UpdateProductRequest
573
+ */
574
+ 'title'?: string;
575
+ /**
576
+ * Product description
577
+ * @type {string}
578
+ * @memberof UpdateProductRequest
579
+ */
580
+ 'description'?: string;
581
+ /**
582
+ * Whether the product is enabled upon creation.
583
+ * @type {boolean}
584
+ * @memberof UpdateProductRequest
585
+ */
586
+ 'enabled'?: boolean;
587
+ /**
588
+ * A custom URL slug for the product. This must be unique for each product on the project.
589
+ * @type {string}
590
+ * @memberof UpdateProductRequest
591
+ */
592
+ 'slug'?: string;
593
+ /**
594
+ *
595
+ * @type {CreateProductRequestSeoMetadata}
596
+ * @memberof UpdateProductRequest
597
+ */
598
+ 'seoMetadata'?: CreateProductRequestSeoMetadata;
599
+ /**
600
+ * Additional product tags used for searching and filtering.
601
+ * @type {Array<string>}
602
+ * @memberof UpdateProductRequest
603
+ */
604
+ 'tags'?: Array<string>;
605
+ /**
606
+ * Variants
607
+ * @type {Array<CreateProductVariant>}
608
+ * @memberof UpdateProductRequest
609
+ */
610
+ 'variants'?: Array<CreateProductVariant>;
611
+ /**
612
+ * Images to attach to the product. For example, photos of models using/wearing the product.
613
+ * @type {Array<any>}
614
+ * @memberof UpdateProductRequest
615
+ */
616
+ 'images'?: Array<any>;
617
+ /**
618
+ * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
619
+ * @type {Array<any>}
620
+ * @memberof UpdateProductRequest
621
+ */
622
+ 'additionalFiles'?: Array<any>;
623
+ }
624
+ /**
625
+ *
626
+ * @export
627
+ * @interface Variant
628
+ */
629
+ export interface Variant {
630
+ /**
631
+ * Unique object identifier
632
+ * @type {string}
633
+ * @memberof Variant
634
+ */
635
+ 'id'?: string;
636
+ /**
637
+ * 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.
638
+ * @type {Array<Attribute>}
639
+ * @memberof Variant
640
+ */
641
+ 'attributes': Array<Attribute>;
642
+ /**
643
+ *
644
+ * @type {string}
645
+ * @memberof Variant
646
+ */
647
+ 'sku': string;
648
+ /**
649
+ * A reference to the resource location
650
+ * @type {string}
651
+ * @memberof Variant
652
+ */
653
+ 'ref'?: string;
654
+ /**
655
+ *
656
+ * @type {VariantProduct}
657
+ * @memberof Variant
658
+ */
659
+ 'product'?: VariantProduct;
660
+ /**
661
+ *
662
+ * @type {number}
663
+ * @memberof Variant
664
+ */
665
+ 'sortOrder'?: number;
666
+ /**
667
+ *
668
+ * @type {Price}
669
+ * @memberof Variant
670
+ */
671
+ 'retailPrice'?: Price;
672
+ /**
673
+ *
674
+ * @type {Price}
675
+ * @memberof Variant
676
+ */
677
+ 'salePrice'?: Price;
678
+ /**
679
+ *
680
+ * @type {Price}
681
+ * @memberof Variant
682
+ */
683
+ 'price'?: Price;
684
+ /**
685
+ *
686
+ * @type {Stock}
687
+ * @memberof Variant
688
+ */
689
+ 'stock'?: Stock;
690
+ /**
691
+ *
692
+ * @type {string}
693
+ * @memberof Variant
694
+ */
695
+ 'createdAt'?: string;
696
+ /**
697
+ *
698
+ * @type {string}
699
+ * @memberof Variant
700
+ */
701
+ 'updatedAt'?: string;
702
+ /**
703
+ *
704
+ * @type {string}
705
+ * @memberof Variant
706
+ */
707
+ 'publishedAt'?: string;
708
+ /**
709
+ * Images
710
+ * @type {Array<Image>}
711
+ * @memberof Variant
712
+ */
713
+ 'images'?: Array<Image>;
714
+ /**
715
+ * Design applications. If not provided, the product will be blank.
716
+ * @type {Array<Application>}
717
+ * @memberof Variant
718
+ */
719
+ 'applications'?: Array<Application>;
720
+ }
721
+ /**
722
+ *
723
+ * @export
724
+ * @interface VariantProduct
725
+ */
726
+ export interface VariantProduct {
727
+ /**
728
+ * Unique object identifier
729
+ * @type {string}
730
+ * @memberof VariantProduct
731
+ */
732
+ 'id'?: string;
733
+ /**
734
+ * A reference to the resource location
735
+ * @type {string}
736
+ * @memberof VariantProduct
737
+ */
738
+ 'ref'?: string;
739
+ }
740
+ /**
741
+ *
742
+ * @export
743
+ * @interface VariantsResponse
744
+ */
745
+ export interface VariantsResponse {
746
+ /**
747
+ *
748
+ * @type {Array<Variant>}
749
+ * @memberof VariantsResponse
750
+ */
751
+ 'variants'?: Array<Variant>;
752
+ /**
753
+ *
754
+ * @type {number}
755
+ * @memberof VariantsResponse
756
+ */
757
+ 'nextPageToken'?: number;
758
+ }
759
+
760
+ /**
761
+ * ProductsApi - axios parameter creator
762
+ * @export
763
+ */
764
+ export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
765
+ return {
766
+ /**
767
+ * Creates a new catalog product based on a given warehouse product with the variants and design applications provided. To select a warehouse product to base this product on, use the GFN Catalog API to list available options.
768
+ * @summary Create product
769
+ * @param {string} project What project it is
770
+ * @param {CreateProductRequest} [createProductRequest]
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ createProduct: async (project: string, createProductRequest?: CreateProductRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
775
+ // verify required parameter 'project' is not null or undefined
776
+ assertParamExists('createProduct', 'project', project)
777
+ const localVarPath = `/v1/catalog/products`;
778
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
779
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
780
+ let baseOptions;
781
+ if (configuration) {
782
+ baseOptions = configuration.baseOptions;
783
+ }
784
+
785
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
786
+ const localVarHeaderParameter = {} as any;
787
+ const localVarQueryParameter = {} as any;
788
+
789
+ // authentication session-oauth required
790
+ // oauth required
791
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
792
+
793
+ // authentication api-key required
794
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
795
+
796
+ if (project !== undefined) {
797
+ localVarQueryParameter['project'] = project;
798
+ }
799
+
800
+
801
+
802
+ localVarHeaderParameter['Content-Type'] = 'application/json';
803
+
804
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
805
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
806
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
807
+ localVarRequestOptions.data = serializeDataIfNeeded(createProductRequest, localVarRequestOptions, configuration)
808
+
809
+ return {
810
+ url: toPathString(localVarUrlObj),
811
+ options: localVarRequestOptions,
812
+ };
813
+ },
814
+ /**
815
+ * Deletes a catalog product
816
+ * @summary Delete catalog product
817
+ * @param {string} project What project it is
818
+ * @param {string} productId Product\&#39;s unique identifier
819
+ * @param {*} [options] Override http request option.
820
+ * @throws {RequiredError}
821
+ */
822
+ deleteProduct: async (project: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
823
+ // verify required parameter 'project' is not null or undefined
824
+ assertParamExists('deleteProduct', 'project', project)
825
+ // verify required parameter 'productId' is not null or undefined
826
+ assertParamExists('deleteProduct', 'productId', productId)
827
+ const localVarPath = `/v1/catalog/products/{productId}`
828
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
829
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
830
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
831
+ let baseOptions;
832
+ if (configuration) {
833
+ baseOptions = configuration.baseOptions;
834
+ }
835
+
836
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
837
+ const localVarHeaderParameter = {} as any;
838
+ const localVarQueryParameter = {} as any;
839
+
840
+ // authentication session-oauth required
841
+ // oauth required
842
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
843
+
844
+ // authentication api-key required
845
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
846
+
847
+ if (project !== undefined) {
848
+ localVarQueryParameter['project'] = project;
849
+ }
850
+
851
+
852
+
853
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
854
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
855
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
856
+
857
+ return {
858
+ url: toPathString(localVarUrlObj),
859
+ options: localVarRequestOptions,
860
+ };
861
+ },
862
+ /**
863
+ * Gets a product by a given ID.
864
+ * @summary Get product
865
+ * @param {string} project What project it is
866
+ * @param {string} productId Product\&#39;s unique identifier
867
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
868
+ * @param {*} [options] Override http request option.
869
+ * @throws {RequiredError}
870
+ */
871
+ getProduct: async (project: string, productId: string, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
872
+ // verify required parameter 'project' is not null or undefined
873
+ assertParamExists('getProduct', 'project', project)
874
+ // verify required parameter 'productId' is not null or undefined
875
+ assertParamExists('getProduct', 'productId', productId)
876
+ const localVarPath = `/v1/catalog/products/{productId}`
877
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
878
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
879
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
880
+ let baseOptions;
881
+ if (configuration) {
882
+ baseOptions = configuration.baseOptions;
883
+ }
884
+
885
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
886
+ const localVarHeaderParameter = {} as any;
887
+ const localVarQueryParameter = {} as any;
888
+
889
+ // authentication session-oauth required
890
+ // oauth required
891
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
892
+
893
+ // authentication api-key required
894
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
895
+
896
+ if (project !== undefined) {
897
+ localVarQueryParameter['project'] = project;
898
+ }
899
+
900
+ if (fields !== undefined) {
901
+ localVarQueryParameter['fields'] = fields;
902
+ }
903
+
904
+
905
+
906
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
907
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
908
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
909
+
910
+ return {
911
+ url: toPathString(localVarUrlObj),
912
+ options: localVarRequestOptions,
913
+ };
914
+ },
915
+ /**
916
+ * Lists all enabled store listing products attached to the given project.
917
+ * @summary List products
918
+ * @param {string} project What project it is
919
+ * @param {number} [pageToken] Page reference token
920
+ * @param {string} [search] Search term to filter based on product tags.
921
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
922
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ getProducts: async (project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
927
+ // verify required parameter 'project' is not null or undefined
928
+ assertParamExists('getProducts', 'project', project)
929
+ const localVarPath = `/v1/catalog/products`;
930
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
931
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
932
+ let baseOptions;
933
+ if (configuration) {
934
+ baseOptions = configuration.baseOptions;
935
+ }
936
+
937
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
938
+ const localVarHeaderParameter = {} as any;
939
+ const localVarQueryParameter = {} as any;
940
+
941
+ // authentication session-oauth required
942
+ // oauth required
943
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
944
+
945
+ // authentication api-key required
946
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
947
+
948
+ if (project !== undefined) {
949
+ localVarQueryParameter['project'] = project;
950
+ }
951
+
952
+ if (pageToken !== undefined) {
953
+ localVarQueryParameter['pageToken'] = pageToken;
954
+ }
955
+
956
+ if (search !== undefined) {
957
+ localVarQueryParameter['search'] = search;
958
+ }
959
+
960
+ if (pageSize !== undefined) {
961
+ localVarQueryParameter['pageSize'] = pageSize;
962
+ }
963
+
964
+ if (fields !== undefined) {
965
+ localVarQueryParameter['fields'] = fields;
966
+ }
967
+
968
+
969
+
970
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
971
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
972
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
973
+
974
+ return {
975
+ url: toPathString(localVarUrlObj),
976
+ options: localVarRequestOptions,
977
+ };
978
+ },
979
+ /**
980
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
981
+ * @summary Import products
982
+ * @param {string} project What project it is
983
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
984
+ * @param {*} [options] Override http request option.
985
+ * @throws {RequiredError}
986
+ */
987
+ importProducts: async (project: string, body?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
988
+ // verify required parameter 'project' is not null or undefined
989
+ assertParamExists('importProducts', 'project', project)
990
+ const localVarPath = `/v1/catalog/products/import`;
991
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
992
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
993
+ let baseOptions;
994
+ if (configuration) {
995
+ baseOptions = configuration.baseOptions;
996
+ }
997
+
998
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
999
+ const localVarHeaderParameter = {} as any;
1000
+ const localVarQueryParameter = {} as any;
1001
+
1002
+ // authentication session-oauth required
1003
+ // oauth required
1004
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1005
+
1006
+ // authentication api-key required
1007
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1008
+
1009
+ if (project !== undefined) {
1010
+ localVarQueryParameter['project'] = project;
1011
+ }
1012
+
1013
+
1014
+
1015
+ localVarHeaderParameter['Content-Type'] = 'text/csv';
1016
+
1017
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1018
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1019
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1020
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1021
+
1022
+ return {
1023
+ url: toPathString(localVarUrlObj),
1024
+ options: localVarRequestOptions,
1025
+ };
1026
+ },
1027
+ /**
1028
+ * Updates a product by a given ID.
1029
+ * @summary Update product
1030
+ * @param {string} project What project it is
1031
+ * @param {string} productId Product\&#39;s unique identifier
1032
+ * @param {UpdateProductRequest} [updateProductRequest]
1033
+ * @param {*} [options] Override http request option.
1034
+ * @throws {RequiredError}
1035
+ */
1036
+ updateProduct: async (project: string, productId: string, updateProductRequest?: UpdateProductRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1037
+ // verify required parameter 'project' is not null or undefined
1038
+ assertParamExists('updateProduct', 'project', project)
1039
+ // verify required parameter 'productId' is not null or undefined
1040
+ assertParamExists('updateProduct', 'productId', productId)
1041
+ const localVarPath = `/v1/catalog/products/{productId}`
1042
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1043
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1044
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1045
+ let baseOptions;
1046
+ if (configuration) {
1047
+ baseOptions = configuration.baseOptions;
1048
+ }
1049
+
1050
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
1051
+ const localVarHeaderParameter = {} as any;
1052
+ const localVarQueryParameter = {} as any;
1053
+
1054
+ // authentication session-oauth required
1055
+ // oauth required
1056
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1057
+
1058
+ // authentication api-key required
1059
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1060
+
1061
+ if (project !== undefined) {
1062
+ localVarQueryParameter['project'] = project;
1063
+ }
1064
+
1065
+
1066
+
1067
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1068
+
1069
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1070
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1071
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1072
+ localVarRequestOptions.data = serializeDataIfNeeded(updateProductRequest, localVarRequestOptions, configuration)
1073
+
1074
+ return {
1075
+ url: toPathString(localVarUrlObj),
1076
+ options: localVarRequestOptions,
1077
+ };
1078
+ },
1079
+ }
1080
+ };
1081
+
1082
+ /**
1083
+ * ProductsApi - functional programming interface
1084
+ * @export
1085
+ */
1086
+ export const ProductsApiFp = function(configuration?: Configuration) {
1087
+ const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
1088
+ return {
1089
+ /**
1090
+ * Creates a new catalog product based on a given warehouse product with the variants and design applications provided. To select a warehouse product to base this product on, use the GFN Catalog API to list available options.
1091
+ * @summary Create product
1092
+ * @param {string} project What project it is
1093
+ * @param {CreateProductRequest} [createProductRequest]
1094
+ * @param {*} [options] Override http request option.
1095
+ * @throws {RequiredError}
1096
+ */
1097
+ async createProduct(project: string, createProductRequest?: CreateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1098
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createProduct(project, createProductRequest, options);
1099
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1100
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.createProduct']?.[localVarOperationServerIndex]?.url;
1101
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1102
+ },
1103
+ /**
1104
+ * Deletes a catalog product
1105
+ * @summary Delete catalog product
1106
+ * @param {string} project What project it is
1107
+ * @param {string} productId Product\&#39;s unique identifier
1108
+ * @param {*} [options] Override http request option.
1109
+ * @throws {RequiredError}
1110
+ */
1111
+ async deleteProduct(project: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1112
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProduct(project, productId, options);
1113
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1114
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.deleteProduct']?.[localVarOperationServerIndex]?.url;
1115
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1116
+ },
1117
+ /**
1118
+ * Gets a product by a given ID.
1119
+ * @summary Get product
1120
+ * @param {string} project What project it is
1121
+ * @param {string} productId Product\&#39;s unique identifier
1122
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ */
1126
+ async getProduct(project: string, productId: string, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1127
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(project, productId, fields, options);
1128
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1129
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.getProduct']?.[localVarOperationServerIndex]?.url;
1130
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1131
+ },
1132
+ /**
1133
+ * Lists all enabled store listing products attached to the given project.
1134
+ * @summary List products
1135
+ * @param {string} project What project it is
1136
+ * @param {number} [pageToken] Page reference token
1137
+ * @param {string} [search] Search term to filter based on product tags.
1138
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1139
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1140
+ * @param {*} [options] Override http request option.
1141
+ * @throws {RequiredError}
1142
+ */
1143
+ async getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductsResponse>> {
1144
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(project, pageToken, search, pageSize, fields, options);
1145
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1146
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.getProducts']?.[localVarOperationServerIndex]?.url;
1147
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1148
+ },
1149
+ /**
1150
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1151
+ * @summary Import products
1152
+ * @param {string} project What project it is
1153
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1154
+ * @param {*} [options] Override http request option.
1155
+ * @throws {RequiredError}
1156
+ */
1157
+ async importProducts(project: string, body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportProducts200Response>> {
1158
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importProducts(project, body, options);
1159
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1160
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.importProducts']?.[localVarOperationServerIndex]?.url;
1161
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1162
+ },
1163
+ /**
1164
+ * Updates a product by a given ID.
1165
+ * @summary Update product
1166
+ * @param {string} project What project it is
1167
+ * @param {string} productId Product\&#39;s unique identifier
1168
+ * @param {UpdateProductRequest} [updateProductRequest]
1169
+ * @param {*} [options] Override http request option.
1170
+ * @throws {RequiredError}
1171
+ */
1172
+ async updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1173
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(project, productId, updateProductRequest, options);
1174
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1175
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.updateProduct']?.[localVarOperationServerIndex]?.url;
1176
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1177
+ },
1178
+ }
1179
+ };
1180
+
1181
+ /**
1182
+ * ProductsApi - factory interface
1183
+ * @export
1184
+ */
1185
+ export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1186
+ const localVarFp = ProductsApiFp(configuration)
1187
+ return {
1188
+ /**
1189
+ * Creates a new catalog product based on a given warehouse product with the variants and design applications provided. To select a warehouse product to base this product on, use the GFN Catalog API to list available options.
1190
+ * @summary Create product
1191
+ * @param {string} project What project it is
1192
+ * @param {CreateProductRequest} [createProductRequest]
1193
+ * @param {*} [options] Override http request option.
1194
+ * @throws {RequiredError}
1195
+ */
1196
+ createProduct(project: string, createProductRequest?: CreateProductRequest, options?: any): AxiosPromise<Product> {
1197
+ return localVarFp.createProduct(project, createProductRequest, options).then((request) => request(axios, basePath));
1198
+ },
1199
+ /**
1200
+ * Deletes a catalog product
1201
+ * @summary Delete catalog product
1202
+ * @param {string} project What project it is
1203
+ * @param {string} productId Product\&#39;s unique identifier
1204
+ * @param {*} [options] Override http request option.
1205
+ * @throws {RequiredError}
1206
+ */
1207
+ deleteProduct(project: string, productId: string, options?: any): AxiosPromise<void> {
1208
+ return localVarFp.deleteProduct(project, productId, options).then((request) => request(axios, basePath));
1209
+ },
1210
+ /**
1211
+ * Gets a product by a given ID.
1212
+ * @summary Get product
1213
+ * @param {string} project What project it is
1214
+ * @param {string} productId Product\&#39;s unique identifier
1215
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1216
+ * @param {*} [options] Override http request option.
1217
+ * @throws {RequiredError}
1218
+ */
1219
+ getProduct(project: string, productId: string, fields?: string, options?: any): AxiosPromise<Product> {
1220
+ return localVarFp.getProduct(project, productId, fields, options).then((request) => request(axios, basePath));
1221
+ },
1222
+ /**
1223
+ * Lists all enabled store listing products attached to the given project.
1224
+ * @summary List products
1225
+ * @param {string} project What project it is
1226
+ * @param {number} [pageToken] Page reference token
1227
+ * @param {string} [search] Search term to filter based on product tags.
1228
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1229
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1230
+ * @param {*} [options] Override http request option.
1231
+ * @throws {RequiredError}
1232
+ */
1233
+ getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: any): AxiosPromise<ProductsResponse> {
1234
+ return localVarFp.getProducts(project, pageToken, search, pageSize, fields, options).then((request) => request(axios, basePath));
1235
+ },
1236
+ /**
1237
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1238
+ * @summary Import products
1239
+ * @param {string} project What project it is
1240
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1241
+ * @param {*} [options] Override http request option.
1242
+ * @throws {RequiredError}
1243
+ */
1244
+ importProducts(project: string, body?: string, options?: any): AxiosPromise<ImportProducts200Response> {
1245
+ return localVarFp.importProducts(project, body, options).then((request) => request(axios, basePath));
1246
+ },
1247
+ /**
1248
+ * Updates a product by a given ID.
1249
+ * @summary Update product
1250
+ * @param {string} project What project it is
1251
+ * @param {string} productId Product\&#39;s unique identifier
1252
+ * @param {UpdateProductRequest} [updateProductRequest]
1253
+ * @param {*} [options] Override http request option.
1254
+ * @throws {RequiredError}
1255
+ */
1256
+ updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: any): AxiosPromise<Product> {
1257
+ return localVarFp.updateProduct(project, productId, updateProductRequest, options).then((request) => request(axios, basePath));
1258
+ },
1259
+ };
1260
+ };
1261
+
1262
+ /**
1263
+ * ProductsApi - object-oriented interface
1264
+ * @export
1265
+ * @class ProductsApi
1266
+ * @extends {BaseAPI}
1267
+ */
1268
+ export class ProductsApi extends BaseAPI {
1269
+ /**
1270
+ * Creates a new catalog product based on a given warehouse product with the variants and design applications provided. To select a warehouse product to base this product on, use the GFN Catalog API to list available options.
1271
+ * @summary Create product
1272
+ * @param {string} project What project it is
1273
+ * @param {CreateProductRequest} [createProductRequest]
1274
+ * @param {*} [options] Override http request option.
1275
+ * @throws {RequiredError}
1276
+ * @memberof ProductsApi
1277
+ */
1278
+ public createProduct(project: string, createProductRequest?: CreateProductRequest, options?: RawAxiosRequestConfig) {
1279
+ return ProductsApiFp(this.configuration).createProduct(project, createProductRequest, options).then((request) => request(this.axios, this.basePath));
1280
+ }
1281
+
1282
+ /**
1283
+ * Deletes a catalog product
1284
+ * @summary Delete catalog product
1285
+ * @param {string} project What project it is
1286
+ * @param {string} productId Product\&#39;s unique identifier
1287
+ * @param {*} [options] Override http request option.
1288
+ * @throws {RequiredError}
1289
+ * @memberof ProductsApi
1290
+ */
1291
+ public deleteProduct(project: string, productId: string, options?: RawAxiosRequestConfig) {
1292
+ return ProductsApiFp(this.configuration).deleteProduct(project, productId, options).then((request) => request(this.axios, this.basePath));
1293
+ }
1294
+
1295
+ /**
1296
+ * Gets a product by a given ID.
1297
+ * @summary Get product
1298
+ * @param {string} project What project it is
1299
+ * @param {string} productId Product\&#39;s unique identifier
1300
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1301
+ * @param {*} [options] Override http request option.
1302
+ * @throws {RequiredError}
1303
+ * @memberof ProductsApi
1304
+ */
1305
+ public getProduct(project: string, productId: string, fields?: string, options?: RawAxiosRequestConfig) {
1306
+ return ProductsApiFp(this.configuration).getProduct(project, productId, fields, options).then((request) => request(this.axios, this.basePath));
1307
+ }
1308
+
1309
+ /**
1310
+ * Lists all enabled store listing products attached to the given project.
1311
+ * @summary List products
1312
+ * @param {string} project What project it is
1313
+ * @param {number} [pageToken] Page reference token
1314
+ * @param {string} [search] Search term to filter based on product tags.
1315
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1316
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1317
+ * @param {*} [options] Override http request option.
1318
+ * @throws {RequiredError}
1319
+ * @memberof ProductsApi
1320
+ */
1321
+ public getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig) {
1322
+ return ProductsApiFp(this.configuration).getProducts(project, pageToken, search, pageSize, fields, options).then((request) => request(this.axios, this.basePath));
1323
+ }
1324
+
1325
+ /**
1326
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1327
+ * @summary Import products
1328
+ * @param {string} project What project it is
1329
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1330
+ * @param {*} [options] Override http request option.
1331
+ * @throws {RequiredError}
1332
+ * @memberof ProductsApi
1333
+ */
1334
+ public importProducts(project: string, body?: string, options?: RawAxiosRequestConfig) {
1335
+ return ProductsApiFp(this.configuration).importProducts(project, body, options).then((request) => request(this.axios, this.basePath));
1336
+ }
1337
+
1338
+ /**
1339
+ * Updates a product by a given ID.
1340
+ * @summary Update product
1341
+ * @param {string} project What project it is
1342
+ * @param {string} productId Product\&#39;s unique identifier
1343
+ * @param {UpdateProductRequest} [updateProductRequest]
1344
+ * @param {*} [options] Override http request option.
1345
+ * @throws {RequiredError}
1346
+ * @memberof ProductsApi
1347
+ */
1348
+ public updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: RawAxiosRequestConfig) {
1349
+ return ProductsApiFp(this.configuration).updateProduct(project, productId, updateProductRequest, options).then((request) => request(this.axios, this.basePath));
1350
+ }
1351
+ }
1352
+
1353
+
1354
+
1355
+ /**
1356
+ * VariantsApi - axios parameter creator
1357
+ * @export
1358
+ */
1359
+ export const VariantsApiAxiosParamCreator = function (configuration?: Configuration) {
1360
+ return {
1361
+ /**
1362
+ * Gets a variant by a given ID.
1363
+ * @summary Get variant
1364
+ * @param {string} project What project it is
1365
+ * @param {string} variantId Variants unique identifier
1366
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1367
+ * @param {*} [options] Override http request option.
1368
+ * @throws {RequiredError}
1369
+ */
1370
+ getVariant: async (project: string, variantId: string, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1371
+ // verify required parameter 'project' is not null or undefined
1372
+ assertParamExists('getVariant', 'project', project)
1373
+ // verify required parameter 'variantId' is not null or undefined
1374
+ assertParamExists('getVariant', 'variantId', variantId)
1375
+ const localVarPath = `/v1/catalog/variants/{variantId}`
1376
+ .replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
1377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1378
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1379
+ let baseOptions;
1380
+ if (configuration) {
1381
+ baseOptions = configuration.baseOptions;
1382
+ }
1383
+
1384
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1385
+ const localVarHeaderParameter = {} as any;
1386
+ const localVarQueryParameter = {} as any;
1387
+
1388
+ // authentication session-oauth required
1389
+ // oauth required
1390
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1391
+
1392
+ // authentication api-key required
1393
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1394
+
1395
+ if (project !== undefined) {
1396
+ localVarQueryParameter['project'] = project;
1397
+ }
1398
+
1399
+ if (fields !== undefined) {
1400
+ localVarQueryParameter['fields'] = fields;
1401
+ }
1402
+
1403
+
1404
+
1405
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1406
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1407
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1408
+
1409
+ return {
1410
+ url: toPathString(localVarUrlObj),
1411
+ options: localVarRequestOptions,
1412
+ };
1413
+ },
1414
+ /**
1415
+ * Lists all variants that belong to enabled products attached to the given project.
1416
+ * @summary List variants
1417
+ * @param {string} project What project it is
1418
+ * @param {string} [search] Search term to filter based on product tags.
1419
+ * @param {number} [pageToken] Page reference token
1420
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1421
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1422
+ * @param {*} [options] Override http request option.
1423
+ * @throws {RequiredError}
1424
+ */
1425
+ listVariants: async (project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1426
+ // verify required parameter 'project' is not null or undefined
1427
+ assertParamExists('listVariants', 'project', project)
1428
+ const localVarPath = `/v1/catalog/variants`;
1429
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1430
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1431
+ let baseOptions;
1432
+ if (configuration) {
1433
+ baseOptions = configuration.baseOptions;
1434
+ }
1435
+
1436
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1437
+ const localVarHeaderParameter = {} as any;
1438
+ const localVarQueryParameter = {} as any;
1439
+
1440
+ // authentication session-oauth required
1441
+ // oauth required
1442
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1443
+
1444
+ // authentication api-key required
1445
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1446
+
1447
+ if (project !== undefined) {
1448
+ localVarQueryParameter['project'] = project;
1449
+ }
1450
+
1451
+ if (search !== undefined) {
1452
+ localVarQueryParameter['search'] = search;
1453
+ }
1454
+
1455
+ if (pageToken !== undefined) {
1456
+ localVarQueryParameter['pageToken'] = pageToken;
1457
+ }
1458
+
1459
+ if (pageSize !== undefined) {
1460
+ localVarQueryParameter['pageSize'] = pageSize;
1461
+ }
1462
+
1463
+ if (fields !== undefined) {
1464
+ localVarQueryParameter['fields'] = fields;
1465
+ }
1466
+
1467
+
1468
+
1469
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1470
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1471
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1472
+
1473
+ return {
1474
+ url: toPathString(localVarUrlObj),
1475
+ options: localVarRequestOptions,
1476
+ };
1477
+ },
1478
+ }
1479
+ };
1480
+
1481
+ /**
1482
+ * VariantsApi - functional programming interface
1483
+ * @export
1484
+ */
1485
+ export const VariantsApiFp = function(configuration?: Configuration) {
1486
+ const localVarAxiosParamCreator = VariantsApiAxiosParamCreator(configuration)
1487
+ return {
1488
+ /**
1489
+ * Gets a variant by a given ID.
1490
+ * @summary Get variant
1491
+ * @param {string} project What project it is
1492
+ * @param {string} variantId Variants unique identifier
1493
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1494
+ * @param {*} [options] Override http request option.
1495
+ * @throws {RequiredError}
1496
+ */
1497
+ async getVariant(project: string, variantId: string, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Variant>> {
1498
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVariant(project, variantId, fields, options);
1499
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1500
+ const localVarOperationServerBasePath = operationServerMap['VariantsApi.getVariant']?.[localVarOperationServerIndex]?.url;
1501
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1502
+ },
1503
+ /**
1504
+ * Lists all variants that belong to enabled products attached to the given project.
1505
+ * @summary List variants
1506
+ * @param {string} project What project it is
1507
+ * @param {string} [search] Search term to filter based on product tags.
1508
+ * @param {number} [pageToken] Page reference token
1509
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1510
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1511
+ * @param {*} [options] Override http request option.
1512
+ * @throws {RequiredError}
1513
+ */
1514
+ async listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VariantsResponse>> {
1515
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listVariants(project, search, pageToken, pageSize, fields, options);
1516
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1517
+ const localVarOperationServerBasePath = operationServerMap['VariantsApi.listVariants']?.[localVarOperationServerIndex]?.url;
1518
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1519
+ },
1520
+ }
1521
+ };
1522
+
1523
+ /**
1524
+ * VariantsApi - factory interface
1525
+ * @export
1526
+ */
1527
+ export const VariantsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1528
+ const localVarFp = VariantsApiFp(configuration)
1529
+ return {
1530
+ /**
1531
+ * Gets a variant by a given ID.
1532
+ * @summary Get variant
1533
+ * @param {string} project What project it is
1534
+ * @param {string} variantId Variants unique identifier
1535
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1536
+ * @param {*} [options] Override http request option.
1537
+ * @throws {RequiredError}
1538
+ */
1539
+ getVariant(project: string, variantId: string, fields?: string, options?: any): AxiosPromise<Variant> {
1540
+ return localVarFp.getVariant(project, variantId, fields, options).then((request) => request(axios, basePath));
1541
+ },
1542
+ /**
1543
+ * Lists all variants that belong to enabled products attached to the given project.
1544
+ * @summary List variants
1545
+ * @param {string} project What project it is
1546
+ * @param {string} [search] Search term to filter based on product tags.
1547
+ * @param {number} [pageToken] Page reference token
1548
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1549
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1550
+ * @param {*} [options] Override http request option.
1551
+ * @throws {RequiredError}
1552
+ */
1553
+ listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: any): AxiosPromise<VariantsResponse> {
1554
+ return localVarFp.listVariants(project, search, pageToken, pageSize, fields, options).then((request) => request(axios, basePath));
1555
+ },
1556
+ };
1557
+ };
1558
+
1559
+ /**
1560
+ * VariantsApi - object-oriented interface
1561
+ * @export
1562
+ * @class VariantsApi
1563
+ * @extends {BaseAPI}
1564
+ */
1565
+ export class VariantsApi extends BaseAPI {
1566
+ /**
1567
+ * Gets a variant by a given ID.
1568
+ * @summary Get variant
1569
+ * @param {string} project What project it is
1570
+ * @param {string} variantId Variants unique identifier
1571
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1572
+ * @param {*} [options] Override http request option.
1573
+ * @throws {RequiredError}
1574
+ * @memberof VariantsApi
1575
+ */
1576
+ public getVariant(project: string, variantId: string, fields?: string, options?: RawAxiosRequestConfig) {
1577
+ return VariantsApiFp(this.configuration).getVariant(project, variantId, fields, options).then((request) => request(this.axios, this.basePath));
1578
+ }
1579
+
1580
+ /**
1581
+ * Lists all variants that belong to enabled products attached to the given project.
1582
+ * @summary List variants
1583
+ * @param {string} project What project it is
1584
+ * @param {string} [search] Search term to filter based on product tags.
1585
+ * @param {number} [pageToken] Page reference token
1586
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1587
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1588
+ * @param {*} [options] Override http request option.
1589
+ * @throws {RequiredError}
1590
+ * @memberof VariantsApi
1591
+ */
1592
+ public listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig) {
1593
+ return VariantsApiFp(this.configuration).listVariants(project, search, pageToken, pageSize, fields, options).then((request) => request(this.axios, this.basePath));
1594
+ }
1595
+ }
1596
+
1597
+
1598
+