@gymspace/sdk 1.0.1 → 1.0.3

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.
@@ -0,0 +1,2076 @@
1
+ import { AxiosRequestConfig } from 'axios';
2
+ import { PaginationParams as PaginationParams$1, ContractStatus, LeadStatus } from '@gymspace/shared';
3
+ export * from '@gymspace/shared';
4
+
5
+ interface GymSpaceConfig {
6
+ baseURL: string;
7
+ apiKey?: string;
8
+ refreshToken?: string;
9
+ timeout?: number;
10
+ headers?: Record<string, string>;
11
+ }
12
+ interface RequestOptions {
13
+ gymId?: string;
14
+ headers?: Record<string, string>;
15
+ }
16
+ interface PaginationParams {
17
+ limit?: number;
18
+ offset?: number;
19
+ }
20
+ interface PaginatedResponse<T> {
21
+ data: T[];
22
+ meta: {
23
+ total: number;
24
+ page: number;
25
+ limit: number;
26
+ totalPages: number;
27
+ hasNext: boolean;
28
+ hasPrevious: boolean;
29
+ };
30
+ }
31
+ type PaginatedResponseDto<T> = PaginatedResponse<T>;
32
+
33
+ type PaginationQueryDto = PaginationParams$1;
34
+
35
+ declare class ApiClient {
36
+ private axiosInstance;
37
+ private config;
38
+ private refreshPromise;
39
+ onTokensUpdated?: (accessToken: string, refreshToken: string) => void;
40
+ onAuthError?: (error: any) => void;
41
+ constructor(config: GymSpaceConfig);
42
+ private setupInterceptors;
43
+ /**
44
+ * Refresh the access token using the stored refresh token
45
+ */
46
+ private refreshAccessToken;
47
+ private handleError;
48
+ private mergeOptions;
49
+ request<T>(method: string, path: string, data?: any, options?: RequestOptions & AxiosRequestConfig): Promise<T>;
50
+ get<T>(path: string, params?: any, options?: RequestOptions): Promise<T>;
51
+ post<T>(path: string, data?: any, options?: RequestOptions): Promise<T>;
52
+ put<T>(path: string, data?: any, options?: RequestOptions): Promise<T>;
53
+ patch<T>(path: string, data?: any, options?: RequestOptions): Promise<T>;
54
+ delete<T>(path: string, options?: RequestOptions): Promise<T>;
55
+ setAuthToken(token: string): void;
56
+ setTokens(accessToken: string, refreshToken: string): void;
57
+ setGymId(gymId: string): void;
58
+ clearAuth(): void;
59
+ getBaseUrl(): string;
60
+ }
61
+
62
+ interface RegisterOwnerDto {
63
+ name: string;
64
+ email: string;
65
+ phone: string;
66
+ password: string;
67
+ organizationName: string;
68
+ subscriptionPlanId: string;
69
+ country?: string;
70
+ currency?: string;
71
+ timezone?: string;
72
+ }
73
+ interface LoginDto {
74
+ email: string;
75
+ password: string;
76
+ }
77
+ interface LoginResponseDto {
78
+ access_token: string;
79
+ refresh_token: string;
80
+ user: any;
81
+ redirectPath: string;
82
+ }
83
+ interface VerifyEmailDto {
84
+ email: string;
85
+ code: string;
86
+ }
87
+ interface ResendVerificationDto {
88
+ email: string;
89
+ }
90
+ interface ChangePasswordDto {
91
+ currentPassword: string;
92
+ newPassword: string;
93
+ }
94
+ interface ChangePasswordResponseDto {
95
+ success: boolean;
96
+ message: string;
97
+ }
98
+ interface RequestPasswordResetDto {
99
+ email: string;
100
+ }
101
+ interface RequestPasswordResetResponseDto {
102
+ success: boolean;
103
+ message: string;
104
+ }
105
+ interface VerifyResetCodeDto {
106
+ email: string;
107
+ code: string;
108
+ }
109
+ interface VerifyResetCodeResponseDto {
110
+ resetToken: string;
111
+ expiresIn: number;
112
+ }
113
+ interface ResetPasswordDto {
114
+ resetToken: string;
115
+ newPassword: string;
116
+ }
117
+ interface ResetPasswordResponseDto {
118
+ success: boolean;
119
+ message: string;
120
+ }
121
+ interface ResendResetCodeDto {
122
+ email: string;
123
+ }
124
+ interface ResendResetCodeResponseDto {
125
+ success: boolean;
126
+ message: string;
127
+ }
128
+ interface RegisterCollaboratorDto {
129
+ invitationToken: string;
130
+ name: string;
131
+ phone: string;
132
+ password: string;
133
+ }
134
+ interface InvitationValidationResponse {
135
+ valid: boolean;
136
+ invitation: {
137
+ id: string;
138
+ gymName: string;
139
+ gymLogo?: string;
140
+ gymAddress: string;
141
+ inviterName: string;
142
+ inviterRole: string;
143
+ role: string;
144
+ permissions: string[];
145
+ expiresAt: Date;
146
+ email: string;
147
+ };
148
+ }
149
+ interface CurrentSessionResponse {
150
+ user: {
151
+ id: string;
152
+ email: string;
153
+ name: string;
154
+ phone?: string;
155
+ userType: string;
156
+ emailVerifiedAt?: Date;
157
+ };
158
+ gym?: {
159
+ id: string;
160
+ organizationId: string;
161
+ name: string;
162
+ address?: string;
163
+ description?: string;
164
+ phone?: string;
165
+ gymCode: string;
166
+ profileAssetId?: string;
167
+ coverAssetId?: string;
168
+ evaluationStructure?: Record<string, any>;
169
+ };
170
+ organization?: {
171
+ id: string;
172
+ ownerUserId: string;
173
+ name: string;
174
+ subscriptionPlanId: string;
175
+ subscriptionStatus: string;
176
+ subscriptionStart: Date;
177
+ subscriptionEnd: Date;
178
+ country: string;
179
+ currency: string;
180
+ timezone: string;
181
+ settings?: Record<string, any>;
182
+ };
183
+ subscription?: {
184
+ id: string;
185
+ organizationId: string;
186
+ subscriptionPlanId: string;
187
+ subscriptionPlan?: {
188
+ id: string;
189
+ name: string;
190
+ price: any;
191
+ billingFrequency: string;
192
+ maxGyms: number;
193
+ maxClientsPerGym: number;
194
+ maxUsersPerGym: number;
195
+ features: any;
196
+ description?: string;
197
+ };
198
+ status: string;
199
+ startDate: Date;
200
+ endDate: Date;
201
+ isActive: boolean;
202
+ };
203
+ permissions: string[];
204
+ isAuthenticated: boolean;
205
+ }
206
+
207
+ interface SubscriptionPlan {
208
+ id: string;
209
+ name: string;
210
+ price: any;
211
+ billingFrequency: string;
212
+ maxGyms: number;
213
+ maxClientsPerGym: number;
214
+ maxUsersPerGym: number;
215
+ features: any;
216
+ description?: string;
217
+ }
218
+ interface Subscription {
219
+ id: string;
220
+ organizationId: string;
221
+ subscriptionPlanId: string;
222
+ subscriptionPlan?: SubscriptionPlan;
223
+ status: string;
224
+ startDate: Date;
225
+ endDate: Date;
226
+ isActive: boolean;
227
+ }
228
+ interface AvailablePlanDto {
229
+ id: string;
230
+ name: string;
231
+ description?: string;
232
+ price: any;
233
+ billingFrequency: string;
234
+ maxGyms: number;
235
+ maxClientsPerGym: number;
236
+ maxUsersPerGym: number;
237
+ features: any;
238
+ isFreePlan: boolean;
239
+ }
240
+ interface SubscriptionStatusDto {
241
+ organizationId: string;
242
+ currentPlan: SubscriptionPlan | null;
243
+ status: string;
244
+ startDate: Date | null;
245
+ endDate: Date | null;
246
+ usage: {
247
+ gyms: {
248
+ current: number;
249
+ limit: number;
250
+ };
251
+ clientsPerGym: {
252
+ [gymId: string]: {
253
+ current: number;
254
+ limit: number;
255
+ };
256
+ };
257
+ usersPerGym: {
258
+ [gymId: string]: {
259
+ current: number;
260
+ limit: number;
261
+ };
262
+ };
263
+ };
264
+ canUpgrade: boolean;
265
+ canDowngrade: boolean;
266
+ }
267
+ interface AffiliateOrganizationDto {
268
+ subscriptionPlanId: string;
269
+ }
270
+ interface CheckLimitResponse {
271
+ canPerform: boolean;
272
+ currentUsage: number;
273
+ limit: number;
274
+ message?: string;
275
+ }
276
+
277
+ declare abstract class BaseResource {
278
+ protected client: ApiClient;
279
+ constructor(client: ApiClient);
280
+ protected request<T>(path: string, options: {
281
+ method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
282
+ body?: string;
283
+ headers?: Record<string, string>;
284
+ }): Promise<T>;
285
+ protected buildPath(base: string, ...segments: (string | undefined)[]): string;
286
+ protected paginate<T>(path: string, params?: PaginationQueryDto & Record<string, any>, options?: RequestOptions): Promise<PaginatedResponseDto<T>>;
287
+ }
288
+
289
+ declare class AuthResource extends BaseResource {
290
+ private basePath;
291
+ registerOwner(data: RegisterOwnerDto, options?: RequestOptions): Promise<void>;
292
+ login(data: LoginDto, options?: RequestOptions): Promise<LoginResponseDto>;
293
+ refreshToken(refreshToken: string, options?: RequestOptions): Promise<LoginResponseDto>;
294
+ verifyEmail(data: VerifyEmailDto, options?: RequestOptions): Promise<{
295
+ success: boolean;
296
+ message: string;
297
+ }>;
298
+ resendVerification(data: ResendVerificationDto, options?: RequestOptions): Promise<{
299
+ success: boolean;
300
+ message: string;
301
+ }>;
302
+ getSubscriptionPlans(options?: RequestOptions): Promise<{
303
+ data: SubscriptionPlan[];
304
+ }>;
305
+ validateInvitation(token: string, options?: RequestOptions): Promise<InvitationValidationResponse>;
306
+ registerCollaborator(data: RegisterCollaboratorDto, options?: RequestOptions): Promise<LoginResponseDto>;
307
+ getCurrentSession(options?: RequestOptions): Promise<CurrentSessionResponse>;
308
+ changePassword(data: ChangePasswordDto, options?: RequestOptions): Promise<ChangePasswordResponseDto>;
309
+ requestPasswordReset(data: RequestPasswordResetDto, options?: RequestOptions): Promise<RequestPasswordResetResponseDto>;
310
+ verifyResetCode(data: VerifyResetCodeDto, options?: RequestOptions): Promise<VerifyResetCodeResponseDto>;
311
+ resetPassword(data: ResetPasswordDto, options?: RequestOptions): Promise<ResetPasswordResponseDto>;
312
+ resendResetCode(data: ResendResetCodeDto, options?: RequestOptions): Promise<ResendResetCodeResponseDto>;
313
+ }
314
+
315
+ interface UpdateOrganizationDto {
316
+ name: string;
317
+ }
318
+ interface Organization {
319
+ id: string;
320
+ name: string;
321
+ country?: string;
322
+ currency?: string;
323
+ timezone?: string;
324
+ settings?: Record<string, any>;
325
+ createdAt: string;
326
+ updatedAt: string;
327
+ }
328
+ interface OrganizationStats {
329
+ totalGyms: number;
330
+ totalClients: number;
331
+ totalContracts: number;
332
+ activeContracts: number;
333
+ totalRevenue: number;
334
+ }
335
+ interface OrganizationWithDetails {
336
+ id: string;
337
+ name: string;
338
+ owner: {
339
+ id: string;
340
+ email: string;
341
+ fullName: string;
342
+ };
343
+ gyms: Array<{
344
+ id: string;
345
+ name: string;
346
+ address: string;
347
+ }>;
348
+ createdAt: Date;
349
+ }
350
+
351
+ declare class OrganizationsResource extends BaseResource {
352
+ private basePath;
353
+ getOrganization(id: string, options?: RequestOptions): Promise<Organization>;
354
+ updateOrganization(id: string, data: UpdateOrganizationDto, options?: RequestOptions): Promise<Organization>;
355
+ getOrganizationStats(id: string, options?: RequestOptions): Promise<OrganizationStats>;
356
+ listOrganizations(options?: RequestOptions): Promise<OrganizationWithDetails[]>;
357
+ }
358
+
359
+ interface CreateGymDto {
360
+ name: string;
361
+ address?: string;
362
+ city?: string;
363
+ state?: string;
364
+ postalCode?: string;
365
+ phone?: string;
366
+ email?: string;
367
+ openingTime?: string;
368
+ closingTime?: string;
369
+ capacity?: number;
370
+ amenities?: GymAmenities;
371
+ settings?: GymSettings;
372
+ }
373
+ interface UpdateGymDto {
374
+ name?: string;
375
+ address?: string;
376
+ city?: string;
377
+ state?: string;
378
+ postalCode?: string;
379
+ phone?: string;
380
+ email?: string;
381
+ openingTime?: string;
382
+ closingTime?: string;
383
+ capacity?: number;
384
+ amenities?: GymAmenities;
385
+ settings?: GymSettings;
386
+ }
387
+ interface GymAmenities {
388
+ hasParking?: boolean;
389
+ hasShowers?: boolean;
390
+ hasLockers?: boolean;
391
+ [key: string]: any;
392
+ }
393
+ interface GymSettings {
394
+ logo?: string;
395
+ primaryColor?: string;
396
+ [key: string]: any;
397
+ }
398
+ interface Gym {
399
+ id: string;
400
+ organizationId: string;
401
+ name: string;
402
+ slug: string;
403
+ address?: string;
404
+ city?: string;
405
+ state?: string;
406
+ postalCode?: string;
407
+ phone?: string;
408
+ email?: string;
409
+ openingTime?: string;
410
+ closingTime?: string;
411
+ capacity?: number;
412
+ amenities?: GymAmenities;
413
+ settings?: GymSettings;
414
+ schedule?: GymSchedule;
415
+ socialMedia?: GymSocialMedia;
416
+ isActive: boolean;
417
+ createdAt: string;
418
+ updatedAt: string;
419
+ }
420
+ interface TimeSlot {
421
+ open: string;
422
+ close: string;
423
+ }
424
+ interface DaySchedule {
425
+ isOpen: boolean;
426
+ slots?: TimeSlot[];
427
+ }
428
+ interface GymSchedule {
429
+ monday?: DaySchedule;
430
+ tuesday?: DaySchedule;
431
+ wednesday?: DaySchedule;
432
+ thursday?: DaySchedule;
433
+ friday?: DaySchedule;
434
+ saturday?: DaySchedule;
435
+ sunday?: DaySchedule;
436
+ }
437
+ interface GymSocialMedia {
438
+ facebook?: string;
439
+ instagram?: string;
440
+ whatsapp?: string;
441
+ twitter?: string;
442
+ linkedin?: string;
443
+ youtube?: string;
444
+ tiktok?: string;
445
+ }
446
+ interface UpdateGymScheduleDto {
447
+ monday?: DaySchedule;
448
+ tuesday?: DaySchedule;
449
+ wednesday?: DaySchedule;
450
+ thursday?: DaySchedule;
451
+ friday?: DaySchedule;
452
+ saturday?: DaySchedule;
453
+ sunday?: DaySchedule;
454
+ }
455
+ interface UpdateGymSocialMediaDto {
456
+ facebook?: string;
457
+ instagram?: string;
458
+ whatsapp?: string;
459
+ twitter?: string;
460
+ linkedin?: string;
461
+ youtube?: string;
462
+ tiktok?: string;
463
+ }
464
+ interface GymStats {
465
+ totalClients: number;
466
+ activeClients: number;
467
+ totalContracts: number;
468
+ activeContracts: number;
469
+ monthlyRevenue: number;
470
+ checkInsToday: number;
471
+ checkInsMonth: number;
472
+ }
473
+
474
+ declare class GymsResource extends BaseResource {
475
+ private basePath;
476
+ createGym(data: CreateGymDto, options?: RequestOptions): Promise<Gym>;
477
+ getOrganizationGyms(options?: RequestOptions): Promise<Gym[]>;
478
+ getGym(id: string, options?: RequestOptions): Promise<Gym>;
479
+ updateGym(id: string, data: UpdateGymDto, options?: RequestOptions): Promise<Gym>;
480
+ getGymStats(id: string, options?: RequestOptions): Promise<GymStats>;
481
+ toggleGymStatus(id: string, options?: RequestOptions): Promise<Gym>;
482
+ updateCurrentGym(data: Partial<{
483
+ name?: string;
484
+ address?: string;
485
+ phone?: string;
486
+ email?: string;
487
+ assetId?: string;
488
+ }>, options?: RequestOptions): Promise<Gym>;
489
+ updateGymSchedule(id: string, data: UpdateGymScheduleDto, options?: RequestOptions): Promise<Gym>;
490
+ updateGymSocialMedia(id: string, data: UpdateGymSocialMediaDto, options?: RequestOptions): Promise<Gym>;
491
+ }
492
+
493
+ interface CreateClientDto {
494
+ name: string;
495
+ email?: string;
496
+ phone?: string;
497
+ documentValue?: string;
498
+ documentType?: string;
499
+ birthDate?: string;
500
+ gender?: string;
501
+ maritalStatus?: string;
502
+ address: string;
503
+ city?: string;
504
+ state?: string;
505
+ postalCode?: string;
506
+ occupation?: string;
507
+ notes?: string;
508
+ profilePhotoId?: string;
509
+ customData?: Record<string, any>;
510
+ }
511
+ interface UpdateClientDto {
512
+ name?: string;
513
+ email?: string;
514
+ phone?: string;
515
+ documentValue?: string;
516
+ documentType?: string;
517
+ birthDate?: string;
518
+ gender?: string;
519
+ maritalStatus?: string;
520
+ address?: string;
521
+ city?: string;
522
+ state?: string;
523
+ postalCode?: string;
524
+ occupation?: string;
525
+ notes?: string;
526
+ profilePhotoId?: string;
527
+ customData?: Record<string, any>;
528
+ }
529
+ interface Client {
530
+ id: string;
531
+ gymId: string;
532
+ clientNumber: string;
533
+ name: string;
534
+ email?: string;
535
+ phone?: string;
536
+ documentValue?: string;
537
+ documentType?: string;
538
+ birthDate?: string;
539
+ gender?: string;
540
+ maritalStatus?: string;
541
+ address?: string;
542
+ city?: string;
543
+ state?: string;
544
+ postalCode?: string;
545
+ occupation?: string;
546
+ notes?: string;
547
+ customData?: Record<string, any>;
548
+ status: 'active' | 'inactive';
549
+ profilePhotoId?: string;
550
+ emergencyContactName?: string;
551
+ emergencyContactPhone?: string;
552
+ medicalConditions?: string;
553
+ createdAt: string;
554
+ updatedAt: string;
555
+ contracts?: Array<{
556
+ id: string;
557
+ status: string;
558
+ startDate: string;
559
+ endDate: string;
560
+ gymMembershipPlan?: {
561
+ id: string;
562
+ name: string;
563
+ };
564
+ }>;
565
+ _count?: {
566
+ evaluations: number;
567
+ checkIns: number;
568
+ };
569
+ }
570
+ interface ClientStat {
571
+ key: string;
572
+ name: string;
573
+ description: string;
574
+ category: 'activity' | 'contracts' | 'general';
575
+ value: any;
576
+ }
577
+ interface ClientStats {
578
+ client: {
579
+ id: string;
580
+ name: string;
581
+ email: string | null;
582
+ status: string;
583
+ registrationDate: string;
584
+ };
585
+ activity: {
586
+ totalCheckIns: number;
587
+ monthlyCheckIns: number;
588
+ lastCheckIn: string | null;
589
+ };
590
+ contracts: {
591
+ active: number;
592
+ totalSpent: number;
593
+ };
594
+ membershipHistory: Array<{
595
+ id: string;
596
+ status: string;
597
+ startDate: string;
598
+ endDate: string | null;
599
+ gymMembershipPlan: {
600
+ id: string;
601
+ name: string;
602
+ basePrice: number;
603
+ };
604
+ }>;
605
+ }
606
+ interface SearchClientsParams extends PaginationQueryDto {
607
+ search?: string;
608
+ activeOnly?: boolean;
609
+ clientNumber?: string;
610
+ documentId?: string;
611
+ includeContractStatus?: boolean;
612
+ }
613
+ interface ClientSearchForCheckInResponse {
614
+ data: Client[];
615
+ pagination: {
616
+ total: number;
617
+ page: number;
618
+ limit: number;
619
+ totalPages: number;
620
+ };
621
+ }
622
+
623
+ declare class ClientsResource extends BaseResource {
624
+ private basePath;
625
+ createClient(data: CreateClientDto, options?: RequestOptions): Promise<Client>;
626
+ searchClients(params?: SearchClientsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Client>>;
627
+ getClient(id: string, options?: RequestOptions): Promise<Client>;
628
+ updateClient(id: string, data: UpdateClientDto, options?: RequestOptions): Promise<Client>;
629
+ toggleClientStatus(id: string, options?: RequestOptions): Promise<Client>;
630
+ getClientStats(id: string, options?: RequestOptions): Promise<ClientStats>;
631
+ getClientStat(id: string, statKey: string, options?: RequestOptions): Promise<ClientStat>;
632
+ getClientStatsByCategory(id: string, category: string, options?: RequestOptions): Promise<ClientStat[]>;
633
+ getAvailableStats(options?: RequestOptions): Promise<ClientStat[]>;
634
+ searchClientsForCheckIn(params?: SearchClientsParams, options?: RequestOptions): Promise<ClientSearchForCheckInResponse>;
635
+ }
636
+
637
+ interface CreateMembershipPlanDto {
638
+ name: string;
639
+ description?: string;
640
+ basePrice: number;
641
+ durationMonths?: number;
642
+ durationDays?: number;
643
+ termsAndConditions?: string;
644
+ allowsCustomPricing?: boolean;
645
+ maxEvaluations?: number;
646
+ includesAdvisor?: boolean;
647
+ showInCatalog?: boolean;
648
+ features?: string[];
649
+ status?: 'active' | 'inactive' | 'archived';
650
+ assetsIds?: string[];
651
+ }
652
+ interface UpdateMembershipPlanDto {
653
+ name?: string;
654
+ description?: string;
655
+ basePrice?: number;
656
+ durationMonths?: number;
657
+ durationDays?: number;
658
+ termsAndConditions?: string;
659
+ allowsCustomPricing?: boolean;
660
+ maxEvaluations?: number;
661
+ includesAdvisor?: boolean;
662
+ showInCatalog?: boolean;
663
+ features?: string[];
664
+ status?: 'active' | 'inactive' | 'archived';
665
+ isActive?: boolean;
666
+ assetsIds?: string[];
667
+ }
668
+ interface MembershipPlan {
669
+ id: string;
670
+ gymId: string;
671
+ name: string;
672
+ description?: string;
673
+ basePrice: number;
674
+ durationMonths?: number;
675
+ durationDays?: number;
676
+ gym?: {
677
+ id: string;
678
+ name: string;
679
+ organization: {
680
+ currency: string;
681
+ };
682
+ };
683
+ termsAndConditions?: string;
684
+ allowsCustomPricing: boolean;
685
+ maxEvaluations: number;
686
+ includesAdvisor: boolean;
687
+ showInCatalog: boolean;
688
+ features: string[];
689
+ status: 'active' | 'inactive' | 'archived';
690
+ isActive: boolean;
691
+ assetsIds?: string[];
692
+ createdAt: string;
693
+ updatedAt: string;
694
+ }
695
+ interface MembershipPlanStats {
696
+ totalContracts: number;
697
+ activeContracts: number;
698
+ totalRevenue: number;
699
+ monthlyRevenue: number;
700
+ }
701
+ interface GetMembershipPlansParams {
702
+ activeOnly?: boolean;
703
+ }
704
+
705
+ declare class MembershipPlansResource extends BaseResource {
706
+ private basePath;
707
+ createMembershipPlan(data: CreateMembershipPlanDto, options?: RequestOptions): Promise<MembershipPlan>;
708
+ getGymMembershipPlans(params?: GetMembershipPlansParams, options?: RequestOptions): Promise<MembershipPlan[]>;
709
+ getMembershipPlan(id: string, options?: RequestOptions): Promise<MembershipPlan>;
710
+ updateMembershipPlan(id: string, data: UpdateMembershipPlanDto, options?: RequestOptions): Promise<MembershipPlan>;
711
+ deleteMembershipPlan(id: string, options?: RequestOptions): Promise<void>;
712
+ getMembershipPlanStats(id: string, options?: RequestOptions): Promise<MembershipPlanStats>;
713
+ }
714
+
715
+ interface CreateContractDto {
716
+ gymClientId: string;
717
+ gymMembershipPlanId: string;
718
+ paymentMethodId: string;
719
+ startDate: string;
720
+ discountPercentage?: number;
721
+ customPrice?: number;
722
+ receiptIds?: string[];
723
+ metadata?: Record<string, any>;
724
+ }
725
+ interface RenewContractDto {
726
+ startDate?: string;
727
+ discountPercentage?: number;
728
+ customPrice?: number;
729
+ paymentMethodId?: string;
730
+ applyAtEndOfContract?: boolean;
731
+ notes?: string;
732
+ contractDocumentId?: string;
733
+ receiptIds?: string[];
734
+ }
735
+ interface FreezeContractDto {
736
+ freezeStartDate: string;
737
+ freezeEndDate: string;
738
+ reason?: string;
739
+ }
740
+ interface Contract {
741
+ id: string;
742
+ gymId: string;
743
+ contractNumber: string;
744
+ gymClientId: string;
745
+ gymMembershipPlanId: string;
746
+ paymentMethodId?: string;
747
+ parentId?: string;
748
+ startDate: string;
749
+ endDate: string;
750
+ status: ContractStatus;
751
+ price: number;
752
+ discountPercentage?: number;
753
+ finalPrice: number;
754
+ freezeStartDate?: string;
755
+ freezeEndDate?: string;
756
+ receiptIds?: string[];
757
+ metadata?: Record<string, any>;
758
+ createdAt: string;
759
+ updatedAt: string;
760
+ gymClient?: {
761
+ id: string;
762
+ name: string;
763
+ email: string;
764
+ };
765
+ gymMembershipPlan?: {
766
+ id: string;
767
+ name: string;
768
+ basePrice?: number;
769
+ durationMonths?: number;
770
+ };
771
+ paymentMethod?: {
772
+ id: string;
773
+ name: string;
774
+ description?: string;
775
+ code: string;
776
+ enabled: boolean;
777
+ };
778
+ renewals?: Contract[];
779
+ }
780
+ interface GetContractsParams extends PaginationQueryDto {
781
+ status?: ContractStatus;
782
+ clientName?: string;
783
+ clientId?: string;
784
+ startDateFrom?: string;
785
+ startDateTo?: string;
786
+ endDateFrom?: string;
787
+ endDateTo?: string;
788
+ }
789
+
790
+ declare class ContractsResource extends BaseResource {
791
+ private basePath;
792
+ createContract(data: CreateContractDto, options?: RequestOptions): Promise<Contract>;
793
+ getGymContracts(params?: GetContractsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Contract>>;
794
+ getContract(id: string, options?: RequestOptions): Promise<Contract>;
795
+ getClientContracts(clientId: string, options?: RequestOptions): Promise<Contract[]>;
796
+ renewContract(id: string, data: RenewContractDto, options?: RequestOptions): Promise<Contract>;
797
+ freezeContract(id: string, data: FreezeContractDto, options?: RequestOptions): Promise<Contract>;
798
+ cancelContract(id: string, data: {
799
+ reason: string;
800
+ }, options?: RequestOptions): Promise<Contract>;
801
+ }
802
+
803
+ interface DashboardStats {
804
+ totalClients: number;
805
+ activeClients: number;
806
+ totalContracts: number;
807
+ activeContracts: number;
808
+ monthlyRevenue: number;
809
+ todayCheckIns: number;
810
+ expiringContractsCount: number;
811
+ newClientsThisMonth: number;
812
+ }
813
+ interface ContractsRevenue {
814
+ totalRevenue: number;
815
+ contractCount: number;
816
+ averageRevenue: number;
817
+ startDate: string;
818
+ endDate: string;
819
+ }
820
+ interface SalesRevenue {
821
+ totalRevenue: number;
822
+ salesCount: number;
823
+ averageRevenue: number;
824
+ startDate: string;
825
+ endDate: string;
826
+ }
827
+ interface Debts {
828
+ totalDebt: number;
829
+ clientsWithDebt: number;
830
+ averageDebt: number;
831
+ startDate: string;
832
+ endDate: string;
833
+ }
834
+ interface CheckIns {
835
+ totalCheckIns: number;
836
+ uniqueClients: number;
837
+ averagePerDay: number;
838
+ startDate: string;
839
+ endDate: string;
840
+ }
841
+ interface NewClients {
842
+ totalNewClients: number;
843
+ averagePerDay: number;
844
+ startDate: string;
845
+ endDate: string;
846
+ }
847
+ interface ExpiringContract {
848
+ id: string;
849
+ clientName: string;
850
+ clientId: string;
851
+ planName: string;
852
+ endDate: string;
853
+ daysRemaining: number;
854
+ }
855
+ interface DateRangeParams {
856
+ startDate?: string;
857
+ endDate?: string;
858
+ }
859
+
860
+ declare class DashboardResource extends BaseResource {
861
+ /**
862
+ * Get dashboard statistics (lightweight counts only)
863
+ * @returns Dashboard statistics including client and contract counts
864
+ */
865
+ getStats(): Promise<DashboardStats>;
866
+ /**
867
+ * Get contracts revenue within date range
868
+ * @param params Optional date range parameters
869
+ * @returns Contracts revenue data for the specified period
870
+ */
871
+ getContractsRevenue(params?: DateRangeParams): Promise<ContractsRevenue>;
872
+ /**
873
+ * Get sales revenue within date range
874
+ * @param params Optional date range parameters
875
+ * @returns Sales revenue data for the specified period
876
+ */
877
+ getSalesRevenue(params?: DateRangeParams): Promise<SalesRevenue>;
878
+ /**
879
+ * Get total debts within date range
880
+ * @param params Optional date range parameters
881
+ * @returns Outstanding debts data for the specified period
882
+ */
883
+ getDebts(params?: DateRangeParams): Promise<Debts>;
884
+ /**
885
+ * Get check-ins count within date range
886
+ * @param params Optional date range parameters
887
+ * @returns Check-ins data for the specified period
888
+ */
889
+ getCheckIns(params?: DateRangeParams): Promise<CheckIns>;
890
+ /**
891
+ * Get new clients count within date range
892
+ * @param params Optional date range parameters
893
+ * @returns New clients data for the specified period
894
+ */
895
+ getNewClients(params?: DateRangeParams): Promise<NewClients>;
896
+ /**
897
+ * Get expiring contracts within date range
898
+ * @param limit Maximum number of contracts to return (default: 10)
899
+ * @param params Optional date range parameters
900
+ * @returns List of contracts expiring in the specified period
901
+ */
902
+ getExpiringContracts(limit?: number, params?: DateRangeParams): Promise<ExpiringContract[]>;
903
+ }
904
+
905
+ interface CreateEvaluationDto {
906
+ gymClientId: string;
907
+ weight: number;
908
+ height: number;
909
+ bodyFatPercentage?: number;
910
+ muscleMassPercentage?: number;
911
+ measurements?: EvaluationMeasurements;
912
+ healthMetrics?: EvaluationHealthMetrics;
913
+ performanceMetrics?: EvaluationPerformanceMetrics;
914
+ notes?: string;
915
+ goals?: string;
916
+ recommendations?: string;
917
+ }
918
+ interface UpdateEvaluationDto {
919
+ gymClientId?: string;
920
+ weight?: number;
921
+ height?: number;
922
+ bodyFatPercentage?: number;
923
+ muscleMassPercentage?: number;
924
+ measurements?: EvaluationMeasurements;
925
+ healthMetrics?: EvaluationHealthMetrics;
926
+ performanceMetrics?: EvaluationPerformanceMetrics;
927
+ notes?: string;
928
+ goals?: string;
929
+ recommendations?: string;
930
+ }
931
+ interface EvaluationMeasurements {
932
+ chest?: number;
933
+ waist?: number;
934
+ hips?: number;
935
+ leftArm?: number;
936
+ rightArm?: number;
937
+ leftThigh?: number;
938
+ rightThigh?: number;
939
+ [key: string]: number | undefined;
940
+ }
941
+ interface EvaluationHealthMetrics {
942
+ bloodPressure?: string;
943
+ restingHeartRate?: number;
944
+ vo2Max?: number;
945
+ [key: string]: any;
946
+ }
947
+ interface EvaluationPerformanceMetrics {
948
+ benchPress?: number;
949
+ squat?: number;
950
+ deadlift?: number;
951
+ [key: string]: number | undefined;
952
+ }
953
+ interface Evaluation {
954
+ id: string;
955
+ gymId: string;
956
+ gymClientId: string;
957
+ evaluatorId: string;
958
+ evaluationDate: string;
959
+ weight: number;
960
+ height: number;
961
+ bmi: number;
962
+ bodyFatPercentage?: number;
963
+ muscleMassPercentage?: number;
964
+ measurements?: EvaluationMeasurements;
965
+ healthMetrics?: EvaluationHealthMetrics;
966
+ performanceMetrics?: EvaluationPerformanceMetrics;
967
+ notes?: string;
968
+ goals?: string;
969
+ recommendations?: string;
970
+ createdAt: string;
971
+ updatedAt: string;
972
+ }
973
+ interface GetClientEvaluationsParams extends PaginationQueryDto {
974
+ }
975
+ interface EvaluationReport {
976
+ evaluation: Evaluation;
977
+ client: any;
978
+ previousEvaluation?: Evaluation;
979
+ evolution?: {
980
+ weight: number;
981
+ bodyFat: number;
982
+ muscleMass: number;
983
+ measurements: Record<string, number>;
984
+ };
985
+ }
986
+
987
+ declare class EvaluationsResource extends BaseResource {
988
+ private basePath;
989
+ createEvaluation(data: CreateEvaluationDto, options?: RequestOptions): Promise<Evaluation>;
990
+ getEvaluation(id: string, options?: RequestOptions): Promise<Evaluation>;
991
+ updateEvaluation(id: string, data: UpdateEvaluationDto, options?: RequestOptions): Promise<Evaluation>;
992
+ deleteEvaluation(id: string, options?: RequestOptions): Promise<void>;
993
+ getClientEvaluations(clientId: string, params?: GetClientEvaluationsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Evaluation>>;
994
+ getGymEvaluationStats(options?: RequestOptions): Promise<any>;
995
+ generateEvaluationReport(id: string, options?: RequestOptions): Promise<EvaluationReport>;
996
+ }
997
+
998
+ interface CreateCheckInDto {
999
+ gymClientId: string;
1000
+ notes?: string;
1001
+ }
1002
+ interface CheckIn {
1003
+ id: string;
1004
+ gymId: string;
1005
+ gymClientId: string;
1006
+ timestamp: string;
1007
+ notes?: string;
1008
+ registeredByUserId: string;
1009
+ createdAt: string;
1010
+ updatedAt: string;
1011
+ gymClient?: {
1012
+ id: string;
1013
+ name: string;
1014
+ email?: string;
1015
+ clientNumber: string;
1016
+ status: string;
1017
+ };
1018
+ registeredBy?: {
1019
+ id: string;
1020
+ name: string;
1021
+ };
1022
+ }
1023
+ interface SearchCheckInsParams extends PaginationQueryDto {
1024
+ clientId?: string;
1025
+ startDate?: string;
1026
+ endDate?: string;
1027
+ }
1028
+ interface GetCheckInStatsParams {
1029
+ period: 'day' | 'week' | 'month';
1030
+ }
1031
+ interface CheckInStats {
1032
+ period: string;
1033
+ totalCheckIns: number;
1034
+ uniqueClients: number;
1035
+ averagePerDay: number;
1036
+ peakHours: Record<string, number>;
1037
+ dayDistribution: Record<string, number>;
1038
+ }
1039
+ interface GetClientCheckInHistoryParams extends PaginationQueryDto {
1040
+ }
1041
+ interface CurrentlyInGymResponse {
1042
+ total: number;
1043
+ clients: CheckIn[];
1044
+ }
1045
+ interface CheckInListResponse {
1046
+ checkIns: CheckIn[];
1047
+ pagination: {
1048
+ total: number;
1049
+ limit: number;
1050
+ offset: number;
1051
+ };
1052
+ }
1053
+ interface ClientCheckInHistory {
1054
+ checkIns: CheckIn[];
1055
+ metrics: {
1056
+ totalCheckIns: number;
1057
+ last30Days: number;
1058
+ attendanceRate: number;
1059
+ lastCheckIn: string | null;
1060
+ };
1061
+ }
1062
+
1063
+ declare class CheckInsResource extends BaseResource {
1064
+ private basePath;
1065
+ createCheckIn(data: CreateCheckInDto, options?: RequestOptions): Promise<CheckIn>;
1066
+ searchCheckIns(params?: SearchCheckInsParams, options?: RequestOptions): Promise<CheckInListResponse>;
1067
+ getCurrentlyInGym(options?: RequestOptions): Promise<CurrentlyInGymResponse>;
1068
+ getCheckIn(id: string, options?: RequestOptions): Promise<CheckIn>;
1069
+ deleteCheckIn(id: string, options?: RequestOptions): Promise<void>;
1070
+ getGymCheckInStats(params: GetCheckInStatsParams, options?: RequestOptions): Promise<CheckInStats>;
1071
+ getClientCheckInHistory(clientId: string, params?: GetClientCheckInHistoryParams, options?: RequestOptions): Promise<ClientCheckInHistory>;
1072
+ }
1073
+
1074
+ interface CreateInvitationDto {
1075
+ email: string;
1076
+ gymId: string;
1077
+ roleId: string;
1078
+ }
1079
+ interface AcceptInvitationDto {
1080
+ name: string;
1081
+ phone: string;
1082
+ password: string;
1083
+ }
1084
+ interface Invitation {
1085
+ id: string;
1086
+ email: string;
1087
+ gymId: string;
1088
+ roleId: string;
1089
+ token: string;
1090
+ status: 'pending' | 'accepted' | 'cancelled' | 'expired';
1091
+ invitedById: string;
1092
+ acceptedAt?: string;
1093
+ expiresAt: string;
1094
+ createdAt: string;
1095
+ updatedAt: string;
1096
+ }
1097
+ interface GetGymInvitationsParams {
1098
+ gymId: string;
1099
+ }
1100
+
1101
+ declare class InvitationsResource extends BaseResource {
1102
+ private basePath;
1103
+ createInvitation(data: CreateInvitationDto, options?: RequestOptions): Promise<Invitation>;
1104
+ getGymInvitations(params: GetGymInvitationsParams, options?: RequestOptions): Promise<Invitation[]>;
1105
+ acceptInvitation(token: string, data: AcceptInvitationDto, options?: RequestOptions): Promise<void>;
1106
+ cancelInvitation(id: string, options?: RequestOptions): Promise<void>;
1107
+ }
1108
+
1109
+ interface CreateLeadDto {
1110
+ name: string;
1111
+ email: string;
1112
+ phone: string;
1113
+ gymId: string;
1114
+ message?: string;
1115
+ source?: string;
1116
+ metadata?: Record<string, any>;
1117
+ }
1118
+ interface UpdateLeadDto {
1119
+ status?: LeadStatus;
1120
+ notes?: string;
1121
+ assignedToUserId?: string;
1122
+ metadata?: Record<string, any>;
1123
+ }
1124
+ interface Lead {
1125
+ id: string;
1126
+ gymId: string;
1127
+ name: string;
1128
+ email: string;
1129
+ phone: string;
1130
+ status: LeadStatus;
1131
+ source?: string;
1132
+ message?: string;
1133
+ notes?: string;
1134
+ assignedToUserId?: string;
1135
+ convertedToClientId?: string;
1136
+ metadata?: Record<string, any>;
1137
+ createdAt: string;
1138
+ updatedAt: string;
1139
+ }
1140
+ interface SearchLeadsParams extends PaginationQueryDto {
1141
+ status?: LeadStatus;
1142
+ search?: string;
1143
+ assignedToUserId?: string;
1144
+ startDate?: string;
1145
+ endDate?: string;
1146
+ }
1147
+ interface LeadStats {
1148
+ total: number;
1149
+ byStatus: Record<LeadStatus, number>;
1150
+ conversionRate: number;
1151
+ averageResponseTime: number;
1152
+ bySource: Record<string, number>;
1153
+ }
1154
+
1155
+ declare class LeadsResource extends BaseResource {
1156
+ private basePath;
1157
+ createLead(data: CreateLeadDto, options?: RequestOptions): Promise<Lead>;
1158
+ searchLeads(params?: SearchLeadsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Lead>>;
1159
+ getLead(id: string, options?: RequestOptions): Promise<Lead>;
1160
+ updateLead(id: string, data: UpdateLeadDto, options?: RequestOptions): Promise<Lead>;
1161
+ getLeadStats(options?: RequestOptions): Promise<LeadStats>;
1162
+ convertLead(id: string, options?: RequestOptions): Promise<{
1163
+ clientId: string;
1164
+ }>;
1165
+ }
1166
+
1167
+ /**
1168
+ * Asset models for file management
1169
+ */
1170
+ interface UploadAssetDto {
1171
+ file: File;
1172
+ description?: string;
1173
+ metadata?: Record<string, any>;
1174
+ }
1175
+ interface AssetResponseDto {
1176
+ id: string;
1177
+ filename: string;
1178
+ originalName: string;
1179
+ fileSize: number;
1180
+ mimeType: string;
1181
+ status: 'active' | 'deleted';
1182
+ description?: string;
1183
+ metadata?: Record<string, any>;
1184
+ previewUrl?: string;
1185
+ uploadedBy: string;
1186
+ createdAt: string;
1187
+ updatedAt: string;
1188
+ }
1189
+
1190
+ declare class AssetsResource extends BaseResource {
1191
+ /**
1192
+ * Upload a new asset
1193
+ */
1194
+ upload(data: {
1195
+ file: File;
1196
+ description?: string;
1197
+ metadata?: Record<string, any>;
1198
+ }): Promise<AssetResponseDto>;
1199
+ /**
1200
+ * Get a single asset by ID
1201
+ */
1202
+ findOne(id: string): Promise<AssetResponseDto>;
1203
+ /**
1204
+ * Get multiple assets by IDs
1205
+ */
1206
+ findByIds(ids: string[]): Promise<AssetResponseDto[]>;
1207
+ /**
1208
+ * Get all assets for the current gym
1209
+ */
1210
+ findAll(): Promise<AssetResponseDto[]>;
1211
+ /**
1212
+ * Delete an asset
1213
+ */
1214
+ delete(id: string): Promise<void>;
1215
+ /**
1216
+ * Get a signed download URL for an asset
1217
+ */
1218
+ getDownloadUrl(id: string): Promise<{
1219
+ url: string;
1220
+ filename: string;
1221
+ }>;
1222
+ /**
1223
+ * Download an asset as a blob
1224
+ */
1225
+ download(id: string): Promise<Blob>;
1226
+ /**
1227
+ * Get the render URL for an asset (for inline display)
1228
+ * This returns the URL directly without making an API call
1229
+ */
1230
+ getRenderUrl(id: string): string;
1231
+ /**
1232
+ * Get asset blob for rendering/preview
1233
+ */
1234
+ render(id: string): Promise<Blob>;
1235
+ }
1236
+
1237
+ interface FileResponseDto {
1238
+ id: string;
1239
+ filename: string;
1240
+ originalName: string;
1241
+ filePath: string;
1242
+ fileSize: number;
1243
+ mimeType: string;
1244
+ status: 'active' | 'deleted';
1245
+ metadata?: Record<string, any>;
1246
+ description?: string;
1247
+ createdAt: string;
1248
+ updatedAt: string;
1249
+ userId: string;
1250
+ previewUrl: string | null;
1251
+ }
1252
+ interface UploadFileDto {
1253
+ file: File;
1254
+ description?: string;
1255
+ metadata?: Record<string, any>;
1256
+ }
1257
+
1258
+ declare class FilesResource extends BaseResource {
1259
+ /**
1260
+ * Upload a new file
1261
+ */
1262
+ upload(data: {
1263
+ file: File;
1264
+ description?: string;
1265
+ metadata?: Record<string, any>;
1266
+ }): Promise<FileResponseDto>;
1267
+ /**
1268
+ * Get all files for the current user
1269
+ */
1270
+ findAll(): Promise<FileResponseDto[]>;
1271
+ /**
1272
+ * Get a single file by ID
1273
+ */
1274
+ findOne(id: string): Promise<FileResponseDto>;
1275
+ /**
1276
+ * Get multiple files by IDs
1277
+ */
1278
+ findByIds(ids: string[]): Promise<FileResponseDto[]>;
1279
+ /**
1280
+ * Delete a file
1281
+ */
1282
+ delete(id: string): Promise<void>;
1283
+ /**
1284
+ * Download a file as a blob
1285
+ */
1286
+ download(id: string): Promise<Blob>;
1287
+ /**
1288
+ * Get the render URL for a file (for inline display)
1289
+ * This returns the URL directly without making an API call
1290
+ */
1291
+ getRenderUrl(id: string): string;
1292
+ /**
1293
+ * Get file blob for rendering/preview
1294
+ */
1295
+ render(id: string): Promise<Blob>;
1296
+ }
1297
+
1298
+ interface SearchCatalogParams extends PaginationQueryDto {
1299
+ search?: string;
1300
+ city?: string;
1301
+ state?: string;
1302
+ latitude?: string;
1303
+ longitude?: string;
1304
+ radius?: string;
1305
+ }
1306
+ interface GetFeaturedGymsParams {
1307
+ limit: string;
1308
+ }
1309
+ interface CatalogGym {
1310
+ id: string;
1311
+ name: string;
1312
+ slug: string;
1313
+ address?: string;
1314
+ city?: string;
1315
+ state?: string;
1316
+ phone?: string;
1317
+ email?: string;
1318
+ amenities?: any;
1319
+ settings?: any;
1320
+ }
1321
+ interface CityWithGyms {
1322
+ city: string;
1323
+ state: string;
1324
+ count: number;
1325
+ }
1326
+ declare class PublicCatalogResource extends BaseResource {
1327
+ private basePath;
1328
+ searchCatalog(params?: SearchCatalogParams, options?: RequestOptions): Promise<PaginatedResponseDto<CatalogGym>>;
1329
+ getFeaturedGyms(params: GetFeaturedGymsParams, options?: RequestOptions): Promise<CatalogGym[]>;
1330
+ getCitiesWithGyms(options?: RequestOptions): Promise<CityWithGyms[]>;
1331
+ getGymBySlug(slug: string, options?: RequestOptions): Promise<CatalogGym>;
1332
+ }
1333
+
1334
+ interface HealthResponse {
1335
+ status: string;
1336
+ timestamp: string;
1337
+ }
1338
+ interface ReadyResponse {
1339
+ status: string;
1340
+ services: {
1341
+ database: boolean;
1342
+ cache: boolean;
1343
+ storage: boolean;
1344
+ };
1345
+ }
1346
+ declare class HealthResource extends BaseResource {
1347
+ private basePath;
1348
+ health(options?: RequestOptions): Promise<HealthResponse>;
1349
+ ready(options?: RequestOptions): Promise<ReadyResponse>;
1350
+ }
1351
+
1352
+ interface StartOnboardingData {
1353
+ name: string;
1354
+ email: string;
1355
+ phone: string;
1356
+ password: string;
1357
+ organizationName: string;
1358
+ country: string;
1359
+ currency: string;
1360
+ timezone: string;
1361
+ }
1362
+ interface StartOnboardingResponse {
1363
+ success: boolean;
1364
+ access_token: string;
1365
+ refresh_token: string;
1366
+ user: {
1367
+ id: string;
1368
+ email: string;
1369
+ name: string;
1370
+ userType: string;
1371
+ };
1372
+ organization: {
1373
+ id: string;
1374
+ name: string;
1375
+ organizationCode: string;
1376
+ };
1377
+ gym: {
1378
+ id: string;
1379
+ name: string;
1380
+ };
1381
+ onboardingStatus: OnboardingStatus;
1382
+ }
1383
+ interface BusinessHours {
1384
+ open: string;
1385
+ close: string;
1386
+ closed: boolean;
1387
+ }
1388
+ interface WeeklySchedule {
1389
+ monday: BusinessHours;
1390
+ tuesday: BusinessHours;
1391
+ wednesday: BusinessHours;
1392
+ thursday: BusinessHours;
1393
+ friday: BusinessHours;
1394
+ saturday: BusinessHours;
1395
+ sunday: BusinessHours;
1396
+ }
1397
+ interface Amenities {
1398
+ hasParking: boolean;
1399
+ hasShowers: boolean;
1400
+ hasLockers: boolean;
1401
+ hasPool: boolean;
1402
+ hasSauna: boolean;
1403
+ hasWifi: boolean;
1404
+ hasChildcare: boolean;
1405
+ hasCafeteria: boolean;
1406
+ }
1407
+ interface SocialMedia {
1408
+ facebook?: string;
1409
+ instagram?: string;
1410
+ twitter?: string;
1411
+ website?: string;
1412
+ }
1413
+ interface UpdateGymSettingsData {
1414
+ gymId: string;
1415
+ name: string;
1416
+ address: string;
1417
+ city: string;
1418
+ state: string;
1419
+ postalCode: string;
1420
+ phone: string;
1421
+ email: string;
1422
+ businessHours: WeeklySchedule;
1423
+ capacity: number;
1424
+ description?: string;
1425
+ amenities: Amenities;
1426
+ socialMedia?: SocialMedia;
1427
+ logo?: string;
1428
+ coverPhoto?: string;
1429
+ primaryColor?: string;
1430
+ }
1431
+ interface ClientManagementFeatures {
1432
+ enabled: boolean;
1433
+ requireDocumentId: boolean;
1434
+ enablePhotos: boolean;
1435
+ trackEmergencyContacts: boolean;
1436
+ trackMedicalConditions: boolean;
1437
+ }
1438
+ interface MembershipManagementFeatures {
1439
+ enabled: boolean;
1440
+ allowCustomPricing: boolean;
1441
+ allowContractFreezing: boolean;
1442
+ expiryWarningDays: number;
1443
+ autoRenewalReminders: boolean;
1444
+ }
1445
+ interface CheckInSystemFeatures {
1446
+ enabled: boolean;
1447
+ requireActiveContract: boolean;
1448
+ trackCheckInTime: boolean;
1449
+ allowMultiplePerDay: boolean;
1450
+ }
1451
+ interface EvaluationSystemFeatures {
1452
+ enabled: boolean;
1453
+ trackMeasurements: boolean;
1454
+ trackBodyComposition: boolean;
1455
+ trackPerformance: boolean;
1456
+ defaultFrequencyDays: number;
1457
+ }
1458
+ interface LeadManagementFeatures {
1459
+ enabled: boolean;
1460
+ publicCatalogListing: boolean;
1461
+ enableOnlineForm: boolean;
1462
+ autoAssignLeads: boolean;
1463
+ }
1464
+ interface NotificationSettings {
1465
+ emailEnabled: boolean;
1466
+ smsEnabled: boolean;
1467
+ welcomeEmails: boolean;
1468
+ contractExpiryAlerts: boolean;
1469
+ evaluationReminders: boolean;
1470
+ }
1471
+ interface ConfigureFeaturesData {
1472
+ gymId: string;
1473
+ clientManagement: ClientManagementFeatures;
1474
+ membershipManagement: MembershipManagementFeatures;
1475
+ checkInSystem: CheckInSystemFeatures;
1476
+ evaluationSystem: EvaluationSystemFeatures;
1477
+ leadManagement: LeadManagementFeatures;
1478
+ notifications: NotificationSettings;
1479
+ }
1480
+ interface CompleteGuidedSetupData {
1481
+ gymId: string;
1482
+ }
1483
+ declare enum OnboardingStep {
1484
+ ACCOUNT_CREATED = "account_created",
1485
+ GYM_SETTINGS = "gym_settings",
1486
+ FEATURES_CONFIGURED = "features_configured",
1487
+ COMPLETED = "completed"
1488
+ }
1489
+ interface OnboardingStatus {
1490
+ organizationId: string;
1491
+ gymId: string;
1492
+ currentStep: OnboardingStep;
1493
+ accountCreated: boolean;
1494
+ gymSettingsCompleted: boolean;
1495
+ featuresConfigured: boolean;
1496
+ isCompleted: boolean;
1497
+ nextAction: string;
1498
+ completionPercentage: number;
1499
+ }
1500
+ interface OnboardingResponse {
1501
+ success: boolean;
1502
+ gym?: any;
1503
+ onboardingStatus: OnboardingStatus;
1504
+ message?: string;
1505
+ }
1506
+
1507
+ declare class OnboardingResource extends BaseResource {
1508
+ /**
1509
+ * Creates owner account, organization, and initial gym
1510
+ * Now also sends verification and organization codes via email
1511
+ */
1512
+ start(data: StartOnboardingData): Promise<StartOnboardingResponse>;
1513
+ /**
1514
+ * Updates basic gym settings (step 2 of onboarding)
1515
+ * Configure basic gym information like name, address, etc.
1516
+ */
1517
+ updateGymSettings(data: UpdateGymSettingsData): Promise<OnboardingResponse>;
1518
+ /**
1519
+ * Configure gym features (step 3 of onboarding)
1520
+ * Enable/disable various management features
1521
+ */
1522
+ configureFeatures(data: ConfigureFeaturesData): Promise<OnboardingResponse>;
1523
+ /**
1524
+ * Mark onboarding as complete
1525
+ */
1526
+ completeSetup(data: CompleteGuidedSetupData): Promise<OnboardingResponse>;
1527
+ /**
1528
+ * Get current onboarding status
1529
+ * Check progress and next steps
1530
+ */
1531
+ getStatus(gymId: string): Promise<OnboardingStatus>;
1532
+ }
1533
+
1534
+ interface CreateProductCategoryDto {
1535
+ name: string;
1536
+ description?: string;
1537
+ color?: string;
1538
+ }
1539
+ interface UpdateProductCategoryDto {
1540
+ name?: string;
1541
+ description?: string;
1542
+ color?: string;
1543
+ }
1544
+ interface ProductCategory {
1545
+ id: string;
1546
+ gymId: string;
1547
+ name: string;
1548
+ description?: string;
1549
+ color?: string;
1550
+ createdAt: string;
1551
+ updatedAt: string;
1552
+ createdBy?: {
1553
+ id: string;
1554
+ name: string;
1555
+ email: string;
1556
+ };
1557
+ updatedBy?: {
1558
+ id: string;
1559
+ name: string;
1560
+ email: string;
1561
+ };
1562
+ _count?: {
1563
+ products: number;
1564
+ };
1565
+ }
1566
+ interface CreateProductDto {
1567
+ name: string;
1568
+ description?: string;
1569
+ price: number;
1570
+ stock?: number;
1571
+ minStock?: number;
1572
+ maxStock?: number;
1573
+ categoryId?: string;
1574
+ imageId?: string;
1575
+ status?: 'active' | 'inactive';
1576
+ trackInventory?: 'none' | 'simple' | 'advanced' | 'capacity';
1577
+ }
1578
+ interface CreateServiceDto {
1579
+ name: string;
1580
+ description?: string;
1581
+ price: number;
1582
+ categoryId?: string;
1583
+ imageId?: string;
1584
+ }
1585
+ interface UpdateProductDto {
1586
+ name?: string;
1587
+ description?: string;
1588
+ price?: number;
1589
+ stock?: number;
1590
+ minStock?: number;
1591
+ maxStock?: number;
1592
+ categoryId?: string;
1593
+ imageId?: string;
1594
+ status?: 'active' | 'inactive';
1595
+ trackInventory?: 'none' | 'simple' | 'advanced' | 'capacity';
1596
+ }
1597
+ interface UpdateStockDto {
1598
+ quantity: number;
1599
+ notes?: string;
1600
+ supplierId?: string;
1601
+ fileId?: string;
1602
+ }
1603
+ interface Product {
1604
+ id: string;
1605
+ gymId: string;
1606
+ categoryId?: string;
1607
+ name: string;
1608
+ description?: string;
1609
+ price: number;
1610
+ stock: number | null;
1611
+ minStock?: number | null;
1612
+ maxStock?: number | null;
1613
+ imageId?: string;
1614
+ status: 'active' | 'inactive';
1615
+ type?: 'Product' | 'Service';
1616
+ trackInventory?: 'none' | 'simple' | 'advanced' | 'capacity';
1617
+ createdAt: string;
1618
+ updatedAt: string;
1619
+ category?: ProductCategory;
1620
+ createdBy?: {
1621
+ id: string;
1622
+ name: string;
1623
+ email: string;
1624
+ };
1625
+ updatedBy?: {
1626
+ id: string;
1627
+ name: string;
1628
+ email: string;
1629
+ };
1630
+ _count?: {
1631
+ saleItems: number;
1632
+ };
1633
+ }
1634
+ interface SearchProductsParams extends PaginationQueryDto {
1635
+ search?: string;
1636
+ categoryId?: string;
1637
+ type?: 'Product' | 'Service';
1638
+ status?: 'active' | 'inactive';
1639
+ inStock?: boolean;
1640
+ minPrice?: number;
1641
+ maxPrice?: number;
1642
+ }
1643
+ interface StockMovement {
1644
+ id: string;
1645
+ productId: string;
1646
+ gymId: string;
1647
+ type: 'manual_entry' | 'sale' | 'return' | 'adjustment' | 'initial_stock';
1648
+ quantity: number;
1649
+ previousStock?: number;
1650
+ newStock?: number;
1651
+ notes?: string;
1652
+ supplierId?: string;
1653
+ fileId?: string;
1654
+ createdByUserId: string;
1655
+ createdAt: string;
1656
+ product?: Product;
1657
+ supplier?: {
1658
+ id: string;
1659
+ name: string;
1660
+ };
1661
+ createdBy?: {
1662
+ id: string;
1663
+ name: string;
1664
+ };
1665
+ }
1666
+
1667
+ declare class ProductsResource extends BaseResource {
1668
+ private basePath;
1669
+ createCategory(data: CreateProductCategoryDto, options?: RequestOptions): Promise<ProductCategory>;
1670
+ getCategories(options?: RequestOptions): Promise<ProductCategory[]>;
1671
+ updateCategory(id: string, data: UpdateProductCategoryDto, options?: RequestOptions): Promise<ProductCategory>;
1672
+ deleteCategory(id: string, options?: RequestOptions): Promise<void>;
1673
+ createProduct(data: CreateProductDto, options?: RequestOptions): Promise<Product>;
1674
+ createService(data: CreateServiceDto, options?: RequestOptions): Promise<Product>;
1675
+ searchProducts(params?: SearchProductsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Product>>;
1676
+ getProduct(id: string, options?: RequestOptions): Promise<Product>;
1677
+ updateProduct(id: string, data: UpdateProductDto, options?: RequestOptions): Promise<Product>;
1678
+ deleteProduct(id: string, options?: RequestOptions): Promise<void>;
1679
+ toggleProductStatus(id: string, options?: RequestOptions): Promise<Product>;
1680
+ updateStock(id: string, data: UpdateStockDto, options?: RequestOptions): Promise<Product>;
1681
+ getLowStockProducts(threshold?: number, options?: RequestOptions): Promise<Product[]>;
1682
+ getProductStockMovements(id: string, options?: RequestOptions): Promise<StockMovement[]>;
1683
+ }
1684
+
1685
+ interface SaleItemDto {
1686
+ productId: string;
1687
+ quantity: number;
1688
+ unitPrice: number;
1689
+ }
1690
+ interface SaleItem {
1691
+ id: string;
1692
+ saleId: string;
1693
+ productId: string;
1694
+ quantity: number;
1695
+ unitPrice: number;
1696
+ total: number;
1697
+ createdAt: string;
1698
+ updatedAt: string;
1699
+ product?: {
1700
+ id: string;
1701
+ name: string;
1702
+ imageId?: string;
1703
+ category?: {
1704
+ id: string;
1705
+ name: string;
1706
+ color?: string;
1707
+ };
1708
+ };
1709
+ }
1710
+ interface CreateSaleDto {
1711
+ items: SaleItemDto[];
1712
+ customerId?: string;
1713
+ customerName?: string;
1714
+ notes?: string;
1715
+ fileIds?: string[];
1716
+ paymentStatus?: 'paid' | 'unpaid';
1717
+ paymentMethodId?: string;
1718
+ }
1719
+ interface UpdateSaleDto {
1720
+ customerId?: string;
1721
+ customerName?: string;
1722
+ notes?: string;
1723
+ fileIds?: string[];
1724
+ paymentStatus?: 'paid' | 'unpaid';
1725
+ paymentMethodId?: string;
1726
+ }
1727
+ interface UpdatePaymentStatusDto {
1728
+ paymentStatus: 'paid' | 'unpaid';
1729
+ }
1730
+ interface Sale {
1731
+ id: string;
1732
+ gymId: string;
1733
+ customerId?: string;
1734
+ saleNumber: string;
1735
+ total: number;
1736
+ paymentStatus: 'paid' | 'unpaid';
1737
+ paymentMethodId?: string;
1738
+ saleDate: string;
1739
+ customerName?: string;
1740
+ notes?: string;
1741
+ fileIds?: string[];
1742
+ createdAt: string;
1743
+ updatedAt: string;
1744
+ saleItems?: SaleItem[];
1745
+ customer?: {
1746
+ id: string;
1747
+ clientNumber: string;
1748
+ name: string;
1749
+ phone?: string;
1750
+ email?: string;
1751
+ };
1752
+ paymentMethod?: {
1753
+ id: string;
1754
+ name: string;
1755
+ code: string;
1756
+ description?: string;
1757
+ };
1758
+ createdBy?: {
1759
+ id: string;
1760
+ name: string;
1761
+ email: string;
1762
+ };
1763
+ updatedBy?: {
1764
+ id: string;
1765
+ name: string;
1766
+ email: string;
1767
+ };
1768
+ _count?: {
1769
+ saleItems: number;
1770
+ };
1771
+ }
1772
+ interface SearchSalesParams extends PaginationQueryDto {
1773
+ customerName?: string;
1774
+ customerId?: string;
1775
+ paymentStatus?: 'paid' | 'unpaid';
1776
+ startDate?: string;
1777
+ endDate?: string;
1778
+ minTotal?: number;
1779
+ maxTotal?: number;
1780
+ }
1781
+ interface SalesStats {
1782
+ totalSales: number;
1783
+ totalRevenue: number;
1784
+ paidSales: number;
1785
+ unpaidSales: number;
1786
+ paymentRate: number;
1787
+ }
1788
+ interface TopSellingProduct {
1789
+ product?: {
1790
+ id: string;
1791
+ name: string;
1792
+ price: number;
1793
+ imageId?: string;
1794
+ category?: {
1795
+ id: string;
1796
+ name: string;
1797
+ color?: string;
1798
+ };
1799
+ };
1800
+ totalQuantity: number;
1801
+ totalRevenue: number;
1802
+ }
1803
+ interface CustomerSalesReport {
1804
+ summary: {
1805
+ totalCustomers: number;
1806
+ totalSales: number;
1807
+ totalRevenue: number;
1808
+ };
1809
+ customers: Array<{
1810
+ customer: {
1811
+ id: string | null;
1812
+ clientNumber?: string;
1813
+ name: string;
1814
+ phone?: string;
1815
+ email?: string;
1816
+ };
1817
+ totalSales: number;
1818
+ totalRevenue: number;
1819
+ sales: Array<{
1820
+ id: string;
1821
+ total: number;
1822
+ saleDate: string;
1823
+ }>;
1824
+ }>;
1825
+ }
1826
+
1827
+ declare class SalesResource extends BaseResource {
1828
+ private basePath;
1829
+ createSale(data: CreateSaleDto, options?: RequestOptions): Promise<Sale>;
1830
+ searchSales(params?: SearchSalesParams, options?: RequestOptions): Promise<PaginatedResponseDto<Sale>>;
1831
+ getSale(id: string, options?: RequestOptions): Promise<Sale>;
1832
+ updateSale(id: string, data: UpdateSaleDto, options?: RequestOptions): Promise<Sale>;
1833
+ updatePaymentStatus(id: string, paymentStatus: 'paid' | 'unpaid', options?: RequestOptions): Promise<Sale>;
1834
+ deleteSale(id: string, options?: RequestOptions): Promise<void>;
1835
+ getSalesStats(startDate?: string, endDate?: string, options?: RequestOptions): Promise<SalesStats>;
1836
+ getTopSellingProducts(limit?: number, startDate?: string, endDate?: string, options?: RequestOptions): Promise<TopSellingProduct[]>;
1837
+ getSalesByCustomer(startDate?: string, endDate?: string, options?: RequestOptions): Promise<CustomerSalesReport>;
1838
+ }
1839
+
1840
+ interface CreateSupplierDto {
1841
+ name: string;
1842
+ contactInfo?: string;
1843
+ phone?: string;
1844
+ email?: string;
1845
+ address?: string;
1846
+ }
1847
+ interface UpdateSupplierDto {
1848
+ name?: string;
1849
+ contactInfo?: string;
1850
+ phone?: string;
1851
+ email?: string;
1852
+ address?: string;
1853
+ }
1854
+ interface Supplier {
1855
+ id: string;
1856
+ gymId: string;
1857
+ name: string;
1858
+ contactInfo?: string;
1859
+ phone?: string;
1860
+ email?: string;
1861
+ address?: string;
1862
+ createdAt: string;
1863
+ updatedAt: string;
1864
+ createdBy?: {
1865
+ id: string;
1866
+ name: string;
1867
+ email: string;
1868
+ };
1869
+ updatedBy?: {
1870
+ id: string;
1871
+ name: string;
1872
+ email: string;
1873
+ };
1874
+ }
1875
+ interface SearchSuppliersParams extends PaginationQueryDto {
1876
+ search?: string;
1877
+ }
1878
+ interface SuppliersStats {
1879
+ totalSuppliers: number;
1880
+ suppliersWithEmail: number;
1881
+ suppliersWithPhone: number;
1882
+ suppliersWithAddress: number;
1883
+ contactCompleteness: {
1884
+ email: number;
1885
+ phone: number;
1886
+ address: number;
1887
+ };
1888
+ }
1889
+
1890
+ declare class SuppliersResource extends BaseResource {
1891
+ private basePath;
1892
+ createSupplier(data: CreateSupplierDto, options?: RequestOptions): Promise<Supplier>;
1893
+ searchSuppliers(params?: SearchSuppliersParams, options?: RequestOptions): Promise<PaginatedResponseDto<Supplier>>;
1894
+ getSupplier(id: string, options?: RequestOptions): Promise<Supplier>;
1895
+ updateSupplier(id: string, data: UpdateSupplierDto, options?: RequestOptions): Promise<Supplier>;
1896
+ deleteSupplier(id: string, options?: RequestOptions): Promise<void>;
1897
+ getSuppliersStats(options?: RequestOptions): Promise<SuppliersStats>;
1898
+ }
1899
+
1900
+ interface UpdateProfileDto {
1901
+ name?: string;
1902
+ phone?: string;
1903
+ birthDate?: string;
1904
+ }
1905
+ interface UserProfileDto {
1906
+ id: string;
1907
+ email: string;
1908
+ name: string;
1909
+ phone?: string | null;
1910
+ birthDate?: Date | string | null;
1911
+ userType: 'owner' | 'collaborator';
1912
+ emailVerified: boolean;
1913
+ createdAt: Date | string;
1914
+ updatedAt: Date | string;
1915
+ }
1916
+
1917
+ declare class UsersResource extends BaseResource {
1918
+ /**
1919
+ * Get the current user's profile
1920
+ * @param options - Request options
1921
+ * @returns User profile data
1922
+ */
1923
+ getProfile(options?: RequestOptions): Promise<UserProfileDto>;
1924
+ /**
1925
+ * Update the current user's profile
1926
+ * @param data - Profile update data
1927
+ * @param options - Request options
1928
+ * @returns Updated user profile
1929
+ */
1930
+ updateProfile(data: UpdateProfileDto, options?: RequestOptions): Promise<UserProfileDto>;
1931
+ }
1932
+
1933
+ declare class SubscriptionsResource extends BaseResource {
1934
+ private basePath;
1935
+ /**
1936
+ * Get available subscription plans (currently only free plans)
1937
+ */
1938
+ getAvailablePlans(options?: RequestOptions): Promise<AvailablePlanDto[]>;
1939
+ /**
1940
+ * Get subscription status for an organization
1941
+ */
1942
+ getSubscriptionStatus(organizationId: string, options?: RequestOptions): Promise<SubscriptionStatusDto>;
1943
+ /**
1944
+ * Affiliate organization to a subscription plan
1945
+ */
1946
+ affiliateOrganization(organizationId: string, data: AffiliateOrganizationDto, options?: RequestOptions): Promise<SubscriptionStatusDto>;
1947
+ /**
1948
+ * Check subscription limits
1949
+ * @param organizationId Organization ID
1950
+ * @param limitType Type of limit to check: 'gyms', 'clients', or 'users'
1951
+ */
1952
+ checkSubscriptionLimit(organizationId: string, limitType: 'gyms' | 'clients' | 'users', options?: RequestOptions): Promise<CheckLimitResponse>;
1953
+ }
1954
+
1955
+ interface CreatePaymentMethodDto {
1956
+ name: string;
1957
+ description?: string;
1958
+ code: string;
1959
+ enabled?: boolean;
1960
+ metadata?: Record<string, any>;
1961
+ }
1962
+ interface UpdatePaymentMethodDto {
1963
+ name?: string;
1964
+ description?: string;
1965
+ code?: string;
1966
+ enabled?: boolean;
1967
+ metadata?: Record<string, any>;
1968
+ }
1969
+ interface PaymentMethod {
1970
+ id: string;
1971
+ gymId: string;
1972
+ name: string;
1973
+ description?: string;
1974
+ code: string;
1975
+ enabled: boolean;
1976
+ metadata?: Record<string, any>;
1977
+ createdAt: string;
1978
+ updatedAt: string;
1979
+ }
1980
+ interface SearchPaymentMethodsParams extends PaginationQueryDto {
1981
+ search?: string;
1982
+ enabledOnly?: boolean;
1983
+ code?: string;
1984
+ }
1985
+ interface PaymentMethodStats {
1986
+ totalPaymentMethods: number;
1987
+ enabledPaymentMethods: number;
1988
+ disabledPaymentMethods: number;
1989
+ }
1990
+
1991
+ declare class PaymentMethodsResource extends BaseResource {
1992
+ private basePath;
1993
+ createPaymentMethod(data: CreatePaymentMethodDto, options?: RequestOptions): Promise<PaymentMethod>;
1994
+ searchPaymentMethods(params?: SearchPaymentMethodsParams, options?: RequestOptions): Promise<PaginatedResponseDto<PaymentMethod>>;
1995
+ getPaymentMethod(id: string, options?: RequestOptions): Promise<PaymentMethod>;
1996
+ updatePaymentMethod(id: string, data: UpdatePaymentMethodDto, options?: RequestOptions): Promise<PaymentMethod>;
1997
+ deletePaymentMethod(id: string, options?: RequestOptions): Promise<void>;
1998
+ togglePaymentMethod(id: string, options?: RequestOptions): Promise<PaymentMethod>;
1999
+ getPaymentMethodStats(options?: RequestOptions): Promise<PaymentMethodStats>;
2000
+ }
2001
+
2002
+ declare class GymSpaceSdk {
2003
+ private client;
2004
+ auth: AuthResource;
2005
+ organizations: OrganizationsResource;
2006
+ gyms: GymsResource;
2007
+ clients: ClientsResource;
2008
+ membershipPlans: MembershipPlansResource;
2009
+ contracts: ContractsResource;
2010
+ dashboard: DashboardResource;
2011
+ evaluations: EvaluationsResource;
2012
+ checkIns: CheckInsResource;
2013
+ invitations: InvitationsResource;
2014
+ leads: LeadsResource;
2015
+ assets: AssetsResource;
2016
+ files: FilesResource;
2017
+ publicCatalog: PublicCatalogResource;
2018
+ health: HealthResource;
2019
+ onboarding: OnboardingResource;
2020
+ products: ProductsResource;
2021
+ sales: SalesResource;
2022
+ suppliers: SuppliersResource;
2023
+ users: UsersResource;
2024
+ subscriptions: SubscriptionsResource;
2025
+ paymentMethods: PaymentMethodsResource;
2026
+ constructor(config: GymSpaceConfig);
2027
+ /**
2028
+ * Set the authentication token
2029
+ */
2030
+ setAuthToken(token: string): void;
2031
+ /**
2032
+ * Set both access and refresh tokens
2033
+ */
2034
+ setTokens(accessToken: string, refreshToken: string): void;
2035
+ /**
2036
+ * Set the current gym context
2037
+ */
2038
+ setGymId(gymId: string): void;
2039
+ /**
2040
+ * Clear authentication
2041
+ */
2042
+ clearAuth(): void;
2043
+ /**
2044
+ * Get the underlying API client
2045
+ */
2046
+ getClient(): ApiClient;
2047
+ }
2048
+
2049
+ interface ApiResponse<T> {
2050
+ data: T;
2051
+ meta?: any;
2052
+ }
2053
+
2054
+ declare class GymSpaceError extends Error {
2055
+ statusCode?: number;
2056
+ code?: string;
2057
+ details?: any;
2058
+ constructor(message: string, statusCode?: number, code?: string, details?: any);
2059
+ }
2060
+ declare class AuthenticationError extends GymSpaceError {
2061
+ constructor(message?: string);
2062
+ }
2063
+ declare class AuthorizationError extends GymSpaceError {
2064
+ constructor(message?: string);
2065
+ }
2066
+ declare class NotFoundError extends GymSpaceError {
2067
+ constructor(resource: string, id?: string);
2068
+ }
2069
+ declare class ValidationError extends GymSpaceError {
2070
+ constructor(message: string, errors?: any);
2071
+ }
2072
+ declare class NetworkError extends GymSpaceError {
2073
+ constructor(message?: string);
2074
+ }
2075
+
2076
+ export { type AcceptInvitationDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BusinessHours, type CatalogGym, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientSearchForCheckInResponse, type ClientStat, type ClientStats, ClientsResource, type CompleteGuidedSetupData, type ConfigureFeaturesData, type Contract, ContractsResource, type ContractsRevenue, type CreateCheckInDto, type CreateClientDto, type CreateContractDto, type CreateEvaluationDto, type CreateGymDto, type CreateInvitationDto, type CreateLeadDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSupplierDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type Evaluation, type EvaluationHealthMetrics, type EvaluationMeasurements, type EvaluationPerformanceMetrics, type EvaluationReport, type EvaluationSystemFeatures, EvaluationsResource, type ExpiringContract, type FileResponseDto, FilesResource, type FreezeContractDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, type GetClientEvaluationsParams, type GetContractsParams, type GetFeaturedGymsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type Gym, type GymAmenities, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type Invitation, type InvitationValidationResponse, InvitationsResource, type Lead, type LeadManagementFeatures, type LeadStats, LeadsResource, type LoginDto, type LoginResponseDto, type MembershipManagementFeatures, type MembershipPlan, type MembershipPlanStats, MembershipPlansResource, NetworkError, type NewClients, NotFoundError, type NotificationSettings, OnboardingResource, type OnboardingResponse, type OnboardingStatus, OnboardingStep, type Organization, type OrganizationStats, type OrganizationWithDetails, OrganizationsResource, type PaginatedResponse, type PaginatedResponseDto, type PaginationParams, type PaginationQueryDto, type PaymentMethod, type PaymentMethodStats, PaymentMethodsResource, type Product, type ProductCategory, ProductsResource, PublicCatalogResource, type ReadyResponse, type RegisterCollaboratorDto, type RegisterOwnerDto, type RenewContractDto, type RequestOptions, type RequestPasswordResetDto, type RequestPasswordResetResponseDto, type ResendResetCodeDto, type ResendResetCodeResponseDto, type ResendVerificationDto, type ResetPasswordDto, type ResetPasswordResponseDto, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchCatalogParams, type SearchCheckInsParams, type SearchClientsParams, type SearchLeadsParams, type SearchPaymentMethodsParams, type SearchProductsParams, type SearchSalesParams, type SearchSuppliersParams, type SocialMedia, type StartOnboardingData, type StartOnboardingResponse, type StockMovement, type Subscription, type SubscriptionPlan, type SubscriptionStatusDto, SubscriptionsResource, type Supplier, SuppliersResource, type SuppliersStats, type TimeSlot, type TopSellingProduct, type UpdateClientDto, type UpdateEvaluationDto, type UpdateGymDto, type UpdateGymScheduleDto, type UpdateGymSettingsData, type UpdateGymSocialMediaDto, type UpdateLeadDto, type UpdateMembershipPlanDto, type UpdateOrganizationDto, type UpdatePaymentMethodDto, type UpdatePaymentStatusDto, type UpdateProductCategoryDto, type UpdateProductDto, type UpdateProfileDto, type UpdateSaleDto, type UpdateStockDto, type UpdateSupplierDto, type UploadAssetDto, type UploadFileDto, type UserProfileDto, UsersResource, ValidationError, type VerifyEmailDto, type VerifyResetCodeDto, type VerifyResetCodeResponseDto, type WeeklySchedule };