@vitalfit/sdk 0.3.8 → 0.3.9
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 +35 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +130 -111
- package/dist/index.d.ts +130 -111
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -737,6 +737,7 @@ var InstructorService = class {
|
|
|
737
737
|
this.deleteInstructor = this.deleteInstructor.bind(this);
|
|
738
738
|
this.addSpecialty = this.addSpecialty.bind(this);
|
|
739
739
|
this.removeSpecialty = this.removeSpecialty.bind(this);
|
|
740
|
+
this.getAssignedClients = this.getAssignedClients.bind(this);
|
|
740
741
|
this.addBranchInstructor = this.addBranchInstructor.bind(this);
|
|
741
742
|
this.removeBranchInstructor = this.removeBranchInstructor.bind(this);
|
|
742
743
|
this.getBranchInstructors = this.getBranchInstructors.bind(this);
|
|
@@ -803,6 +804,19 @@ var InstructorService = class {
|
|
|
803
804
|
jwt
|
|
804
805
|
});
|
|
805
806
|
}
|
|
807
|
+
async getAssignedClients(instructorId, jwt, { page = 1, limit = 10, sort = "desc", search } = {}) {
|
|
808
|
+
const response = await this.client.get({
|
|
809
|
+
url: `/instructor/${instructorId}/clients`,
|
|
810
|
+
jwt,
|
|
811
|
+
params: {
|
|
812
|
+
page,
|
|
813
|
+
limit,
|
|
814
|
+
sort,
|
|
815
|
+
search
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
return response;
|
|
819
|
+
}
|
|
806
820
|
async addBranchInstructor(branchId, instructorIDs, jwt) {
|
|
807
821
|
await this.client.post({
|
|
808
822
|
url: `/branches/${branchId}/instructor`,
|
|
@@ -1251,6 +1265,7 @@ var ProductsService = class {
|
|
|
1251
1265
|
this.createService = this.createService.bind(this);
|
|
1252
1266
|
this.getServices = this.getServices.bind(this);
|
|
1253
1267
|
this.getSummary = this.getSummary.bind(this);
|
|
1268
|
+
this.getClientBalances = this.getClientBalances.bind(this);
|
|
1254
1269
|
this.getServiceByID = this.getServiceByID.bind(this);
|
|
1255
1270
|
this.updateService = this.updateService.bind(this);
|
|
1256
1271
|
this.deleteService = this.deleteService.bind(this);
|
|
@@ -1295,6 +1310,16 @@ var ProductsService = class {
|
|
|
1295
1310
|
});
|
|
1296
1311
|
return response;
|
|
1297
1312
|
}
|
|
1313
|
+
async getClientBalances(jwt, userId) {
|
|
1314
|
+
const response = await this.client.get({
|
|
1315
|
+
url: "/services/balances",
|
|
1316
|
+
jwt,
|
|
1317
|
+
params: {
|
|
1318
|
+
user_id: userId
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1321
|
+
return response;
|
|
1322
|
+
}
|
|
1298
1323
|
async getServiceByID(serviceId, jwt) {
|
|
1299
1324
|
const response = await this.client.get({
|
|
1300
1325
|
url: `/services/${serviceId}`,
|
|
@@ -1791,6 +1816,7 @@ var AccessService = class {
|
|
|
1791
1816
|
constructor(client) {
|
|
1792
1817
|
this.client = client;
|
|
1793
1818
|
this.checkIn = this.checkIn.bind(this);
|
|
1819
|
+
this.checkInManual = this.checkInManual.bind(this);
|
|
1794
1820
|
this.getClientAttendanceHistory = this.getClientAttendanceHistory.bind(this);
|
|
1795
1821
|
this.getClientServiceUsage = this.getClientServiceUsage.bind(this);
|
|
1796
1822
|
this.getClassAttendanceHistory = this.getClassAttendanceHistory.bind(this);
|
|
@@ -1803,6 +1829,14 @@ var AccessService = class {
|
|
|
1803
1829
|
});
|
|
1804
1830
|
return response;
|
|
1805
1831
|
}
|
|
1832
|
+
async checkInManual(jwt, data) {
|
|
1833
|
+
const response = await this.client.post({
|
|
1834
|
+
url: "/access/check-in/manual",
|
|
1835
|
+
jwt,
|
|
1836
|
+
data
|
|
1837
|
+
});
|
|
1838
|
+
return response;
|
|
1839
|
+
}
|
|
1806
1840
|
async getClientAttendanceHistory(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
|
|
1807
1841
|
const response = await this.client.get({
|
|
1808
1842
|
url: `/clients/${userId}/attendance-history`,
|
|
@@ -2743,7 +2777,7 @@ var VitalFit = class _VitalFit {
|
|
|
2743
2777
|
return _VitalFit.instance;
|
|
2744
2778
|
}
|
|
2745
2779
|
version() {
|
|
2746
|
-
return "0.3.
|
|
2780
|
+
return "0.3.9";
|
|
2747
2781
|
}
|
|
2748
2782
|
};
|
|
2749
2783
|
// Annotate the CommonJS export names for ESM import in node:
|