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