@vitalfit/sdk 0.1.9 → 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 +53 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -1
- package/dist/index.d.ts +32 -1
- package/dist/index.js +53 -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
|
|
@@ -1953,6 +1966,43 @@ var StaffService = class {
|
|
|
1953
1966
|
}
|
|
1954
1967
|
};
|
|
1955
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
|
+
|
|
1956
2006
|
// src/types/auth.ts
|
|
1957
2007
|
var UserGender = /* @__PURE__ */ ((UserGender2) => {
|
|
1958
2008
|
UserGender2["male"] = "male";
|
|
@@ -2075,6 +2125,7 @@ var VitalFit = class _VitalFit {
|
|
|
2075
2125
|
access;
|
|
2076
2126
|
report;
|
|
2077
2127
|
staff;
|
|
2128
|
+
wishList;
|
|
2078
2129
|
constructor(isDevMode, origin) {
|
|
2079
2130
|
this.client = new Client(isDevMode, origin);
|
|
2080
2131
|
this.auth = new AuthService(this.client);
|
|
@@ -2095,6 +2146,7 @@ var VitalFit = class _VitalFit {
|
|
|
2095
2146
|
this.access = new AccessService(this.client);
|
|
2096
2147
|
this.report = new ReportService(this.client);
|
|
2097
2148
|
this.staff = new StaffService(this.client);
|
|
2149
|
+
this.wishList = new WishListService(this.client);
|
|
2098
2150
|
}
|
|
2099
2151
|
static getInstance(isDevMode = false) {
|
|
2100
2152
|
if (!_VitalFit.instance) {
|
|
@@ -2103,7 +2155,7 @@ var VitalFit = class _VitalFit {
|
|
|
2103
2155
|
return _VitalFit.instance;
|
|
2104
2156
|
}
|
|
2105
2157
|
version() {
|
|
2106
|
-
return "0.
|
|
2158
|
+
return "0.2.0";
|
|
2107
2159
|
}
|
|
2108
2160
|
};
|
|
2109
2161
|
// Annotate the CommonJS export names for ESM import in node:
|