@vitalfit/sdk 0.1.3 → 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 +83 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +83 -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
|
};
|
|
@@ -979,6 +1000,11 @@ declare class MarketingService {
|
|
|
979
1000
|
getBannerByID(BannerId: string, jwt: string): Promise<DataResponse<Banner>>;
|
|
980
1001
|
updateBanner(BannerId: string, BannerData: UpdateBanner, jwt: string): Promise<void>;
|
|
981
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>;
|
|
982
1008
|
}
|
|
983
1009
|
|
|
984
1010
|
declare class MembershipService {
|
|
@@ -994,6 +1020,10 @@ declare class MembershipService {
|
|
|
994
1020
|
getClientMemberships(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<ClientMembershipItem[]>>;
|
|
995
1021
|
getClientMembershipByID(membershipId: string, jwt: string): Promise<DataResponse<ClientMembershipDetail>>;
|
|
996
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>;
|
|
997
1027
|
}
|
|
998
1028
|
|
|
999
1029
|
declare class PublicService {
|
|
@@ -1130,4 +1160,4 @@ declare class VitalFit {
|
|
|
1130
1160
|
version(): string;
|
|
1131
1161
|
}
|
|
1132
1162
|
|
|
1133
|
-
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
|
};
|
|
@@ -979,6 +1000,11 @@ declare class MarketingService {
|
|
|
979
1000
|
getBannerByID(BannerId: string, jwt: string): Promise<DataResponse<Banner>>;
|
|
980
1001
|
updateBanner(BannerId: string, BannerData: UpdateBanner, jwt: string): Promise<void>;
|
|
981
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>;
|
|
982
1008
|
}
|
|
983
1009
|
|
|
984
1010
|
declare class MembershipService {
|
|
@@ -994,6 +1020,10 @@ declare class MembershipService {
|
|
|
994
1020
|
getClientMemberships(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<ClientMembershipItem[]>>;
|
|
995
1021
|
getClientMembershipByID(membershipId: string, jwt: string): Promise<DataResponse<ClientMembershipDetail>>;
|
|
996
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>;
|
|
997
1027
|
}
|
|
998
1028
|
|
|
999
1029
|
declare class PublicService {
|
|
@@ -1130,4 +1160,4 @@ declare class VitalFit {
|
|
|
1130
1160
|
version(): string;
|
|
1131
1161
|
}
|
|
1132
1162
|
|
|
1133
|
-
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
|
@@ -681,6 +681,11 @@ var MarketingService = class {
|
|
|
681
681
|
this.getBannerByID = this.getBannerByID.bind(this);
|
|
682
682
|
this.updateBanner = this.updateBanner.bind(this);
|
|
683
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);
|
|
684
689
|
}
|
|
685
690
|
async createBanners(BannerData, jwt) {
|
|
686
691
|
await this.client.post({
|
|
@@ -716,6 +721,46 @@ var MarketingService = class {
|
|
|
716
721
|
jwt
|
|
717
722
|
});
|
|
718
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
|
+
}
|
|
719
764
|
};
|
|
720
765
|
|
|
721
766
|
// src/services/memberships.ts
|
|
@@ -733,6 +778,10 @@ var MembershipService = class {
|
|
|
733
778
|
this.getClientMemberships = this.getClientMemberships.bind(this);
|
|
734
779
|
this.getClientMembershipByID = this.getClientMembershipByID.bind(this);
|
|
735
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);
|
|
736
785
|
}
|
|
737
786
|
async createMembershipType(data, jwt) {
|
|
738
787
|
await this.client.post({
|
|
@@ -822,6 +871,39 @@ var MembershipService = class {
|
|
|
822
871
|
data
|
|
823
872
|
});
|
|
824
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
|
+
}
|
|
825
907
|
};
|
|
826
908
|
|
|
827
909
|
// src/services/public.ts
|
|
@@ -1615,7 +1697,7 @@ var VitalFit = class _VitalFit {
|
|
|
1615
1697
|
return _VitalFit.instance;
|
|
1616
1698
|
}
|
|
1617
1699
|
version() {
|
|
1618
|
-
return "0.1.
|
|
1700
|
+
return "0.1.4";
|
|
1619
1701
|
}
|
|
1620
1702
|
};
|
|
1621
1703
|
export {
|