@vitalfit/sdk 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +81 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -1
- package/dist/index.d.ts +56 -1
- package/dist/index.js +81 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -65,6 +65,7 @@ type LoginRequest = {
|
|
|
65
65
|
email: string;
|
|
66
66
|
password: string;
|
|
67
67
|
context?: string;
|
|
68
|
+
device_token?: string;
|
|
68
69
|
};
|
|
69
70
|
type LoginResponse = {
|
|
70
71
|
refresh_token: string;
|
|
@@ -184,6 +185,15 @@ type UserPaginationOptions = {
|
|
|
184
185
|
type QrToken = {
|
|
185
186
|
token: string;
|
|
186
187
|
};
|
|
188
|
+
type MedicalProfile = {
|
|
189
|
+
allergies: string;
|
|
190
|
+
blood_type: string;
|
|
191
|
+
emergency_contact: string;
|
|
192
|
+
medical_conditions: string;
|
|
193
|
+
medical_risks: string;
|
|
194
|
+
medications: string;
|
|
195
|
+
warnings: string;
|
|
196
|
+
};
|
|
187
197
|
|
|
188
198
|
type PaginatedBranch = {
|
|
189
199
|
branch_id: string;
|
|
@@ -416,6 +426,10 @@ type Banner = {
|
|
|
416
426
|
link_url?: string;
|
|
417
427
|
name?: string;
|
|
418
428
|
};
|
|
429
|
+
type RandomBanner = {
|
|
430
|
+
image_url: string;
|
|
431
|
+
service_id: string;
|
|
432
|
+
};
|
|
419
433
|
type Promotion = {
|
|
420
434
|
code: string;
|
|
421
435
|
created_at: string;
|
|
@@ -937,6 +951,22 @@ type CheckInResponse = {
|
|
|
937
951
|
message: string;
|
|
938
952
|
service_name: string;
|
|
939
953
|
};
|
|
954
|
+
type AttendanceHistory = {
|
|
955
|
+
attendance_id: string;
|
|
956
|
+
user_id: string;
|
|
957
|
+
user_name: string;
|
|
958
|
+
service_id: string;
|
|
959
|
+
service_name: string;
|
|
960
|
+
check_in_time: string;
|
|
961
|
+
status: string;
|
|
962
|
+
};
|
|
963
|
+
type ServiceUsage = {
|
|
964
|
+
attendance_id: string;
|
|
965
|
+
service_id: string;
|
|
966
|
+
service_name: string;
|
|
967
|
+
check_in_time: string;
|
|
968
|
+
status: string;
|
|
969
|
+
};
|
|
940
970
|
|
|
941
971
|
type ChartData = {
|
|
942
972
|
hour?: number;
|
|
@@ -1085,6 +1115,23 @@ type AuditLog = {
|
|
|
1085
1115
|
user_id: string;
|
|
1086
1116
|
};
|
|
1087
1117
|
|
|
1118
|
+
type UnreadCountResponse = {
|
|
1119
|
+
count: number;
|
|
1120
|
+
};
|
|
1121
|
+
type BroadcastRequest = {
|
|
1122
|
+
title: string;
|
|
1123
|
+
message: string;
|
|
1124
|
+
};
|
|
1125
|
+
type NotificationResponse = {
|
|
1126
|
+
id: string;
|
|
1127
|
+
title: string;
|
|
1128
|
+
message: string;
|
|
1129
|
+
type: string;
|
|
1130
|
+
is_read: boolean;
|
|
1131
|
+
metadata: Record<string, any>;
|
|
1132
|
+
created_at: string;
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1088
1135
|
declare class AuthService {
|
|
1089
1136
|
private client;
|
|
1090
1137
|
constructor(client: Client);
|
|
@@ -1124,6 +1171,9 @@ declare class UserService {
|
|
|
1124
1171
|
QrToken(jwt: string): Promise<QrToken>;
|
|
1125
1172
|
resendActivateOtp(email: string): Promise<void>;
|
|
1126
1173
|
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
1174
|
+
createMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1175
|
+
getMedicalProfile(userId: string, jwt: string): Promise<DataResponse<MedicalProfile>>;
|
|
1176
|
+
updateMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1127
1177
|
}
|
|
1128
1178
|
|
|
1129
1179
|
declare class BranchService {
|
|
@@ -1194,6 +1244,7 @@ declare class MarketingService {
|
|
|
1194
1244
|
getPromotionByID(promotionId: string, jwt: string): Promise<DataResponse<Promotion>>;
|
|
1195
1245
|
updatePromotion(promotionId: string, promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1196
1246
|
deletePromotion(promotionId: string, jwt: string): Promise<void>;
|
|
1247
|
+
getRandomBanner(): Promise<DataResponse<RandomBanner>>;
|
|
1197
1248
|
}
|
|
1198
1249
|
|
|
1199
1250
|
declare class MembershipService {
|
|
@@ -1213,6 +1264,7 @@ declare class MembershipService {
|
|
|
1213
1264
|
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1214
1265
|
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1215
1266
|
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
1267
|
+
getMyMemberships(jwt: string): Promise<DataResponse<ClientMembershipItem>>;
|
|
1216
1268
|
}
|
|
1217
1269
|
|
|
1218
1270
|
declare class PublicService {
|
|
@@ -1310,6 +1362,8 @@ declare class AccessService {
|
|
|
1310
1362
|
private client;
|
|
1311
1363
|
constructor(client: Client);
|
|
1312
1364
|
checkIn(jwt: string, data: CheckIn): Promise<CheckInResponse>;
|
|
1365
|
+
getClientAttendanceHistory(jwt: string, userId: string, start?: string, end?: string, { page, limit, sort }?: PaginationRequest): Promise<PaginatedTotal<AttendanceHistory[]>>;
|
|
1366
|
+
getClientServiceUsage(jwt: string, userId: string, start?: string, end?: string, { page, limit, sort }?: PaginationRequest): Promise<PaginatedTotal<ServiceUsage[]>>;
|
|
1313
1367
|
}
|
|
1314
1368
|
|
|
1315
1369
|
declare class ReportService {
|
|
@@ -1355,6 +1409,7 @@ declare class ReportService {
|
|
|
1355
1409
|
classOccupancyChart(jwt: string, branchId?: string): Promise<DataResponse<ChartData[]>>;
|
|
1356
1410
|
financialSummary(jwt: string, branchId?: string): Promise<DataResponse<FinancialSummary>>;
|
|
1357
1411
|
salesByDemography(jwt: string, branchId: string | undefined, dimension: 'age' | 'gender', start?: string, end?: string): Promise<DataResponse<ChartData[]>>;
|
|
1412
|
+
churnRateKPI(jwt: string, branchId?: string): Promise<DataResponse<KPICard>>;
|
|
1358
1413
|
}
|
|
1359
1414
|
|
|
1360
1415
|
declare class StaffService {
|
|
@@ -1427,4 +1482,4 @@ declare class VitalFit {
|
|
|
1427
1482
|
version(): string;
|
|
1428
1483
|
}
|
|
1429
1484
|
|
|
1430
|
-
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type AddToWishlistRequest, type AuditLog, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BillingMatrix, type BillingMatrixRow, type BookClassRequest, type BookingParticipant, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchPerformance, type BranchScheduleResponse, type BranchServicePrice, type BranchStaff, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClassBookingCount, type ClassCapacityStats, type ClassScheduleItem, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CohortRetention, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, type CreateFiscalDocumentRequest, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreatePromotion, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type ExchangeRateResponse, type FinancialSummary, type FinancialSummaryItem, type FiscalDocument, type GetUserResponse, type GlobalSalesStats, type GlobalStat, type HeatmapPoint, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, type KPICard, type LoginRequest, type LoginResponse, type MembershipType, type MembershipTypeDetail, type MembershipsSummary, type Oauth, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PackagePublicItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PaginationWithStatus, type PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type Policy, type Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type RecentAttendanceItem, type RenewTokenRequest, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type StackedChartData, type Staff, type TaxRate, type TopBranch, type TotalSalesStats, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, type UpdateClientMembershipRequest, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdatePackagePayload, type UpdateServiceImageManual, type UpdateServiceManual, type UpdateUserRequest, type UpdateUserStaffRequest, type User, type UserApiResponse, UserGender, type UserPaginationOptions, type UserSession, VitalFit, type WishlistItemResponse, type ZelleConfig, isAPIError, mainCurrencies, type updatePolicy };
|
|
1485
|
+
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type AddToWishlistRequest, type AttendanceHistory, type AuditLog, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BillingMatrix, type BillingMatrixRow, type BookClassRequest, type BookingParticipant, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchPerformance, type BranchScheduleResponse, type BranchServicePrice, type BranchStaff, type BranchStatusCount, type BroadcastRequest, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClassBookingCount, type ClassCapacityStats, type ClassScheduleItem, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CohortRetention, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, type CreateFiscalDocumentRequest, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreatePromotion, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type ExchangeRateResponse, type FinancialSummary, type FinancialSummaryItem, type FiscalDocument, type GetUserResponse, type GlobalSalesStats, type GlobalStat, type HeatmapPoint, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, type KPICard, type LoginRequest, type LoginResponse, type MedicalProfile, type MembershipType, type MembershipTypeDetail, type MembershipsSummary, type NotificationResponse, type Oauth, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PackagePublicItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PaginationWithStatus, type PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type Policy, type Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type RandomBanner, type RecentAttendanceItem, type RenewTokenRequest, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServiceUsage, type ServicesSummary, type SignUpRequest, type Specialty, type StackedChartData, type Staff, type TaxRate, type TopBranch, type TotalSalesStats, type UUIDModel, type UnreadCountResponse, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, type UpdateClientMembershipRequest, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdatePackagePayload, type UpdateServiceImageManual, type UpdateServiceManual, type UpdateUserRequest, type UpdateUserStaffRequest, type User, type UserApiResponse, UserGender, type UserPaginationOptions, type UserSession, VitalFit, type WishlistItemResponse, type ZelleConfig, isAPIError, mainCurrencies, type updatePolicy };
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ type LoginRequest = {
|
|
|
65
65
|
email: string;
|
|
66
66
|
password: string;
|
|
67
67
|
context?: string;
|
|
68
|
+
device_token?: string;
|
|
68
69
|
};
|
|
69
70
|
type LoginResponse = {
|
|
70
71
|
refresh_token: string;
|
|
@@ -184,6 +185,15 @@ type UserPaginationOptions = {
|
|
|
184
185
|
type QrToken = {
|
|
185
186
|
token: string;
|
|
186
187
|
};
|
|
188
|
+
type MedicalProfile = {
|
|
189
|
+
allergies: string;
|
|
190
|
+
blood_type: string;
|
|
191
|
+
emergency_contact: string;
|
|
192
|
+
medical_conditions: string;
|
|
193
|
+
medical_risks: string;
|
|
194
|
+
medications: string;
|
|
195
|
+
warnings: string;
|
|
196
|
+
};
|
|
187
197
|
|
|
188
198
|
type PaginatedBranch = {
|
|
189
199
|
branch_id: string;
|
|
@@ -416,6 +426,10 @@ type Banner = {
|
|
|
416
426
|
link_url?: string;
|
|
417
427
|
name?: string;
|
|
418
428
|
};
|
|
429
|
+
type RandomBanner = {
|
|
430
|
+
image_url: string;
|
|
431
|
+
service_id: string;
|
|
432
|
+
};
|
|
419
433
|
type Promotion = {
|
|
420
434
|
code: string;
|
|
421
435
|
created_at: string;
|
|
@@ -937,6 +951,22 @@ type CheckInResponse = {
|
|
|
937
951
|
message: string;
|
|
938
952
|
service_name: string;
|
|
939
953
|
};
|
|
954
|
+
type AttendanceHistory = {
|
|
955
|
+
attendance_id: string;
|
|
956
|
+
user_id: string;
|
|
957
|
+
user_name: string;
|
|
958
|
+
service_id: string;
|
|
959
|
+
service_name: string;
|
|
960
|
+
check_in_time: string;
|
|
961
|
+
status: string;
|
|
962
|
+
};
|
|
963
|
+
type ServiceUsage = {
|
|
964
|
+
attendance_id: string;
|
|
965
|
+
service_id: string;
|
|
966
|
+
service_name: string;
|
|
967
|
+
check_in_time: string;
|
|
968
|
+
status: string;
|
|
969
|
+
};
|
|
940
970
|
|
|
941
971
|
type ChartData = {
|
|
942
972
|
hour?: number;
|
|
@@ -1085,6 +1115,23 @@ type AuditLog = {
|
|
|
1085
1115
|
user_id: string;
|
|
1086
1116
|
};
|
|
1087
1117
|
|
|
1118
|
+
type UnreadCountResponse = {
|
|
1119
|
+
count: number;
|
|
1120
|
+
};
|
|
1121
|
+
type BroadcastRequest = {
|
|
1122
|
+
title: string;
|
|
1123
|
+
message: string;
|
|
1124
|
+
};
|
|
1125
|
+
type NotificationResponse = {
|
|
1126
|
+
id: string;
|
|
1127
|
+
title: string;
|
|
1128
|
+
message: string;
|
|
1129
|
+
type: string;
|
|
1130
|
+
is_read: boolean;
|
|
1131
|
+
metadata: Record<string, any>;
|
|
1132
|
+
created_at: string;
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1088
1135
|
declare class AuthService {
|
|
1089
1136
|
private client;
|
|
1090
1137
|
constructor(client: Client);
|
|
@@ -1124,6 +1171,9 @@ declare class UserService {
|
|
|
1124
1171
|
QrToken(jwt: string): Promise<QrToken>;
|
|
1125
1172
|
resendActivateOtp(email: string): Promise<void>;
|
|
1126
1173
|
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
1174
|
+
createMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1175
|
+
getMedicalProfile(userId: string, jwt: string): Promise<DataResponse<MedicalProfile>>;
|
|
1176
|
+
updateMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1127
1177
|
}
|
|
1128
1178
|
|
|
1129
1179
|
declare class BranchService {
|
|
@@ -1194,6 +1244,7 @@ declare class MarketingService {
|
|
|
1194
1244
|
getPromotionByID(promotionId: string, jwt: string): Promise<DataResponse<Promotion>>;
|
|
1195
1245
|
updatePromotion(promotionId: string, promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1196
1246
|
deletePromotion(promotionId: string, jwt: string): Promise<void>;
|
|
1247
|
+
getRandomBanner(): Promise<DataResponse<RandomBanner>>;
|
|
1197
1248
|
}
|
|
1198
1249
|
|
|
1199
1250
|
declare class MembershipService {
|
|
@@ -1213,6 +1264,7 @@ declare class MembershipService {
|
|
|
1213
1264
|
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1214
1265
|
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1215
1266
|
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
1267
|
+
getMyMemberships(jwt: string): Promise<DataResponse<ClientMembershipItem>>;
|
|
1216
1268
|
}
|
|
1217
1269
|
|
|
1218
1270
|
declare class PublicService {
|
|
@@ -1310,6 +1362,8 @@ declare class AccessService {
|
|
|
1310
1362
|
private client;
|
|
1311
1363
|
constructor(client: Client);
|
|
1312
1364
|
checkIn(jwt: string, data: CheckIn): Promise<CheckInResponse>;
|
|
1365
|
+
getClientAttendanceHistory(jwt: string, userId: string, start?: string, end?: string, { page, limit, sort }?: PaginationRequest): Promise<PaginatedTotal<AttendanceHistory[]>>;
|
|
1366
|
+
getClientServiceUsage(jwt: string, userId: string, start?: string, end?: string, { page, limit, sort }?: PaginationRequest): Promise<PaginatedTotal<ServiceUsage[]>>;
|
|
1313
1367
|
}
|
|
1314
1368
|
|
|
1315
1369
|
declare class ReportService {
|
|
@@ -1355,6 +1409,7 @@ declare class ReportService {
|
|
|
1355
1409
|
classOccupancyChart(jwt: string, branchId?: string): Promise<DataResponse<ChartData[]>>;
|
|
1356
1410
|
financialSummary(jwt: string, branchId?: string): Promise<DataResponse<FinancialSummary>>;
|
|
1357
1411
|
salesByDemography(jwt: string, branchId: string | undefined, dimension: 'age' | 'gender', start?: string, end?: string): Promise<DataResponse<ChartData[]>>;
|
|
1412
|
+
churnRateKPI(jwt: string, branchId?: string): Promise<DataResponse<KPICard>>;
|
|
1358
1413
|
}
|
|
1359
1414
|
|
|
1360
1415
|
declare class StaffService {
|
|
@@ -1427,4 +1482,4 @@ declare class VitalFit {
|
|
|
1427
1482
|
version(): string;
|
|
1428
1483
|
}
|
|
1429
1484
|
|
|
1430
|
-
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type AddToWishlistRequest, type AuditLog, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BillingMatrix, type BillingMatrixRow, type BookClassRequest, type BookingParticipant, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchPerformance, type BranchScheduleResponse, type BranchServicePrice, type BranchStaff, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClassBookingCount, type ClassCapacityStats, type ClassScheduleItem, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CohortRetention, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, type CreateFiscalDocumentRequest, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreatePromotion, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type ExchangeRateResponse, type FinancialSummary, type FinancialSummaryItem, type FiscalDocument, type GetUserResponse, type GlobalSalesStats, type GlobalStat, type HeatmapPoint, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, type KPICard, type LoginRequest, type LoginResponse, type MembershipType, type MembershipTypeDetail, type MembershipsSummary, type Oauth, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PackagePublicItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PaginationWithStatus, type PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type Policy, type Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type RecentAttendanceItem, type RenewTokenRequest, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type StackedChartData, type Staff, type TaxRate, type TopBranch, type TotalSalesStats, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, type UpdateClientMembershipRequest, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdatePackagePayload, type UpdateServiceImageManual, type UpdateServiceManual, type UpdateUserRequest, type UpdateUserStaffRequest, type User, type UserApiResponse, UserGender, type UserPaginationOptions, type UserSession, VitalFit, type WishlistItemResponse, type ZelleConfig, isAPIError, mainCurrencies, type updatePolicy };
|
|
1485
|
+
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type AddToWishlistRequest, type AttendanceHistory, type AuditLog, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BillingMatrix, type BillingMatrixRow, type BookClassRequest, type BookingParticipant, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchPerformance, type BranchScheduleResponse, type BranchServicePrice, type BranchStaff, type BranchStatusCount, type BroadcastRequest, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClassBookingCount, type ClassCapacityStats, type ClassScheduleItem, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CohortRetention, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, type CreateFiscalDocumentRequest, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreatePromotion, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type ExchangeRateResponse, type FinancialSummary, type FinancialSummaryItem, type FiscalDocument, type GetUserResponse, type GlobalSalesStats, type GlobalStat, type HeatmapPoint, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, type KPICard, type LoginRequest, type LoginResponse, type MedicalProfile, type MembershipType, type MembershipTypeDetail, type MembershipsSummary, type NotificationResponse, type Oauth, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PackagePublicItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PaginationWithStatus, type PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type Policy, type Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type RandomBanner, type RecentAttendanceItem, type RenewTokenRequest, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServiceUsage, type ServicesSummary, type SignUpRequest, type Specialty, type StackedChartData, type Staff, type TaxRate, type TopBranch, type TotalSalesStats, type UUIDModel, type UnreadCountResponse, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, type UpdateClientMembershipRequest, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdatePackagePayload, type UpdateServiceImageManual, type UpdateServiceManual, type UpdateUserRequest, type UpdateUserStaffRequest, type User, type UserApiResponse, UserGender, type UserPaginationOptions, type UserSession, VitalFit, type WishlistItemResponse, type ZelleConfig, isAPIError, mainCurrencies, type updatePolicy };
|
package/dist/index.js
CHANGED
|
@@ -357,6 +357,9 @@ var UserService = class {
|
|
|
357
357
|
this.deleteUser = this.deleteUser.bind(this);
|
|
358
358
|
this.resendActivateOtp = this.resendActivateOtp.bind(this);
|
|
359
359
|
this.UpgradePassword = this.UpgradePassword.bind(this);
|
|
360
|
+
this.createMedicalProfile = this.createMedicalProfile.bind(this);
|
|
361
|
+
this.getMedicalProfile = this.getMedicalProfile.bind(this);
|
|
362
|
+
this.updateMedicalProfile = this.updateMedicalProfile.bind(this);
|
|
360
363
|
}
|
|
361
364
|
async getStaffUsers({ search, role }, jwt) {
|
|
362
365
|
const response = await this.client.get({
|
|
@@ -454,6 +457,28 @@ var UserService = class {
|
|
|
454
457
|
}
|
|
455
458
|
});
|
|
456
459
|
}
|
|
460
|
+
//medical
|
|
461
|
+
async createMedicalProfile(userId, data, jwt) {
|
|
462
|
+
await this.client.post({
|
|
463
|
+
url: `/clients/${userId}/medical-info`,
|
|
464
|
+
jwt,
|
|
465
|
+
data
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
async getMedicalProfile(userId, jwt) {
|
|
469
|
+
const response = await this.client.get({
|
|
470
|
+
url: `/clients/${userId}/medical-info`,
|
|
471
|
+
jwt
|
|
472
|
+
});
|
|
473
|
+
return response;
|
|
474
|
+
}
|
|
475
|
+
async updateMedicalProfile(userId, data, jwt) {
|
|
476
|
+
await this.client.put({
|
|
477
|
+
url: `/clients/${userId}/medical-info`,
|
|
478
|
+
jwt,
|
|
479
|
+
data
|
|
480
|
+
});
|
|
481
|
+
}
|
|
457
482
|
};
|
|
458
483
|
|
|
459
484
|
// src/services/branch.ts
|
|
@@ -806,6 +831,7 @@ var MarketingService = class {
|
|
|
806
831
|
this.getPromotionByID = this.getPromotionByID.bind(this);
|
|
807
832
|
this.updatePromotion = this.updatePromotion.bind(this);
|
|
808
833
|
this.deletePromotion = this.deletePromotion.bind(this);
|
|
834
|
+
this.getRandomBanner = this.getRandomBanner.bind(this);
|
|
809
835
|
}
|
|
810
836
|
async createBanners(BannerData, jwt) {
|
|
811
837
|
await this.client.post({
|
|
@@ -881,6 +907,12 @@ var MarketingService = class {
|
|
|
881
907
|
jwt
|
|
882
908
|
});
|
|
883
909
|
}
|
|
910
|
+
async getRandomBanner() {
|
|
911
|
+
const response = await this.client.get({
|
|
912
|
+
url: "/marketing/banners/random"
|
|
913
|
+
});
|
|
914
|
+
return response;
|
|
915
|
+
}
|
|
884
916
|
};
|
|
885
917
|
|
|
886
918
|
// src/services/memberships.ts
|
|
@@ -902,6 +934,7 @@ var MembershipService = class {
|
|
|
902
934
|
this.getCancelReasons = this.getCancelReasons.bind(this);
|
|
903
935
|
this.updateCancelReason = this.updateCancelReason.bind(this);
|
|
904
936
|
this.deleteCancelReason = this.deleteCancelReason.bind(this);
|
|
937
|
+
this.getMyMemberships = this.getMyMemberships.bind(this);
|
|
905
938
|
}
|
|
906
939
|
async createMembershipType(data, jwt) {
|
|
907
940
|
await this.client.post({
|
|
@@ -1024,6 +1057,13 @@ var MembershipService = class {
|
|
|
1024
1057
|
jwt
|
|
1025
1058
|
});
|
|
1026
1059
|
}
|
|
1060
|
+
async getMyMemberships(jwt) {
|
|
1061
|
+
const response = await this.client.get({
|
|
1062
|
+
url: "/client-memberships/me",
|
|
1063
|
+
jwt
|
|
1064
|
+
});
|
|
1065
|
+
return response;
|
|
1066
|
+
}
|
|
1027
1067
|
};
|
|
1028
1068
|
|
|
1029
1069
|
// src/services/public.ts
|
|
@@ -1596,7 +1636,7 @@ var BookingService = class {
|
|
|
1596
1636
|
}
|
|
1597
1637
|
async cancelBooking(bookingId, jwt) {
|
|
1598
1638
|
await this.client.patch({
|
|
1599
|
-
url: `/
|
|
1639
|
+
url: `/bookings/${bookingId}/cancel`,
|
|
1600
1640
|
jwt
|
|
1601
1641
|
});
|
|
1602
1642
|
}
|
|
@@ -1641,6 +1681,8 @@ var AccessService = class {
|
|
|
1641
1681
|
constructor(client) {
|
|
1642
1682
|
this.client = client;
|
|
1643
1683
|
this.checkIn = this.checkIn.bind(this);
|
|
1684
|
+
this.getClientAttendanceHistory = this.getClientAttendanceHistory.bind(this);
|
|
1685
|
+
this.getClientServiceUsage = this.getClientServiceUsage.bind(this);
|
|
1644
1686
|
}
|
|
1645
1687
|
async checkIn(jwt, data) {
|
|
1646
1688
|
const response = await this.client.post({
|
|
@@ -1650,6 +1692,34 @@ var AccessService = class {
|
|
|
1650
1692
|
});
|
|
1651
1693
|
return response;
|
|
1652
1694
|
}
|
|
1695
|
+
async getClientAttendanceHistory(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
|
|
1696
|
+
const response = await this.client.get({
|
|
1697
|
+
url: `/clients/${userId}/attendance-history`,
|
|
1698
|
+
jwt,
|
|
1699
|
+
params: {
|
|
1700
|
+
start_date: start,
|
|
1701
|
+
end_date: end,
|
|
1702
|
+
page,
|
|
1703
|
+
limit,
|
|
1704
|
+
sort
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1707
|
+
return response;
|
|
1708
|
+
}
|
|
1709
|
+
async getClientServiceUsage(jwt, userId, start, end, { page = 1, limit = 10, sort = "desc" } = {}) {
|
|
1710
|
+
const response = await this.client.get({
|
|
1711
|
+
url: `/clients/${userId}/service-usage`,
|
|
1712
|
+
jwt,
|
|
1713
|
+
params: {
|
|
1714
|
+
start_date: start,
|
|
1715
|
+
end_date: end,
|
|
1716
|
+
page,
|
|
1717
|
+
limit,
|
|
1718
|
+
sort
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
return response;
|
|
1722
|
+
}
|
|
1653
1723
|
};
|
|
1654
1724
|
|
|
1655
1725
|
// src/services/reports.ts
|
|
@@ -1697,6 +1767,7 @@ var ReportService = class {
|
|
|
1697
1767
|
this.classOccupancyChart = this.classOccupancyChart.bind(this);
|
|
1698
1768
|
this.financialSummary = this.financialSummary.bind(this);
|
|
1699
1769
|
this.salesByDemography = this.salesByDemography.bind(this);
|
|
1770
|
+
this.churnRateKPI = this.churnRateKPI.bind(this);
|
|
1700
1771
|
}
|
|
1701
1772
|
async mostUsedServices(jwt, start, end) {
|
|
1702
1773
|
const response = await this.client.get({
|
|
@@ -2033,6 +2104,14 @@ var ReportService = class {
|
|
|
2033
2104
|
});
|
|
2034
2105
|
return response;
|
|
2035
2106
|
}
|
|
2107
|
+
async churnRateKPI(jwt, branchId) {
|
|
2108
|
+
const response = await this.client.get({
|
|
2109
|
+
url: "/reports/kpi/churn-rate",
|
|
2110
|
+
jwt,
|
|
2111
|
+
params: branchId ? { branch_id: branchId } : void 0
|
|
2112
|
+
});
|
|
2113
|
+
return response;
|
|
2114
|
+
}
|
|
2036
2115
|
};
|
|
2037
2116
|
|
|
2038
2117
|
// src/services/staff.ts
|
|
@@ -2366,7 +2445,7 @@ var VitalFit = class _VitalFit {
|
|
|
2366
2445
|
return _VitalFit.instance;
|
|
2367
2446
|
}
|
|
2368
2447
|
version() {
|
|
2369
|
-
return "0.3.
|
|
2448
|
+
return "0.3.4";
|
|
2370
2449
|
}
|
|
2371
2450
|
};
|
|
2372
2451
|
export {
|