oro-sdk 2.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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +72 -0
  3. package/dist/client.d.ts +464 -0
  4. package/dist/helpers/client.d.ts +23 -0
  5. package/dist/helpers/index.d.ts +4 -0
  6. package/dist/helpers/patient-registration.d.ts +16 -0
  7. package/dist/helpers/vault-grants.d.ts +20 -0
  8. package/dist/helpers/workflow.d.ts +23 -0
  9. package/dist/index.d.ts +11 -0
  10. package/dist/index.js +8 -0
  11. package/dist/models/client.d.ts +28 -0
  12. package/dist/models/consult.d.ts +102 -0
  13. package/dist/models/diagnosis.d.ts +122 -0
  14. package/dist/models/error.d.ts +26 -0
  15. package/dist/models/guard.d.ts +119 -0
  16. package/dist/models/index.d.ts +9 -0
  17. package/dist/models/practice.d.ts +353 -0
  18. package/dist/models/shared.d.ts +8 -0
  19. package/dist/models/vault.d.ts +124 -0
  20. package/dist/models/workflow.d.ts +106 -0
  21. package/dist/oro-sdk.cjs.development.js +7675 -0
  22. package/dist/oro-sdk.cjs.development.js.map +1 -0
  23. package/dist/oro-sdk.cjs.production.min.js +2 -0
  24. package/dist/oro-sdk.cjs.production.min.js.map +1 -0
  25. package/dist/oro-sdk.esm.js +7682 -0
  26. package/dist/oro-sdk.esm.js.map +1 -0
  27. package/dist/sdk-revision/client.d.ts +21 -0
  28. package/dist/sdk-revision/index.d.ts +1 -0
  29. package/dist/services/api.d.ts +11 -0
  30. package/dist/services/axios.d.ts +14 -0
  31. package/dist/services/consult.d.ts +54 -0
  32. package/dist/services/diagnosis.d.ts +38 -0
  33. package/dist/services/external/clinia.d.ts +82 -0
  34. package/dist/services/external/index.d.ts +1 -0
  35. package/dist/services/guard.d.ts +92 -0
  36. package/dist/services/index.d.ts +10 -0
  37. package/dist/services/practice.d.ts +100 -0
  38. package/dist/services/teller.d.ts +9 -0
  39. package/dist/services/vault.d.ts +54 -0
  40. package/dist/services/workflow.d.ts +21 -0
  41. package/package.json +63 -0
  42. package/src/client.ts +1843 -0
  43. package/src/helpers/client.ts +199 -0
  44. package/src/helpers/index.ts +4 -0
  45. package/src/helpers/patient-registration.ts +490 -0
  46. package/src/helpers/vault-grants.ts +51 -0
  47. package/src/helpers/workflow.ts +261 -0
  48. package/src/index.ts +61 -0
  49. package/src/models/client.ts +33 -0
  50. package/src/models/consult.ts +110 -0
  51. package/src/models/diagnosis.ts +141 -0
  52. package/src/models/error.ts +13 -0
  53. package/src/models/guard.ts +136 -0
  54. package/src/models/index.ts +9 -0
  55. package/src/models/practice.ts +411 -0
  56. package/src/models/shared.ts +6 -0
  57. package/src/models/vault.ts +158 -0
  58. package/src/models/workflow.ts +142 -0
  59. package/src/sdk-revision/client.ts +62 -0
  60. package/src/sdk-revision/index.ts +1 -0
  61. package/src/services/api.ts +77 -0
  62. package/src/services/axios.ts +91 -0
  63. package/src/services/consult.ts +265 -0
  64. package/src/services/diagnosis.ts +132 -0
  65. package/src/services/external/clinia.ts +133 -0
  66. package/src/services/external/index.ts +1 -0
  67. package/src/services/guard.ts +228 -0
  68. package/src/services/index.ts +10 -0
  69. package/src/services/practice.ts +537 -0
  70. package/src/services/teller.ts +39 -0
  71. package/src/services/vault.ts +178 -0
  72. package/src/services/workflow.ts +36 -0
