@vitalfit/sdk 0.0.45 → 0.0.46
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/LICENSE +21 -21
- package/README.md +25 -25
- package/dist/index.cjs +70 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -6
- package/dist/index.d.ts +33 -6
- package/dist/index.js +70 -12
- package/dist/index.js.map +1 -1
- package/package.json +53 -53
package/dist/index.d.cts
CHANGED
|
@@ -30,6 +30,9 @@ type Pagination<T> = {
|
|
|
30
30
|
next: string | null;
|
|
31
31
|
previous: string | null;
|
|
32
32
|
};
|
|
33
|
+
type PaginatedTotal<T> = Pagination<T> & {
|
|
34
|
+
total: number;
|
|
35
|
+
};
|
|
33
36
|
type UUIDModel = {
|
|
34
37
|
id: string;
|
|
35
38
|
};
|
|
@@ -317,6 +320,11 @@ type BranchInstructorInfo = {
|
|
|
317
320
|
phone: string;
|
|
318
321
|
instructorID: string;
|
|
319
322
|
};
|
|
323
|
+
type InstructorsSummary = {
|
|
324
|
+
total: number;
|
|
325
|
+
actives: number;
|
|
326
|
+
blocked: number;
|
|
327
|
+
};
|
|
320
328
|
|
|
321
329
|
interface Permission {
|
|
322
330
|
created_at?: string;
|
|
@@ -376,6 +384,11 @@ type UpdateMembershipType = {
|
|
|
376
384
|
name?: string;
|
|
377
385
|
price?: number;
|
|
378
386
|
};
|
|
387
|
+
type MembershipsSummary = {
|
|
388
|
+
total: number;
|
|
389
|
+
actives: number;
|
|
390
|
+
inactives: number;
|
|
391
|
+
};
|
|
379
392
|
|
|
380
393
|
type BranchInfo = {
|
|
381
394
|
address: string;
|
|
@@ -472,6 +485,14 @@ type UpdateBranchServicePrice = {
|
|
|
472
485
|
price_for_member?: number;
|
|
473
486
|
price_for_non_member?: number;
|
|
474
487
|
};
|
|
488
|
+
type PaginatedServiceRequest = PaginationRequest & {
|
|
489
|
+
category?: string;
|
|
490
|
+
};
|
|
491
|
+
type ServicesSummary = {
|
|
492
|
+
total: number;
|
|
493
|
+
actives: number;
|
|
494
|
+
featured: number;
|
|
495
|
+
};
|
|
475
496
|
|
|
476
497
|
type EquipmentCategory = 'Cardio' | 'Strength' | 'FreeWeight' | 'Functional' | 'Accessory';
|
|
477
498
|
type Equipment = {
|
|
@@ -517,6 +538,9 @@ type BranchEquipmentInventory = {
|
|
|
517
538
|
serial_number: string;
|
|
518
539
|
status: EquipmentStatus;
|
|
519
540
|
};
|
|
541
|
+
type PaginatedEquipmentRequest = PaginationRequest & {
|
|
542
|
+
category?: EquipmentCategory;
|
|
543
|
+
};
|
|
520
544
|
|
|
521
545
|
declare class AuthService {
|
|
522
546
|
private client;
|
|
@@ -570,7 +594,8 @@ declare class PaymentMethodService {
|
|
|
570
594
|
declare class InstructorService {
|
|
571
595
|
private client;
|
|
572
596
|
constructor(client: Client);
|
|
573
|
-
getInstructors({ search, identity_doc }: PaginatedInstructor, jwt: string): Promise<
|
|
597
|
+
getInstructors({ page, limit, search, identity_doc }: PaginatedInstructor, jwt: string): Promise<PaginatedTotal<InstructorDataList[]>>;
|
|
598
|
+
getSummary(jwt: string): Promise<DataResponse<InstructorsSummary>>;
|
|
574
599
|
createInstructor(instructorData: Instructor, jwt: string): Promise<void>;
|
|
575
600
|
getInstructorById(instructorId: string, jwt: string): Promise<DataResponse<InstructorData>>;
|
|
576
601
|
updateInstructor(instructorId: string, instructorData: Instructor, jwt: string): Promise<void>;
|
|
@@ -608,8 +633,9 @@ declare class MarketingService {
|
|
|
608
633
|
declare class MembershipService {
|
|
609
634
|
private client;
|
|
610
635
|
constructor(client: Client);
|
|
611
|
-
createMembershipType(data:
|
|
612
|
-
getMembershipTypes(jwt: string): Promise<
|
|
636
|
+
createMembershipType(data: CreateMembershipType, jwt: string): Promise<void>;
|
|
637
|
+
getMembershipTypes(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<MembershipType[]>>;
|
|
638
|
+
getSummary(jwt: string): Promise<DataResponse<MembershipsSummary>>;
|
|
613
639
|
getMembershipTypeByID(membershipTypeId: string, jwt: string): Promise<DataResponse<MembershipType>>;
|
|
614
640
|
updateMembershipType(membershipTypeId: string, data: UpdateMembershipType, jwt: string): Promise<void>;
|
|
615
641
|
deleteMembershipType(membershipTypeId: string, jwt: string): Promise<void>;
|
|
@@ -625,7 +651,8 @@ declare class ProductsService {
|
|
|
625
651
|
private client;
|
|
626
652
|
constructor(client: Client);
|
|
627
653
|
createService(data: CreateService, jwt: string): Promise<void>;
|
|
628
|
-
getServices(jwt: string): Promise<
|
|
654
|
+
getServices(jwt: string, { page, limit, sort, search, category, }: PaginatedServiceRequest): Promise<PaginatedTotal<ServiceFullDetail[]>>;
|
|
655
|
+
getSummary(jwt: string): Promise<DataResponse<ServicesSummary>>;
|
|
629
656
|
getServiceByID(serviceId: string, jwt: string): Promise<DataResponse<ServiceFullDetail>>;
|
|
630
657
|
updateService(serviceId: string, data: UpdateServiceManual, jwt: string): Promise<void>;
|
|
631
658
|
deleteService(serviceId: string, jwt: string): Promise<void>;
|
|
@@ -640,7 +667,7 @@ declare class ProductsService {
|
|
|
640
667
|
declare class EquipmentService {
|
|
641
668
|
private client;
|
|
642
669
|
constructor(client: Client);
|
|
643
|
-
getEquipment(jwt: string): Promise<
|
|
670
|
+
getEquipment(jwt: string, { page, limit, sort, search, category, }: PaginatedEquipmentRequest): Promise<PaginatedTotal<Equipment[]>>;
|
|
644
671
|
getEquipmentByID(equipmentId: string, jwt: string): Promise<DataResponse<EquipmentInfo>>;
|
|
645
672
|
getBranchEquipmentByID(branchId: string, equipmentID: string, jwt: string): Promise<DataResponse<BranchEquipmentInventory>>;
|
|
646
673
|
createEquipment(data: CreateEquipment, jwt: string): Promise<void>;
|
|
@@ -678,4 +705,4 @@ declare class VitalFit {
|
|
|
678
705
|
version(): string;
|
|
679
706
|
}
|
|
680
707
|
|
|
681
|
-
export { APIError, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchServicePrice, type BranchStatusCount, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchPaymentMethod, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateEquipment, type CreateMembershipType, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type Instructor, type InstructorData, type InstructorDataList, type LoginRequest, type LoginResponse, type MembershipType, type OperatingHour, type PaginatedBranch, type PaginatedInstructor, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PagoMovilConfig, type PaymentConfiguration, type PaymentMethod, type PaymentMethodTypes, type Permission, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdateServiceImageManual, type UpdateServiceManual, type User, type UserApiResponse, UserGender, type UserPaginationOptions, VitalFit, type ZelleConfig, isAPIError };
|
|
708
|
+
export { APIError, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchServicePrice, type BranchStatusCount, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchPaymentMethod, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateEquipment, type CreateMembershipType, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, type OperatingHour, 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 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 UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdateServiceImageManual, type UpdateServiceManual, type User, type UserApiResponse, UserGender, type UserPaginationOptions, VitalFit, type ZelleConfig, isAPIError };
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ type Pagination<T> = {
|
|
|
30
30
|
next: string | null;
|
|
31
31
|
previous: string | null;
|
|
32
32
|
};
|
|
33
|
+
type PaginatedTotal<T> = Pagination<T> & {
|
|
34
|
+
total: number;
|
|
35
|
+
};
|
|
33
36
|
type UUIDModel = {
|
|
34
37
|
id: string;
|
|
35
38
|
};
|
|
@@ -317,6 +320,11 @@ type BranchInstructorInfo = {
|
|
|
317
320
|
phone: string;
|
|
318
321
|
instructorID: string;
|
|
319
322
|
};
|
|
323
|
+
type InstructorsSummary = {
|
|
324
|
+
total: number;
|
|
325
|
+
actives: number;
|
|
326
|
+
blocked: number;
|
|
327
|
+
};
|
|
320
328
|
|
|
321
329
|
interface Permission {
|
|
322
330
|
created_at?: string;
|
|
@@ -376,6 +384,11 @@ type UpdateMembershipType = {
|
|
|
376
384
|
name?: string;
|
|
377
385
|
price?: number;
|
|
378
386
|
};
|
|
387
|
+
type MembershipsSummary = {
|
|
388
|
+
total: number;
|
|
389
|
+
actives: number;
|
|
390
|
+
inactives: number;
|
|
391
|
+
};
|
|
379
392
|
|
|
380
393
|
type BranchInfo = {
|
|
381
394
|
address: string;
|
|
@@ -472,6 +485,14 @@ type UpdateBranchServicePrice = {
|
|
|
472
485
|
price_for_member?: number;
|
|
473
486
|
price_for_non_member?: number;
|
|
474
487
|
};
|
|
488
|
+
type PaginatedServiceRequest = PaginationRequest & {
|
|
489
|
+
category?: string;
|
|
490
|
+
};
|
|
491
|
+
type ServicesSummary = {
|
|
492
|
+
total: number;
|
|
493
|
+
actives: number;
|
|
494
|
+
featured: number;
|
|
495
|
+
};
|
|
475
496
|
|
|
476
497
|
type EquipmentCategory = 'Cardio' | 'Strength' | 'FreeWeight' | 'Functional' | 'Accessory';
|
|
477
498
|
type Equipment = {
|
|
@@ -517,6 +538,9 @@ type BranchEquipmentInventory = {
|
|
|
517
538
|
serial_number: string;
|
|
518
539
|
status: EquipmentStatus;
|
|
519
540
|
};
|
|
541
|
+
type PaginatedEquipmentRequest = PaginationRequest & {
|
|
542
|
+
category?: EquipmentCategory;
|
|
543
|
+
};
|
|
520
544
|
|
|
521
545
|
declare class AuthService {
|
|
522
546
|
private client;
|
|
@@ -570,7 +594,8 @@ declare class PaymentMethodService {
|
|
|
570
594
|
declare class InstructorService {
|
|
571
595
|
private client;
|
|
572
596
|
constructor(client: Client);
|
|
573
|
-
getInstructors({ search, identity_doc }: PaginatedInstructor, jwt: string): Promise<
|
|
597
|
+
getInstructors({ page, limit, search, identity_doc }: PaginatedInstructor, jwt: string): Promise<PaginatedTotal<InstructorDataList[]>>;
|
|
598
|
+
getSummary(jwt: string): Promise<DataResponse<InstructorsSummary>>;
|
|
574
599
|
createInstructor(instructorData: Instructor, jwt: string): Promise<void>;
|
|
575
600
|
getInstructorById(instructorId: string, jwt: string): Promise<DataResponse<InstructorData>>;
|
|
576
601
|
updateInstructor(instructorId: string, instructorData: Instructor, jwt: string): Promise<void>;
|
|
@@ -608,8 +633,9 @@ declare class MarketingService {
|
|
|
608
633
|
declare class MembershipService {
|
|
609
634
|
private client;
|
|
610
635
|
constructor(client: Client);
|
|
611
|
-
createMembershipType(data:
|
|
612
|
-
getMembershipTypes(jwt: string): Promise<
|
|
636
|
+
createMembershipType(data: CreateMembershipType, jwt: string): Promise<void>;
|
|
637
|
+
getMembershipTypes(jwt: string, { page, limit, sort, search }: PaginationRequest): Promise<PaginatedTotal<MembershipType[]>>;
|
|
638
|
+
getSummary(jwt: string): Promise<DataResponse<MembershipsSummary>>;
|
|
613
639
|
getMembershipTypeByID(membershipTypeId: string, jwt: string): Promise<DataResponse<MembershipType>>;
|
|
614
640
|
updateMembershipType(membershipTypeId: string, data: UpdateMembershipType, jwt: string): Promise<void>;
|
|
615
641
|
deleteMembershipType(membershipTypeId: string, jwt: string): Promise<void>;
|
|
@@ -625,7 +651,8 @@ declare class ProductsService {
|
|
|
625
651
|
private client;
|
|
626
652
|
constructor(client: Client);
|
|
627
653
|
createService(data: CreateService, jwt: string): Promise<void>;
|
|
628
|
-
getServices(jwt: string): Promise<
|
|
654
|
+
getServices(jwt: string, { page, limit, sort, search, category, }: PaginatedServiceRequest): Promise<PaginatedTotal<ServiceFullDetail[]>>;
|
|
655
|
+
getSummary(jwt: string): Promise<DataResponse<ServicesSummary>>;
|
|
629
656
|
getServiceByID(serviceId: string, jwt: string): Promise<DataResponse<ServiceFullDetail>>;
|
|
630
657
|
updateService(serviceId: string, data: UpdateServiceManual, jwt: string): Promise<void>;
|
|
631
658
|
deleteService(serviceId: string, jwt: string): Promise<void>;
|
|
@@ -640,7 +667,7 @@ declare class ProductsService {
|
|
|
640
667
|
declare class EquipmentService {
|
|
641
668
|
private client;
|
|
642
669
|
constructor(client: Client);
|
|
643
|
-
getEquipment(jwt: string): Promise<
|
|
670
|
+
getEquipment(jwt: string, { page, limit, sort, search, category, }: PaginatedEquipmentRequest): Promise<PaginatedTotal<Equipment[]>>;
|
|
644
671
|
getEquipmentByID(equipmentId: string, jwt: string): Promise<DataResponse<EquipmentInfo>>;
|
|
645
672
|
getBranchEquipmentByID(branchId: string, equipmentID: string, jwt: string): Promise<DataResponse<BranchEquipmentInventory>>;
|
|
646
673
|
createEquipment(data: CreateEquipment, jwt: string): Promise<void>;
|
|
@@ -678,4 +705,4 @@ declare class VitalFit {
|
|
|
678
705
|
version(): string;
|
|
679
706
|
}
|
|
680
707
|
|
|
681
|
-
export { APIError, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchServicePrice, type BranchStatusCount, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchPaymentMethod, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateEquipment, type CreateMembershipType, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type Instructor, type InstructorData, type InstructorDataList, type LoginRequest, type LoginResponse, type MembershipType, type OperatingHour, type PaginatedBranch, type PaginatedInstructor, type Pagination, type PaginationBranchRequest, type PaginationRequest, type PagoMovilConfig, type PaymentConfiguration, type PaymentMethod, type PaymentMethodTypes, type Permission, type Role, type RoleResponse, type ServiceCategoryInfo, type ServiceFullDetail, type ServiceImageResponse, type SignUpRequest, type Specialty, type UUIDModel, type UpdateBanner, type UpdateBranchEquipmentDetails, type UpdateBranchPaymentMethod, type UpdateBranchRequest, type UpdateBranchServicePrice, type UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdateServiceImageManual, type UpdateServiceManual, type User, type UserApiResponse, UserGender, type UserPaginationOptions, VitalFit, type ZelleConfig, isAPIError };
|
|
708
|
+
export { APIError, type BankTransferConfig, type Banner, type BannerResponse, type BaseModel, type BranchDetails, type BranchEquipmentInventory, type BranchInfo, type BranchInstructorInfo, type BranchPaymentMethod, type BranchPaymentMethodInfo, type BranchPaymentVisibility, type BranchServicePrice, type BranchStatusCount, type ClientProfile, type CreateBanner, type CreateBranchEquipment, type CreateBranchPaymentMethod, type CreateBranchRequest, type CreateBranchServicePriceItem, type CreateEquipment, type CreateMembershipType, type CreatePaymentMethod, type CreateRole, type CreateService, type CreateServiceImage, type DataResponse, type Equipment, type EquipmentCategory, type EquipmentInfo, type EquipmentStatus, type Instructor, type InstructorData, type InstructorDataList, type InstructorsSummary, type LoginRequest, type LoginResponse, type MembershipType, type MembershipsSummary, type OperatingHour, 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 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 UpdateEquipment, type UpdateMembershipType, type UpdateOperatingHour, type UpdateServiceImageManual, type UpdateServiceManual, type User, type UserApiResponse, UserGender, type UserPaginationOptions, VitalFit, type ZelleConfig, isAPIError };
|
package/dist/index.js
CHANGED
|
@@ -201,7 +201,7 @@ var AuthService = class {
|
|
|
201
201
|
url: `/auth/activate/${token}`,
|
|
202
202
|
data: {
|
|
203
203
|
password,
|
|
204
|
-
repeatPassword
|
|
204
|
+
confirm_password: repeatPassword
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
@@ -406,6 +406,7 @@ var InstructorService = class {
|
|
|
406
406
|
constructor(client) {
|
|
407
407
|
this.client = client;
|
|
408
408
|
this.getInstructors = this.getInstructors.bind(this);
|
|
409
|
+
this.getSummary = this.getSummary.bind(this);
|
|
409
410
|
this.createInstructor = this.createInstructor.bind(this);
|
|
410
411
|
this.getInstructorById = this.getInstructorById.bind(this);
|
|
411
412
|
this.updateInstructor = this.updateInstructor.bind(this);
|
|
@@ -416,17 +417,26 @@ var InstructorService = class {
|
|
|
416
417
|
this.removeBranchInstructor = this.removeBranchInstructor.bind(this);
|
|
417
418
|
this.getBranchInstructors = this.getBranchInstructors.bind(this);
|
|
418
419
|
}
|
|
419
|
-
async getInstructors({ search, identity_doc }, jwt) {
|
|
420
|
+
async getInstructors({ page = 10, limit = 10, search, identity_doc }, jwt) {
|
|
420
421
|
const response = await this.client.get({
|
|
421
422
|
url: "/instructor",
|
|
422
423
|
jwt,
|
|
423
424
|
params: {
|
|
425
|
+
page,
|
|
426
|
+
limit,
|
|
424
427
|
search,
|
|
425
428
|
identity_doc
|
|
426
429
|
}
|
|
427
430
|
});
|
|
428
431
|
return response;
|
|
429
432
|
}
|
|
433
|
+
async getSummary(jwt) {
|
|
434
|
+
const response = await this.client.get({
|
|
435
|
+
url: "/instructor/summary",
|
|
436
|
+
jwt
|
|
437
|
+
});
|
|
438
|
+
return response;
|
|
439
|
+
}
|
|
430
440
|
async createInstructor(instructorData, jwt) {
|
|
431
441
|
await this.client.post({
|
|
432
442
|
url: "/instructor",
|
|
@@ -624,41 +634,55 @@ var MembershipService = class {
|
|
|
624
634
|
this.client = client;
|
|
625
635
|
this.createMembershipType = this.createMembershipType.bind(this);
|
|
626
636
|
this.getMembershipTypes = this.getMembershipTypes.bind(this);
|
|
637
|
+
this.getSummary = this.getSummary.bind(this);
|
|
627
638
|
this.getMembershipTypeByID = this.getMembershipTypeByID.bind(this);
|
|
628
639
|
this.updateMembershipType = this.updateMembershipType.bind(this);
|
|
629
640
|
this.deleteMembershipType = this.deleteMembershipType.bind(this);
|
|
630
641
|
}
|
|
631
642
|
async createMembershipType(data, jwt) {
|
|
632
643
|
await this.client.post({
|
|
633
|
-
url: "/membership
|
|
644
|
+
url: "/membership-plans",
|
|
634
645
|
jwt,
|
|
635
646
|
data
|
|
636
647
|
});
|
|
637
648
|
}
|
|
638
|
-
async getMembershipTypes(jwt) {
|
|
649
|
+
async getMembershipTypes(jwt, { page = 10, limit = 10, sort = "desc", search }) {
|
|
650
|
+
const response = await this.client.get({
|
|
651
|
+
url: "/membership-plans",
|
|
652
|
+
jwt,
|
|
653
|
+
params: {
|
|
654
|
+
page,
|
|
655
|
+
limit,
|
|
656
|
+
sort,
|
|
657
|
+
search
|
|
658
|
+
}
|
|
659
|
+
});
|
|
660
|
+
return response;
|
|
661
|
+
}
|
|
662
|
+
async getSummary(jwt) {
|
|
639
663
|
const response = await this.client.get({
|
|
640
|
-
url: "/membership/
|
|
664
|
+
url: "/membership-plans/summary",
|
|
641
665
|
jwt
|
|
642
666
|
});
|
|
643
667
|
return response;
|
|
644
668
|
}
|
|
645
669
|
async getMembershipTypeByID(membershipTypeId, jwt) {
|
|
646
670
|
const response = await this.client.get({
|
|
647
|
-
url: `/membership
|
|
671
|
+
url: `/membership-plans/${membershipTypeId}`,
|
|
648
672
|
jwt
|
|
649
673
|
});
|
|
650
674
|
return response;
|
|
651
675
|
}
|
|
652
676
|
async updateMembershipType(membershipTypeId, data, jwt) {
|
|
653
677
|
await this.client.put({
|
|
654
|
-
url: `/membership
|
|
678
|
+
url: `/membership-plans/${membershipTypeId}`,
|
|
655
679
|
jwt,
|
|
656
680
|
data
|
|
657
681
|
});
|
|
658
682
|
}
|
|
659
683
|
async deleteMembershipType(membershipTypeId, jwt) {
|
|
660
684
|
await this.client.delete({
|
|
661
|
-
url: `/membership
|
|
685
|
+
url: `/membership-plans/${membershipTypeId}`,
|
|
662
686
|
jwt
|
|
663
687
|
});
|
|
664
688
|
}
|
|
@@ -687,6 +711,7 @@ var ProductsService = class {
|
|
|
687
711
|
this.client = client;
|
|
688
712
|
this.createService = this.createService.bind(this);
|
|
689
713
|
this.getServices = this.getServices.bind(this);
|
|
714
|
+
this.getSummary = this.getSummary.bind(this);
|
|
690
715
|
this.getServiceByID = this.getServiceByID.bind(this);
|
|
691
716
|
this.updateService = this.updateService.bind(this);
|
|
692
717
|
this.deleteService = this.deleteService.bind(this);
|
|
@@ -704,9 +729,29 @@ var ProductsService = class {
|
|
|
704
729
|
data
|
|
705
730
|
});
|
|
706
731
|
}
|
|
707
|
-
async getServices(jwt
|
|
732
|
+
async getServices(jwt, {
|
|
733
|
+
page = 10,
|
|
734
|
+
limit = 10,
|
|
735
|
+
sort = "desc",
|
|
736
|
+
search,
|
|
737
|
+
category
|
|
738
|
+
}) {
|
|
708
739
|
const response = await this.client.get({
|
|
709
740
|
url: "/services/all",
|
|
741
|
+
jwt,
|
|
742
|
+
params: {
|
|
743
|
+
page,
|
|
744
|
+
limit,
|
|
745
|
+
sort,
|
|
746
|
+
search,
|
|
747
|
+
category
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
return response;
|
|
751
|
+
}
|
|
752
|
+
async getSummary(jwt) {
|
|
753
|
+
const response = await this.client.get({
|
|
754
|
+
url: "/services/summary",
|
|
710
755
|
jwt
|
|
711
756
|
});
|
|
712
757
|
return response;
|
|
@@ -792,10 +837,23 @@ var EquipmentService = class {
|
|
|
792
837
|
this.removeBranchEquipment = this.removeBranchEquipment.bind(this);
|
|
793
838
|
this.updateBranchEquipment = this.updateBranchEquipment.bind(this);
|
|
794
839
|
}
|
|
795
|
-
async getEquipment(jwt
|
|
840
|
+
async getEquipment(jwt, {
|
|
841
|
+
page = 10,
|
|
842
|
+
limit = 10,
|
|
843
|
+
sort = "desc",
|
|
844
|
+
search,
|
|
845
|
+
category
|
|
846
|
+
}) {
|
|
796
847
|
const response = await this.client.get({
|
|
797
848
|
url: "/equipment-types",
|
|
798
|
-
jwt
|
|
849
|
+
jwt,
|
|
850
|
+
params: {
|
|
851
|
+
page,
|
|
852
|
+
limit,
|
|
853
|
+
sort,
|
|
854
|
+
search,
|
|
855
|
+
category
|
|
856
|
+
}
|
|
799
857
|
});
|
|
800
858
|
return response;
|
|
801
859
|
}
|
|
@@ -906,7 +964,7 @@ var VitalFit = class _VitalFit {
|
|
|
906
964
|
return _VitalFit.instance;
|
|
907
965
|
}
|
|
908
966
|
version() {
|
|
909
|
-
return "0.0.
|
|
967
|
+
return "0.0.46";
|
|
910
968
|
}
|
|
911
969
|
};
|
|
912
970
|
export {
|