@teemill/product-catalog 1.11.1 → 1.12.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 +7 -29
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1592 -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 +1120 -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 +1120 -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,1592 @@
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.12.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 Attribute
49
+ */
50
+ export interface Attribute {
51
+ /**
52
+ * Attribute name
53
+ * @type {string}
54
+ * @memberof Attribute
55
+ */
56
+ 'name': string;
57
+ /**
58
+ * Attribute value
59
+ * @type {string}
60
+ * @memberof Attribute
61
+ */
62
+ 'value': string;
63
+ /**
64
+ *
65
+ * @type {AttributeThumbnail}
66
+ * @memberof Attribute
67
+ */
68
+ 'thumbnail'?: AttributeThumbnail;
69
+ /**
70
+ * Attribute tags
71
+ * @type {Array<string>}
72
+ * @memberof Attribute
73
+ */
74
+ 'tags'?: Array<string>;
75
+ }
76
+ /**
77
+ * Attribute thumbnail, intended for interfaces like storefront colour selector.
78
+ * @export
79
+ * @interface AttributeThumbnail
80
+ */
81
+ export interface AttributeThumbnail {
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof AttributeThumbnail
86
+ */
87
+ 'type'?: AttributeThumbnailTypeEnum;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof AttributeThumbnail
92
+ */
93
+ 'value'?: string;
94
+ }
95
+
96
+ export const AttributeThumbnailTypeEnum = {
97
+ Text: 'text',
98
+ Color: 'color',
99
+ Image: 'image'
100
+ } as const;
101
+
102
+ export type AttributeThumbnailTypeEnum = typeof AttributeThumbnailTypeEnum[keyof typeof AttributeThumbnailTypeEnum];
103
+
104
+ /**
105
+ *
106
+ * @export
107
+ * @interface CreateProductRequest
108
+ */
109
+ export interface CreateProductRequest {
110
+ /**
111
+ * 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.
112
+ * @type {string}
113
+ * @memberof CreateProductRequest
114
+ */
115
+ 'gfnProductRef': string;
116
+ /**
117
+ * Product title
118
+ * @type {string}
119
+ * @memberof CreateProductRequest
120
+ */
121
+ 'title'?: string;
122
+ /**
123
+ * Product description
124
+ * @type {string}
125
+ * @memberof CreateProductRequest
126
+ */
127
+ 'description'?: string;
128
+ /**
129
+ * Whether the product is enabled upon creation.
130
+ * @type {boolean}
131
+ * @memberof CreateProductRequest
132
+ */
133
+ 'enabled'?: boolean;
134
+ /**
135
+ * A custom URL slug for the product. This must be unique for each product on the project.
136
+ * @type {string}
137
+ * @memberof CreateProductRequest
138
+ */
139
+ 'slug'?: string;
140
+ /**
141
+ *
142
+ * @type {CreateProductRequestSeoMetadata}
143
+ * @memberof CreateProductRequest
144
+ */
145
+ 'seoMetadata'?: CreateProductRequestSeoMetadata;
146
+ /**
147
+ * Additional product tags used for searching and filtering.
148
+ * @type {Array<string>}
149
+ * @memberof CreateProductRequest
150
+ */
151
+ 'tags'?: Array<string>;
152
+ /**
153
+ * Variants
154
+ * @type {Array<CreateProductVariant>}
155
+ * @memberof CreateProductRequest
156
+ */
157
+ 'variants': Array<CreateProductVariant>;
158
+ /**
159
+ * Images to attach to the product. For example, photos of models using/wearing the product.
160
+ * @type {Array<CreateProductRequestImagesInner>}
161
+ * @memberof CreateProductRequest
162
+ */
163
+ 'images'?: Array<CreateProductRequestImagesInner>;
164
+ /**
165
+ * Additional files to attach to the product. For example, original design files e.g. PSD, AI, etc.
166
+ * @type {Array<CreateProductRequestImagesInner>}
167
+ * @memberof CreateProductRequest
168
+ */
169
+ 'additionalFiles'?: Array<CreateProductRequestImagesInner>;
170
+ }
171
+ /**
172
+ *
173
+ * @export
174
+ * @interface CreateProductRequestImagesInner
175
+ */
176
+ export interface CreateProductRequestImagesInner {
177
+ /**
178
+ * Publicly available file URL.
179
+ * @type {string}
180
+ * @memberof CreateProductRequestImagesInner
181
+ */
182
+ 'src'?: string;
183
+ }
184
+ /**
185
+ *
186
+ * @export
187
+ * @interface CreateProductRequestSeoMetadata
188
+ */
189
+ export interface CreateProductRequestSeoMetadata {
190
+ /**
191
+ * Meta title for the product. This appears in search engine results and social shares. If not provided, the product title will be used.
192
+ * @type {string}
193
+ * @memberof CreateProductRequestSeoMetadata
194
+ */
195
+ 'title'?: string;
196
+ }
197
+ /**
198
+ *
199
+ * @export
200
+ * @interface CreateProductVariant
201
+ */
202
+ export interface CreateProductVariant {
203
+ /**
204
+ * Attributes associated to a variant such as Colour and Size.
205
+ * @type {Array<CreateProductVariantAttributesInner>}
206
+ * @memberof CreateProductVariant
207
+ */
208
+ 'attributes': Array<CreateProductVariantAttributesInner>;
209
+ /**
210
+ *
211
+ * @type {CreateProductVariantRetailPrice}
212
+ * @memberof CreateProductVariant
213
+ */
214
+ 'retailPrice': CreateProductVariantRetailPrice;
215
+ /**
216
+ * A custom stock keeping unit for the variant.
217
+ * @type {string}
218
+ * @memberof CreateProductVariant
219
+ */
220
+ 'sku'?: string;
221
+ /**
222
+ * Design applications. If not provided, the product will be blank.
223
+ * @type {Array<CreateProductVariantApplicationsInner>}
224
+ * @memberof CreateProductVariant
225
+ */
226
+ 'applications'?: Array<CreateProductVariantApplicationsInner>;
227
+ /**
228
+ * 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.
229
+ * @type {Array<CreateProductRequestImagesInner>}
230
+ * @memberof CreateProductVariant
231
+ */
232
+ 'images'?: Array<CreateProductRequestImagesInner>;
233
+ }
234
+ /**
235
+ *
236
+ * @export
237
+ * @interface CreateProductVariantApplicationsInner
238
+ */
239
+ export interface CreateProductVariantApplicationsInner {
240
+ /**
241
+ * Technology to use for the application.
242
+ * @type {string}
243
+ * @memberof CreateProductVariantApplicationsInner
244
+ */
245
+ 'technology': string;
246
+ /**
247
+ * Placement of the application. Available placements depend on the chosen product and technology.
248
+ * @type {string}
249
+ * @memberof CreateProductVariantApplicationsInner
250
+ */
251
+ 'placement': CreateProductVariantApplicationsInnerPlacementEnum;
252
+ /**
253
+ * 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.
254
+ * @type {string}
255
+ * @memberof CreateProductVariantApplicationsInner
256
+ */
257
+ 'src': string;
258
+ }
259
+
260
+ export const CreateProductVariantApplicationsInnerPlacementEnum = {
261
+ Front: 'front',
262
+ Back: 'back',
263
+ Left: 'left',
264
+ Right: 'right',
265
+ Neck: 'neck'
266
+ } as const;
267
+
268
+ export type CreateProductVariantApplicationsInnerPlacementEnum = typeof CreateProductVariantApplicationsInnerPlacementEnum[keyof typeof CreateProductVariantApplicationsInnerPlacementEnum];
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
+ /**
716
+ *
717
+ * @export
718
+ * @interface VariantProduct
719
+ */
720
+ export interface VariantProduct {
721
+ /**
722
+ * Unique object identifier
723
+ * @type {string}
724
+ * @memberof VariantProduct
725
+ */
726
+ 'id'?: string;
727
+ /**
728
+ * A reference to the resource location
729
+ * @type {string}
730
+ * @memberof VariantProduct
731
+ */
732
+ 'ref'?: string;
733
+ }
734
+ /**
735
+ *
736
+ * @export
737
+ * @interface VariantsResponse
738
+ */
739
+ export interface VariantsResponse {
740
+ /**
741
+ *
742
+ * @type {Array<Variant>}
743
+ * @memberof VariantsResponse
744
+ */
745
+ 'variants'?: Array<Variant>;
746
+ /**
747
+ *
748
+ * @type {number}
749
+ * @memberof VariantsResponse
750
+ */
751
+ 'nextPageToken'?: number;
752
+ }
753
+
754
+ /**
755
+ * ProductsApi - axios parameter creator
756
+ * @export
757
+ */
758
+ export const ProductsApiAxiosParamCreator = function (configuration?: Configuration) {
759
+ return {
760
+ /**
761
+ * 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.
762
+ * @summary Create product
763
+ * @param {string} project What project it is
764
+ * @param {CreateProductRequest} [createProductRequest]
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ createProduct: async (project: string, createProductRequest?: CreateProductRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
769
+ // verify required parameter 'project' is not null or undefined
770
+ assertParamExists('createProduct', 'project', project)
771
+ const localVarPath = `/v1/catalog/products`;
772
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
773
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
774
+ let baseOptions;
775
+ if (configuration) {
776
+ baseOptions = configuration.baseOptions;
777
+ }
778
+
779
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
780
+ const localVarHeaderParameter = {} as any;
781
+ const localVarQueryParameter = {} as any;
782
+
783
+ // authentication session-oauth required
784
+ // oauth required
785
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
786
+
787
+ // authentication api-key required
788
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
789
+
790
+ if (project !== undefined) {
791
+ localVarQueryParameter['project'] = project;
792
+ }
793
+
794
+
795
+
796
+ localVarHeaderParameter['Content-Type'] = 'application/json';
797
+
798
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
799
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
800
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
801
+ localVarRequestOptions.data = serializeDataIfNeeded(createProductRequest, localVarRequestOptions, configuration)
802
+
803
+ return {
804
+ url: toPathString(localVarUrlObj),
805
+ options: localVarRequestOptions,
806
+ };
807
+ },
808
+ /**
809
+ * Deletes a catalog product
810
+ * @summary Delete catalog product
811
+ * @param {string} project What project it is
812
+ * @param {string} productId Product\&#39;s unique identifier
813
+ * @param {*} [options] Override http request option.
814
+ * @throws {RequiredError}
815
+ */
816
+ deleteProduct: async (project: string, productId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
817
+ // verify required parameter 'project' is not null or undefined
818
+ assertParamExists('deleteProduct', 'project', project)
819
+ // verify required parameter 'productId' is not null or undefined
820
+ assertParamExists('deleteProduct', 'productId', productId)
821
+ const localVarPath = `/v1/catalog/products/{productId}`
822
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
823
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
824
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
825
+ let baseOptions;
826
+ if (configuration) {
827
+ baseOptions = configuration.baseOptions;
828
+ }
829
+
830
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
831
+ const localVarHeaderParameter = {} as any;
832
+ const localVarQueryParameter = {} as any;
833
+
834
+ // authentication session-oauth required
835
+ // oauth required
836
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
837
+
838
+ // authentication api-key required
839
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
840
+
841
+ if (project !== undefined) {
842
+ localVarQueryParameter['project'] = project;
843
+ }
844
+
845
+
846
+
847
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
848
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
849
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
850
+
851
+ return {
852
+ url: toPathString(localVarUrlObj),
853
+ options: localVarRequestOptions,
854
+ };
855
+ },
856
+ /**
857
+ * Gets a product by a given ID.
858
+ * @summary Get product
859
+ * @param {string} project What project it is
860
+ * @param {string} productId Product\&#39;s unique identifier
861
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
862
+ * @param {*} [options] Override http request option.
863
+ * @throws {RequiredError}
864
+ */
865
+ getProduct: async (project: string, productId: string, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
866
+ // verify required parameter 'project' is not null or undefined
867
+ assertParamExists('getProduct', 'project', project)
868
+ // verify required parameter 'productId' is not null or undefined
869
+ assertParamExists('getProduct', 'productId', productId)
870
+ const localVarPath = `/v1/catalog/products/{productId}`
871
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
872
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
873
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
874
+ let baseOptions;
875
+ if (configuration) {
876
+ baseOptions = configuration.baseOptions;
877
+ }
878
+
879
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
880
+ const localVarHeaderParameter = {} as any;
881
+ const localVarQueryParameter = {} as any;
882
+
883
+ // authentication session-oauth required
884
+ // oauth required
885
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
886
+
887
+ // authentication api-key required
888
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
889
+
890
+ if (project !== undefined) {
891
+ localVarQueryParameter['project'] = project;
892
+ }
893
+
894
+ if (fields !== undefined) {
895
+ localVarQueryParameter['fields'] = fields;
896
+ }
897
+
898
+
899
+
900
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
901
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
902
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
903
+
904
+ return {
905
+ url: toPathString(localVarUrlObj),
906
+ options: localVarRequestOptions,
907
+ };
908
+ },
909
+ /**
910
+ * Lists all enabled store listing products attached to the given project.
911
+ * @summary List products
912
+ * @param {string} project What project it is
913
+ * @param {number} [pageToken] Page reference token
914
+ * @param {string} [search] Search term to filter based on product tags.
915
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
916
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
917
+ * @param {*} [options] Override http request option.
918
+ * @throws {RequiredError}
919
+ */
920
+ getProducts: async (project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
921
+ // verify required parameter 'project' is not null or undefined
922
+ assertParamExists('getProducts', 'project', project)
923
+ const localVarPath = `/v1/catalog/products`;
924
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
925
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
926
+ let baseOptions;
927
+ if (configuration) {
928
+ baseOptions = configuration.baseOptions;
929
+ }
930
+
931
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
932
+ const localVarHeaderParameter = {} as any;
933
+ const localVarQueryParameter = {} as any;
934
+
935
+ // authentication session-oauth required
936
+ // oauth required
937
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
938
+
939
+ // authentication api-key required
940
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
941
+
942
+ if (project !== undefined) {
943
+ localVarQueryParameter['project'] = project;
944
+ }
945
+
946
+ if (pageToken !== undefined) {
947
+ localVarQueryParameter['pageToken'] = pageToken;
948
+ }
949
+
950
+ if (search !== undefined) {
951
+ localVarQueryParameter['search'] = search;
952
+ }
953
+
954
+ if (pageSize !== undefined) {
955
+ localVarQueryParameter['pageSize'] = pageSize;
956
+ }
957
+
958
+ if (fields !== undefined) {
959
+ localVarQueryParameter['fields'] = fields;
960
+ }
961
+
962
+
963
+
964
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
965
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
966
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
967
+
968
+ return {
969
+ url: toPathString(localVarUrlObj),
970
+ options: localVarRequestOptions,
971
+ };
972
+ },
973
+ /**
974
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
975
+ * @summary Import products
976
+ * @param {string} project What project it is
977
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
978
+ * @param {*} [options] Override http request option.
979
+ * @throws {RequiredError}
980
+ */
981
+ importProducts: async (project: string, body?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
982
+ // verify required parameter 'project' is not null or undefined
983
+ assertParamExists('importProducts', 'project', project)
984
+ const localVarPath = `/v1/catalog/products/import`;
985
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
986
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
987
+ let baseOptions;
988
+ if (configuration) {
989
+ baseOptions = configuration.baseOptions;
990
+ }
991
+
992
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
993
+ const localVarHeaderParameter = {} as any;
994
+ const localVarQueryParameter = {} as any;
995
+
996
+ // authentication session-oauth required
997
+ // oauth required
998
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
999
+
1000
+ // authentication api-key required
1001
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1002
+
1003
+ if (project !== undefined) {
1004
+ localVarQueryParameter['project'] = project;
1005
+ }
1006
+
1007
+
1008
+
1009
+ localVarHeaderParameter['Content-Type'] = 'text/csv';
1010
+
1011
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1013
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1014
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
1015
+
1016
+ return {
1017
+ url: toPathString(localVarUrlObj),
1018
+ options: localVarRequestOptions,
1019
+ };
1020
+ },
1021
+ /**
1022
+ * Updates a product by a given ID.
1023
+ * @summary Update product
1024
+ * @param {string} project What project it is
1025
+ * @param {string} productId Product\&#39;s unique identifier
1026
+ * @param {UpdateProductRequest} [updateProductRequest]
1027
+ * @param {*} [options] Override http request option.
1028
+ * @throws {RequiredError}
1029
+ */
1030
+ updateProduct: async (project: string, productId: string, updateProductRequest?: UpdateProductRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1031
+ // verify required parameter 'project' is not null or undefined
1032
+ assertParamExists('updateProduct', 'project', project)
1033
+ // verify required parameter 'productId' is not null or undefined
1034
+ assertParamExists('updateProduct', 'productId', productId)
1035
+ const localVarPath = `/v1/catalog/products/{productId}`
1036
+ .replace(`{${"productId"}}`, encodeURIComponent(String(productId)));
1037
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1038
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1039
+ let baseOptions;
1040
+ if (configuration) {
1041
+ baseOptions = configuration.baseOptions;
1042
+ }
1043
+
1044
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
1045
+ const localVarHeaderParameter = {} as any;
1046
+ const localVarQueryParameter = {} as any;
1047
+
1048
+ // authentication session-oauth required
1049
+ // oauth required
1050
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1051
+
1052
+ // authentication api-key required
1053
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1054
+
1055
+ if (project !== undefined) {
1056
+ localVarQueryParameter['project'] = project;
1057
+ }
1058
+
1059
+
1060
+
1061
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1062
+
1063
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1064
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1065
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1066
+ localVarRequestOptions.data = serializeDataIfNeeded(updateProductRequest, localVarRequestOptions, configuration)
1067
+
1068
+ return {
1069
+ url: toPathString(localVarUrlObj),
1070
+ options: localVarRequestOptions,
1071
+ };
1072
+ },
1073
+ }
1074
+ };
1075
+
1076
+ /**
1077
+ * ProductsApi - functional programming interface
1078
+ * @export
1079
+ */
1080
+ export const ProductsApiFp = function(configuration?: Configuration) {
1081
+ const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration)
1082
+ return {
1083
+ /**
1084
+ * 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.
1085
+ * @summary Create product
1086
+ * @param {string} project What project it is
1087
+ * @param {CreateProductRequest} [createProductRequest]
1088
+ * @param {*} [options] Override http request option.
1089
+ * @throws {RequiredError}
1090
+ */
1091
+ async createProduct(project: string, createProductRequest?: CreateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1092
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createProduct(project, createProductRequest, options);
1093
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1094
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.createProduct']?.[localVarOperationServerIndex]?.url;
1095
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1096
+ },
1097
+ /**
1098
+ * Deletes a catalog product
1099
+ * @summary Delete catalog product
1100
+ * @param {string} project What project it is
1101
+ * @param {string} productId Product\&#39;s unique identifier
1102
+ * @param {*} [options] Override http request option.
1103
+ * @throws {RequiredError}
1104
+ */
1105
+ async deleteProduct(project: string, productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
1106
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteProduct(project, productId, options);
1107
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1108
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.deleteProduct']?.[localVarOperationServerIndex]?.url;
1109
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1110
+ },
1111
+ /**
1112
+ * Gets a product by a given ID.
1113
+ * @summary Get product
1114
+ * @param {string} project What project it is
1115
+ * @param {string} productId Product\&#39;s unique identifier
1116
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1117
+ * @param {*} [options] Override http request option.
1118
+ * @throws {RequiredError}
1119
+ */
1120
+ async getProduct(project: string, productId: string, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1121
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProduct(project, productId, fields, options);
1122
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1123
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.getProduct']?.[localVarOperationServerIndex]?.url;
1124
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1125
+ },
1126
+ /**
1127
+ * Lists all enabled store listing products attached to the given project.
1128
+ * @summary List products
1129
+ * @param {string} project What project it is
1130
+ * @param {number} [pageToken] Page reference token
1131
+ * @param {string} [search] Search term to filter based on product tags.
1132
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1133
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ */
1137
+ async getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ProductsResponse>> {
1138
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(project, pageToken, search, pageSize, fields, options);
1139
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1140
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.getProducts']?.[localVarOperationServerIndex]?.url;
1141
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1142
+ },
1143
+ /**
1144
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1145
+ * @summary Import products
1146
+ * @param {string} project What project it is
1147
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1148
+ * @param {*} [options] Override http request option.
1149
+ * @throws {RequiredError}
1150
+ */
1151
+ async importProducts(project: string, body?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ImportProducts200Response>> {
1152
+ const localVarAxiosArgs = await localVarAxiosParamCreator.importProducts(project, body, options);
1153
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1154
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.importProducts']?.[localVarOperationServerIndex]?.url;
1155
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1156
+ },
1157
+ /**
1158
+ * Updates a product by a given ID.
1159
+ * @summary Update product
1160
+ * @param {string} project What project it is
1161
+ * @param {string} productId Product\&#39;s unique identifier
1162
+ * @param {UpdateProductRequest} [updateProductRequest]
1163
+ * @param {*} [options] Override http request option.
1164
+ * @throws {RequiredError}
1165
+ */
1166
+ async updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Product>> {
1167
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateProduct(project, productId, updateProductRequest, options);
1168
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1169
+ const localVarOperationServerBasePath = operationServerMap['ProductsApi.updateProduct']?.[localVarOperationServerIndex]?.url;
1170
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1171
+ },
1172
+ }
1173
+ };
1174
+
1175
+ /**
1176
+ * ProductsApi - factory interface
1177
+ * @export
1178
+ */
1179
+ export const ProductsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1180
+ const localVarFp = ProductsApiFp(configuration)
1181
+ return {
1182
+ /**
1183
+ * 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.
1184
+ * @summary Create product
1185
+ * @param {string} project What project it is
1186
+ * @param {CreateProductRequest} [createProductRequest]
1187
+ * @param {*} [options] Override http request option.
1188
+ * @throws {RequiredError}
1189
+ */
1190
+ createProduct(project: string, createProductRequest?: CreateProductRequest, options?: any): AxiosPromise<Product> {
1191
+ return localVarFp.createProduct(project, createProductRequest, options).then((request) => request(axios, basePath));
1192
+ },
1193
+ /**
1194
+ * Deletes a catalog product
1195
+ * @summary Delete catalog product
1196
+ * @param {string} project What project it is
1197
+ * @param {string} productId Product\&#39;s unique identifier
1198
+ * @param {*} [options] Override http request option.
1199
+ * @throws {RequiredError}
1200
+ */
1201
+ deleteProduct(project: string, productId: string, options?: any): AxiosPromise<void> {
1202
+ return localVarFp.deleteProduct(project, productId, options).then((request) => request(axios, basePath));
1203
+ },
1204
+ /**
1205
+ * Gets a product by a given ID.
1206
+ * @summary Get product
1207
+ * @param {string} project What project it is
1208
+ * @param {string} productId Product\&#39;s unique identifier
1209
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1210
+ * @param {*} [options] Override http request option.
1211
+ * @throws {RequiredError}
1212
+ */
1213
+ getProduct(project: string, productId: string, fields?: string, options?: any): AxiosPromise<Product> {
1214
+ return localVarFp.getProduct(project, productId, fields, options).then((request) => request(axios, basePath));
1215
+ },
1216
+ /**
1217
+ * Lists all enabled store listing products attached to the given project.
1218
+ * @summary List products
1219
+ * @param {string} project What project it is
1220
+ * @param {number} [pageToken] Page reference token
1221
+ * @param {string} [search] Search term to filter based on product tags.
1222
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1223
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: any): AxiosPromise<ProductsResponse> {
1228
+ return localVarFp.getProducts(project, pageToken, search, pageSize, fields, options).then((request) => request(axios, basePath));
1229
+ },
1230
+ /**
1231
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1232
+ * @summary Import products
1233
+ * @param {string} project What project it is
1234
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1235
+ * @param {*} [options] Override http request option.
1236
+ * @throws {RequiredError}
1237
+ */
1238
+ importProducts(project: string, body?: string, options?: any): AxiosPromise<ImportProducts200Response> {
1239
+ return localVarFp.importProducts(project, body, options).then((request) => request(axios, basePath));
1240
+ },
1241
+ /**
1242
+ * Updates a product by a given ID.
1243
+ * @summary Update product
1244
+ * @param {string} project What project it is
1245
+ * @param {string} productId Product\&#39;s unique identifier
1246
+ * @param {UpdateProductRequest} [updateProductRequest]
1247
+ * @param {*} [options] Override http request option.
1248
+ * @throws {RequiredError}
1249
+ */
1250
+ updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: any): AxiosPromise<Product> {
1251
+ return localVarFp.updateProduct(project, productId, updateProductRequest, options).then((request) => request(axios, basePath));
1252
+ },
1253
+ };
1254
+ };
1255
+
1256
+ /**
1257
+ * ProductsApi - object-oriented interface
1258
+ * @export
1259
+ * @class ProductsApi
1260
+ * @extends {BaseAPI}
1261
+ */
1262
+ export class ProductsApi extends BaseAPI {
1263
+ /**
1264
+ * 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.
1265
+ * @summary Create product
1266
+ * @param {string} project What project it is
1267
+ * @param {CreateProductRequest} [createProductRequest]
1268
+ * @param {*} [options] Override http request option.
1269
+ * @throws {RequiredError}
1270
+ * @memberof ProductsApi
1271
+ */
1272
+ public createProduct(project: string, createProductRequest?: CreateProductRequest, options?: RawAxiosRequestConfig) {
1273
+ return ProductsApiFp(this.configuration).createProduct(project, createProductRequest, options).then((request) => request(this.axios, this.basePath));
1274
+ }
1275
+
1276
+ /**
1277
+ * Deletes a catalog product
1278
+ * @summary Delete catalog product
1279
+ * @param {string} project What project it is
1280
+ * @param {string} productId Product\&#39;s unique identifier
1281
+ * @param {*} [options] Override http request option.
1282
+ * @throws {RequiredError}
1283
+ * @memberof ProductsApi
1284
+ */
1285
+ public deleteProduct(project: string, productId: string, options?: RawAxiosRequestConfig) {
1286
+ return ProductsApiFp(this.configuration).deleteProduct(project, productId, options).then((request) => request(this.axios, this.basePath));
1287
+ }
1288
+
1289
+ /**
1290
+ * Gets a product by a given ID.
1291
+ * @summary Get product
1292
+ * @param {string} project What project it is
1293
+ * @param {string} productId Product\&#39;s unique identifier
1294
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1295
+ * @param {*} [options] Override http request option.
1296
+ * @throws {RequiredError}
1297
+ * @memberof ProductsApi
1298
+ */
1299
+ public getProduct(project: string, productId: string, fields?: string, options?: RawAxiosRequestConfig) {
1300
+ return ProductsApiFp(this.configuration).getProduct(project, productId, fields, options).then((request) => request(this.axios, this.basePath));
1301
+ }
1302
+
1303
+ /**
1304
+ * Lists all enabled store listing products attached to the given project.
1305
+ * @summary List products
1306
+ * @param {string} project What project it is
1307
+ * @param {number} [pageToken] Page reference token
1308
+ * @param {string} [search] Search term to filter based on product tags.
1309
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1310
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1311
+ * @param {*} [options] Override http request option.
1312
+ * @throws {RequiredError}
1313
+ * @memberof ProductsApi
1314
+ */
1315
+ public getProducts(project: string, pageToken?: number, search?: string, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig) {
1316
+ return ProductsApiFp(this.configuration).getProducts(project, pageToken, search, pageSize, fields, options).then((request) => request(this.axios, this.basePath));
1317
+ }
1318
+
1319
+ /**
1320
+ * Initiates a product import from a CSV file. The result will be available as a notification within the dashboard.
1321
+ * @summary Import products
1322
+ * @param {string} project What project it is
1323
+ * @param {string} [body] A data URL of a CSV file containing data for one or more products.
1324
+ * @param {*} [options] Override http request option.
1325
+ * @throws {RequiredError}
1326
+ * @memberof ProductsApi
1327
+ */
1328
+ public importProducts(project: string, body?: string, options?: RawAxiosRequestConfig) {
1329
+ return ProductsApiFp(this.configuration).importProducts(project, body, options).then((request) => request(this.axios, this.basePath));
1330
+ }
1331
+
1332
+ /**
1333
+ * Updates a product by a given ID.
1334
+ * @summary Update product
1335
+ * @param {string} project What project it is
1336
+ * @param {string} productId Product\&#39;s unique identifier
1337
+ * @param {UpdateProductRequest} [updateProductRequest]
1338
+ * @param {*} [options] Override http request option.
1339
+ * @throws {RequiredError}
1340
+ * @memberof ProductsApi
1341
+ */
1342
+ public updateProduct(project: string, productId: string, updateProductRequest?: UpdateProductRequest, options?: RawAxiosRequestConfig) {
1343
+ return ProductsApiFp(this.configuration).updateProduct(project, productId, updateProductRequest, options).then((request) => request(this.axios, this.basePath));
1344
+ }
1345
+ }
1346
+
1347
+
1348
+
1349
+ /**
1350
+ * VariantsApi - axios parameter creator
1351
+ * @export
1352
+ */
1353
+ export const VariantsApiAxiosParamCreator = function (configuration?: Configuration) {
1354
+ return {
1355
+ /**
1356
+ * Gets a variant by a given ID.
1357
+ * @summary Get variant
1358
+ * @param {string} project What project it is
1359
+ * @param {string} variantId Variants unique identifier
1360
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1361
+ * @param {*} [options] Override http request option.
1362
+ * @throws {RequiredError}
1363
+ */
1364
+ getVariant: async (project: string, variantId: string, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1365
+ // verify required parameter 'project' is not null or undefined
1366
+ assertParamExists('getVariant', 'project', project)
1367
+ // verify required parameter 'variantId' is not null or undefined
1368
+ assertParamExists('getVariant', 'variantId', variantId)
1369
+ const localVarPath = `/v1/catalog/variants/{variantId}`
1370
+ .replace(`{${"variantId"}}`, encodeURIComponent(String(variantId)));
1371
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1372
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1373
+ let baseOptions;
1374
+ if (configuration) {
1375
+ baseOptions = configuration.baseOptions;
1376
+ }
1377
+
1378
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1379
+ const localVarHeaderParameter = {} as any;
1380
+ const localVarQueryParameter = {} as any;
1381
+
1382
+ // authentication session-oauth required
1383
+ // oauth required
1384
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1385
+
1386
+ // authentication api-key required
1387
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1388
+
1389
+ if (project !== undefined) {
1390
+ localVarQueryParameter['project'] = project;
1391
+ }
1392
+
1393
+ if (fields !== undefined) {
1394
+ localVarQueryParameter['fields'] = fields;
1395
+ }
1396
+
1397
+
1398
+
1399
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1400
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1401
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1402
+
1403
+ return {
1404
+ url: toPathString(localVarUrlObj),
1405
+ options: localVarRequestOptions,
1406
+ };
1407
+ },
1408
+ /**
1409
+ * Lists all variants that belong to enabled products attached to the given project.
1410
+ * @summary List variants
1411
+ * @param {string} project What project it is
1412
+ * @param {string} [search] Search term to filter based on product tags.
1413
+ * @param {number} [pageToken] Page reference token
1414
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1415
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1416
+ * @param {*} [options] Override http request option.
1417
+ * @throws {RequiredError}
1418
+ */
1419
+ listVariants: async (project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1420
+ // verify required parameter 'project' is not null or undefined
1421
+ assertParamExists('listVariants', 'project', project)
1422
+ const localVarPath = `/v1/catalog/variants`;
1423
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1424
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1425
+ let baseOptions;
1426
+ if (configuration) {
1427
+ baseOptions = configuration.baseOptions;
1428
+ }
1429
+
1430
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1431
+ const localVarHeaderParameter = {} as any;
1432
+ const localVarQueryParameter = {} as any;
1433
+
1434
+ // authentication session-oauth required
1435
+ // oauth required
1436
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1437
+
1438
+ // authentication api-key required
1439
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1440
+
1441
+ if (project !== undefined) {
1442
+ localVarQueryParameter['project'] = project;
1443
+ }
1444
+
1445
+ if (search !== undefined) {
1446
+ localVarQueryParameter['search'] = search;
1447
+ }
1448
+
1449
+ if (pageToken !== undefined) {
1450
+ localVarQueryParameter['pageToken'] = pageToken;
1451
+ }
1452
+
1453
+ if (pageSize !== undefined) {
1454
+ localVarQueryParameter['pageSize'] = pageSize;
1455
+ }
1456
+
1457
+ if (fields !== undefined) {
1458
+ localVarQueryParameter['fields'] = fields;
1459
+ }
1460
+
1461
+
1462
+
1463
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1464
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1465
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1466
+
1467
+ return {
1468
+ url: toPathString(localVarUrlObj),
1469
+ options: localVarRequestOptions,
1470
+ };
1471
+ },
1472
+ }
1473
+ };
1474
+
1475
+ /**
1476
+ * VariantsApi - functional programming interface
1477
+ * @export
1478
+ */
1479
+ export const VariantsApiFp = function(configuration?: Configuration) {
1480
+ const localVarAxiosParamCreator = VariantsApiAxiosParamCreator(configuration)
1481
+ return {
1482
+ /**
1483
+ * Gets a variant by a given ID.
1484
+ * @summary Get variant
1485
+ * @param {string} project What project it is
1486
+ * @param {string} variantId Variants unique identifier
1487
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1488
+ * @param {*} [options] Override http request option.
1489
+ * @throws {RequiredError}
1490
+ */
1491
+ async getVariant(project: string, variantId: string, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Variant>> {
1492
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVariant(project, variantId, fields, options);
1493
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1494
+ const localVarOperationServerBasePath = operationServerMap['VariantsApi.getVariant']?.[localVarOperationServerIndex]?.url;
1495
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1496
+ },
1497
+ /**
1498
+ * Lists all variants that belong to enabled products attached to the given project.
1499
+ * @summary List variants
1500
+ * @param {string} project What project it is
1501
+ * @param {string} [search] Search term to filter based on product tags.
1502
+ * @param {number} [pageToken] Page reference token
1503
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1504
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1505
+ * @param {*} [options] Override http request option.
1506
+ * @throws {RequiredError}
1507
+ */
1508
+ async listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VariantsResponse>> {
1509
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listVariants(project, search, pageToken, pageSize, fields, options);
1510
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1511
+ const localVarOperationServerBasePath = operationServerMap['VariantsApi.listVariants']?.[localVarOperationServerIndex]?.url;
1512
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1513
+ },
1514
+ }
1515
+ };
1516
+
1517
+ /**
1518
+ * VariantsApi - factory interface
1519
+ * @export
1520
+ */
1521
+ export const VariantsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1522
+ const localVarFp = VariantsApiFp(configuration)
1523
+ return {
1524
+ /**
1525
+ * Gets a variant by a given ID.
1526
+ * @summary Get variant
1527
+ * @param {string} project What project it is
1528
+ * @param {string} variantId Variants unique identifier
1529
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1530
+ * @param {*} [options] Override http request option.
1531
+ * @throws {RequiredError}
1532
+ */
1533
+ getVariant(project: string, variantId: string, fields?: string, options?: any): AxiosPromise<Variant> {
1534
+ return localVarFp.getVariant(project, variantId, fields, options).then((request) => request(axios, basePath));
1535
+ },
1536
+ /**
1537
+ * Lists all variants that belong to enabled products attached to the given project.
1538
+ * @summary List variants
1539
+ * @param {string} project What project it is
1540
+ * @param {string} [search] Search term to filter based on product tags.
1541
+ * @param {number} [pageToken] Page reference token
1542
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1543
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1544
+ * @param {*} [options] Override http request option.
1545
+ * @throws {RequiredError}
1546
+ */
1547
+ listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: any): AxiosPromise<VariantsResponse> {
1548
+ return localVarFp.listVariants(project, search, pageToken, pageSize, fields, options).then((request) => request(axios, basePath));
1549
+ },
1550
+ };
1551
+ };
1552
+
1553
+ /**
1554
+ * VariantsApi - object-oriented interface
1555
+ * @export
1556
+ * @class VariantsApi
1557
+ * @extends {BaseAPI}
1558
+ */
1559
+ export class VariantsApi extends BaseAPI {
1560
+ /**
1561
+ * Gets a variant by a given ID.
1562
+ * @summary Get variant
1563
+ * @param {string} project What project it is
1564
+ * @param {string} variantId Variants unique identifier
1565
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1566
+ * @param {*} [options] Override http request option.
1567
+ * @throws {RequiredError}
1568
+ * @memberof VariantsApi
1569
+ */
1570
+ public getVariant(project: string, variantId: string, fields?: string, options?: RawAxiosRequestConfig) {
1571
+ return VariantsApiFp(this.configuration).getVariant(project, variantId, fields, options).then((request) => request(this.axios, this.basePath));
1572
+ }
1573
+
1574
+ /**
1575
+ * Lists all variants that belong to enabled products attached to the given project.
1576
+ * @summary List variants
1577
+ * @param {string} project What project it is
1578
+ * @param {string} [search] Search term to filter based on product tags.
1579
+ * @param {number} [pageToken] Page reference token
1580
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1581
+ * @param {string} [fields] Filter response fields to only include a subset of the resource.
1582
+ * @param {*} [options] Override http request option.
1583
+ * @throws {RequiredError}
1584
+ * @memberof VariantsApi
1585
+ */
1586
+ public listVariants(project: string, search?: string, pageToken?: number, pageSize?: number, fields?: string, options?: RawAxiosRequestConfig) {
1587
+ return VariantsApiFp(this.configuration).listVariants(project, search, pageToken, pageSize, fields, options).then((request) => request(this.axios, this.basePath));
1588
+ }
1589
+ }
1590
+
1591
+
1592
+