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.
- package/dist/index.d.mts +4 -207
- package/dist/index.d.ts +4 -207
- package/dist/index.js +188 -233
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +189 -235
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/CartItem.tsx +0 -10
- package/src/components/ProductCard.tsx +4 -5
- package/src/index.ts +1 -0
- package/src/lib/Apis/api.ts +0 -8
- package/src/lib/Apis/apis/product-variants-api.ts +0 -96
- package/src/lib/Apis/apis/products-api.ts +7 -15
- package/src/lib/Apis/apis/shipping-api.ts +12 -214
- package/src/lib/Apis/models/category-filters.ts +0 -6
- package/src/lib/Apis/models/create-variant-dto.ts +0 -6
- package/src/lib/Apis/models/discounts-insights-dto.ts +0 -6
- package/src/lib/Apis/models/index.ts +0 -29
- package/src/lib/Apis/models/orders-insights-dto.ts +0 -6
- package/src/lib/Apis/models/payment.ts +0 -7
- package/src/lib/Apis/models/product-variant.ts +0 -6
- package/src/lib/Apis/models/products-insights-dto.ts +0 -6
- package/src/lib/Apis/models/rate-dto.ts +0 -6
- package/src/lib/Apis/models/update-product-variant-dto.ts +0 -6
- package/src/providers/WishlistProvider.tsx +3 -4
- package/src/screens/CheckoutScreen.tsx +25 -73
- package/src/lib/Apis/apis/chats-api.ts +0 -1101
- package/src/lib/Apis/apis/drafts-api.ts +0 -448
- package/src/lib/Apis/apis/open-aiapi.ts +0 -513
- package/src/lib/Apis/apis/payment-methods-api.ts +0 -411
- package/src/lib/Apis/apis/product-attributes-api.ts +0 -538
- package/src/lib/Apis/apis/product-favorite-list-api.ts +0 -321
- package/src/lib/Apis/apis/roles-api.ts +0 -614
- package/src/lib/Apis/apis/statistics-api.ts +0 -234
- package/src/lib/Apis/models/add-message-dto.ts +0 -56
- package/src/lib/Apis/models/chat.ts +0 -33
- package/src/lib/Apis/models/create-chat-dto.ts +0 -39
- package/src/lib/Apis/models/create-draft-dto.ts +0 -67
- package/src/lib/Apis/models/create-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/create-role-dto.ts +0 -57
- package/src/lib/Apis/models/create-zone-dto.ts +0 -82
- package/src/lib/Apis/models/default-payment-method-request-dto.ts +0 -27
- package/src/lib/Apis/models/draft.ts +0 -79
- package/src/lib/Apis/models/google-analytics-request-dto.ts +0 -55
- package/src/lib/Apis/models/google-analytics-response-dto.ts +0 -39
- package/src/lib/Apis/models/my-favorite-list-dto.ts +0 -52
- package/src/lib/Apis/models/open-api.ts +0 -33
- package/src/lib/Apis/models/payment-method-data.ts +0 -34
- package/src/lib/Apis/models/payment-method.ts +0 -51
- package/src/lib/Apis/models/populated-chat-dto.ts +0 -95
- package/src/lib/Apis/models/product-attribute.ts +0 -57
- package/src/lib/Apis/models/product.ts +0 -142
- package/src/lib/Apis/models/role.ts +0 -69
- package/src/lib/Apis/models/single-message-populated.ts +0 -59
- package/src/lib/Apis/models/single-suggest-attribute.ts +0 -33
- package/src/lib/Apis/models/statistic-dto.ts +0 -171
- package/src/lib/Apis/models/suggest-attributes.ts +0 -28
- package/src/lib/Apis/models/update-product-attribute-dto.ts +0 -33
- package/src/lib/Apis/models/update-role-dto.ts +0 -57
- package/src/lib/Apis/models/update-zone-dto.ts +0 -82
- package/src/lib/Apis/models/user.ts +0 -232
- package/src/lib/Apis/models/zone-single-size.ts +0 -51
- package/src/lib/Apis/models/zone.ts +0 -106
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hey-pharmacist-ecommerce",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"description": "Production-ready, multi-tenant e‑commerce UI + API adapter for Next.js with auth, carts, checkout, orders, theming, and pharmacist-focused UX.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -40,16 +40,6 @@ export function CartItem({ item }: CartItemProps) {
|
|
|
40
40
|
const itemTotal = item.productVariantData.finalPrice * item.quantity;
|
|
41
41
|
const unitPrice = item.productVariantData.finalPrice;
|
|
42
42
|
|
|
43
|
-
// Extract attributes from variant
|
|
44
|
-
const attributes: string[] = [];
|
|
45
|
-
if (item.productVariantData.attribute) {
|
|
46
|
-
if (item.productVariantData.attribute.color) {
|
|
47
|
-
attributes.push(`Color: ${item.productVariantData.attribute.color}`);
|
|
48
|
-
}
|
|
49
|
-
if (item.productVariantData.attribute.size) {
|
|
50
|
-
attributes.push(`Size: ${item.productVariantData.attribute.size}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
43
|
|
|
54
44
|
return (
|
|
55
45
|
<motion.div
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
4
4
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
5
5
|
import { Star, ShoppingCart, Eye } from 'lucide-react';
|
|
6
|
-
import { ExtendedProductDTO,
|
|
6
|
+
import { ExtendedProductDTO, } from '@/lib/Apis';
|
|
7
7
|
import { formatPrice } from '@/lib/utils/format';
|
|
8
8
|
import { useWishlist } from '@/providers/WishlistProvider';
|
|
9
9
|
import { useCart } from '@/providers/CartProvider';
|
|
@@ -65,7 +65,7 @@ export function ProductCard({
|
|
|
65
65
|
`${product.name} was removed from your wishlist.`
|
|
66
66
|
);
|
|
67
67
|
} else {
|
|
68
|
-
await addToWishlist(product as unknown as
|
|
68
|
+
await addToWishlist(product as unknown as ExtendedProductDTO);
|
|
69
69
|
setIsFavorite(true);
|
|
70
70
|
notification.success(
|
|
71
71
|
'Added to wishlist',
|
|
@@ -124,7 +124,6 @@ export function ProductCard({
|
|
|
124
124
|
variantId: variant.id || variant._id,
|
|
125
125
|
variantName: variant.name,
|
|
126
126
|
image: variant.productMedia[0].file,
|
|
127
|
-
color: variant.attribute?.color || variant.attribute?.Color || null,
|
|
128
127
|
}));
|
|
129
128
|
}, [product.productVariants]);
|
|
130
129
|
|
|
@@ -318,11 +317,11 @@ export function ProductCard({
|
|
|
318
317
|
? 'border-primary-500 ring-2 ring-primary-200'
|
|
319
318
|
: 'border-gray-200 hover:border-primary-300'
|
|
320
319
|
}`}
|
|
321
|
-
aria-label={`Select ${variant.
|
|
320
|
+
aria-label={`Select ${variant.variantName || 'variant'}`}
|
|
322
321
|
>
|
|
323
322
|
<Image
|
|
324
323
|
src={variant.image}
|
|
325
|
-
alt={variant.
|
|
324
|
+
alt={variant.variantName || `Variant ${index + 1}`}
|
|
326
325
|
fill
|
|
327
326
|
className="object-cover"
|
|
328
327
|
sizes="32px"
|
package/src/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { AddressesScreen } from './screens/AddressesScreen';
|
|
|
22
22
|
export { default as WishlistScreen } from './screens/WishlistScreen';
|
|
23
23
|
export { default as SearchResultsScreen } from './screens/SearchResultsScreen';
|
|
24
24
|
export { default as NewAddressScreen } from './screens/NewAddressScreen';
|
|
25
|
+
export { EditProfileScreen } from './screens/EditProfileScreen';
|
|
25
26
|
|
|
26
27
|
// Components
|
|
27
28
|
export { Header } from './components/Header';
|
package/src/lib/Apis/api.ts
CHANGED
|
@@ -15,28 +15,20 @@ export * from './apis/auth-api';
|
|
|
15
15
|
export * from './apis/blogs-api';
|
|
16
16
|
export * from './apis/cart-api';
|
|
17
17
|
export * from './apis/categories-api';
|
|
18
|
-
export * from './apis/chats-api';
|
|
19
18
|
export * from './apis/contact-us-api';
|
|
20
19
|
export * from './apis/discounts-api';
|
|
21
|
-
export * from './apis/drafts-api';
|
|
22
20
|
export * from './apis/events-api';
|
|
23
21
|
export * from './apis/file-proccesor-api';
|
|
24
22
|
export * from './apis/health-api';
|
|
25
23
|
export * from './apis/images-api';
|
|
26
24
|
export * from './apis/marketing-api';
|
|
27
25
|
export * from './apis/notifications-api';
|
|
28
|
-
export * from './apis/open-aiapi';
|
|
29
26
|
export * from './apis/orders-api';
|
|
30
|
-
export * from './apis/payment-methods-api';
|
|
31
27
|
export * from './apis/payments-api';
|
|
32
|
-
export * from './apis/product-attributes-api';
|
|
33
|
-
export * from './apis/product-favorite-list-api';
|
|
34
28
|
export * from './apis/product-variants-api';
|
|
35
29
|
export * from './apis/products-api';
|
|
36
30
|
export * from './apis/review-api';
|
|
37
|
-
export * from './apis/roles-api';
|
|
38
31
|
export * from './apis/shipping-api';
|
|
39
|
-
export * from './apis/statistics-api';
|
|
40
32
|
export * from './apis/stores-api';
|
|
41
33
|
export * from './apis/sub-categories-api';
|
|
42
34
|
export * from './apis/user-groups-api';
|
|
@@ -18,7 +18,6 @@ import { Configuration } from '../configuration';
|
|
|
18
18
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
19
|
import { CreateVariantDto } from '../models';
|
|
20
20
|
import { ProductVariant } from '../models';
|
|
21
|
-
import { SuggestAttributes } from '../models';
|
|
22
21
|
import { UpdateProductVariantDto } from '../models';
|
|
23
22
|
/**
|
|
24
23
|
* ProductVariantsApi - axios parameter creator
|
|
@@ -333,66 +332,6 @@ export const ProductVariantsApiAxiosParamCreator = function (configuration?: Con
|
|
|
333
332
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
334
333
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
335
334
|
|
|
336
|
-
return {
|
|
337
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
338
|
-
options: localVarRequestOptions,
|
|
339
|
-
};
|
|
340
|
-
},
|
|
341
|
-
/**
|
|
342
|
-
*
|
|
343
|
-
* @summary Get suggested product attributes
|
|
344
|
-
* @param {SuggestAttributes} body
|
|
345
|
-
* @param {*} [options] Override http request option.
|
|
346
|
-
* @throws {RequiredError}
|
|
347
|
-
*/
|
|
348
|
-
getSuggestedProductAttributes: async (body: SuggestAttributes, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
349
|
-
// verify required parameter 'body' is not null or undefined
|
|
350
|
-
if (body === null || body === undefined) {
|
|
351
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling getSuggestedProductAttributes.');
|
|
352
|
-
}
|
|
353
|
-
const localVarPath = `/product-variants/suggested-product-attributes`;
|
|
354
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
355
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
356
|
-
let baseOptions;
|
|
357
|
-
if (configuration) {
|
|
358
|
-
baseOptions = configuration.baseOptions;
|
|
359
|
-
}
|
|
360
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
361
|
-
const localVarHeaderParameter = {} as any;
|
|
362
|
-
const localVarQueryParameter = {} as any;
|
|
363
|
-
|
|
364
|
-
// authentication bearer required
|
|
365
|
-
// http bearer authentication required
|
|
366
|
-
if (configuration && configuration.accessToken) {
|
|
367
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
368
|
-
? await configuration.accessToken()
|
|
369
|
-
: await configuration.accessToken;
|
|
370
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
// authentication x-store-key required
|
|
374
|
-
if (configuration && configuration.apiKey) {
|
|
375
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
376
|
-
? await configuration.apiKey("x-store-key")
|
|
377
|
-
: await configuration.apiKey;
|
|
378
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
382
|
-
|
|
383
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
384
|
-
for (const key in localVarQueryParameter) {
|
|
385
|
-
query.set(key, localVarQueryParameter[key]);
|
|
386
|
-
}
|
|
387
|
-
for (const key in options.params) {
|
|
388
|
-
query.set(key, options.params[key]);
|
|
389
|
-
}
|
|
390
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
391
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
392
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
393
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
394
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
395
|
-
|
|
396
335
|
return {
|
|
397
336
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
398
337
|
options: localVarRequestOptions,
|
|
@@ -480,20 +419,6 @@ export const ProductVariantsApiFp = function(configuration?: Configuration) {
|
|
|
480
419
|
return axios.request(axiosRequestArgs);
|
|
481
420
|
};
|
|
482
421
|
},
|
|
483
|
-
/**
|
|
484
|
-
*
|
|
485
|
-
* @summary Get suggested product attributes
|
|
486
|
-
* @param {SuggestAttributes} body
|
|
487
|
-
* @param {*} [options] Override http request option.
|
|
488
|
-
* @throws {RequiredError}
|
|
489
|
-
*/
|
|
490
|
-
async getSuggestedProductAttributes(body: SuggestAttributes, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
|
491
|
-
const localVarAxiosArgs = await ProductVariantsApiAxiosParamCreator(configuration).getSuggestedProductAttributes(body, options);
|
|
492
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
493
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
494
|
-
return axios.request(axiosRequestArgs);
|
|
495
|
-
};
|
|
496
|
-
},
|
|
497
422
|
}
|
|
498
423
|
};
|
|
499
424
|
|
|
@@ -556,16 +481,6 @@ export const ProductVariantsApiFactory = function (configuration?: Configuration
|
|
|
556
481
|
async getAllVariants(productId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<ProductVariant>>> {
|
|
557
482
|
return ProductVariantsApiFp(configuration).getAllVariants(productId, options).then((request) => request(axios, basePath));
|
|
558
483
|
},
|
|
559
|
-
/**
|
|
560
|
-
*
|
|
561
|
-
* @summary Get suggested product attributes
|
|
562
|
-
* @param {SuggestAttributes} body
|
|
563
|
-
* @param {*} [options] Override http request option.
|
|
564
|
-
* @throws {RequiredError}
|
|
565
|
-
*/
|
|
566
|
-
async getSuggestedProductAttributes(body: SuggestAttributes, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
|
567
|
-
return ProductVariantsApiFp(configuration).getSuggestedProductAttributes(body, options).then((request) => request(axios, basePath));
|
|
568
|
-
},
|
|
569
484
|
};
|
|
570
485
|
};
|
|
571
486
|
|
|
@@ -634,15 +549,4 @@ export class ProductVariantsApi extends BaseAPI {
|
|
|
634
549
|
public async getAllVariants(productId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<ProductVariant>>> {
|
|
635
550
|
return ProductVariantsApiFp(this.configuration).getAllVariants(productId, options).then((request) => request(this.axios, this.basePath));
|
|
636
551
|
}
|
|
637
|
-
/**
|
|
638
|
-
*
|
|
639
|
-
* @summary Get suggested product attributes
|
|
640
|
-
* @param {SuggestAttributes} body
|
|
641
|
-
* @param {*} [options] Override http request option.
|
|
642
|
-
* @throws {RequiredError}
|
|
643
|
-
* @memberof ProductVariantsApi
|
|
644
|
-
*/
|
|
645
|
-
public async getSuggestedProductAttributes(body: SuggestAttributes, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
|
646
|
-
return ProductVariantsApiFp(this.configuration).getSuggestedProductAttributes(body, options).then((request) => request(this.axios, this.basePath));
|
|
647
|
-
}
|
|
648
552
|
}
|
|
@@ -211,7 +211,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
211
211
|
* @summary Get all products of a specific category
|
|
212
212
|
* @param {string} categoryId Category ID
|
|
213
213
|
* @param {string} [searchTerm] OpenAI Search Query
|
|
214
|
-
* @param {any} [attributes] Send any key-value pairs as query parameters (value is comma separated string)
|
|
215
214
|
* @param {number} [maxPrice] highest price to filter with
|
|
216
215
|
* @param {number} [minPrice] lowest price to filter with
|
|
217
216
|
* @param {string} [brandFilter] brands to filter with (comma separated string)
|
|
@@ -224,7 +223,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
224
223
|
* @param {*} [options] Override http request option.
|
|
225
224
|
* @throws {RequiredError}
|
|
226
225
|
*/
|
|
227
|
-
getAllCategoryProducts: async (categoryId: string, searchTerm?: string,
|
|
226
|
+
getAllCategoryProducts: async (categoryId: string, searchTerm?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
228
227
|
// verify required parameter 'categoryId' is not null or undefined
|
|
229
228
|
if (categoryId === null || categoryId === undefined) {
|
|
230
229
|
throw new RequiredError('categoryId','Required parameter categoryId was null or undefined when calling getAllCategoryProducts.');
|
|
@@ -262,10 +261,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
262
261
|
localVarQueryParameter['searchTerm'] = searchTerm;
|
|
263
262
|
}
|
|
264
263
|
|
|
265
|
-
if (attributes !== undefined) {
|
|
266
|
-
localVarQueryParameter['attributes'] = attributes;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
264
|
if (maxPrice !== undefined) {
|
|
270
265
|
localVarQueryParameter['maxPrice'] = maxPrice;
|
|
271
266
|
}
|
|
@@ -996,7 +991,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
996
991
|
* @summary Get all products of a specific category
|
|
997
992
|
* @param {string} categoryId Category ID
|
|
998
993
|
* @param {string} [searchTerm] OpenAI Search Query
|
|
999
|
-
* @param {any} [attributes] Send any key-value pairs as query parameters (value is comma separated string)
|
|
1000
994
|
* @param {number} [maxPrice] highest price to filter with
|
|
1001
995
|
* @param {number} [minPrice] lowest price to filter with
|
|
1002
996
|
* @param {string} [brandFilter] brands to filter with (comma separated string)
|
|
@@ -1009,8 +1003,8 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1009
1003
|
* @param {*} [options] Override http request option.
|
|
1010
1004
|
* @throws {RequiredError}
|
|
1011
1005
|
*/
|
|
1012
|
-
async getAllCategoryProducts(categoryId: string, searchTerm?: string,
|
|
1013
|
-
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).getAllCategoryProducts(categoryId, searchTerm,
|
|
1006
|
+
async getAllCategoryProducts(categoryId: string, searchTerm?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginatedProductsDto>>> {
|
|
1007
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).getAllCategoryProducts(categoryId, searchTerm, maxPrice, minPrice, brandFilter, availability, sort, includeNoVariantProducts, isActive, limit, page, options);
|
|
1014
1008
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1015
1009
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1016
1010
|
return axios.request(axiosRequestArgs);
|
|
@@ -1208,7 +1202,6 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1208
1202
|
* @summary Get all products of a specific category
|
|
1209
1203
|
* @param {string} categoryId Category ID
|
|
1210
1204
|
* @param {string} [searchTerm] OpenAI Search Query
|
|
1211
|
-
* @param {any} [attributes] Send any key-value pairs as query parameters (value is comma separated string)
|
|
1212
1205
|
* @param {number} [maxPrice] highest price to filter with
|
|
1213
1206
|
* @param {number} [minPrice] lowest price to filter with
|
|
1214
1207
|
* @param {string} [brandFilter] brands to filter with (comma separated string)
|
|
@@ -1221,8 +1214,8 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1221
1214
|
* @param {*} [options] Override http request option.
|
|
1222
1215
|
* @throws {RequiredError}
|
|
1223
1216
|
*/
|
|
1224
|
-
async getAllCategoryProducts(categoryId: string, searchTerm?: string,
|
|
1225
|
-
return ProductsApiFp(configuration).getAllCategoryProducts(categoryId, searchTerm,
|
|
1217
|
+
async getAllCategoryProducts(categoryId: string, searchTerm?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1218
|
+
return ProductsApiFp(configuration).getAllCategoryProducts(categoryId, searchTerm, maxPrice, minPrice, brandFilter, availability, sort, includeNoVariantProducts, isActive, limit, page, options).then((request) => request(axios, basePath));
|
|
1226
1219
|
},
|
|
1227
1220
|
/**
|
|
1228
1221
|
*
|
|
@@ -1384,7 +1377,6 @@ export class ProductsApi extends BaseAPI {
|
|
|
1384
1377
|
* @summary Get all products of a specific category
|
|
1385
1378
|
* @param {string} categoryId Category ID
|
|
1386
1379
|
* @param {string} [searchTerm] OpenAI Search Query
|
|
1387
|
-
* @param {any} [attributes] Send any key-value pairs as query parameters (value is comma separated string)
|
|
1388
1380
|
* @param {number} [maxPrice] highest price to filter with
|
|
1389
1381
|
* @param {number} [minPrice] lowest price to filter with
|
|
1390
1382
|
* @param {string} [brandFilter] brands to filter with (comma separated string)
|
|
@@ -1398,8 +1390,8 @@ export class ProductsApi extends BaseAPI {
|
|
|
1398
1390
|
* @throws {RequiredError}
|
|
1399
1391
|
* @memberof ProductsApi
|
|
1400
1392
|
*/
|
|
1401
|
-
public async getAllCategoryProducts(categoryId: string, searchTerm?: string,
|
|
1402
|
-
return ProductsApiFp(this.configuration).getAllCategoryProducts(categoryId, searchTerm,
|
|
1393
|
+
public async getAllCategoryProducts(categoryId: string, searchTerm?: string, maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, includeNoVariantProducts?: boolean, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1394
|
+
return ProductsApiFp(this.configuration).getAllCategoryProducts(categoryId, searchTerm, maxPrice, minPrice, brandFilter, availability, sort, includeNoVariantProducts, isActive, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1403
1395
|
}
|
|
1404
1396
|
/**
|
|
1405
1397
|
*
|
|
@@ -17,77 +17,14 @@ import { Configuration } from '../configuration';
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
19
|
import { CartBodyDTO } from '../models';
|
|
20
|
-
import { CreateZoneDto } from '../models';
|
|
21
20
|
import { Shipment } from '../models';
|
|
22
21
|
import { ShipmentWithOrder } from '../models';
|
|
23
|
-
import { UpdateZoneDto } from '../models';
|
|
24
|
-
import { Zone } from '../models';
|
|
25
22
|
/**
|
|
26
23
|
* ShippingApi - axios parameter creator
|
|
27
24
|
* @export
|
|
28
25
|
*/
|
|
29
26
|
export const ShippingApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
30
27
|
return {
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @summary Create zone
|
|
34
|
-
* @param {CreateZoneDto} body
|
|
35
|
-
* @param {*} [options] Override http request option.
|
|
36
|
-
* @throws {RequiredError}
|
|
37
|
-
*/
|
|
38
|
-
createZone: async (body: CreateZoneDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
39
|
-
// verify required parameter 'body' is not null or undefined
|
|
40
|
-
if (body === null || body === undefined) {
|
|
41
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling createZone.');
|
|
42
|
-
}
|
|
43
|
-
const localVarPath = `/shipping/zones/create`;
|
|
44
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
46
|
-
let baseOptions;
|
|
47
|
-
if (configuration) {
|
|
48
|
-
baseOptions = configuration.baseOptions;
|
|
49
|
-
}
|
|
50
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
51
|
-
const localVarHeaderParameter = {} as any;
|
|
52
|
-
const localVarQueryParameter = {} as any;
|
|
53
|
-
|
|
54
|
-
// authentication bearer required
|
|
55
|
-
// http bearer authentication required
|
|
56
|
-
if (configuration && configuration.accessToken) {
|
|
57
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
58
|
-
? await configuration.accessToken()
|
|
59
|
-
: await configuration.accessToken;
|
|
60
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// authentication x-store-key required
|
|
64
|
-
if (configuration && configuration.apiKey) {
|
|
65
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
66
|
-
? await configuration.apiKey("x-store-key")
|
|
67
|
-
: await configuration.apiKey;
|
|
68
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
72
|
-
|
|
73
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
74
|
-
for (const key in localVarQueryParameter) {
|
|
75
|
-
query.set(key, localVarQueryParameter[key]);
|
|
76
|
-
}
|
|
77
|
-
for (const key in options.params) {
|
|
78
|
-
query.set(key, options.params[key]);
|
|
79
|
-
}
|
|
80
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
81
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
83
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
84
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
85
|
-
|
|
86
|
-
return {
|
|
87
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
88
|
-
options: localVarRequestOptions,
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
28
|
/**
|
|
92
29
|
*
|
|
93
30
|
* @summary Get all shipments
|
|
@@ -315,12 +252,12 @@ export const ShippingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
315
252
|
},
|
|
316
253
|
/**
|
|
317
254
|
*
|
|
318
|
-
* @summary Get
|
|
255
|
+
* @summary Get store address
|
|
319
256
|
* @param {*} [options] Override http request option.
|
|
320
257
|
* @throws {RequiredError}
|
|
321
258
|
*/
|
|
322
|
-
|
|
323
|
-
const localVarPath = `/shipping/
|
|
259
|
+
getStoreAddress: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
260
|
+
const localVarPath = `/shipping/store/address`;
|
|
324
261
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
325
262
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
326
263
|
let baseOptions;
|
|
@@ -359,72 +296,6 @@ export const ShippingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
359
296
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
360
297
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
361
298
|
|
|
362
|
-
return {
|
|
363
|
-
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
364
|
-
options: localVarRequestOptions,
|
|
365
|
-
};
|
|
366
|
-
},
|
|
367
|
-
/**
|
|
368
|
-
*
|
|
369
|
-
* @summary Update zone
|
|
370
|
-
* @param {UpdateZoneDto} body
|
|
371
|
-
* @param {string} zoneId
|
|
372
|
-
* @param {*} [options] Override http request option.
|
|
373
|
-
* @throws {RequiredError}
|
|
374
|
-
*/
|
|
375
|
-
updateZone: async (body: UpdateZoneDto, zoneId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
376
|
-
// verify required parameter 'body' is not null or undefined
|
|
377
|
-
if (body === null || body === undefined) {
|
|
378
|
-
throw new RequiredError('body','Required parameter body was null or undefined when calling updateZone.');
|
|
379
|
-
}
|
|
380
|
-
// verify required parameter 'zoneId' is not null or undefined
|
|
381
|
-
if (zoneId === null || zoneId === undefined) {
|
|
382
|
-
throw new RequiredError('zoneId','Required parameter zoneId was null or undefined when calling updateZone.');
|
|
383
|
-
}
|
|
384
|
-
const localVarPath = `/shipping/zones/{zoneId}`
|
|
385
|
-
.replace(`{${"zoneId"}}`, encodeURIComponent(String(zoneId)));
|
|
386
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
387
|
-
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
388
|
-
let baseOptions;
|
|
389
|
-
if (configuration) {
|
|
390
|
-
baseOptions = configuration.baseOptions;
|
|
391
|
-
}
|
|
392
|
-
const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options};
|
|
393
|
-
const localVarHeaderParameter = {} as any;
|
|
394
|
-
const localVarQueryParameter = {} as any;
|
|
395
|
-
|
|
396
|
-
// authentication bearer required
|
|
397
|
-
// http bearer authentication required
|
|
398
|
-
if (configuration && configuration.accessToken) {
|
|
399
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
400
|
-
? await configuration.accessToken()
|
|
401
|
-
: await configuration.accessToken;
|
|
402
|
-
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
// authentication x-store-key required
|
|
406
|
-
if (configuration && configuration.apiKey) {
|
|
407
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
408
|
-
? await configuration.apiKey("x-store-key")
|
|
409
|
-
: await configuration.apiKey;
|
|
410
|
-
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
414
|
-
|
|
415
|
-
const query = new URLSearchParams(localVarUrlObj.search);
|
|
416
|
-
for (const key in localVarQueryParameter) {
|
|
417
|
-
query.set(key, localVarQueryParameter[key]);
|
|
418
|
-
}
|
|
419
|
-
for (const key in options.params) {
|
|
420
|
-
query.set(key, options.params[key]);
|
|
421
|
-
}
|
|
422
|
-
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
423
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
424
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
425
|
-
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
426
|
-
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
427
|
-
|
|
428
299
|
return {
|
|
429
300
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
430
301
|
options: localVarRequestOptions,
|
|
@@ -439,20 +310,6 @@ export const ShippingApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
439
310
|
*/
|
|
440
311
|
export const ShippingApiFp = function(configuration?: Configuration) {
|
|
441
312
|
return {
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
* @summary Create zone
|
|
445
|
-
* @param {CreateZoneDto} body
|
|
446
|
-
* @param {*} [options] Override http request option.
|
|
447
|
-
* @throws {RequiredError}
|
|
448
|
-
*/
|
|
449
|
-
async createZone(body: CreateZoneDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Zone>>> {
|
|
450
|
-
const localVarAxiosArgs = await ShippingApiAxiosParamCreator(configuration).createZone(body, options);
|
|
451
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
452
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
453
|
-
return axios.request(axiosRequestArgs);
|
|
454
|
-
};
|
|
455
|
-
},
|
|
456
313
|
/**
|
|
457
314
|
*
|
|
458
315
|
* @summary Get all shipments
|
|
@@ -510,27 +367,12 @@ export const ShippingApiFp = function(configuration?: Configuration) {
|
|
|
510
367
|
},
|
|
511
368
|
/**
|
|
512
369
|
*
|
|
513
|
-
* @summary Get
|
|
514
|
-
* @param {*} [options] Override http request option.
|
|
515
|
-
* @throws {RequiredError}
|
|
516
|
-
*/
|
|
517
|
-
async getZones(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Array<Zone>>>> {
|
|
518
|
-
const localVarAxiosArgs = await ShippingApiAxiosParamCreator(configuration).getZones(options);
|
|
519
|
-
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
520
|
-
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
521
|
-
return axios.request(axiosRequestArgs);
|
|
522
|
-
};
|
|
523
|
-
},
|
|
524
|
-
/**
|
|
525
|
-
*
|
|
526
|
-
* @summary Update zone
|
|
527
|
-
* @param {UpdateZoneDto} body
|
|
528
|
-
* @param {string} zoneId
|
|
370
|
+
* @summary Get store address
|
|
529
371
|
* @param {*} [options] Override http request option.
|
|
530
372
|
* @throws {RequiredError}
|
|
531
373
|
*/
|
|
532
|
-
async
|
|
533
|
-
const localVarAxiosArgs = await ShippingApiAxiosParamCreator(configuration).
|
|
374
|
+
async getStoreAddress(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<any>>> {
|
|
375
|
+
const localVarAxiosArgs = await ShippingApiAxiosParamCreator(configuration).getStoreAddress(options);
|
|
534
376
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
535
377
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
536
378
|
return axios.request(axiosRequestArgs);
|
|
@@ -545,16 +387,6 @@ export const ShippingApiFp = function(configuration?: Configuration) {
|
|
|
545
387
|
*/
|
|
546
388
|
export const ShippingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
547
389
|
return {
|
|
548
|
-
/**
|
|
549
|
-
*
|
|
550
|
-
* @summary Create zone
|
|
551
|
-
* @param {CreateZoneDto} body
|
|
552
|
-
* @param {*} [options] Override http request option.
|
|
553
|
-
* @throws {RequiredError}
|
|
554
|
-
*/
|
|
555
|
-
async createZone(body: CreateZoneDto, options?: AxiosRequestConfig): Promise<AxiosResponse<Zone>> {
|
|
556
|
-
return ShippingApiFp(configuration).createZone(body, options).then((request) => request(axios, basePath));
|
|
557
|
-
},
|
|
558
390
|
/**
|
|
559
391
|
*
|
|
560
392
|
* @summary Get all shipments
|
|
@@ -596,23 +428,12 @@ export const ShippingApiFactory = function (configuration?: Configuration, baseP
|
|
|
596
428
|
},
|
|
597
429
|
/**
|
|
598
430
|
*
|
|
599
|
-
* @summary Get
|
|
431
|
+
* @summary Get store address
|
|
600
432
|
* @param {*} [options] Override http request option.
|
|
601
433
|
* @throws {RequiredError}
|
|
602
434
|
*/
|
|
603
|
-
async
|
|
604
|
-
return ShippingApiFp(configuration).
|
|
605
|
-
},
|
|
606
|
-
/**
|
|
607
|
-
*
|
|
608
|
-
* @summary Update zone
|
|
609
|
-
* @param {UpdateZoneDto} body
|
|
610
|
-
* @param {string} zoneId
|
|
611
|
-
* @param {*} [options] Override http request option.
|
|
612
|
-
* @throws {RequiredError}
|
|
613
|
-
*/
|
|
614
|
-
async updateZone(body: UpdateZoneDto, zoneId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Zone>> {
|
|
615
|
-
return ShippingApiFp(configuration).updateZone(body, zoneId, options).then((request) => request(axios, basePath));
|
|
435
|
+
async getStoreAddress(options?: AxiosRequestConfig): Promise<AxiosResponse<any>> {
|
|
436
|
+
return ShippingApiFp(configuration).getStoreAddress(options).then((request) => request(axios, basePath));
|
|
616
437
|
},
|
|
617
438
|
};
|
|
618
439
|
};
|
|
@@ -624,17 +445,6 @@ export const ShippingApiFactory = function (configuration?: Configuration, baseP
|
|
|
624
445
|
* @extends {BaseAPI}
|
|
625
446
|
*/
|
|
626
447
|
export class ShippingApi extends BaseAPI {
|
|
627
|
-
/**
|
|
628
|
-
*
|
|
629
|
-
* @summary Create zone
|
|
630
|
-
* @param {CreateZoneDto} body
|
|
631
|
-
* @param {*} [options] Override http request option.
|
|
632
|
-
* @throws {RequiredError}
|
|
633
|
-
* @memberof ShippingApi
|
|
634
|
-
*/
|
|
635
|
-
public async createZone(body: CreateZoneDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<Zone>> {
|
|
636
|
-
return ShippingApiFp(this.configuration).createZone(body, options).then((request) => request(this.axios, this.basePath));
|
|
637
|
-
}
|
|
638
448
|
/**
|
|
639
449
|
*
|
|
640
450
|
* @summary Get all shipments
|
|
@@ -680,24 +490,12 @@ export class ShippingApi extends BaseAPI {
|
|
|
680
490
|
}
|
|
681
491
|
/**
|
|
682
492
|
*
|
|
683
|
-
* @summary Get
|
|
684
|
-
* @param {*} [options] Override http request option.
|
|
685
|
-
* @throws {RequiredError}
|
|
686
|
-
* @memberof ShippingApi
|
|
687
|
-
*/
|
|
688
|
-
public async getZones(options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Zone>>> {
|
|
689
|
-
return ShippingApiFp(this.configuration).getZones(options).then((request) => request(this.axios, this.basePath));
|
|
690
|
-
}
|
|
691
|
-
/**
|
|
692
|
-
*
|
|
693
|
-
* @summary Update zone
|
|
694
|
-
* @param {UpdateZoneDto} body
|
|
695
|
-
* @param {string} zoneId
|
|
493
|
+
* @summary Get store address
|
|
696
494
|
* @param {*} [options] Override http request option.
|
|
697
495
|
* @throws {RequiredError}
|
|
698
496
|
* @memberof ShippingApi
|
|
699
497
|
*/
|
|
700
|
-
public async
|
|
701
|
-
return ShippingApiFp(this.configuration).
|
|
498
|
+
public async getStoreAddress(options?: AxiosRequestConfig) : Promise<AxiosResponse<any>> {
|
|
499
|
+
return ShippingApiFp(this.configuration).getStoreAddress(options).then((request) => request(this.axios, this.basePath));
|
|
702
500
|
}
|
|
703
501
|
}
|
|
@@ -31,10 +31,4 @@ export interface CategoryFilters {
|
|
|
31
31
|
* @memberof CategoryFilters
|
|
32
32
|
*/
|
|
33
33
|
priceRange: PriceRange;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {{ [key: string]: { [key: string]: number; }; }}
|
|
37
|
-
* @memberof CategoryFilters
|
|
38
|
-
*/
|
|
39
|
-
attributes: { [key: string]: { [key: string]: number; }; };
|
|
40
34
|
}
|
|
@@ -37,12 +37,6 @@ export interface CreateVariantDto {
|
|
|
37
37
|
* @memberof CreateVariantDto
|
|
38
38
|
*/
|
|
39
39
|
description: string;
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {{ [key: string]: string; }}
|
|
43
|
-
* @memberof CreateVariantDto
|
|
44
|
-
*/
|
|
45
|
-
attribute: { [key: string]: string; };
|
|
46
40
|
/**
|
|
47
41
|
*
|
|
48
42
|
* @type {number}
|