@infisale-client/api-client 1.2.73 → 1.2.75
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 +508 -37
- package/dist/api/api.js +214 -21
- package/dist/api/api.mjs +212 -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.ProductApiAxiosParamCreator = 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.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 = 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
|
|
@@ -2468,6 +2480,35 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
|
2468
2480
|
options: localVarRequestOptions,
|
|
2469
2481
|
};
|
|
2470
2482
|
},
|
|
2483
|
+
/**
|
|
2484
|
+
*
|
|
2485
|
+
* @param {IOrderReviewPostRequest} iOrderReviewPostRequest
|
|
2486
|
+
* @param {*} [options] Override http request option.
|
|
2487
|
+
* @throws {RequiredError}
|
|
2488
|
+
*/
|
|
2489
|
+
createReview: async (iOrderReviewPostRequest, options = {}) => {
|
|
2490
|
+
// verify required parameter 'iOrderReviewPostRequest' is not null or undefined
|
|
2491
|
+
(0, common_1.assertParamExists)('createReview', 'iOrderReviewPostRequest', iOrderReviewPostRequest);
|
|
2492
|
+
const localVarPath = `/api/orders/reviews`;
|
|
2493
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2494
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2495
|
+
let baseOptions;
|
|
2496
|
+
if (configuration) {
|
|
2497
|
+
baseOptions = configuration.baseOptions;
|
|
2498
|
+
}
|
|
2499
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2500
|
+
const localVarHeaderParameter = {};
|
|
2501
|
+
const localVarQueryParameter = {};
|
|
2502
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2503
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2504
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2505
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2506
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iOrderReviewPostRequest, localVarRequestOptions, configuration);
|
|
2507
|
+
return {
|
|
2508
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2509
|
+
options: localVarRequestOptions,
|
|
2510
|
+
};
|
|
2511
|
+
},
|
|
2471
2512
|
/**
|
|
2472
2513
|
*
|
|
2473
2514
|
* @param {number} [page]
|
|
@@ -2634,6 +2675,39 @@ const OrderApiAxiosParamCreator = function (configuration) {
|
|
|
2634
2675
|
options: localVarRequestOptions,
|
|
2635
2676
|
};
|
|
2636
2677
|
},
|
|
2678
|
+
/**
|
|
2679
|
+
*
|
|
2680
|
+
* @param {string} id
|
|
2681
|
+
* @param {IReviewPatchRequest} iReviewPatchRequest
|
|
2682
|
+
* @param {*} [options] Override http request option.
|
|
2683
|
+
* @throws {RequiredError}
|
|
2684
|
+
*/
|
|
2685
|
+
updateReview: async (id, iReviewPatchRequest, options = {}) => {
|
|
2686
|
+
// verify required parameter 'id' is not null or undefined
|
|
2687
|
+
(0, common_1.assertParamExists)('updateReview', 'id', id);
|
|
2688
|
+
// verify required parameter 'iReviewPatchRequest' is not null or undefined
|
|
2689
|
+
(0, common_1.assertParamExists)('updateReview', 'iReviewPatchRequest', iReviewPatchRequest);
|
|
2690
|
+
const localVarPath = `/api/orders/reviews/{id}`
|
|
2691
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2692
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2693
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2694
|
+
let baseOptions;
|
|
2695
|
+
if (configuration) {
|
|
2696
|
+
baseOptions = configuration.baseOptions;
|
|
2697
|
+
}
|
|
2698
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
|
|
2699
|
+
const localVarHeaderParameter = {};
|
|
2700
|
+
const localVarQueryParameter = {};
|
|
2701
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2702
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2703
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2704
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2705
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(iReviewPatchRequest, localVarRequestOptions, configuration);
|
|
2706
|
+
return {
|
|
2707
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2708
|
+
options: localVarRequestOptions,
|
|
2709
|
+
};
|
|
2710
|
+
},
|
|
2637
2711
|
};
|
|
2638
2712
|
};
|
|
2639
2713
|
exports.OrderApiAxiosParamCreator = OrderApiAxiosParamCreator;
|
|
@@ -2669,6 +2743,18 @@ const OrderApiFp = function (configuration) {
|
|
|
2669
2743
|
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createReturn']?.[localVarOperationServerIndex]?.url;
|
|
2670
2744
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2671
2745
|
},
|
|
2746
|
+
/**
|
|
2747
|
+
*
|
|
2748
|
+
* @param {IOrderReviewPostRequest} iOrderReviewPostRequest
|
|
2749
|
+
* @param {*} [options] Override http request option.
|
|
2750
|
+
* @throws {RequiredError}
|
|
2751
|
+
*/
|
|
2752
|
+
async createReview(iOrderReviewPostRequest, options) {
|
|
2753
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createReview(iOrderReviewPostRequest, options);
|
|
2754
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2755
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.createReview']?.[localVarOperationServerIndex]?.url;
|
|
2756
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2757
|
+
},
|
|
2672
2758
|
/**
|
|
2673
2759
|
*
|
|
2674
2760
|
* @param {number} [page]
|
|
@@ -2723,6 +2809,19 @@ const OrderApiFp = function (configuration) {
|
|
|
2723
2809
|
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.getOrders']?.[localVarOperationServerIndex]?.url;
|
|
2724
2810
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2725
2811
|
},
|
|
2812
|
+
/**
|
|
2813
|
+
*
|
|
2814
|
+
* @param {string} id
|
|
2815
|
+
* @param {IReviewPatchRequest} iReviewPatchRequest
|
|
2816
|
+
* @param {*} [options] Override http request option.
|
|
2817
|
+
* @throws {RequiredError}
|
|
2818
|
+
*/
|
|
2819
|
+
async updateReview(id, iReviewPatchRequest, options) {
|
|
2820
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateReview(id, iReviewPatchRequest, options);
|
|
2821
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2822
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['OrderApi.updateReview']?.[localVarOperationServerIndex]?.url;
|
|
2823
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2824
|
+
},
|
|
2726
2825
|
};
|
|
2727
2826
|
};
|
|
2728
2827
|
exports.OrderApiFp = OrderApiFp;
|
|
@@ -2751,6 +2850,15 @@ const OrderApiFactory = function (configuration, basePath, axios) {
|
|
|
2751
2850
|
createReturn(requestParameters, options) {
|
|
2752
2851
|
return localVarFp.createReturn(requestParameters.id, requestParameters.iOrderReturnPostRequest, options).then((request) => request(axios, basePath));
|
|
2753
2852
|
},
|
|
2853
|
+
/**
|
|
2854
|
+
*
|
|
2855
|
+
* @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
|
|
2856
|
+
* @param {*} [options] Override http request option.
|
|
2857
|
+
* @throws {RequiredError}
|
|
2858
|
+
*/
|
|
2859
|
+
createReview(requestParameters, options) {
|
|
2860
|
+
return localVarFp.createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(axios, basePath));
|
|
2861
|
+
},
|
|
2754
2862
|
/**
|
|
2755
2863
|
*
|
|
2756
2864
|
* @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
|
|
@@ -2778,6 +2886,15 @@ const OrderApiFactory = function (configuration, basePath, axios) {
|
|
|
2778
2886
|
getOrders(requestParameters, options) {
|
|
2779
2887
|
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
2888
|
},
|
|
2889
|
+
/**
|
|
2890
|
+
*
|
|
2891
|
+
* @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
|
|
2892
|
+
* @param {*} [options] Override http request option.
|
|
2893
|
+
* @throws {RequiredError}
|
|
2894
|
+
*/
|
|
2895
|
+
updateReview(requestParameters, options) {
|
|
2896
|
+
return localVarFp.updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(axios, basePath));
|
|
2897
|
+
},
|
|
2781
2898
|
};
|
|
2782
2899
|
};
|
|
2783
2900
|
exports.OrderApiFactory = OrderApiFactory;
|
|
@@ -2808,6 +2925,16 @@ class OrderApi extends base_1.BaseAPI {
|
|
|
2808
2925
|
createReturn(requestParameters, options) {
|
|
2809
2926
|
return (0, exports.OrderApiFp)(this.configuration).createReturn(requestParameters.id, requestParameters.iOrderReturnPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2810
2927
|
}
|
|
2928
|
+
/**
|
|
2929
|
+
*
|
|
2930
|
+
* @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
|
|
2931
|
+
* @param {*} [options] Override http request option.
|
|
2932
|
+
* @throws {RequiredError}
|
|
2933
|
+
* @memberof OrderApi
|
|
2934
|
+
*/
|
|
2935
|
+
createReview(requestParameters, options) {
|
|
2936
|
+
return (0, exports.OrderApiFp)(this.configuration).createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2937
|
+
}
|
|
2811
2938
|
/**
|
|
2812
2939
|
*
|
|
2813
2940
|
* @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
|
|
@@ -2838,6 +2965,16 @@ class OrderApi extends base_1.BaseAPI {
|
|
|
2838
2965
|
getOrders(requestParameters, options) {
|
|
2839
2966
|
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
2967
|
}
|
|
2968
|
+
/**
|
|
2969
|
+
*
|
|
2970
|
+
* @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
|
|
2971
|
+
* @param {*} [options] Override http request option.
|
|
2972
|
+
* @throws {RequiredError}
|
|
2973
|
+
* @memberof OrderApi
|
|
2974
|
+
*/
|
|
2975
|
+
updateReview(requestParameters, options) {
|
|
2976
|
+
return (0, exports.OrderApiFp)(this.configuration).updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2977
|
+
}
|
|
2841
2978
|
}
|
|
2842
2979
|
exports.OrderApi = OrderApi;
|
|
2843
2980
|
/**
|
|
@@ -2898,7 +3035,7 @@ const PageApiAxiosParamCreator = function (configuration) {
|
|
|
2898
3035
|
},
|
|
2899
3036
|
/**
|
|
2900
3037
|
*
|
|
2901
|
-
* @param {
|
|
3038
|
+
* @param {PageTypeEnum} type
|
|
2902
3039
|
* @param {string} [companyId]
|
|
2903
3040
|
* @param {string} [domain]
|
|
2904
3041
|
* @param {string} [template]
|
|
@@ -3038,7 +3175,7 @@ const PageApiFp = function (configuration) {
|
|
|
3038
3175
|
},
|
|
3039
3176
|
/**
|
|
3040
3177
|
*
|
|
3041
|
-
* @param {
|
|
3178
|
+
* @param {PageTypeEnum} type
|
|
3042
3179
|
* @param {string} [companyId]
|
|
3043
3180
|
* @param {string} [domain]
|
|
3044
3181
|
* @param {string} [template]
|
|
@@ -3202,6 +3339,38 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3202
3339
|
options: localVarRequestOptions,
|
|
3203
3340
|
};
|
|
3204
3341
|
},
|
|
3342
|
+
/**
|
|
3343
|
+
*
|
|
3344
|
+
* @param {string} id
|
|
3345
|
+
* @param {number} [rating]
|
|
3346
|
+
* @param {*} [options] Override http request option.
|
|
3347
|
+
* @throws {RequiredError}
|
|
3348
|
+
*/
|
|
3349
|
+
getProductReviews: async (id, rating, options = {}) => {
|
|
3350
|
+
// verify required parameter 'id' is not null or undefined
|
|
3351
|
+
(0, common_1.assertParamExists)('getProductReviews', 'id', id);
|
|
3352
|
+
const localVarPath = `/api/products/{id}/reviews`
|
|
3353
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
3354
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3355
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3356
|
+
let baseOptions;
|
|
3357
|
+
if (configuration) {
|
|
3358
|
+
baseOptions = configuration.baseOptions;
|
|
3359
|
+
}
|
|
3360
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
3361
|
+
const localVarHeaderParameter = {};
|
|
3362
|
+
const localVarQueryParameter = {};
|
|
3363
|
+
if (rating !== undefined) {
|
|
3364
|
+
localVarQueryParameter['rating'] = rating;
|
|
3365
|
+
}
|
|
3366
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3367
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3368
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3369
|
+
return {
|
|
3370
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3371
|
+
options: localVarRequestOptions,
|
|
3372
|
+
};
|
|
3373
|
+
},
|
|
3205
3374
|
/**
|
|
3206
3375
|
*
|
|
3207
3376
|
* @param {number} [page]
|
|
@@ -3220,14 +3389,12 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3220
3389
|
* @param {number} [priceGte]
|
|
3221
3390
|
* @param {number} [priceLte]
|
|
3222
3391
|
* @param {boolean} [autoComplete]
|
|
3223
|
-
* @param {Array<string>} [mainVariant]
|
|
3224
|
-
* @param {Array<string>} [subVariant]
|
|
3225
3392
|
* @param {GetProductsSortEnum} [sort]
|
|
3226
3393
|
* @param {ContentStatusEnum} [status]
|
|
3227
3394
|
* @param {*} [options] Override http request option.
|
|
3228
3395
|
* @throws {RequiredError}
|
|
3229
3396
|
*/
|
|
3230
|
-
getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete,
|
|
3397
|
+
getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options = {}) => {
|
|
3231
3398
|
const localVarPath = `/api/products`;
|
|
3232
3399
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3233
3400
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -3290,12 +3457,6 @@ const ProductApiAxiosParamCreator = function (configuration) {
|
|
|
3290
3457
|
if (autoComplete !== undefined) {
|
|
3291
3458
|
localVarQueryParameter['autoComplete'] = autoComplete;
|
|
3292
3459
|
}
|
|
3293
|
-
if (mainVariant) {
|
|
3294
|
-
localVarQueryParameter['mainVariant'] = mainVariant;
|
|
3295
|
-
}
|
|
3296
|
-
if (subVariant) {
|
|
3297
|
-
localVarQueryParameter['subVariant'] = subVariant;
|
|
3298
|
-
}
|
|
3299
3460
|
if (sort !== undefined) {
|
|
3300
3461
|
localVarQueryParameter['sort'] = sort;
|
|
3301
3462
|
}
|
|
@@ -3334,6 +3495,19 @@ const ProductApiFp = function (configuration) {
|
|
|
3334
3495
|
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProductBySlug']?.[localVarOperationServerIndex]?.url;
|
|
3335
3496
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3336
3497
|
},
|
|
3498
|
+
/**
|
|
3499
|
+
*
|
|
3500
|
+
* @param {string} id
|
|
3501
|
+
* @param {number} [rating]
|
|
3502
|
+
* @param {*} [options] Override http request option.
|
|
3503
|
+
* @throws {RequiredError}
|
|
3504
|
+
*/
|
|
3505
|
+
async getProductReviews(id, rating, options) {
|
|
3506
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductReviews(id, rating, options);
|
|
3507
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3508
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProductReviews']?.[localVarOperationServerIndex]?.url;
|
|
3509
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3510
|
+
},
|
|
3337
3511
|
/**
|
|
3338
3512
|
*
|
|
3339
3513
|
* @param {number} [page]
|
|
@@ -3352,15 +3526,13 @@ const ProductApiFp = function (configuration) {
|
|
|
3352
3526
|
* @param {number} [priceGte]
|
|
3353
3527
|
* @param {number} [priceLte]
|
|
3354
3528
|
* @param {boolean} [autoComplete]
|
|
3355
|
-
* @param {Array<string>} [mainVariant]
|
|
3356
|
-
* @param {Array<string>} [subVariant]
|
|
3357
3529
|
* @param {GetProductsSortEnum} [sort]
|
|
3358
3530
|
* @param {ContentStatusEnum} [status]
|
|
3359
3531
|
* @param {*} [options] Override http request option.
|
|
3360
3532
|
* @throws {RequiredError}
|
|
3361
3533
|
*/
|
|
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,
|
|
3534
|
+
async getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options) {
|
|
3535
|
+
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
3536
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3365
3537
|
const localVarOperationServerBasePath = base_1.operationServerMap['ProductApi.getProducts']?.[localVarOperationServerIndex]?.url;
|
|
3366
3538
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -3384,6 +3556,15 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
3384
3556
|
getProductBySlug(requestParameters, options) {
|
|
3385
3557
|
return localVarFp.getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(axios, basePath));
|
|
3386
3558
|
},
|
|
3559
|
+
/**
|
|
3560
|
+
*
|
|
3561
|
+
* @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
|
|
3562
|
+
* @param {*} [options] Override http request option.
|
|
3563
|
+
* @throws {RequiredError}
|
|
3564
|
+
*/
|
|
3565
|
+
getProductReviews(requestParameters, options) {
|
|
3566
|
+
return localVarFp.getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(axios, basePath));
|
|
3567
|
+
},
|
|
3387
3568
|
/**
|
|
3388
3569
|
*
|
|
3389
3570
|
* @param {ProductApiGetProductsRequest} requestParameters Request parameters.
|
|
@@ -3391,7 +3572,7 @@ const ProductApiFactory = function (configuration, basePath, axios) {
|
|
|
3391
3572
|
* @throws {RequiredError}
|
|
3392
3573
|
*/
|
|
3393
3574
|
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.
|
|
3575
|
+
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
3576
|
},
|
|
3396
3577
|
};
|
|
3397
3578
|
};
|
|
@@ -3413,6 +3594,16 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
3413
3594
|
getProductBySlug(requestParameters, options) {
|
|
3414
3595
|
return (0, exports.ProductApiFp)(this.configuration).getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(this.axios, this.basePath));
|
|
3415
3596
|
}
|
|
3597
|
+
/**
|
|
3598
|
+
*
|
|
3599
|
+
* @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
|
|
3600
|
+
* @param {*} [options] Override http request option.
|
|
3601
|
+
* @throws {RequiredError}
|
|
3602
|
+
* @memberof ProductApi
|
|
3603
|
+
*/
|
|
3604
|
+
getProductReviews(requestParameters, options) {
|
|
3605
|
+
return (0, exports.ProductApiFp)(this.configuration).getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(this.axios, this.basePath));
|
|
3606
|
+
}
|
|
3416
3607
|
/**
|
|
3417
3608
|
*
|
|
3418
3609
|
* @param {ProductApiGetProductsRequest} requestParameters Request parameters.
|
|
@@ -3421,7 +3612,7 @@ class ProductApi extends base_1.BaseAPI {
|
|
|
3421
3612
|
* @memberof ProductApi
|
|
3422
3613
|
*/
|
|
3423
3614
|
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.
|
|
3615
|
+
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
3616
|
}
|
|
3426
3617
|
}
|
|
3427
3618
|
exports.ProductApi = ProductApi;
|
|
@@ -3438,7 +3629,9 @@ exports.GetProductsDateFieldEnum = {
|
|
|
3438
3629
|
exports.GetProductsSortEnum = {
|
|
3439
3630
|
PRICE: 'price',
|
|
3440
3631
|
CREATED_AT: 'createdAt',
|
|
3441
|
-
TOTAL_SALE: 'totalSale'
|
|
3632
|
+
TOTAL_SALE: 'totalSale',
|
|
3633
|
+
RATING: 'rating',
|
|
3634
|
+
REVIEW_COUNT: 'reviewCount'
|
|
3442
3635
|
};
|
|
3443
3636
|
/**
|
|
3444
3637
|
* SitemapApi - axios parameter creator
|