@gymspace/sdk 1.2.8 → 1.2.9
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.d.mts +36 -3
- package/dist/index.d.ts +36 -3
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/check-ins.ts +6 -4
- package/src/models/dashboard.ts +26 -1
- package/src/resources/admin-subscription-management.ts +1 -1
- package/src/resources/dashboard.ts +11 -1
package/package.json
CHANGED
package/src/models/check-ins.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { PaginationQueryDto } from '../types';
|
|
2
|
-
|
|
3
1
|
export interface CreateCheckInDto {
|
|
4
2
|
gymClientId: string;
|
|
5
3
|
notes?: string;
|
|
@@ -27,10 +25,12 @@ export interface CheckIn {
|
|
|
27
25
|
};
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
export interface SearchCheckInsParams
|
|
28
|
+
export interface SearchCheckInsParams {
|
|
31
29
|
clientId?: string;
|
|
32
30
|
startDate?: string;
|
|
33
31
|
endDate?: string;
|
|
32
|
+
limit?: number;
|
|
33
|
+
offset?: number;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export interface GetCheckInStatsParams {
|
|
@@ -46,7 +46,9 @@ export interface CheckInStats {
|
|
|
46
46
|
dayDistribution: Record<string, number>;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export interface GetClientCheckInHistoryParams
|
|
49
|
+
export interface GetClientCheckInHistoryParams {
|
|
50
|
+
limit?: number;
|
|
51
|
+
offset?: number;
|
|
50
52
|
// Additional check-in history specific parameters can be added here
|
|
51
53
|
}
|
|
52
54
|
|
package/src/models/dashboard.ts
CHANGED
|
@@ -62,4 +62,29 @@ export interface ExpiringContract {
|
|
|
62
62
|
export interface DateRangeParams {
|
|
63
63
|
startDate?: string;
|
|
64
64
|
endDate?: string;
|
|
65
|
-
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface CheckInDetail {
|
|
68
|
+
id: string;
|
|
69
|
+
timestamp: string;
|
|
70
|
+
gymClientId: string;
|
|
71
|
+
client: {
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
clientNumber: string;
|
|
75
|
+
status: string;
|
|
76
|
+
profilePhotoId: string | null;
|
|
77
|
+
};
|
|
78
|
+
notes: string | null;
|
|
79
|
+
registeredBy: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface CheckInsList {
|
|
86
|
+
checkIns: CheckInDetail[];
|
|
87
|
+
total: number;
|
|
88
|
+
startDate: string;
|
|
89
|
+
endDate: string;
|
|
90
|
+
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
CheckIns,
|
|
9
9
|
NewClients,
|
|
10
10
|
DateRangeParams,
|
|
11
|
+
CheckInsList,
|
|
11
12
|
} from '../models/dashboard';
|
|
12
13
|
|
|
13
14
|
export class DashboardResource extends BaseResource {
|
|
@@ -79,4 +80,13 @@ export class DashboardResource extends BaseResource {
|
|
|
79
80
|
...params,
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
|
-
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Get detailed list of check-ins within date range
|
|
86
|
+
* @param params Optional date range parameters (defaults to current day)
|
|
87
|
+
* @returns Detailed list of check-ins with client and registeredBy information
|
|
88
|
+
*/
|
|
89
|
+
async getCheckInsList(params?: DateRangeParams): Promise<CheckInsList> {
|
|
90
|
+
return this.client.get<CheckInsList>('/dashboard/check-ins/list', params);
|
|
91
|
+
}
|
|
92
|
+
}
|