@vitalfit/sdk 0.3.2 → 0.3.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.
- package/dist/index.cjs +44 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +44 -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;
|
|
@@ -1124,6 +1134,9 @@ declare class UserService {
|
|
|
1124
1134
|
QrToken(jwt: string): Promise<QrToken>;
|
|
1125
1135
|
resendActivateOtp(email: string): Promise<void>;
|
|
1126
1136
|
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
1137
|
+
createMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1138
|
+
getMedicalProfile(userId: string, jwt: string): Promise<DataResponse<MedicalProfile>>;
|
|
1139
|
+
updateMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1127
1140
|
}
|
|
1128
1141
|
|
|
1129
1142
|
declare class BranchService {
|
|
@@ -1213,6 +1226,7 @@ declare class MembershipService {
|
|
|
1213
1226
|
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1214
1227
|
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1215
1228
|
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
1229
|
+
getMyMemberships(jwt: string): Promise<DataResponse<ClientMembershipItem>>;
|
|
1216
1230
|
}
|
|
1217
1231
|
|
|
1218
1232
|
declare class PublicService {
|
|
@@ -1355,6 +1369,7 @@ declare class ReportService {
|
|
|
1355
1369
|
classOccupancyChart(jwt: string, branchId?: string): Promise<DataResponse<ChartData[]>>;
|
|
1356
1370
|
financialSummary(jwt: string, branchId?: string): Promise<DataResponse<FinancialSummary>>;
|
|
1357
1371
|
salesByDemography(jwt: string, branchId: string | undefined, dimension: 'age' | 'gender', start?: string, end?: string): Promise<DataResponse<ChartData[]>>;
|
|
1372
|
+
churnRateKPI(jwt: string, branchId?: string): Promise<DataResponse<KPICard>>;
|
|
1358
1373
|
}
|
|
1359
1374
|
|
|
1360
1375
|
declare class StaffService {
|
|
@@ -1427,4 +1442,4 @@ declare class VitalFit {
|
|
|
1427
1442
|
version(): string;
|
|
1428
1443
|
}
|
|
1429
1444
|
|
|
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 };
|
|
1445
|
+
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 MedicalProfile, 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 };
|
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;
|
|
@@ -1124,6 +1134,9 @@ declare class UserService {
|
|
|
1124
1134
|
QrToken(jwt: string): Promise<QrToken>;
|
|
1125
1135
|
resendActivateOtp(email: string): Promise<void>;
|
|
1126
1136
|
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
1137
|
+
createMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1138
|
+
getMedicalProfile(userId: string, jwt: string): Promise<DataResponse<MedicalProfile>>;
|
|
1139
|
+
updateMedicalProfile(userId: string, data: MedicalProfile, jwt: string): Promise<void>;
|
|
1127
1140
|
}
|
|
1128
1141
|
|
|
1129
1142
|
declare class BranchService {
|
|
@@ -1213,6 +1226,7 @@ declare class MembershipService {
|
|
|
1213
1226
|
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1214
1227
|
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1215
1228
|
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
1229
|
+
getMyMemberships(jwt: string): Promise<DataResponse<ClientMembershipItem>>;
|
|
1216
1230
|
}
|
|
1217
1231
|
|
|
1218
1232
|
declare class PublicService {
|
|
@@ -1355,6 +1369,7 @@ declare class ReportService {
|
|
|
1355
1369
|
classOccupancyChart(jwt: string, branchId?: string): Promise<DataResponse<ChartData[]>>;
|
|
1356
1370
|
financialSummary(jwt: string, branchId?: string): Promise<DataResponse<FinancialSummary>>;
|
|
1357
1371
|
salesByDemography(jwt: string, branchId: string | undefined, dimension: 'age' | 'gender', start?: string, end?: string): Promise<DataResponse<ChartData[]>>;
|
|
1372
|
+
churnRateKPI(jwt: string, branchId?: string): Promise<DataResponse<KPICard>>;
|
|
1358
1373
|
}
|
|
1359
1374
|
|
|
1360
1375
|
declare class StaffService {
|
|
@@ -1427,4 +1442,4 @@ declare class VitalFit {
|
|
|
1427
1442
|
version(): string;
|
|
1428
1443
|
}
|
|
1429
1444
|
|
|
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 };
|
|
1445
|
+
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 MedicalProfile, 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 };
|
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
|
|
@@ -902,6 +927,7 @@ var MembershipService = class {
|
|
|
902
927
|
this.getCancelReasons = this.getCancelReasons.bind(this);
|
|
903
928
|
this.updateCancelReason = this.updateCancelReason.bind(this);
|
|
904
929
|
this.deleteCancelReason = this.deleteCancelReason.bind(this);
|
|
930
|
+
this.getMyMemberships = this.getMyMemberships.bind(this);
|
|
905
931
|
}
|
|
906
932
|
async createMembershipType(data, jwt) {
|
|
907
933
|
await this.client.post({
|
|
@@ -1024,6 +1050,13 @@ var MembershipService = class {
|
|
|
1024
1050
|
jwt
|
|
1025
1051
|
});
|
|
1026
1052
|
}
|
|
1053
|
+
async getMyMemberships(jwt) {
|
|
1054
|
+
const response = await this.client.get({
|
|
1055
|
+
url: "/client-memberships/me",
|
|
1056
|
+
jwt
|
|
1057
|
+
});
|
|
1058
|
+
return response;
|
|
1059
|
+
}
|
|
1027
1060
|
};
|
|
1028
1061
|
|
|
1029
1062
|
// src/services/public.ts
|
|
@@ -1596,7 +1629,7 @@ var BookingService = class {
|
|
|
1596
1629
|
}
|
|
1597
1630
|
async cancelBooking(bookingId, jwt) {
|
|
1598
1631
|
await this.client.patch({
|
|
1599
|
-
url: `/
|
|
1632
|
+
url: `/bookings/${bookingId}/cancel`,
|
|
1600
1633
|
jwt
|
|
1601
1634
|
});
|
|
1602
1635
|
}
|
|
@@ -1697,6 +1730,7 @@ var ReportService = class {
|
|
|
1697
1730
|
this.classOccupancyChart = this.classOccupancyChart.bind(this);
|
|
1698
1731
|
this.financialSummary = this.financialSummary.bind(this);
|
|
1699
1732
|
this.salesByDemography = this.salesByDemography.bind(this);
|
|
1733
|
+
this.churnRateKPI = this.churnRateKPI.bind(this);
|
|
1700
1734
|
}
|
|
1701
1735
|
async mostUsedServices(jwt, start, end) {
|
|
1702
1736
|
const response = await this.client.get({
|
|
@@ -2033,6 +2067,14 @@ var ReportService = class {
|
|
|
2033
2067
|
});
|
|
2034
2068
|
return response;
|
|
2035
2069
|
}
|
|
2070
|
+
async churnRateKPI(jwt, branchId) {
|
|
2071
|
+
const response = await this.client.get({
|
|
2072
|
+
url: "/reports/kpi/churn-rate",
|
|
2073
|
+
jwt,
|
|
2074
|
+
params: branchId ? { branch_id: branchId } : void 0
|
|
2075
|
+
});
|
|
2076
|
+
return response;
|
|
2077
|
+
}
|
|
2036
2078
|
};
|
|
2037
2079
|
|
|
2038
2080
|
// src/services/staff.ts
|
|
@@ -2366,7 +2408,7 @@ var VitalFit = class _VitalFit {
|
|
|
2366
2408
|
return _VitalFit.instance;
|
|
2367
2409
|
}
|
|
2368
2410
|
version() {
|
|
2369
|
-
return "0.3.
|
|
2411
|
+
return "0.3.3";
|
|
2370
2412
|
}
|
|
2371
2413
|
};
|
|
2372
2414
|
export {
|