@vitalfit/sdk 0.1.8 → 0.2.0
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 +61 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1460,6 +1460,7 @@ var BookingService = class {
|
|
|
1460
1460
|
this.getClientBooking = this.getClientBooking.bind(this);
|
|
1461
1461
|
this.getClientBranchBooking = this.getClientBranchBooking.bind(this);
|
|
1462
1462
|
this.getClassBookingCount = this.getClassBookingCount.bind(this);
|
|
1463
|
+
this.getBookingClass = this.getBookingClass.bind(this);
|
|
1463
1464
|
}
|
|
1464
1465
|
async bookClass(data, classID, jwt) {
|
|
1465
1466
|
await this.client.post({
|
|
@@ -1495,6 +1496,18 @@ var BookingService = class {
|
|
|
1495
1496
|
});
|
|
1496
1497
|
return response;
|
|
1497
1498
|
}
|
|
1499
|
+
async getBookingClass(classID, jwt, { page = 10, limit = 10, sort = "desc" }) {
|
|
1500
|
+
const response = await this.client.get({
|
|
1501
|
+
url: `/bookings/class/${classID}`,
|
|
1502
|
+
jwt,
|
|
1503
|
+
params: {
|
|
1504
|
+
page,
|
|
1505
|
+
limit,
|
|
1506
|
+
sort
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
return response;
|
|
1510
|
+
}
|
|
1498
1511
|
};
|
|
1499
1512
|
|
|
1500
1513
|
// src/services/access.ts
|
|
@@ -1893,6 +1906,7 @@ var StaffService = class {
|
|
|
1893
1906
|
this.getBranchstaff = this.getBranchstaff.bind(this);
|
|
1894
1907
|
this.AssignBranchStaff = this.AssignBranchStaff.bind(this);
|
|
1895
1908
|
this.RemoveBranchStaff = this.RemoveBranchStaff.bind(this);
|
|
1909
|
+
this.getInstructorBranches = this.getInstructorBranches.bind(this);
|
|
1896
1910
|
}
|
|
1897
1911
|
async getStaffBranches(jwt) {
|
|
1898
1912
|
const response = await this.client.get({
|
|
@@ -1901,6 +1915,13 @@ var StaffService = class {
|
|
|
1901
1915
|
});
|
|
1902
1916
|
return response;
|
|
1903
1917
|
}
|
|
1918
|
+
async getInstructorBranches(jwt) {
|
|
1919
|
+
const response = await this.client.get({
|
|
1920
|
+
url: "/staff/instructor-branches",
|
|
1921
|
+
jwt
|
|
1922
|
+
});
|
|
1923
|
+
return response;
|
|
1924
|
+
}
|
|
1904
1925
|
async getManagedBranches(jwt) {
|
|
1905
1926
|
const response = await this.client.get({
|
|
1906
1927
|
url: "/staff/managed-branches",
|
|
@@ -1945,6 +1966,43 @@ var StaffService = class {
|
|
|
1945
1966
|
}
|
|
1946
1967
|
};
|
|
1947
1968
|
|
|
1969
|
+
// src/services/wishlist.ts
|
|
1970
|
+
var WishListService = class {
|
|
1971
|
+
client;
|
|
1972
|
+
constructor(client) {
|
|
1973
|
+
this.client = client;
|
|
1974
|
+
this.addToWishList = this.addToWishList.bind(this);
|
|
1975
|
+
this.removeFromWishList = this.removeFromWishList.bind(this);
|
|
1976
|
+
this.getWishList = this.getWishList.bind(this);
|
|
1977
|
+
}
|
|
1978
|
+
async addToWishList(data, jwt) {
|
|
1979
|
+
await this.client.post({
|
|
1980
|
+
url: `/wishlist`,
|
|
1981
|
+
jwt,
|
|
1982
|
+
data
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
async removeFromWishList(wishlistId, jwt) {
|
|
1986
|
+
await this.client.delete({
|
|
1987
|
+
url: `/wishlist/${wishlistId}`,
|
|
1988
|
+
jwt
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
async getWishList(jwt, { page = 10, limit = 10, sort = "desc", search }) {
|
|
1992
|
+
const response = await this.client.get({
|
|
1993
|
+
url: `/wishlist`,
|
|
1994
|
+
jwt,
|
|
1995
|
+
params: {
|
|
1996
|
+
page,
|
|
1997
|
+
limit,
|
|
1998
|
+
sort,
|
|
1999
|
+
search
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
return response;
|
|
2003
|
+
}
|
|
2004
|
+
};
|
|
2005
|
+
|
|
1948
2006
|
// src/types/auth.ts
|
|
1949
2007
|
var UserGender = /* @__PURE__ */ ((UserGender2) => {
|
|
1950
2008
|
UserGender2["male"] = "male";
|
|
@@ -2067,6 +2125,7 @@ var VitalFit = class _VitalFit {
|
|
|
2067
2125
|
access;
|
|
2068
2126
|
report;
|
|
2069
2127
|
staff;
|
|
2128
|
+
wishList;
|
|
2070
2129
|
constructor(isDevMode, origin) {
|
|
2071
2130
|
this.client = new Client(isDevMode, origin);
|
|
2072
2131
|
this.auth = new AuthService(this.client);
|
|
@@ -2087,6 +2146,7 @@ var VitalFit = class _VitalFit {
|
|
|
2087
2146
|
this.access = new AccessService(this.client);
|
|
2088
2147
|
this.report = new ReportService(this.client);
|
|
2089
2148
|
this.staff = new StaffService(this.client);
|
|
2149
|
+
this.wishList = new WishListService(this.client);
|
|
2090
2150
|
}
|
|
2091
2151
|
static getInstance(isDevMode = false) {
|
|
2092
2152
|
if (!_VitalFit.instance) {
|
|
@@ -2095,7 +2155,7 @@ var VitalFit = class _VitalFit {
|
|
|
2095
2155
|
return _VitalFit.instance;
|
|
2096
2156
|
}
|
|
2097
2157
|
version() {
|
|
2098
|
-
return "0.
|
|
2158
|
+
return "0.2.0";
|
|
2099
2159
|
}
|
|
2100
2160
|
};
|
|
2101
2161
|
// Annotate the CommonJS export names for ESM import in node:
|