@vitalfit/sdk 0.3.1 → 0.3.3

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.cjs CHANGED
@@ -397,6 +397,9 @@ var UserService = class {
397
397
  this.deleteUser = this.deleteUser.bind(this);
398
398
  this.resendActivateOtp = this.resendActivateOtp.bind(this);
399
399
  this.UpgradePassword = this.UpgradePassword.bind(this);
400
+ this.createMedicalProfile = this.createMedicalProfile.bind(this);
401
+ this.getMedicalProfile = this.getMedicalProfile.bind(this);
402
+ this.updateMedicalProfile = this.updateMedicalProfile.bind(this);
400
403
  }
401
404
  async getStaffUsers({ search, role }, jwt) {
402
405
  const response = await this.client.get({
@@ -494,6 +497,28 @@ var UserService = class {
494
497
  }
495
498
  });
496
499
  }
500
+ //medical
501
+ async createMedicalProfile(userId, data, jwt) {
502
+ await this.client.post({
503
+ url: `/clients/${userId}/medical-info`,
504
+ jwt,
505
+ data
506
+ });
507
+ }
508
+ async getMedicalProfile(userId, jwt) {
509
+ const response = await this.client.get({
510
+ url: `/clients/${userId}/medical-info`,
511
+ jwt
512
+ });
513
+ return response;
514
+ }
515
+ async updateMedicalProfile(userId, data, jwt) {
516
+ await this.client.put({
517
+ url: `/clients/${userId}/medical-info`,
518
+ jwt,
519
+ data
520
+ });
521
+ }
497
522
  };
498
523
 
499
524
  // src/services/branch.ts
@@ -942,6 +967,7 @@ var MembershipService = class {
942
967
  this.getCancelReasons = this.getCancelReasons.bind(this);
943
968
  this.updateCancelReason = this.updateCancelReason.bind(this);
944
969
  this.deleteCancelReason = this.deleteCancelReason.bind(this);
970
+ this.getMyMemberships = this.getMyMemberships.bind(this);
945
971
  }
946
972
  async createMembershipType(data, jwt) {
947
973
  await this.client.post({
@@ -1064,6 +1090,13 @@ var MembershipService = class {
1064
1090
  jwt
1065
1091
  });
1066
1092
  }
1093
+ async getMyMemberships(jwt) {
1094
+ const response = await this.client.get({
1095
+ url: "/client-memberships/me",
1096
+ jwt
1097
+ });
1098
+ return response;
1099
+ }
1067
1100
  };
1068
1101
 
1069
1102
  // src/services/public.ts
@@ -1635,8 +1668,8 @@ var BookingService = class {
1635
1668
  });
1636
1669
  }
1637
1670
  async cancelBooking(bookingId, jwt) {
1638
- await this.client.delete({
1639
- url: `/booking/${bookingId}/cancel`,
1671
+ await this.client.patch({
1672
+ url: `/bookings/${bookingId}/cancel`,
1640
1673
  jwt
1641
1674
  });
1642
1675
  }
@@ -1737,6 +1770,7 @@ var ReportService = class {
1737
1770
  this.classOccupancyChart = this.classOccupancyChart.bind(this);
1738
1771
  this.financialSummary = this.financialSummary.bind(this);
1739
1772
  this.salesByDemography = this.salesByDemography.bind(this);
1773
+ this.churnRateKPI = this.churnRateKPI.bind(this);
1740
1774
  }
1741
1775
  async mostUsedServices(jwt, start, end) {
1742
1776
  const response = await this.client.get({
@@ -2073,6 +2107,14 @@ var ReportService = class {
2073
2107
  });
2074
2108
  return response;
2075
2109
  }
2110
+ async churnRateKPI(jwt, branchId) {
2111
+ const response = await this.client.get({
2112
+ url: "/reports/kpi/churn-rate",
2113
+ jwt,
2114
+ params: branchId ? { branch_id: branchId } : void 0
2115
+ });
2116
+ return response;
2117
+ }
2076
2118
  };
2077
2119
 
2078
2120
  // src/services/staff.ts
@@ -2406,7 +2448,7 @@ var VitalFit = class _VitalFit {
2406
2448
  return _VitalFit.instance;
2407
2449
  }
2408
2450
  version() {
2409
- return "0.3.1";
2451
+ return "0.3.3";
2410
2452
  }
2411
2453
  };
2412
2454
  // Annotate the CommonJS export names for ESM import in node: