@vitalfit/sdk 0.2.1 → 0.2.2
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 +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +35 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2003,6 +2003,38 @@ var WishListService = class {
|
|
|
2003
2003
|
}
|
|
2004
2004
|
};
|
|
2005
2005
|
|
|
2006
|
+
// src/services/policies.ts
|
|
2007
|
+
var PolicyService = class {
|
|
2008
|
+
client;
|
|
2009
|
+
constructor(client) {
|
|
2010
|
+
this.client = client;
|
|
2011
|
+
this.getPolicies = this.getPolicies.bind(this);
|
|
2012
|
+
this.getPolicyByID = this.getPolicyByID.bind(this);
|
|
2013
|
+
this.updatePolicy = this.updatePolicy.bind(this);
|
|
2014
|
+
}
|
|
2015
|
+
async getPolicies(jwt) {
|
|
2016
|
+
const response = await this.client.get({
|
|
2017
|
+
url: "/policies",
|
|
2018
|
+
jwt
|
|
2019
|
+
});
|
|
2020
|
+
return response;
|
|
2021
|
+
}
|
|
2022
|
+
async getPolicyByID(policyId, jwt) {
|
|
2023
|
+
const response = await this.client.get({
|
|
2024
|
+
url: `/policies/${policyId}`,
|
|
2025
|
+
jwt
|
|
2026
|
+
});
|
|
2027
|
+
return response;
|
|
2028
|
+
}
|
|
2029
|
+
async updatePolicy(policyId, data, jwt) {
|
|
2030
|
+
await this.client.put({
|
|
2031
|
+
url: `/policies/${policyId}`,
|
|
2032
|
+
jwt,
|
|
2033
|
+
data
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2006
2038
|
// src/types/auth.ts
|
|
2007
2039
|
var UserGender = /* @__PURE__ */ ((UserGender2) => {
|
|
2008
2040
|
UserGender2["male"] = "male";
|
|
@@ -2126,6 +2158,7 @@ var VitalFit = class _VitalFit {
|
|
|
2126
2158
|
report;
|
|
2127
2159
|
staff;
|
|
2128
2160
|
wishList;
|
|
2161
|
+
policy;
|
|
2129
2162
|
constructor(isDevMode, origin) {
|
|
2130
2163
|
this.client = new Client(isDevMode, origin);
|
|
2131
2164
|
this.auth = new AuthService(this.client);
|
|
@@ -2147,6 +2180,7 @@ var VitalFit = class _VitalFit {
|
|
|
2147
2180
|
this.report = new ReportService(this.client);
|
|
2148
2181
|
this.staff = new StaffService(this.client);
|
|
2149
2182
|
this.wishList = new WishListService(this.client);
|
|
2183
|
+
this.policy = new PolicyService(this.client);
|
|
2150
2184
|
}
|
|
2151
2185
|
static getInstance(isDevMode = false) {
|
|
2152
2186
|
if (!_VitalFit.instance) {
|
|
@@ -2155,7 +2189,7 @@ var VitalFit = class _VitalFit {
|
|
|
2155
2189
|
return _VitalFit.instance;
|
|
2156
2190
|
}
|
|
2157
2191
|
version() {
|
|
2158
|
-
return "0.2.
|
|
2192
|
+
return "0.2.2";
|
|
2159
2193
|
}
|
|
2160
2194
|
};
|
|
2161
2195
|
// Annotate the CommonJS export names for ESM import in node:
|