@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.cjs +43 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +133 -114
- package/dist/index.d.ts +133 -114
- package/dist/index.js +43 -9
- 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(jwt, instructorId, { 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`,
|
|
@@ -2483,36 +2517,36 @@ var ExportsService = class {
|
|
|
2483
2517
|
this.exportPaymentMethods = this.exportPaymentMethods.bind(this);
|
|
2484
2518
|
}
|
|
2485
2519
|
// Reports
|
|
2486
|
-
async exportFinancialReport(jwt, start, end, branchId) {
|
|
2520
|
+
async exportFinancialReport(jwt, start, end, branchId, format) {
|
|
2487
2521
|
return await this.client.download({
|
|
2488
2522
|
url: "/reports/export/financial",
|
|
2489
2523
|
jwt,
|
|
2490
2524
|
params: {
|
|
2491
2525
|
start,
|
|
2492
2526
|
end,
|
|
2493
|
-
branch_id: branchId
|
|
2527
|
+
branch_id: branchId,
|
|
2528
|
+
type: format
|
|
2494
2529
|
}
|
|
2495
2530
|
});
|
|
2496
2531
|
}
|
|
2497
|
-
async exportClientsReport(jwt,
|
|
2532
|
+
async exportClientsReport(jwt, format) {
|
|
2498
2533
|
return await this.client.download({
|
|
2499
2534
|
url: "/reports/export/clients",
|
|
2500
2535
|
jwt,
|
|
2501
2536
|
params: {
|
|
2502
|
-
|
|
2503
|
-
end,
|
|
2504
|
-
branch_id: branchId
|
|
2537
|
+
type: format
|
|
2505
2538
|
}
|
|
2506
2539
|
});
|
|
2507
2540
|
}
|
|
2508
|
-
async exportSalesReport(jwt, start, end, branchId) {
|
|
2541
|
+
async exportSalesReport(jwt, start, end, branchId, format) {
|
|
2509
2542
|
return await this.client.download({
|
|
2510
2543
|
url: "/reports/export/sales",
|
|
2511
2544
|
jwt,
|
|
2512
2545
|
params: {
|
|
2513
2546
|
start,
|
|
2514
2547
|
end,
|
|
2515
|
-
branch_id: branchId
|
|
2548
|
+
branch_id: branchId,
|
|
2549
|
+
type: format
|
|
2516
2550
|
}
|
|
2517
2551
|
});
|
|
2518
2552
|
}
|
|
@@ -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.10";
|
|
2747
2781
|
}
|
|
2748
2782
|
};
|
|
2749
2783
|
// Annotate the CommonJS export names for ESM import in node:
|