@infisale-client/api 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.mjs CHANGED
@@ -562,7 +562,9 @@ export const IProductCollectionQueryParamsDateFieldEnum = {
562
562
  export const IProductCollectionQueryParamsSortEnum = {
563
563
  PRICE: 'price',
564
564
  CREATED_AT: 'createdAt',
565
- TOTAL_SALE: 'totalSale'
565
+ TOTAL_SALE: 'totalSale',
566
+ RATING: 'rating',
567
+ REVIEW_COUNT: 'reviewCount'
566
568
  };
567
569
  export const IUserCollectionQueryParamsDateFieldEnum = {
568
570
  CREATED_AT: 'createdAt',
@@ -756,6 +758,16 @@ export const ProductDetailImageZoomTypeEnum = {
756
758
  DIALOG: 'dialog',
757
759
  NONE: 'none'
758
760
  };
761
+ /**
762
+ *
763
+ * @export
764
+ * @enum {string}
765
+ */
766
+ export const ReviewStatusEnum = {
767
+ WAITING_APPROVAL: 'waiting_approval',
768
+ APPROVED: 'approved',
769
+ REJECTED: 'rejected'
770
+ };
759
771
  /**
760
772
  *
761
773
  * @export
@@ -836,6 +848,18 @@ export const TimezoneEnum = {
836
848
  UTC1300: 'UTC+13:00',
837
849
  UTC1400: 'UTC+14:00'
838
850
  };
851
+ /**
852
+ *
853
+ * @export
854
+ * @enum {string}
855
+ */
856
+ export const UniquePageTypeEnum = {
857
+ HOME: 'home',
858
+ CART: 'cart',
859
+ CHECKOUT: 'checkout',
860
+ SEARCH: 'search',
861
+ NOT_FOUND: 'not-found'
862
+ };
839
863
  /**
840
864
  *
841
865
  * @export
@@ -4073,6 +4097,38 @@ export const CompanyApiAxiosParamCreator = function (configuration) {
4073
4097
  options: localVarRequestOptions,
4074
4098
  };
4075
4099
  },
4100
+ /**
4101
+ *
4102
+ * @param {string} id
4103
+ * @param {ReviewStatusEnum} [status]
4104
+ * @param {*} [options] Override http request option.
4105
+ * @throws {RequiredError}
4106
+ */
4107
+ getCompanyProductReviews: async (id, status, options = {}) => {
4108
+ // verify required parameter 'id' is not null or undefined
4109
+ assertParamExists('getCompanyProductReviews', 'id', id);
4110
+ const localVarPath = `/api/companies/{id}/reviews`
4111
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4112
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4113
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4114
+ let baseOptions;
4115
+ if (configuration) {
4116
+ baseOptions = configuration.baseOptions;
4117
+ }
4118
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
4119
+ const localVarHeaderParameter = {};
4120
+ const localVarQueryParameter = {};
4121
+ if (status !== undefined) {
4122
+ localVarQueryParameter['status'] = status;
4123
+ }
4124
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4125
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4126
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
4127
+ return {
4128
+ url: toPathString(localVarUrlObj),
4129
+ options: localVarRequestOptions,
4130
+ };
4131
+ },
4076
4132
  /**
4077
4133
  *
4078
4134
  * @param {string} id
@@ -4622,6 +4678,19 @@ export const CompanyApiFp = function (configuration) {
4622
4678
  const localVarOperationServerBasePath = operationServerMap['CompanyApi.getCompanyPaymentGateways']?.[localVarOperationServerIndex]?.url;
4623
4679
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4624
4680
  },
4681
+ /**
4682
+ *
4683
+ * @param {string} id
4684
+ * @param {ReviewStatusEnum} [status]
4685
+ * @param {*} [options] Override http request option.
4686
+ * @throws {RequiredError}
4687
+ */
4688
+ async getCompanyProductReviews(id, status, options) {
4689
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCompanyProductReviews(id, status, options);
4690
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4691
+ const localVarOperationServerBasePath = operationServerMap['CompanyApi.getCompanyProductReviews']?.[localVarOperationServerIndex]?.url;
4692
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4693
+ },
4625
4694
  /**
4626
4695
  *
4627
4696
  * @param {string} id
@@ -4891,6 +4960,15 @@ export const CompanyApiFactory = function (configuration, basePath, axios) {
4891
4960
  getCompanyPaymentGateways(requestParameters, options) {
4892
4961
  return localVarFp.getCompanyPaymentGateways(requestParameters.id, options).then((request) => request(axios, basePath));
4893
4962
  },
4963
+ /**
4964
+ *
4965
+ * @param {CompanyApiGetCompanyProductReviewsRequest} requestParameters Request parameters.
4966
+ * @param {*} [options] Override http request option.
4967
+ * @throws {RequiredError}
4968
+ */
4969
+ getCompanyProductReviews(requestParameters, options) {
4970
+ return localVarFp.getCompanyProductReviews(requestParameters.id, requestParameters.status, options).then((request) => request(axios, basePath));
4971
+ },
4894
4972
  /**
4895
4973
  *
4896
4974
  * @param {CompanyApiGetCompanyUsersRequest} requestParameters Request parameters.
@@ -5129,6 +5207,16 @@ export class CompanyApi extends BaseAPI {
5129
5207
  getCompanyPaymentGateways(requestParameters, options) {
5130
5208
  return CompanyApiFp(this.configuration).getCompanyPaymentGateways(requestParameters.id, options).then((request) => request(this.axios, this.basePath));
5131
5209
  }
5210
+ /**
5211
+ *
5212
+ * @param {CompanyApiGetCompanyProductReviewsRequest} requestParameters Request parameters.
5213
+ * @param {*} [options] Override http request option.
5214
+ * @throws {RequiredError}
5215
+ * @memberof CompanyApi
5216
+ */
5217
+ getCompanyProductReviews(requestParameters, options) {
5218
+ return CompanyApiFp(this.configuration).getCompanyProductReviews(requestParameters.id, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
5219
+ }
5132
5220
  /**
5133
5221
  *
5134
5222
  * @param {CompanyApiGetCompanyUsersRequest} requestParameters Request parameters.
@@ -6999,6 +7087,35 @@ export const OrderApiAxiosParamCreator = function (configuration) {
6999
7087
  options: localVarRequestOptions,
7000
7088
  };
7001
7089
  },
7090
+ /**
7091
+ *
7092
+ * @param {IOrderReviewPostRequest} iOrderReviewPostRequest
7093
+ * @param {*} [options] Override http request option.
7094
+ * @throws {RequiredError}
7095
+ */
7096
+ createReview: async (iOrderReviewPostRequest, options = {}) => {
7097
+ // verify required parameter 'iOrderReviewPostRequest' is not null or undefined
7098
+ assertParamExists('createReview', 'iOrderReviewPostRequest', iOrderReviewPostRequest);
7099
+ const localVarPath = `/api/orders/reviews`;
7100
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7101
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7102
+ let baseOptions;
7103
+ if (configuration) {
7104
+ baseOptions = configuration.baseOptions;
7105
+ }
7106
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
7107
+ const localVarHeaderParameter = {};
7108
+ const localVarQueryParameter = {};
7109
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7110
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7111
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7112
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
7113
+ localVarRequestOptions.data = serializeDataIfNeeded(iOrderReviewPostRequest, localVarRequestOptions, configuration);
7114
+ return {
7115
+ url: toPathString(localVarUrlObj),
7116
+ options: localVarRequestOptions,
7117
+ };
7118
+ },
7002
7119
  /**
7003
7120
  *
7004
7121
  * @param {number} [page]
@@ -7235,6 +7352,72 @@ export const OrderApiAxiosParamCreator = function (configuration) {
7235
7352
  options: localVarRequestOptions,
7236
7353
  };
7237
7354
  },
7355
+ /**
7356
+ *
7357
+ * @param {string} id
7358
+ * @param {IReviewPatchRequest} iReviewPatchRequest
7359
+ * @param {*} [options] Override http request option.
7360
+ * @throws {RequiredError}
7361
+ */
7362
+ updateReview: async (id, iReviewPatchRequest, options = {}) => {
7363
+ // verify required parameter 'id' is not null or undefined
7364
+ assertParamExists('updateReview', 'id', id);
7365
+ // verify required parameter 'iReviewPatchRequest' is not null or undefined
7366
+ assertParamExists('updateReview', 'iReviewPatchRequest', iReviewPatchRequest);
7367
+ const localVarPath = `/api/orders/reviews/{id}`
7368
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
7369
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7370
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7371
+ let baseOptions;
7372
+ if (configuration) {
7373
+ baseOptions = configuration.baseOptions;
7374
+ }
7375
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
7376
+ const localVarHeaderParameter = {};
7377
+ const localVarQueryParameter = {};
7378
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7379
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7380
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7381
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
7382
+ localVarRequestOptions.data = serializeDataIfNeeded(iReviewPatchRequest, localVarRequestOptions, configuration);
7383
+ return {
7384
+ url: toPathString(localVarUrlObj),
7385
+ options: localVarRequestOptions,
7386
+ };
7387
+ },
7388
+ /**
7389
+ *
7390
+ * @param {string} id
7391
+ * @param {UpdateReviewStatusRequest} updateReviewStatusRequest
7392
+ * @param {*} [options] Override http request option.
7393
+ * @throws {RequiredError}
7394
+ */
7395
+ updateReviewStatus: async (id, updateReviewStatusRequest, options = {}) => {
7396
+ // verify required parameter 'id' is not null or undefined
7397
+ assertParamExists('updateReviewStatus', 'id', id);
7398
+ // verify required parameter 'updateReviewStatusRequest' is not null or undefined
7399
+ assertParamExists('updateReviewStatus', 'updateReviewStatusRequest', updateReviewStatusRequest);
7400
+ const localVarPath = `/api/orders/reviews/{id}/status`
7401
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
7402
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7403
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7404
+ let baseOptions;
7405
+ if (configuration) {
7406
+ baseOptions = configuration.baseOptions;
7407
+ }
7408
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options };
7409
+ const localVarHeaderParameter = {};
7410
+ const localVarQueryParameter = {};
7411
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7412
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
7413
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7414
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
7415
+ localVarRequestOptions.data = serializeDataIfNeeded(updateReviewStatusRequest, localVarRequestOptions, configuration);
7416
+ return {
7417
+ url: toPathString(localVarUrlObj),
7418
+ options: localVarRequestOptions,
7419
+ };
7420
+ },
7238
7421
  };
7239
7422
  };
