@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 +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1107,9 +1107,7 @@ var CartApi = class extends BaseService {
|
|
|
1107
1107
|
sideCampaignJson: params.sideCampaignJson
|
|
1108
1108
|
}, params.options),
|
|
1109
1109
|
{
|
|
1110
|
-
headers:
|
|
1111
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1112
|
-
}, requestOptions == null ? void 0 : requestOptions.headers),
|
|
1110
|
+
headers: requestOptions == null ? void 0 : requestOptions.headers,
|
|
1113
1111
|
data: requestOptions == null ? void 0 : requestOptions.data,
|
|
1114
1112
|
params: requestOptions == null ? void 0 : requestOptions.params
|
|
1115
1113
|
}
|
|
@@ -1145,9 +1143,7 @@ var CartApi = class extends BaseService {
|
|
|
1145
1143
|
sideCampaignJson: params.sideCampaignJson
|
|
1146
1144
|
}, params.options),
|
|
1147
1145
|
{
|
|
1148
|
-
headers:
|
|
1149
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1150
|
-
}, requestOptions == null ? void 0 : requestOptions.headers),
|
|
1146
|
+
headers: requestOptions == null ? void 0 : requestOptions.headers,
|
|
1151
1147
|
data: requestOptions == null ? void 0 : requestOptions.data,
|
|
1152
1148
|
params: requestOptions == null ? void 0 : requestOptions.params
|
|
1153
1149
|
}
|
|
@@ -1157,15 +1153,19 @@ var CartApi = class extends BaseService {
|
|
|
1157
1153
|
/**
|
|
1158
1154
|
* Retrieves the count of items in the cart.
|
|
1159
1155
|
*
|
|
1156
|
+
* @param params.countQuantity - Whether to count the quantity of items in the cart. Defaults to true.
|
|
1160
1157
|
* @param options - Optional additional parameters.
|
|
1161
1158
|
* @param requestOptions - Optional request options.
|
|
1162
1159
|
* @returns A promise that resolves to a ServiceResponse containing the CartCountResponse.
|
|
1163
1160
|
*/
|
|
1164
|
-
cartCount(
|
|
1161
|
+
cartCount(params, requestOptions) {
|
|
1165
1162
|
return __async(this, null, function* () {
|
|
1163
|
+
var _a;
|
|
1166
1164
|
return yield this.get(
|
|
1167
1165
|
"cart/count",
|
|
1168
|
-
__spreadValues({
|
|
1166
|
+
__spreadValues({
|
|
1167
|
+
countQuantity: (_a = params.countQuantity) != null ? _a : true
|
|
1168
|
+
}, params.options),
|
|
1169
1169
|
requestOptions
|
|
1170
1170
|
);
|
|
1171
1171
|
});
|
|
@@ -1186,14 +1186,12 @@ var CartApi = class extends BaseService {
|
|
|
1186
1186
|
cartAccess(params, requestOptions) {
|
|
1187
1187
|
return __async(this, null, function* () {
|
|
1188
1188
|
return yield this.post(
|
|
1189
|
-
"setting",
|
|
1189
|
+
"setting/add",
|
|
1190
1190
|
{
|
|
1191
1191
|
data: JSON.stringify(params)
|
|
1192
1192
|
},
|
|
1193
1193
|
{
|
|
1194
|
-
headers:
|
|
1195
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
1196
|
-
}, requestOptions == null ? void 0 : requestOptions.headers),
|
|
1194
|
+
headers: requestOptions == null ? void 0 : requestOptions.headers,
|
|
1197
1195
|
data: requestOptions == null ? void 0 : requestOptions.data,
|
|
1198
1196
|
params: requestOptions == null ? void 0 : requestOptions.params
|
|
1199
1197
|
}
|