@gymspace/sdk 1.2.12 → 1.2.14
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/.tsbuildinfo +1 -1
- package/dist/index.d.mts +724 -20
- package/dist/index.d.ts +724 -20
- package/dist/index.js +343 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +339 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/models/activities.ts +139 -0
- package/src/models/bulk-messaging.ts +119 -0
- package/src/models/clients.ts +6 -1
- package/src/models/contracts.ts +127 -9
- package/src/models/gyms.ts +46 -7
- package/src/models/index.ts +3 -0
- package/src/models/onboarding.ts +4 -3
- package/src/models/products.ts +8 -0
- package/src/models/tags.ts +151 -0
- package/src/resources/activities.ts +113 -0
- package/src/resources/bulk-messaging.ts +83 -0
- package/src/resources/check-ins.ts +42 -10
- package/src/resources/contracts.ts +53 -1
- package/src/resources/gyms.ts +65 -27
- package/src/resources/index.ts +4 -1
- package/src/resources/subscription-plans.ts +9 -1
- package/src/resources/tags.ts +147 -0
- package/src/sdk.ts +9 -0
package/dist/index.d.ts
CHANGED
|
@@ -432,11 +432,10 @@ interface CreateGymDto {
|
|
|
432
432
|
postalCode?: string;
|
|
433
433
|
phone?: string;
|
|
434
434
|
email?: string;
|
|
435
|
-
openingTime?: string;
|
|
436
|
-
closingTime?: string;
|
|
437
435
|
capacity?: number;
|
|
438
436
|
amenities?: GymAmenities;
|
|
439
437
|
settings?: GymSettings;
|
|
438
|
+
schedule?: GymSchedule;
|
|
440
439
|
}
|
|
441
440
|
interface UpdateGymDto {
|
|
442
441
|
name?: string;
|
|
@@ -446,11 +445,10 @@ interface UpdateGymDto {
|
|
|
446
445
|
postalCode?: string;
|
|
447
446
|
phone?: string;
|
|
448
447
|
email?: string;
|
|
449
|
-
openingTime?: string;
|
|
450
|
-
closingTime?: string;
|
|
451
448
|
capacity?: number;
|
|
452
449
|
amenities?: GymAmenities;
|
|
453
450
|
settings?: GymSettings;
|
|
451
|
+
schedule?: GymSchedule;
|
|
454
452
|
}
|
|
455
453
|
interface GymAmenities {
|
|
456
454
|
hasParking?: boolean;
|
|
@@ -459,10 +457,44 @@ interface GymAmenities {
|
|
|
459
457
|
[key: string]: any;
|
|
460
458
|
}
|
|
461
459
|
interface GymSettings {
|
|
460
|
+
inventory?: InventorySettings;
|
|
461
|
+
contracts?: ContractSettings;
|
|
462
462
|
logo?: string;
|
|
463
463
|
primaryColor?: string;
|
|
464
464
|
[key: string]: any;
|
|
465
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* Inventory configuration settings
|
|
468
|
+
*/
|
|
469
|
+
interface InventorySettings {
|
|
470
|
+
defaultMinStock?: number;
|
|
471
|
+
defaultMaxStock?: number;
|
|
472
|
+
enableLowStockAlerts?: boolean;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Contract expiration configuration settings
|
|
476
|
+
*/
|
|
477
|
+
interface ContractSettings {
|
|
478
|
+
expiringSoonDays?: number;
|
|
479
|
+
gracePeriodDays?: number;
|
|
480
|
+
enableExpirationNotifications?: boolean;
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Update gym inventory settings DTO
|
|
484
|
+
*/
|
|
485
|
+
interface UpdateGymInventorySettingsDto {
|
|
486
|
+
defaultMinStock?: number;
|
|
487
|
+
defaultMaxStock?: number;
|
|
488
|
+
enableLowStockAlerts?: boolean;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Update gym contract settings DTO
|
|
492
|
+
*/
|
|
493
|
+
interface UpdateGymContractSettingsDto {
|
|
494
|
+
expiringSoonDays?: number;
|
|
495
|
+
gracePeriodDays?: number;
|
|
496
|
+
enableExpirationNotifications?: boolean;
|
|
497
|
+
}
|
|
466
498
|
interface Gym {
|
|
467
499
|
id: string;
|
|
468
500
|
organizationId: string;
|
|
@@ -474,8 +506,6 @@ interface Gym {
|
|
|
474
506
|
postalCode?: string;
|
|
475
507
|
phone?: string;
|
|
476
508
|
email?: string;
|
|
477
|
-
openingTime?: string;
|
|
478
|
-
closingTime?: string;
|
|
479
509
|
capacity?: number;
|
|
480
510
|
amenities?: GymAmenities;
|
|
481
511
|
settings?: GymSettings;
|
|
@@ -484,6 +514,11 @@ interface Gym {
|
|
|
484
514
|
isActive: boolean;
|
|
485
515
|
createdAt: string;
|
|
486
516
|
updatedAt: string;
|
|
517
|
+
_count?: {
|
|
518
|
+
gymClients: number;
|
|
519
|
+
collaborators: number;
|
|
520
|
+
contracts: number;
|
|
521
|
+
};
|
|
487
522
|
}
|
|
488
523
|
interface TimeSlot {
|
|
489
524
|
open: string;
|
|
@@ -556,6 +591,40 @@ declare class GymsResource extends BaseResource {
|
|
|
556
591
|
}>, options?: RequestOptions): Promise<Gym>;
|
|
557
592
|
updateGymSchedule(id: string, data: UpdateGymScheduleDto, options?: RequestOptions): Promise<Gym>;
|
|
558
593
|
updateGymSocialMedia(id: string, data: UpdateGymSocialMediaDto, options?: RequestOptions): Promise<Gym>;
|
|
594
|
+
/**
|
|
595
|
+
* Update current gym inventory settings (stock configuration)
|
|
596
|
+
* Uses gym from context (x-gym-id header)
|
|
597
|
+
* @param data Inventory settings data
|
|
598
|
+
* @param options Request options
|
|
599
|
+
* @returns Updated gym with new settings
|
|
600
|
+
*
|
|
601
|
+
* @example
|
|
602
|
+
* ```typescript
|
|
603
|
+
* const gym = await sdk.gyms.updateInventorySettings({
|
|
604
|
+
* defaultMinStock: 15,
|
|
605
|
+
* defaultMaxStock: 1000,
|
|
606
|
+
* enableLowStockAlerts: true
|
|
607
|
+
* });
|
|
608
|
+
* ```
|
|
609
|
+
*/
|
|
610
|
+
updateInventorySettings(data: UpdateGymInventorySettingsDto, options?: RequestOptions): Promise<Gym>;
|
|
611
|
+
/**
|
|
612
|
+
* Update current gym contract expiration settings
|
|
613
|
+
* Uses gym from context (x-gym-id header)
|
|
614
|
+
* @param data Contract settings data
|
|
615
|
+
* @param options Request options
|
|
616
|
+
* @returns Updated gym with new settings
|
|
617
|
+
*
|
|
618
|
+
* @example
|
|
619
|
+
* ```typescript
|
|
620
|
+
* const gym = await sdk.gyms.updateContractSettings({
|
|
621
|
+
* expiringSoonDays: 7,
|
|
622
|
+
* gracePeriodDays: 0,
|
|
623
|
+
* enableExpirationNotifications: true
|
|
624
|
+
* });
|
|
625
|
+
* ```
|
|
626
|
+
*/
|
|
627
|
+
updateContractSettings(data: UpdateGymContractSettingsDto, options?: RequestOptions): Promise<Gym>;
|
|
559
628
|
}
|
|
560
629
|
|
|
561
630
|
declare class CollaboratorsResource extends BaseResource {
|
|
@@ -605,6 +674,9 @@ interface CreateClientDto {
|
|
|
605
674
|
occupation?: string;
|
|
606
675
|
notes?: string;
|
|
607
676
|
profilePhotoId?: string;
|
|
677
|
+
emergencyContactName?: string;
|
|
678
|
+
emergencyContactPhone?: string;
|
|
679
|
+
medicalConditions?: string;
|
|
608
680
|
customData?: Record<string, any>;
|
|
609
681
|
}
|
|
610
682
|
interface UpdateClientDto {
|
|
@@ -623,6 +695,9 @@ interface UpdateClientDto {
|
|
|
623
695
|
occupation?: string;
|
|
624
696
|
notes?: string;
|
|
625
697
|
profilePhotoId?: string;
|
|
698
|
+
emergencyContactName?: string;
|
|
699
|
+
emergencyContactPhone?: string;
|
|
700
|
+
medicalConditions?: string;
|
|
626
701
|
customData?: Record<string, any>;
|
|
627
702
|
}
|
|
628
703
|
interface Client {
|
|
@@ -710,7 +785,6 @@ interface ClientStats {
|
|
|
710
785
|
}
|
|
711
786
|
interface SearchClientsParams {
|
|
712
787
|
search?: string;
|
|
713
|
-
activeOnly?: boolean;
|
|
714
788
|
clientNumber?: string;
|
|
715
789
|
documentId?: string;
|
|
716
790
|
includeContractStatus?: boolean;
|
|
@@ -810,6 +884,21 @@ declare class MembershipPlansResource extends BaseResource {
|
|
|
810
884
|
getMembershipPlanStats(id: string, options?: RequestOptions): Promise<MembershipPlanStats>;
|
|
811
885
|
}
|
|
812
886
|
|
|
887
|
+
declare enum CancellationReason {
|
|
888
|
+
PRICE_TOO_HIGH = "PRICE_TOO_HIGH",
|
|
889
|
+
NOT_USING_SERVICE = "NOT_USING_SERVICE",
|
|
890
|
+
MOVING_LOCATION = "MOVING_LOCATION",
|
|
891
|
+
FINANCIAL_ISSUES = "FINANCIAL_ISSUES",
|
|
892
|
+
SERVICE_DISSATISFACTION = "SERVICE_DISSATISFACTION",
|
|
893
|
+
TEMPORARY_BREAK = "TEMPORARY_BREAK",
|
|
894
|
+
OTHER = "OTHER"
|
|
895
|
+
}
|
|
896
|
+
declare enum SuspensionType {
|
|
897
|
+
VACATION = "vacation",
|
|
898
|
+
MEDICAL = "medical",
|
|
899
|
+
FINANCIAL = "financial",
|
|
900
|
+
OTHER = "other"
|
|
901
|
+
}
|
|
813
902
|
interface CreateContractDto {
|
|
814
903
|
gymClientId: string;
|
|
815
904
|
gymMembershipPlanId: string;
|
|
@@ -835,6 +924,32 @@ interface FreezeContractDto {
|
|
|
835
924
|
freezeEndDate: string;
|
|
836
925
|
reason?: string;
|
|
837
926
|
}
|
|
927
|
+
interface CancelContractDto {
|
|
928
|
+
reason: CancellationReason;
|
|
929
|
+
detailedFeedback?: string;
|
|
930
|
+
offeredAlternatives?: boolean;
|
|
931
|
+
wouldRecommend?: boolean;
|
|
932
|
+
satisfactionScore?: number;
|
|
933
|
+
}
|
|
934
|
+
interface SuspendContractDto {
|
|
935
|
+
suspensionType: SuspensionType;
|
|
936
|
+
startDate: string;
|
|
937
|
+
endDate?: string;
|
|
938
|
+
reason?: string;
|
|
939
|
+
maintainBenefits?: boolean;
|
|
940
|
+
autoReactivate?: boolean;
|
|
941
|
+
}
|
|
942
|
+
interface ResumeContractDto {
|
|
943
|
+
resumeDate?: string;
|
|
944
|
+
notes?: string;
|
|
945
|
+
}
|
|
946
|
+
interface ReactivateContractDto {
|
|
947
|
+
newPlanId?: string;
|
|
948
|
+
startDate: string;
|
|
949
|
+
applyWinBackOffer?: boolean;
|
|
950
|
+
paymentMethodId: string;
|
|
951
|
+
notes?: string;
|
|
952
|
+
}
|
|
838
953
|
interface Contract {
|
|
839
954
|
id: string;
|
|
840
955
|
gymId: string;
|
|
@@ -846,34 +961,70 @@ interface Contract {
|
|
|
846
961
|
startDate: string;
|
|
847
962
|
endDate: string;
|
|
848
963
|
status: ContractStatus;
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
finalAmount:
|
|
852
|
-
|
|
853
|
-
|
|
964
|
+
basePrice: string;
|
|
965
|
+
customPrice?: string | null;
|
|
966
|
+
finalAmount: string;
|
|
967
|
+
currency: string;
|
|
968
|
+
discountPercentage?: number | null;
|
|
969
|
+
discountAmount?: string | null;
|
|
970
|
+
paymentFrequency: string;
|
|
971
|
+
notes?: string | null;
|
|
972
|
+
termsAndConditions?: string | null;
|
|
973
|
+
freezeStartDate?: string | null;
|
|
974
|
+
freezeEndDate?: string | null;
|
|
975
|
+
contractDocumentId?: string | null;
|
|
976
|
+
paymentReceiptIds?: string[] | null;
|
|
854
977
|
receiptIds?: string[];
|
|
855
978
|
metadata?: Record<string, any>;
|
|
979
|
+
createdByUserId?: string;
|
|
980
|
+
updatedByUserId?: string | null;
|
|
981
|
+
approvedByUserId?: string | null;
|
|
982
|
+
approvedAt?: string | null;
|
|
983
|
+
cancelledByUserId?: string | null;
|
|
984
|
+
cancelledAt?: string | null;
|
|
856
985
|
createdAt: string;
|
|
857
986
|
updatedAt: string;
|
|
987
|
+
deletedAt?: string | null;
|
|
858
988
|
gymClient?: {
|
|
859
989
|
id: string;
|
|
860
990
|
name: string;
|
|
861
|
-
email: string;
|
|
991
|
+
email: string | null;
|
|
992
|
+
phone?: string;
|
|
993
|
+
gym?: {
|
|
994
|
+
id: string;
|
|
995
|
+
name: string;
|
|
996
|
+
};
|
|
862
997
|
};
|
|
863
998
|
gymMembershipPlan?: {
|
|
864
999
|
id: string;
|
|
1000
|
+
gymId: string;
|
|
865
1001
|
name: string;
|
|
866
|
-
basePrice
|
|
867
|
-
durationMonths?: number;
|
|
1002
|
+
basePrice: string;
|
|
1003
|
+
durationMonths?: number | null;
|
|
1004
|
+
durationDays?: number | null;
|
|
1005
|
+
description?: string;
|
|
1006
|
+
features?: string[];
|
|
1007
|
+
termsAndConditions?: string;
|
|
1008
|
+
allowsCustomPricing?: boolean;
|
|
1009
|
+
includesAdvisor?: boolean;
|
|
1010
|
+
showInCatalog?: boolean;
|
|
1011
|
+
assetsIds?: string[];
|
|
1012
|
+
status?: string;
|
|
868
1013
|
};
|
|
869
1014
|
paymentMethod?: {
|
|
870
1015
|
id: string;
|
|
1016
|
+
organizationId: string;
|
|
871
1017
|
name: string;
|
|
872
1018
|
description?: string;
|
|
873
1019
|
code: string;
|
|
874
1020
|
enabled: boolean;
|
|
1021
|
+
metadata?: Record<string, any>;
|
|
875
1022
|
};
|
|
876
1023
|
renewals?: Contract[];
|
|
1024
|
+
createdBy?: {
|
|
1025
|
+
id: string;
|
|
1026
|
+
email: string;
|
|
1027
|
+
};
|
|
877
1028
|
}
|
|
878
1029
|
interface GetContractsParams extends PaginationQueryDto {
|
|
879
1030
|
status?: ContractStatus;
|
|
@@ -884,6 +1035,38 @@ interface GetContractsParams extends PaginationQueryDto {
|
|
|
884
1035
|
endDateFrom?: string;
|
|
885
1036
|
endDateTo?: string;
|
|
886
1037
|
}
|
|
1038
|
+
interface ContractLifecycleEvent {
|
|
1039
|
+
id: string;
|
|
1040
|
+
contractId: string;
|
|
1041
|
+
eventType: string;
|
|
1042
|
+
previousStatus?: string;
|
|
1043
|
+
newStatus?: string;
|
|
1044
|
+
reason?: string;
|
|
1045
|
+
metadata?: Record<string, any>;
|
|
1046
|
+
createdAt: string;
|
|
1047
|
+
createdBy?: {
|
|
1048
|
+
id: string;
|
|
1049
|
+
name: string;
|
|
1050
|
+
email: string;
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
interface CancellationAnalytics {
|
|
1054
|
+
total: number;
|
|
1055
|
+
reasonBreakdown: Record<string, number>;
|
|
1056
|
+
averageSatisfaction: number | null;
|
|
1057
|
+
recommendationRate: number;
|
|
1058
|
+
feedbacks: Array<{
|
|
1059
|
+
id: string;
|
|
1060
|
+
contractId: string;
|
|
1061
|
+
contractNumber: string;
|
|
1062
|
+
clientName: string;
|
|
1063
|
+
reason: string;
|
|
1064
|
+
detailedFeedback?: string;
|
|
1065
|
+
satisfactionScore?: number;
|
|
1066
|
+
wouldRecommend?: boolean;
|
|
1067
|
+
createdAt: string;
|
|
1068
|
+
}>;
|
|
1069
|
+
}
|
|
887
1070
|
|
|
888
1071
|
declare class ContractsResource extends BaseResource {
|
|
889
1072
|
private basePath;
|
|
@@ -893,9 +1076,15 @@ declare class ContractsResource extends BaseResource {
|
|
|
893
1076
|
getClientContracts(clientId: string, options?: RequestOptions): Promise<Contract[]>;
|
|
894
1077
|
renewContract(id: string, data: RenewContractDto, options?: RequestOptions): Promise<Contract>;
|
|
895
1078
|
freezeContract(id: string, data: FreezeContractDto, options?: RequestOptions): Promise<Contract>;
|
|
896
|
-
cancelContract(id: string, data:
|
|
897
|
-
|
|
898
|
-
|
|
1079
|
+
cancelContract(id: string, data: CancelContractDto, options?: RequestOptions): Promise<Contract>;
|
|
1080
|
+
suspendContract(id: string, data: SuspendContractDto, options?: RequestOptions): Promise<Contract>;
|
|
1081
|
+
resumeContract(id: string, data: ResumeContractDto, options?: RequestOptions): Promise<Contract>;
|
|
1082
|
+
reactivateContract(id: string, data: ReactivateContractDto, options?: RequestOptions): Promise<Contract>;
|
|
1083
|
+
getLifecycleHistory(id: string, options?: RequestOptions): Promise<ContractLifecycleEvent[]>;
|
|
1084
|
+
getCancellationAnalytics(params?: {
|
|
1085
|
+
startDate?: string;
|
|
1086
|
+
endDate?: string;
|
|
1087
|
+
}, options?: RequestOptions): Promise<CancellationAnalytics>;
|
|
899
1088
|
resendWhatsAppNotification(contractId: string, options?: RequestOptions): Promise<{
|
|
900
1089
|
success: boolean;
|
|
901
1090
|
message: string;
|
|
@@ -1104,10 +1293,42 @@ interface ClientCheckInHistory {
|
|
|
1104
1293
|
|
|
1105
1294
|
declare class CheckInsResource extends BaseResource {
|
|
1106
1295
|
private basePath;
|
|
1296
|
+
/**
|
|
1297
|
+
* Creates a new check-in for a client.
|
|
1298
|
+
*
|
|
1299
|
+
* **Permissions Required:**
|
|
1300
|
+
* - Gym owners with full gym access
|
|
1301
|
+
* - Active collaborators with CHECKINS_CREATE permission
|
|
1302
|
+
*
|
|
1303
|
+
* @param data - The check-in data including client ID and optional notes
|
|
1304
|
+
* @param options - Optional request configuration
|
|
1305
|
+
* @returns The created check-in record with client and user details
|
|
1306
|
+
* @throws {ValidationError} When client is not found or already checked in
|
|
1307
|
+
* @throws {AuthorizationError} When user lacks required permissions
|
|
1308
|
+
*/
|
|
1107
1309
|
createCheckIn(data: CreateCheckInDto, options?: RequestOptions): Promise<CheckIn>;
|
|
1108
1310
|
searchCheckIns(params?: SearchCheckInsParams, options?: RequestOptions): Promise<CheckInListResponse>;
|
|
1109
1311
|
getCurrentlyInGym(options?: RequestOptions): Promise<CurrentlyInGymResponse>;
|
|
1110
1312
|
getCheckIn(id: string, options?: RequestOptions): Promise<CheckIn>;
|
|
1313
|
+
/**
|
|
1314
|
+
* Deletes a check-in record.
|
|
1315
|
+
*
|
|
1316
|
+
* **Permissions Required:**
|
|
1317
|
+
* - Gym owners with full gym access
|
|
1318
|
+
* - Active collaborators with CHECKINS_CREATE permission
|
|
1319
|
+
*
|
|
1320
|
+
* **Business Rules:**
|
|
1321
|
+
* - Only check-ins from today can be deleted
|
|
1322
|
+
* - The same permission level required for creation is required for deletion
|
|
1323
|
+
* - Cannot delete check-ins from previous days
|
|
1324
|
+
*
|
|
1325
|
+
* @param id - The ID of the check-in to delete
|
|
1326
|
+
* @param options - Optional request configuration
|
|
1327
|
+
* @returns Promise that resolves when the check-in is successfully deleted
|
|
1328
|
+
* @throws {NotFoundError} When the check-in is not found
|
|
1329
|
+
* @throws {AuthorizationError} When user lacks required permissions
|
|
1330
|
+
* @throws {ValidationError} When trying to delete a check-in from a previous day
|
|
1331
|
+
*/
|
|
1111
1332
|
deleteCheckIn(id: string, options?: RequestOptions): Promise<void>;
|
|
1112
1333
|
getGymCheckInStats(params: GetCheckInStatsParams, options?: RequestOptions): Promise<CheckInStats>;
|
|
1113
1334
|
getClientCheckInHistory(clientId: string, params?: GetClientCheckInHistoryParams, options?: RequestOptions): Promise<ClientCheckInHistory>;
|
|
@@ -1326,7 +1547,6 @@ interface StartOnboardingData {
|
|
|
1326
1547
|
timezone: string;
|
|
1327
1548
|
}
|
|
1328
1549
|
interface StartOnboardingResponse {
|
|
1329
|
-
success: boolean;
|
|
1330
1550
|
access_token: string;
|
|
1331
1551
|
refresh_token: string;
|
|
1332
1552
|
user: {
|
|
@@ -1335,6 +1555,8 @@ interface StartOnboardingResponse {
|
|
|
1335
1555
|
name: string;
|
|
1336
1556
|
userType: string;
|
|
1337
1557
|
};
|
|
1558
|
+
lastActiveGymId: string;
|
|
1559
|
+
lastActiveOrganizationId: string;
|
|
1338
1560
|
organization: {
|
|
1339
1561
|
id: string;
|
|
1340
1562
|
name: string;
|
|
@@ -1561,6 +1783,14 @@ interface Product {
|
|
|
1561
1783
|
createdAt: string;
|
|
1562
1784
|
updatedAt: string;
|
|
1563
1785
|
category?: ProductCategory;
|
|
1786
|
+
image?: {
|
|
1787
|
+
id: string;
|
|
1788
|
+
filename: string;
|
|
1789
|
+
originalName: string;
|
|
1790
|
+
fileSize: number;
|
|
1791
|
+
mimeType: string;
|
|
1792
|
+
previewUrl?: string;
|
|
1793
|
+
};
|
|
1564
1794
|
createdBy?: {
|
|
1565
1795
|
id: string;
|
|
1566
1796
|
name: string;
|
|
@@ -1976,6 +2206,11 @@ interface UpdateSubscriptionPlanDto {
|
|
|
1976
2206
|
}
|
|
1977
2207
|
declare class SubscriptionPlansResource extends BaseResource {
|
|
1978
2208
|
private basePath;
|
|
2209
|
+
private publicBasePath;
|
|
2210
|
+
/**
|
|
2211
|
+
* List all active subscription plans (Public - no authentication required)
|
|
2212
|
+
*/
|
|
2213
|
+
listPublicPlans(options?: RequestOptions): Promise<SubscriptionPlanDto[]>;
|
|
1979
2214
|
/**
|
|
1980
2215
|
* List all subscription plans (Super Admin only)
|
|
1981
2216
|
*/
|
|
@@ -2316,6 +2551,472 @@ declare class WhatsAppTemplatesResource extends BaseResource {
|
|
|
2316
2551
|
preview(id: string, variables: Record<string, any>, options?: RequestOptions): Promise<PreviewTemplateResponse>;
|
|
2317
2552
|
}
|
|
2318
2553
|
|
|
2554
|
+
interface BulkTemplate {
|
|
2555
|
+
id: string;
|
|
2556
|
+
gymId: string;
|
|
2557
|
+
name: string;
|
|
2558
|
+
message: string;
|
|
2559
|
+
description?: string;
|
|
2560
|
+
tags: string[];
|
|
2561
|
+
isActive: boolean;
|
|
2562
|
+
usageCount: number;
|
|
2563
|
+
lastUsedAt?: Date;
|
|
2564
|
+
createdByUserId: string;
|
|
2565
|
+
createdAt: Date;
|
|
2566
|
+
updatedAt: Date;
|
|
2567
|
+
}
|
|
2568
|
+
interface CreateBulkTemplateDto {
|
|
2569
|
+
name: string;
|
|
2570
|
+
message: string;
|
|
2571
|
+
description?: string;
|
|
2572
|
+
tags?: string[];
|
|
2573
|
+
isActive?: boolean;
|
|
2574
|
+
}
|
|
2575
|
+
interface UpdateBulkTemplateDto {
|
|
2576
|
+
name?: string;
|
|
2577
|
+
message?: string;
|
|
2578
|
+
description?: string;
|
|
2579
|
+
tags?: string[];
|
|
2580
|
+
isActive?: boolean;
|
|
2581
|
+
}
|
|
2582
|
+
interface BulkMessageVariable {
|
|
2583
|
+
name: string;
|
|
2584
|
+
placeholder: string;
|
|
2585
|
+
description: string;
|
|
2586
|
+
example: string;
|
|
2587
|
+
category: 'client' | 'gym' | 'membership' | 'datetime' | 'custom';
|
|
2588
|
+
required: boolean;
|
|
2589
|
+
formatter?: 'text' | 'currency' | 'date' | 'number';
|
|
2590
|
+
}
|
|
2591
|
+
interface SendBulkMessagesDto {
|
|
2592
|
+
templateId?: string;
|
|
2593
|
+
message: string;
|
|
2594
|
+
clientIds: string[];
|
|
2595
|
+
}
|
|
2596
|
+
interface RejectedClientDto {
|
|
2597
|
+
clientId: string;
|
|
2598
|
+
reason: string;
|
|
2599
|
+
}
|
|
2600
|
+
interface BulkMessageResultDto {
|
|
2601
|
+
sendId: string;
|
|
2602
|
+
totalRecipients: number;
|
|
2603
|
+
accepted: number;
|
|
2604
|
+
rejected: number;
|
|
2605
|
+
rejectedReasons: RejectedClientDto[];
|
|
2606
|
+
estimatedTime: number;
|
|
2607
|
+
}
|
|
2608
|
+
type RejectedClient = RejectedClientDto;
|
|
2609
|
+
type BulkMessageResult = BulkMessageResultDto;
|
|
2610
|
+
interface BulkMessageLogDto {
|
|
2611
|
+
sendId: string;
|
|
2612
|
+
clientId: string;
|
|
2613
|
+
clientName: string;
|
|
2614
|
+
phoneNumber: string;
|
|
2615
|
+
message: string;
|
|
2616
|
+
status: 'pending' | 'queued' | 'sent' | 'delivered' | 'failed';
|
|
2617
|
+
sentAt?: string;
|
|
2618
|
+
deliveredAt?: string;
|
|
2619
|
+
failedAt?: string;
|
|
2620
|
+
failureReason?: string;
|
|
2621
|
+
retryCount: number;
|
|
2622
|
+
timestamp: string;
|
|
2623
|
+
}
|
|
2624
|
+
interface GetBulkLogsQueryDto {
|
|
2625
|
+
sendId: string;
|
|
2626
|
+
}
|
|
2627
|
+
interface BulkLogsResponseDto {
|
|
2628
|
+
sendId: string;
|
|
2629
|
+
totalRecipients: number;
|
|
2630
|
+
sent: number;
|
|
2631
|
+
delivered: number;
|
|
2632
|
+
failed: number;
|
|
2633
|
+
pending: number;
|
|
2634
|
+
logs: BulkMessageLogDto[];
|
|
2635
|
+
isComplete: boolean;
|
|
2636
|
+
}
|
|
2637
|
+
type BulkMessageLog = BulkMessageLogDto;
|
|
2638
|
+
type BulkLogsResponse = BulkLogsResponseDto;
|
|
2639
|
+
interface GenerateAIMessageDto {
|
|
2640
|
+
prompt: string;
|
|
2641
|
+
tone?: 'promotional' | 'informational' | 'reminder' | 'greeting' | 'custom' | 'friendly';
|
|
2642
|
+
includeVariables?: string[];
|
|
2643
|
+
additionalRequirements?: string;
|
|
2644
|
+
}
|
|
2645
|
+
interface GenerateAIMessageResponseDto {
|
|
2646
|
+
message: string;
|
|
2647
|
+
variables: string[];
|
|
2648
|
+
tone: string;
|
|
2649
|
+
suggestions?: string[];
|
|
2650
|
+
}
|
|
2651
|
+
type GenerateAIMessageParams = GenerateAIMessageDto;
|
|
2652
|
+
type GenerateAIMessageResponse = GenerateAIMessageResponseDto;
|
|
2653
|
+
|
|
2654
|
+
declare class BulkMessagingResource extends BaseResource {
|
|
2655
|
+
private basePath;
|
|
2656
|
+
private templatesPath;
|
|
2657
|
+
createTemplate(data: CreateBulkTemplateDto, options?: RequestOptions): Promise<BulkTemplate>;
|
|
2658
|
+
getTemplates(options?: RequestOptions): Promise<BulkTemplate[]>;
|
|
2659
|
+
getTemplate(id: string, options?: RequestOptions): Promise<BulkTemplate>;
|
|
2660
|
+
updateTemplate(id: string, data: UpdateBulkTemplateDto, options?: RequestOptions): Promise<BulkTemplate>;
|
|
2661
|
+
deleteTemplate(id: string, options?: RequestOptions): Promise<void>;
|
|
2662
|
+
getAvailableVariables(options?: RequestOptions): Promise<BulkMessageVariable[]>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Generate AI message with streaming support
|
|
2665
|
+
* Note: This proxies to the agent endpoint for streaming responses
|
|
2666
|
+
*/
|
|
2667
|
+
generateAIMessage(data: GenerateAIMessageDto, options?: RequestOptions): Promise<GenerateAIMessageResponseDto>;
|
|
2668
|
+
/**
|
|
2669
|
+
* Send bulk messages to multiple clients
|
|
2670
|
+
* Note: SDK sends clientIds, API fetches full client and gym data before sending to agent
|
|
2671
|
+
*/
|
|
2672
|
+
send(data: SendBulkMessagesDto, options?: RequestOptions): Promise<BulkMessageResultDto>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Get logs for a bulk message send operation
|
|
2675
|
+
*/
|
|
2676
|
+
getLogs(sendId: string, options?: RequestOptions): Promise<BulkLogsResponseDto>;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
interface CreateActivityDto {
|
|
2680
|
+
name: string;
|
|
2681
|
+
description?: string;
|
|
2682
|
+
imageId?: string;
|
|
2683
|
+
startDateTime: string;
|
|
2684
|
+
durationMinutes: number;
|
|
2685
|
+
maxParticipants?: number;
|
|
2686
|
+
recurrenceType?: 'daily' | 'weekly' | 'monthly';
|
|
2687
|
+
recurrenceEndDate?: string;
|
|
2688
|
+
planRestrictions?: string[];
|
|
2689
|
+
}
|
|
2690
|
+
interface UpdateActivityDto {
|
|
2691
|
+
name?: string;
|
|
2692
|
+
description?: string;
|
|
2693
|
+
imageId?: string;
|
|
2694
|
+
startDateTime?: string;
|
|
2695
|
+
durationMinutes?: number;
|
|
2696
|
+
maxParticipants?: number;
|
|
2697
|
+
recurrenceType?: 'daily' | 'weekly' | 'monthly';
|
|
2698
|
+
recurrenceEndDate?: string;
|
|
2699
|
+
planRestrictions?: string[];
|
|
2700
|
+
isActive?: boolean;
|
|
2701
|
+
}
|
|
2702
|
+
interface Activity {
|
|
2703
|
+
id: string;
|
|
2704
|
+
gymId: string;
|
|
2705
|
+
name: string;
|
|
2706
|
+
description?: string;
|
|
2707
|
+
imageId?: string;
|
|
2708
|
+
startDateTime: string;
|
|
2709
|
+
durationMinutes: number;
|
|
2710
|
+
maxParticipants?: number;
|
|
2711
|
+
recurrenceType?: 'daily' | 'weekly' | 'monthly';
|
|
2712
|
+
recurrenceEndDate?: string;
|
|
2713
|
+
isActive: boolean;
|
|
2714
|
+
planRestrictions: ActivityPlanRestriction[];
|
|
2715
|
+
notifications?: ActivityNotification[];
|
|
2716
|
+
createdByUserId: string;
|
|
2717
|
+
updatedByUserId?: string;
|
|
2718
|
+
createdAt: string;
|
|
2719
|
+
updatedAt: string;
|
|
2720
|
+
deletedAt?: string;
|
|
2721
|
+
}
|
|
2722
|
+
interface ActivityPlanRestriction {
|
|
2723
|
+
id: string;
|
|
2724
|
+
membershipPlanId: string;
|
|
2725
|
+
membershipPlan: {
|
|
2726
|
+
id: string;
|
|
2727
|
+
name: string;
|
|
2728
|
+
};
|
|
2729
|
+
}
|
|
2730
|
+
interface SearchActivitiesParams {
|
|
2731
|
+
page?: number;
|
|
2732
|
+
limit?: number;
|
|
2733
|
+
search?: string;
|
|
2734
|
+
startDate?: string;
|
|
2735
|
+
endDate?: string;
|
|
2736
|
+
recurrenceType?: 'daily' | 'weekly' | 'monthly';
|
|
2737
|
+
planId?: string;
|
|
2738
|
+
isActive?: boolean;
|
|
2739
|
+
}
|
|
2740
|
+
interface CreateActivityNotificationDto {
|
|
2741
|
+
templateId?: string;
|
|
2742
|
+
customMessage?: string;
|
|
2743
|
+
advanceTimeMinutes: number;
|
|
2744
|
+
}
|
|
2745
|
+
interface UpdateActivityNotificationDto {
|
|
2746
|
+
templateId?: string;
|
|
2747
|
+
customMessage?: string;
|
|
2748
|
+
advanceTimeMinutes?: number;
|
|
2749
|
+
isActive?: boolean;
|
|
2750
|
+
}
|
|
2751
|
+
interface ActivityNotification {
|
|
2752
|
+
id: string;
|
|
2753
|
+
activityId: string;
|
|
2754
|
+
templateId?: string;
|
|
2755
|
+
customMessage?: string;
|
|
2756
|
+
advanceTimeMinutes: number;
|
|
2757
|
+
isActive: boolean;
|
|
2758
|
+
template?: {
|
|
2759
|
+
id: string;
|
|
2760
|
+
name: string;
|
|
2761
|
+
message: string;
|
|
2762
|
+
};
|
|
2763
|
+
sentNotifications?: SentActivityNotification[];
|
|
2764
|
+
createdByUserId: string;
|
|
2765
|
+
createdAt: string;
|
|
2766
|
+
updatedAt: string;
|
|
2767
|
+
}
|
|
2768
|
+
interface SentActivityNotification {
|
|
2769
|
+
id: string;
|
|
2770
|
+
sendId: string;
|
|
2771
|
+
recipientsCount: number;
|
|
2772
|
+
sentAt: string;
|
|
2773
|
+
status: string;
|
|
2774
|
+
}
|
|
2775
|
+
interface ActivityStats {
|
|
2776
|
+
totalActivities: number;
|
|
2777
|
+
activeActivities: number;
|
|
2778
|
+
upcomingActivities: number;
|
|
2779
|
+
totalNotificationsSent: number;
|
|
2780
|
+
notificationsByActivity: {
|
|
2781
|
+
activityId: string;
|
|
2782
|
+
activityName: string;
|
|
2783
|
+
notificationsSent: number;
|
|
2784
|
+
lastSentAt: string;
|
|
2785
|
+
}[];
|
|
2786
|
+
}
|
|
2787
|
+
interface ActivityStatsParams {
|
|
2788
|
+
startDate?: string;
|
|
2789
|
+
endDate?: string;
|
|
2790
|
+
}
|
|
2791
|
+
interface EligibleClient {
|
|
2792
|
+
id: string;
|
|
2793
|
+
name: string;
|
|
2794
|
+
phone: string;
|
|
2795
|
+
email: string;
|
|
2796
|
+
planName: string;
|
|
2797
|
+
}
|
|
2798
|
+
interface EligibleClientsResponse {
|
|
2799
|
+
total: number;
|
|
2800
|
+
clients: EligibleClient[];
|
|
2801
|
+
}
|
|
2802
|
+
interface DeleteActivityParams {
|
|
2803
|
+
deleteRecurrence?: boolean;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
declare class ActivitiesResource extends BaseResource {
|
|
2807
|
+
private basePath;
|
|
2808
|
+
createActivity(data: CreateActivityDto, options?: RequestOptions): Promise<Activity>;
|
|
2809
|
+
searchActivities(params?: SearchActivitiesParams, options?: RequestOptions): Promise<PaginatedResponseDto<Activity>>;
|
|
2810
|
+
getActivity(id: string, options?: RequestOptions): Promise<Activity>;
|
|
2811
|
+
updateActivity(id: string, data: UpdateActivityDto, options?: RequestOptions): Promise<Activity>;
|
|
2812
|
+
deleteActivity(id: string, params?: DeleteActivityParams, options?: RequestOptions): Promise<void>;
|
|
2813
|
+
createNotification(activityId: string, data: CreateActivityNotificationDto, options?: RequestOptions): Promise<ActivityNotification>;
|
|
2814
|
+
getNotifications(activityId: string, options?: RequestOptions): Promise<{
|
|
2815
|
+
data: ActivityNotification[];
|
|
2816
|
+
}>;
|
|
2817
|
+
updateNotification(activityId: string, notificationId: string, data: UpdateActivityNotificationDto, options?: RequestOptions): Promise<ActivityNotification>;
|
|
2818
|
+
deleteNotification(activityId: string, notificationId: string, options?: RequestOptions): Promise<void>;
|
|
2819
|
+
getStats(params?: ActivityStatsParams, options?: RequestOptions): Promise<ActivityStats>;
|
|
2820
|
+
getEligibleClients(activityId: string, options?: RequestOptions): Promise<EligibleClientsResponse>;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
interface CreateTagDto {
|
|
2824
|
+
name: string;
|
|
2825
|
+
color?: string;
|
|
2826
|
+
description?: string;
|
|
2827
|
+
}
|
|
2828
|
+
interface UpdateTagDto {
|
|
2829
|
+
name?: string;
|
|
2830
|
+
color?: string;
|
|
2831
|
+
description?: string;
|
|
2832
|
+
}
|
|
2833
|
+
interface AssignTagsDto {
|
|
2834
|
+
tagIds: string[];
|
|
2835
|
+
}
|
|
2836
|
+
interface RemoveTagsDto {
|
|
2837
|
+
tagIds: string[];
|
|
2838
|
+
}
|
|
2839
|
+
interface Tag {
|
|
2840
|
+
id: string;
|
|
2841
|
+
gymId: string;
|
|
2842
|
+
name: string;
|
|
2843
|
+
color?: string;
|
|
2844
|
+
description?: string;
|
|
2845
|
+
clientCount?: number;
|
|
2846
|
+
createdAt: string;
|
|
2847
|
+
updatedAt: string;
|
|
2848
|
+
createdBy?: {
|
|
2849
|
+
id: string;
|
|
2850
|
+
name: string;
|
|
2851
|
+
};
|
|
2852
|
+
}
|
|
2853
|
+
interface TagWithAssignment extends Tag {
|
|
2854
|
+
assignedAt?: string;
|
|
2855
|
+
assignedBy?: {
|
|
2856
|
+
id: string;
|
|
2857
|
+
name: string;
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
interface SearchTagsParams {
|
|
2861
|
+
page?: number;
|
|
2862
|
+
limit?: number;
|
|
2863
|
+
search?: string;
|
|
2864
|
+
includeCount?: boolean;
|
|
2865
|
+
sortBy?: 'name' | 'createdAt' | 'clientCount';
|
|
2866
|
+
sortOrder?: 'asc' | 'desc';
|
|
2867
|
+
}
|
|
2868
|
+
interface GetTagClientsParams {
|
|
2869
|
+
page?: number;
|
|
2870
|
+
limit?: number;
|
|
2871
|
+
search?: string;
|
|
2872
|
+
status?: 'active' | 'inactive';
|
|
2873
|
+
}
|
|
2874
|
+
interface AssignTagsResponse {
|
|
2875
|
+
message: string;
|
|
2876
|
+
assigned: number;
|
|
2877
|
+
skipped: number;
|
|
2878
|
+
client: {
|
|
2879
|
+
id: string;
|
|
2880
|
+
name: string;
|
|
2881
|
+
tags: TagWithAssignment[];
|
|
2882
|
+
};
|
|
2883
|
+
}
|
|
2884
|
+
interface RemoveTagsResponse {
|
|
2885
|
+
message: string;
|
|
2886
|
+
removed: number;
|
|
2887
|
+
notFound: number;
|
|
2888
|
+
client: {
|
|
2889
|
+
id: string;
|
|
2890
|
+
name: string;
|
|
2891
|
+
tags: TagWithAssignment[];
|
|
2892
|
+
};
|
|
2893
|
+
}
|
|
2894
|
+
interface DeleteTagResponse {
|
|
2895
|
+
message: string;
|
|
2896
|
+
deletedCount: number;
|
|
2897
|
+
affectedClients: number;
|
|
2898
|
+
}
|
|
2899
|
+
interface ClientTagsResponse {
|
|
2900
|
+
client: {
|
|
2901
|
+
id: string;
|
|
2902
|
+
name: string;
|
|
2903
|
+
clientNumber: string;
|
|
2904
|
+
};
|
|
2905
|
+
tags: TagWithAssignment[];
|
|
2906
|
+
total: number;
|
|
2907
|
+
}
|
|
2908
|
+
interface TagClientsResponse {
|
|
2909
|
+
data: Array<{
|
|
2910
|
+
id: string;
|
|
2911
|
+
clientNumber: string;
|
|
2912
|
+
name: string;
|
|
2913
|
+
email?: string;
|
|
2914
|
+
phone?: string;
|
|
2915
|
+
status: string;
|
|
2916
|
+
assignedAt: string;
|
|
2917
|
+
assignedBy: {
|
|
2918
|
+
id: string;
|
|
2919
|
+
name: string;
|
|
2920
|
+
};
|
|
2921
|
+
}>;
|
|
2922
|
+
meta: {
|
|
2923
|
+
total: number;
|
|
2924
|
+
page: number;
|
|
2925
|
+
limit: number;
|
|
2926
|
+
totalPages: number;
|
|
2927
|
+
};
|
|
2928
|
+
tag: {
|
|
2929
|
+
id: string;
|
|
2930
|
+
name: string;
|
|
2931
|
+
color?: string;
|
|
2932
|
+
};
|
|
2933
|
+
}
|
|
2934
|
+
interface TagStatsResponse {
|
|
2935
|
+
totalTags: number;
|
|
2936
|
+
totalAssignments: number;
|
|
2937
|
+
averageTagsPerClient: number;
|
|
2938
|
+
mostUsedTags: Array<{
|
|
2939
|
+
id: string;
|
|
2940
|
+
name: string;
|
|
2941
|
+
color?: string;
|
|
2942
|
+
clientCount: number;
|
|
2943
|
+
}>;
|
|
2944
|
+
leastUsedTags: Array<{
|
|
2945
|
+
id: string;
|
|
2946
|
+
name: string;
|
|
2947
|
+
color?: string;
|
|
2948
|
+
clientCount: number;
|
|
2949
|
+
}>;
|
|
2950
|
+
unusedTags: Array<{
|
|
2951
|
+
id: string;
|
|
2952
|
+
name: string;
|
|
2953
|
+
color?: string;
|
|
2954
|
+
clientCount: number;
|
|
2955
|
+
}>;
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
declare class TagsResource extends BaseResource {
|
|
2959
|
+
private basePath;
|
|
2960
|
+
/**
|
|
2961
|
+
* Create a new tag
|
|
2962
|
+
* POST /api/v1/tags
|
|
2963
|
+
*/
|
|
2964
|
+
createTag(data: CreateTagDto, options?: RequestOptions): Promise<Tag>;
|
|
2965
|
+
/**
|
|
2966
|
+
* List all tags with optional filters and pagination
|
|
2967
|
+
* GET /api/v1/tags
|
|
2968
|
+
*/
|
|
2969
|
+
searchTags(params?: SearchTagsParams, options?: RequestOptions): Promise<PaginatedResponseDto<Tag>>;
|
|
2970
|
+
/**
|
|
2971
|
+
* Get a specific tag by ID
|
|
2972
|
+
* GET /api/v1/tags/:id
|
|
2973
|
+
*/
|
|
2974
|
+
getTag(id: string, options?: RequestOptions): Promise<Tag>;
|
|
2975
|
+
/**
|
|
2976
|
+
* Update an existing tag
|
|
2977
|
+
* PUT /api/v1/tags/:id
|
|
2978
|
+
*/
|
|
2979
|
+
updateTag(id: string, data: UpdateTagDto, options?: RequestOptions): Promise<Tag>;
|
|
2980
|
+
/**
|
|
2981
|
+
* Delete a tag (soft delete)
|
|
2982
|
+
* DELETE /api/v1/tags/:id
|
|
2983
|
+
* @param id - Tag ID
|
|
2984
|
+
* @param force - Force deletion even if tag has assigned clients
|
|
2985
|
+
*/
|
|
2986
|
+
deleteTag(id: string, force?: boolean, options?: RequestOptions): Promise<DeleteTagResponse>;
|
|
2987
|
+
/**
|
|
2988
|
+
* Get clients with a specific tag
|
|
2989
|
+
* GET /api/v1/tags/:id/clients
|
|
2990
|
+
*/
|
|
2991
|
+
getTagClients(id: string, params?: GetTagClientsParams, options?: RequestOptions): Promise<TagClientsResponse>;
|
|
2992
|
+
/**
|
|
2993
|
+
* Get tag statistics
|
|
2994
|
+
* GET /api/v1/tags/stats
|
|
2995
|
+
*/
|
|
2996
|
+
getTagStats(options?: RequestOptions): Promise<TagStatsResponse>;
|
|
2997
|
+
/**
|
|
2998
|
+
* Assign one or multiple tags to a client
|
|
2999
|
+
* POST /api/v1/clients/:clientId/tags
|
|
3000
|
+
*/
|
|
3001
|
+
assignTagsToClient(clientId: string, data: AssignTagsDto, options?: RequestOptions): Promise<AssignTagsResponse>;
|
|
3002
|
+
/**
|
|
3003
|
+
* Remove a specific tag from a client
|
|
3004
|
+
* DELETE /api/v1/clients/:clientId/tags/:tagId
|
|
3005
|
+
*/
|
|
3006
|
+
removeTagFromClient(clientId: string, tagId: string, options?: RequestOptions): Promise<RemoveTagsResponse>;
|
|
3007
|
+
/**
|
|
3008
|
+
* Remove multiple tags from a client
|
|
3009
|
+
* DELETE /api/v1/clients/:clientId/tags
|
|
3010
|
+
* Note: This endpoint requires sending tagIds in the request body
|
|
3011
|
+
*/
|
|
3012
|
+
removeTagsFromClient(clientId: string, tagIds: string[], options?: RequestOptions): Promise<RemoveTagsResponse>;
|
|
3013
|
+
/**
|
|
3014
|
+
* Get all tags assigned to a client
|
|
3015
|
+
* GET /api/v1/clients/:clientId/tags
|
|
3016
|
+
*/
|
|
3017
|
+
getClientTags(clientId: string, options?: RequestOptions): Promise<ClientTagsResponse>;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
2319
3020
|
declare class GymSpaceSdk {
|
|
2320
3021
|
client: ApiClient;
|
|
2321
3022
|
private expoFetch?;
|
|
@@ -2345,6 +3046,9 @@ declare class GymSpaceSdk {
|
|
|
2345
3046
|
paymentMethods: PaymentMethodsResource;
|
|
2346
3047
|
whatsapp: WhatsAppResource;
|
|
2347
3048
|
whatsappTemplates: WhatsAppTemplatesResource;
|
|
3049
|
+
bulkMessaging: BulkMessagingResource;
|
|
3050
|
+
activities: ActivitiesResource;
|
|
3051
|
+
tags: TagsResource;
|
|
2348
3052
|
constructor(config: GymSpaceConfig);
|
|
2349
3053
|
/**
|
|
2350
3054
|
* Set the authentication token
|
|
@@ -2414,4 +3118,4 @@ declare class NetworkError extends GymSpaceError {
|
|
|
2414
3118
|
constructor(message?: string);
|
|
2415
3119
|
}
|
|
2416
3120
|
|
|
2417
|
-
export { type ActivateRenewalDto, AdminSubscriptionManagementResource, type AdminSubscriptionStatusDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BusinessHours, type CancelSubscriptionDto, type CatalogGym, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInDetail, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, type CheckInsList, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientStat, type ClientStats, ClientsResource, type CollaboratorRoleDto, CollaboratorsResource, type CompleteGuidedSetupData, type ConfigureFeaturesData, type ConnectionStatusResponse, type Contact, type Contract, ContractsResource, type ContractsRevenue, type CreateCheckInDto, type CreateClientDto, type CreateContractDto, type CreateGymDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSubscriptionPlanDto, type CreateSupplierDto, type CreateTemplateDto, type CreateWhatsAppConfigDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type DisconnectResponse, type ExpiringContract, type FileResponseDto, FilesResource, type FreezeContractDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, 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 InitializeConnectionResponse, type InvitationValidationResponse, InvitationsResource, type ListContactsResponse, 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 OrganizationAdminDetails, type OrganizationStats, type OrganizationWithDetails, OrganizationsResource, type PaginatedResponse, type PaginatedResponseDto, type PaginationParams, type PaginationQueryDto, type PaySaleDto, type PaymentMethod, type PaymentMethodStats, PaymentMethodsResource, type PermissionsGroup, type PreviewTemplateResponse, type PriceDto, type PricingDto, 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, RolesResource, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchCatalogParams, type SearchCheckInsParams, type SearchClientsParams, type SearchPaymentMethodsParams, type SearchProductsParams, type SearchSalesParams, type SearchSuppliersParams, type SearchTemplatesDto, type SearchWhatsAppMessagesDto, type SendWhatsAppMessageDto, type SocialMedia, type StartOnboardingData, type StartOnboardingResponse, type StockMovement, type Subscription, type SubscriptionHistoryDto, type SubscriptionPlan, type SubscriptionPlanDto, SubscriptionPlansResource, type SubscriptionStatusDto, SubscriptionsResource, type Supplier, SuppliersResource, type SuppliersStats, type TimeSlot, type TopSellingProduct, type UpdateClientDto, type UpdateGymDto, type UpdateGymScheduleDto, type UpdateGymSettingsData, type UpdateGymSocialMediaDto, type UpdateMembershipPlanDto, type UpdateOrganizationDto, type UpdatePaymentMethodDto, type UpdatePaymentStatusDto, type UpdateProductCategoryDto, type UpdateProductDto, type UpdateProfileDto, type UpdateSaleDto, type UpdateStockDto, type UpdateSubscriptionPlanDto, type UpdateSupplierDto, type UpdateTemplateDto, type UpdateWhatsAppConfigDto, type UpgradeSubscriptionDto, type UploadAssetDto, type UploadFileDto, type UserProfileDto, UsersResource, ValidationError, type VerifyEmailDto, type VerifyResetCodeDto, type VerifyResetCodeResponseDto, type WeeklySchedule, type WhatsAppConfig, type WhatsAppMessage, WhatsAppResource, type WhatsAppTemplate, WhatsAppTemplatesResource };
|
|
3121
|
+
export { type ActivateRenewalDto, ActivitiesResource, type Activity, type ActivityNotification, type ActivityPlanRestriction, type ActivityStats, type ActivityStatsParams, AdminSubscriptionManagementResource, type AdminSubscriptionStatusDto, type AffiliateOrganizationDto, type Amenities, ApiClient, type ApiResponse, type AssetResponseDto, AssetsResource, type AssignTagsDto, type AssignTagsResponse, AuthResource, AuthenticationError, AuthorizationError, type AvailablePlanDto, type BulkLogsResponse, type BulkLogsResponseDto, type BulkMessageLog, type BulkMessageLogDto, type BulkMessageResult, type BulkMessageResultDto, type BulkMessageVariable, BulkMessagingResource, type BulkTemplate, type BusinessHours, type CancelContractDto, type CancelSubscriptionDto, type CancellationAnalytics, CancellationReason, type CatalogGym, type ChangePasswordDto, type ChangePasswordResponseDto, type CheckIn, type CheckInDetail, type CheckInListResponse, type CheckInStats, type CheckInSystemFeatures, type CheckIns, type CheckInsList, CheckInsResource, type CheckLimitResponse, type CityWithGyms, type Client, type ClientCheckInHistory, type ClientManagementFeatures, type ClientStat, type ClientStats, type ClientTagsResponse, ClientsResource, type CollaboratorRoleDto, CollaboratorsResource, type CompleteGuidedSetupData, type ConfigureFeaturesData, type ConnectionStatusResponse, type Contact, type Contract, type ContractLifecycleEvent, type ContractSettings, ContractsResource, type ContractsRevenue, type CreateActivityDto, type CreateActivityNotificationDto, type CreateBulkTemplateDto, type CreateCheckInDto, type CreateClientDto, type CreateContractDto, type CreateGymDto, type CreateMembershipPlanDto, type CreatePaymentMethodDto, type CreateProductCategoryDto, type CreateProductDto, type CreateSaleDto, type CreateServiceDto, type CreateSubscriptionPlanDto, type CreateSupplierDto, type CreateTagDto, type CreateTemplateDto, type CreateWhatsAppConfigDto, type CurrentSessionResponse, type CurrentlyInGymResponse, type CustomerSalesReport, DashboardResource, type DashboardStats, type DateRangeParams, type DaySchedule, type Debts, type DeleteActivityParams, type DeleteTagResponse, type DisconnectResponse, type EligibleClient, type EligibleClientsResponse, type ExpiringContract, type FileResponseDto, FilesResource, type FreezeContractDto, type GenerateAIMessageDto, type GenerateAIMessageParams, type GenerateAIMessageResponse, type GenerateAIMessageResponseDto, type GetBulkLogsQueryDto, type GetCheckInStatsParams, type GetClientCheckInHistoryParams, type GetContractsParams, type GetFeaturedGymsParams, type GetGymInvitationsParams, type GetMembershipPlansParams, type GetTagClientsParams, type Gym, type GymAmenities, type GymSchedule, type GymSettings, type GymSocialMedia, type GymSpaceConfig, GymSpaceError, GymSpaceSdk, type GymStats, GymsResource, HealthResource, type HealthResponse, type InitializeConnectionResponse, type InventorySettings, type InvitationValidationResponse, InvitationsResource, type ListContactsResponse, 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 OrganizationAdminDetails, type OrganizationStats, type OrganizationWithDetails, OrganizationsResource, type PaginatedResponse, type PaginatedResponseDto, type PaginationParams, type PaginationQueryDto, type PaySaleDto, type PaymentMethod, type PaymentMethodStats, PaymentMethodsResource, type PermissionsGroup, type PreviewTemplateResponse, type PriceDto, type PricingDto, type Product, type ProductCategory, ProductsResource, PublicCatalogResource, type ReactivateContractDto, type ReadyResponse, type RegisterCollaboratorDto, type RegisterOwnerDto, type RejectedClient, type RejectedClientDto, type RemoveTagsDto, type RemoveTagsResponse, type RenewContractDto, type RequestOptions, type RequestPasswordResetDto, type RequestPasswordResetResponseDto, type ResendResetCodeDto, type ResendResetCodeResponseDto, type ResendVerificationDto, type ResetPasswordDto, type ResetPasswordResponseDto, type ResumeContractDto, RolesResource, type Sale, type SaleItem, type SaleItemDto, SalesResource, type SalesRevenue, type SalesStats, type SearchActivitiesParams, type SearchCatalogParams, type SearchCheckInsParams, type SearchClientsParams, type SearchPaymentMethodsParams, type SearchProductsParams, type SearchSalesParams, type SearchSuppliersParams, type SearchTagsParams, type SearchTemplatesDto, type SearchWhatsAppMessagesDto, type SendBulkMessagesDto, type SendWhatsAppMessageDto, type SentActivityNotification, type SocialMedia, type StartOnboardingData, type StartOnboardingResponse, type StockMovement, type Subscription, type SubscriptionHistoryDto, type SubscriptionPlan, type SubscriptionPlanDto, SubscriptionPlansResource, type SubscriptionStatusDto, SubscriptionsResource, type Supplier, SuppliersResource, type SuppliersStats, type SuspendContractDto, SuspensionType, type Tag, type TagClientsResponse, type TagStatsResponse, type TagWithAssignment, TagsResource, type TimeSlot, type TopSellingProduct, type UpdateActivityDto, type UpdateActivityNotificationDto, type UpdateBulkTemplateDto, type UpdateClientDto, type UpdateGymContractSettingsDto, type UpdateGymDto, type UpdateGymInventorySettingsDto, type UpdateGymScheduleDto, type UpdateGymSettingsData, type UpdateGymSocialMediaDto, type UpdateMembershipPlanDto, type UpdateOrganizationDto, type UpdatePaymentMethodDto, type UpdatePaymentStatusDto, type UpdateProductCategoryDto, type UpdateProductDto, type UpdateProfileDto, type UpdateSaleDto, type UpdateStockDto, type UpdateSubscriptionPlanDto, type UpdateSupplierDto, type UpdateTagDto, type UpdateTemplateDto, type UpdateWhatsAppConfigDto, type UpgradeSubscriptionDto, type UploadAssetDto, type UploadFileDto, type UserProfileDto, UsersResource, ValidationError, type VerifyEmailDto, type VerifyResetCodeDto, type VerifyResetCodeResponseDto, type WeeklySchedule, type WhatsAppConfig, type WhatsAppMessage, WhatsAppResource, type WhatsAppTemplate, WhatsAppTemplatesResource };
|