7240
7423
  /**
@@ -7282,6 +7465,18 @@ export const OrderApiFp = function (configuration) {
7282
7465
  const localVarOperationServerBasePath = operationServerMap['OrderApi.createReturnAdmin']?.[localVarOperationServerIndex]?.url;
7283
7466
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7284
7467
  },
7468
+ /**
7469
+ *
7470
+ * @param {IOrderReviewPostRequest} iOrderReviewPostRequest
7471
+ * @param {*} [options] Override http request option.
7472
+ * @throws {RequiredError}
7473
+ */
7474
+ async createReview(iOrderReviewPostRequest, options) {
7475
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createReview(iOrderReviewPostRequest, options);
7476
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7477
+ const localVarOperationServerBasePath = operationServerMap['OrderApi.createReview']?.[localVarOperationServerIndex]?.url;
7478
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7479
+ },
7285
7480
  /**
7286
7481
  *
7287
7482
  * @param {number} [page]
@@ -7363,6 +7558,32 @@ export const OrderApiFp = function (configuration) {
7363
7558
  const localVarOperationServerBasePath = operationServerMap['OrderApi.updateReturn']?.[localVarOperationServerIndex]?.url;
7364
7559
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7365
7560
  },
7561
+ /**
7562
+ *
7563
+ * @param {string} id
7564
+ * @param {IReviewPatchRequest} iReviewPatchRequest
7565
+ * @param {*} [options] Override http request option.
7566
+ * @throws {RequiredError}
7567
+ */
7568
+ async updateReview(id, iReviewPatchRequest, options) {
7569
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateReview(id, iReviewPatchRequest, options);
7570
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7571
+ const localVarOperationServerBasePath = operationServerMap['OrderApi.updateReview']?.[localVarOperationServerIndex]?.url;
7572
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7573
+ },
7574
+ /**
7575
+ *
7576
+ * @param {string} id
7577
+ * @param {UpdateReviewStatusRequest} updateReviewStatusRequest
7578
+ * @param {*} [options] Override http request option.
7579
+ * @throws {RequiredError}
7580
+ */
7581
+ async updateReviewStatus(id, updateReviewStatusRequest, options) {
7582
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateReviewStatus(id, updateReviewStatusRequest, options);
7583
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
7584
+ const localVarOperationServerBasePath = operationServerMap['OrderApi.updateReviewStatus']?.[localVarOperationServerIndex]?.url;
7585
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7586
+ },
7366
7587
  };
