@bzbs/react-api-client 0.1.6 → 0.1.8

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
@@ -1981,7 +1981,7 @@ declare class ProfileApi extends BaseService {
1981
1981
  uri: string;
1982
1982
  name: string;
1983
1983
  type: string;
1984
- };
1984
+ } | object;
1985
1985
  firstName?: string;
1986
1986
  lastName?: string;
1987
1987
  contactNumber?: string;
package/dist/index.d.ts CHANGED
@@ -1981,7 +1981,7 @@ declare class ProfileApi extends BaseService {
1981
1981
  uri: string;
1982
1982
  name: string;
1983
1983
  type: string;
1984
- };
1984
+ } | object;
1985
1985
  firstName?: string;
1986
1986
  lastName?: string;
1987
1987
  contactNumber?: string;
package/dist/index.js CHANGED
@@ -1353,7 +1353,6 @@ 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");
1357
1356
  var ProfileApi = class extends BaseService {
1358
1357
  constructor(client, baseUrl) {
1359
1358
  super(client, baseUrl);
@@ -1378,25 +1377,66 @@ var ProfileApi = class extends BaseService {
1378
1377
  */
1379
1378
  updateProfile(params, requestOptions) {
1380
1379
  return __async(this, null, function* () {
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 });
1388
- }
1389
- }
1390
- Object.keys(params).forEach((key) => {
1391
- if (key !== "profileImage" && params[key] !== void 0) {
1392
- formData.append(key, params[key]);
1380
+ return yield this.post(
1381
+ "profile/me",
1382
+ __spreadValues({
1383
+ data: params.profileImage,
1384
+ firstname: params.firstName,
1385
+ lastname: params.lastName,
1386
+ contact_number: params.contactNumber,
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
1393
1438
  }
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
- });
1439
+ );
1400
1440
  });
1401
1441
  }
1402
1442
  /**