@arbol-ai/sdk 4.0.0 → 5.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 +15 -3
- package/dist/agenda/appointments/client.d.ts +165 -52
- package/dist/agenda/appointments/client.js +19 -11
- package/dist/agenda/appointments/index.d.ts +1 -1
- package/dist/agenda/availability/client.d.ts +11 -72
- package/dist/agenda/availability/client.js +5 -14
- package/dist/agenda/availability/index.d.ts +1 -1
- package/dist/agenda/bookingLocations/client.d.ts +51 -0
- package/dist/agenda/bookingLocations/client.js +19 -0
- package/dist/agenda/bookingLocations/index.d.ts +4 -0
- package/dist/agenda/bookingLocations/index.js +4 -0
- package/dist/agenda/bookingOfferings/client.d.ts +82 -0
- package/dist/agenda/bookingOfferings/client.js +18 -0
- package/dist/agenda/bookingOfferings/index.d.ts +5 -0
- package/dist/agenda/bookingOfferings/index.js +4 -0
- package/dist/agenda/bookingOfferings/models.d.ts +92 -0
- package/dist/agenda/bookingOfferings/models.js +3 -0
- package/dist/agenda/bookingRequirements/client.d.ts +118 -0
- package/dist/agenda/bookingRequirements/client.js +18 -0
- package/dist/agenda/bookingRequirements/index.d.ts +4 -0
- package/dist/agenda/bookingRequirements/index.js +4 -0
- package/dist/agenda/bookingSlots/client.d.ts +78 -0
- package/dist/agenda/bookingSlots/client.js +19 -0
- package/dist/agenda/bookingSlots/index.d.ts +4 -0
- package/dist/agenda/bookingSlots/index.js +4 -0
- package/dist/agenda/bookings/client.d.ts +44 -375
- package/dist/agenda/bookings/client.js +10 -52
- package/dist/agenda/bookings/index.d.ts +2 -2
- package/dist/agenda/bookings/models.d.ts +0 -92
- package/dist/agenda/client.d.ts +14 -0
- package/dist/agenda/client.js +35 -0
- package/dist/agenda/firstAvailability/client.d.ts +74 -0
- package/dist/agenda/firstAvailability/client.js +19 -0
- package/dist/agenda/firstAvailability/index.d.ts +5 -0
- package/dist/agenda/firstAvailability/index.js +4 -0
- package/dist/agenda/firstAvailability/models.d.ts +31 -0
- package/dist/agenda/firstAvailability/models.js +7 -0
- package/dist/agenda/index.d.ts +1 -1
- package/dist/agenda/models.d.ts +19 -94
- package/dist/agenda/models.js +0 -3
- package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
- package/dist/agenda/nearestBookingSlots/client.js +19 -0
- package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
- package/dist/agenda/nearestBookingSlots/index.js +4 -0
- package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
- package/dist/agenda/nearestBookingSlots/models.js +7 -0
- package/dist/agenda/offerings/client.d.ts +2 -2
- package/dist/agenda/offerings/client.js +1 -1
- package/dist/agenda/resourceSchedules/client.d.ts +75 -0
- package/dist/agenda/resourceSchedules/client.js +19 -0
- package/dist/agenda/resourceSchedules/index.d.ts +4 -0
- package/dist/agenda/resourceSchedules/index.js +4 -0
- package/dist/agenda/resources/client.d.ts +2 -2
- package/dist/agenda/resources/client.js +1 -1
- package/dist/agenda/scheduleRules/client.d.ts +125 -85
- package/dist/agenda/scheduleRules/client.js +17 -16
- package/dist/agenda/scheduleRules/index.d.ts +2 -1
- package/dist/agenda/scheduleRules/models.d.ts +33 -0
- package/dist/agenda/scheduleRules/models.js +6 -0
- package/dist/agenda/services/client.d.ts +2 -2
- package/dist/agenda/services/client.js +1 -1
- package/dist/agenda/waitlist/client.d.ts +40 -29
- package/dist/agenda/waitlist/client.js +4 -4
- package/dist/agenda/waitlist/index.d.ts +1 -1
- package/dist/agenda/waitlist/models.d.ts +17 -0
- package/dist/agenda/waitlist/models.js +4 -1
- package/dist/axxa/authorizations/client.d.ts +3 -35
- package/dist/axxa/authorizations/client.js +1 -1
- package/dist/axxa/authorizations/index.d.ts +1 -0
- package/dist/axxa/authorizations/models.d.ts +112 -0
- package/dist/axxa/authorizations/models.js +3 -0
- package/dist/axxa/connections/client.d.ts +19 -45
- package/dist/axxa/connections/client.js +10 -11
- package/dist/axxa/connections/index.d.ts +1 -0
- package/dist/axxa/connections/models.d.ts +269 -0
- package/dist/axxa/connections/models.js +3 -0
- package/dist/axxa/eligibility/client.d.ts +3 -25
- package/dist/axxa/eligibility/client.js +1 -1
- package/dist/axxa/eligibility/index.d.ts +1 -0
- package/dist/axxa/eligibility/models.d.ts +102 -0
- package/dist/axxa/eligibility/models.js +3 -0
- package/dist/axxa/index.d.ts +1 -1
- package/dist/axxa/models.d.ts +243 -168
- package/dist/axxa/provider/client.d.ts +5 -11
- package/dist/axxa/provider/client.js +1 -1
- package/dist/axxa/provider/index.d.ts +1 -0
- package/dist/axxa/provider/models.d.ts +87 -0
- package/dist/axxa/provider/models.js +3 -0
- package/dist/gmedic/agendaServices/client.d.ts +13 -9
- package/dist/gmedic/agendaServices/client.js +2 -2
- package/dist/gmedic/agendaServices/index.d.ts +1 -1
- package/dist/gmedic/agendaServices/models.d.ts +53 -1
- package/dist/gmedic/agendas/client.d.ts +16 -9
- package/dist/gmedic/agendas/client.js +2 -2
- package/dist/gmedic/agendas/index.d.ts +1 -1
- package/dist/gmedic/agendas/models.d.ts +53 -1
- package/dist/gmedic/appointments/client.d.ts +34 -241
- package/dist/gmedic/appointments/client.js +12 -10
- package/dist/gmedic/appointments/index.d.ts +1 -1
- package/dist/gmedic/appointments/models.d.ts +518 -1
- package/dist/gmedic/appointments/models.js +28 -2
- package/dist/gmedic/availability/client.d.ts +24 -10
- package/dist/gmedic/availability/client.js +4 -3
- package/dist/gmedic/availability/index.d.ts +1 -1
- package/dist/gmedic/availability/models.d.ts +57 -1
- package/dist/gmedic/availability/models.js +7 -1
- package/dist/gmedic/availableDays/client.d.ts +11 -8
- package/dist/gmedic/availableDays/client.js +1 -1
- package/dist/gmedic/availableDays/index.d.ts +1 -1
- package/dist/gmedic/availableDays/models.d.ts +53 -1
- package/dist/gmedic/branchOffices/client.d.ts +13 -9
- package/dist/gmedic/branchOffices/client.js +2 -2
- package/dist/gmedic/branchOffices/index.d.ts +1 -1
- package/dist/gmedic/branchOffices/models.d.ts +58 -1
- package/dist/gmedic/connections/client.d.ts +19 -42
- package/dist/gmedic/connections/client.js +10 -11
- package/dist/gmedic/connections/index.d.ts +1 -0
- package/dist/gmedic/connections/models.d.ts +162 -0
- package/dist/gmedic/connections/models.js +3 -0
- package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
- package/dist/gmedic/dictionaryEntries/client.js +2 -2
- package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
- package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
- package/dist/gmedic/healthPartners/client.d.ts +19 -9
- package/dist/gmedic/healthPartners/client.js +2 -2
- package/dist/gmedic/healthPartners/index.d.ts +1 -1
- package/dist/gmedic/healthPartners/models.d.ts +53 -1
- package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
- package/dist/gmedic/healthPromotionEntities/client.js +2 -2
- package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
- package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
- package/dist/gmedic/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
- package/dist/gmedic/laboralRiskManagers/client.js +2 -2
- package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
- package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
- package/dist/gmedic/models.d.ts +194 -133
- package/dist/gmedic/occupations/client.d.ts +19 -9
- package/dist/gmedic/occupations/client.js +2 -2
- package/dist/gmedic/occupations/index.d.ts +1 -1
- package/dist/gmedic/occupations/models.d.ts +53 -1
- package/dist/gmedic/patientNotes/client.d.ts +25 -55
- package/dist/gmedic/patientNotes/client.js +5 -5
- package/dist/gmedic/patientNotes/index.d.ts +1 -1
- package/dist/gmedic/patientNotes/models.d.ts +232 -1
- package/dist/gmedic/patients/client.d.ts +40 -359
- package/dist/gmedic/patients/client.js +13 -5
- package/dist/gmedic/patients/index.d.ts +2 -2
- package/dist/gmedic/patients/models.d.ts +795 -1
- package/dist/gmedic/services/client.d.ts +22 -16
- package/dist/gmedic/services/client.js +2 -2
- package/dist/gmedic/services/index.d.ts +1 -1
- package/dist/gmedic/services/models.d.ts +53 -3
- package/dist/gmedic/sessionPackages/client.d.ts +21 -58
- package/dist/gmedic/sessionPackages/client.js +5 -5
- package/dist/gmedic/sessionPackages/index.d.ts +1 -1
- package/dist/gmedic/sessionPackages/models.d.ts +183 -1
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +61 -0
- package/dist/models.js +6 -0
- package/dist/nuevaEps/affiliations/client.js +1 -1
- package/dist/nuevaEps/affiliations/models.d.ts +3 -1
- package/dist/nuevaEps/connections/client.d.ts +9 -9
- package/dist/nuevaEps/connections/client.js +9 -9
- package/dist/nuevaEps/connections/index.d.ts +1 -1
- package/dist/nuevaEps/connections/models.d.ts +1 -47
- package/dist/nuevaEps/connections/models.js +1 -8
- package/dist/sura/affiliations/client.d.ts +3 -35
- package/dist/sura/affiliations/client.js +6 -6
- package/dist/sura/affiliations/index.d.ts +1 -0
- package/dist/sura/affiliations/models.d.ts +71 -0
- package/dist/sura/affiliations/models.js +8 -0
- package/dist/sura/appointments/client.d.ts +27 -327
- package/dist/sura/appointments/client.js +15 -21
- package/dist/sura/appointments/index.d.ts +2 -1
- package/dist/sura/appointments/models.d.ts +310 -0
- package/dist/sura/appointments/models.js +22 -0
- package/dist/sura/authorizations/client.d.ts +3 -43
- package/dist/sura/authorizations/client.js +6 -6
- package/dist/sura/authorizations/index.d.ts +1 -0
- package/dist/sura/authorizations/models.d.ts +79 -0
- package/dist/sura/authorizations/models.js +8 -0
- package/dist/sura/availability/client.d.ts +4 -68
- package/dist/sura/availability/client.js +9 -9
- package/dist/sura/availability/index.d.ts +2 -1
- package/dist/sura/availability/models.d.ts +103 -0
- package/dist/sura/availability/models.js +8 -0
- package/dist/sura/bookingOptions/client.d.ts +35 -0
- package/dist/sura/bookingOptions/client.js +19 -0
- package/dist/sura/bookingOptions/index.d.ts +5 -0
- package/dist/sura/bookingOptions/index.js +4 -0
- package/dist/sura/bookingOptions/models.d.ts +143 -0
- package/dist/sura/bookingOptions/models.js +8 -0
- package/dist/sura/client.d.ts +2 -0
- package/dist/sura/client.js +5 -0
- package/dist/sura/connections/client.d.ts +20 -98
- package/dist/sura/connections/client.js +10 -10
- package/dist/sura/connections/index.d.ts +1 -1
- package/dist/sura/connections/models.d.ts +102 -1
- package/dist/sura/connections/models.js +6 -0
- package/dist/sura/copays/client.d.ts +4 -40
- package/dist/sura/copays/client.js +9 -9
- package/dist/sura/copays/index.d.ts +2 -1
- package/dist/sura/copays/models.d.ts +75 -0
- package/dist/sura/copays/models.js +8 -0
- package/dist/sura/index.d.ts +1 -1
- package/dist/sura/models.d.ts +204 -148
- package/dist/sura/models.js +20 -1
- package/dist/sura/operations/client.d.ts +2 -7
- package/dist/sura/operations/client.js +4 -4
- package/dist/sura/operations/index.d.ts +1 -0
- package/dist/sura/operations/models.d.ts +43 -0
- package/dist/sura/operations/models.js +8 -0
- package/dist/sura/patients/client.d.ts +3 -40
- package/dist/sura/patients/client.js +6 -6
- package/dist/sura/patients/index.d.ts +1 -0
- package/dist/sura/patients/models.d.ts +76 -0
- package/dist/sura/patients/models.js +8 -0
- package/dist/sura/professionals/client.d.ts +7 -9
- package/dist/sura/professionals/client.js +3 -4
- package/dist/sura/professionals/index.d.ts +1 -1
- package/dist/sura/professionals/models.d.ts +40 -1
- package/dist/sura/services/client.d.ts +7 -8
- package/dist/sura/services/client.js +3 -4
- package/dist/sura/services/index.d.ts +1 -0
- package/dist/sura/services/models.d.ts +40 -0
- package/dist/sura/services/models.js +3 -0
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +1 -16
- package/package.json +3 -3
package/dist/sura/models.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Empty, PageInfo, ResponseMetadata } from "../models.js";
|
|
2
2
|
export interface SuraAffiliation {
|
|
3
3
|
active: true;
|
|
4
4
|
affiliateType: string;
|
|
@@ -22,7 +22,9 @@ export interface SuraAppointment {
|
|
|
22
22
|
*/
|
|
23
23
|
cancellable: boolean;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated
|
|
26
28
|
*/
|
|
27
29
|
date: string;
|
|
28
30
|
/**
|
|
@@ -42,7 +44,14 @@ export interface SuraAppointment {
|
|
|
42
44
|
*/
|
|
43
45
|
serviceId: string;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
47
|
+
* The appointment's moment, with the clinic's offset: cancel it with this
|
|
48
|
+
* value.
|
|
49
|
+
*/
|
|
50
|
+
startsAt: Temporal.Instant;
|
|
51
|
+
/**
|
|
52
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated
|
|
46
55
|
*/
|
|
47
56
|
time: string;
|
|
48
57
|
}
|
|
@@ -134,6 +143,11 @@ export interface SuraBookedAppointment {
|
|
|
134
143
|
*/
|
|
135
144
|
aiHint: string;
|
|
136
145
|
booked: true;
|
|
146
|
+
/**
|
|
147
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
148
|
+
*
|
|
149
|
+
* @deprecated
|
|
150
|
+
*/
|
|
137
151
|
date: string;
|
|
138
152
|
ok: true;
|
|
139
153
|
/**
|
|
@@ -143,6 +157,15 @@ export interface SuraBookedAppointment {
|
|
|
143
157
|
plan: string | null;
|
|
144
158
|
professional: string | null;
|
|
145
159
|
service: string | null;
|
|
160
|
+
/**
|
|
161
|
+
* The appointment's moment, with the clinic's offset.
|
|
162
|
+
*/
|
|
163
|
+
startsAt: Temporal.Instant;
|
|
164
|
+
/**
|
|
165
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
166
|
+
*
|
|
167
|
+
* @deprecated
|
|
168
|
+
*/
|
|
146
169
|
time: string;
|
|
147
170
|
}
|
|
148
171
|
export interface SuraCancelledAppointment {
|
|
@@ -151,11 +174,46 @@ export interface SuraCancelledAppointment {
|
|
|
151
174
|
*/
|
|
152
175
|
aiHint: string;
|
|
153
176
|
cancelled: true;
|
|
177
|
+
/**
|
|
178
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
179
|
+
*
|
|
180
|
+
* @deprecated
|
|
181
|
+
*/
|
|
154
182
|
date: string;
|
|
155
183
|
ok: true;
|
|
156
184
|
service: string;
|
|
185
|
+
/**
|
|
186
|
+
* The appointment's moment, with the clinic's offset.
|
|
187
|
+
*/
|
|
188
|
+
startsAt: Temporal.Instant;
|
|
189
|
+
/**
|
|
190
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
191
|
+
*
|
|
192
|
+
* @deprecated
|
|
193
|
+
*/
|
|
157
194
|
time: string;
|
|
158
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* The organization has no SURA connection that can run this operation.
|
|
198
|
+
*/
|
|
199
|
+
export interface SuraConnectionNotConfiguredFailure {
|
|
200
|
+
/**
|
|
201
|
+
* The failure code, stable across releases.
|
|
202
|
+
*/
|
|
203
|
+
code: "CONNECTION_NOT_CONFIGURED";
|
|
204
|
+
/**
|
|
205
|
+
* No fields.
|
|
206
|
+
*/
|
|
207
|
+
data: Empty;
|
|
208
|
+
/**
|
|
209
|
+
* What went wrong, for people; it never contains input values.
|
|
210
|
+
*/
|
|
211
|
+
message: string;
|
|
212
|
+
/**
|
|
213
|
+
* Whether repeating the same request may succeed.
|
|
214
|
+
*/
|
|
215
|
+
retryable: false;
|
|
216
|
+
}
|
|
159
217
|
export interface SuraCopayEntry {
|
|
160
218
|
authorizationNumber: string;
|
|
161
219
|
copayAmount: number | null;
|
|
@@ -185,145 +243,6 @@ export interface SuraCopayHistory {
|
|
|
185
243
|
outcome: "found";
|
|
186
244
|
year: string;
|
|
187
245
|
}
|
|
188
|
-
export interface SuraFailureResponse {
|
|
189
|
-
data: null;
|
|
190
|
-
error: Failure & ({
|
|
191
|
-
code: "INVALID_INPUT";
|
|
192
|
-
data: {
|
|
193
|
-
issues?: ValidationIssue[];
|
|
194
|
-
};
|
|
195
|
-
message: "The request does not match the published schema.";
|
|
196
|
-
retryable: false;
|
|
197
|
-
} | {
|
|
198
|
-
code: "UNAUTHORIZED";
|
|
199
|
-
data: {
|
|
200
|
-
[key: string]: unknown;
|
|
201
|
-
};
|
|
202
|
-
message: "A valid access token is required.";
|
|
203
|
-
retryable: false;
|
|
204
|
-
} | {
|
|
205
|
-
code: "FORBIDDEN";
|
|
206
|
-
data: {
|
|
207
|
-
[key: string]: unknown;
|
|
208
|
-
};
|
|
209
|
-
message: "The token does not authorize this operation.";
|
|
210
|
-
retryable: false;
|
|
211
|
-
} | {
|
|
212
|
-
code: "NOT_FOUND";
|
|
213
|
-
data: {
|
|
214
|
-
[key: string]: unknown;
|
|
215
|
-
};
|
|
216
|
-
message: "The requested operation does not exist.";
|
|
217
|
-
retryable: false;
|
|
218
|
-
} | {
|
|
219
|
-
code: "HTTP_METHOD_NOT_ALLOWED";
|
|
220
|
-
data: {
|
|
221
|
-
[key: string]: unknown;
|
|
222
|
-
};
|
|
223
|
-
message: "The HTTP method is not supported for this resource.";
|
|
224
|
-
retryable: false;
|
|
225
|
-
} | {
|
|
226
|
-
code: "REQUEST_TOO_LARGE";
|
|
227
|
-
data: {
|
|
228
|
-
[key: string]: unknown;
|
|
229
|
-
};
|
|
230
|
-
message: "The request exceeds the allowed size.";
|
|
231
|
-
retryable: false;
|
|
232
|
-
} | {
|
|
233
|
-
code: "UNSUPPORTED_MEDIA_TYPE";
|
|
234
|
-
data: {
|
|
235
|
-
[key: string]: unknown;
|
|
236
|
-
};
|
|
237
|
-
message: "The request content type is not supported.";
|
|
238
|
-
retryable: false;
|
|
239
|
-
} | {
|
|
240
|
-
code: "RATE_LIMITED";
|
|
241
|
-
data: {
|
|
242
|
-
[key: string]: unknown;
|
|
243
|
-
};
|
|
244
|
-
message: "The request rate limit was exceeded. Try again later.";
|
|
245
|
-
retryable: true;
|
|
246
|
-
} | {
|
|
247
|
-
code: "INTERNAL_ERROR";
|
|
248
|
-
data: {
|
|
249
|
-
[key: string]: unknown;
|
|
250
|
-
};
|
|
251
|
-
message: "The service could not complete the operation.";
|
|
252
|
-
retryable: false;
|
|
253
|
-
} | {
|
|
254
|
-
code: "UPSTREAM_UNAVAILABLE";
|
|
255
|
-
data: {
|
|
256
|
-
[key: string]: unknown;
|
|
257
|
-
};
|
|
258
|
-
message: "The upstream service could not complete the request.";
|
|
259
|
-
retryable: true;
|
|
260
|
-
} | {
|
|
261
|
-
code: "UPSTREAM_TIMEOUT";
|
|
262
|
-
data: {
|
|
263
|
-
[key: string]: unknown;
|
|
264
|
-
};
|
|
265
|
-
message: "The upstream service did not respond before its deadline.";
|
|
266
|
-
retryable: true;
|
|
267
|
-
} | {
|
|
268
|
-
code: "OUTCOME_UNKNOWN";
|
|
269
|
-
data: {
|
|
270
|
-
[key: string]: unknown;
|
|
271
|
-
};
|
|
272
|
-
message: "The operation may have been applied; check its result before repeating it.";
|
|
273
|
-
retryable: false;
|
|
274
|
-
} | {
|
|
275
|
-
code: "PORTAL_CREDENTIALS_REJECTED";
|
|
276
|
-
data: {
|
|
277
|
-
[key: string]: unknown;
|
|
278
|
-
};
|
|
279
|
-
message: "SURA rejected this connection's portal credentials or authenticator code.";
|
|
280
|
-
retryable: false;
|
|
281
|
-
} | {
|
|
282
|
-
code: "PORTAL_SESSION_CONFLICT";
|
|
283
|
-
data: {
|
|
284
|
-
[key: string]: unknown;
|
|
285
|
-
};
|
|
286
|
-
message: "SURA already has an active session for this account. Close that session before retrying.";
|
|
287
|
-
retryable: true;
|
|
288
|
-
} | {
|
|
289
|
-
code: "PORTAL_UNAVAILABLE";
|
|
290
|
-
data: {
|
|
291
|
-
[key: string]: unknown;
|
|
292
|
-
};
|
|
293
|
-
message: "The SURA portal did not answer this request.";
|
|
294
|
-
retryable: true;
|
|
295
|
-
} | {
|
|
296
|
-
code: "CREDENTIALS_REJECTED";
|
|
297
|
-
data: {
|
|
298
|
-
[key: string]: unknown;
|
|
299
|
-
};
|
|
300
|
-
message: "SURA rejected the username, the password or the authenticator code. Nothing was saved.";
|
|
301
|
-
retryable: false;
|
|
302
|
-
} | {
|
|
303
|
-
code: "PROVIDER_SESSION_CONFLICT";
|
|
304
|
-
data: {
|
|
305
|
-
[key: string]: unknown;
|
|
306
|
-
};
|
|
307
|
-
message: "Another session holds this SURA account, which allows one. Nothing was saved.";
|
|
308
|
-
retryable: true;
|
|
309
|
-
} | {
|
|
310
|
-
code: "PROVIDER_UNAVAILABLE";
|
|
311
|
-
data: {
|
|
312
|
-
[key: string]: unknown;
|
|
313
|
-
};
|
|
314
|
-
message: "SURA did not answer. Nothing was saved.";
|
|
315
|
-
retryable: true;
|
|
316
|
-
} | {
|
|
317
|
-
code: "CONNECTION_NOT_CONFIGURED";
|
|
318
|
-
data: {
|
|
319
|
-
[key: string]: unknown;
|
|
320
|
-
};
|
|
321
|
-
message: "The organization has no SURA connection that can run this operation.";
|
|
322
|
-
retryable: false;
|
|
323
|
-
});
|
|
324
|
-
metadata: SuraResponseMetadata;
|
|
325
|
-
success: false;
|
|
326
|
-
}
|
|
327
246
|
export interface SuraNoContract {
|
|
328
247
|
active: null;
|
|
329
248
|
/**
|
|
@@ -353,8 +272,23 @@ export interface SuraNoCopayHistory {
|
|
|
353
272
|
year: string;
|
|
354
273
|
}
|
|
355
274
|
export interface SuraOpening {
|
|
275
|
+
/**
|
|
276
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
277
|
+
*
|
|
278
|
+
* @deprecated
|
|
279
|
+
*/
|
|
356
280
|
date: string;
|
|
357
281
|
professional: string;
|
|
282
|
+
/**
|
|
283
|
+
* The opening's moment, with the clinic's offset: book it with
|
|
284
|
+
* appointments.create.
|
|
285
|
+
*/
|
|
286
|
+
startsAt: Temporal.Instant;
|
|
287
|
+
/**
|
|
288
|
+
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
289
|
+
*
|
|
290
|
+
* @deprecated
|
|
291
|
+
*/
|
|
358
292
|
time: string;
|
|
359
293
|
}
|
|
360
294
|
export interface SuraPatient {
|
|
@@ -413,6 +347,70 @@ export interface SuraPendingResult {
|
|
|
413
347
|
retryAfterSeconds: number;
|
|
414
348
|
status: "pending";
|
|
415
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* SURA rejected this connection's portal credentials or authenticator code.
|
|
352
|
+
*/
|
|
353
|
+
export interface SuraPortalCredentialsRejectedFailure {
|
|
354
|
+
/**
|
|
355
|
+
* The failure code, stable across releases.
|
|
356
|
+
*/
|
|
357
|
+
code: "PORTAL_CREDENTIALS_REJECTED";
|
|
358
|
+
/**
|
|
359
|
+
* No fields.
|
|
360
|
+
*/
|
|
361
|
+
data: Empty;
|
|
362
|
+
/**
|
|
363
|
+
* What went wrong, for people; it never contains input values.
|
|
364
|
+
*/
|
|
365
|
+
message: string;
|
|
366
|
+
/**
|
|
367
|
+
* Whether repeating the same request may succeed.
|
|
368
|
+
*/
|
|
369
|
+
retryable: false;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* SURA already has an active session for this account. Close that session
|
|
373
|
+
* before retrying.
|
|
374
|
+
*/
|
|
375
|
+
export interface SuraPortalSessionConflictFailure {
|
|
376
|
+
/**
|
|
377
|
+
* The failure code, stable across releases.
|
|
378
|
+
*/
|
|
379
|
+
code: "PORTAL_SESSION_CONFLICT";
|
|
380
|
+
/**
|
|
381
|
+
* No fields.
|
|
382
|
+
*/
|
|
383
|
+
data: Empty;
|
|
384
|
+
/**
|
|
385
|
+
* What went wrong, for people; it never contains input values.
|
|
386
|
+
*/
|
|
387
|
+
message: string;
|
|
388
|
+
/**
|
|
389
|
+
* Whether repeating the same request may succeed.
|
|
390
|
+
*/
|
|
391
|
+
retryable: true;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* The SURA portal did not answer this request.
|
|
395
|
+
*/
|
|
396
|
+
export interface SuraPortalUnavailableFailure {
|
|
397
|
+
/**
|
|
398
|
+
* The failure code, stable across releases.
|
|
399
|
+
*/
|
|
400
|
+
code: "PORTAL_UNAVAILABLE";
|
|
401
|
+
/**
|
|
402
|
+
* No fields.
|
|
403
|
+
*/
|
|
404
|
+
data: Empty;
|
|
405
|
+
/**
|
|
406
|
+
* What went wrong, for people; it never contains input values.
|
|
407
|
+
*/
|
|
408
|
+
message: string;
|
|
409
|
+
/**
|
|
410
|
+
* Whether repeating the same request may succeed.
|
|
411
|
+
*/
|
|
412
|
+
retryable: true;
|
|
413
|
+
}
|
|
416
414
|
export interface SuraPreparationAvailable {
|
|
417
415
|
/**
|
|
418
416
|
* Spanish guidance for the model: what to do next.
|
|
@@ -429,6 +427,7 @@ export interface SuraPreparationAvailable {
|
|
|
429
427
|
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
430
428
|
professional: string | null;
|
|
431
429
|
serviceId: string;
|
|
430
|
+
startsAt?: Temporal.Instant;
|
|
432
431
|
time?: string;
|
|
433
432
|
};
|
|
434
433
|
date: string | null;
|
|
@@ -574,12 +573,6 @@ export interface SuraRefusal {
|
|
|
574
573
|
times?: string[];
|
|
575
574
|
today?: string;
|
|
576
575
|
}
|
|
577
|
-
export interface SuraResponseMetadata {
|
|
578
|
-
/**
|
|
579
|
-
* Request correlation identifier, also sent as X-Request-Id.
|
|
580
|
-
*/
|
|
581
|
-
requestId: string;
|
|
582
|
-
}
|
|
583
576
|
export interface SuraSearchedDay {
|
|
584
577
|
date: string | null;
|
|
585
578
|
professional: string | null;
|
|
@@ -604,7 +597,69 @@ export interface SuraServicePage {
|
|
|
604
597
|
*/
|
|
605
598
|
pageInfo: PageInfo;
|
|
606
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* A failed answer.
|
|
602
|
+
*/
|
|
603
|
+
export interface SuraToolRefusedError {
|
|
604
|
+
data: null;
|
|
605
|
+
/**
|
|
606
|
+
* The request was not answered as a page: data.reason says why and
|
|
607
|
+
* data.guidance what to do next. Nothing was changed.
|
|
608
|
+
*/
|
|
609
|
+
error: SuraToolRefusedFailure;
|
|
610
|
+
/**
|
|
611
|
+
* What every answer carries besides its data or error.
|
|
612
|
+
*/
|
|
613
|
+
metadata: ResponseMetadata;
|
|
614
|
+
success: false;
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* The request was not answered as a page: data.reason says why and
|
|
618
|
+
* data.guidance what to do next. Nothing was changed.
|
|
619
|
+
*/
|
|
620
|
+
export interface SuraToolRefusedFailure {
|
|
621
|
+
/**
|
|
622
|
+
* The failure code, stable across releases.
|
|
623
|
+
*/
|
|
624
|
+
code: "TOOL_REFUSED";
|
|
625
|
+
data: SuraToolRefusedFailureData;
|
|
626
|
+
/**
|
|
627
|
+
* What went wrong, for people; it never contains input values.
|
|
628
|
+
*/
|
|
629
|
+
message: string;
|
|
630
|
+
/**
|
|
631
|
+
* Whether repeating the same request may succeed.
|
|
632
|
+
*/
|
|
633
|
+
retryable: false;
|
|
634
|
+
}
|
|
635
|
+
export interface SuraToolRefusedFailureData {
|
|
636
|
+
/**
|
|
637
|
+
* What was refused, in English, for logs and people.
|
|
638
|
+
*/
|
|
639
|
+
detail: string;
|
|
640
|
+
/**
|
|
641
|
+
* What the refusal offers to continue (the choices, the operation to poll),
|
|
642
|
+
* as the guidance names it.
|
|
643
|
+
*/
|
|
644
|
+
details: {
|
|
645
|
+
[key: string]: unknown;
|
|
646
|
+
};
|
|
647
|
+
/**
|
|
648
|
+
* What an Agent does next, in the language it speaks to the person.
|
|
649
|
+
*/
|
|
650
|
+
guidance?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Why, as a stable code: NO_SERVICES, PORTAL_BUSY, OPERATION_PENDING…
|
|
653
|
+
*/
|
|
654
|
+
reason: string;
|
|
655
|
+
/**
|
|
656
|
+
* A sentence an Agent may say to the person as it is.
|
|
657
|
+
*/
|
|
658
|
+
say?: string;
|
|
659
|
+
}
|
|
607
660
|
export declare const SuraAffiliationCodec: import("../_/codec.js").Codec;
|
|
661
|
+
export declare const SuraAppointmentCodec: import("../_/codec.js").Codec;
|
|
662
|
+
export declare const SuraAppointmentPageCodec: import("../_/codec.js").Codec;
|
|
608
663
|
export declare const SuraAuthorizationCodec: import("../_/codec.js").Codec;
|
|
609
664
|
export declare const SuraAvailabilityCodec: import("../_/codec.js").Codec;
|
|
610
665
|
export declare const SuraBookedAppointmentCodec: import("../_/codec.js").Codec;
|
|
@@ -612,6 +667,7 @@ export declare const SuraCancelledAppointmentCodec: import("../_/codec.js").Code
|
|
|
612
667
|
export declare const SuraCopayHistoryCodec: import("../_/codec.js").Codec;
|
|
613
668
|
export declare const SuraNoContractCodec: import("../_/codec.js").Codec;
|
|
614
669
|
export declare const SuraNoCopayHistoryCodec: import("../_/codec.js").Codec;
|
|
670
|
+
export declare const SuraOpeningCodec: import("../_/codec.js").Codec;
|
|
615
671
|
export declare const SuraPatientFoundCodec: import("../_/codec.js").Codec;
|
|
616
672
|
export declare const SuraPatientNotFoundCodec: import("../_/codec.js").Codec;
|
|
617
673
|
export declare const SuraPendingResultCodec: import("../_/codec.js").Codec;
|
package/dist/sura/models.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { object } from "../_/index.js";
|
|
3
|
+
import { array, instant, object } from "../_/index.js";
|
|
4
4
|
export const SuraAffiliationCodec = object([
|
|
5
5
|
["ai_hint", "aiHint"],
|
|
6
6
|
]);
|
|
7
|
+
export const SuraAppointmentCodec = object([
|
|
8
|
+
["startsAt", null, instant],
|
|
9
|
+
]);
|
|
10
|
+
export const SuraAppointmentPageCodec = object([
|
|
11
|
+
["data", null, array(() => SuraAppointmentCodec)],
|
|
12
|
+
]);
|
|
7
13
|
export const SuraAuthorizationCodec = object([
|
|
8
14
|
["ai_hint", "aiHint"],
|
|
9
15
|
]);
|
|
@@ -12,9 +18,11 @@ export const SuraAvailabilityCodec = object([
|
|
|
12
18
|
]);
|
|
13
19
|
export const SuraBookedAppointmentCodec = object([
|
|
14
20
|
["ai_hint", "aiHint"],
|
|
21
|
+
["startsAt", null, instant],
|
|
15
22
|
]);
|
|
16
23
|
export const SuraCancelledAppointmentCodec = object([
|
|
17
24
|
["ai_hint", "aiHint"],
|
|
25
|
+
["startsAt", null, instant],
|
|
18
26
|
]);
|
|
19
27
|
export const SuraCopayHistoryCodec = object([
|
|
20
28
|
["ai_hint", "aiHint"],
|
|
@@ -25,6 +33,9 @@ export const SuraNoContractCodec = object([
|
|
|
25
33
|
export const SuraNoCopayHistoryCodec = object([
|
|
26
34
|
["ai_hint", "aiHint"],
|
|
27
35
|
]);
|
|
36
|
+
export const SuraOpeningCodec = object([
|
|
37
|
+
["startsAt", null, instant],
|
|
38
|
+
]);
|
|
28
39
|
export const SuraPatientFoundCodec = object([
|
|
29
40
|
["ai_hint", "aiHint"],
|
|
30
41
|
]);
|
|
@@ -36,16 +47,24 @@ export const SuraPendingResultCodec = object([
|
|
|
36
47
|
]);
|
|
37
48
|
export const SuraPreparationAvailableCodec = object([
|
|
38
49
|
["ai_hint", "aiHint"],
|
|
50
|
+
["appointments", null, array(() => SuraAppointmentCodec)],
|
|
51
|
+
["booking", null, object([["startsAt", null, instant]])],
|
|
52
|
+
["options", null, array(() => SuraOpeningCodec)],
|
|
39
53
|
]);
|
|
40
54
|
export const SuraPreparationExistingAppointmentCodec = object([
|
|
41
55
|
["ai_hint", "aiHint"],
|
|
56
|
+
["appointments", null, array(() => SuraAppointmentCodec)],
|
|
42
57
|
]);
|
|
43
58
|
export const SuraPreparationNoSlotsCodec = object([
|
|
44
59
|
["ai_hint", "aiHint"],
|
|
60
|
+
["appointments", null, array(() => SuraAppointmentCodec)],
|
|
61
|
+
["options", null, array(() => SuraOpeningCodec)],
|
|
45
62
|
]);
|
|
46
63
|
export const SuraPreparationPatientNotFoundCodec = object([
|
|
47
64
|
["ai_hint", "aiHint"],
|
|
48
65
|
]);
|
|
49
66
|
export const SuraRefusalCodec = object([
|
|
50
67
|
["ai_hint", "aiHint"],
|
|
68
|
+
["appointments", null, array(() => SuraAppointmentCodec)],
|
|
69
|
+
["options", null, array(() => SuraAppointmentCodec)],
|
|
51
70
|
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SuraGetOperationResultResponse } from "./models.js";
|
|
3
3
|
export interface ClientOptions extends BaseClientOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The URL the paths of the API are relative to.
|
|
@@ -45,9 +45,4 @@ export interface GetRequest {
|
|
|
45
45
|
*/
|
|
46
46
|
channel?: "voice" | "whatsapp" | "web";
|
|
47
47
|
}
|
|
48
|
-
export
|
|
49
|
-
data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraPreparationPatientNotFound | SuraPatientFound | SuraServicePage | SuraAvailability | SuraPreparationExistingAppointment | SuraPreparationAvailable | SuraPreparationNoSlots | SuraBookedAppointment | SuraAppointmentPage | SuraCancelledAppointment | SuraAffiliation | SuraNoContract | SuraAuthorization | SuraCopayHistory | SuraNoCopayHistory;
|
|
50
|
-
error: null;
|
|
51
|
-
metadata: SuraResponseMetadata;
|
|
52
|
-
success: true;
|
|
53
|
-
}
|
|
48
|
+
export type GetResponse = SuraGetOperationResultResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { Transport,
|
|
4
|
-
import {
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { SuraGetOperationResultResponseCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -14,6 +14,6 @@ const GetOperation = {
|
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/operations/{operationId}",
|
|
16
16
|
query: { agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
|
-
response:
|
|
18
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
17
|
+
response: SuraGetOperationResultResponseCodec,
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -2,3 +2,4 @@ export { ApiError } from "../../_/index.js";
|
|
|
2
2
|
export type { RequestOptions } from "../../_/index.js";
|
|
3
3
|
export { createClient } from "./client.js";
|
|
4
4
|
export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
|
|
5
|
+
export type { SuraGetOperationBadGatewayError, SuraGetOperationBadGatewayFailure, SuraGetOperationConflictError, SuraGetOperationConflictFailure, SuraGetOperationResult, SuraGetOperationResultResponse, } from "./models.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
|
|
2
|
+
import { type SuraAffiliation, type SuraAppointmentPage, type SuraAuthorization, type SuraAvailability, type SuraBookedAppointment, type SuraCancelledAppointment, type SuraConnectionNotConfiguredFailure, type SuraCopayHistory, type SuraNoContract, type SuraNoCopayHistory, type SuraPatientFound, type SuraPatientNotFound, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraPreparationAvailable, type SuraPreparationExistingAppointment, type SuraPreparationNoSlots, type SuraPreparationPatientNotFound, type SuraRefusal, type SuraServicePage } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface SuraGetOperationBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: SuraGetOperationBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: ResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export type SuraGetOperationBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
|
|
16
|
+
/**
|
|
17
|
+
* A failed answer.
|
|
18
|
+
*/
|
|
19
|
+
export interface SuraGetOperationConflictError {
|
|
20
|
+
data: null;
|
|
21
|
+
error: SuraGetOperationConflictFailure;
|
|
22
|
+
/**
|
|
23
|
+
* What every answer carries besides its data or error.
|
|
24
|
+
*/
|
|
25
|
+
metadata: ResponseMetadata;
|
|
26
|
+
success: false;
|
|
27
|
+
}
|
|
28
|
+
export type SuraGetOperationConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
|
|
29
|
+
export type SuraGetOperationResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraPreparationPatientNotFound | SuraPatientFound | SuraServicePage | SuraAvailability | SuraPreparationExistingAppointment | SuraPreparationAvailable | SuraPreparationNoSlots | SuraBookedAppointment | SuraAppointmentPage | SuraCancelledAppointment | SuraAffiliation | SuraNoContract | SuraAuthorization | SuraCopayHistory | SuraNoCopayHistory;
|
|
30
|
+
/**
|
|
31
|
+
* A successful answer.
|
|
32
|
+
*/
|
|
33
|
+
export interface SuraGetOperationResultResponse {
|
|
34
|
+
data: SuraGetOperationResult;
|
|
35
|
+
error: null;
|
|
36
|
+
/**
|
|
37
|
+
* What every answer carries besides its data or error.
|
|
38
|
+
*/
|
|
39
|
+
metadata: ResponseMetadata;
|
|
40
|
+
success: true;
|
|
41
|
+
}
|
|
42
|
+
export declare const SuraGetOperationResultCodec: import("../../_/codec.js").Codec;
|
|
43
|
+
export declare const SuraGetOperationResultResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { object, union } from "../../_/index.js";
|
|
4
|
+
import { SuraAffiliationCodec, SuraAppointmentPageCodec, SuraAuthorizationCodec, SuraAvailabilityCodec, SuraBookedAppointmentCodec, SuraCancelledAppointmentCodec, SuraCopayHistoryCodec, SuraNoContractCodec, SuraNoCopayHistoryCodec, SuraPatientFoundCodec, SuraPatientNotFoundCodec, SuraPendingResultCodec, SuraPreparationAvailableCodec, SuraPreparationExistingAppointmentCodec, SuraPreparationNoSlotsCodec, SuraPreparationPatientNotFoundCodec, SuraRefusalCodec, } from "../models.js";
|
|
5
|
+
export const SuraGetOperationResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientFoundCodec, () => SuraAvailabilityCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec, () => SuraBookedAppointmentCodec, () => SuraAppointmentPageCodec, () => SuraCancelledAppointmentCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec, () => SuraAuthorizationCodec, () => SuraCopayHistoryCodec, () => SuraNoCopayHistoryCodec]);
|
|
6
|
+
export const SuraGetOperationResultResponseCodec = object([
|
|
7
|
+
["data", null, () => SuraGetOperationResultCodec],
|
|
8
|
+
]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SuraLookupPatientBody, type SuraLookupPatientResultResponse } from "./models.js";
|
|
3
3
|
export interface ClientOptions extends BaseClientOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The URL the paths of the API are relative to.
|
|
@@ -24,42 +24,5 @@ export interface Client {
|
|
|
24
24
|
}
|
|
25
25
|
export declare function createClient(options: ClientOptions): Client;
|
|
26
26
|
export declare function bind(transport: Transport): Client;
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
* Complete document number of the patient receiving care, from readable
|
|
30
|
-
* original evidence or their message. Normalize separators without changing
|
|
31
|
-
* digits. Request correction only for missing, illegible or conflicting
|
|
32
|
-
* identity; never guess digits.
|
|
33
|
-
*/
|
|
34
|
-
documentNumber: string;
|
|
35
|
-
/**
|
|
36
|
-
* Patient document type read legibly from the original or explicitly
|
|
37
|
-
* supplied. Ask only if unknown or genuinely conflicting; never infer it from
|
|
38
|
-
* age or number length.
|
|
39
|
-
*/
|
|
40
|
-
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
41
|
-
/**
|
|
42
|
-
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
43
|
-
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
44
|
-
* This changes presentation only, never authorization, consent or
|
|
45
|
-
* idempotency.
|
|
46
|
-
*/
|
|
47
|
-
agentMode?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
50
|
-
* while the organization has one; required when it has several.
|
|
51
|
-
*/
|
|
52
|
-
connectionId?: string;
|
|
53
|
-
/**
|
|
54
|
-
* The channel the caller is waiting on, which sets how long it waits before
|
|
55
|
-
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
56
|
-
* others. Defaults to web.
|
|
57
|
-
*/
|
|
58
|
-
channel?: "voice" | "whatsapp" | "web";
|
|
59
|
-
}
|
|
60
|
-
export interface LookupResponse {
|
|
61
|
-
data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraPatientFound;
|
|
62
|
-
error: null;
|
|
63
|
-
metadata: SuraResponseMetadata;
|
|
64
|
-
success: true;
|
|
65
|
-
}
|
|
27
|
+
export type LookupRequest = SuraLookupPatientBody;
|
|
28
|
+
export type LookupResponse = SuraLookupPatientResultResponse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by forge. DO NOT EDIT.
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
import { Transport,
|
|
4
|
-
import {
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
import { SuraLookupPatientResultResponseCodec, } from "./models.js";
|
|
5
5
|
export function createClient(options) {
|
|
6
6
|
return bind(new Transport(options));
|
|
7
7
|
}
|
|
@@ -11,9 +11,9 @@ export function bind(transport) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
const LookupOperation = {
|
|
14
|
-
method: "
|
|
14
|
+
method: "POST",
|
|
15
15
|
route: "/v1/sura/patients/lookup",
|
|
16
|
-
|
|
17
|
-
response:
|
|
18
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
16
|
+
body: "flat",
|
|
17
|
+
response: SuraLookupPatientResultResponseCodec,
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|