7367
7588
  };
7368
7589
  /**
@@ -7399,6 +7620,15 @@ export const OrderApiFactory = function (configuration, basePath, axios) {
7399
7620
  createReturnAdmin(requestParameters, options) {
7400
7621
  return localVarFp.createReturnAdmin(requestParameters.id, requestParameters.iOrderReturnAdminPostRequest, options).then((request) => request(axios, basePath));
7401
7622
  },
7623
+ /**
7624
+ *
7625
+ * @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
7626
+ * @param {*} [options] Override http request option.
7627
+ * @throws {RequiredError}
7628
+ */
7629
+ createReview(requestParameters, options) {
7630
+ return localVarFp.createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(axios, basePath));
7631
+ },
7402
7632
  /**
7403
7633
  *
7404
7634
  * @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
@@ -7444,6 +7674,24 @@ export const OrderApiFactory = function (configuration, basePath, axios) {
7444
7674
  updateReturn(requestParameters, options) {
7445
7675
  return localVarFp.updateReturn(requestParameters.orderId, requestParameters.returnId, requestParameters.iOrderReturnUpdatePatchRequest, options).then((request) => request(axios, basePath));
7446
7676
  },
7677
+ /**
7678
+ *
7679
+ * @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
7680
+ * @param {*} [options] Override http request option.
7681
+ * @throws {RequiredError}
7682
+ */
7683
+ updateReview(requestParameters, options) {
7684
+ return localVarFp.updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(axios, basePath));
7685
+ },
7686
+ /**
7687
+ *
7688
+ * @param {OrderApiUpdateReviewStatusRequest} requestParameters Request parameters.
7689
+ * @param {*} [options] Override http request option.
7690
+ * @throws {RequiredError}
7691
+ */
7692
+ updateReviewStatus(requestParameters, options) {
7693
+ return localVarFp.updateReviewStatus(requestParameters.id, requestParameters.updateReviewStatusRequest, options).then((request) => request(axios, basePath));
7694
+ },
7447
7695
  };
