hey-pharmacist-ecommerce 1.1.25 → 1.1.27

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 (63) hide show
  1. package/dist/index.d.mts +4 -207
  2. package/dist/index.d.ts +4 -207
  3. package/dist/index.js +188 -233
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +189 -235
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/CartItem.tsx +0 -10
  9. package/src/components/ProductCard.tsx +4 -5
  10. package/src/index.ts +1 -0
  11. package/src/lib/Apis/api.ts +0 -8
  12. package/src/lib/Apis/apis/product-variants-api.ts +0 -96
  13. package/src/lib/Apis/apis/products-api.ts +7 -15
  14. package/src/lib/Apis/apis/shipping-api.ts +12 -214
  15. package/src/lib/Apis/models/category-filters.ts +0 -6
  16. package/src/lib/Apis/models/create-variant-dto.ts +0 -6
  17. package/src/lib/Apis/models/discounts-insights-dto.ts +0 -6
  18. package/src/lib/Apis/models/index.ts +0 -29
  19. package/src/lib/Apis/models/orders-insights-dto.ts +0 -6
  20. package/src/lib/Apis/models/payment.ts +0 -7
  21. package/src/lib/Apis/models/product-variant.ts +0 -6
  22. package/src/lib/Apis/models/products-insights-dto.ts +0 -6
  23. package/src/lib/Apis/models/rate-dto.ts +0 -6
  24. package/src/lib/Apis/models/update-product-variant-dto.ts +0 -6
  25. package/src/providers/WishlistProvider.tsx +3 -4
  26. package/src/screens/CheckoutScreen.tsx +25 -73
  27. package/src/lib/Apis/apis/chats-api.ts +0 -1101
  28. package/src/lib/Apis/apis/drafts-api.ts +0 -448
  29. package/src/lib/Apis/apis/open-aiapi.ts +0 -513
  30. package/src/lib/Apis/apis/payment-methods-api.ts +0 -411
  31. package/src/lib/Apis/apis/product-attributes-api.ts +0 -538
  32. package/src/lib/Apis/apis/product-favorite-list-api.ts +0 -321
  33. package/src/lib/Apis/apis/roles-api.ts +0 -614
  34. package/src/lib/Apis/apis/statistics-api.ts +0 -234
  35. package/src/lib/Apis/models/add-message-dto.ts +0 -56
  36. package/src/lib/Apis/models/chat.ts +0 -33
  37. package/src/lib/Apis/models/create-chat-dto.ts +0 -39
  38. package/src/lib/Apis/models/create-draft-dto.ts +0 -67
  39. package/src/lib/Apis/models/create-product-attribute-dto.ts +0 -33
  40. package/src/lib/Apis/models/create-role-dto.ts +0 -57
  41. package/src/lib/Apis/models/create-zone-dto.ts +0 -82
  42. package/src/lib/Apis/models/default-payment-method-request-dto.ts +0 -27
  43. package/src/lib/Apis/models/draft.ts +0 -79
  44. package/src/lib/Apis/models/google-analytics-request-dto.ts +0 -55
  45. package/src/lib/Apis/models/google-analytics-response-dto.ts +0 -39
  46. package/src/lib/Apis/models/my-favorite-list-dto.ts +0 -52
  47. package/src/lib/Apis/models/open-api.ts +0 -33
  48. package/src/lib/Apis/models/payment-method-data.ts +0 -34
  49. package/src/lib/Apis/models/payment-method.ts +0 -51
  50. package/src/lib/Apis/models/populated-chat-dto.ts +0 -95
  51. package/src/lib/Apis/models/product-attribute.ts +0 -57
  52. package/src/lib/Apis/models/product.ts +0 -142
  53. package/src/lib/Apis/models/role.ts +0 -69
  54. package/src/lib/Apis/models/single-message-populated.ts +0 -59
  55. package/src/lib/Apis/models/single-suggest-attribute.ts +0 -33
  56. package/src/lib/Apis/models/statistic-dto.ts +0 -171
  57. package/src/lib/Apis/models/suggest-attributes.ts +0 -28
  58. package/src/lib/Apis/models/update-product-attribute-dto.ts +0 -33
  59. package/src/lib/Apis/models/update-role-dto.ts +0 -57
  60. package/src/lib/Apis/models/update-zone-dto.ts +0 -82
  61. package/src/lib/Apis/models/user.ts +0 -232
  62. package/src/lib/Apis/models/zone-single-size.ts +0 -51
  63. package/src/lib/Apis/models/zone.ts +0 -106
