@infisale-client/api-client 1.2.73 → 1.2.74
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/api/api.d.ts +521 -37
- package/dist/api/api.js +226 -21
- package/dist/api/api.mjs +224 -19
- package/package.json +2 -2
package/dist/api/api.js
CHANGED
|
@@ -17,8 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.PaymentGatewayEnum = exports.PageTypeEnum = exports.OrderStatusEnum = exports.OrderShippedStatusEnum = exports.OrderReturnStatusEnumWAITINGRETURN = exports.OrderReturnStatusEnumRETURNED = exports.OrderReturnStatusEnum = exports.OrderPaymentStatusEnum = exports.OrderEnum = exports.OperationStatusEnum = exports.NotificationStatusEnum = exports.NotificationMessageEnum = exports.NavigationUrlTargetEnum = exports.LanguageEnum = exports.IUserCollectionQueryParamsDateFieldEnum = exports.IProductCollectionQueryParamsSortEnum = exports.IProductCollectionQueryParamsDateFieldEnum = exports.IPlanCollectionQueryParamsDateFieldEnum = exports.IPageCollectionQueryParamsDateFieldEnum = exports.IOrderCollectionQueryParamsDateFieldEnum = exports.IOperationCollectionQueryParamsDateFieldEnum = exports.INotificationCollectionQueryParamsDateFieldEnum = exports.IMyOrderCollectionQueryParamsDateFieldEnum = exports.IFileCollectionQueryParamsDateFieldEnum = exports.IContactFormCollectionQueryParamsDateFieldEnum = exports.ICompanyUsersCollectionQueryParamsDateFieldEnum = exports.ICompanyCollectionQueryParamsDateFieldEnum = exports.ICollectionCollectionsQueryParamsDateFieldEnum = exports.ICategoryCollectionQueryParamsDateFieldEnum = exports.IBrandCollectionQueryParamsDateFieldEnum = exports.FontSizeEnum = exports.FileTypeEnum = exports.FileStatusEnum = exports.FileKeywordEnum = exports.EmailConfigDnsRecordTypeEnum = exports.CurrencyRateTypeEnum = exports.CurrencyEnum = exports.CountryEnum = exports.ContentStatusEnum = exports.ContentPositionYEnum = exports.ContentPositionXEnum = exports.ComponentTypeEnum = exports.ComponentProductTypeEnum = exports.ComponentProductOrderEnum = exports.ComponentProductListTypeEnum = exports.ComponentContentTypeEnum = exports.CompanyUserStatusEnum = exports.CompanyTypeEnum = exports.CompanyStatusEnum = exports.ButtonVariantEnum = void 0;
|
|
20
|
-
exports.
|
|
21
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.SitemapApi = exports.SitemapApiFactory = exports.SitemapApiFp = exports.SitemapApiAxiosParamCreator = exports.GetProductsSortEnum = exports.GetProductsDateFieldEnum = exports.ProductApi = exports.ProductApiFactory = void 0;
|
|
20
|
+
exports.GetPagesDateFieldEnum = exports.PageApi = exports.PageApiFactory = exports.PageApiFp = exports.PageApiAxiosParamCreator = exports.GetOrdersDateFieldEnum = exports.GetMyOrdersDateFieldEnum = exports.OrderApi = exports.OrderApiFactory = exports.OrderApiFp = exports.OrderApiAxiosParamCreator = exports.ContactFormApi = exports.ContactFormApiFactory = exports.ContactFormApiFp = exports.ContactFormApiAxiosParamCreator = exports.CompanyApi = exports.CompanyApiFactory = exports.CompanyApiFp = exports.CompanyApiAxiosParamCreator = exports.GetCollectionsDateFieldEnum = exports.CollectionApi = exports.CollectionApiFactory = exports.CollectionApiFp = exports.CollectionApiAxiosParamCreator = exports.BasketApi = exports.BasketApiFactory = exports.BasketApiFp = exports.BasketApiAxiosParamCreator = exports.AuthApi = exports.AuthApiFactory = exports.AuthApiFp = exports.AuthApiAxiosParamCreator = exports.AddressApi = exports.AddressApiFactory = exports.AddressApiFp = exports.AddressApiAxiosParamCreator = exports.UserStatusEnum = exports.UserRoleEnum = exports.UniquePageTypeEnum = exports.TimezoneEnum = exports.TemplateTypeEnum = exports.SitemapTypeEnum = exports.ShippingPricingTypeEnum = exports.ReviewStatusEnum = exports.ProductDetailImageZoomTypeEnum = exports.PlanTypeEnum = exports.PlanStatusEnum = exports.PlanCurrencyEnum = exports.PickICollectionQueryParamsExcludeKeyofICollectionQueryParamsSortDateFieldEnum = exports.PaymentMethodEnum = void 0;
|
|
21
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.SitemapApi = exports.SitemapApiFactory = exports.SitemapApiFp = exports.SitemapApiAxiosParamCreator = exports.GetProductsSortEnum = exports.GetProductsDateFieldEnum = exports.ProductApi = exports.ProductApiFactory = exports.ProductApiFp = exports.ProductApiAxiosParamCreator = void 0;
|
|
22
22
|
const axios_1 = __importDefault(require("axios"));
|
|
23
23
|
// Some imports not used depending on template conditions
|
|
24
24
|
// @ts-ignore
|
|
@@ -573,7 +573,9 @@ exports.IProductCollectionQueryParamsDateFieldEnum = {
|
|
|
573
573
|
exports.IProductCollectionQueryParamsSortEnum = {
|
|
574
574
|
PRICE: 'price',
|
|
575
575
|
CREATED_AT: 'createdAt',
|
|
576
|
-
TOTAL_SALE: 'totalSale'
|
|
576
|
+
TOTAL_SALE: 'totalSale',
|
|
577
|
+
RATING: 'rating',
|
|
578
|
+
REVIEW_COUNT: 'reviewCount'
|
|
577
579
|
};
|
|
578
580
|
exports.IUserCollectionQueryParamsDateFieldEnum = {
|
|
579
581
|
CREATED_AT: 'createdAt',
|
|
@@ -767,6 +769,16 @@ exports.ProductDetailImageZoomTypeEnum = {
|
|
|
767
769
|
DIALOG: 'dialog',
|
|
768
770
|
NONE: 'none'
|
|
769
771
|
};
|
|
772
|
+
/**
|
|
773
|
+
*
|
|
774
|
+
* @export
|
|
775
|
+
* @enum {string}
|
|
776
|
+
*/
|
|
777
|
+
exports.ReviewStatusEnum = {
|
|
778
|
+
WAITING_APPROVAL: 'waiting_approval',
|
|
779
|
+
APPROVED: 'approved',
|
|
780
|
+
REJECTED: 'rejected'
|
|
781
|
+
};
|
|
770
782
|
/**
|
|
771
783
|
*
|
|
772
784
|
* @export
|
|
@@ -847,6 +859,18 @@ exports.TimezoneEnum = {
|
|
|
847
859
|
UTC1300: 'UTC+13:00',
|
|
848
860
|
UTC1400: 'UTC+14:00'
|
|
849
861
|
};
|
|
862
|
+
/**
|
|
863
|
+
*
|
|
864
|
+
* @export
|
|
865
|
+
* @enum {string}
|
|
866
|
+
*/
|
|
867
|
+
exports.UniquePageTypeEnum = {
|
|
868
|
+
HOME: 'home',
|
|
869
|
+
CART: 'cart',
|
|
870
|
+
CHECKOUT: 'checkout',
|
|
871
|
+
SEARCH: 'search',
|
|
872
|
+
NOT_FOUND: 'not-found'
|
|
873
|
+
};
|
|
850
874
|
/**
|
|
851
875
|
*
|
|
852
876
|
* @export
|
|
@@ -2468,6 +2492,35 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
|
2468
2492
|
options: localVarRequestOptions,
|
|
2469
2493
|
};
|
|
2470
2494
|
},
|
|
2495
|
+
/**
|
|
2496
|
+
*
|
|
2497
|
+
* @param {IOrderReviewPostRequest} iOrderReviewPostRequest
|
|
2498
|
+
* @param {*} [options] Override http request option.
|
|
2499
|
+
* @throws {RequiredError}
|
|
2500
|
+
*/
|
|
2501
|
+
createReview: async (iOrderReviewPostRequest, options = {}) => {
|
|
2502
|
+
// verify required parameter 'iOrderReviewPostRequest' is not null or undefined
|
|
2503
|
+
(0, common_1.assertParamExists)('createReview', 'iOrderReviewPostRequest', iOrderReviewPostRequest);
|
|
2504
|
+
const localVarPath = `/api/orders/reviews`;
|
|
2505
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2506
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2507
|
+
let baseOptions;
|
|
2508
|
+
if (configuration) {
|
|
2509
|
+
baseOptions = configuration.baseOptions;
|
|
2510
|
+
}
|
|
2511
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2512
|
+
const localVarHeaderParameter = {};
|
|
2513
|
+
const localVarQueryParameter = {};
|
|
2514
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2515
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2516
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2517
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2518
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iOrderReviewPostRequest, localVarRequestOptions, configuration);
|
|
2519
|
+
return {
|
|
2520
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2521
|
+
options: localVarRequestOptions,
|
|
2522
|
+
};
|
|
2523
|
+
},
|
|
2471
2524
|
/**
|
|
2472
2525
|
*
|
|
2473
2526
|
* @param {number} [page]
|
|
@@ -2634,6 +2687,39 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
|
2634
2687
|
options: localVarRequestOptions,
|
|
2635
2688
|
};
|
|
2636
2689
|
},
|
|
2690
|
+
/**
|
|
2691
|
+
*
|
|
2692
|
+
* @param {string} id
|
|
2693
|
+
* @param {IReviewPatchRequest} iReviewPatchRequest
|
|
2694
|
+
* @param {*} [options] Override http request option.
|
|
2695
|
+
* @throws {RequiredError}
|
|
2696
|
+
*/
|
|
2697
|
+
updateReview: async (id, iReviewPatchRequest, options = {}) => {
|
|
2698
|
+
// verify required parameter 'id' is not null or undefined
|
|
2699
|
+
(0, common_1.assertParamExists)('updateReview', 'id', id);
|
|
2700
|
+
// verify required parameter 'iReviewPatchRequest' is not null or undefined
|
|
2701
|
+
(0, common_1.assertParamExists)('updateReview', 'iReviewPatchRequest', iReviewPatchRequest);
|
|
2702
|
+
const localVarPath = `/api/orders/reviews/{id}`
|
|
2703
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2704
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2705
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2706
|
+
let baseOptions;
|
|
2707
|
+
if (configuration) {
|
|
2708
|
+
baseOptions = configuration.baseOptions;
|
|
2709
|
+
}
|
|
2710
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
|
|
2711
|
+
const localVarHeaderParameter = {};
|
|
2712
|
+
const localVarQueryParameter = {};
|
|
2713
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2714
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2715
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2716
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2717
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iReviewPatchRequest, localVarRequestOptions, configuration);
|
|
2718
|
+
return {
|
|
2719
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2720
|
+
options: localVarRequestOptions,
|
|
2721
|
+
};
|
|
2722
|
+
},
|
|
2637
2723
|
};
|
|
2638
2724
|
};
|
|
2639
2725
|
exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
|
|
@@ -2669,6 +2755,18 @@ const OrderApiFp = function (configuration) {
|
|
|
2669
2755
|
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createReturn']?.[localVarOperationServerIndex]?.url;
|
|
2670
2756
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2671
2757
|
},
|
|
2758
|
+
/**
|
|
2759
|
+
*
|
|
2760
|
+
* @param {IOrderReviewPostRequest} iOrderReviewPostRequest
|
|
2761
|
+
* @param {*} [options] Override http request option.
|
|
2762
|
+
* @throws {RequiredError}
|
|
2763
|
+
*/
|
|
2764
|
+
async createReview(iOrderReviewPostRequest, options) {
|
|
2765
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createReview(iOrderReviewPostRequest, options);
|
|
2766
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2767
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createReview']?.[localVarOperationServerIndex]?.url;
|
|
2768
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2769
|
+
},
|
|
2672
2770
|
/**
|
|
2673
2771
|
*
|
|
2674
2772
|
* @param {number} [page]
|
|
@@ -2723,6 +2821,19 @@ const OrderApiFp = function (configuration) {
|
|
|
2723
2821
|
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
2724
2822
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2725
2823
|
},
|
|
2824
|
+
/**
|
|
2825
|
+
*
|
|
2826
|
+
* @param {string} id
|
|
2827
|
+
* @param {IReviewPatchRequest} iReviewPatchRequest
|
|
2828
|
+
* @param {*} [options] Override http request option.
|
|
2829
|
+
* @throws {RequiredError}
|
|
2830
|
+
*/
|
|
2831
|
+
async updateReview(id, iReviewPatchRequest, options) {
|
|
2832
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateReview(id, iReviewPatchRequest, options);
|
|
2833
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2834
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.updateReview']?.[localVarOperationServerIndex]?.url;
|
|
2835
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2836
|
+
},
|
|
2726
2837
|
};
|
|
2727
2838
|
};
|
|
2728
2839
|
exports.OrderApiFp = OrderApiFp;
|
|
@@ -2751,6 +2862,15 @@ const OrderApiFactory = function (configuration, basePath, axios) {
|
|
|
2751
2862
|
createReturn(requestParameters, options) {
|
|
2752
2863
|
return localVarFp.createReturn(requestParameters.id, requestParameters.iOrderReturnPostRequest, options).then((request) => request(axios, basePath));
|
|
2753
2864
|
},
|
|
2865
|
+
/**
|
|
2866
|
+
*
|
|
2867
|
+
* @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
|
|
2868
|
+
* @param {*} [options] Override http request option.
|
|
2869
|
+
* @throws {RequiredError}
|
|
2870
|
+
*/
|
|
2871
|
+
createReview(requestParameters, options) {
|
|
2872
|
+
return localVarFp.createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(axios, basePath));
|
|
2873
|
+
},
|
|
2754
2874
|
/**
|
|
2755
2875
|
*
|
|
2756
2876
|
* @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
|
|
@@ -2778,6 +2898,15 @@ const OrderApiFactory = function (configuration, basePath, axios) {
|
|
|
2778
2898
|
getOrders(requestParameters, options) {
|
|
2779
2899
|
return localVarFp.getOrders(requestParameters.company, requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.user, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
2780
2900
|
},
|
|
2901
|
+
/**
|
|
2902
|
+
*
|
|
2903
|
+
* @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
|
|
2904
|
+
* @param {*} [options] Override http request option.
|
|
2905
|
+
* @throws {RequiredError}
|
|
2906
|
+
*/
|
|
2907
|
+
updateReview(requestParameters, options) {
|
|
2908
|
+
return localVarFp.updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(axios, basePath));
|
|
2909
|
+
},
|
|
2781
2910
|
};
|
|
2782
2911
|
};
|
|
2783
2912
|
exports.OrderApiFactory = OrderApiFactory;
|
|
@@ -2808,6 +2937,16 @@ class OrderApi extends base_1.BaseAPI {
|
|
|
2808
2937
|
createReturn(requestParameters, options) {
|
|
2809
2938
|
return (0, exports.OrderApiFp)(this.configuration).createReturn(requestParameters.id, requestParameters.iOrderReturnPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2810
2939
|
}
|
|
2940
|
+
/**
|
|
2941
|
+
*
|
|
2942
|
+
* @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
|
|
2943
|
+
* @param {*} [options] Override http request option.
|
|
2944
|
+
* @throws {RequiredError}
|
|
2945
|
+
* @memberof OrderApi
|
|
2946
|
+
*/
|
|
2947
|
+
createReview(requestParameters, options) {
|
|
2948
|
+
return (0, exports.OrderApiFp)(this.configuration).createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2949
|
+
}
|
|
2811
2950
|
/**
|
|
2812
2951
|
*
|
|
2813
2952
|
* @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
|
|
@@ -2838,6 +2977,16 @@ class OrderApi extends base_1.BaseAPI {
|
|
|
2838
2977
|
getOrders(requestParameters, options) {
|
|
2839
2978
|
return (0, exports.OrderApiFp)(this.configuration).getOrders(requestParameters.company, requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.sort, requestParameters.user, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
|
2840
2979
|
}
|
|
2980
|
+
/**
|
|
2981
|
+
*
|
|
2982
|
+
* @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
|
|
2983
|
+
* @param {*} [options] Override http request option.
|
|
2984
|
+
* @throws {RequiredError}
|
|
2985
|
+
* @memberof OrderApi
|
|
2986
|
+
*/
|
|
2987
|
+
updateReview(requestParameters, options) {
|
|
2988
|
+
return (0, exports.OrderApiFp)(this.configuration).updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2989
|
+
}
|
|
2841
2990
|
}
|
|
2842
2991
|
exports.OrderApi = OrderApi;
|
|
2843
2992
|
/**
|
|
@@ -2898,7 +3047,7 @@ const PageApiAxiosParamCreator = function (configuration) {
|
|
|
2898
3047
|
},
|
|
2899
3048
|
/**
|
|
2900
3049
|
*
|
|
2901
|
-
* @param {
|
|
3050
|
+
* @param {UniquePageTypeEnum} type
|
|
2902
3051
|
* @param {string} [companyId]
|
|
2903
3052
|
* @param {string} [domain]
|
|
2904
3053
|
* @param {string} [template]
|
|
@@ -3038,7 +3187,7 @@ const PageApiFp = function (configuration) {
|
|
|
3038
3187
|
},
|
|
3039
3188
|
/**
|
|
3040
3189
|
*
|
|
3041
|
-
* @param {
|
|
3190
|
+
* @param {UniquePageTypeEnum} type
|
|
3042
3191
|
* @param {string} [companyId]
|
|
3043
3192
|
* @param {string} [domain]
|
|
3044
3193
|
* @param {string} [template]
|
|
@@ -3202,6 +3351,38 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3202
3351
|
options: localVarRequestOptions,
|
|
3203
3352
|
};
|
|
3204
3353
|
},
|
|
3354
|
+
/**
|
|
3355
|
+
*
|
|
3356
|
+
* @param {string} id
|
|
3357
|
+
* @param {number} [rating]
|
|
3358
|
+
* @param {*} [options] Override http request option.
|
|
3359
|
+
* @throws {RequiredError}
|
|
3360
|
+
*/
|
|
3361
|
+
getProductReviews: async (id, rating, options = {}) => {
|
|
3362
|
+
// verify required parameter 'id' is not null or undefined
|
|
3363
|
+
(0, common_1.assertParamExists)('getProductReviews', 'id', id);
|
|
3364
|
+
const localVarPath = `/api/products/{id}/reviews`
|
|
3365
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3366
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3367
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3368
|
+
let baseOptions;
|
|
3369
|
+
if (configuration) {
|
|
3370
|
+
baseOptions = configuration.baseOptions;
|
|
3371
|
+
}
|
|
3372
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
3373
|
+
const localVarHeaderParameter = {};
|
|
3374
|
+
const localVarQueryParameter = {};
|
|
3375
|
+
if (rating !== undefined) {
|
|
3376
|
+
localVarQueryParameter['rating'] = rating;
|
|
3377
|
+
}
|
|
3378
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3379
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3380
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3381
|
+
return {
|
|
3382
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3383
|
+
options: localVarRequestOptions,
|
|
3384
|
+
};
|
|
3385
|
+
},
|
|
3205
3386
|
/**
|
|
3206
3387
|
*
|
|
3207
3388
|
* @param {number} [page]
|
|
@@ -3220,14 +3401,12 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3220
3401
|
* @param {number} [priceGte]
|
|
3221
3402
|
* @param {number} [priceLte]
|
|
3222
3403
|
* @param {boolean} [autoComplete]
|
|
3223
|
-
* @param {Array<string>} [mainVariant]
|
|
3224
|
-
* @param {Array<string>} [subVariant]
|
|
3225
3404
|
* @param {GetProductsSortEnum} [sort]
|
|
3226
3405
|
* @param {ContentStatusEnum} [status]
|
|
3227
3406
|
* @param {*} [options] Override http request option.
|
|
3228
3407
|
* @throws {RequiredError}
|
|
3229
3408
|
*/
|
|
3230
|
-
getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete,
|
|
3409
|
+
getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options = {}) => {
|
|
3231
3410
|
const localVarPath = `/api/products`;
|
|
3232
3411
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3233
3412
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3290,12 +3469,6 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3290
3469
|
if (autoComplete !== undefined) {
|
|
3291
3470
|
localVarQueryParameter['autoComplete'] = autoComplete;
|
|
3292
3471
|
}
|
|
3293
|
-
if (mainVariant) {
|
|
3294
|
-
localVarQueryParameter['mainVariant'] = mainVariant;
|
|
3295
|
-
}
|
|
3296
|
-
if (subVariant) {
|
|
3297
|
-
localVarQueryParameter['subVariant'] = subVariant;
|
|
3298
|
-
}
|
|
3299
3472
|
if (sort !== undefined) {
|
|
3300
3473
|
localVarQueryParameter['sort'] = sort;
|
|
3301
3474
|
}
|
|
@@ -3334,6 +3507,19 @@ const ProductApiFp = function (configuration) {
|
|
|
3334
3507
|
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProductBySlug']?.[localVarOperationServerIndex]?.url;
|
|
3335
3508
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3336
3509
|
},
|
|
3510
|
+
/**
|
|
3511
|
+
*
|
|
3512
|
+
* @param {string} id
|
|
3513
|
+
* @param {number} [rating]
|
|
3514
|
+
* @param {*} [options] Override http request option.
|
|
3515
|
+
* @throws {RequiredError}
|
|
3516
|
+
*/
|
|
3517
|
+
async getProductReviews(id, rating, options) {
|
|
3518
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductReviews(id, rating, options);
|
|
3519
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3520
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProductReviews']?.[localVarOperationServerIndex]?.url;
|
|
3521
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3522
|
+
},
|
|
3337
3523
|
/**
|
|
3338
3524
|
*
|
|
3339
3525
|
* @param {number} [page]
|
|
@@ -3352,15 +3538,13 @@ const ProductApiFp = function (configuration) {
|
|
|
3352
3538
|
* @param {number} [priceGte]
|
|
3353
3539
|
* @param {number} [priceLte]
|
|
3354
3540
|
* @param {boolean} [autoComplete]
|
|
3355
|
-
* @param {Array<string>} [mainVariant]
|
|
3356
|
-
* @param {Array<string>} [subVariant]
|
|
3357
3541
|
* @param {GetProductsSortEnum} [sort]
|
|
3358
3542
|
* @param {ContentStatusEnum} [status]
|
|
3359
3543
|
* @param {*} [options] Override http request option.
|
|
3360
3544
|
* @throws {RequiredError}
|
|
3361
3545
|
*/
|
|
3362
|
-
async getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete,
|
|
3363
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete,
|
|
3546
|
+
async getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options) {
|
|
3547
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options);
|
|
3364
3548
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3365
3549
|
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProducts']?.[localVarOperationServerIndex]?.url;
|
|
3366
3550
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -3384,6 +3568,15 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
3384
3568
|
getProductBySlug(requestParameters, options) {
|
|
3385
3569
|
return localVarFp.getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(axios, basePath));
|
|
3386
3570
|
},
|
|
3571
|
+
/**
|
|
3572
|
+
*
|
|
3573
|
+
* @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
|
|
3574
|
+
* @param {*} [options] Override http request option.
|
|
3575
|
+
* @throws {RequiredError}
|
|
3576
|
+
*/
|
|
3577
|
+
getProductReviews(requestParameters, options) {
|
|
3578
|
+
return localVarFp.getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(axios, basePath));
|
|
3579
|
+
},
|
|
3387
3580
|
/**
|
|
3388
3581
|
*
|
|
3389
3582
|
* @param {ProductApiGetProductsRequest} requestParameters Request parameters.
|
|
@@ -3391,7 +3584,7 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
3391
3584
|
* @throws {RequiredError}
|
|
3392
3585
|
*/
|
|
3393
3586
|
getProducts(requestParameters = {}, options) {
|
|
3394
|
-
return localVarFp.getProducts(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.companyId, requestParameters.domain, requestParameters.collections, requestParameters.category, requestParameters.brand, requestParameters.inStock, requestParameters.priceGte, requestParameters.priceLte, requestParameters.autoComplete, requestParameters.
|
|
3587
|
+
return localVarFp.getProducts(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.companyId, requestParameters.domain, requestParameters.collections, requestParameters.category, requestParameters.brand, requestParameters.inStock, requestParameters.priceGte, requestParameters.priceLte, requestParameters.autoComplete, requestParameters.sort, requestParameters.status, options).then((request) => request(axios, basePath));
|
|
3395
3588
|
},
|
|
3396
3589
|
};
|
|
3397
3590
|
};
|
|
@@ -3413,6 +3606,16 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
3413
3606
|
getProductBySlug(requestParameters, options) {
|
|
3414
3607
|
return (0, exports.ProductApiFp)(this.configuration).getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(this.axios, this.basePath));
|
|
3415
3608
|
}
|
|
3609
|
+
/**
|
|
3610
|
+
*
|
|
3611
|
+
* @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
|
|
3612
|
+
* @param {*} [options] Override http request option.
|
|
3613
|
+
* @throws {RequiredError}
|
|
3614
|
+
* @memberof ProductApi
|
|
3615
|
+
*/
|
|
3616
|
+
getProductReviews(requestParameters, options) {
|
|
3617
|
+
return (0, exports.ProductApiFp)(this.configuration).getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(this.axios, this.basePath));
|
|
3618
|
+
}
|
|
3416
3619
|
/**
|
|
3417
3620
|
*
|
|
3418
3621
|
* @param {ProductApiGetProductsRequest} requestParameters Request parameters.
|
|
@@ -3421,7 +3624,7 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
3421
3624
|
* @memberof ProductApi
|
|
3422
3625
|
*/
|
|
3423
3626
|
getProducts(requestParameters = {}, options) {
|
|
3424
|
-
return (0, exports.ProductApiFp)(this.configuration).getProducts(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.companyId, requestParameters.domain, requestParameters.collections, requestParameters.category, requestParameters.brand, requestParameters.inStock, requestParameters.priceGte, requestParameters.priceLte, requestParameters.autoComplete, requestParameters.
|
|
3627
|
+
return (0, exports.ProductApiFp)(this.configuration).getProducts(requestParameters.page, requestParameters.itemsPerPage, requestParameters.search, requestParameters.startDate, requestParameters.endDate, requestParameters.dateField, requestParameters.order, requestParameters.companyId, requestParameters.domain, requestParameters.collections, requestParameters.category, requestParameters.brand, requestParameters.inStock, requestParameters.priceGte, requestParameters.priceLte, requestParameters.autoComplete, requestParameters.sort, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
|
|
3425
3628
|
}
|
|
3426
3629
|
}
|
|
3427
3630
|
exports.ProductApi = ProductApi;
|
|
@@ -3438,7 +3641,9 @@ exports.GetProductsDateFieldEnum = {
|
|
|
3438
3641
|
exports.GetProductsSortEnum = {
|
|
3439
3642
|
PRICE: 'price',
|
|
3440
3643
|
CREATED_AT: 'createdAt',
|
|
3441
|
-
TOTAL_SALE: 'totalSale'
|
|
3644
|
+
TOTAL_SALE: 'totalSale',
|
|
3645
|
+
RATING: 'rating',
|
|
3646
|
+
REVIEW_COUNT: 'reviewCount'
|
|
3442
3647
|
};
|
|
3443
3648
|
/**
|
|
3444
3649
|
* SitemapApi - axios parameter creator
|