7448
7696
  };
7449
7697
  /**
@@ -7483,6 +7731,16 @@ export class OrderApi extends BaseAPI {
7483
7731
  createReturnAdmin(requestParameters, options) {
7484
7732
  return OrderApiFp(this.configuration).createReturnAdmin(requestParameters.id, requestParameters.iOrderReturnAdminPostRequest, options).then((request) => request(this.axios, this.basePath));
7485
7733
  }
7734
+ /**
7735
+ *
7736
+ * @param {OrderApiCreateReviewRequest} requestParameters Request parameters.
7737
+ * @param {*} [options] Override http request option.
7738
+ * @throws {RequiredError}
7739
+ * @memberof OrderApi
7740
+ */
7741
+ createReview(requestParameters, options) {
7742
+ return OrderApiFp(this.configuration).createReview(requestParameters.iOrderReviewPostRequest, options).then((request) => request(this.axios, this.basePath));
7743
+ }
7486
7744
  /**
7487
7745
  *
7488
7746
  * @param {OrderApiGetMyOrdersRequest} requestParameters Request parameters.
@@ -7533,6 +7791,26 @@ export class OrderApi extends BaseAPI {
7533
7791
  updateReturn(requestParameters, options) {
7534
7792
  return OrderApiFp(this.configuration).updateReturn(requestParameters.orderId, requestParameters.returnId, requestParameters.iOrderReturnUpdatePatchRequest, options).then((request) => request(this.axios, this.basePath));
7535
7793
  }
7794
+ /**
7795
+ *
7796
+ * @param {OrderApiUpdateReviewRequest} requestParameters Request parameters.
7797
+ * @param {*} [options] Override http request option.
7798
+ * @throws {RequiredError}
7799
+ * @memberof OrderApi
7800
+ */
7801
+ updateReview(requestParameters, options) {
7802
+ return OrderApiFp(this.configuration).updateReview(requestParameters.id, requestParameters.iReviewPatchRequest, options).then((request) => request(this.axios, this.basePath));
7803
+ }
7804
+ /**
7805
+ *
7806
+ * @param {OrderApiUpdateReviewStatusRequest} requestParameters Request parameters.
7807
+ * @param {*} [options] Override http request option.
7808
+ * @throws {RequiredError}
7809
+ * @memberof OrderApi
7810
+ */
7811
+ updateReviewStatus(requestParameters, options) {
7812
+ return OrderApiFp(this.configuration).updateReviewStatus(requestParameters.id, requestParameters.updateReviewStatusRequest, options).then((request) => request(this.axios, this.basePath));
7813
+ }
7536
7814
  }
