@bzbs/react-api-client 0.1.4 → 0.1.6
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 +21 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +19 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -59
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -387,22 +387,22 @@ interface Category {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
interface Consent {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
390
|
+
TermAndCondition?: number;
|
|
391
|
+
DataPrivacy?: number;
|
|
392
|
+
MarketingOption?: number;
|
|
393
|
+
ConsentAge?: number;
|
|
394
|
+
LineMarketing?: number;
|
|
395
|
+
NotificationMarketing?: number;
|
|
396
|
+
SmsMarketing?: number;
|
|
397
|
+
EmailMarketing?: number;
|
|
398
|
+
AnalyticsBuzzebeesCookies?: number;
|
|
399
|
+
AnalyticsFirebaseCookies?: number;
|
|
400
|
+
AnalyticsGoogleCookies?: number;
|
|
401
|
+
AnalyticsMetaCookies?: number;
|
|
402
|
+
AnalyticsOtherCookies?: number;
|
|
403
|
+
FunctionalCookies?: number;
|
|
404
|
+
MarketingCookies?: number;
|
|
405
|
+
NecessaryCookies?: number;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
interface ConfirmOtpResponse {
|
|
@@ -1977,7 +1977,11 @@ declare class ProfileApi extends BaseService {
|
|
|
1977
1977
|
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
1978
1978
|
*/
|
|
1979
1979
|
updateProfile(params: {
|
|
1980
|
-
profileImage?: File
|
|
1980
|
+
profileImage?: File | {
|
|
1981
|
+
uri: string;
|
|
1982
|
+
name: string;
|
|
1983
|
+
type: string;
|
|
1984
|
+
};
|
|
1981
1985
|
firstName?: string;
|
|
1982
1986
|
lastName?: string;
|
|
1983
1987
|
contactNumber?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -387,22 +387,22 @@ interface Category {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
interface Consent {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
390
|
+
TermAndCondition?: number;
|
|
391
|
+
DataPrivacy?: number;
|
|
392
|
+
MarketingOption?: number;
|
|
393
|
+
ConsentAge?: number;
|
|
394
|
+
LineMarketing?: number;
|
|
395
|
+
NotificationMarketing?: number;
|
|
396
|
+
SmsMarketing?: number;
|
|
397
|
+
EmailMarketing?: number;
|
|
398
|
+
AnalyticsBuzzebeesCookies?: number;
|
|
399
|
+
AnalyticsFirebaseCookies?: number;
|
|
400
|
+
AnalyticsGoogleCookies?: number;
|
|
401
|
+
AnalyticsMetaCookies?: number;
|
|
402
|
+
AnalyticsOtherCookies?: number;
|
|
403
|
+
FunctionalCookies?: number;
|
|
404
|
+
MarketingCookies?: number;
|
|
405
|
+
NecessaryCookies?: number;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
interface ConfirmOtpResponse {
|
|
@@ -1977,7 +1977,11 @@ declare class ProfileApi extends BaseService {
|
|
|
1977
1977
|
* @returns A promise that resolves to a ServiceResponse containing the updated profile.
|
|
1978
1978
|
*/
|
|
1979
1979
|
updateProfile(params: {
|
|
1980
|
-
profileImage?: File
|
|
1980
|
+
profileImage?: File | {
|
|
1981
|
+
uri: string;
|
|
1982
|
+
name: string;
|
|
1983
|
+
type: string;
|
|
1984
|
+
};
|
|
1981
1985
|
firstName?: string;
|
|
1982
1986
|
lastName?: string;
|
|
1983
1987
|
contactNumber?: string;
|
package/dist/index.js
CHANGED
|
@@ -1353,6 +1353,7 @@ var PointLogApi = class extends BaseService {
|
|
|
1353
1353
|
};
|
|
1354
1354
|
|
|
1355
1355
|
// src/api/profile/profile-api.ts
|
|
1356
|
+
var import_undici_types = require("undici-types");
|
|
1356
1357
|
var ProfileApi = class extends BaseService {
|
|
1357
1358
|
constructor(client, baseUrl) {
|
|
1358
1359
|
super(client, baseUrl);
|
|
@@ -1377,66 +1378,25 @@ var ProfileApi = class extends BaseService {
|
|
|
1377
1378
|
*/
|
|
1378
1379
|
updateProfile(params, requestOptions) {
|
|
1379
1380
|
return __async(this, null, function* () {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
data
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
email: params.email,
|
|
1388
|
-
notification: params.notification,
|
|
1389
|
-
locale: params.locale,
|
|
1390
|
-
title: params.title,
|
|
1391
|
-
gender: params.gender,
|
|
1392
|
-
birthdate: params.birthDate,
|
|
1393
|
-
address: params.address,
|
|
1394
|
-
subdistrict_code: params.subdistrictCode,
|
|
1395
|
-
subdistrict_name: params.subdistrictName,
|
|
1396
|
-
district_code: params.districtCode,
|
|
1397
|
-
district_name: params.districtName,
|
|
1398
|
-
province_code: params.provinceCode,
|
|
1399
|
-
province_name: params.provinceName,
|
|
1400
|
-
country_code: params.countryCode,
|
|
1401
|
-
country_name: params.countryName,
|
|
1402
|
-
Zipcode: params.zipCode,
|
|
1403
|
-
idCard: params.idCard,
|
|
1404
|
-
passport: params.passport,
|
|
1405
|
-
maritalstatus: params.maritalStatus,
|
|
1406
|
-
village: params.village,
|
|
1407
|
-
building: params.building,
|
|
1408
|
-
number: params.number,
|
|
1409
|
-
moo: params.moo,
|
|
1410
|
-
room: params.room,
|
|
1411
|
-
floor: params.floor,
|
|
1412
|
-
soi: params.soi,
|
|
1413
|
-
city: params.city,
|
|
1414
|
-
road: params.road,
|
|
1415
|
-
landmark: params.landmark,
|
|
1416
|
-
alternate_contact_number: params.alternateContactNumber,
|
|
1417
|
-
home_contact_number: params.homeContactNumber,
|
|
1418
|
-
nationality: params.nationality,
|
|
1419
|
-
religion: params.religion,
|
|
1420
|
-
location: params.location,
|
|
1421
|
-
latitude: params.latitude,
|
|
1422
|
-
longitude: params.longitude,
|
|
1423
|
-
income: params.income,
|
|
1424
|
-
interests: params.interests,
|
|
1425
|
-
region: params.region,
|
|
1426
|
-
phonepurchase: params.phonepurchase,
|
|
1427
|
-
highesteducation: params.highestEducation,
|
|
1428
|
-
occupation: params.occupation,
|
|
1429
|
-
remark: params.remark,
|
|
1430
|
-
displayname: params.displayName
|
|
1431
|
-
}, params.options),
|
|
1432
|
-
{
|
|
1433
|
-
headers: __spreadValues({
|
|
1434
|
-
"Content-Type": "multipart/form-data"
|
|
1435
|
-
}, (requestOptions == null ? void 0 : requestOptions.headers) ? requestOptions.headers : {}),
|
|
1436
|
-
params: requestOptions == null ? void 0 : requestOptions.params,
|
|
1437
|
-
data: requestOptions == null ? void 0 : requestOptions.data
|
|
1381
|
+
const formData = new import_undici_types.FormData();
|
|
1382
|
+
if (params.profileImage) {
|
|
1383
|
+
if (typeof window !== "undefined") {
|
|
1384
|
+
formData.append("data", params.profileImage);
|
|
1385
|
+
} else {
|
|
1386
|
+
const { uri, name, type } = params.profileImage;
|
|
1387
|
+
formData.append("data", { uri, name, type });
|
|
1438
1388
|
}
|
|
1439
|
-
|
|
1389
|
+
}
|
|
1390
|
+
Object.keys(params).forEach((key) => {
|
|
1391
|
+
if (key !== "profileImage" && params[key] !== void 0) {
|
|
1392
|
+
formData.append(key, params[key]);
|
|
1393
|
+
}
|
|
1394
|
+
});
|
|
1395
|
+
return yield this.post("profile/me", formData, {
|
|
1396
|
+
headers: __spreadValues(__spreadValues({}, (requestOptions == null ? void 0 : requestOptions.headers) ? requestOptions.headers : {}), typeof window !== "undefined" ? { "Content-Type": "multipart/form-data" } : {}),
|
|
1397
|
+
params: requestOptions == null ? void 0 : requestOptions.params,
|
|
1398
|
+
data: requestOptions == null ? void 0 : requestOptions.data
|
|
1399
|
+
});
|
|
1440
1400
|
});
|
|
1441
1401
|
}
|
|
1442
1402
|
/**
|