@vitalfit/sdk 0.1.2 → 0.1.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 +104 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +104 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -250,6 +250,10 @@ type PaymentMethod = {
|
|
|
250
250
|
type: string;
|
|
251
251
|
description: string;
|
|
252
252
|
processing_type: string;
|
|
253
|
+
configuration: PaymentConfiguration;
|
|
254
|
+
visibility: BranchPaymentVisibility;
|
|
255
|
+
surcharge_fixed: number;
|
|
256
|
+
surcharge_percentage: number;
|
|
253
257
|
global_status: boolean;
|
|
254
258
|
created_at: string;
|
|
255
259
|
updated_at: string;
|
|
@@ -390,6 +394,19 @@ type Banner = {
|
|
|
390
394
|
link_url?: string;
|
|
391
395
|
name?: string;
|
|
392
396
|
};
|
|
397
|
+
type Promotion = {
|
|
398
|
+
code: string;
|
|
399
|
+
created_at: string;
|
|
400
|
+
discount_type: string;
|
|
401
|
+
discount_value: number;
|
|
402
|
+
end_date: string;
|
|
403
|
+
is_active: boolean;
|
|
404
|
+
name: string;
|
|
405
|
+
promotion_id: string;
|
|
406
|
+
start_date: string;
|
|
407
|
+
updated_at: string;
|
|
408
|
+
};
|
|
409
|
+
type CreatePromotion = Omit<Promotion, 'promotion_id' | 'created_at' | 'updated_at'>;
|
|
393
410
|
type CreateBanner = Omit<Banner, 'banner_id'>;
|
|
394
411
|
type UpdateBanner = {
|
|
395
412
|
image_url?: string;
|
|
@@ -464,6 +481,10 @@ type CancellationReason = {
|
|
|
464
481
|
description: string;
|
|
465
482
|
is_active: boolean;
|
|
466
483
|
};
|
|
484
|
+
type CreateCancellationReason = {
|
|
485
|
+
description: string;
|
|
486
|
+
is_active: boolean;
|
|
487
|
+
};
|
|
467
488
|
type ClientMembershipDetail = ClientMembershipItem & {
|
|
468
489
|
cancellation_reason?: CancellationReason;
|
|
469
490
|
};
|
|
@@ -912,6 +933,8 @@ declare class UserService {
|
|
|
912
933
|
deleteUser(userId: string, jwt: string): Promise<void>;
|
|
913
934
|
getUserByEmail(email: string, jwt: string): Promise<DataResponse<User>>;
|
|
914
935
|
QrToken(jwt: string): Promise<QrToken>;
|
|
936
|
+
resendActivateOtp(email: string): Promise<void>;
|
|
937
|
+
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
915
938
|
}
|
|
916
939
|
|
|
917
940
|
declare class BranchService {
|
|
@@ -977,6 +1000,11 @@ declare class MarketingService {
|
|
|
977
1000
|
getBannerByID(BannerId: string, jwt: string): Promise<DataResponse<Banner>>;
|
|
978
1001
|
updateBanner(BannerId: string, BannerData: UpdateBanner, jwt: string): Promise<void>;
|
|
979
1002
|
deleteBanner(BannerId: string, jwt: string): Promise<void>;
|
|
1003
|
+
createPromotion(promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1004
|
+
getPromotion(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<Promotion[]>>;
|
|
1005
|
+
getPromotionByID(promotionId: string, jwt: string): Promise<DataResponse<Promotion>>;
|
|
1006
|
+
updatePromotion(promotionId: string, promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1007
|
+
deletePromotion(promotionId: string, jwt: string): Promise<void>;
|
|
980
1008
|
}
|
|
981
1009
|
|
|
982
1010
|
declare class MembershipService {
|
|
@@ -992,6 +1020,10 @@ declare class MembershipService {
|
|
|
992
1020
|
getClientMemberships(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<ClientMembershipItem[]>>;
|
|
993
1021
|
getClientMembershipByID(membershipId: string, jwt: string): Promise<DataResponse<ClientMembershipDetail>>;
|
|
994
1022
|
updateClientMembership(membershipId: string, data: UpdateClientMembershipRequest, jwt: string): Promise<void>;
|
|
1023
|
+
createCancelReason(data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1024
|
+
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1025
|
+
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1026
|
+
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
995
1027
|
}
|
|
996
1028
|
|
|
997
1029
|
declare class PublicService {
|
|
@@ -1128,4 +1160,4 @@ declare class VitalFit {
|
|
|
1128
1160
|
version(): string;
|
|
1129
1161
|
}
|
|
1130
1162
|
|
|
1131
|
-
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BookClassRequest, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchScheduleResponse, type BranchServicePrice, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateClassPayload, type CreateEquipment, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type GetUserResponse, type GlobalStat, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, 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 PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type TopBranch, 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, VitalFit, type ZelleConfig, isAPIError, mainCurrencies };
|
|
1163
|
+
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BookClassRequest, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchScheduleResponse, type BranchServicePrice, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, 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 GetUserResponse, type GlobalStat, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, 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 Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type TopBranch, 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, VitalFit, type ZelleConfig, isAPIError, mainCurrencies };
|
package/dist/index.d.ts
CHANGED
|
@@ -250,6 +250,10 @@ type PaymentMethod = {
|
|
|
250
250
|
type: string;
|
|
251
251
|
description: string;
|
|
252
252
|
processing_type: string;
|
|
253
|
+
configuration: PaymentConfiguration;
|
|
254
|
+
visibility: BranchPaymentVisibility;
|
|
255
|
+
surcharge_fixed: number;
|
|
256
|
+
surcharge_percentage: number;
|
|
253
257
|
global_status: boolean;
|
|
254
258
|
created_at: string;
|
|
255
259
|
updated_at: string;
|
|
@@ -390,6 +394,19 @@ type Banner = {
|
|
|
390
394
|
link_url?: string;
|
|
391
395
|
name?: string;
|
|
392
396
|
};
|
|
397
|
+
type Promotion = {
|
|
398
|
+
code: string;
|
|
399
|
+
created_at: string;
|
|
400
|
+
discount_type: string;
|
|
401
|
+
discount_value: number;
|
|
402
|
+
end_date: string;
|
|
403
|
+
is_active: boolean;
|
|
404
|
+
name: string;
|
|
405
|
+
promotion_id: string;
|
|
406
|
+
start_date: string;
|
|
407
|
+
updated_at: string;
|
|
408
|
+
};
|
|
409
|
+
type CreatePromotion = Omit<Promotion, 'promotion_id' | 'created_at' | 'updated_at'>;
|
|
393
410
|
type CreateBanner = Omit<Banner, 'banner_id'>;
|
|
394
411
|
type UpdateBanner = {
|
|
395
412
|
image_url?: string;
|
|
@@ -464,6 +481,10 @@ type CancellationReason = {
|
|
|
464
481
|
description: string;
|
|
465
482
|
is_active: boolean;
|
|
466
483
|
};
|
|
484
|
+
type CreateCancellationReason = {
|
|
485
|
+
description: string;
|
|
486
|
+
is_active: boolean;
|
|
487
|
+
};
|
|
467
488
|
type ClientMembershipDetail = ClientMembershipItem & {
|
|
468
489
|
cancellation_reason?: CancellationReason;
|
|
469
490
|
};
|
|
@@ -912,6 +933,8 @@ declare class UserService {
|
|
|
912
933
|
deleteUser(userId: string, jwt: string): Promise<void>;
|
|
913
934
|
getUserByEmail(email: string, jwt: string): Promise<DataResponse<User>>;
|
|
914
935
|
QrToken(jwt: string): Promise<QrToken>;
|
|
936
|
+
resendActivateOtp(email: string): Promise<void>;
|
|
937
|
+
UpgradePassword(jwt: string, currentPassword: string, newPassword: string, confirmPassword: string): Promise<void>;
|
|
915
938
|
}
|
|
916
939
|
|
|
917
940
|
declare class BranchService {
|
|
@@ -977,6 +1000,11 @@ declare class MarketingService {
|
|
|
977
1000
|
getBannerByID(BannerId: string, jwt: string): Promise<DataResponse<Banner>>;
|
|
978
1001
|
updateBanner(BannerId: string, BannerData: UpdateBanner, jwt: string): Promise<void>;
|
|
979
1002
|
deleteBanner(BannerId: string, jwt: string): Promise<void>;
|
|
1003
|
+
createPromotion(promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1004
|
+
getPromotion(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<Promotion[]>>;
|
|
1005
|
+
getPromotionByID(promotionId: string, jwt: string): Promise<DataResponse<Promotion>>;
|
|
1006
|
+
updatePromotion(promotionId: string, promotionData: CreatePromotion, jwt: string): Promise<void>;
|
|
1007
|
+
deletePromotion(promotionId: string, jwt: string): Promise<void>;
|
|
980
1008
|
}
|
|
981
1009
|
|
|
982
1010
|
declare class MembershipService {
|
|
@@ -992,6 +1020,10 @@ declare class MembershipService {
|
|
|
992
1020
|
getClientMemberships(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<ClientMembershipItem[]>>;
|
|
993
1021
|
getClientMembershipByID(membershipId: string, jwt: string): Promise<DataResponse<ClientMembershipDetail>>;
|
|
994
1022
|
updateClientMembership(membershipId: string, data: UpdateClientMembershipRequest, jwt: string): Promise<void>;
|
|
1023
|
+
createCancelReason(data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1024
|
+
getCancelReasons(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<CancellationReason[]>>;
|
|
1025
|
+
updateCancelReason(reasonId: string, data: CreateCancellationReason, jwt: string): Promise<void>;
|
|
1026
|
+
deleteCancelReason(reasonId: string, jwt: string): Promise<void>;
|
|
995
1027
|
}
|
|
996
1028
|
|
|
997
1029
|
declare class PublicService {
|
|
@@ -1128,4 +1160,4 @@ declare class VitalFit {
|
|
|
1128
1160
|
version(): string;
|
|
1129
1161
|
}
|
|
1130
1162
|
|
|
1131
|
-
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BookClassRequest, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchScheduleResponse, type BranchServicePrice, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateClassPayload, type CreateEquipment, type CreateInvoiceItem, type CreateInvoicePayload, type CreateInvoiceResponse, type CreateMembershipType, type CreatePackagePayload, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type GetUserResponse, type GlobalStat, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, 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 PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type TopBranch, 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, VitalFit, type ZelleConfig, isAPIError, mainCurrencies };
|
|
1163
|
+
export { APIError, type AddPaymentToInvoicePayload, type AddPaymentToInvoiceResponse, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BookClassRequest, type BranchClassInfo, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchScheduleResponse, type BranchServicePrice, type BranchStatusCount, type CancellationReason, type ChartData, type CheckIn, type CheckInResponse, type ClientBookingResponse, type ClientInvoice, type ClientMembership, type ClientMembershipDetail, type ClientMembershipItem, type ClientMembershipUser, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateCancellationReason, type CreateClassPayload, type CreateEquipment, 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 GetUserResponse, type GlobalStat, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoiceList, type InvoicePaymentDetail, 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 Promotion, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type QrToken, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type TopBranch, 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, VitalFit, type ZelleConfig, isAPIError, mainCurrencies };
|
package/dist/index.js
CHANGED
|
@@ -235,6 +235,8 @@ var UserService = class {
|
|
|
235
235
|
this.updateUserClient = this.updateUserClient.bind(this);
|
|
236
236
|
this.updateUserStaff = this.updateUserStaff.bind(this);
|
|
237
237
|
this.deleteUser = this.deleteUser.bind(this);
|
|
238
|
+
this.resendActivateOtp = this.resendActivateOtp.bind(this);
|
|
239
|
+
this.UpgradePassword = this.UpgradePassword.bind(this);
|
|
238
240
|
}
|
|
239
241
|
async getStaffUsers({ search, role }, jwt) {
|
|
240
242
|
const response = await this.client.get({
|
|
@@ -313,6 +315,25 @@ var UserService = class {
|
|
|
313
315
|
});
|
|
314
316
|
return response;
|
|
315
317
|
}
|
|
318
|
+
async resendActivateOtp(email) {
|
|
319
|
+
await this.client.post({
|
|
320
|
+
url: `/auth/resend-activation`,
|
|
321
|
+
data: {
|
|
322
|
+
email
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
async UpgradePassword(jwt, currentPassword, newPassword, confirmPassword) {
|
|
327
|
+
await this.client.post({
|
|
328
|
+
url: `/user/change-password`,
|
|
329
|
+
jwt,
|
|
330
|
+
data: {
|
|
331
|
+
current_password: currentPassword,
|
|
332
|
+
new_password: newPassword,
|
|
333
|
+
confirm_password: confirmPassword
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
316
337
|
};
|
|
317
338
|
|
|
318
339
|
// src/services/branch.ts
|
|
@@ -660,6 +681,11 @@ var MarketingService = class {
|
|
|
660
681
|
this.getBannerByID = this.getBannerByID.bind(this);
|
|
661
682
|
this.updateBanner = this.updateBanner.bind(this);
|
|
662
683
|
this.deleteBanner = this.deleteBanner.bind(this);
|
|
684
|
+
this.createPromotion = this.createPromotion.bind(this);
|
|
685
|
+
this.getPromotion = this.getPromotion.bind(this);
|
|
686
|
+
this.getPromotionByID = this.getPromotionByID.bind(this);
|
|
687
|
+
this.updatePromotion = this.updatePromotion.bind(this);
|
|
688
|
+
this.deletePromotion = this.deletePromotion.bind(this);
|
|
663
689
|
}
|
|
664
690
|
async createBanners(BannerData, jwt) {
|
|
665
691
|
await this.client.post({
|
|
@@ -695,6 +721,46 @@ var MarketingService = class {
|
|
|
695
721
|
jwt
|
|
696
722
|
});
|
|
697
723
|
}
|
|
724
|
+
async createPromotion(promotionData, jwt) {
|
|
725
|
+
await this.client.post({
|
|
726
|
+
url: "/marketing/promotions",
|
|
727
|
+
jwt,
|
|
728
|
+
data: promotionData
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
async getPromotion(jwt, { page = 10, limit = 10, sort = "desc", search }) {
|
|
732
|
+
const response = await this.client.get({
|
|
733
|
+
url: "/marketing/promotions",
|
|
734
|
+
jwt,
|
|
735
|
+
params: {
|
|
736
|
+
page,
|
|
737
|
+
limit,
|
|
738
|
+
sort,
|
|
739
|
+
search
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
return response;
|
|
743
|
+
}
|
|
744
|
+
async getPromotionByID(promotionId, jwt) {
|
|
745
|
+
const response = await this.client.get({
|
|
746
|
+
url: `/marketing/promotions/${promotionId}`,
|
|
747
|
+
jwt
|
|
748
|
+
});
|
|
749
|
+
return response;
|
|
750
|
+
}
|
|
751
|
+
async updatePromotion(promotionId, promotionData, jwt) {
|
|
752
|
+
await this.client.put({
|
|
753
|
+
url: `/marketing/promotions/${promotionId}`,
|
|
754
|
+
jwt,
|
|
755
|
+
data: promotionData
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
async deletePromotion(promotionId, jwt) {
|
|
759
|
+
await this.client.delete({
|
|
760
|
+
url: `/marketing/promotions/${promotionId}`,
|
|
761
|
+
jwt
|
|
762
|
+
});
|
|
763
|
+
}
|
|
698
764
|
};
|
|
699
765
|
|
|
700
766
|
// src/services/memberships.ts
|
|
@@ -712,6 +778,10 @@ var MembershipService = class {
|
|
|
712
778
|
this.getClientMemberships = this.getClientMemberships.bind(this);
|
|
713
779
|
this.getClientMembershipByID = this.getClientMembershipByID.bind(this);
|
|
714
780
|
this.updateClientMembership = this.updateClientMembership.bind(this);
|
|
781
|
+
this.createCancelReason = this.createCancelReason.bind(this);
|
|
782
|
+
this.getCancelReasons = this.getCancelReasons.bind(this);
|
|
783
|
+
this.updateCancelReason = this.updateCancelReason.bind(this);
|
|
784
|
+
this.deleteCancelReason = this.deleteCancelReason.bind(this);
|
|
715
785
|
}
|
|
716
786
|
async createMembershipType(data, jwt) {
|
|
717
787
|
await this.client.post({
|
|
@@ -801,6 +871,39 @@ var MembershipService = class {
|
|
|
801
871
|
data
|
|
802
872
|
});
|
|
803
873
|
}
|
|
874
|
+
async createCancelReason(data, jwt) {
|
|
875
|
+
await this.client.post({
|
|
876
|
+
url: "/memberships/cancellation-reasons",
|
|
877
|
+
jwt,
|
|
878
|
+
data
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
async getCancelReasons(jwt, { page = 10, limit = 10, sort = "desc", search }) {
|
|
882
|
+
const response = await this.client.get({
|
|
883
|
+
url: "/memberships/cancellation-reasons",
|
|
884
|
+
jwt,
|
|
885
|
+
params: {
|
|
886
|
+
page,
|
|
887
|
+
limit,
|
|
888
|
+
sort,
|
|
889
|
+
search
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
return response;
|
|
893
|
+
}
|
|
894
|
+
async updateCancelReason(reasonId, data, jwt) {
|
|
895
|
+
await this.client.put({
|
|
896
|
+
url: `/memberships/cancellation-reasons/${reasonId}`,
|
|
897
|
+
jwt,
|
|
898
|
+
data
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
async deleteCancelReason(reasonId, jwt) {
|
|
902
|
+
await this.client.delete({
|
|
903
|
+
url: `/memberships/cancellation-reasons/${reasonId}`,
|
|
904
|
+
jwt
|
|
905
|
+
});
|
|
906
|
+
}
|
|
804
907
|
};
|
|
805
908
|
|
|
806
909
|
// src/services/public.ts
|
|
@@ -1594,7 +1697,7 @@ var VitalFit = class _VitalFit {
|
|
|
1594
1697
|
return _VitalFit.instance;
|
|
1595
1698
|
}
|
|
1596
1699
|
version() {
|
|
1597
|
-
return "0.1.
|
|
1700
|
+
return "0.1.4";
|
|
1598
1701
|
}
|
|
1599
1702
|
};
|
|
1600
1703
|
export {
|