@vitalfit/sdk 0.3.8 → 0.3.10

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.js CHANGED
@@ -697,6 +697,7 @@ var InstructorService = class {
697
697
  this.deleteInstructor = this.deleteInstructor.bind(this);
698
698
  this.addSpecialty = this.addSpecialty.bind(this);
699
699
  this.removeSpecialty = this.removeSpecialty.bind(this);
700
+ this.getAssignedClients = this.getAssignedClients.bind(this);
700
701
  this.addBranchInstructor = this.addBranchInstructor.bind(this);
701
702
  this.removeBranchInstructor = this.removeBranchInstructor.bind(this);
702
703
  this.getBranchInstructors = this.getBranchInstructors.bind(this);
@@ -763,6 +764,19 @@ var InstructorService = class {
763
764
  jwt
764
765
  });
765
766
  }
767
+ async getAssignedClients(jwt, instructorId, { page = 1, limit = 10, sort = "desc", search } = {}) {
768
+ const response = await this.client.get({
769
+ url: `/instructor/${instructorId}/clients`,
770
+ jwt,
771
+ params: {
772
+ page,
773
+ limit,
774
+ sort,
775
+ search
776
+ }
777
+ });
778
+ return response;
779
+ }
766
780
  async addBranchInstructor(branchId, instructorIDs, jwt) {
767
781
  await this.client.post({
768
782
  url: `/branches/${branchId}/instructor`,
@@ -1211,6 +1225,7 @@ var ProductsService = class {
1211
1225
  this.createService = this.createService.bind(this);
1212
1226
  this.getServices = this.getServices.bind(this);
1213
1227
  this.getSummary = this.getSummary.bind(this);
1228
+ this.getClientBalances = this.getClientBalances.bind(this);
1214
1229
  this.getServiceByID = this.getServiceByID.bind(this);
1215
1230
  this.updateService = this.updateService.bind(this);
1216
1231
  this.deleteService = this.deleteService.bind(this);
@@ -1255,6 +1270,16 @@ var ProductsService = class {
1255
1270
  });
1256
1271
  return response;
1257
1272
  }
1273
+ async getClientBalances(jwt, userId) {
1274
+ const response = await this.client.get({
1275
+ url: "/services/balances",
1276
+ jwt,
1277
+ params: {
1278
+ user_id: userId
1279
+ }
1280
+ });
1281
+ return response;
1282
+ }
1258
1283
  async getServiceByID(serviceId, jwt) {
1259
1284
  const response = await this.client.get({
1260
1285
  url: `/services/${serviceId}`,
@@ -1751,6 +1776,7 @@ var AccessService = class {
1751
1776
  constructor(client) {
1752
1777
  this.client = client;
1753
1778
  this.checkIn = this.checkIn.bind(this);
1779
+ this.checkInManual = this.checkInManual.bind(this);
1754
1780
  this.getClientAttendanceHistory = this.getClientAttendanceHistory.bind(this);
1755
1781
  this.getClientServiceUsage = this.getClientServiceUsage.bind(this);
1756
1782
  this.getClassAttendanceHistory = this.getClassAttendanceHistory.bind(this);
@@ -1763,6 +1789,14 @@ var AccessService = class {
1763
1789
  });
1764
1790
  return response;
1765
1791
  }
1792
+ async checkInManual(jwt, data) {
1793
+ const response = await this.client.post({
1794
+ url: "/access/check-in/manual",
1795
+ jwt,
1796
+ data
1797
+ });
1798
+ return response;
1799
+ }
1766
1800
  async getClientAttendanceHistory(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
1767
1801
  const response = await this.client.get({
1768
1802
  url: `/clients/${userId}/attendance-history`,
@@ -2443,36 +2477,36 @@ var ExportsService = class {
2443
2477
  this.exportPaymentMethods = this.exportPaymentMethods.bind(this);
2444
2478
  }
2445
2479
  // Reports
2446
- async exportFinancialReport(jwt, start, end, branchId) {
2480
+ async exportFinancialReport(jwt, start, end, branchId, format) {
2447
2481
  return await this.client.download({
2448
2482
  url: "/reports/export/financial",
2449
2483
  jwt,
2450
2484
  params: {
2451
2485
  start,
2452
2486
  end,
2453
- branch_id: branchId
2487
+ branch_id: branchId,
2488
+ type: format
2454
2489
  }
2455
2490
  });
2456
2491
  }
2457
- async exportClientsReport(jwt, start, end, branchId) {
2492
+ async exportClientsReport(jwt, format) {
2458
2493
  return await this.client.download({
2459
2494
  url: "/reports/export/clients",
2460
2495
  jwt,
2461
2496
  params: {
2462
- start,
2463
- end,
2464
- branch_id: branchId
2497
+ type: format
2465
2498
  }
2466
2499
  });
2467
2500
  }
2468
- async exportSalesReport(jwt, start, end, branchId) {
2501
+ async exportSalesReport(jwt, start, end, branchId, format) {
2469
2502
  return await this.client.download({
2470
2503
  url: "/reports/export/sales",
2471
2504
  jwt,
2472
2505
  params: {
2473
2506
  start,
2474
2507
  end,
2475
- branch_id: branchId
2508
+ branch_id: branchId,
2509
+ type: format
2476
2510
  }
2477
2511
  });
2478
2512
  }
@@ -2703,7 +2737,7 @@ var VitalFit = class _VitalFit {
2703
2737
  return _VitalFit.instance;
2704
2738
  }
2705
2739
  version() {
2706
- return "0.3.8";
2740
+ return "0.3.10";
2707
2741
  }
2708
2742
  };
2709
2743
  export {