@healthcloudai/hc-sdk 0.8.2 → 0.8.5
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 +103 -54
- package/dist/index.d.cts +171 -40
- package/dist/index.d.ts +171 -40
- package/dist/index.js +103 -54
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -314,6 +314,18 @@ var AuthClient = class extends BaseServiceClient {
|
|
|
314
314
|
auth: false
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
+
async resetPassword(request) {
|
|
318
|
+
return this.send("POST", "/auth/reset-password", {
|
|
319
|
+
body: withTenantId(request, this.getTenantId()),
|
|
320
|
+
auth: false
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
async confirmPassword(request) {
|
|
324
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
325
|
+
body: withTenantId(request, this.getTenantId()),
|
|
326
|
+
auth: false
|
|
327
|
+
});
|
|
328
|
+
}
|
|
317
329
|
};
|
|
318
330
|
|
|
319
331
|
// src/clients/DiagnosticsClient.ts
|
|
@@ -411,6 +423,12 @@ var FieldAgentClient = class extends BaseServiceClient {
|
|
|
411
423
|
auth: false
|
|
412
424
|
});
|
|
413
425
|
}
|
|
426
|
+
confirmPassword(request) {
|
|
427
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
428
|
+
body: withTenantId(request, this.getTenantId()),
|
|
429
|
+
auth: false
|
|
430
|
+
});
|
|
431
|
+
}
|
|
414
432
|
async login(request) {
|
|
415
433
|
const response = await this.send("POST", "/auth/login", {
|
|
416
434
|
body: withTenantId(request, this.getTenantId()),
|
|
@@ -505,101 +523,101 @@ var PatientClient = class extends BaseServiceClient {
|
|
|
505
523
|
connect() {
|
|
506
524
|
return this.connectService();
|
|
507
525
|
}
|
|
508
|
-
updatePhone(
|
|
526
|
+
updatePhone(fhirPatientId, request) {
|
|
509
527
|
return this.send("POST", "/patients/{id}/phone", {
|
|
510
|
-
pathParams: { id:
|
|
528
|
+
pathParams: { id: fhirPatientId },
|
|
511
529
|
body: request
|
|
512
530
|
});
|
|
513
531
|
}
|
|
514
|
-
verifySms(
|
|
532
|
+
verifySms(fhirPatientId, request) {
|
|
515
533
|
return this.send("POST", "/patients/{id}/verify-sms", {
|
|
516
|
-
pathParams: { id:
|
|
534
|
+
pathParams: { id: fhirPatientId },
|
|
517
535
|
body: request
|
|
518
536
|
});
|
|
519
537
|
}
|
|
520
|
-
updateAddress(
|
|
538
|
+
updateAddress(fhirPatientId, request) {
|
|
521
539
|
return this.send("PUT", "/patients/{id}/address", {
|
|
522
|
-
pathParams: { id:
|
|
540
|
+
pathParams: { id: fhirPatientId },
|
|
523
541
|
body: request
|
|
524
542
|
});
|
|
525
543
|
}
|
|
526
|
-
updateRace(
|
|
544
|
+
updateRace(fhirPatientId, request) {
|
|
527
545
|
return this.send("PUT", "/patients/{id}/race", {
|
|
528
|
-
pathParams: { id:
|
|
546
|
+
pathParams: { id: fhirPatientId },
|
|
529
547
|
body: request
|
|
530
548
|
});
|
|
531
549
|
}
|
|
532
|
-
getProfile(
|
|
550
|
+
getProfile(fhirPatientId) {
|
|
533
551
|
return this.send("GET", "/patients/{id}", {
|
|
534
|
-
pathParams: { id:
|
|
552
|
+
pathParams: { id: fhirPatientId }
|
|
535
553
|
});
|
|
536
554
|
}
|
|
537
|
-
getDashboard(
|
|
555
|
+
getDashboard(fhirPatientId) {
|
|
538
556
|
return this.send("GET", "/patients/{id}/dashboard", {
|
|
539
|
-
pathParams: { id:
|
|
557
|
+
pathParams: { id: fhirPatientId }
|
|
540
558
|
});
|
|
541
559
|
}
|
|
542
|
-
uploadPhoto(
|
|
560
|
+
uploadPhoto(fhirPatientId, request) {
|
|
543
561
|
return this.send("POST", "/patients/{id}/photo", {
|
|
544
|
-
pathParams: { id:
|
|
562
|
+
pathParams: { id: fhirPatientId },
|
|
545
563
|
body: request
|
|
546
564
|
});
|
|
547
565
|
}
|
|
548
|
-
getPhoto(
|
|
566
|
+
getPhoto(fhirPatientId, query) {
|
|
549
567
|
return this.send("GET", "/patients/{id}/photo", {
|
|
550
|
-
pathParams: { id:
|
|
568
|
+
pathParams: { id: fhirPatientId },
|
|
551
569
|
query
|
|
552
570
|
});
|
|
553
571
|
}
|
|
554
|
-
getPhotoUploadUrl(
|
|
572
|
+
getPhotoUploadUrl(fhirPatientId) {
|
|
555
573
|
return this.send("GET", "/patients/{id}/photo/upload-url", {
|
|
556
|
-
pathParams: { id:
|
|
574
|
+
pathParams: { id: fhirPatientId }
|
|
557
575
|
});
|
|
558
576
|
}
|
|
559
|
-
compareFaceMatch(
|
|
577
|
+
compareFaceMatch(fhirPatientId, request) {
|
|
560
578
|
return this.send("POST", "/patients/{id}/face-match", {
|
|
561
|
-
pathParams: { id:
|
|
579
|
+
pathParams: { id: fhirPatientId },
|
|
562
580
|
body: request
|
|
563
581
|
});
|
|
564
582
|
}
|
|
565
|
-
scanIdentityDocument(
|
|
583
|
+
scanIdentityDocument(fhirPatientId, request) {
|
|
566
584
|
return this.send("POST", "/patients/{id}/identity-document", {
|
|
567
|
-
pathParams: { id:
|
|
585
|
+
pathParams: { id: fhirPatientId },
|
|
568
586
|
body: request
|
|
569
587
|
});
|
|
570
588
|
}
|
|
571
|
-
updateDemographics(
|
|
589
|
+
updateDemographics(fhirPatientId, request) {
|
|
572
590
|
return this.send("PUT", "/patients/{id}/demographics", {
|
|
573
|
-
pathParams: { id:
|
|
591
|
+
pathParams: { id: fhirPatientId },
|
|
574
592
|
body: request
|
|
575
593
|
});
|
|
576
594
|
}
|
|
577
|
-
createInsurance(
|
|
595
|
+
createInsurance(fhirPatientId, request) {
|
|
578
596
|
return this.send("POST", "/patients/{id}/insurance", {
|
|
579
|
-
pathParams: { id:
|
|
597
|
+
pathParams: { id: fhirPatientId },
|
|
580
598
|
body: request
|
|
581
599
|
});
|
|
582
600
|
}
|
|
583
|
-
createMedication(
|
|
601
|
+
createMedication(fhirPatientId, request) {
|
|
584
602
|
return this.send("POST", "/patients/{id}/medications", {
|
|
585
|
-
pathParams: { id:
|
|
603
|
+
pathParams: { id: fhirPatientId },
|
|
586
604
|
body: request
|
|
587
605
|
});
|
|
588
606
|
}
|
|
589
|
-
listMedications(
|
|
607
|
+
listMedications(fhirPatientId, query) {
|
|
590
608
|
return this.send("GET", "/patients/{id}/medications", {
|
|
591
|
-
pathParams: { id:
|
|
609
|
+
pathParams: { id: fhirPatientId },
|
|
592
610
|
query
|
|
593
611
|
});
|
|
594
612
|
}
|
|
595
|
-
getMedication(
|
|
613
|
+
getMedication(fhirPatientId, medicationId) {
|
|
596
614
|
return this.send("GET", "/patients/{id}/medications/{med_id}", {
|
|
597
|
-
pathParams: { id:
|
|
615
|
+
pathParams: { id: fhirPatientId, med_id: medicationId }
|
|
598
616
|
});
|
|
599
617
|
}
|
|
600
|
-
updateMedicationStatus(
|
|
618
|
+
updateMedicationStatus(fhirPatientId, medicationId, request) {
|
|
601
619
|
return this.send("PUT", "/patients/{id}/medications/{med_id}", {
|
|
602
|
-
pathParams: { id:
|
|
620
|
+
pathParams: { id: fhirPatientId, med_id: medicationId },
|
|
603
621
|
body: request
|
|
604
622
|
});
|
|
605
623
|
}
|
|
@@ -779,23 +797,45 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
779
797
|
auth: false
|
|
780
798
|
});
|
|
781
799
|
}
|
|
800
|
+
/**
|
|
801
|
+
* Confirm password reset with code.
|
|
802
|
+
* POST /auth/confirm-reset-password (public)
|
|
803
|
+
*/
|
|
804
|
+
confirmPassword(request) {
|
|
805
|
+
return this.send("POST", "/auth/confirm-reset-password", {
|
|
806
|
+
body: request,
|
|
807
|
+
auth: false
|
|
808
|
+
});
|
|
809
|
+
}
|
|
782
810
|
// ─── Person CRUD (authenticated) ─────────────────────────────────────
|
|
811
|
+
updatePhone(fhirPersonId, request) {
|
|
812
|
+
return this.send("POST", "/persons/{person_id}/phone", {
|
|
813
|
+
pathParams: { person_id: fhirPersonId },
|
|
814
|
+
body: request
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
verifySms(fhirPersonId, request) {
|
|
818
|
+
return this.send("POST", "/persons/{person_id}/verify-sms", {
|
|
819
|
+
pathParams: { person_id: fhirPersonId },
|
|
820
|
+
body: request
|
|
821
|
+
});
|
|
822
|
+
}
|
|
783
823
|
/**
|
|
784
824
|
* Get a person by ID.
|
|
785
825
|
* GET /persons/{person_id}
|
|
786
826
|
*/
|
|
787
|
-
get(
|
|
827
|
+
get(fhirPersonId) {
|
|
788
828
|
return this.send("GET", "/persons/{person_id}", {
|
|
789
|
-
pathParams: { person_id:
|
|
829
|
+
pathParams: { person_id: fhirPersonId }
|
|
790
830
|
});
|
|
791
831
|
}
|
|
792
832
|
/**
|
|
793
833
|
* Update a person's fields.
|
|
794
834
|
* PATCH /persons/{person_id}
|
|
795
835
|
*/
|
|
796
|
-
update(
|
|
836
|
+
update(fhirPersonId, request) {
|
|
797
837
|
return this.send("PATCH", "/persons/{person_id}", {
|
|
798
|
-
pathParams: { person_id:
|
|
838
|
+
pathParams: { person_id: fhirPersonId },
|
|
799
839
|
body: request
|
|
800
840
|
});
|
|
801
841
|
}
|
|
@@ -804,18 +844,18 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
804
844
|
* Get a presigned upload URL for a person's photo.
|
|
805
845
|
* GET /persons/{person_id}/photo/upload-url
|
|
806
846
|
*/
|
|
807
|
-
getPhotoUploadUrl(
|
|
847
|
+
getPhotoUploadUrl(fhirPersonId) {
|
|
808
848
|
return this.send("GET", "/persons/{person_id}/photo/upload-url", {
|
|
809
|
-
pathParams: { person_id:
|
|
849
|
+
pathParams: { person_id: fhirPersonId }
|
|
810
850
|
});
|
|
811
851
|
}
|
|
812
852
|
/**
|
|
813
853
|
* Upload a person's photo (base64).
|
|
814
854
|
* POST /persons/{person_id}/photo
|
|
815
855
|
*/
|
|
816
|
-
uploadPhoto(
|
|
856
|
+
uploadPhoto(fhirPersonId, request) {
|
|
817
857
|
return this.send("POST", "/persons/{person_id}/photo", {
|
|
818
|
-
pathParams: { person_id:
|
|
858
|
+
pathParams: { person_id: fhirPersonId },
|
|
819
859
|
body: request
|
|
820
860
|
});
|
|
821
861
|
}
|
|
@@ -823,9 +863,9 @@ var PersonClient = class extends BaseServiceClient {
|
|
|
823
863
|
* Get a person's photo by binary_id.
|
|
824
864
|
* GET /persons/{person_id}/photo?binary_id=...
|
|
825
865
|
*/
|
|
826
|
-
getPhoto(
|
|
866
|
+
getPhoto(fhirPersonId, query) {
|
|
827
867
|
return this.send("GET", "/persons/{person_id}/photo", {
|
|
828
|
-
pathParams: { person_id:
|
|
868
|
+
pathParams: { person_id: fhirPersonId },
|
|
829
869
|
query
|
|
830
870
|
});
|
|
831
871
|
}
|
|
@@ -852,22 +892,31 @@ var ProviderClient = class extends BaseServiceClient {
|
|
|
852
892
|
resetPassword(request) {
|
|
853
893
|
return this.send("POST", "/auth/reset-password", { body: request, auth: false });
|
|
854
894
|
}
|
|
895
|
+
confirmPassword(request) {
|
|
896
|
+
return this.send("POST", "/auth/confirm-reset-password", { body: request, auth: false });
|
|
897
|
+
}
|
|
855
898
|
// ─── Practitioner CRUD ─────────────────────────────────────────────
|
|
856
|
-
|
|
857
|
-
return this.send("
|
|
899
|
+
updatePhone(fhirPractitionerId, request) {
|
|
900
|
+
return this.send("POST", "/practitioners/{practitioner_id}/phone", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
901
|
+
}
|
|
902
|
+
verifySms(fhirPractitionerId, request) {
|
|
903
|
+
return this.send("POST", "/practitioners/{practitioner_id}/verify-sms", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
904
|
+
}
|
|
905
|
+
get(fhirPractitionerId) {
|
|
906
|
+
return this.send("GET", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id: fhirPractitionerId } });
|
|
858
907
|
}
|
|
859
|
-
update(
|
|
860
|
-
return this.send("PATCH", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id:
|
|
908
|
+
update(fhirPractitionerId, request) {
|
|
909
|
+
return this.send("PATCH", "/practitioners/{practitioner_id}", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
861
910
|
}
|
|
862
911
|
// ─── Photo ─────────────────────────────────────────────────────────
|
|
863
|
-
getPhotoUploadUrl(
|
|
864
|
-
return this.send("GET", "/practitioners/{practitioner_id}/photo/upload-url", { pathParams: { practitioner_id:
|
|
912
|
+
getPhotoUploadUrl(fhirPractitionerId) {
|
|
913
|
+
return this.send("GET", "/practitioners/{practitioner_id}/photo/upload-url", { pathParams: { practitioner_id: fhirPractitionerId } });
|
|
865
914
|
}
|
|
866
|
-
uploadPhoto(
|
|
867
|
-
return this.send("POST", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id:
|
|
915
|
+
uploadPhoto(fhirPractitionerId, request) {
|
|
916
|
+
return this.send("POST", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, body: request });
|
|
868
917
|
}
|
|
869
|
-
getPhoto(
|
|
870
|
-
return this.send("GET", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id:
|
|
918
|
+
getPhoto(fhirPractitionerId, query) {
|
|
919
|
+
return this.send("GET", "/practitioners/{practitioner_id}/photo", { pathParams: { practitioner_id: fhirPractitionerId }, query });
|
|
871
920
|
}
|
|
872
921
|
};
|
|
873
922
|
|
package/package.json
CHANGED