@@ -0,0 +1,28 @@
1
+ import { PlaceData } from '../services/external/clinia';
2
+ import { Uuid } from './shared';
3
+ export interface PersonalInformations {
4
+ birthday?: string;
5
+ firstname?: string;
6
+ gender?: string;
7
+ name?: string;
8
+ phone?: string;
9
+ zip?: string;
10
+ hid?: string;
11
+ pharmacy?: PlaceData;
12
+ address?: string;
13
+ }
14
+ export interface UserPreference {
15
+ isoLanguage: string;
16
+ }
17
+ export interface RegisterPatientOutput {
18
+ masterKey?: Uuid;
19
+ consultationId: Uuid;
20
+ lockboxUuid: Uuid;
21
+ }
22
+ export interface RecoveryData {
23
+ masterKey: string;
24
+ }
25
+ export interface LocalEncryptedData {
26
+ encryptedKey: string;
27
+ encryptedData: string;
28
+ }
@@ -0,0 +1,102 @@
1
+ export declare enum AssistantType {
2
+ MedicalSecretary = "MedicalSecretary",
3
+ Nurse = "Nurse",
4
+ Specialist = "Specialist",
5
+ Administrative = "Administrative",
6
+ Other = "Other"
7
+ }
8
+ export interface ConsultAssignedAssistant {
9
+ id?: number;
10
+ uuidConsult: string;
11
+ uuidAssistant: string;
12
+ type: AssistantType;
13
+ tagSpecialty?: string;
14
+ duuidCurrentTaskDescription?: string;
15
+ }
16
+ export declare enum TransmissionKind {
17
+ Fax = "Fax",
18
+ Email = "Email",
19
+ SMS = "SMS",
20
+ EncryptedEmail = "EncryptedEmail",
21
+ Logs = "Logs",
22
+ API = "API",
23
+ Other = "Other"
24
+ }
25
+ export declare enum TransmissionStatus {
26
+ Preparing = "Preparing",
27
+ Sending = "Sending",
28
+ Sent = "Sent",
29
+ Retrying = "Retrying",
30
+ Failed = "Failed",
31
+ DriverError = "DriverError",
32
+ TimedOut = "TimedOut",
33
+ ReceiverNotExist = "ReceiverNotExist",
34
+ ReceiverNotAnswering = "ReceiverNotAnswering",
35
+ ReceiverIncompatible = "ReceiverIncompatible"
36
+ }
37
+ export interface ConsultTransmission {
38
+ id: number;
39
+ uuidConsult: string;
40
+ kind: TransmissionKind;
41
+ status: TransmissionStatus;
42
+ nameDriverReceiver: string;
43
+ addressReceiver: string;
44
+ idDriverForTransmission: string;
45
+ txtLastDriverMessage: string;
46
+ numTry: number;
47
+ numTryLeft: number;
48
+ delay: number;
49
+ tsFirstTry: string;
50
+ tsLastStatusUpdate: string;
51
+ keyWebhookSecret: string;
52
+ }
53
+ export declare enum FeeStatus {
54
+ NoFee = "NoFee",
55
+ Pending = "Pending",
56
+ Paid = "Paid",
57
+ Reimbursed = "Reimbursed",
58
+ Cancelled = "Cancelled",
59
+ Contested = "Contested"
60
+ }
61
+ export declare enum MedicalStatus {
62
+ Creating = "Creating",
63
+ New = "New",
64
+ ToAnswer = "ToAnswer",
65
+ Answered = "Answered",
66
+ Closed = "Closed",
67
+ Reopened = "Reopened",
68
+ Archived = "Archived"
69
+ }
70
+ export declare enum TaskStatus {
71
+ None = "None",
72
+ ToDo = "ToDo",
73
+ InProgress = "InProgress",
74
+ Blocked = "Blocked",
75
+ Done = "Done"
76
+ }
77
+ export interface ConsultRequest {
78
+ uuidPractice: string;
79
+ tagSpecialtyRequired: string;
80
+ idStripeInvoiceOrPaymentIntent: string;
81
+ isoLocalityRequired?: string;
82
+ isoLanguageRequired: string;
83
+ }
84
+ export interface Consult {
85
+ uuid: string;
86
+ uuidPracticeAdmin: string;
87
+ uuidPractice: string;
88
+ tagSpecialtyRequired: string;
89
+ isoLanguageRequired: string;
90
+ idPracticePayment: number;
91
+ statusFee?: FeeStatus;
92
+ isoLocalityRequired: string;
93
+ statusMedical?: MedicalStatus;
94
+ uuidAssignedDoctor: string;
95
+ uuidCurrentAssigned: string;
96
+ statusTask?: TaskStatus;
97
+ hasTransmissions?: boolean;
98
+ assignedAssistant?: ConsultAssignedAssistant[];
99
+ shortId?: string;
100
+ createdAt?: string;
101
+ expiresAt?: string;
102
+ }
@@ -0,0 +1,122 @@
1
+ export declare enum DiagnosisType {
2
+ Generic = "Generic",
3
+ Private = "Private",
4
+ Instance = "Instance"
5
+ }
6
+ export interface DiagnosisRequest {
7
+ uuid?: string;
8
+ name: string;
9
+ description: string;
10
+ type: DiagnosisType;
11
+ parentUuid?: string;
12
+ language: string;
13
+ tags?: string[];
14
+ urlMultimedia?: string;
15
+ }
16
+ export interface Diagnosis extends DiagnosisRequest {
17
+ uuid: string;
18
+ uuidPractice: string;
19
+ uuidPractitioner?: string;
20
+ createdAt: string;
21
+ }
22
+ export interface TreatmentRequest {
23
+ uuid?: string;
24
+ uuidDiagnosis?: string;
25
+ name: string;
26
+ description: string;
27
+ urlMultimedia?: string;
28
+ }
29
+ export interface Treatment extends TreatmentRequest {
30
+ uuid: string;
31
+ uuidDiagnosis: string;
32
+ createdAt: string;
33
+ }
34
+ export declare enum DrugType {
35
+ Generic = "Generic",
36
+ Instance = "Instance"
37
+ }
38
+ export interface DrugRequest {
39
+ name: string;
40
+ description: string;
41
+ type: DrugType;
42
+ language: string;
43
+ sideEffects: string;
44
+ imageUrl?: string;
45
+ parentUuid?: string;
46
+ uuid?: string;
47
+ }
48
+ export interface Drug extends DrugRequest {
49
+ uuid: string;
50
+ uuidPractice: string;
51
+ uuidPractitioner?: string;
52
+ createdAt: string;
53
+ }
54
+ export interface PrescriptionRequest {
55
+ uuid?: string;
56
+ uuidTreatment?: string;
57
+ uuidDrug?: string;
58
+ quantity: string;
59
+ sig: string;
60
+ renewal: string;
61
+ }
62
+ export interface Prescription extends PrescriptionRequest {
63
+ uuid: string;
64
+ uuidTreatment: string;
65
+ createdAt: string;
66
+ }
67
+ export declare enum PlanStatus {
68
+ Pending = "Pending",
69
+ Accepted = "Accepted",
70
+ Rejected = "Rejected"
71
+ }
72
+ export interface TreatmentPlan {
73
+ uuid: string;
74
+ uuidConsult: string;
75
+ uuidDiagnosis: string;
76
+ uuidTreatment?: string;
77
+ status: PlanStatus;
78
+ }
79
+ export interface DrugPrescription {
80
+ prescription: Prescription;
81
+ drug: Drug;
82
+ }
83
+ export interface TreatmentAndDrugPrescription {
84
+ treatment?: Treatment;
85
+ prescriptionsAndDrugs?: DrugPrescription[];
86
+ status: PlanStatus;
87
+ uuidTreatmentPlan: string;
88
+ }
89
+ export interface TreatmentPlans {
90
+ uuidConsult: string;
91
+ diagnosis: Diagnosis;
92
+ plans?: TreatmentAndDrugPrescription[];
93
+ }
94
+ export interface DrugPrescriptionRequest {
95
+ prescription: PrescriptionRequest;
96
+ drug: DrugRequest;
97
+ }
98
+ export interface TreatmentAndDrugPrescriptionRequest {
99
+ trackingId: string;
100
+ treatment: TreatmentRequest;
101
+ prescriptionsAndDrugs?: DrugPrescriptionRequest[];
102
+ }
103
+ export interface TreatmentPlansRequest {
104
+ uuidConsult: string;
105
+ diagnosis: DiagnosisRequest;
106
+ plans?: TreatmentAndDrugPrescriptionRequest[];
107
+ }
108
+ export interface TreatmentAndDrugPrescriptionUpdateRequest {
109
+ treatment: Treatment;
110
+ prescriptionsAndDrugs?: DrugPrescriptionRequest[];
111
+ }
112
+ export interface TreatmentPlanUpdateRequest extends TreatmentPlansRequest {
113
+ uuidConsult: string;
114
+ diagnosis: DiagnosisRequest;
115
+ plan: TreatmentAndDrugPrescriptionUpdateRequest;
116
+ }
117
+ export interface TreatmentPlansResponseEntry {
118
+ trackingId?: string;
119
+ treatmentPlan: TreatmentPlan;
120
+ }
121
+ export interface TreatmentPlansResponse extends Array<TreatmentPlansResponseEntry> {
122
+ }
@@ -0,0 +1,26 @@
1
+ export declare class IncompleteAuthentication extends Error {
2
+ }
3
+ export declare class MissingGrant extends Error {
4
+ }
5
+ export declare class MissingLockbox extends Error {
6
+ }
7
+ export declare class MissingLockboxOwner extends Error {
8
+ }
9
+ export declare class IndexBuildError extends Error {
10
+ }
11
+ export declare class AssociatedLockboxNotFound extends Error {
12
+ }
13
+ export declare class WorkflowAnswersMissingError extends Error {
14
+ }
15
+ export declare class AuthenticationFailed extends Error {
16
+ }
17
+ export declare class AuthenticationBadRequest extends Error {
18
+ }
19
+ export declare class AuthenticationServerError extends Error {
20
+ }
21
+ export declare class IdentityCreationFailed extends Error {
22
+ }
23
+ export declare class IdentityCreationBadRequest extends Error {
24
+ }
25
+ export declare class IdentityCreationConflict extends Error {
26
+ }
@@ -0,0 +1,119 @@
1
+ import { Uuid, Base64String, TokenData, RFC3339Date, Url } from './';
2
+ export declare type AuthRefreshFunc = (refreshToken?: string) => Promise<AuthTokenResponse>;
3
+ export interface Tokens {
4
+ accessToken?: string;
5
+ refreshToken?: string;
6
+ }
7
+ export interface AuthTokenRequest {
8
+ practiceUuid: string;
9
+ email: string;
10
+ password: Base64String;
11
+ otp?: string;
12
+ }
13
+ export interface AuthTokenResponse {
14
+ accessToken: string;
15
+ tokenType: string;
16
+ refreshToken: string;
17
+ expiresIn: number;
18
+ }
19
+ export interface AuthRecoverRequest {
20
+ practiceUuid: string;
21
+ email: string;
22
+ }
23
+ export interface WhoAmIResponse {
24
+ aud: string;
25
+ exp: number;
26
+ jti: string;
27
+ iat: number;
28
+ iss: string;
29
+ nbf: number;
30
+ sub: string;
31
+ scope: string;
32
+ email: string;
33
+ practice: string;
34
+ }
35
+ export interface IdentityCreateRequest {
36
+ practiceUuid: Uuid;
37
+ email: string;
38
+ password: Base64String;
39
+ publicKey: Base64String;
40
+ recoveryPassword: Base64String;
41
+ tosAndCpAcceptance: TosAndCpAcceptanceRequest;
42
+ tokenData?: TokenData;
43
+ subscription?: boolean;
44
+ }
45
+ export interface TosAndCpAcceptanceRequest {
46
+ tosVersion: string;
47
+ cpVersion: string;
48
+ }
49
+ export interface IdentityResponse {
50
+ id: Uuid;
51
+ practiceUuid?: Uuid;
52
+ email?: string;
53
+ emailConfirmed: boolean;
54
+ tokenData?: TokenData;
55
+ mfaEnabled?: boolean;
56
+ mfaSecret?: Base64String;
57
+ publicKey: Base64String;
58
+ recoveryLogin?: Uuid;
59
+ recoveryPassword: Base64String;
60
+ recoveryMasterKey: Base64String;
61
+ recoverySecurityQuestions: SecretShard[];
62
+ legal?: LegalData;
63
+ createdAt?: string;
64
+ updatedAt?: string;
65
+ refreshToken?: string;
66
+ }
67
+ export interface IdentityUpdateRequest {
68
+ emailConfirmed?: boolean;
69
+ password?: PasswordUpdateRequest;
70
+ mfaEnable?: MFAEnableRequest;
71
+ recoveryPassword?: Base64String;
72
+ recoveryMasterKey?: Base64String;
73
+ recoverySecurityQuestions?: SecretShard[];
74
+ tokenData?: TokenData;
75
+ epAcceptance?: EpAcceptanceRequest;
76
+ rpAcceptance?: RpAcceptanceRequest;
77
+ }
78
+ export interface EpAcceptanceRequest {
79
+ epVersion: string;
80
+ }
81
+ export interface RpAcceptanceRequest {
82
+ rpVersion: string;
83
+ }
84
+ export interface PasswordUpdateRequest {
85
+ oldPassword?: Base64String;
86
+ newPassword: Base64String;
87
+ }
88
+ export interface QRCodeRequest {
89
+ password: Base64String;
90
+ }
91
+ export interface QRCodeResponse {
92
+ url: string;
93
+ qrContentType: string;
94
+ qrBytes: Base64String;
95
+ }
96
+ export interface MFAEnableRequest {
97
+ password: Base64String;
98
+ otp: string;
99
+ }
100
+ export interface SecretShard {
101
+ securityQuestion: string;
102
+ securityAnswer?: string;
103
+ nonce: Base64String;
104
+ encryptedShare: Base64String;
105
+ }
106
+ export interface LegalData {
107
+ tosAcceptedAtTime?: RFC3339Date;
108
+ tosAcceptedVersion: Url;
109
+ tosAcceptedAtIP?: string;
110
+ cpAcceptedAtTime?: RFC3339Date;
111
+ cpAcceptedVersion: Url;
112
+ cpAcceptedAtIP?: string;
113
+ epAcceptedAtTime?: RFC3339Date;
114
+ epAcceptedVersion: Url;
115
+ epAcceptedAtIP?: string;
116
+ rpAcceptedAtTime?: RFC3339Date;
117
+ rpAcceptedVersion: Url;
118
+ rpAcceptedAtIP?: string;
119
+ }
@@ -0,0 +1,9 @@
1
+ export * from './client';
2
+ export * from './consult';
3
+ export * from './diagnosis';
4
+ export * from './error';
5
+ export * from './guard';
6
+ export * from './practice';
7
+ export * from './shared';
8
+ export * from './vault';
9
+ export * from './workflow';