hey-pharmacist-ecommerce 1.1.42 → 1.1.44
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/README.md +70 -8
- package/dist/index.d.mts +2550 -3081
- package/dist/index.d.ts +2550 -3081
- package/dist/index.js +506 -399
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +506 -397
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/AccountOverviewTab.tsx +5 -5
- package/src/components/AccountReviewsTab.tsx +4 -4
- package/src/components/CartItem.tsx +15 -15
- package/src/components/Header.tsx +1 -1
- package/src/components/Notification.tsx +3 -3
- package/src/components/OrderCard.tsx +1 -1
- package/src/components/ProductCard.tsx +11 -11
- package/src/components/QuickViewModal.tsx +16 -16
- package/src/components/RatingDistribution.tsx +2 -2
- package/src/components/ReviewCard.tsx +2 -2
- package/src/components/ReviewForm.tsx +3 -3
- package/src/components/ReviewPromptBanner.tsx +4 -4
- package/src/components/ReviewsList.tsx +9 -11
- package/src/components/StarRating.tsx +3 -3
- package/src/hooks/useProducts.ts +0 -1
- package/src/hooks/useSmartSearch.ts +68 -0
- package/src/lib/Apis/api.ts +1 -1
- package/src/lib/Apis/apis/analytics-api.ts +809 -0
- package/src/lib/Apis/apis/notifications-api.ts +8 -6
- package/src/lib/Apis/apis/products-api.ts +390 -15
- package/src/lib/Apis/apis/stores-api.ts +26 -149
- package/src/lib/Apis/apis/web-hooks-api.ts +8 -17
- package/src/lib/Apis/models/analytics-period-dto.ts +45 -0
- package/src/lib/Apis/models/appointment-overview-dto.ts +71 -0
- package/src/lib/Apis/models/category-sales-dto.ts +51 -0
- package/src/lib/Apis/models/create-store-dto.ts +12 -0
- package/src/lib/Apis/models/customer-overview-dto.ts +96 -0
- package/src/lib/Apis/models/{country-stats-response-dto.ts → customer-segment-dto.ts} +12 -13
- package/src/lib/Apis/models/dashboard-overview-dto.ts +70 -0
- package/src/lib/Apis/models/discount-overview-dto.ts +71 -0
- package/src/lib/Apis/models/group-with-no-users-dto.ts +0 -6
- package/src/lib/Apis/models/group-with-users-dto.ts +0 -6
- package/src/lib/Apis/models/index.ts +29 -38
- package/src/lib/Apis/models/{single-recipient-dto.ts → inline-response200.ts} +11 -10
- package/src/lib/Apis/models/{create-contact-dto.ts → inline-response2001.ts} +11 -11
- package/src/lib/Apis/models/inventory-alert-dto.ts +67 -0
- package/src/lib/Apis/models/notification-dto.ts +107 -0
- package/src/lib/Apis/models/notifications-paginated-response-dto.ts +58 -0
- package/src/lib/Apis/models/order-overview-dto.ts +89 -0
- package/src/lib/Apis/models/{single-link-stats-dto.ts → order-status-count-dto.ts} +10 -10
- package/src/lib/Apis/models/order.ts +0 -6
- package/src/lib/Apis/models/payout-history-item-dto.ts +45 -0
- package/src/lib/Apis/models/{single-country-stats-dto.ts → popular-time-slot-dto.ts} +10 -10
- package/src/lib/Apis/models/populated-order.ts +0 -6
- package/src/lib/Apis/models/preference-update-item.ts +1 -0
- package/src/lib/Apis/models/product-overview-dto.ts +90 -0
- package/src/lib/Apis/models/product.ts +6 -0
- package/src/lib/Apis/models/{create-contact-list-dto.ts → products-aidraft-body.ts} +4 -4
- package/src/lib/Apis/models/{schedule-campaign-draft-dto.ts → products-processimage-body.ts} +5 -5
- package/src/lib/Apis/models/{contact-full-response-dto.ts → rating-distribution-dto.ts} +9 -10
- package/src/lib/Apis/models/recent-review-dto.ts +63 -0
- package/src/lib/Apis/models/review-overview-dto.ts +65 -0
- package/src/lib/Apis/models/store-balance-dto.ts +39 -0
- package/src/lib/Apis/models/store-entity.ts +12 -0
- package/src/lib/Apis/models/{link-stats-response-dto.ts → store-finance-overview-dto.ts} +10 -15
- package/src/lib/Apis/models/store.ts +12 -0
- package/src/lib/Apis/models/{add-contact-to-list-dto.ts → time-series-point-dto.ts} +9 -9
- package/src/lib/Apis/models/{create-email-template-dto.ts → top-customer-dto.ts} +20 -14
- package/src/lib/Apis/models/{marketing-list-contact-dto.ts → top-discount-dto.ts} +12 -12
- package/src/lib/Apis/models/{single-browser-stats-dto.ts → top-product-dto.ts} +18 -12
- package/src/lib/Apis/models/{marketing-campaign-content-dto.ts → unread-count-dto.ts} +6 -6
- package/src/lib/Apis/models/update-store-dto.ts +12 -0
- package/src/lib/Apis/models/update-user-dto.ts +0 -6
- package/src/lib/Apis/models/user-group.ts +0 -6
- package/src/lib/Apis/models/user-with-no-id.ts +0 -6
- package/src/lib/Apis/sharedConfig.ts +1 -1
- package/src/screens/CartScreen.tsx +10 -10
- package/src/screens/CheckoutScreen.tsx +12 -12
- package/src/screens/OrderReviewsScreen.tsx +6 -6
- package/src/screens/ProductDetailScreen.tsx +40 -40
- package/src/screens/SearchResultsScreen.tsx +17 -21
- package/src/screens/ShopScreen.tsx +20 -82
- package/src/lib/Apis/apis/marketing-api.ts +0 -3099
- package/src/lib/Apis/models/api-key-info-dto.ts +0 -49
- package/src/lib/Apis/models/browser-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-content-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-dto.ts +0 -175
- package/src/lib/Apis/models/campaign-draft-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-schedule-dto.ts +0 -49
- package/src/lib/Apis/models/campaign-draft-schedule-response-dto.ts +0 -40
- package/src/lib/Apis/models/campaign-draft-sending-dto.ts +0 -43
- package/src/lib/Apis/models/campaign-draft-sending-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-aggregated-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-full-dto.ts +0 -93
- package/src/lib/Apis/models/contact-list-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/contact-lists-response-dto.ts +0 -40
- package/src/lib/Apis/models/create-marketing-campaign-dto.ts +0 -81
- package/src/lib/Apis/models/email-template-response-dto.ts +0 -117
- package/src/lib/Apis/models/general-stats-response-dto.ts +0 -40
- package/src/lib/Apis/models/send-test-email-dto.ts +0 -28
- package/src/lib/Apis/models/single-contact-aggregated-stats-dto.ts +0 -129
- package/src/lib/Apis/models/single-contact-list-stats-dto.ts +0 -117
- package/src/lib/Apis/models/single-general-stats.ts +0 -153
- package/src/lib/Apis/models/store-api-keys-response-dto.ts +0 -34
- package/src/lib/Apis/models/update-api-keys-dto.ts +0 -39
- package/src/lib/Apis/models/update-campaign-draft-content-dto.ts +0 -27
- package/src/lib/Apis/models/update-marketing-camp-draft-dto.ts +0 -81
|
@@ -17,6 +17,8 @@ import { Configuration } from '../configuration';
|
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
19
|
import { BulkChannelToggleDto } from '../models';
|
|
20
|
+
import { NotificationsPaginatedResponseDto } from '../models';
|
|
21
|
+
import { UnreadCountDto } from '../models';
|
|
20
22
|
import { UpdateNotificationSettingsDto } from '../models';
|
|
21
23
|
/**
|
|
22
24
|
* NotificationsApi - axios parameter creator
|
|
@@ -511,7 +513,7 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
511
513
|
* @param {*} [options] Override http request option.
|
|
512
514
|
* @throws {RequiredError}
|
|
513
515
|
*/
|
|
514
|
-
async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<
|
|
516
|
+
async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<NotificationsPaginatedResponseDto>>> {
|
|
515
517
|
const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).getNotifications(page, limit, unreadOnly, options);
|
|
516
518
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
517
519
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
@@ -537,7 +539,7 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
|
537
539
|
* @param {*} [options] Override http request option.
|
|
538
540
|
* @throws {RequiredError}
|
|
539
541
|
*/
|
|
540
|
-
async getUnreadCount(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<
|
|
542
|
+
async getUnreadCount(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<UnreadCountDto>>> {
|
|
541
543
|
const localVarAxiosArgs = await NotificationsApiAxiosParamCreator(configuration).getUnreadCount(options);
|
|
542
544
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
543
545
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
@@ -637,7 +639,7 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
637
639
|
* @param {*} [options] Override http request option.
|
|
638
640
|
* @throws {RequiredError}
|
|
639
641
|
*/
|
|
640
|
-
async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<
|
|
642
|
+
async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<NotificationsPaginatedResponseDto>> {
|
|
641
643
|
return NotificationsApiFp(configuration).getNotifications(page, limit, unreadOnly, options).then((request) => request(axios, basePath));
|
|
642
644
|
},
|
|
643
645
|
/**
|
|
@@ -655,7 +657,7 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
|
|
|
655
657
|
* @param {*} [options] Override http request option.
|
|
656
658
|
* @throws {RequiredError}
|
|
657
659
|
*/
|
|
658
|
-
async getUnreadCount(options?: AxiosRequestConfig): Promise<AxiosResponse<
|
|
660
|
+
async getUnreadCount(options?: AxiosRequestConfig): Promise<AxiosResponse<UnreadCountDto>> {
|
|
659
661
|
return NotificationsApiFp(configuration).getUnreadCount(options).then((request) => request(axios, basePath));
|
|
660
662
|
},
|
|
661
663
|
/**
|
|
@@ -739,7 +741,7 @@ export class NotificationsApi extends BaseAPI {
|
|
|
739
741
|
* @throws {RequiredError}
|
|
740
742
|
* @memberof NotificationsApi
|
|
741
743
|
*/
|
|
742
|
-
public async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<
|
|
744
|
+
public async getNotifications(page?: number, limit?: number, unreadOnly?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<NotificationsPaginatedResponseDto>> {
|
|
743
745
|
return NotificationsApiFp(this.configuration).getNotifications(page, limit, unreadOnly, options).then((request) => request(this.axios, this.basePath));
|
|
744
746
|
}
|
|
745
747
|
/**
|
|
@@ -759,7 +761,7 @@ export class NotificationsApi extends BaseAPI {
|
|
|
759
761
|
* @throws {RequiredError}
|
|
760
762
|
* @memberof NotificationsApi
|
|
761
763
|
*/
|
|
762
|
-
public async getUnreadCount(options?: AxiosRequestConfig) : Promise<AxiosResponse<
|
|
764
|
+
public async getUnreadCount(options?: AxiosRequestConfig) : Promise<AxiosResponse<UnreadCountDto>> {
|
|
763
765
|
return NotificationsApiFp(this.configuration).getUnreadCount(options).then((request) => request(this.axios, this.basePath));
|
|
764
766
|
}
|
|
765
767
|
/**
|
|
@@ -18,9 +18,12 @@ import { Configuration } from '../configuration';
|
|
|
18
18
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
19
|
import { CreateProductDto } from '../models';
|
|
20
20
|
import { CreateVariantDto } from '../models';
|
|
21
|
+
import { InlineResponse200 } from '../models';
|
|
22
|
+
import { InlineResponse2001 } from '../models';
|
|
21
23
|
import { PaginatedProductsDto } from '../models';
|
|
22
24
|
import { Product } from '../models';
|
|
23
25
|
import { ProductLightDto } from '../models';
|
|
26
|
+
import { ProductsAidraftBody } from '../models';
|
|
24
27
|
import { ProductsInsightsDto } from '../models';
|
|
25
28
|
import { ReorderProductsDto } from '../models';
|
|
26
29
|
import { ReorderProductsSuccessResponseDto } from '../models';
|
|
@@ -339,6 +342,66 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
339
342
|
options: localVarRequestOptions,
|
|
340
343
|
};
|
|
341
344
|
},
|
|
345
|
+
/**
|
|
346
|
+
*
|
|
347
|
+
* @summary Generate a product draft using AI
|
|
348
|
+
* @param {ProductsAidraftBody} body
|
|
349
|
+
* @param {*} [options] Override http request option.
|
|
350
|
+
* @throws {RequiredError}
|
|
351
|
+
*/
|
|
352
|
+
generateAiDraft: async (body: ProductsAidraftBody, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
353
|
+
// verify required parameter 'body' is not null or undefined
|
|
354
|
+
if (body === null || body === undefined) {
|
|
355
|
+
throw new RequiredError('body','Required parameter body was null or undefined when calling generateAiDraft.');
|
|
356
|
+
}
|
|
357
|
+
const localVarPath = `/products/ai-draft`;
|
|
358
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
359
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
360
|
+
let baseOptions;
|
|
361
|
+
if (configuration) {
|
|
362
|
+
baseOptions = configuration.baseOptions;
|
|
363
|
+
}
|
|
364
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
365
|
+
const localVarHeaderParameter = {} as any;
|
|
366
|
+
const localVarQueryParameter = {} as any;
|
|
367
|
+
|
|
368
|
+
// authentication bearer required
|
|
369
|
+
// http bearer authentication required
|
|
370
|
+
if (configuration && configuration.accessToken) {
|
|
371
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
372
|
+
? await configuration.accessToken()
|
|
373
|
+
: await configuration.accessToken;
|
|
374
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// authentication x-store-key required
|
|
378
|
+
if (configuration && configuration.apiKey) {
|
|
379
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
380
|
+
? await configuration.apiKey("x-store-key")
|
|
381
|
+
: await configuration.apiKey;
|
|
382
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
386
|
+
|
|
387
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
388
|
+
for (const key in localVarQueryParameter) {
|
|
389
|
+
query.set(key, localVarQueryParameter[key]);
|
|
390
|
+
}
|
|
391
|
+
for (const key in options.params) {
|
|
392
|
+
query.set(key, options.params[key]);
|
|
393
|
+
}
|
|
394
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
395
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
396
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
397
|
+
const needsSerialization = (typeof body !== "string") || (localVarRequestOptions.headers ||= {})['Content-Type'] === 'application/json';
|
|
398
|
+
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
|
399
|
+
|
|
400
|
+
return {
|
|
401
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
402
|
+
options: localVarRequestOptions,
|
|
403
|
+
};
|
|
404
|
+
},
|
|
342
405
|
/**
|
|
343
406
|
*
|
|
344
407
|
* @summary [DEPRECATED] Use GET /products/all?categoryId=:id instead
|
|
@@ -450,7 +513,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
450
513
|
/**
|
|
451
514
|
*
|
|
452
515
|
* @summary Get all products with filtering and pagination
|
|
453
|
-
* @param {string} [searchTerm]
|
|
454
516
|
* @param {number} [maxPrice]
|
|
455
517
|
* @param {number} [minPrice]
|
|
456
518
|
* @param {string} [brandFilter] Comma-separated brand names
|
|
@@ -464,7 +526,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
464
526
|
* @param {*} [options] Override http request option.
|
|
465
527
|
* @throws {RequiredError}
|
|
466
528
|
*/
|
|
467
|
-
getAllProducts: async (
|
|
529
|
+
getAllProducts: async (maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, subCategoryId?: string, categoryId?: string, isActive?: boolean, limit?: number, page?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
468
530
|
const localVarPath = `/products/all`;
|
|
469
531
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
470
532
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
@@ -493,10 +555,6 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
493
555
|
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
494
556
|
}
|
|
495
557
|
|
|
496
|
-
if (searchTerm !== undefined) {
|
|
497
|
-
localVarQueryParameter['searchTerm'] = searchTerm;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
558
|
if (maxPrice !== undefined) {
|
|
501
559
|
localVarQueryParameter['maxPrice'] = maxPrice;
|
|
502
560
|
}
|
|
@@ -1057,6 +1115,121 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
1057
1115
|
options: localVarRequestOptions,
|
|
1058
1116
|
};
|
|
1059
1117
|
},
|
|
1118
|
+
/**
|
|
1119
|
+
*
|
|
1120
|
+
* @summary Process image using PhotoRoom (remove background)
|
|
1121
|
+
* @param {Blob} image
|
|
1122
|
+
* @param {*} [options] Override http request option.
|
|
1123
|
+
* @throws {RequiredError}
|
|
1124
|
+
*/
|
|
1125
|
+
processImageForm: async (image: Blob, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1126
|
+
// verify required parameter 'image' is not null or undefined
|
|
1127
|
+
if (image === null || image === undefined) {
|
|
1128
|
+
throw new RequiredError('image','Required parameter image was null or undefined when calling processImageForm.');
|
|
1129
|
+
}
|
|
1130
|
+
const localVarPath = `/products/process-image`;
|
|
1131
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1132
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1133
|
+
let baseOptions;
|
|
1134
|
+
if (configuration) {
|
|
1135
|
+
baseOptions = configuration.baseOptions;
|
|
1136
|
+
}
|
|
1137
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
1138
|
+
const localVarHeaderParameter = {} as any;
|
|
1139
|
+
const localVarQueryParameter = {} as any;
|
|
1140
|
+
const localVarFormParams = new FormData();
|
|
1141
|
+
|
|
1142
|
+
// authentication bearer required
|
|
1143
|
+
// http bearer authentication required
|
|
1144
|
+
if (configuration && configuration.accessToken) {
|
|
1145
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
1146
|
+
? await configuration.accessToken()
|
|
1147
|
+
: await configuration.accessToken;
|
|
1148
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// authentication x-store-key required
|
|
1152
|
+
if (configuration && configuration.apiKey) {
|
|
1153
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1154
|
+
? await configuration.apiKey("x-store-key")
|
|
1155
|
+
: await configuration.apiKey;
|
|
1156
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
if (image !== undefined) {
|
|
1161
|
+
localVarFormParams.append('image', image as any);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
1165
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1166
|
+
for (const key in localVarQueryParameter) {
|
|
1167
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1168
|
+
}
|
|
1169
|
+
for (const key in options.params) {
|
|
1170
|
+
query.set(key, options.params[key]);
|
|
1171
|
+
}
|
|
1172
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1173
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1174
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1175
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
1176
|
+
|
|
1177
|
+
return {
|
|
1178
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1179
|
+
options: localVarRequestOptions,
|
|
1180
|
+
};
|
|
1181
|
+
},
|
|
1182
|
+
/**
|
|
1183
|
+
* Generates AI embeddings for all products. Run this once after enabling smart search, or to refresh all embeddings.
|
|
1184
|
+
* @summary Reindex all product embeddings for smart search
|
|
1185
|
+
* @param {*} [options] Override http request option.
|
|
1186
|
+
* @throws {RequiredError}
|
|
1187
|
+
*/
|
|
1188
|
+
reindexEmbeddings: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1189
|
+
const localVarPath = `/products/reindex-embeddings`;
|
|
1190
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1191
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1192
|
+
let baseOptions;
|
|
1193
|
+
if (configuration) {
|
|
1194
|
+
baseOptions = configuration.baseOptions;
|
|
1195
|
+
}
|
|
1196
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
1197
|
+
const localVarHeaderParameter = {} as any;
|
|
1198
|
+
const localVarQueryParameter = {} as any;
|
|
1199
|
+
|
|
1200
|
+
// authentication bearer required
|
|
1201
|
+
// http bearer authentication required
|
|
1202
|
+
if (configuration && configuration.accessToken) {
|
|
1203
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
1204
|
+
? await configuration.accessToken()
|
|
1205
|
+
: await configuration.accessToken;
|
|
1206
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// authentication x-store-key required
|
|
1210
|
+
if (configuration && configuration.apiKey) {
|
|
1211
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1212
|
+
? await configuration.apiKey("x-store-key")
|
|
1213
|
+
: await configuration.apiKey;
|
|
1214
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1218
|
+
for (const key in localVarQueryParameter) {
|
|
1219
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1220
|
+
}
|
|
1221
|
+
for (const key in options.params) {
|
|
1222
|
+
query.set(key, options.params[key]);
|
|
1223
|
+
}
|
|
1224
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1225
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1226
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1227
|
+
|
|
1228
|
+
return {
|
|
1229
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1230
|
+
options: localVarRequestOptions,
|
|
1231
|
+
};
|
|
1232
|
+
},
|
|
1060
1233
|
/**
|
|
1061
1234
|
*
|
|
1062
1235
|
* @summary Reorder products within a category or subcategory
|
|
@@ -1117,6 +1290,71 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
1117
1290
|
options: localVarRequestOptions,
|
|
1118
1291
|
};
|
|
1119
1292
|
},
|
|
1293
|
+
/**
|
|
1294
|
+
* Search products using natural language. Handles typos, synonyms, and returns related products ranked by relevance.
|
|
1295
|
+
* @summary Smart search using AI-powered semantic similarity
|
|
1296
|
+
* @param {string} searchTerm Search query (e.g., \"headache medicine\", \"iphn 12\")
|
|
1297
|
+
* @param {number} [limit] Maximum results (default: 20)
|
|
1298
|
+
* @param {*} [options] Override http request option.
|
|
1299
|
+
* @throws {RequiredError}
|
|
1300
|
+
*/
|
|
1301
|
+
smartSearch: async (searchTerm: string, limit?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1302
|
+
// verify required parameter 'searchTerm' is not null or undefined
|
|
1303
|
+
if (searchTerm === null || searchTerm === undefined) {
|
|
1304
|
+
throw new RequiredError('searchTerm','Required parameter searchTerm was null or undefined when calling smartSearch.');
|
|
1305
|
+
}
|
|
1306
|
+
const localVarPath = `/products/search`;
|
|
1307
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1308
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
1309
|
+
let baseOptions;
|
|
1310
|
+
if (configuration) {
|
|
1311
|
+
baseOptions = configuration.baseOptions;
|
|
1312
|
+
}
|
|
1313
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
1314
|
+
const localVarHeaderParameter = {} as any;
|
|
1315
|
+
const localVarQueryParameter = {} as any;
|
|
1316
|
+
|
|
1317
|
+
// authentication bearer required
|
|
1318
|
+
// http bearer authentication required
|
|
1319
|
+
if (configuration && configuration.accessToken) {
|
|
1320
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
1321
|
+
? await configuration.accessToken()
|
|
1322
|
+
: await configuration.accessToken;
|
|
1323
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// authentication x-store-key required
|
|
1327
|
+
if (configuration && configuration.apiKey) {
|
|
1328
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
1329
|
+
? await configuration.apiKey("x-store-key")
|
|
1330
|
+
: await configuration.apiKey;
|
|
1331
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
if (searchTerm !== undefined) {
|
|
1335
|
+
localVarQueryParameter['searchTerm'] = searchTerm;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
if (limit !== undefined) {
|
|
1339
|
+
localVarQueryParameter['limit'] = limit;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
1343
|
+
for (const key in localVarQueryParameter) {
|
|
1344
|
+
query.set(key, localVarQueryParameter[key]);
|
|
1345
|
+
}
|
|
1346
|
+
for (const key in options.params) {
|
|
1347
|
+
query.set(key, options.params[key]);
|
|
1348
|
+
}
|
|
1349
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
1350
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1351
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1352
|
+
|
|
1353
|
+
return {
|
|
1354
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
1355
|
+
options: localVarRequestOptions,
|
|
1356
|
+
};
|
|
1357
|
+
},
|
|
1120
1358
|
/**
|
|
1121
1359
|
*
|
|
1122
1360
|
* @summary Update variant inventory (add or subtract)
|
|
@@ -1408,6 +1646,20 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1408
1646
|
return axios.request(axiosRequestArgs);
|
|
1409
1647
|
};
|
|
1410
1648
|
},
|
|
1649
|
+
/**
|
|
1650
|
+
*
|
|
1651
|
+
* @summary Generate a product draft using AI
|
|
1652
|
+
* @param {ProductsAidraftBody} body
|
|
1653
|
+
* @param {*} [options] Override http request option.
|
|
1654
|
+
* @throws {RequiredError}
|
|
1655
|
+
*/
|
|
1656
|
+
async generateAiDraft(body: ProductsAidraftBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<CreateProductDto>>> {
|
|
1657
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).generateAiDraft(body, options);
|
|
1658
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1659
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1660
|
+
return axios.request(axiosRequestArgs);
|
|
1661
|
+
};
|
|
1662
|
+
},
|
|
1411
1663
|
/**
|
|
1412
1664
|
*
|
|
1413
1665
|
* @summary [DEPRECATED] Use GET /products/all?categoryId=:id instead
|
|
@@ -1438,7 +1690,6 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1438
1690
|
/**
|
|
1439
1691
|
*
|
|
1440
1692
|
* @summary Get all products with filtering and pagination
|
|
1441
|
-
* @param {string} [searchTerm]
|
|
1442
1693
|
* @param {number} [maxPrice]
|
|
1443
1694
|
* @param {number} [minPrice]
|
|
1444
1695
|
* @param {string} [brandFilter] Comma-separated brand names
|
|
@@ -1452,8 +1703,8 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1452
1703
|
* @param {*} [options] Override http request option.
|
|
1453
1704
|
* @throws {RequiredError}
|
|
1454
1705
|
*/
|
|
1455
|
-
async getAllProducts(
|
|
1456
|
-
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).getAllProducts(
|
|
1706
|
+
async getAllProducts(maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, subCategoryId?: string, categoryId?: string, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<PaginatedProductsDto>>> {
|
|
1707
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).getAllProducts(maxPrice, minPrice, brandFilter, availability, sort, subCategoryId, categoryId, isActive, limit, page, options);
|
|
1457
1708
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1458
1709
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1459
1710
|
return axios.request(axiosRequestArgs);
|
|
@@ -1584,6 +1835,33 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1584
1835
|
return axios.request(axiosRequestArgs);
|
|
1585
1836
|
};
|
|
1586
1837
|
},
|
|
1838
|
+
/**
|
|
1839
|
+
*
|
|
1840
|
+
* @summary Process image using PhotoRoom (remove background)
|
|
1841
|
+
* @param {Blob} image
|
|
1842
|
+
* @param {*} [options] Override http request option.
|
|
1843
|
+
* @throws {RequiredError}
|
|
1844
|
+
*/
|
|
1845
|
+
async processImageForm(image: Blob, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<string>>> {
|
|
1846
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).processImageForm(image, options);
|
|
1847
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1848
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1849
|
+
return axios.request(axiosRequestArgs);
|
|
1850
|
+
};
|
|
1851
|
+
},
|
|
1852
|
+
/**
|
|
1853
|
+
* Generates AI embeddings for all products. Run this once after enabling smart search, or to refresh all embeddings.
|
|
1854
|
+
* @summary Reindex all product embeddings for smart search
|
|
1855
|
+
* @param {*} [options] Override http request option.
|
|
1856
|
+
* @throws {RequiredError}
|
|
1857
|
+
*/
|
|
1858
|
+
async reindexEmbeddings(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<InlineResponse2001>>> {
|
|
1859
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).reindexEmbeddings(options);
|
|
1860
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1861
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1862
|
+
return axios.request(axiosRequestArgs);
|
|
1863
|
+
};
|
|
1864
|
+
},
|
|
1587
1865
|
/**
|
|
1588
1866
|
*
|
|
1589
1867
|
* @summary Reorder products within a category or subcategory
|
|
@@ -1598,6 +1876,21 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1598
1876
|
return axios.request(axiosRequestArgs);
|
|
1599
1877
|
};
|
|
1600
1878
|
},
|
|
1879
|
+
/**
|
|
1880
|
+
* Search products using natural language. Handles typos, synonyms, and returns related products ranked by relevance.
|
|
1881
|
+
* @summary Smart search using AI-powered semantic similarity
|
|
1882
|
+
* @param {string} searchTerm Search query (e.g., \"headache medicine\", \"iphn 12\")
|
|
1883
|
+
* @param {number} [limit] Maximum results (default: 20)
|
|
1884
|
+
* @param {*} [options] Override http request option.
|
|
1885
|
+
* @throws {RequiredError}
|
|
1886
|
+
*/
|
|
1887
|
+
async smartSearch(searchTerm: string, limit?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<InlineResponse200>>> {
|
|
1888
|
+
const localVarAxiosArgs = await ProductsApiAxiosParamCreator(configuration).smartSearch(searchTerm, limit, options);
|
|
1889
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
1890
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
1891
|
+
return axios.request(axiosRequestArgs);
|
|
1892
|
+
};
|
|
1893
|
+
},
|
|
1601
1894
|
/**
|
|
1602
1895
|
*
|
|
1603
1896
|
* @summary Update variant inventory (add or subtract)
|
|
@@ -1706,6 +1999,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1706
1999
|
async deleteVariant(productId: string, variantId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Product>> {
|
|
1707
2000
|
return ProductsApiFp(configuration).deleteVariant(productId, variantId, options).then((request) => request(axios, basePath));
|
|
1708
2001
|
},
|
|
2002
|
+
/**
|
|
2003
|
+
*
|
|
2004
|
+
* @summary Generate a product draft using AI
|
|
2005
|
+
* @param {ProductsAidraftBody} body
|
|
2006
|
+
* @param {*} [options] Override http request option.
|
|
2007
|
+
* @throws {RequiredError}
|
|
2008
|
+
*/
|
|
2009
|
+
async generateAiDraft(body: ProductsAidraftBody, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateProductDto>> {
|
|
2010
|
+
return ProductsApiFp(configuration).generateAiDraft(body, options).then((request) => request(axios, basePath));
|
|
2011
|
+
},
|
|
1709
2012
|
/**
|
|
1710
2013
|
*
|
|
1711
2014
|
* @summary [DEPRECATED] Use GET /products/all?categoryId=:id instead
|
|
@@ -1728,7 +2031,6 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1728
2031
|
/**
|
|
1729
2032
|
*
|
|
1730
2033
|
* @summary Get all products with filtering and pagination
|
|
1731
|
-
* @param {string} [searchTerm]
|
|
1732
2034
|
* @param {number} [maxPrice]
|
|
1733
2035
|
* @param {number} [minPrice]
|
|
1734
2036
|
* @param {string} [brandFilter] Comma-separated brand names
|
|
@@ -1742,8 +2044,8 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1742
2044
|
* @param {*} [options] Override http request option.
|
|
1743
2045
|
* @throws {RequiredError}
|
|
1744
2046
|
*/
|
|
1745
|
-
async getAllProducts(
|
|
1746
|
-
return ProductsApiFp(configuration).getAllProducts(
|
|
2047
|
+
async getAllProducts(maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, subCategoryId?: string, categoryId?: string, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
2048
|
+
return ProductsApiFp(configuration).getAllProducts(maxPrice, minPrice, brandFilter, availability, sort, subCategoryId, categoryId, isActive, limit, page, options).then((request) => request(axios, basePath));
|
|
1747
2049
|
},
|
|
1748
2050
|
/**
|
|
1749
2051
|
*
|
|
@@ -1834,6 +2136,25 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1834
2136
|
async getTopSellingProducts(limit?: number, page?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
1835
2137
|
return ProductsApiFp(configuration).getTopSellingProducts(limit, page, options).then((request) => request(axios, basePath));
|
|
1836
2138
|
},
|
|
2139
|
+
/**
|
|
2140
|
+
*
|
|
2141
|
+
* @summary Process image using PhotoRoom (remove background)
|
|
2142
|
+
* @param {Blob} image
|
|
2143
|
+
* @param {*} [options] Override http request option.
|
|
2144
|
+
* @throws {RequiredError}
|
|
2145
|
+
*/
|
|
2146
|
+
async processImageForm(image: Blob, options?: AxiosRequestConfig): Promise<AxiosResponse<string>> {
|
|
2147
|
+
return ProductsApiFp(configuration).processImageForm(image, options).then((request) => request(axios, basePath));
|
|
2148
|
+
},
|
|
2149
|
+
/**
|
|
2150
|
+
* Generates AI embeddings for all products. Run this once after enabling smart search, or to refresh all embeddings.
|
|
2151
|
+
* @summary Reindex all product embeddings for smart search
|
|
2152
|
+
* @param {*} [options] Override http request option.
|
|
2153
|
+
* @throws {RequiredError}
|
|
2154
|
+
*/
|
|
2155
|
+
async reindexEmbeddings(options?: AxiosRequestConfig): Promise<AxiosResponse<InlineResponse2001>> {
|
|
2156
|
+
return ProductsApiFp(configuration).reindexEmbeddings(options).then((request) => request(axios, basePath));
|
|
2157
|
+
},
|
|
1837
2158
|
/**
|
|
1838
2159
|
*
|
|
1839
2160
|
* @summary Reorder products within a category or subcategory
|
|
@@ -1844,6 +2165,17 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1844
2165
|
async reorderProducts(body: ReorderProductsDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReorderProductsSuccessResponseDto>> {
|
|
1845
2166
|
return ProductsApiFp(configuration).reorderProducts(body, options).then((request) => request(axios, basePath));
|
|
1846
2167
|
},
|
|
2168
|
+
/**
|
|
2169
|
+
* Search products using natural language. Handles typos, synonyms, and returns related products ranked by relevance.
|
|
2170
|
+
* @summary Smart search using AI-powered semantic similarity
|
|
2171
|
+
* @param {string} searchTerm Search query (e.g., \"headache medicine\", \"iphn 12\")
|
|
2172
|
+
* @param {number} [limit] Maximum results (default: 20)
|
|
2173
|
+
* @param {*} [options] Override http request option.
|
|
2174
|
+
* @throws {RequiredError}
|
|
2175
|
+
*/
|
|
2176
|
+
async smartSearch(searchTerm: string, limit?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<InlineResponse200>> {
|
|
2177
|
+
return ProductsApiFp(configuration).smartSearch(searchTerm, limit, options).then((request) => request(axios, basePath));
|
|
2178
|
+
},
|
|
1847
2179
|
/**
|
|
1848
2180
|
*
|
|
1849
2181
|
* @summary Update variant inventory (add or subtract)
|
|
@@ -1946,6 +2278,17 @@ export class ProductsApi extends BaseAPI {
|
|
|
1946
2278
|
public async deleteVariant(productId: string, variantId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Product>> {
|
|
1947
2279
|
return ProductsApiFp(this.configuration).deleteVariant(productId, variantId, options).then((request) => request(this.axios, this.basePath));
|
|
1948
2280
|
}
|
|
2281
|
+
/**
|
|
2282
|
+
*
|
|
2283
|
+
* @summary Generate a product draft using AI
|
|
2284
|
+
* @param {ProductsAidraftBody} body
|
|
2285
|
+
* @param {*} [options] Override http request option.
|
|
2286
|
+
* @throws {RequiredError}
|
|
2287
|
+
* @memberof ProductsApi
|
|
2288
|
+
*/
|
|
2289
|
+
public async generateAiDraft(body: ProductsAidraftBody, options?: AxiosRequestConfig) : Promise<AxiosResponse<CreateProductDto>> {
|
|
2290
|
+
return ProductsApiFp(this.configuration).generateAiDraft(body, options).then((request) => request(this.axios, this.basePath));
|
|
2291
|
+
}
|
|
1949
2292
|
/**
|
|
1950
2293
|
*
|
|
1951
2294
|
* @summary [DEPRECATED] Use GET /products/all?categoryId=:id instead
|
|
@@ -1970,7 +2313,6 @@ export class ProductsApi extends BaseAPI {
|
|
|
1970
2313
|
/**
|
|
1971
2314
|
*
|
|
1972
2315
|
* @summary Get all products with filtering and pagination
|
|
1973
|
-
* @param {string} [searchTerm]
|
|
1974
2316
|
* @param {number} [maxPrice]
|
|
1975
2317
|
* @param {number} [minPrice]
|
|
1976
2318
|
* @param {string} [brandFilter] Comma-separated brand names
|
|
@@ -1985,8 +2327,8 @@ export class ProductsApi extends BaseAPI {
|
|
|
1985
2327
|
* @throws {RequiredError}
|
|
1986
2328
|
* @memberof ProductsApi
|
|
1987
2329
|
*/
|
|
1988
|
-
public async getAllProducts(
|
|
1989
|
-
return ProductsApiFp(this.configuration).getAllProducts(
|
|
2330
|
+
public async getAllProducts(maxPrice?: number, minPrice?: number, brandFilter?: string, availability?: string, sort?: string, subCategoryId?: string, categoryId?: string, isActive?: boolean, limit?: number, page?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
2331
|
+
return ProductsApiFp(this.configuration).getAllProducts(maxPrice, minPrice, brandFilter, availability, sort, subCategoryId, categoryId, isActive, limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
1990
2332
|
}
|
|
1991
2333
|
/**
|
|
1992
2334
|
*
|
|
@@ -2086,6 +2428,27 @@ export class ProductsApi extends BaseAPI {
|
|
|
2086
2428
|
public async getTopSellingProducts(limit?: number, page?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<PaginatedProductsDto>> {
|
|
2087
2429
|
return ProductsApiFp(this.configuration).getTopSellingProducts(limit, page, options).then((request) => request(this.axios, this.basePath));
|
|
2088
2430
|
}
|
|
2431
|
+
/**
|
|
2432
|
+
*
|
|
2433
|
+
* @summary Process image using PhotoRoom (remove background)
|
|
2434
|
+
* @param {Blob} image
|
|
2435
|
+
* @param {*} [options] Override http request option.
|
|
2436
|
+
* @throws {RequiredError}
|
|
2437
|
+
* @memberof ProductsApi
|
|
2438
|
+
*/
|
|
2439
|
+
public async processImageForm(image: Blob, options?: AxiosRequestConfig) : Promise<AxiosResponse<string>> {
|
|
2440
|
+
return ProductsApiFp(this.configuration).processImageForm(image, options).then((request) => request(this.axios, this.basePath));
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Generates AI embeddings for all products. Run this once after enabling smart search, or to refresh all embeddings.
|
|
2444
|
+
* @summary Reindex all product embeddings for smart search
|
|
2445
|
+
* @param {*} [options] Override http request option.
|
|
2446
|
+
* @throws {RequiredError}
|
|
2447
|
+
* @memberof ProductsApi
|
|
2448
|
+
*/
|
|
2449
|
+
public async reindexEmbeddings(options?: AxiosRequestConfig) : Promise<AxiosResponse<InlineResponse2001>> {
|
|
2450
|
+
return ProductsApiFp(this.configuration).reindexEmbeddings(options).then((request) => request(this.axios, this.basePath));
|
|
2451
|
+
}
|
|
2089
2452
|
/**
|
|
2090
2453
|
*
|
|
2091
2454
|
* @summary Reorder products within a category or subcategory
|
|
@@ -2097,6 +2460,18 @@ export class ProductsApi extends BaseAPI {
|
|
|
2097
2460
|
public async reorderProducts(body: ReorderProductsDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReorderProductsSuccessResponseDto>> {
|
|
2098
2461
|
return ProductsApiFp(this.configuration).reorderProducts(body, options).then((request) => request(this.axios, this.basePath));
|
|
2099
2462
|
}
|
|
2463
|
+
/**
|
|
2464
|
+
* Search products using natural language. Handles typos, synonyms, and returns related products ranked by relevance.
|
|
2465
|
+
* @summary Smart search using AI-powered semantic similarity
|
|
2466
|
+
* @param {string} searchTerm Search query (e.g., \"headache medicine\", \"iphn 12\")
|
|
2467
|
+
* @param {number} [limit] Maximum results (default: 20)
|
|
2468
|
+
* @param {*} [options] Override http request option.
|
|
2469
|
+
* @throws {RequiredError}
|
|
2470
|
+
* @memberof ProductsApi
|
|
2471
|
+
*/
|
|
2472
|
+
public async smartSearch(searchTerm: string, limit?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<InlineResponse200>> {
|
|
2473
|
+
return ProductsApiFp(this.configuration).smartSearch(searchTerm, limit, options).then((request) => request(this.axios, this.basePath));
|
|
2474
|
+
}
|
|
2100
2475
|
/**
|
|
2101
2476
|
*
|
|
2102
2477
|
* @summary Update variant inventory (add or subtract)
|