@vitalfit/sdk 0.3.3 → 0.3.4
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 +38 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.js +38 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -871,6 +871,7 @@ var MarketingService = class {
|
|
|
871
871
|
this.getPromotionByID = this.getPromotionByID.bind(this);
|
|
872
872
|
this.updatePromotion = this.updatePromotion.bind(this);
|
|
873
873
|
this.deletePromotion = this.deletePromotion.bind(this);
|
|
874
|
+
this.getRandomBanner = this.getRandomBanner.bind(this);
|
|
874
875
|
}
|
|
875
876
|
async createBanners(BannerData, jwt) {
|
|
876
877
|
await this.client.post({
|
|
@@ -946,6 +947,12 @@ var MarketingService = class {
|
|
|
946
947
|
jwt
|
|
947
948
|
});
|
|
948
949
|
}
|
|
950
|
+
async getRandomBanner() {
|
|
951
|
+
const response = await this.client.get({
|
|
952
|
+
url: "/marketing/banners/random"
|
|
953
|
+
});
|
|
954
|
+
return response;
|
|
955
|
+
}
|
|
949
956
|
};
|
|
950
957
|
|
|
951
958
|
// src/services/memberships.ts
|
|
@@ -1714,6 +1721,8 @@ var AccessService = class {
|
|
|
1714
1721
|
constructor(client) {
|
|
1715
1722
|
this.client = client;
|
|
1716
1723
|
this.checkIn = this.checkIn.bind(this);
|
|
1724
|
+
this.getClientAttendanceHistory = this.getClientAttendanceHistory.bind(this);
|
|
1725
|
+
this.getClientServiceUsage = this.getClientServiceUsage.bind(this);
|
|
1717
1726
|
}
|
|
1718
1727
|
async checkIn(jwt, data) {
|
|
1719
1728
|
const response = await this.client.post({
|
|
@@ -1723,6 +1732,34 @@ var AccessService = class {
|
|
|
1723
1732
|
});
|
|
1724
1733
|
return response;
|
|
1725
1734
|
}
|
|
1735
|
+
async getClientAttendanceHistory(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
|
|
1736
|
+
const response = await this.client.get({
|
|
1737
|
+
url: `/clients/${userId}/attendance-history`,
|
|
1738
|
+
jwt,
|
|
1739
|
+
params: {
|
|
1740
|
+
start_date: start,
|
|
1741
|
+
end_date: end,
|
|
1742
|
+
page,
|
|
1743
|
+
limit,
|
|
1744
|
+
sort
|
|
1745
|
+
}
|
|
1746
|
+
});
|
|
1747
|
+
return response;
|
|
1748
|
+
}
|
|
1749
|
+
async getClientServiceUsage(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
|
|
1750
|
+
const response = await this.client.get({
|
|
1751
|
+
url: `/clients/${userId}/service-usage`,
|
|
1752
|
+
jwt,
|
|
1753
|
+
params: {
|
|
1754
|
+
start_date: start,
|
|
1755
|
+
end_date: end,
|
|
1756
|
+
page,
|
|
1757
|
+
limit,
|
|
1758
|
+
sort
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
return response;
|
|
1762
|
+
}
|
|
1726
1763
|
};
|
|
1727
1764
|
|
|
1728
1765
|
// src/services/reports.ts
|
|
@@ -2448,7 +2485,7 @@ var VitalFit = class _VitalFit {
|
|
|
2448
2485
|
return _VitalFit.instance;
|
|
2449
2486
|
}
|
|
2450
2487
|
version() {
|
|
2451
|
-
return "0.3.
|
|
2488
|
+
return "0.3.4";
|
|
2452
2489
|
}
|
|
2453
2490
|
};
|
|
2454
2491
|
// Annotate the CommonJS export names for ESM import in node:
|