@bzbs/react-api-client 2.1.5 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -2001,7 +2001,7 @@ declare class CampaignApi extends BaseService {
2001
2001
  }, requestOptions?: RequestOptions): Promise<ServiceResponse<RedeemResponse>>;
2002
2002
  }
2003
2003
 
2004
- type CartType = 'normal' | 'subscription' | 'evoucher' | 'marketplaceprivilege' | 'c2ptopup' | 'beesbooking' | 'dealshop';
2004
+ type CartType = 'Normal' | 'Subscription' | 'EVoucher' | 'MarketPlacePrivilege' | 'C2PTopup' | 'BeesBooking' | 'DealShop';
2005
2005
  declare class CartApi extends BaseService {
2006
2006
  constructor(client: AxiosInstance, baseUrl: string);
2007
2007
  /**
@@ -2058,12 +2058,16 @@ declare class CartApi extends BaseService {
2058
2058
  /**
2059
2059
  * Retrieves the count of items in the cart.
2060
2060
  *
2061
+ * @param params.countQuantity - Whether to count the quantity of items in the cart. Defaults to true.
2061
2062
  * @param options - Optional additional parameters.
2062
2063
  * @param requestOptions - Optional request options.
2063
2064
  * @returns A promise that resolves to a ServiceResponse containing the CartCountResponse.
2064
2065
  */
2065
- cartCount(options?: {
2066
- [key: string]: unknown;
2066
+ cartCount(params: {
2067
+ countQuantity?: boolean;
2068
+ options?: {
2069
+ [key: string]: unknown;
2070
+ };
2067
2071
  }, requestOptions?: RequestOptions): Promise<ServiceResponse<CartCountResponse>>;
2068
2072
  /**
2069
2073
  * Retrieves the cart access.
package/dist/index.d.ts CHANGED
@@ -2001,7 +2001,7 @@ declare class CampaignApi extends BaseService {
2001
2001
  }, requestOptions?: RequestOptions): Promise<ServiceResponse<RedeemResponse>>;
2002
2002
  }
2003
2003
 
2004
- type CartType = 'normal' | 'subscription' | 'evoucher' | 'marketplaceprivilege' | 'c2ptopup' | 'beesbooking' | 'dealshop';
2004
+ type CartType = 'Normal' | 'Subscription' | 'EVoucher' | 'MarketPlacePrivilege' | 'C2PTopup' | 'BeesBooking' | 'DealShop';
2005
2005
  declare class CartApi extends BaseService {
2006
2006
  constructor(client: AxiosInstance, baseUrl: string);
2007
2007
  /**
@@ -2058,12 +2058,16 @@ declare class CartApi extends BaseService {
2058
2058
  /**
2059
2059
  * Retrieves the count of items in the cart.
2060
2060
  *
2061
+ * @param params.countQuantity - Whether to count the quantity of items in the cart. Defaults to true.
2061
2062
  * @param options - Optional additional parameters.
2062
2063
  * @param requestOptions - Optional request options.
2063
2064
  * @returns A promise that resolves to a ServiceResponse containing the CartCountResponse.
2064
2065
  */
2065
- cartCount(options?: {
2066
- [key: string]: unknown;
2066
+ cartCount(params: {
2067
+ countQuantity?: boolean;
2068
+ options?: {
2069
+ [key: string]: unknown;
2070
+ };
2067
2071
  }, requestOptions?: RequestOptions): Promise<ServiceResponse<CartCountResponse>>;
2068
2072
  /**
2069
2073
  * Retrieves the cart access.
package/dist/index.js CHANGED
@@ -1152,9 +1152,7 @@ var CartApi = class extends BaseService {
1152
1152
  sideCampaignJson: params.sideCampaignJson
1153
1153
  }, params.options),
1154
1154
  {
1155
- headers: __spreadValues({
1156
- "Content-Type": "application/x-www-form-urlencoded"
1157
- }, requestOptions == null ? void 0 : requestOptions.headers),
1155
+ headers: requestOptions == null ? void 0 : requestOptions.headers,
1158
1156
  data: requestOptions == null ? void 0 : requestOptions.data,
1159
1157
  params: requestOptions == null ? void 0 : requestOptions.params
1160
1158
  }
@@ -1190,9 +1188,7 @@ var CartApi = class extends BaseService {
1190
1188
  sideCampaignJson: params.sideCampaignJson
1191
1189
  }, params.options),
1192
1190
  {
1193
- headers: __spreadValues({
1194
- "Content-Type": "application/x-www-form-urlencoded"
1195
- }, requestOptions == null ? void 0 : requestOptions.headers),
1191
+ headers: requestOptions == null ? void 0 : requestOptions.headers,
1196
1192
  data: requestOptions == null ? void 0 : requestOptions.data,
1197
1193
  params: requestOptions == null ? void 0 : requestOptions.params
1198
1194
  }
@@ -1202,15 +1198,19 @@ var CartApi = class extends BaseService {
1202
1198
  /**
1203
1199
  * Retrieves the count of items in the cart.
1204
1200
  *
1201
+ * @param params.countQuantity - Whether to count the quantity of items in the cart. Defaults to true.
1205
1202
  * @param options - Optional additional parameters.
1206
1203
  * @param requestOptions - Optional request options.
1207
1204
  * @returns A promise that resolves to a ServiceResponse containing the CartCountResponse.
1208
1205
  */
1209
- cartCount(options, requestOptions) {
1206
+ cartCount(params, requestOptions) {
1210
1207
  return __async(this, null, function* () {
1208
+ var _a;
1211
1209
  return yield this.get(
1212
1210
  "cart/count",
1213
- __spreadValues({}, options),
1211
+ __spreadValues({
1212
+ countQuantity: (_a = params.countQuantity) != null ? _a : true
1213
+ }, params.options),
1214
1214
  requestOptions
1215
1215
  );
1216
1216
  });
@@ -1231,14 +1231,12 @@ var CartApi = class extends BaseService {
1231
1231
  cartAccess(params, requestOptions) {
1232
1232
  return __async(this, null, function* () {
1233
1233
  return yield this.post(
1234
- "setting",
1234
+ "setting/add",
1235
1235
  {
1236
1236
  data: JSON.stringify(params)
1237
1237
  },
1238
1238
  {
1239
- headers: __spreadValues({
1240
- "Content-Type": "application/x-www-form-urlencoded"
1241
- }, requestOptions == null ? void 0 : requestOptions.headers),
1239
+ headers: requestOptions == null ? void 0 : requestOptions.headers,
1242
1240
  data: requestOptions == null ? void 0 : requestOptions.data,
1243
1241
  params: requestOptions == null ? void 0 : requestOptions.params
1244
1242
  }