@@ -1,538 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Hey Pharamcist API
5
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
6
- *
7
- * OpenAPI spec version: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by the swagger code generator program.
11
- * https://github.com/swagger-api/swagger-codegen.git
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
15
- import { Configuration } from '../configuration';
16
- // Some imports not used depending on template conditions
17
- // @ts-ignore
18
- import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
19
- import { CreateProductAttributeDto } from '../models';
20
- import { ProductAttribute } from '../models';
21
- import { UpdateProductAttributeDto } from '../models';
22
- /**
23
- * ProductAttributesApi - axios parameter creator
24
- * @export
25
- */
26
- export const ProductAttributesApiAxiosParamCreator = function (configuration?: Configuration) {
27
- return {
28
- /**
29
- *
30
- * @summary Create a new product attribute
31
- * @param {CreateProductAttributeDto} body
32
- * @param {*} [options] Override http request option.
33
- * @throws {RequiredError}
34
- */
35
- createProductAttribute: async (body: CreateProductAttributeDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
36
- // verify required parameter 'body' is not null or undefined
37
- if (body === null || body === undefined) {
38
- throw new RequiredError('body','Required parameter body was null or undefined when calling createProductAttribute.');
39
- }
40
- const localVarPath = `/product-attributes`;
41
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
42
- const localVarUrlObj = new URL(localVarPath, 'https://example.com');
43
- let baseOptions;
44
- if (configuration) {
45
- baseOptions = configuration.baseOptions;
46
- }
47
- const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
48
- const localVarHeaderParameter = {} as any;
49
- const localVarQueryParameter = {} as any;
50
-
51
- // authentication bearer required
52
- // http bearer authentication required
53
- if (configuration && configuration.accessToken) {
54
- const accessToken = typeof configuration.accessToken === 'function'
55
- ? await configuration.accessToken()
56
- : await configuration.accessToken;
57
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
58
- }
59
-
60
- // authentication x-store-key required
61
- if (configuration && configuration.apiKey) {
62
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
63
- ? await configuration.apiKey("x-store-key")
64
- : await configuration.apiKey;
65
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
66
- }
67
-
68
- localVarHeaderParameter['Content-Type'] = 'application/json';
69
-
70
- const query = new URLSearchParams(localVarUrlObj.search);
71
- for (const key in localVarQueryParameter) {
72
- query.set(key, localVarQueryParameter[key]);
73
- }
74
- for (const key in options.params) {
75
- query.set(key, options.params[key]);
76
- }
77
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
78
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
- const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
81
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
82
-
83
- return {
84
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
85
- options: localVarRequestOptions,
86
- };
87
- },
88
- /**
89
- *
90
- * @summary Delete a product attribute
91
- * @param {string} id Product Attribute ID
92
- * @param {*} [options] Override http request option.
93
- * @throws {RequiredError}
94
- */
95
- deleteProductAttribute: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
96
- // verify required parameter 'id' is not null or undefined
97
- if (id === null || id === undefined) {
98
- throw new RequiredError('id','Required parameter id was null or undefined when calling deleteProductAttribute.');
99
- }
100
- const localVarPath = `/product-attributes/{id}`
101
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
102
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
103
- const localVarUrlObj = new URL(localVarPath, 'https://example.com');
104
- let baseOptions;
105
- if (configuration) {
106
- baseOptions = configuration.baseOptions;
107
- }
108
- const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options};
109
- const localVarHeaderParameter = {} as any;
110
- const localVarQueryParameter = {} as any;
111
-
112
- // authentication bearer required
113
- // http bearer authentication required
114
- if (configuration && configuration.accessToken) {
115
- const accessToken = typeof configuration.accessToken === 'function'
116
- ? await configuration.accessToken()
117
- : await configuration.accessToken;
118
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
119
- }
120
-
121
- // authentication x-store-key required
122
- if (configuration && configuration.apiKey) {
123
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
124
- ? await configuration.apiKey("x-store-key")
125
- : await configuration.apiKey;
126
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
127
- }
128
-
129
- const query = new URLSearchParams(localVarUrlObj.search);
130
- for (const key in localVarQueryParameter) {
131
- query.set(key, localVarQueryParameter[key]);
132
- }
133
- for (const key in options.params) {
134
- query.set(key, options.params[key]);
135
- }
136
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
137
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
139
-
140
- return {
141
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
142
- options: localVarRequestOptions,
143
- };
144
- },
145
- /**
146
- *
147
- * @summary Get all product attributes
148
- * @param {string} [sortingColumn]
149
- * @param {string} [sortingOrder]
150
- * @param {*} [options] Override http request option.
151
- * @throws {RequiredError}
152
- */
153
- getAllProductAttributes: async (sortingColumn?: string, sortingOrder?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
154
- const localVarPath = `/product-attributes`;
155
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
156
- const localVarUrlObj = new URL(localVarPath, 'https://example.com');
157
- let baseOptions;
158
- if (configuration) {
159
- baseOptions = configuration.baseOptions;
160
- }
161
- const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
162
- const localVarHeaderParameter = {} as any;
163
- const localVarQueryParameter = {} as any;
164
-
165
- // authentication bearer required
166
- // http bearer authentication required
167
- if (configuration && configuration.accessToken) {
168
- const accessToken = typeof configuration.accessToken === 'function'
169
- ? await configuration.accessToken()
170
- : await configuration.accessToken;
171
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
172
- }
173
-
174
- // authentication x-store-key required
175
- if (configuration && configuration.apiKey) {
176
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
177
- ? await configuration.apiKey("x-store-key")
178
- : await configuration.apiKey;
179
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
180
- }
181
-
182
- if (sortingColumn !== undefined) {
183
- localVarQueryParameter['sortingColumn'] = sortingColumn;
184
- }
185
-
186
- if (sortingOrder !== undefined) {
187
- localVarQueryParameter['sortingOrder'] = sortingOrder;
188
- }
189
-
190
- const query = new URLSearchParams(localVarUrlObj.search);
191
- for (const key in localVarQueryParameter) {
192
- query.set(key, localVarQueryParameter[key]);
193
- }
194
- for (const key in options.params) {
195
- query.set(key, options.params[key]);
196
- }
197
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
198
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
199
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
200
-
201
- return {
202
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
203
- options: localVarRequestOptions,
204
- };
205
- },
206
- /**
207
- *
208
- * @summary Get a single product attribute
209
- * @param {string} id Product Attribute ID
210
- * @param {*} [options] Override http request option.
211
- * @throws {RequiredError}
212
- */
213
- getSingleProductAttribute: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
214
- // verify required parameter 'id' is not null or undefined
215
- if (id === null || id === undefined) {
216
- throw new RequiredError('id','Required parameter id was null or undefined when calling getSingleProductAttribute.');
217
- }
218
- const localVarPath = `/product-attributes/{id}`
219
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
220
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
221
- const localVarUrlObj = new URL(localVarPath, 'https://example.com');
222
- let baseOptions;
223
- if (configuration) {
224
- baseOptions = configuration.baseOptions;
225
- }
226
- const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
227
- const localVarHeaderParameter = {} as any;
228
- const localVarQueryParameter = {} as any;
229
-
230
- // authentication bearer required
231
- // http bearer authentication required
232
- if (configuration && configuration.accessToken) {
233
- const accessToken = typeof configuration.accessToken === 'function'
234
- ? await configuration.accessToken()
235
- : await configuration.accessToken;
236
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
237
- }
238
-
239
- // authentication x-store-key required
240
- if (configuration && configuration.apiKey) {
241
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
242
- ? await configuration.apiKey("x-store-key")
243
- : await configuration.apiKey;
244
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
245
- }
246
-
247
- const query = new URLSearchParams(localVarUrlObj.search);
248
- for (const key in localVarQueryParameter) {
249
- query.set(key, localVarQueryParameter[key]);
250
- }
251
- for (const key in options.params) {
252
- query.set(key, options.params[key]);
253
- }
254
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
255
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
256
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
257
-
258
- return {
259
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
260
- options: localVarRequestOptions,
261
- };
262
- },
263
- /**
264
- *
265
- * @summary Update a product attribute
266
- * @param {UpdateProductAttributeDto} body
267
- * @param {string} id Product Attribute ID
268
- * @param {*} [options] Override http request option.
269
- * @throws {RequiredError}
270
- */
271
- updateProductAttribute: async (body: UpdateProductAttributeDto, id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
272
- // verify required parameter 'body' is not null or undefined
273
- if (body === null || body === undefined) {
274
- throw new RequiredError('body','Required parameter body was null or undefined when calling updateProductAttribute.');
275
- }
276
- // verify required parameter 'id' is not null or undefined
277
- if (id === null || id === undefined) {
278
- throw new RequiredError('id','Required parameter id was null or undefined when calling updateProductAttribute.');
279
- }
280
- const localVarPath = `/product-attributes/{id}`
281
- .replace(`{${"id"}}`, encodeURIComponent(String(id)));
282
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
283
- const localVarUrlObj = new URL(localVarPath, 'https://example.com');
284
- let baseOptions;
285
- if (configuration) {
286
- baseOptions = configuration.baseOptions;
287
- }
288
- const localVarRequestOptions :AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
289
- const localVarHeaderParameter = {} as any;
290
- const localVarQueryParameter = {} as any;
291
-
292
- // authentication bearer required
293
- // http bearer authentication required
294
- if (configuration && configuration.accessToken) {
295
- const accessToken = typeof configuration.accessToken === 'function'
296
- ? await configuration.accessToken()
297
- : await configuration.accessToken;
298
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
299
- }
300
-
301
- // authentication x-store-key required
302
- if (configuration && configuration.apiKey) {
303
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
304
- ? await configuration.apiKey("x-store-key")
305
- : await configuration.apiKey;
306
- localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
307
- }
308
-
309
- localVarHeaderParameter['Content-Type'] = 'application/json';
310
-
311
- const query = new URLSearchParams(localVarUrlObj.search);
312
- for (const key in localVarQueryParameter) {
313
- query.set(key, localVarQueryParameter[key]);
314
- }
315
- for (const key in options.params) {
316
- query.set(key, options.params[key]);
317
- }
318
- localVarUrlObj.search = (new URLSearchParams(query)).toString();
319
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
321
- const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
322
- localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
323
-
324
- return {
325
- url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
326
- options: localVarRequestOptions,
327
- };
328
- },
329
- }
330
- };
331
-
332
- /**
333
- * ProductAttributesApi - functional programming interface
334
- * @export
335
- */
336
- export const ProductAttributesApiFp = function(configuration?: Configuration) {
337
- return {
338
- /**
339
- *
340
- * @summary Create a new product attribute
341
- * @param {CreateProductAttributeDto} body
342
- * @param {*} [options] Override http request option.
343
- * @throws {RequiredError}
344
- */
345
- async createProductAttribute(body: CreateProductAttributeDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ProductAttribute>>> {
346
- const localVarAxiosArgs = await ProductAttributesApiAxiosParamCreator(configuration).createProductAttribute(body, options);
347
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
348
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
349
- return axios.request(axiosRequestArgs);
350
- };
351
- },
352
- /**
353
- *
354
- * @summary Delete a product attribute
355
- * @param {string} id Product Attribute ID
356
- * @param {*} [options] Override http request option.
357
- * @throws {RequiredError}
358
- */
359
- async deleteProductAttribute(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
360
- const localVarAxiosArgs = await ProductAttributesApiAxiosParamCreator(configuration).deleteProductAttribute(id, options);
361
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
362
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
363
- return axios.request(axiosRequestArgs);
364
- };
365
- },
366
- /**
367
- *
368
- * @summary Get all product attributes
369
- * @param {string} [sortingColumn]
370
- * @param {string} [sortingOrder]
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- */
374
- async getAllProductAttributes(sortingColumn?: string, sortingOrder?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<ProductAttribute>>>> {
375
- const localVarAxiosArgs = await ProductAttributesApiAxiosParamCreator(configuration).getAllProductAttributes(sortingColumn, sortingOrder, options);
376
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
377
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
378
- return axios.request(axiosRequestArgs);
379
- };
380
- },
381
- /**
382
- *
383
- * @summary Get a single product attribute
384
- * @param {string} id Product Attribute ID
385
- * @param {*} [options] Override http request option.
386
- * @throws {RequiredError}
387
- */
388
- async getSingleProductAttribute(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ProductAttribute>>> {
389
- const localVarAxiosArgs = await ProductAttributesApiAxiosParamCreator(configuration).getSingleProductAttribute(id, options);
390
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
391
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
392
- return axios.request(axiosRequestArgs);
393
- };
394
- },
395
- /**
396
- *
397
- * @summary Update a product attribute
398
- * @param {UpdateProductAttributeDto} body
399
- * @param {string} id Product Attribute ID
400
- * @param {*} [options] Override http request option.
401
- * @throws {RequiredError}
402
- */
403
- async updateProductAttribute(body: UpdateProductAttributeDto, id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ProductAttribute>>> {
404
- const localVarAxiosArgs = await ProductAttributesApiAxiosParamCreator(configuration).updateProductAttribute(body, id, options);
405
- return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
406
- const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
407
- return axios.request(axiosRequestArgs);
408
- };
409
- },
410
- }
411
- };
412
-
413
- /**
414
- * ProductAttributesApi - factory interface
415
- * @export
416
- */
417
- export const ProductAttributesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
418
- return {
419
- /**
420
- *
421
- * @summary Create a new product attribute
422
- * @param {CreateProductAttributeDto} body
423
- * @param {*} [options] Override http request option.
424
- * @throws {RequiredError}
425
- */
426
- async createProductAttribute(body: CreateProductAttributeDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ProductAttribute>> {
427
- return ProductAttributesApiFp(configuration).createProductAttribute(body, options).then((request) => request(axios, basePath));
428
- },
429
- /**
430
- *
431
- * @summary Delete a product attribute
432
- * @param {string} id Product Attribute ID
433
- * @param {*} [options] Override http request option.
434
- * @throws {RequiredError}
435
- */
436
- async deleteProductAttribute(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
437
- return ProductAttributesApiFp(configuration).deleteProductAttribute(id, options).then((request) => request(axios, basePath));
438
- },
439
- /**
440
- *
441
- * @summary Get all product attributes
442
- * @param {string} [sortingColumn]
443
- * @param {string} [sortingOrder]
444
- * @param {*} [options] Override http request option.
445
- * @throws {RequiredError}
446
- */
447
- async getAllProductAttributes(sortingColumn?: string, sortingOrder?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ProductAttribute>>> {
448
- return ProductAttributesApiFp(configuration).getAllProductAttributes(sortingColumn, sortingOrder, options).then((request) => request(axios, basePath));
449
- },
450
- /**
451
- *
452
- * @summary Get a single product attribute
453
- * @param {string} id Product Attribute ID
454
- * @param {*} [options] Override http request option.
455
- * @throws {RequiredError}
456
- */
457
- async getSingleProductAttribute(id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ProductAttribute>> {
458
- return ProductAttributesApiFp(configuration).getSingleProductAttribute(id, options).then((request) => request(axios, basePath));
459
- },
460
- /**
461
- *
462
- * @summary Update a product attribute
463
- * @param {UpdateProductAttributeDto} body
464
- * @param {string} id Product Attribute ID
465
- * @param {*} [options] Override http request option.
466
- * @throws {RequiredError}
467
- */
468
- async updateProductAttribute(body: UpdateProductAttributeDto, id: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ProductAttribute>> {
469
- return ProductAttributesApiFp(configuration).updateProductAttribute(body, id, options).then((request) => request(axios, basePath));
470
- },
471
- };
472
- };
473
-
474
- /**
475
- * ProductAttributesApi - object-oriented interface
476
- * @export
477
- * @class ProductAttributesApi
478
- * @extends {BaseAPI}
479
- */
480
- export class ProductAttributesApi extends BaseAPI {
481
- /**
482
- *
483
- * @summary Create a new product attribute
484
- * @param {CreateProductAttributeDto} body
485
- * @param {*} [options] Override http request option.
486
- * @throws {RequiredError}
487
- * @memberof ProductAttributesApi
488
- */
489
- public async createProductAttribute(body: CreateProductAttributeDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ProductAttribute>> {
490
- return ProductAttributesApiFp(this.configuration).createProductAttribute(body, options).then((request) => request(this.axios, this.basePath));
491
- }
492
- /**
493
- *
494
- * @summary Delete a product attribute
495
- * @param {string} id Product Attribute ID
496
- * @param {*} [options] Override http request option.
497
- * @throws {RequiredError}
498
- * @memberof ProductAttributesApi
499
- */
500
- public async deleteProductAttribute(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
501
- return ProductAttributesApiFp(this.configuration).deleteProductAttribute(id, options).then((request) => request(this.axios, this.basePath));
502
- }
503
- /**
504
- *
505
- * @summary Get all product attributes
506
- * @param {string} [sortingColumn]
507
- * @param {string} [sortingOrder]
508
- * @param {*} [options] Override http request option.
509
- * @throws {RequiredError}
510
- * @memberof ProductAttributesApi
511
- */
512
- public async getAllProductAttributes(sortingColumn?: string, sortingOrder?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<ProductAttribute>>> {
513
- return ProductAttributesApiFp(this.configuration).getAllProductAttributes(sortingColumn, sortingOrder, options).then((request) => request(this.axios, this.basePath));
514
- }
515
- /**
516
- *
517
- * @summary Get a single product attribute
518
- * @param {string} id Product Attribute ID
519
- * @param {*} [options] Override http request option.
520
- * @throws {RequiredError}
521
- * @memberof ProductAttributesApi
522
- */
523
- public async getSingleProductAttribute(id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ProductAttribute>> {
524
- return ProductAttributesApiFp(this.configuration).getSingleProductAttribute(id, options).then((request) => request(this.axios, this.basePath));
525
- }
526
- /**
527
- *
528
- * @summary Update a product attribute
529
- * @param {UpdateProductAttributeDto} body
530
- * @param {string} id Product Attribute ID
531
- * @param {*} [options] Override http request option.
532
- * @throws {RequiredError}
533
- * @memberof ProductAttributesApi
534
- */
535
- public async updateProductAttribute(body: UpdateProductAttributeDto, id: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ProductAttribute>> {
536
- return ProductAttributesApiFp(this.configuration).updateProductAttribute(body, id, options).then((request) => request(this.axios, this.basePath));
537
- }
538
- }