7537
7815
  /**
7538
7816
  * @export
@@ -7721,7 +7999,7 @@ export const PageApiAxiosParamCreator = function (configuration) {
7721
7999
  },
7722
8000
  /**
7723
8001
  *
7724
- * @param {string} type
8002
+ * @param {UniquePageTypeEnum} type
7725
8003
  * @param {string} [companyId]
7726
8004
  * @param {string} [domain]
7727
8005
  * @param {string} [template]
@@ -7975,7 +8253,7 @@ export const PageApiFp = function (configuration) {
7975
8253
  },
7976
8254
  /**
7977
8255
  *
7978
- * @param {string} type
8256
+ * @param {UniquePageTypeEnum} type
7979
8257
  * @param {string} [companyId]
7980
8258
  * @param {string} [domain]
7981
8259
  * @param {string} [template]
@@ -8828,6 +9106,38 @@ export const ProductApiAxiosParamCreator = function (configuration) {
8828
9106
  options: localVarRequestOptions,
8829
9107
  };
8830
9108
  },
9109
+ /**
9110
+ *
9111
+ * @param {string} id
9112
+ * @param {number} [rating]
9113
+ * @param {*} [options] Override http request option.
9114
+ * @throws {RequiredError}
9115
+ */
9116
+ getProductReviews: async (id, rating, options = {}) => {
9117
+ // verify required parameter 'id' is not null or undefined
9118
+ assertParamExists('getProductReviews', 'id', id);
9119
+ const localVarPath = `/api/products/{id}/reviews`
9120
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
9121
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
9122
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
9123
+ let baseOptions;
9124
+ if (configuration) {
9125
+ baseOptions = configuration.baseOptions;
9126
+ }
9127
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
9128
+ const localVarHeaderParameter = {};
9129
+ const localVarQueryParameter = {};
9130
+ if (rating !== undefined) {
9131
+ localVarQueryParameter['rating'] = rating;
9132
+ }
9133
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
9134
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
9135
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
9136
+ return {
9137
+ url: toPathString(localVarUrlObj),
9138
+ options: localVarRequestOptions,
9139
+ };
9140
+ },
8831
9141
  /**
8832
9142
  *
8833
9143
  * @param {number} [page]
@@ -8846,14 +9156,12 @@ export const ProductApiAxiosParamCreator = function (configuration) {
8846
9156
  * @param {number} [priceGte]
8847
9157
  * @param {number} [priceLte]
8848
9158
  * @param {boolean} [autoComplete]
8849
- * @param {Array<string>} [mainVariant]
8850
- * @param {Array<string>} [subVariant]
8851
9159
  * @param {GetProductsSortEnum} [sort]
8852
9160
  * @param {ContentStatusEnum} [status]
8853
9161
  * @param {*} [options] Override http request option.
8854
9162
  * @throws {RequiredError}
8855
9163
  */
