@gymspace/sdk 1.1.1 → 1.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.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +4 -1
- package/src/models/clients.ts +8 -0
- package/src/sdk.ts +1 -1
package/src/client.ts
CHANGED
|
@@ -20,6 +20,10 @@ export class ApiClient {
|
|
|
20
20
|
private config: GymSpaceConfig;
|
|
21
21
|
private refreshToken: string | null = null;
|
|
22
22
|
|
|
23
|
+
public getAccessToken(): string | null {
|
|
24
|
+
return this.config.apiKey || null;
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
constructor(config: GymSpaceConfig) {
|
|
24
28
|
this.config = config;
|
|
25
29
|
|
|
@@ -68,7 +72,6 @@ export class ApiClient {
|
|
|
68
72
|
);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
|
|
72
75
|
private handleError(error: AxiosError): GymSpaceError {
|
|
73
76
|
const requestPath = error.config?.url || 'unknown';
|
|
74
77
|
const method = error.config?.method?.toUpperCase() || 'unknown';
|
package/src/models/clients.ts
CHANGED
|
@@ -78,6 +78,12 @@ export interface Client {
|
|
|
78
78
|
evaluations: number;
|
|
79
79
|
checkIns: number;
|
|
80
80
|
};
|
|
81
|
+
hasCheckedInToday?: boolean;
|
|
82
|
+
lastCheckIn?: {
|
|
83
|
+
id: string;
|
|
84
|
+
timestamp: string;
|
|
85
|
+
createdAt: string;
|
|
86
|
+
};
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
export interface ClientStat {
|
|
@@ -124,6 +130,8 @@ export interface SearchClientsParams extends PaginationQueryDto {
|
|
|
124
130
|
clientNumber?: string;
|
|
125
131
|
documentId?: string;
|
|
126
132
|
includeContractStatus?: boolean;
|
|
133
|
+
notCheckedInToday?: boolean;
|
|
134
|
+
checkedInToday?: boolean;
|
|
127
135
|
}
|
|
128
136
|
|
|
129
137
|
export interface ClientSearchForCheckInResponse {
|