@arbol-ai/sdk 2.18.0 → 3.0.0
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/README.md +19 -1
- package/dist/client.d.ts +4 -0
- package/dist/client.js +10 -0
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +396 -0
- package/dist/models.js +5 -1
- package/dist/nuevaEps/affiliations/models.d.ts +6 -5
- package/dist/nuevaEps/connections/models.d.ts +18 -18
- package/dist/nuevaEps/index.d.ts +1 -1
- package/dist/nuevaEps/models.d.ts +16 -232
- package/dist/{visoft/tools → orsovision/agencies}/client.d.ts +13 -19
- package/dist/{visoft/tools → orsovision/agencies}/client.js +2 -2
- package/dist/orsovision/agencies/index.d.ts +5 -0
- package/dist/orsovision/agencies/models.d.ts +107 -0
- package/dist/orsovision/appointments/client.d.ts +39 -0
- package/dist/orsovision/appointments/client.js +29 -0
- package/dist/orsovision/appointments/index.d.ts +5 -0
- package/dist/orsovision/appointments/models.d.ts +206 -0
- package/dist/orsovision/appointments/models.js +9 -0
- package/dist/orsovision/availability/client.d.ts +32 -0
- package/dist/orsovision/availability/client.js +19 -0
- package/dist/orsovision/availability/index.d.ts +5 -0
- package/dist/orsovision/availability/models.d.ts +239 -0
- package/dist/orsovision/availability/models.js +15 -0
- package/dist/orsovision/client.d.ts +27 -0
- package/dist/orsovision/client.js +50 -0
- package/dist/orsovision/clinic/client.d.ts +34 -0
- package/dist/{visoft/specialtyRules → orsovision/clinic}/client.js +3 -3
- package/dist/orsovision/clinic/index.d.ts +5 -0
- package/dist/orsovision/clinic/models.d.ts +89 -0
- package/dist/orsovision/contracts/client.d.ts +69 -0
- package/dist/orsovision/contracts/client.js +18 -0
- package/dist/orsovision/contracts/index.d.ts +5 -0
- package/dist/orsovision/contracts/models.d.ts +108 -0
- package/dist/orsovision/index.d.ts +5 -0
- package/dist/orsovision/index.js +4 -0
- package/dist/orsovision/models.d.ts +227 -0
- package/dist/orsovision/patients/client.d.ts +52 -0
- package/dist/orsovision/patients/client.js +34 -0
- package/dist/orsovision/patients/index.d.ts +5 -0
- package/dist/orsovision/patients/models.d.ts +297 -0
- package/dist/orsovision/patients/models.js +3 -0
- package/dist/orsovision/services/client.d.ts +74 -0
- package/dist/orsovision/services/client.js +18 -0
- package/dist/orsovision/services/index.d.ts +5 -0
- package/dist/orsovision/services/index.js +4 -0
- package/dist/orsovision/services/models.d.ts +105 -0
- package/dist/orsovision/services/models.js +3 -0
- package/dist/orsovision/tools/client.d.ts +44 -0
- package/dist/{raiz/roles → orsovision/tools}/client.js +3 -3
- package/dist/orsovision/tools/index.d.ts +5 -0
- package/dist/orsovision/tools/index.js +4 -0
- package/dist/orsovision/tools/models.d.ts +101 -0
- package/dist/orsovision/tools/models.js +3 -0
- package/dist/raiz/agents/models.d.ts +1 -0
- package/dist/raiz/client.d.ts +0 -4
- package/dist/raiz/client.js +0 -10
- package/dist/raiz/conversations/client.d.ts +7 -3
- package/dist/raiz/conversations/index.d.ts +1 -1
- package/dist/raiz/conversations/models.d.ts +22 -0
- package/dist/raiz/organization/client.d.ts +40 -40
- package/dist/raiz/organization/client.js +10 -10
- package/dist/raiz/organization/index.d.ts +1 -1
- package/dist/raiz/reports/client.d.ts +3 -3
- package/dist/raiz/reports/client.js +2 -2
- package/dist/raiz/reports/index.d.ts +1 -1
- package/dist/somos/appointments/client.d.ts +40 -0
- package/dist/somos/appointments/client.js +29 -0
- package/dist/somos/appointments/index.d.ts +5 -0
- package/dist/somos/appointments/index.js +4 -0
- package/dist/somos/appointments/models.d.ts +301 -0
- package/dist/somos/appointments/models.js +9 -0
- package/dist/somos/availability/client.d.ts +33 -0
- package/dist/somos/availability/client.js +19 -0
- package/dist/somos/availability/index.d.ts +5 -0
- package/dist/somos/availability/index.js +4 -0
- package/dist/somos/availability/models.d.ts +340 -0
- package/dist/somos/availability/models.js +15 -0
- package/dist/somos/client.d.ts +29 -0
- package/dist/somos/client.js +55 -0
- package/dist/somos/clinic/client.d.ts +33 -0
- package/dist/somos/clinic/client.js +18 -0
- package/dist/somos/clinic/index.d.ts +5 -0
- package/dist/somos/clinic/index.js +4 -0
- package/dist/somos/clinic/models.d.ts +89 -0
- package/dist/somos/clinic/models.js +3 -0
- package/dist/somos/contracts/client.d.ts +74 -0
- package/dist/somos/contracts/client.js +18 -0
- package/dist/somos/contracts/index.d.ts +5 -0
- package/dist/somos/contracts/index.js +4 -0
- package/dist/somos/contracts/models.d.ts +107 -0
- package/dist/somos/contracts/models.js +3 -0
- package/dist/somos/groups/client.d.ts +67 -0
- package/dist/{visoft → somos}/groups/client.js +2 -2
- package/dist/somos/groups/index.d.ts +5 -0
- package/dist/somos/groups/index.js +4 -0
- package/dist/somos/groups/models.d.ts +117 -0
- package/dist/somos/groups/models.js +3 -0
- package/dist/somos/index.d.ts +5 -0
- package/dist/somos/index.js +4 -0
- package/dist/somos/models.d.ts +227 -0
- package/dist/somos/models.js +3 -0
- package/dist/somos/patients/client.d.ts +51 -0
- package/dist/somos/patients/client.js +34 -0
- package/dist/somos/patients/index.d.ts +5 -0
- package/dist/somos/patients/index.js +4 -0
- package/dist/somos/patients/models.d.ts +327 -0
- package/dist/somos/patients/models.js +3 -0
- package/dist/somos/services/client.d.ts +117 -0
- package/dist/somos/services/client.js +26 -0
- package/dist/somos/services/index.d.ts +5 -0
- package/dist/somos/services/index.js +4 -0
- package/dist/somos/services/models.d.ts +272 -0
- package/dist/somos/services/models.js +3 -0
- package/dist/somos/specialtyRules/client.d.ts +44 -0
- package/dist/somos/specialtyRules/client.js +18 -0
- package/dist/somos/specialtyRules/index.d.ts +5 -0
- package/dist/somos/specialtyRules/index.js +4 -0
- package/dist/somos/specialtyRules/models.d.ts +54 -0
- package/dist/somos/specialtyRules/models.js +3 -0
- package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
- package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
- package/dist/somos/tools/index.d.ts +5 -0
- package/dist/somos/tools/index.js +4 -0
- package/dist/somos/tools/models.d.ts +101 -0
- package/dist/somos/tools/models.js +3 -0
- package/dist/visoft/appointments/client.d.ts +20 -194
- package/dist/visoft/appointments/client.js +5 -4
- package/dist/visoft/appointments/index.d.ts +1 -0
- package/dist/visoft/appointments/models.d.ts +391 -0
- package/dist/visoft/appointments/models.js +15 -0
- package/dist/visoft/availability/client.d.ts +10 -164
- package/dist/visoft/availability/client.js +9 -9
- package/dist/visoft/availability/index.d.ts +2 -2
- package/dist/visoft/availability/models.d.ts +154 -64
- package/dist/visoft/availability/models.js +10 -8
- package/dist/visoft/client.d.ts +6 -8
- package/dist/visoft/client.js +15 -20
- package/dist/visoft/clinic/client.d.ts +30 -0
- package/dist/visoft/clinic/client.js +18 -0
- package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
- package/dist/visoft/clinic/index.js +4 -0
- package/dist/visoft/clinic/models.d.ts +13 -0
- package/dist/visoft/clinic/models.js +3 -0
- package/dist/visoft/clinics/client.d.ts +2 -31
- package/dist/visoft/clinics/client.js +1 -8
- package/dist/visoft/clinics/index.d.ts +2 -2
- package/dist/visoft/clinics/models.d.ts +13 -24
- package/dist/visoft/connections/client.d.ts +17 -74
- package/dist/visoft/connections/client.js +10 -11
- package/dist/visoft/connections/index.d.ts +1 -1
- package/dist/visoft/connections/models.d.ts +93 -1
- package/dist/visoft/connections/models.js +6 -0
- package/dist/visoft/contracts/client.d.ts +14 -49
- package/dist/visoft/contracts/client.js +2 -2
- package/dist/visoft/contracts/index.d.ts +1 -1
- package/dist/visoft/contracts/models.d.ts +43 -7
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +311 -139
- package/dist/visoft/patients/client.d.ts +24 -264
- package/dist/visoft/patients/client.js +7 -6
- package/dist/visoft/patients/index.d.ts +1 -0
- package/dist/visoft/patients/models.d.ts +737 -0
- package/dist/visoft/patients/models.js +15 -0
- package/dist/visoft/professionals/client.d.ts +56 -0
- package/dist/visoft/professionals/client.js +18 -0
- package/dist/visoft/professionals/index.d.ts +5 -0
- package/dist/visoft/professionals/index.js +4 -0
- package/dist/visoft/professionals/models.d.ts +54 -0
- package/dist/visoft/professionals/models.js +3 -0
- package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
- package/dist/visoft/serviceCatalogs/client.js +18 -0
- package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
- package/dist/visoft/serviceCatalogs/index.js +4 -0
- package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
- package/dist/visoft/serviceCatalogs/models.js +3 -0
- package/dist/visoft/services/client.d.ts +25 -61
- package/dist/visoft/services/client.js +2 -2
- package/dist/visoft/services/index.d.ts +1 -1
- package/dist/visoft/services/models.d.ts +52 -15
- package/package.json +9 -3
- package/dist/raiz/members/client.d.ts +0 -102
- package/dist/raiz/members/client.js +0 -35
- package/dist/raiz/members/index.d.ts +0 -5
- package/dist/raiz/members/models.d.ts +0 -48
- package/dist/raiz/members/models.js +0 -10
- package/dist/raiz/roles/index.d.ts +0 -5
- package/dist/raiz/roles/models.d.ts +0 -32
- package/dist/visoft/agencies/client.d.ts +0 -58
- package/dist/visoft/agencies/index.d.ts +0 -5
- package/dist/visoft/agencies/models.d.ts +0 -29
- package/dist/visoft/groups/client.d.ts +0 -69
- package/dist/visoft/groups/index.d.ts +0 -5
- package/dist/visoft/groups/models.d.ts +0 -39
- package/dist/visoft/specialtyRules/client.d.ts +0 -50
- package/dist/visoft/tools/index.d.ts +0 -5
- package/dist/visoft/tools/models.d.ts +0 -37
- /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
- /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
- /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
- /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
- /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
- /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
- /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
- /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
- /package/dist/{visoft/tools → orsovision}/models.js +0 -0
- /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ApiError } from "../_/index.js";
|
|
2
|
+
export type { RequestOptions } from "../_/index.js";
|
|
3
|
+
export { createClient } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, } from "./client.js";
|
|
5
|
+
export type { OrsovisionClinicNotServedFailure, OrsovisionCredentialsRejectedError, OrsovisionForbiddenError, OrsovisionInternalError, OrsovisionInvalidInputError, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionRateLimitedError, OrsovisionRequestTooLargeError, OrsovisionResponseMetadata, OrsovisionToolNotAvailableFailure, OrsovisionToolResultResponse, OrsovisionUnauthorizedError, OrsovisionUnsupportedMediaTypeError, OrsovisionUpstreamTimeoutError, } from "./models.js";
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import type { CredentialsRejectedFailure, Empty, ForbiddenFailure, InternalFailure, InvalidInputFailure, RateLimitedFailure, RequestTooLargeFailure, ToolResult, UnauthorizedFailure, UnsupportedMediaTypeFailure, UpstreamTimeoutFailure } from "../models.js";
|
|
2
|
+
/**
|
|
3
|
+
* The connection signs in to another clinic's SIIPS: this backend serves
|
|
4
|
+
* Orsovision's alone.
|
|
5
|
+
*/
|
|
6
|
+
export interface OrsovisionClinicNotServedFailure {
|
|
7
|
+
/**
|
|
8
|
+
* The failure code, stable across releases.
|
|
9
|
+
*/
|
|
10
|
+
code: "CLINIC_NOT_SERVED";
|
|
11
|
+
/**
|
|
12
|
+
* No fields.
|
|
13
|
+
*/
|
|
14
|
+
data: Empty;
|
|
15
|
+
/**
|
|
16
|
+
* What went wrong, for people; it never contains input values.
|
|
17
|
+
*/
|
|
18
|
+
message: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether repeating the same request may succeed.
|
|
21
|
+
*/
|
|
22
|
+
retryable: false;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A failed answer.
|
|
26
|
+
*/
|
|
27
|
+
export interface OrsovisionCredentialsRejectedError {
|
|
28
|
+
data: null;
|
|
29
|
+
/**
|
|
30
|
+
* The clinical system rejected the username or password, or the user is
|
|
31
|
+
* blocked.
|
|
32
|
+
*/
|
|
33
|
+
error: CredentialsRejectedFailure;
|
|
34
|
+
/**
|
|
35
|
+
* What every answer carries besides its data or error.
|
|
36
|
+
*/
|
|
37
|
+
metadata: OrsovisionResponseMetadata;
|
|
38
|
+
success: false;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A failed answer.
|
|
42
|
+
*/
|
|
43
|
+
export interface OrsovisionForbiddenError {
|
|
44
|
+
data: null;
|
|
45
|
+
/**
|
|
46
|
+
* The token does not authorize this operation.
|
|
47
|
+
*/
|
|
48
|
+
error: ForbiddenFailure;
|
|
49
|
+
/**
|
|
50
|
+
* What every answer carries besides its data or error.
|
|
51
|
+
*/
|
|
52
|
+
metadata: OrsovisionResponseMetadata;
|
|
53
|
+
success: false;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A failed answer.
|
|
57
|
+
*/
|
|
58
|
+
export interface OrsovisionInternalError {
|
|
59
|
+
data: null;
|
|
60
|
+
/**
|
|
61
|
+
* The service could not complete the operation.
|
|
62
|
+
*/
|
|
63
|
+
error: InternalFailure;
|
|
64
|
+
/**
|
|
65
|
+
* What every answer carries besides its data or error.
|
|
66
|
+
*/
|
|
67
|
+
metadata: OrsovisionResponseMetadata;
|
|
68
|
+
success: false;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A failed answer.
|
|
72
|
+
*/
|
|
73
|
+
export interface OrsovisionInvalidInputError {
|
|
74
|
+
data: null;
|
|
75
|
+
/**
|
|
76
|
+
* The request does not match the published schema.
|
|
77
|
+
*/
|
|
78
|
+
error: InvalidInputFailure;
|
|
79
|
+
/**
|
|
80
|
+
* What every answer carries besides its data or error.
|
|
81
|
+
*/
|
|
82
|
+
metadata: OrsovisionResponseMetadata;
|
|
83
|
+
success: false;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* This backend is not configured to sign its references.
|
|
87
|
+
*/
|
|
88
|
+
export interface OrsovisionOrsovisionNotConfiguredFailure {
|
|
89
|
+
/**
|
|
90
|
+
* The failure code, stable across releases.
|
|
91
|
+
*/
|
|
92
|
+
code: "ORSOVISION_NOT_CONFIGURED";
|
|
93
|
+
/**
|
|
94
|
+
* No fields.
|
|
95
|
+
*/
|
|
96
|
+
data: Empty;
|
|
97
|
+
/**
|
|
98
|
+
* What went wrong, for people; it never contains input values.
|
|
99
|
+
*/
|
|
100
|
+
message: string;
|
|
101
|
+
/**
|
|
102
|
+
* Whether repeating the same request may succeed.
|
|
103
|
+
*/
|
|
104
|
+
retryable: false;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A failed answer.
|
|
108
|
+
*/
|
|
109
|
+
export interface OrsovisionRateLimitedError {
|
|
110
|
+
data: null;
|
|
111
|
+
/**
|
|
112
|
+
* The request rate limit was exceeded. Try again later.
|
|
113
|
+
*/
|
|
114
|
+
error: RateLimitedFailure;
|
|
115
|
+
/**
|
|
116
|
+
* What every answer carries besides its data or error.
|
|
117
|
+
*/
|
|
118
|
+
metadata: OrsovisionResponseMetadata;
|
|
119
|
+
success: false;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* A failed answer.
|
|
123
|
+
*/
|
|
124
|
+
export interface OrsovisionRequestTooLargeError {
|
|
125
|
+
data: null;
|
|
126
|
+
/**
|
|
127
|
+
* The request exceeds the allowed size.
|
|
128
|
+
*/
|
|
129
|
+
error: RequestTooLargeFailure;
|
|
130
|
+
/**
|
|
131
|
+
* What every answer carries besides its data or error.
|
|
132
|
+
*/
|
|
133
|
+
metadata: OrsovisionResponseMetadata;
|
|
134
|
+
success: false;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* What every answer carries besides its data or error.
|
|
138
|
+
*/
|
|
139
|
+
export interface OrsovisionResponseMetadata {
|
|
140
|
+
/**
|
|
141
|
+
* Request correlation identifier, also sent as X-Request-Id.
|
|
142
|
+
*/
|
|
143
|
+
requestId: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* This tool is unavailable for the clinic; use only the tools
|
|
147
|
+
* orsovision.tools.list answers.
|
|
148
|
+
*/
|
|
149
|
+
export interface OrsovisionToolNotAvailableFailure {
|
|
150
|
+
/**
|
|
151
|
+
* The failure code, stable across releases.
|
|
152
|
+
*/
|
|
153
|
+
code: "TOOL_NOT_AVAILABLE";
|
|
154
|
+
/**
|
|
155
|
+
* No fields.
|
|
156
|
+
*/
|
|
157
|
+
data: Empty;
|
|
158
|
+
/**
|
|
159
|
+
* What went wrong, for people; it never contains input values.
|
|
160
|
+
*/
|
|
161
|
+
message: string;
|
|
162
|
+
/**
|
|
163
|
+
* Whether repeating the same request may succeed.
|
|
164
|
+
*/
|
|
165
|
+
retryable: false;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* A successful answer.
|
|
169
|
+
*/
|
|
170
|
+
export interface OrsovisionToolResultResponse {
|
|
171
|
+
/**
|
|
172
|
+
* The tool's clinical answer. ok:false is a conversational refusal the Agent
|
|
173
|
+
* reads (error, errorCode, ai_hint), not a failure.
|
|
174
|
+
*/
|
|
175
|
+
data: ToolResult;
|
|
176
|
+
error: null;
|
|
177
|
+
/**
|
|
178
|
+
* What every answer carries besides its data or error.
|
|
179
|
+
*/
|
|
180
|
+
metadata: OrsovisionResponseMetadata;
|
|
181
|
+
success: true;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A failed answer.
|
|
185
|
+
*/
|
|
186
|
+
export interface OrsovisionUnauthorizedError {
|
|
187
|
+
data: null;
|
|
188
|
+
/**
|
|
189
|
+
* A valid access token is required.
|
|
190
|
+
*/
|
|
191
|
+
error: UnauthorizedFailure;
|
|
192
|
+
/**
|
|
193
|
+
* What every answer carries besides its data or error.
|
|
194
|
+
*/
|
|
195
|
+
metadata: OrsovisionResponseMetadata;
|
|
196
|
+
success: false;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A failed answer.
|
|
200
|
+
*/
|
|
201
|
+
export interface OrsovisionUnsupportedMediaTypeError {
|
|
202
|
+
data: null;
|
|
203
|
+
/**
|
|
204
|
+
* The request content type is not supported.
|
|
205
|
+
*/
|
|
206
|
+
error: UnsupportedMediaTypeFailure;
|
|
207
|
+
/**
|
|
208
|
+
* What every answer carries besides its data or error.
|
|
209
|
+
*/
|
|
210
|
+
metadata: OrsovisionResponseMetadata;
|
|
211
|
+
success: false;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* A failed answer.
|
|
215
|
+
*/
|
|
216
|
+
export interface OrsovisionUpstreamTimeoutError {
|
|
217
|
+
data: null;
|
|
218
|
+
/**
|
|
219
|
+
* The upstream service did not respond before its deadline.
|
|
220
|
+
*/
|
|
221
|
+
error: UpstreamTimeoutFailure;
|
|
222
|
+
/**
|
|
223
|
+
* What every answer carries besides its data or error.
|
|
224
|
+
*/
|
|
225
|
+
metadata: OrsovisionResponseMetadata;
|
|
226
|
+
success: false;
|
|
227
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { OrsovisionToolResultResponse } from "../models.js";
|
|
3
|
+
import type { OrsovisionCorrectPatientBody, OrsovisionCreatePatientBody, OrsovisionLookupPatientBody } from "./models.js";
|
|
4
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
5
|
+
/**
|
|
6
|
+
* The URL the paths of the API are relative to.
|
|
7
|
+
*/
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Client {
|
|
11
|
+
/**
|
|
12
|
+
* Correct a patient's details
|
|
13
|
+
*
|
|
14
|
+
* Update only the patient fields the person explicitly corrected and
|
|
15
|
+
* confirmed; omit unchanged fields. Never repeat an update whose outcome is
|
|
16
|
+
* unknown. Orsovision's tool pack sets this tool's rules, parameters and
|
|
17
|
+
* accepted values (orsovision.tools.list answers them), and every call is
|
|
18
|
+
* checked against them.
|
|
19
|
+
*/
|
|
20
|
+
correct(request: CorrectRequest, options?: RequestOptions): Promise<CorrectResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Register a patient
|
|
23
|
+
*
|
|
24
|
+
* Register a patient only after a lookup confirmed it is not found and the
|
|
25
|
+
* person explicitly confirmed the required details. Never repeat a
|
|
26
|
+
* registration whose outcome is unknown. Orsovision's tool pack sets this
|
|
27
|
+
* tool's rules, parameters and accepted values (orsovision.tools.list answers
|
|
28
|
+
* them), and every call is checked against them.
|
|
29
|
+
*/
|
|
30
|
+
create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Look up a patient
|
|
33
|
+
*
|
|
34
|
+
* The patient's profile, recent and upcoming appointments (each upcoming one
|
|
35
|
+
* with its cancellation reference), by exact document number, after the
|
|
36
|
+
* clinic's identity and consent checks. found:false is an expected answer:
|
|
37
|
+
* confirm the document and offer to register the patient. Reuse what the
|
|
38
|
+
* patient already confirmed and avoid unrelated patient data. Orsovision's
|
|
39
|
+
* tool pack sets this tool's rules, parameters and accepted values
|
|
40
|
+
* (orsovision.tools.list answers them), and every call is checked against
|
|
41
|
+
* them.
|
|
42
|
+
*/
|
|
43
|
+
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
44
|
+
}
|
|
45
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
46
|
+
export declare function bind(transport: Transport): Client;
|
|
47
|
+
export type CorrectRequest = OrsovisionCorrectPatientBody;
|
|
48
|
+
export type CorrectResponse = OrsovisionToolResultResponse;
|
|
49
|
+
export type CreateRequest = OrsovisionCreatePatientBody;
|
|
50
|
+
export type CreateResponse = OrsovisionToolResultResponse;
|
|
51
|
+
export type LookupRequest = OrsovisionLookupPatientBody;
|
|
52
|
+
export type LookupResponse = OrsovisionToolResultResponse;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
export function createClient(options) {
|
|
5
|
+
return bind(new Transport(options));
|
|
6
|
+
}
|
|
7
|
+
export function bind(transport) {
|
|
8
|
+
return {
|
|
9
|
+
correct: (request, options) => transport.send(CorrectOperation, request, options),
|
|
10
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
11
|
+
lookup: (request, options) => transport.send(LookupOperation, request, options),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const CorrectOperation = {
|
|
15
|
+
method: "POST",
|
|
16
|
+
route: "/v1/orsovision/patients/correct",
|
|
17
|
+
body: "flat",
|
|
18
|
+
response: null,
|
|
19
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
20
|
+
};
|
|
21
|
+
const CreateOperation = {
|
|
22
|
+
method: "POST",
|
|
23
|
+
route: "/v1/orsovision/patients",
|
|
24
|
+
body: "flat",
|
|
25
|
+
response: null,
|
|
26
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
27
|
+
};
|
|
28
|
+
const LookupOperation = {
|
|
29
|
+
method: "POST",
|
|
30
|
+
route: "/v1/orsovision/patients/lookup",
|
|
31
|
+
body: "flat",
|
|
32
|
+
response: null,
|
|
33
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ApiError } from "../../_/index.js";
|
|
2
|
+
export type { RequestOptions } from "../../_/index.js";
|
|
3
|
+
export { createClient } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, CorrectRequest, CorrectResponse, CreateRequest, CreateResponse, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
+
export type { OrsovisionCorrectPatientBadGatewayError, OrsovisionCorrectPatientBody, OrsovisionCorrectPatientConflictError, OrsovisionCorrectPatientConflictFailure, OrsovisionCorrectPatientNotFoundError, OrsovisionCorrectPatientNotFoundFailure, OrsovisionCorrectPatientServiceUnavailableError, OrsovisionCorrectPatientServiceUnavailableFailure, OrsovisionCreatePatientBadGatewayError, OrsovisionCreatePatientBody, OrsovisionCreatePatientConflictError, OrsovisionCreatePatientConflictFailure, OrsovisionCreatePatientNotFoundError, OrsovisionCreatePatientNotFoundFailure, OrsovisionCreatePatientServiceUnavailableError, OrsovisionCreatePatientServiceUnavailableFailure, OrsovisionLookupPatientBadGatewayError, OrsovisionLookupPatientBody, OrsovisionLookupPatientConflictError, OrsovisionLookupPatientConflictFailure, OrsovisionLookupPatientNotFoundError, OrsovisionLookupPatientNotFoundFailure, OrsovisionLookupPatientServiceUnavailableError, OrsovisionLookupPatientServiceUnavailableFailure, } from "./models.js";
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CorrectPatientBadGatewayFailure, CreatePatientBadGatewayFailure, LookupPatientBadGatewayFailure, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import type { OrsovisionClinicNotServedFailure, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionResponseMetadata, OrsovisionToolNotAvailableFailure } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface OrsovisionCorrectPatientBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: CorrectPatientBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: OrsovisionResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export interface OrsovisionCorrectPatientBody {
|
|
16
|
+
/**
|
|
17
|
+
* Dirección corregida; omítela si no cambió.
|
|
18
|
+
*/
|
|
19
|
+
address?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Sede usada para enviar el formulario del paciente.
|
|
22
|
+
*/
|
|
23
|
+
agency: string;
|
|
24
|
+
/**
|
|
25
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
26
|
+
* default).
|
|
27
|
+
*/
|
|
28
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
29
|
+
/**
|
|
30
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
31
|
+
* the organization has one; required when it has several. Another
|
|
32
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
33
|
+
*/
|
|
34
|
+
connectionId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Documento del paciente existente.
|
|
37
|
+
*/
|
|
38
|
+
documentNumber: string;
|
|
39
|
+
/**
|
|
40
|
+
* Correo corregido; omítelo si no cambió.
|
|
41
|
+
*/
|
|
42
|
+
email?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Celular corregido; omítelo si no cambió.
|
|
45
|
+
*/
|
|
46
|
+
phoneMobile?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Teléfono fijo corregido; omítelo si no cambió.
|
|
49
|
+
*/
|
|
50
|
+
phoneOffice?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A failed answer.
|
|
54
|
+
*/
|
|
55
|
+
export interface OrsovisionCorrectPatientConflictError {
|
|
56
|
+
data: null;
|
|
57
|
+
error: OrsovisionCorrectPatientConflictFailure;
|
|
58
|
+
/**
|
|
59
|
+
* What every answer carries besides its data or error.
|
|
60
|
+
*/
|
|
61
|
+
metadata: OrsovisionResponseMetadata;
|
|
62
|
+
success: false;
|
|
63
|
+
}
|
|
64
|
+
export type OrsovisionCorrectPatientConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
65
|
+
/**
|
|
66
|
+
* A failed answer.
|
|
67
|
+
*/
|
|
68
|
+
export interface OrsovisionCorrectPatientNotFoundError {
|
|
69
|
+
data: null;
|
|
70
|
+
error: OrsovisionCorrectPatientNotFoundFailure;
|
|
71
|
+
/**
|
|
72
|
+
* What every answer carries besides its data or error.
|
|
73
|
+
*/
|
|
74
|
+
metadata: OrsovisionResponseMetadata;
|
|
75
|
+
success: false;
|
|
76
|
+
}
|
|
77
|
+
export type OrsovisionCorrectPatientNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
78
|
+
/**
|
|
79
|
+
* A failed answer.
|
|
80
|
+
*/
|
|
81
|
+
export interface OrsovisionCorrectPatientServiceUnavailableError {
|
|
82
|
+
data: null;
|
|
83
|
+
error: OrsovisionCorrectPatientServiceUnavailableFailure;
|
|
84
|
+
/**
|
|
85
|
+
* What every answer carries besides its data or error.
|
|
86
|
+
*/
|
|
87
|
+
metadata: OrsovisionResponseMetadata;
|
|
88
|
+
success: false;
|
|
89
|
+
}
|
|
90
|
+
export type OrsovisionCorrectPatientServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|
|
91
|
+
/**
|
|
92
|
+
* A failed answer.
|
|
93
|
+
*/
|
|
94
|
+
export interface OrsovisionCreatePatientBadGatewayError {
|
|
95
|
+
data: null;
|
|
96
|
+
error: CreatePatientBadGatewayFailure;
|
|
97
|
+
/**
|
|
98
|
+
* What every answer carries besides its data or error.
|
|
99
|
+
*/
|
|
100
|
+
metadata: OrsovisionResponseMetadata;
|
|
101
|
+
success: false;
|
|
102
|
+
}
|
|
103
|
+
export interface OrsovisionCreatePatientBody {
|
|
104
|
+
/**
|
|
105
|
+
* Dirección de residencia del paciente. Confírmala; no sustituyas la
|
|
106
|
+
* dirección de la clínica.
|
|
107
|
+
*/
|
|
108
|
+
address: string;
|
|
109
|
+
/**
|
|
110
|
+
* Sede elegida de list_agencies. Solo envía el formulario de registro; NO
|
|
111
|
+
* implica la residencia del paciente.
|
|
112
|
+
*/
|
|
113
|
+
agency: string;
|
|
114
|
+
/**
|
|
115
|
+
* Nacimiento YYYY-MM-DD; léelo de vuelta antes de crear el registro.
|
|
116
|
+
*/
|
|
117
|
+
birthDate: string;
|
|
118
|
+
/**
|
|
119
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
120
|
+
* default).
|
|
121
|
+
*/
|
|
122
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
123
|
+
/**
|
|
124
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
125
|
+
* the organization has one; required when it has several. Another
|
|
126
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
127
|
+
*/
|
|
128
|
+
connectionId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Código del país de residencia, normalmente COL cuando se confirma.
|
|
131
|
+
*/
|
|
132
|
+
country: string;
|
|
133
|
+
/**
|
|
134
|
+
* Código DANE del departamento de RESIDENCIA del paciente. No lo deduzcas de
|
|
135
|
+
* la sede elegida.
|
|
136
|
+
*/
|
|
137
|
+
departmentCode: string;
|
|
138
|
+
/**
|
|
139
|
+
* Documento confirmado sin espacios, puntos ni guiones.
|
|
140
|
+
*/
|
|
141
|
+
documentNumber: string;
|
|
142
|
+
/**
|
|
143
|
+
* Tipo exacto tal como aparece en el documento; nunca lo infieras.
|
|
144
|
+
*/
|
|
145
|
+
documentType: string;
|
|
146
|
+
/**
|
|
147
|
+
* Correo válido. Omítelo si no hay; nunca lo inventes.
|
|
148
|
+
*/
|
|
149
|
+
email?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Primer nombre confirmado.
|
|
152
|
+
*/
|
|
153
|
+
firstName1: string;
|
|
154
|
+
/**
|
|
155
|
+
* Primer apellido confirmado.
|
|
156
|
+
*/
|
|
157
|
+
lastName1: string;
|
|
158
|
+
/**
|
|
159
|
+
* Código DANE del municipio de RESIDENCIA del paciente. No lo deduzcas de la
|
|
160
|
+
* sede elegida.
|
|
161
|
+
*/
|
|
162
|
+
municipalityCode: string;
|
|
163
|
+
/**
|
|
164
|
+
* Celular, solo dígitos. Omítelo si la persona se niega a darlo.
|
|
165
|
+
*/
|
|
166
|
+
phoneMobile?: string;
|
|
167
|
+
/**
|
|
168
|
+
* M o F confirmado; nunca lo infieras del nombre ni de la voz.
|
|
169
|
+
*/
|
|
170
|
+
sex: string;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A failed answer.
|
|
174
|
+
*/
|
|
175
|
+
export interface OrsovisionCreatePatientConflictError {
|
|
176
|
+
data: null;
|
|
177
|
+
error: OrsovisionCreatePatientConflictFailure;
|
|
178
|
+
/**
|
|
179
|
+
* What every answer carries besides its data or error.
|
|
180
|
+
*/
|
|
181
|
+
metadata: OrsovisionResponseMetadata;
|
|
182
|
+
success: false;
|
|
183
|
+
}
|
|
184
|
+
export type OrsovisionCreatePatientConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
185
|
+
/**
|
|
186
|
+
* A failed answer.
|
|
187
|
+
*/
|
|
188
|
+
export interface OrsovisionCreatePatientNotFoundError {
|
|
189
|
+
data: null;
|
|
190
|
+
error: OrsovisionCreatePatientNotFoundFailure;
|
|
191
|
+
/**
|
|
192
|
+
* What every answer carries besides its data or error.
|
|
193
|
+
*/
|
|
194
|
+
metadata: OrsovisionResponseMetadata;
|
|
195
|
+
success: false;
|
|
196
|
+
}
|
|
197
|
+
export type OrsovisionCreatePatientNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
198
|
+
/**
|
|
199
|
+
* A failed answer.
|
|
200
|
+
*/
|
|
201
|
+
export interface OrsovisionCreatePatientServiceUnavailableError {
|
|
202
|
+
data: null;
|
|
203
|
+
error: OrsovisionCreatePatientServiceUnavailableFailure;
|
|
204
|
+
/**
|
|
205
|
+
* What every answer carries besides its data or error.
|
|
206
|
+
*/
|
|
207
|
+
metadata: OrsovisionResponseMetadata;
|
|
208
|
+
success: false;
|
|
209
|
+
}
|
|
210
|
+
export type OrsovisionCreatePatientServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|
|
211
|
+
/**
|
|
212
|
+
* A failed answer.
|
|
213
|
+
*/
|
|
214
|
+
export interface OrsovisionLookupPatientBadGatewayError {
|
|
215
|
+
data: null;
|
|
216
|
+
error: LookupPatientBadGatewayFailure;
|
|
217
|
+
/**
|
|
218
|
+
* What every answer carries besides its data or error.
|
|
219
|
+
*/
|
|
220
|
+
metadata: OrsovisionResponseMetadata;
|
|
221
|
+
success: false;
|
|
222
|
+
}
|
|
223
|
+
export interface OrsovisionLookupPatientBody {
|
|
224
|
+
/**
|
|
225
|
+
* Código de sede de list_agencies. Pásalo cuando se conozca para que el
|
|
226
|
+
* contexto de contrato y servicio quede en la misma sede.
|
|
227
|
+
*/
|
|
228
|
+
agency?: string;
|
|
229
|
+
/**
|
|
230
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
231
|
+
* default).
|
|
232
|
+
*/
|
|
233
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
234
|
+
/**
|
|
235
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
236
|
+
* the organization has one; required when it has several. Another
|
|
237
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
238
|
+
*/
|
|
239
|
+
connectionId?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Documento de quien recibirá la atención. Quita internamente espacios,
|
|
242
|
+
* puntos y guiones. Para confirmar en voz alta repite solo los últimos cuatro
|
|
243
|
+
* dígitos y espera un sí explícito antes de llamar; nunca leas el documento
|
|
244
|
+
* completo.
|
|
245
|
+
*/
|
|
246
|
+
documentNumber: string;
|
|
247
|
+
/**
|
|
248
|
+
* true agrega lo que ya pasó: pastAppointments (la más reciente primero, con
|
|
249
|
+
* attended) y las admisiones del paciente. Responde '¿asistió a su última
|
|
250
|
+
* cita?' desde el registro, no desde la memoria de la persona.
|
|
251
|
+
*/
|
|
252
|
+
includePast?: boolean;
|
|
253
|
+
/**
|
|
254
|
+
* Con includePast, limita pastAppointments a los últimos N días (p. ej. 3
|
|
255
|
+
* para '¿vine esta semana?'). Omítelo para el historial completo.
|
|
256
|
+
*/
|
|
257
|
+
pastDays?: number;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* A failed answer.
|
|
261
|
+
*/
|
|
262
|
+
export interface OrsovisionLookupPatientConflictError {
|
|
263
|
+
data: null;
|
|
264
|
+
error: OrsovisionLookupPatientConflictFailure;
|
|
265
|
+
/**
|
|
266
|
+
* What every answer carries besides its data or error.
|
|
267
|
+
*/
|
|
268
|
+
metadata: OrsovisionResponseMetadata;
|
|
269
|
+
success: false;
|
|
270
|
+
}
|
|
271
|
+
export type OrsovisionLookupPatientConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
272
|
+
/**
|
|
273
|
+
* A failed answer.
|
|
274
|
+
*/
|
|
275
|
+
export interface OrsovisionLookupPatientNotFoundError {
|
|
276
|
+
data: null;
|
|
277
|
+
error: OrsovisionLookupPatientNotFoundFailure;
|
|
278
|
+
/**
|
|
279
|
+
* What every answer carries besides its data or error.
|
|
280
|
+
*/
|
|
281
|
+
metadata: OrsovisionResponseMetadata;
|
|
282
|
+
success: false;
|
|
283
|
+
}
|
|
284
|
+
export type OrsovisionLookupPatientNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
285
|
+
/**
|
|
286
|
+
* A failed answer.
|
|
287
|
+
*/
|
|
288
|
+
export interface OrsovisionLookupPatientServiceUnavailableError {
|
|
289
|
+
data: null;
|
|
290
|
+
error: OrsovisionLookupPatientServiceUnavailableFailure;
|
|
291
|
+
/**
|
|
292
|
+
* What every answer carries besides its data or error.
|
|
293
|
+
*/
|
|
294
|
+
metadata: OrsovisionResponseMetadata;
|
|
295
|
+
success: false;
|
|
296
|
+
}
|
|
297
|
+
export type OrsovisionLookupPatientServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|