8856
- getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, mainVariant, subVariant, sort, status, options = {}) => {
9164
+ getProducts: async (page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options = {}) => {
8857
9165
  const localVarPath = `/api/products`;
8858
9166
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
8859
9167
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -8916,12 +9224,6 @@ export const ProductApiAxiosParamCreator = function (configuration) {
8916
9224
  if (autoComplete !== undefined) {
8917
9225
  localVarQueryParameter['autoComplete'] = autoComplete;
8918
9226
  }
8919
- if (mainVariant) {
8920
- localVarQueryParameter['mainVariant'] = mainVariant;
8921
- }
8922
- if (subVariant) {
8923
- localVarQueryParameter['subVariant'] = subVariant;
8924
- }
8925
9227
  if (sort !== undefined) {
8926
9228
  localVarQueryParameter['sort'] = sort;
8927
9229
  }
@@ -9056,6 +9358,19 @@ export const ProductApiFp = function (configuration) {
9056
9358
  const localVarOperationServerBasePath = operationServerMap['ProductApi.getProductBySlug']?.[localVarOperationServerIndex]?.url;
9057
9359
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9058
9360
  },
9361
+ /**
9362
+ *
9363
+ * @param {string} id
9364
+ * @param {number} [rating]
9365
+ * @param {*} [options] Override http request option.
9366
+ * @throws {RequiredError}
9367
+ */
9368
+ async getProductReviews(id, rating, options) {
9369
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductReviews(id, rating, options);
9370
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
9371
+ const localVarOperationServerBasePath = operationServerMap['ProductApi.getProductReviews']?.[localVarOperationServerIndex]?.url;
9372
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
9373
+ },
9059
9374
  /**
9060
9375
  *
9061
9376
  * @param {number} [page]
@@ -9074,15 +9389,13 @@ export const ProductApiFp = function (configuration) {
9074
9389
  * @param {number} [priceGte]
9075
9390
  * @param {number} [priceLte]
9076
9391
  * @param {boolean} [autoComplete]
9077
- * @param {Array<string>} [mainVariant]
9078
- * @param {Array<string>} [subVariant]
9079
9392
  * @param {GetProductsSortEnum} [sort]
9080
9393
  * @param {ContentStatusEnum} [status]
9081
9394
  * @param {*} [options] Override http request option.
9082
9395
  * @throws {RequiredError}
9083
9396
  */
9084
- async getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, mainVariant, subVariant, sort, status, options) {
9085
- const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, mainVariant, subVariant, sort, status, options);
9397
+ async getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options) {
9398
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProducts(page, itemsPerPage, search, startDate, endDate, dateField, order, companyId, domain, collections, category, brand, inStock, priceGte, priceLte, autoComplete, sort, status, options);
9086
9399
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
9087
9400
  const localVarOperationServerBasePath = operationServerMap['ProductApi.getProducts']?.[localVarOperationServerIndex]?.url;
9088
9401
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -9163,6 +9476,15 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
9163
9476
  getProductBySlug(requestParameters, options) {
9164
9477
  return localVarFp.getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(axios, basePath));
9165
9478
  },
9479
+ /**
9480
+ *
9481
+ * @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
9482
+ * @param {*} [options] Override http request option.
9483
+ * @throws {RequiredError}
9484
+ */
9485
+ getProductReviews(requestParameters, options) {
9486
+ return localVarFp.getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(axios, basePath));
9487
+ },
9166
9488
  /**
9167
9489
  *
9168
9490
  * @param {ProductApiGetProductsRequest} requestParameters Request parameters.
@@ -9170,7 +9492,7 @@ export const ProductApiFactory = function (configuration, basePath, axios) {
9170
9492
  * @throws {RequiredError}
9171
9493
  */
