@gymspace/sdk 1.0.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/README.md +160 -0
- package/dist/index.js +1379 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1321 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +76 -0
- package/src/client.ts +200 -0
- package/src/errors.ts +49 -0
- package/src/index.ts +15 -0
- package/src/models/assets.ts +24 -0
- package/src/models/auth.ts +155 -0
- package/src/models/check-ins.ts +75 -0
- package/src/models/clients.ts +109 -0
- package/src/models/contracts.ts +61 -0
- package/src/models/dashboard.ts +32 -0
- package/src/models/evaluations.ts +91 -0
- package/src/models/files.ts +23 -0
- package/src/models/gyms.ts +73 -0
- package/src/models/index.ts +24 -0
- package/src/models/invitations.ts +29 -0
- package/src/models/leads.ts +52 -0
- package/src/models/membership-plans.ts +71 -0
- package/src/models/onboarding.ts +171 -0
- package/src/models/organizations.ts +25 -0
- package/src/models/products.ts +99 -0
- package/src/models/sales.ts +108 -0
- package/src/models/suppliers.ts +57 -0
- package/src/models/users.ts +17 -0
- package/src/resources/assets.ts +102 -0
- package/src/resources/auth.ts +137 -0
- package/src/resources/base.ts +50 -0
- package/src/resources/check-ins.ts +63 -0
- package/src/resources/clients.ts +57 -0
- package/src/resources/contracts.ts +59 -0
- package/src/resources/dashboard.ts +30 -0
- package/src/resources/evaluations.ts +63 -0
- package/src/resources/files.ts +95 -0
- package/src/resources/gyms.ts +61 -0
- package/src/resources/health.ts +28 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/invitations.ts +38 -0
- package/src/resources/leads.ts +48 -0
- package/src/resources/membership-plans.ts +54 -0
- package/src/resources/onboarding.ts +58 -0
- package/src/resources/organizations.ts +23 -0
- package/src/resources/products.ts +91 -0
- package/src/resources/public-catalog.ts +61 -0
- package/src/resources/sales.ts +83 -0
- package/src/resources/suppliers.ts +44 -0
- package/src/resources/users.ts +27 -0
- package/src/sdk.ts +104 -0
- package/src/types.ts +41 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export interface RegisterOwnerDto {
|
|
2
|
+
name: string;
|
|
3
|
+
email: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
password: string;
|
|
6
|
+
organizationName: string;
|
|
7
|
+
subscriptionPlanId: string;
|
|
8
|
+
country?: string;
|
|
9
|
+
currency?: string;
|
|
10
|
+
timezone?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface LoginDto {
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface LoginResponseDto {
|
|
19
|
+
access_token: string;
|
|
20
|
+
refresh_token: string;
|
|
21
|
+
user: any;
|
|
22
|
+
redirectPath: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface VerifyEmailDto {
|
|
26
|
+
email: string;
|
|
27
|
+
code: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ResendVerificationDto {
|
|
31
|
+
email: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ChangePasswordDto {
|
|
35
|
+
currentPassword: string;
|
|
36
|
+
newPassword: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ChangePasswordResponseDto {
|
|
40
|
+
success: boolean;
|
|
41
|
+
message: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface RequestPasswordResetDto {
|
|
45
|
+
email: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface RequestPasswordResetResponseDto {
|
|
49
|
+
success: boolean;
|
|
50
|
+
message: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface VerifyResetCodeDto {
|
|
54
|
+
email: string;
|
|
55
|
+
code: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface VerifyResetCodeResponseDto {
|
|
59
|
+
resetToken: string;
|
|
60
|
+
expiresIn: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ResetPasswordDto {
|
|
64
|
+
resetToken: string;
|
|
65
|
+
newPassword: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface ResetPasswordResponseDto {
|
|
69
|
+
success: boolean;
|
|
70
|
+
message: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ResendResetCodeDto {
|
|
74
|
+
email: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ResendResetCodeResponseDto {
|
|
78
|
+
success: boolean;
|
|
79
|
+
message: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export interface RegisterCollaboratorDto {
|
|
84
|
+
invitationToken: string;
|
|
85
|
+
name: string;
|
|
86
|
+
phone: string;
|
|
87
|
+
password: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface SubscriptionPlan {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
price: number;
|
|
94
|
+
billingFrequency: string;
|
|
95
|
+
maxGyms: number;
|
|
96
|
+
maxClientsPerGym: number;
|
|
97
|
+
maxUsersPerGym: number;
|
|
98
|
+
features: any;
|
|
99
|
+
description?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
export interface InvitationValidationResponse {
|
|
104
|
+
valid: boolean;
|
|
105
|
+
invitation: {
|
|
106
|
+
id: string;
|
|
107
|
+
gymName: string;
|
|
108
|
+
gymLogo?: string;
|
|
109
|
+
gymAddress: string;
|
|
110
|
+
inviterName: string;
|
|
111
|
+
inviterRole: string;
|
|
112
|
+
role: string;
|
|
113
|
+
permissions: string[];
|
|
114
|
+
expiresAt: Date;
|
|
115
|
+
email: string;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CurrentSessionResponse {
|
|
120
|
+
user: {
|
|
121
|
+
id: string;
|
|
122
|
+
email: string;
|
|
123
|
+
name: string;
|
|
124
|
+
phone?: string;
|
|
125
|
+
userType: string;
|
|
126
|
+
emailVerifiedAt?: Date;
|
|
127
|
+
};
|
|
128
|
+
gym?: {
|
|
129
|
+
id: string;
|
|
130
|
+
organizationId: string;
|
|
131
|
+
name: string;
|
|
132
|
+
address?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
phone?: string;
|
|
135
|
+
gymCode: string;
|
|
136
|
+
profileAssetId?: string;
|
|
137
|
+
coverAssetId?: string;
|
|
138
|
+
evaluationStructure?: Record<string, any>;
|
|
139
|
+
};
|
|
140
|
+
organization?: {
|
|
141
|
+
id: string;
|
|
142
|
+
ownerUserId: string;
|
|
143
|
+
name: string;
|
|
144
|
+
subscriptionPlanId: string;
|
|
145
|
+
subscriptionStatus: string;
|
|
146
|
+
subscriptionStart: Date;
|
|
147
|
+
subscriptionEnd: Date;
|
|
148
|
+
country: string;
|
|
149
|
+
currency: string;
|
|
150
|
+
timezone: string;
|
|
151
|
+
settings?: Record<string, any>;
|
|
152
|
+
};
|
|
153
|
+
permissions: string[];
|
|
154
|
+
isAuthenticated: boolean;
|
|
155
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { PaginationQueryDto } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface CreateCheckInDto {
|
|
4
|
+
gymClientId: string;
|
|
5
|
+
notes?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface CheckIn {
|
|
9
|
+
id: string;
|
|
10
|
+
gymId: string;
|
|
11
|
+
gymClientId: string;
|
|
12
|
+
timestamp: string;
|
|
13
|
+
notes?: string;
|
|
14
|
+
registeredByUserId: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
gymClient?: {
|
|
18
|
+
id: string;
|
|
19
|
+
name: string;
|
|
20
|
+
email?: string;
|
|
21
|
+
clientNumber: string;
|
|
22
|
+
status: string;
|
|
23
|
+
};
|
|
24
|
+
registeredBy?: {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface SearchCheckInsParams extends PaginationQueryDto {
|
|
31
|
+
clientId?: string;
|
|
32
|
+
startDate?: string;
|
|
33
|
+
endDate?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface GetCheckInStatsParams {
|
|
37
|
+
period: 'day' | 'week' | 'month';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CheckInStats {
|
|
41
|
+
period: string;
|
|
42
|
+
totalCheckIns: number;
|
|
43
|
+
uniqueClients: number;
|
|
44
|
+
averagePerDay: number;
|
|
45
|
+
peakHours: Record<string, number>;
|
|
46
|
+
dayDistribution: Record<string, number>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface GetClientCheckInHistoryParams extends PaginationQueryDto {
|
|
50
|
+
// Additional check-in history specific parameters can be added here
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface CurrentlyInGymResponse {
|
|
54
|
+
total: number;
|
|
55
|
+
clients: CheckIn[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CheckInListResponse {
|
|
59
|
+
checkIns: CheckIn[];
|
|
60
|
+
pagination: {
|
|
61
|
+
total: number;
|
|
62
|
+
limit: number;
|
|
63
|
+
offset: number;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ClientCheckInHistory {
|
|
68
|
+
checkIns: CheckIn[];
|
|
69
|
+
metrics: {
|
|
70
|
+
totalCheckIns: number;
|
|
71
|
+
last30Days: number;
|
|
72
|
+
attendanceRate: number;
|
|
73
|
+
lastCheckIn: string | null;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { PaginationQueryDto } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface CreateClientDto {
|
|
4
|
+
name: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
documentValue?: string;
|
|
8
|
+
documentType?: string;
|
|
9
|
+
birthDate?: string;
|
|
10
|
+
gender?: string;
|
|
11
|
+
maritalStatus?: string;
|
|
12
|
+
address: string;
|
|
13
|
+
city?: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
postalCode?: string;
|
|
16
|
+
occupation?: string;
|
|
17
|
+
notes?: string;
|
|
18
|
+
profilePhotoId?: string;
|
|
19
|
+
customData?: Record<string, any>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface UpdateClientDto {
|
|
23
|
+
name?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
phone?: string;
|
|
26
|
+
documentValue?: string;
|
|
27
|
+
documentType?: string;
|
|
28
|
+
birthDate?: string;
|
|
29
|
+
gender?: string;
|
|
30
|
+
maritalStatus?: string;
|
|
31
|
+
address?: string;
|
|
32
|
+
city?: string;
|
|
33
|
+
state?: string;
|
|
34
|
+
postalCode?: string;
|
|
35
|
+
occupation?: string;
|
|
36
|
+
notes?: string;
|
|
37
|
+
profilePhotoId?: string;
|
|
38
|
+
customData?: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface Client {
|
|
42
|
+
id: string;
|
|
43
|
+
gymId: string;
|
|
44
|
+
clientNumber: string;
|
|
45
|
+
name: string;
|
|
46
|
+
email?: string;
|
|
47
|
+
phone?: string;
|
|
48
|
+
documentValue?: string;
|
|
49
|
+
documentType?: string;
|
|
50
|
+
birthDate?: string;
|
|
51
|
+
gender?: string;
|
|
52
|
+
maritalStatus?: string;
|
|
53
|
+
address?: string;
|
|
54
|
+
city?: string;
|
|
55
|
+
state?: string;
|
|
56
|
+
postalCode?: string;
|
|
57
|
+
occupation?: string;
|
|
58
|
+
notes?: string;
|
|
59
|
+
customData?: Record<string, any>;
|
|
60
|
+
status: 'active' | 'inactive';
|
|
61
|
+
profilePhotoId?: string;
|
|
62
|
+
emergencyContactName?: string;
|
|
63
|
+
emergencyContactPhone?: string;
|
|
64
|
+
medicalConditions?: string;
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
contracts?: Array<{
|
|
68
|
+
id: string;
|
|
69
|
+
status: string;
|
|
70
|
+
startDate: string;
|
|
71
|
+
endDate: string;
|
|
72
|
+
gymMembershipPlan?: {
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
};
|
|
76
|
+
}>;
|
|
77
|
+
_count?: {
|
|
78
|
+
evaluations: number;
|
|
79
|
+
checkIns: number;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ClientStats {
|
|
84
|
+
totalContracts: number;
|
|
85
|
+
activeContracts: number;
|
|
86
|
+
totalCheckIns: number;
|
|
87
|
+
checkInsThisMonth: number;
|
|
88
|
+
lastCheckIn?: string;
|
|
89
|
+
totalEvaluations: number;
|
|
90
|
+
lastEvaluation?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface SearchClientsParams extends PaginationQueryDto {
|
|
94
|
+
search?: string;
|
|
95
|
+
activeOnly?: boolean;
|
|
96
|
+
clientNumber?: string;
|
|
97
|
+
documentId?: string;
|
|
98
|
+
includeContractStatus?: boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ClientSearchForCheckInResponse {
|
|
102
|
+
data: Client[];
|
|
103
|
+
pagination: {
|
|
104
|
+
total: number;
|
|
105
|
+
page: number;
|
|
106
|
+
limit: number;
|
|
107
|
+
totalPages: number;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ContractStatus } from '@gymspace/shared';
|
|
2
|
+
import { PaginationQueryDto } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface CreateContractDto {
|
|
5
|
+
gymClientId: string;
|
|
6
|
+
gymMembershipPlanId: string;
|
|
7
|
+
startDate: string;
|
|
8
|
+
discountPercentage?: number;
|
|
9
|
+
customPrice?: number;
|
|
10
|
+
receiptIds?: string[];
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface RenewContractDto {
|
|
15
|
+
startDate?: string;
|
|
16
|
+
discountPercentage?: number;
|
|
17
|
+
customPrice?: number;
|
|
18
|
+
metadata?: Record<string, any>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FreezeContractDto {
|
|
22
|
+
freezeStartDate: string;
|
|
23
|
+
freezeEndDate: string;
|
|
24
|
+
reason?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Contract {
|
|
28
|
+
id: string;
|
|
29
|
+
gymId: string;
|
|
30
|
+
contractNumber: string;
|
|
31
|
+
gymClientId: string;
|
|
32
|
+
gymMembershipPlanId: string;
|
|
33
|
+
startDate: string;
|
|
34
|
+
endDate: string;
|
|
35
|
+
status: ContractStatus;
|
|
36
|
+
price: number;
|
|
37
|
+
discountPercentage?: number;
|
|
38
|
+
finalPrice: number;
|
|
39
|
+
freezeStartDate?: string;
|
|
40
|
+
freezeEndDate?: string;
|
|
41
|
+
receiptIds?: string[];
|
|
42
|
+
metadata?: Record<string, any>;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
// Relations
|
|
46
|
+
gymClient?: {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
email: string;
|
|
50
|
+
};
|
|
51
|
+
gymMembershipPlan?: {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
basePrice?: number;
|
|
55
|
+
durationMonths?: number;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface GetContractsParams extends PaginationQueryDto {
|
|
60
|
+
status?: ContractStatus;
|
|
61
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Dashboard Types and Interfaces
|
|
2
|
+
|
|
3
|
+
export interface DashboardStats {
|
|
4
|
+
totalClients: number;
|
|
5
|
+
activeClients: number;
|
|
6
|
+
totalContracts: number;
|
|
7
|
+
activeContracts: number;
|
|
8
|
+
monthlyRevenue: number;
|
|
9
|
+
todayCheckIns: number;
|
|
10
|
+
expiringContractsCount: number;
|
|
11
|
+
newClientsThisMonth: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ActivityType = 'check_in' | 'new_client' | 'new_contract' | 'contract_expired';
|
|
15
|
+
|
|
16
|
+
export interface RecentActivity {
|
|
17
|
+
id: string;
|
|
18
|
+
type: ActivityType;
|
|
19
|
+
description: string;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
clientName?: string;
|
|
22
|
+
clientId?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ExpiringContract {
|
|
26
|
+
id: string;
|
|
27
|
+
clientName: string;
|
|
28
|
+
clientId: string;
|
|
29
|
+
planName: string;
|
|
30
|
+
endDate: string;
|
|
31
|
+
daysRemaining: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { PaginationQueryDto } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface CreateEvaluationDto {
|
|
4
|
+
gymClientId: string;
|
|
5
|
+
weight: number;
|
|
6
|
+
height: number;
|
|
7
|
+
bodyFatPercentage?: number;
|
|
8
|
+
muscleMassPercentage?: number;
|
|
9
|
+
measurements?: EvaluationMeasurements;
|
|
10
|
+
healthMetrics?: EvaluationHealthMetrics;
|
|
11
|
+
performanceMetrics?: EvaluationPerformanceMetrics;
|
|
12
|
+
notes?: string;
|
|
13
|
+
goals?: string;
|
|
14
|
+
recommendations?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface UpdateEvaluationDto {
|
|
18
|
+
gymClientId?: string;
|
|
19
|
+
weight?: number;
|
|
20
|
+
height?: number;
|
|
21
|
+
bodyFatPercentage?: number;
|
|
22
|
+
muscleMassPercentage?: number;
|
|
23
|
+
measurements?: EvaluationMeasurements;
|
|
24
|
+
healthMetrics?: EvaluationHealthMetrics;
|
|
25
|
+
performanceMetrics?: EvaluationPerformanceMetrics;
|
|
26
|
+
notes?: string;
|
|
27
|
+
goals?: string;
|
|
28
|
+
recommendations?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface EvaluationMeasurements {
|
|
32
|
+
chest?: number;
|
|
33
|
+
waist?: number;
|
|
34
|
+
hips?: number;
|
|
35
|
+
leftArm?: number;
|
|
36
|
+
rightArm?: number;
|
|
37
|
+
leftThigh?: number;
|
|
38
|
+
rightThigh?: number;
|
|
39
|
+
[key: string]: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface EvaluationHealthMetrics {
|
|
43
|
+
bloodPressure?: string;
|
|
44
|
+
restingHeartRate?: number;
|
|
45
|
+
vo2Max?: number;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface EvaluationPerformanceMetrics {
|
|
50
|
+
benchPress?: number;
|
|
51
|
+
squat?: number;
|
|
52
|
+
deadlift?: number;
|
|
53
|
+
[key: string]: number | undefined;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface Evaluation {
|
|
57
|
+
id: string;
|
|
58
|
+
gymId: string;
|
|
59
|
+
gymClientId: string;
|
|
60
|
+
evaluatorId: string;
|
|
61
|
+
evaluationDate: string;
|
|
62
|
+
weight: number;
|
|
63
|
+
height: number;
|
|
64
|
+
bmi: number;
|
|
65
|
+
bodyFatPercentage?: number;
|
|
66
|
+
muscleMassPercentage?: number;
|
|
67
|
+
measurements?: EvaluationMeasurements;
|
|
68
|
+
healthMetrics?: EvaluationHealthMetrics;
|
|
69
|
+
performanceMetrics?: EvaluationPerformanceMetrics;
|
|
70
|
+
notes?: string;
|
|
71
|
+
goals?: string;
|
|
72
|
+
recommendations?: string;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface GetClientEvaluationsParams extends PaginationQueryDto {
|
|
78
|
+
// Additional evaluation-specific parameters can be added here
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface EvaluationReport {
|
|
82
|
+
evaluation: Evaluation;
|
|
83
|
+
client: any;
|
|
84
|
+
previousEvaluation?: Evaluation;
|
|
85
|
+
evolution?: {
|
|
86
|
+
weight: number;
|
|
87
|
+
bodyFat: number;
|
|
88
|
+
muscleMass: number;
|
|
89
|
+
measurements: Record<string, number>;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File-related DTOs
|
|
2
|
+
|
|
3
|
+
export interface FileResponseDto {
|
|
4
|
+
id: string;
|
|
5
|
+
filename: string;
|
|
6
|
+
originalName: string;
|
|
7
|
+
filePath: string;
|
|
8
|
+
fileSize: number;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
status: 'active' | 'deleted';
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
description?: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
previewUrl: string | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UploadFileDto {
|
|
20
|
+
file: File;
|
|
21
|
+
description?: string;
|
|
22
|
+
metadata?: Record<string, any>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export interface CreateGymDto {
|
|
2
|
+
name: string;
|
|
3
|
+
address?: string;
|
|
4
|
+
city?: string;
|
|
5
|
+
state?: string;
|
|
6
|
+
postalCode?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
openingTime?: string;
|
|
10
|
+
closingTime?: string;
|
|
11
|
+
capacity?: number;
|
|
12
|
+
amenities?: GymAmenities;
|
|
13
|
+
settings?: GymSettings;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface UpdateGymDto {
|
|
17
|
+
name?: string;
|
|
18
|
+
address?: string;
|
|
19
|
+
city?: string;
|
|
20
|
+
state?: string;
|
|
21
|
+
postalCode?: string;
|
|
22
|
+
phone?: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
openingTime?: string;
|
|
25
|
+
closingTime?: string;
|
|
26
|
+
capacity?: number;
|
|
27
|
+
amenities?: GymAmenities;
|
|
28
|
+
settings?: GymSettings;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface GymAmenities {
|
|
32
|
+
hasParking?: boolean;
|
|
33
|
+
hasShowers?: boolean;
|
|
34
|
+
hasLockers?: boolean;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GymSettings {
|
|
39
|
+
logo?: string;
|
|
40
|
+
primaryColor?: string;
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface Gym {
|
|
45
|
+
id: string;
|
|
46
|
+
organizationId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
slug: string;
|
|
49
|
+
address?: string;
|
|
50
|
+
city?: string;
|
|
51
|
+
state?: string;
|
|
52
|
+
postalCode?: string;
|
|
53
|
+
phone?: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
openingTime?: string;
|
|
56
|
+
closingTime?: string;
|
|
57
|
+
capacity?: number;
|
|
58
|
+
amenities?: GymAmenities;
|
|
59
|
+
settings?: GymSettings;
|
|
60
|
+
isActive: boolean;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface GymStats {
|
|
66
|
+
totalClients: number;
|
|
67
|
+
activeClients: number;
|
|
68
|
+
totalContracts: number;
|
|
69
|
+
activeContracts: number;
|
|
70
|
+
monthlyRevenue: number;
|
|
71
|
+
checkInsToday: number;
|
|
72
|
+
checkInsMonth: number;
|
|
73
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// DTOs
|
|
2
|
+
export * from './auth';
|
|
3
|
+
export * from './organizations';
|
|
4
|
+
export * from './gyms';
|
|
5
|
+
export * from './clients';
|
|
6
|
+
export * from './membership-plans';
|
|
7
|
+
export * from './contracts';
|
|
8
|
+
export * from './dashboard';
|
|
9
|
+
export * from './evaluations';
|
|
10
|
+
export * from './check-ins';
|
|
11
|
+
export * from './invitations';
|
|
12
|
+
export * from './leads';
|
|
13
|
+
export * from './assets';
|
|
14
|
+
export * from './files';
|
|
15
|
+
export * from './onboarding';
|
|
16
|
+
export * from './products';
|
|
17
|
+
export * from './sales';
|
|
18
|
+
export * from './suppliers';
|
|
19
|
+
export * from './users';
|
|
20
|
+
|
|
21
|
+
export interface ApiResponse<T> {
|
|
22
|
+
data: T;
|
|
23
|
+
meta?: any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface CreateInvitationDto {
|
|
2
|
+
email: string;
|
|
3
|
+
gymId: string;
|
|
4
|
+
roleId: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface AcceptInvitationDto {
|
|
8
|
+
name: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
password: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Invitation {
|
|
14
|
+
id: string;
|
|
15
|
+
email: string;
|
|
16
|
+
gymId: string;
|
|
17
|
+
roleId: string;
|
|
18
|
+
token: string;
|
|
19
|
+
status: 'pending' | 'accepted' | 'cancelled' | 'expired';
|
|
20
|
+
invitedById: string;
|
|
21
|
+
acceptedAt?: string;
|
|
22
|
+
expiresAt: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface GetGymInvitationsParams {
|
|
28
|
+
gymId: string;
|
|
29
|
+
}
|