@vitalfit/sdk 0.0.68 → 0.0.70

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.d.cts CHANGED
@@ -521,6 +521,20 @@ type ServicesSummary = {
521
521
  actives: number;
522
522
  featured: number;
523
523
  };
524
+ type ServicePublicItem = ServiceFullDetail & {
525
+ lowest_price_member: number;
526
+ lowest_price_no_member: number;
527
+ base_currency: string;
528
+ ref_lowest_price_member: string;
529
+ ref_lowest_price_no_member: string;
530
+ ref_base_currency: string;
531
+ };
532
+ type PublicPaginationService = PaginationRequest & {
533
+ currency: string;
534
+ category: string;
535
+ price: number;
536
+ sortby: string;
537
+ };
524
538
 
525
539
  type EquipmentCategory = 'Cardio' | 'Strength' | 'FreeWeight' | 'Functional' | 'Accessory';
526
540
  type Equipment = {
@@ -649,6 +663,14 @@ type UpdatePackagePayload = {
649
663
  price: number;
650
664
  startAt: string;
651
665
  };
666
+ type PackagePublicItem = Omit<PackageListItem, 'createdAt' | 'updatedAt'> & {
667
+ base_currency: string;
668
+ ref_price: string;
669
+ ref_currency: string;
670
+ };
671
+ type PublicPaginatedPackage = PaginationRequest & {
672
+ currency: string;
673
+ };
652
674
 
653
675
  declare const mainCurrencies: {
654
676
  code: string;
@@ -682,6 +704,85 @@ type BookClassRequest = {
682
704
  user_id: string;
683
705
  };
684
706
 
707
+ type CreateInvoiceItem = {
708
+ item_id: string;
709
+ item_type: 'membership' | 'service' | 'package' | string;
710
+ quantity: number;
711
+ };
712
+ type CreateInvoicePayload = {
713
+ branch_id: string;
714
+ items: CreateInvoiceItem[];
715
+ user_id: string | null;
716
+ };
717
+ type CreateInvoiceResponse = {
718
+ invoice_id: string;
719
+ message: string;
720
+ };
721
+ type AddPaymentToInvoicePayload = {
722
+ amount_paid: number;
723
+ currency_paid: string;
724
+ invoice_id: string;
725
+ payment_method_id: string;
726
+ receipt_url: string;
727
+ transaction_id: string;
728
+ };
729
+ type AddPaymentToInvoiceResponse = {
730
+ message: string;
731
+ payment_id: string;
732
+ };
733
+ type InvoiceItemDetail = {
734
+ invoice_item_id: string;
735
+ quantity: number;
736
+ unit_price: string;
737
+ discount_applied: string;
738
+ tax_rate: string;
739
+ tax_amount: string;
740
+ subtotal: string;
741
+ total_line: string;
742
+ membership_type_id?: string;
743
+ service_id?: string;
744
+ package_id?: string;
745
+ };
746
+ type InvoicePaymentDetail = {
747
+ payment_id: string;
748
+ payment_date: string;
749
+ amount_paid: string;
750
+ currency_paid: string;
751
+ amount_base: string;
752
+ exchange_rate: string;
753
+ payment_method_id: string;
754
+ transaction_id: string;
755
+ status: string;
756
+ receipt_url: string;
757
+ };
758
+ type InvoiceDetail = {
759
+ invoice_id: string;
760
+ user_id: string;
761
+ branch_id: string;
762
+ invoice_number: string;
763
+ issue_date: string;
764
+ due_date: string;
765
+ sub_total: string;
766
+ tax: string;
767
+ total_amount: string;
768
+ status: string;
769
+ created_at: string;
770
+ invoice_items: InvoiceItemDetail[];
771
+ payments: InvoicePaymentDetail[];
772
+ };
773
+ type PaymentDetail = {
774
+ payment_id: string;
775
+ payment_date: string;
776
+ amount_paid: string;
777
+ currency_paid: string;
778
+ amount_base: string;
779
+ exchange_rate: string;
780
+ payment_method_id: string;
781
+ transaction_id: string;
782
+ status: string;
783
+ receipt_url: string;
784
+ };
785
+
685
786
  declare class AuthService {
686
787
  private client;
687
788
  constructor(client: Client);
@@ -707,6 +808,8 @@ declare class UserService {
707
808
  GetUserByID(userId: string, jwt: string): Promise<DataResponse<GetUserResponse>>;
708
809
  updateUserClient(userId: string, data: UpdateUserRequest, jwt: string): Promise<void>;
709
810
  updateUserStaff(userId: string, data: UpdateUserStaffRequest, jwt: string): Promise<void>;
811
+ deleteUser(userId: string, jwt: string): Promise<void>;
812
+ getUserByEmail(email: string, jwt: string): Promise<DataResponse<User>>;
710
813
  }
711
814
 
712
815
  declare class BranchService {
@@ -790,6 +893,9 @@ declare class PublicService {
790
893
  private client;
791
894
  constructor(client: Client);
792
895
  getBranchMap(jwt: string): Promise<DataResponse<BranchInfo[]>>;
896
+ getServices({ page, limit, currency, category, price, sortby, search, sort, }: PublicPaginationService): Promise<PaginatedTotal<ServicePublicItem[]>>;
897
+ getPackages({ page, limit, currency, }: PublicPaginatedPackage): Promise<PaginatedTotal<PackagePublicItem[]>>;
898
+ getBranchServices({ page, limit, currency, category, price, sortby, search, sort, }: PublicPaginationService, branchId: string): Promise<PaginatedTotal<ServicePublicItem[]>>;
793
899
  }
794
900
 
795
901
  declare class ProductsService {
@@ -847,6 +953,11 @@ declare class PackagesService {
847
953
  declare class BillingService {
848
954
  private client;
849
955
  constructor(client: Client);
956
+ createInvoice(data: CreateInvoicePayload, jwt: string): Promise<CreateInvoiceResponse>;
957
+ getInvoiceByID(invoiceId: string, jwt: string): Promise<DataResponse<InvoiceDetail>>;
958
+ AddPaymentToInvoice(data: AddPaymentToInvoicePayload, jwt: string): Promise<AddPaymentToInvoiceResponse>;
959
+ getPaymentByID(paymentId: string, jwt: string): Promise<DataResponse<PaymentDetail>>;
960
+ updatePaymentStatus(paymentId: string, status: string, jwt: string): Promise<void>;
850
961
  }
851
962
 
852
963
  declare class APIError extends Error {
@@ -878,4 +989,4 @@ declare class VitalFit {
878
989
  version(): string;
879
990
  }
880
991
 
881
- export { APIError, 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 ClientBookingResponse, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateClassPayload, type CreateEquipment, 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 Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PagoMovilConfig, type PaymentConfiguration, type PaymentMethod, type PaymentMethodTypes, type Permission, type PublicMembershipResponse, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicesSummary, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, 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 };
992
+ 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 ClientBookingResponse, 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 Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoicePaymentDetail, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, 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 PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, 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
@@ -521,6 +521,20 @@ type ServicesSummary = {
521
521
  actives: number;
522
522
  featured: number;
523
523
  };
524
+ type ServicePublicItem = ServiceFullDetail & {
525
+ lowest_price_member: number;
526
+ lowest_price_no_member: number;
527
+ base_currency: string;
528
+ ref_lowest_price_member: string;
529
+ ref_lowest_price_no_member: string;
530
+ ref_base_currency: string;
531
+ };
532
+ type PublicPaginationService = PaginationRequest & {
533
+ currency: string;
534
+ category: string;
535
+ price: number;
536
+ sortby: string;
537
+ };
524
538
 
525
539
  type EquipmentCategory = 'Cardio' | 'Strength' | 'FreeWeight' | 'Functional' | 'Accessory';
526
540
  type Equipment = {
@@ -649,6 +663,14 @@ type UpdatePackagePayload = {
649
663
  price: number;
650
664
  startAt: string;
651
665
  };
666
+ type PackagePublicItem = Omit<PackageListItem, 'createdAt' | 'updatedAt'> & {
667
+ base_currency: string;
668
+ ref_price: string;
669
+ ref_currency: string;
670
+ };
671
+ type PublicPaginatedPackage = PaginationRequest & {
672
+ currency: string;
673
+ };
652
674
 
653
675
  declare const mainCurrencies: {
654
676
  code: string;
@@ -682,6 +704,85 @@ type BookClassRequest = {
682
704
  user_id: string;
683
705
  };
684
706
 
707
+ type CreateInvoiceItem = {
708
+ item_id: string;
709
+ item_type: 'membership' | 'service' | 'package' | string;
710
+ quantity: number;
711
+ };
712
+ type CreateInvoicePayload = {
713
+ branch_id: string;
714
+ items: CreateInvoiceItem[];
715
+ user_id: string | null;
716
+ };
717
+ type CreateInvoiceResponse = {
718
+ invoice_id: string;
719
+ message: string;
720
+ };
721
+ type AddPaymentToInvoicePayload = {
722
+ amount_paid: number;
723
+ currency_paid: string;
724
+ invoice_id: string;
725
+ payment_method_id: string;
726
+ receipt_url: string;
727
+ transaction_id: string;
728
+ };
729
+ type AddPaymentToInvoiceResponse = {
730
+ message: string;
731
+ payment_id: string;
732
+ };
733
+ type InvoiceItemDetail = {
734
+ invoice_item_id: string;
735
+ quantity: number;
736
+ unit_price: string;
737
+ discount_applied: string;
738
+ tax_rate: string;
739
+ tax_amount: string;
740
+ subtotal: string;
741
+ total_line: string;
742
+ membership_type_id?: string;
743
+ service_id?: string;
744
+ package_id?: string;
745
+ };
746
+ type InvoicePaymentDetail = {
747
+ payment_id: string;
748
+ payment_date: string;
749
+ amount_paid: string;
750
+ currency_paid: string;
751
+ amount_base: string;
752
+ exchange_rate: string;
753
+ payment_method_id: string;
754
+ transaction_id: string;
755
+ status: string;
756
+ receipt_url: string;
757
+ };
758
+ type InvoiceDetail = {
759
+ invoice_id: string;
760
+ user_id: string;
761
+ branch_id: string;
762
+ invoice_number: string;
763
+ issue_date: string;
764
+ due_date: string;
765
+ sub_total: string;
766
+ tax: string;
767
+ total_amount: string;
768
+ status: string;
769
+ created_at: string;
770
+ invoice_items: InvoiceItemDetail[];
771
+ payments: InvoicePaymentDetail[];
772
+ };
773
+ type PaymentDetail = {
774
+ payment_id: string;
775
+ payment_date: string;
776
+ amount_paid: string;
777
+ currency_paid: string;
778
+ amount_base: string;
779
+ exchange_rate: string;
780
+ payment_method_id: string;
781
+ transaction_id: string;
782
+ status: string;
783
+ receipt_url: string;
784
+ };
785
+
685
786
  declare class AuthService {
686
787
  private client;
687
788
  constructor(client: Client);
@@ -707,6 +808,8 @@ declare class UserService {
707
808
  GetUserByID(userId: string, jwt: string): Promise<DataResponse<GetUserResponse>>;
708
809
  updateUserClient(userId: string, data: UpdateUserRequest, jwt: string): Promise<void>;
709
810
  updateUserStaff(userId: string, data: UpdateUserStaffRequest, jwt: string): Promise<void>;
811
+ deleteUser(userId: string, jwt: string): Promise<void>;
812
+ getUserByEmail(email: string, jwt: string): Promise<DataResponse<User>>;
710
813
  }
711
814
 
712
815
  declare class BranchService {
@@ -790,6 +893,9 @@ declare class PublicService {
790
893
  private client;
791
894
  constructor(client: Client);
792
895
  getBranchMap(jwt: string): Promise<DataResponse<BranchInfo[]>>;
896
+ getServices({ page, limit, currency, category, price, sortby, search, sort, }: PublicPaginationService): Promise<PaginatedTotal<ServicePublicItem[]>>;
897
+ getPackages({ page, limit, currency, }: PublicPaginatedPackage): Promise<PaginatedTotal<PackagePublicItem[]>>;
898
+ getBranchServices({ page, limit, currency, category, price, sortby, search, sort, }: PublicPaginationService, branchId: string): Promise<PaginatedTotal<ServicePublicItem[]>>;
793
899
  }
794
900
 
795
901
  declare class ProductsService {
@@ -847,6 +953,11 @@ declare class PackagesService {
847
953
  declare class BillingService {
848
954
  private client;
849
955
  constructor(client: Client);
956
+ createInvoice(data: CreateInvoicePayload, jwt: string): Promise<CreateInvoiceResponse>;
957
+ getInvoiceByID(invoiceId: string, jwt: string): Promise<DataResponse<InvoiceDetail>>;
958
+ AddPaymentToInvoice(data: AddPaymentToInvoicePayload, jwt: string): Promise<AddPaymentToInvoiceResponse>;
959
+ getPaymentByID(paymentId: string, jwt: string): Promise<DataResponse<PaymentDetail>>;
960
+ updatePaymentStatus(paymentId: string, status: string, jwt: string): Promise<void>;
850
961
  }
851
962
 
852
963
  declare class APIError extends Error {
@@ -878,4 +989,4 @@ declare class VitalFit {
878
989
  version(): string;
879
990
  }
880
991
 
881
- export { APIError, 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 ClientBookingResponse, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateClassPayload, type CreateEquipment, 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 Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, type OperatingHour, type PackageDetail, type PackageItemDetail, type PackageItemInput, type PackageListItem, type PaginatedBranch, type PaginatedEquipmentRequest, type PaginatedInstructor, type PaginatedServiceRequest, type PaginatedTotal, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PagoMovilConfig, type PaymentConfiguration, type PaymentMethod, type PaymentMethodTypes, type Permission, type PublicMembershipResponse, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicesSummary, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, 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 };
992
+ 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 ClientBookingResponse, 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 Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type InvoiceDetail, type InvoiceItemDetail, type InvoicePaymentDetail, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, 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 PagoMovilConfig, type PaymentConfiguration, type PaymentDetail, type PaymentMethod, type PaymentMethodTypes, type Permission, type PublicMembershipResponse, type PublicPaginatedPackage, type PublicPaginationService, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type ServicePublicItem, type ServicesSummary, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateClassPayload, 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
@@ -219,9 +219,11 @@ var UserService = class {
219
219
  this.getBranchAdmins = this.getBranchAdmins.bind(this);
220
220
  this.getClientUsers = this.getClientUsers.bind(this);
221
221
  this.getStaffUsers = this.getStaffUsers.bind(this);
222
+ this.getUserByEmail = this.getUserByEmail.bind(this);
222
223
  this.GetUserByID = this.GetUserByID.bind(this);
223
224
  this.updateUserClient = this.updateUserClient.bind(this);
224
225
  this.updateUserStaff = this.updateUserStaff.bind(this);
226
+ this.deleteUser = this.deleteUser.bind(this);
225
227
  }
226
228
  async getStaffUsers({ search, role }, jwt) {
227
229
  const response = await this.client.get({
@@ -277,6 +279,22 @@ var UserService = class {
277
279
  data
278
280
  });
279
281
  }
282
+ async deleteUser(userId, jwt) {
283
+ await this.client.delete({
284
+ url: `/user/${userId}`,
285
+ jwt
286
+ });
287
+ }
288
+ async getUserByEmail(email, jwt) {
289
+ const response = await this.client.post({
290
+ url: `/user/by-email`,
291
+ jwt,
292
+ data: {
293
+ email
294
+ }
295
+ });
296
+ return response;
297
+ }
280
298
  };
281
299
 
282
300
  // src/services/branch.ts
@@ -743,6 +761,9 @@ var PublicService = class {
743
761
  constructor(client) {
744
762
  this.client = client;
745
763
  this.getBranchMap = this.getBranchMap.bind(this);
764
+ this.getServices = this.getServices.bind(this);
765
+ this.getPackages = this.getPackages.bind(this);
766
+ this.getBranchServices = this.getBranchServices.bind(this);
746
767
  }
747
768
  async getBranchMap(jwt) {
748
769
  const response = await this.client.get({
@@ -751,6 +772,71 @@ var PublicService = class {
751
772
  });
752
773
  return response;
753
774
  }
775
+ async getServices({
776
+ page = 1,
777
+ limit = 10,
778
+ currency,
779
+ category,
780
+ price,
781
+ sortby,
782
+ search,
783
+ sort = "desc"
784
+ }) {
785
+ const response = await this.client.get({
786
+ url: "/public/services",
787
+ params: {
788
+ page,
789
+ limit,
790
+ currency,
791
+ category,
792
+ price,
793
+ sortby,
794
+ search,
795
+ sort
796
+ }
797
+ });
798
+ return response;
799
+ }
800
+ async getPackages({
801
+ page = 1,
802
+ limit = 10,
803
+ currency
804
+ }) {
805
+ const response = await this.client.get({
806
+ url: "/public/packages",
807
+ params: {
808
+ page,
809
+ limit,
810
+ currency
811
+ }
812
+ });
813
+ return response;
814
+ }
815
+ async getBranchServices({
816
+ page = 1,
817
+ limit = 10,
818
+ currency,
819
+ category,
820
+ price,
821
+ sortby,
822
+ search,
823
+ sort = "desc"
824
+ }, branchId) {
825
+ const response = await this.client.get({
826
+ url: `/public/branches/${branchId}/services`,
827
+ params: {
828
+ page,
829
+ limit,
830
+ currency,
831
+ category,
832
+ price,
833
+ sortby,
834
+ search,
835
+ sort
836
+ }
837
+ });
838
+ return response;
839
+ }
754
840
  };
755
841
 
756
842
  // src/services/products.ts
@@ -1074,6 +1160,50 @@ var BillingService = class {
1074
1160
  client;
1075
1161
  constructor(client) {
1076
1162
  this.client = client;
1163
+ this.createInvoice = this.createInvoice.bind(this);
1164
+ this.AddPaymentToInvoice = this.AddPaymentToInvoice.bind(this);
1165
+ this.getInvoiceByID = this.getInvoiceByID.bind(this);
1166
+ this.getPaymentByID = this.getPaymentByID.bind(this);
1167
+ this.updatePaymentStatus = this.updatePaymentStatus.bind(this);
1168
+ }
1169
+ async createInvoice(data, jwt) {
1170
+ const response = await this.client.post({
1171
+ url: "/billing/invoices",
1172
+ jwt,
1173
+ data
1174
+ });
1175
+ return response;
1176
+ }
1177
+ async getInvoiceByID(invoiceId, jwt) {
1178
+ const response = await this.client.get({
1179
+ url: `/billing/invoices/${invoiceId}`,
1180
+ jwt
1181
+ });
1182
+ return response;
1183
+ }
1184
+ async AddPaymentToInvoice(data, jwt) {
1185
+ const response = await this.client.post({
1186
+ url: "/billing/invoices/payment",
1187
+ jwt,
1188
+ data
1189
+ });
1190
+ return response;
1191
+ }
1192
+ async getPaymentByID(paymentId, jwt) {
1193
+ const response = await this.client.get({
1194
+ url: `/billing/payments/${paymentId}`,
1195
+ jwt
1196
+ });
1197
+ return response;
1198
+ }
1199
+ async updatePaymentStatus(paymentId, status, jwt) {
1200
+ await this.client.patch({
1201
+ url: `/billing/payments/${paymentId}/status`,
1202
+ jwt,
1203
+ data: {
1204
+ status
1205
+ }
1206
+ });
1077
1207
  }
1078
1208
  };
1079
1209
 
@@ -1219,7 +1349,7 @@ var VitalFit = class _VitalFit {
1219
1349
  return _VitalFit.instance;
1220
1350
  }
1221
1351
  version() {
1222
- return "0.0.68";
1352
+ return "0.0.70";
1223
1353
  }
1224
1354
  };
1225
1355
  export {