9172
9494
  getProducts(requestParameters = {}, options) {
9173
- 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.mainVariant, requestParameters.subVariant, requestParameters.sort, requestParameters.status, options).then((request) => request(axios, basePath));
9495
+ 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));
9174
9496
  },
9175
9497
  /**
9176
9498
  *
@@ -9250,6 +9572,16 @@ export class ProductApi extends BaseAPI {
9250
9572
  getProductBySlug(requestParameters, options) {
9251
9573
  return ProductApiFp(this.configuration).getProductBySlug(requestParameters.slug, requestParameters.companyId, requestParameters.domain, options).then((request) => request(this.axios, this.basePath));
9252
9574
  }
9575
+ /**
9576
+ *
9577
+ * @param {ProductApiGetProductReviewsRequest} requestParameters Request parameters.
9578
+ * @param {*} [options] Override http request option.
9579
+ * @throws {RequiredError}
9580
+ * @memberof ProductApi
9581
+ */
9582
+ getProductReviews(requestParameters, options) {
9583
+ return ProductApiFp(this.configuration).getProductReviews(requestParameters.id, requestParameters.rating, options).then((request) => request(this.axios, this.basePath));
9584
+ }
9253
9585
  /**
9254
9586
  *
9255
9587
  * @param {ProductApiGetProductsRequest} requestParameters Request parameters.
@@ -9258,7 +9590,7 @@ export class ProductApi extends BaseAPI {
9258
9590
  * @memberof ProductApi
9259
9591
  */
9260
9592
  getProducts(requestParameters = {}, options) {
9261
- return 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.mainVariant, requestParameters.subVariant, requestParameters.sort, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
9593
+ return 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));
9262
9594
  }
9263
9595
  /**
9264
9596
  *
@@ -9284,7 +9616,9 @@ export const GetProductsDateFieldEnum = {
9284
9616
  export const GetProductsSortEnum = {
9285
9617
  PRICE: 'price',
9286
9618
  CREATED_AT: 'createdAt',
9287
- TOTAL_SALE: 'totalSale'
9619
+ TOTAL_SALE: 'totalSale',
9620
+ RATING: 'rating',
9621
+ REVIEW_COUNT: 'reviewCount'
9288
9622
  };
9289
9623
  /**
9290
9624
  * SitemapApi - axios parameter creator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infisale-client/api",
3
- "version": "1.2.73",
3
+ "version": "1.2.74",
4
4
  "description": "api-sdk",
5
5
  "author": "Muhammet KÖKLÜ <105980019+byhipernova@users.noreply.github.com>",
6
6
  "homepage": "https://github.com/infisale/infisale-client#readme",
@@ -37,5 +37,5 @@
37
37
  "bugs": {
38
38
  "url": "https://github.com/infisale/infisale-client/issues"
39
39
  },
40
- "gitHead": "8eb91dd2ad1de417e8617769151b64e413ae6295"
40
+ "gitHead": "0d896d070eb5379e75e54cd6a5f447484be041b6"
41
41
  }