@arbol-ai/sdk 2.5.0 → 2.7.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/dist/gmedic/models.d.ts +7 -0
- package/dist/gmedic/services/client.d.ts +39 -4
- package/dist/gmedic/services/client.js +1 -1
- package/dist/gmedic/services/index.d.ts +1 -1
- package/dist/gmedic/services/models.d.ts +3 -0
- package/dist/sura/affiliations/client.d.ts +7 -0
- package/dist/sura/affiliations/client.js +1 -1
- package/dist/sura/appointments/client.d.ts +44 -8
- package/dist/sura/appointments/client.js +2 -2
- package/dist/sura/authorizations/client.d.ts +7 -0
- package/dist/sura/authorizations/client.js +1 -1
- package/dist/sura/availability/client.d.ts +11 -1
- package/dist/sura/availability/client.js +1 -1
- package/dist/sura/client.d.ts +2 -0
- package/dist/sura/client.js +5 -0
- package/dist/sura/connections/client.d.ts +28 -3
- package/dist/sura/connections/client.js +3 -2
- package/dist/sura/copays/client.d.ts +7 -0
- package/dist/sura/copays/client.js +1 -1
- package/dist/sura/models.d.ts +22 -0
- package/dist/sura/operations/client.d.ts +7 -0
- package/dist/sura/operations/client.js +1 -1
- package/dist/sura/patients/client.d.ts +7 -0
- package/dist/sura/patients/client.js +1 -1
- package/dist/sura/professionals/client.d.ts +80 -0
- package/dist/sura/professionals/client.js +19 -0
- package/dist/sura/professionals/index.d.ts +5 -0
- package/dist/sura/professionals/index.js +4 -0
- package/dist/sura/professionals/models.d.ts +28 -0
- package/dist/sura/professionals/models.js +3 -0
- package/dist/sura/services/client.d.ts +7 -0
- package/dist/sura/services/client.js +1 -1
- package/package.json +3 -3
package/dist/gmedic/models.d.ts
CHANGED
|
@@ -92,6 +92,13 @@ export interface GmedicFailureResponse {
|
|
|
92
92
|
};
|
|
93
93
|
message: "This organization has no verified gMedic connection.";
|
|
94
94
|
retryable: false;
|
|
95
|
+
} | {
|
|
96
|
+
code: "CATALOG_SEARCH_INCOMPLETE";
|
|
97
|
+
data: {
|
|
98
|
+
[key: string]: unknown;
|
|
99
|
+
};
|
|
100
|
+
message: "The service catalog search could not be completed within its limits. Service absence cannot be concluded.";
|
|
101
|
+
retryable: false;
|
|
95
102
|
} | {
|
|
96
103
|
code: "PROVIDER_ACCESS_REJECTED";
|
|
97
104
|
data: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
2
|
import type { ResponseMetadata } from "../../models.js";
|
|
3
|
-
import type { GmedicServicesPage } from "./models.js";
|
|
3
|
+
import type { GmedicAgentServicesText, GmedicServicesPage } from "./models.js";
|
|
4
4
|
export interface ClientOptions extends BaseClientOptions {
|
|
5
5
|
/**
|
|
6
6
|
* The URL the paths of the API are relative to.
|
|
@@ -11,8 +11,15 @@ export interface Client {
|
|
|
11
11
|
/**
|
|
12
12
|
* List services
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* For voice/AI agents set agentMode=true: concise Spanish text, up to 10
|
|
15
|
+
* matches and a complete catalog cache of at most 60 seconds. Use q
|
|
16
|
+
* (name/code, accent-insensitive), active and kind filters; use a short
|
|
17
|
+
* distinctive term and limit 5 for a caller question. Filtered searches
|
|
18
|
+
* inspect all provider pages before returning matching entries. Incomplete
|
|
19
|
+
* scans fail explicitly. Without filters, returns one catalog page: follow
|
|
20
|
+
* pageInfo.nextCursor while hasNextPage is true before concluding an entry is
|
|
21
|
+
* absent. A generic procedure or missing price does not establish the
|
|
22
|
+
* requested service or tariff.
|
|
16
23
|
*/
|
|
17
24
|
list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
18
25
|
}
|
|
@@ -32,11 +39,39 @@ export interface ListRequest {
|
|
|
32
39
|
* another cursor.
|
|
33
40
|
*/
|
|
34
41
|
limit?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Set true for voice/AI agents: compact Spanish text, at most 10 matches,
|
|
44
|
+
* complete catalog search and a tenant-isolated catalog cache of at most 60
|
|
45
|
+
* seconds.
|
|
46
|
+
*/
|
|
47
|
+
agentMode?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Bypass the agent catalog cache and read the provider now.
|
|
50
|
+
*/
|
|
51
|
+
refresh?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Exact catalog id. Use q for a service name or code.
|
|
54
|
+
*/
|
|
35
55
|
id?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Search name, code and description across the catalog, ignoring accents and
|
|
58
|
+
* case. Use a distinctive word such as lavado. An empty completed search
|
|
59
|
+
* means no matching catalog entry, not that the clinic cannot perform the
|
|
60
|
+
* procedure.
|
|
61
|
+
*/
|
|
62
|
+
q?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Filter by the explicit catalog active flag. Omit to include unknown states.
|
|
65
|
+
*/
|
|
66
|
+
active?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Filter services or products. Use SERVICE for clinical service information.
|
|
69
|
+
*/
|
|
70
|
+
kind?: "SERVICE" | "PRODUCT";
|
|
36
71
|
connectionId?: string;
|
|
37
72
|
}
|
|
38
73
|
export interface ListResponse {
|
|
39
|
-
data: GmedicServicesPage;
|
|
74
|
+
data: GmedicServicesPage | GmedicAgentServicesText;
|
|
40
75
|
error: null;
|
|
41
76
|
metadata: ResponseMetadata;
|
|
42
77
|
success: true;
|
|
@@ -12,7 +12,7 @@ export function bind(transport) {
|
|
|
12
12
|
const ListOperation = {
|
|
13
13
|
method: "GET",
|
|
14
14
|
route: "/v1/gmedic/services",
|
|
15
|
-
query: { cursor: "cursor", direction: "direction", limit: "limit", id: "id", connectionId: "connectionId" },
|
|
15
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode", refresh: "refresh", id: "id", q: "q", active: "active", kind: "kind", connectionId: "connectionId" },
|
|
16
16
|
response: null,
|
|
17
17
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
18
18
|
};
|
|
@@ -2,4 +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, ListRequest, ListResponse, } from "./client.js";
|
|
5
|
-
export type { GmedicServicesPage } from "./models.js";
|
|
5
|
+
export type { GmedicAgentServicesText, GmedicServicesPage, } from "./models.js";
|
|
@@ -28,6 +28,13 @@ export interface LookupRequest {
|
|
|
28
28
|
* Document type. Defaults to CC.
|
|
29
29
|
*/
|
|
30
30
|
documentType?: "CC" | null;
|
|
31
|
+
/**
|
|
32
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
33
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
34
|
+
* This changes presentation only, never authorization, consent or
|
|
35
|
+
* idempotency.
|
|
36
|
+
*/
|
|
37
|
+
agentMode?: boolean;
|
|
31
38
|
/**
|
|
32
39
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
33
40
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const LookupOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/affiliations/lookup",
|
|
16
|
-
query: { documentNumber: "documentNumber", documentType: "documentType", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { documentNumber: "documentNumber", documentType: "documentType", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -70,6 +70,13 @@ export interface Client {
|
|
|
70
70
|
export declare function createClient(options: ClientOptions): Client;
|
|
71
71
|
export declare function bind(transport: Transport): Client;
|
|
72
72
|
export interface CancelRequest {
|
|
73
|
+
/**
|
|
74
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
75
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
76
|
+
* This changes presentation only, never authorization, consent or
|
|
77
|
+
* idempotency.
|
|
78
|
+
*/
|
|
79
|
+
agentMode?: boolean;
|
|
73
80
|
/**
|
|
74
81
|
* The channel the caller is waiting on, which sets how long it waits before
|
|
75
82
|
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
@@ -121,6 +128,13 @@ export interface CancelResponse {
|
|
|
121
128
|
success: true;
|
|
122
129
|
}
|
|
123
130
|
export interface CreateRequest {
|
|
131
|
+
/**
|
|
132
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
133
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
134
|
+
* This changes presentation only, never authorization, consent or
|
|
135
|
+
* idempotency.
|
|
136
|
+
*/
|
|
137
|
+
agentMode?: boolean;
|
|
124
138
|
/**
|
|
125
139
|
* The areaId list_services returned beside that service. Pass it with an
|
|
126
140
|
* exact serviceId to skip a catalog lookup; omit it whenever you are naming
|
|
@@ -212,6 +226,13 @@ export interface ListRequest {
|
|
|
212
226
|
* another cursor.
|
|
213
227
|
*/
|
|
214
228
|
limit?: number;
|
|
229
|
+
/**
|
|
230
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
231
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
232
|
+
* This changes presentation only, never authorization, consent or
|
|
233
|
+
* idempotency.
|
|
234
|
+
*/
|
|
235
|
+
agentMode?: boolean;
|
|
215
236
|
/**
|
|
216
237
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
217
238
|
* while the organization has one; required when it has several.
|
|
@@ -238,9 +259,11 @@ export interface PrepareRequest {
|
|
|
238
259
|
*/
|
|
239
260
|
areaId?: string | null;
|
|
240
261
|
/**
|
|
241
|
-
* A day
|
|
242
|
-
*
|
|
243
|
-
*
|
|
262
|
+
* A day the person asked for, as YYYY-MM-DD. Its openings come first; when it
|
|
263
|
+
* has none, the openings nearest to it on either side are offered instead and
|
|
264
|
+
* requestedDateAvailable is false. Omit it for the soonest openings. Resolve
|
|
265
|
+
* relative dates like "mañana" against the clinic's own timezone before
|
|
266
|
+
* calling.
|
|
244
267
|
*/
|
|
245
268
|
date?: string | null;
|
|
246
269
|
/**
|
|
@@ -257,14 +280,17 @@ export interface PrepareRequest {
|
|
|
257
280
|
*/
|
|
258
281
|
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
259
282
|
/**
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
283
|
+
* Whether other doctors of this service may be offered when the named doctor
|
|
284
|
+
* has no opening in the searched window. Defaults to true: the named doctor's
|
|
285
|
+
* openings come first, and only when that doctor has none are the other
|
|
286
|
+
* doctors' nearest openings returned, with requestedProfessionalAvailable
|
|
287
|
+
* false. Name the actual doctor of each option and obtain consent before
|
|
288
|
+
* booking. False keeps the named doctor as a strict filter.
|
|
263
289
|
*/
|
|
264
290
|
allowOtherProfessionals?: "true" | "false" | null;
|
|
265
291
|
/**
|
|
266
292
|
* Search from this day onward (YYYY-MM-DD), using the live calendar. Omit for
|
|
267
|
-
* today. Use date
|
|
293
|
+
* today. Use date for a specific day.
|
|
268
294
|
*/
|
|
269
295
|
fromDate?: string | null;
|
|
270
296
|
/**
|
|
@@ -293,7 +319,10 @@ export interface PrepareRequest {
|
|
|
293
319
|
mode?: "schedule" | "reschedule" | null;
|
|
294
320
|
/**
|
|
295
321
|
* Doctor's name, or part of it, when the caller asked for someone specific.
|
|
296
|
-
*
|
|
322
|
+
* Use list_professionals to check the service's registered doctors
|
|
323
|
+
* independently of available slots; absence from an open-agenda selector does
|
|
324
|
+
* not mean the doctor does not exist. Omit it to see whoever has room
|
|
325
|
+
* soonest.
|
|
297
326
|
*/
|
|
298
327
|
professional?: string | null;
|
|
299
328
|
/**
|
|
@@ -303,6 +332,13 @@ export interface PrepareRequest {
|
|
|
303
332
|
* qualifiers.
|
|
304
333
|
*/
|
|
305
334
|
serviceId: string;
|
|
335
|
+
/**
|
|
336
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
337
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
338
|
+
* This changes presentation only, never authorization, consent or
|
|
339
|
+
* idempotency.
|
|
340
|
+
*/
|
|
341
|
+
agentMode?: boolean;
|
|
306
342
|
/**
|
|
307
343
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
308
344
|
* while the organization has one; required when it has several.
|
|
@@ -30,14 +30,14 @@ const CreateOperation = {
|
|
|
30
30
|
const ListOperation = {
|
|
31
31
|
method: "GET",
|
|
32
32
|
route: "/v1/sura/appointments",
|
|
33
|
-
query: { documentNumber: "documentNumber", documentType: "documentType", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
|
|
33
|
+
query: { documentNumber: "documentNumber", documentType: "documentType", cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
34
34
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec])]]),
|
|
35
35
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
36
36
|
};
|
|
37
37
|
const PrepareOperation = {
|
|
38
38
|
method: "GET",
|
|
39
39
|
route: "/v1/sura/appointments/prepare",
|
|
40
|
-
query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", allowOtherProfessionals: "allowOtherProfessionals", fromDate: "fromDate", timeFrom: "timeFrom", timeUntil: "timeUntil", limit: "limit", latestDate: "latestDate", mode: "mode", professional: "professional", serviceId: "serviceId", connectionId: "connectionId", channel: "channel" },
|
|
40
|
+
query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", allowOtherProfessionals: "allowOtherProfessionals", fromDate: "fromDate", timeFrom: "timeFrom", timeUntil: "timeUntil", limit: "limit", latestDate: "latestDate", mode: "mode", professional: "professional", serviceId: "serviceId", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
41
41
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec])]]),
|
|
42
42
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
43
43
|
};
|
|
@@ -38,6 +38,13 @@ export interface LookupRequest {
|
|
|
38
38
|
* Issuer code before the hyphen in the authorization identifier.
|
|
39
39
|
*/
|
|
40
40
|
issuerCode: string;
|
|
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;
|
|
41
48
|
/**
|
|
42
49
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
43
50
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const LookupOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/authorizations/lookup",
|
|
16
|
-
query: { authorizationNumber: "authorizationNumber", documentNumber: "documentNumber", documentType: "documentType", issuerCode: "issuerCode", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { authorizationNumber: "authorizationNumber", documentNumber: "documentNumber", documentType: "documentType", issuerCode: "issuerCode", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraAuthorizationCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -49,7 +49,10 @@ export interface ListRequest {
|
|
|
49
49
|
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
50
50
|
/**
|
|
51
51
|
* Doctor's name, or part of it, when the caller asked for someone specific.
|
|
52
|
-
*
|
|
52
|
+
* Use list_professionals to check the service's registered doctors
|
|
53
|
+
* independently of available slots; absence from an open-agenda selector does
|
|
54
|
+
* not mean the doctor does not exist. Omit it to see whoever has room
|
|
55
|
+
* soonest.
|
|
53
56
|
*/
|
|
54
57
|
professional?: string | null;
|
|
55
58
|
/**
|
|
@@ -59,6 +62,13 @@ export interface ListRequest {
|
|
|
59
62
|
* ask which one instead of guessing.
|
|
60
63
|
*/
|
|
61
64
|
serviceId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
67
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
68
|
+
* This changes presentation only, never authorization, consent or
|
|
69
|
+
* idempotency.
|
|
70
|
+
*/
|
|
71
|
+
agentMode?: boolean;
|
|
62
72
|
/**
|
|
63
73
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
64
74
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const ListOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/availability",
|
|
16
|
-
query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", professional: "professional", serviceId: "serviceId", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", professional: "professional", serviceId: "serviceId", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraAvailabilityCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
package/dist/sura/client.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { type Client as ConnectionsClient } from "./connections/client.js";
|
|
|
7
7
|
import { type Client as CopaysClient } from "./copays/client.js";
|
|
8
8
|
import { type Client as OperationsClient } from "./operations/client.js";
|
|
9
9
|
import { type Client as PatientsClient } from "./patients/client.js";
|
|
10
|
+
import { type Client as ProfessionalsClient } from "./professionals/client.js";
|
|
10
11
|
import { type Client as ServicesClient } from "./services/client.js";
|
|
11
12
|
export interface ClientOptions extends BaseClientOptions {
|
|
12
13
|
/**
|
|
@@ -23,6 +24,7 @@ export interface Client {
|
|
|
23
24
|
readonly copays: CopaysClient;
|
|
24
25
|
readonly operations: OperationsClient;
|
|
25
26
|
readonly patients: PatientsClient;
|
|
27
|
+
readonly professionals: ProfessionalsClient;
|
|
26
28
|
readonly services: ServicesClient;
|
|
27
29
|
}
|
|
28
30
|
export declare function createClient(options: ClientOptions): Client;
|
package/dist/sura/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import { bind as bindConnections, } from "./connections/client.js";
|
|
|
9
9
|
import { bind as bindCopays, } from "./copays/client.js";
|
|
10
10
|
import { bind as bindOperations, } from "./operations/client.js";
|
|
11
11
|
import { bind as bindPatients, } from "./patients/client.js";
|
|
12
|
+
import { bind as bindProfessionals, } from "./professionals/client.js";
|
|
12
13
|
import { bind as bindServices, } from "./services/client.js";
|
|
13
14
|
export function createClient(options) {
|
|
14
15
|
return bind(new Transport(options));
|
|
@@ -22,6 +23,7 @@ export function bind(transport) {
|
|
|
22
23
|
let copaysClient;
|
|
23
24
|
let operationsClient;
|
|
24
25
|
let patientsClient;
|
|
26
|
+
let professionalsClient;
|
|
25
27
|
let servicesClient;
|
|
26
28
|
return {
|
|
27
29
|
get affiliations() {
|
|
@@ -48,6 +50,9 @@ export function bind(transport) {
|
|
|
48
50
|
get patients() {
|
|
49
51
|
return (patientsClient ??= bindPatients(transport));
|
|
50
52
|
},
|
|
53
|
+
get professionals() {
|
|
54
|
+
return (professionalsClient ??= bindProfessionals(transport));
|
|
55
|
+
},
|
|
51
56
|
get services() {
|
|
52
57
|
return (servicesClient ??= bindServices(transport));
|
|
53
58
|
},
|
|
@@ -54,9 +54,13 @@ export interface DeleteRequest {
|
|
|
54
54
|
* own organization's.
|
|
55
55
|
*/
|
|
56
56
|
id: string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
/**
|
|
58
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
59
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
60
|
+
* This changes presentation only, never authorization, consent or
|
|
61
|
+
* idempotency.
|
|
62
|
+
*/
|
|
63
|
+
agentMode?: boolean;
|
|
60
64
|
}
|
|
61
65
|
export interface DeleteResponse {
|
|
62
66
|
data: DeletedObject;
|
|
@@ -70,6 +74,13 @@ export interface GetRequest {
|
|
|
70
74
|
* own organization's.
|
|
71
75
|
*/
|
|
72
76
|
id: string;
|
|
77
|
+
/**
|
|
78
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
79
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
80
|
+
* This changes presentation only, never authorization, consent or
|
|
81
|
+
* idempotency.
|
|
82
|
+
*/
|
|
83
|
+
agentMode?: boolean;
|
|
73
84
|
}
|
|
74
85
|
export interface GetResponse {
|
|
75
86
|
/**
|
|
@@ -94,6 +105,13 @@ export interface ListRequest {
|
|
|
94
105
|
* another cursor.
|
|
95
106
|
*/
|
|
96
107
|
limit?: number;
|
|
108
|
+
/**
|
|
109
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
110
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
111
|
+
* This changes presentation only, never authorization, consent or
|
|
112
|
+
* idempotency.
|
|
113
|
+
*/
|
|
114
|
+
agentMode?: boolean;
|
|
97
115
|
}
|
|
98
116
|
export interface ListResponse {
|
|
99
117
|
data: SuraConnectionPage;
|
|
@@ -107,6 +125,13 @@ export interface VerifyRequest {
|
|
|
107
125
|
* own organization's.
|
|
108
126
|
*/
|
|
109
127
|
connectionId: string;
|
|
128
|
+
/**
|
|
129
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
130
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
131
|
+
* This changes presentation only, never authorization, consent or
|
|
132
|
+
* idempotency.
|
|
133
|
+
*/
|
|
134
|
+
agentMode?: boolean;
|
|
110
135
|
/**
|
|
111
136
|
* Agenda only: the institution (IPS) the connection schedules in, which every
|
|
112
137
|
* login must see. Without it, the connection keeps its own, or takes the one
|
|
@@ -16,20 +16,21 @@ export function bind(transport) {
|
|
|
16
16
|
const DeleteOperation = {
|
|
17
17
|
method: "DELETE",
|
|
18
18
|
route: "/v1/sura/connections/{id}",
|
|
19
|
-
body: "
|
|
19
|
+
body: "flat",
|
|
20
20
|
response: null,
|
|
21
21
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
22
22
|
};
|
|
23
23
|
const GetOperation = {
|
|
24
24
|
method: "GET",
|
|
25
25
|
route: "/v1/sura/connections/{id}",
|
|
26
|
+
query: { agentMode: "agentMode" },
|
|
26
27
|
response: object([["data", null, () => SuraConnectionCodec]]),
|
|
27
28
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
28
29
|
};
|
|
29
30
|
const ListOperation = {
|
|
30
31
|
method: "GET",
|
|
31
32
|
route: "/v1/sura/connections",
|
|
32
|
-
query: { cursor: "cursor", direction: "direction", limit: "limit" },
|
|
33
|
+
query: { cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode" },
|
|
33
34
|
response: object([["data", null, () => SuraConnectionPageCodec]]),
|
|
34
35
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
35
36
|
};
|
|
@@ -33,6 +33,13 @@ export interface ListRequest {
|
|
|
33
33
|
* Explicit four-digit year for copay history, from 2000 to 2099.
|
|
34
34
|
*/
|
|
35
35
|
year: string;
|
|
36
|
+
/**
|
|
37
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
38
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
39
|
+
* This changes presentation only, never authorization, consent or
|
|
40
|
+
* idempotency.
|
|
41
|
+
*/
|
|
42
|
+
agentMode?: boolean;
|
|
36
43
|
/**
|
|
37
44
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
38
45
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const ListOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/copays",
|
|
16
|
-
query: { documentNumber: "documentNumber", documentType: "documentType", year: "year", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { documentNumber: "documentNumber", documentType: "documentType", year: "year", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraCopayHistoryCodec, () => SuraNoCopayHistoryCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
package/dist/sura/models.d.ts
CHANGED
|
@@ -449,6 +449,17 @@ export interface SuraPreparationAvailable {
|
|
|
449
449
|
patient: SuraAvailabilityPatient;
|
|
450
450
|
plan: string | null;
|
|
451
451
|
professional: string | null;
|
|
452
|
+
/**
|
|
453
|
+
* Present when a date was given: true when an option falls on that day, false
|
|
454
|
+
* when it had none and any options are the nearest days to it.
|
|
455
|
+
*/
|
|
456
|
+
requestedDateAvailable?: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* Present when a professional was named: true when the options are that
|
|
459
|
+
* doctor's, false when that doctor had no opening in the searched window and
|
|
460
|
+
* any options are other doctors' of the same service.
|
|
461
|
+
*/
|
|
462
|
+
requestedProfessionalAvailable?: boolean;
|
|
452
463
|
/**
|
|
453
464
|
* False when the bounded search stopped before establishing the requested
|
|
454
465
|
* nearest options.
|
|
@@ -501,6 +512,17 @@ export interface SuraPreparationNoSlots {
|
|
|
501
512
|
patient: SuraAvailabilityPatient;
|
|
502
513
|
plan: string | null;
|
|
503
514
|
professional: string | null;
|
|
515
|
+
/**
|
|
516
|
+
* Present when a date was given: true when an option falls on that day, false
|
|
517
|
+
* when it had none and any options are the nearest days to it.
|
|
518
|
+
*/
|
|
519
|
+
requestedDateAvailable?: boolean;
|
|
520
|
+
/**
|
|
521
|
+
* Present when a professional was named: true when the options are that
|
|
522
|
+
* doctor's, false when that doctor had no opening in the searched window and
|
|
523
|
+
* any options are other doctors' of the same service.
|
|
524
|
+
*/
|
|
525
|
+
requestedProfessionalAvailable?: boolean;
|
|
504
526
|
/**
|
|
505
527
|
* False when the bounded search stopped before establishing the requested
|
|
506
528
|
* nearest options.
|
|
@@ -27,6 +27,13 @@ export interface GetRequest {
|
|
|
27
27
|
* The operationId of the pending answer, exactly as it was returned.
|
|
28
28
|
*/
|
|
29
29
|
operationId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
32
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
33
|
+
* This changes presentation only, never authorization, consent or
|
|
34
|
+
* idempotency.
|
|
35
|
+
*/
|
|
36
|
+
agentMode?: boolean;
|
|
30
37
|
/**
|
|
31
38
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
32
39
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const GetOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/operations/{operationId}",
|
|
16
|
-
query: { connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraPreparationPatientNotFoundCodec, () => SuraPatientFoundCodec, () => SuraAvailabilityCodec, () => SuraPreparationExistingAppointmentCodec, () => SuraPreparationAvailableCodec, () => SuraPreparationNoSlotsCodec, () => SuraBookedAppointmentCodec, () => SuraCancelledAppointmentCodec, () => SuraAffiliationCodec, () => SuraNoContractCodec, () => SuraAuthorizationCodec, () => SuraCopayHistoryCodec, () => SuraNoCopayHistoryCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -39,6 +39,13 @@ export interface LookupRequest {
|
|
|
39
39
|
* age or number length.
|
|
40
40
|
*/
|
|
41
41
|
documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
|
|
42
|
+
/**
|
|
43
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
44
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
45
|
+
* This changes presentation only, never authorization, consent or
|
|
46
|
+
* idempotency.
|
|
47
|
+
*/
|
|
48
|
+
agentMode?: boolean;
|
|
42
49
|
/**
|
|
43
50
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
44
51
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const LookupOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/patients/lookup",
|
|
16
|
-
query: { documentNumber: "documentNumber", documentType: "documentType", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { documentNumber: "documentNumber", documentType: "documentType", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraPatientFoundCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { ResponseMetadata } from "../../models.js";
|
|
3
|
+
import { type SuraPendingResult, type SuraRefusal } from "../models.js";
|
|
4
|
+
import type { SuraProfessionalPage } from "./models.js";
|
|
5
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The URL the paths of the API are relative to.
|
|
8
|
+
*/
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
}
|
|
11
|
+
export interface Client {
|
|
12
|
+
/**
|
|
13
|
+
* List registered professionals
|
|
14
|
+
*
|
|
15
|
+
* List SURA's registered professionals for a service at this connection's
|
|
16
|
+
* institution, including doctors without published or free appointments.
|
|
17
|
+
* First obtain serviceId and optionally areaId from list_services. No patient
|
|
18
|
+
* identity is needed. Follow pageInfo.nextCursor while hasNextPage is true
|
|
19
|
+
* before concluding a name is absent from this scoped directory. Absence does
|
|
20
|
+
* not establish that a doctor does not exist or works nowhere else.
|
|
21
|
+
* Registration does not establish coverage, authorization, or availability:
|
|
22
|
+
* use prepare_appointment with the patient's evidence and the requested
|
|
23
|
+
* professional name to find actual slots. Never substitute another doctor
|
|
24
|
+
* without the patient's agreement. An unreadable or incomplete provider
|
|
25
|
+
* directory is a technical failure, not an empty list.
|
|
26
|
+
*/
|
|
27
|
+
list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
28
|
+
}
|
|
29
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
30
|
+
export declare function bind(transport: Transport): Client;
|
|
31
|
+
export interface ListRequest {
|
|
32
|
+
/**
|
|
33
|
+
* The areaId list_services returned beside that service. Pass it with an
|
|
34
|
+
* exact serviceId to skip a catalog lookup; omit it whenever you are naming
|
|
35
|
+
* the service in words.
|
|
36
|
+
*/
|
|
37
|
+
areaId?: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* Exact numeric service id returned by list_services. This directory is not
|
|
40
|
+
* filtered by patient coverage or available appointments.
|
|
41
|
+
*/
|
|
42
|
+
serviceId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
45
|
+
*/
|
|
46
|
+
cursor?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
49
|
+
*/
|
|
50
|
+
direction?: "forward" | "backward";
|
|
51
|
+
/**
|
|
52
|
+
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
53
|
+
* another cursor.
|
|
54
|
+
*/
|
|
55
|
+
limit?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
58
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
59
|
+
* This changes presentation only, never authorization, consent or
|
|
60
|
+
* idempotency.
|
|
61
|
+
*/
|
|
62
|
+
agentMode?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
65
|
+
* while the organization has one; required when it has several.
|
|
66
|
+
*/
|
|
67
|
+
connectionId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The channel the caller is waiting on, which sets how long it waits before
|
|
70
|
+
* an answer comes back pending, and puts a phone call's reads ahead of
|
|
71
|
+
* others. Defaults to web.
|
|
72
|
+
*/
|
|
73
|
+
channel?: "voice" | "whatsapp" | "web";
|
|
74
|
+
}
|
|
75
|
+
export interface ListResponse {
|
|
76
|
+
data: SuraPendingResult | SuraRefusal | SuraProfessionalPage;
|
|
77
|
+
error: null;
|
|
78
|
+
metadata: ResponseMetadata;
|
|
79
|
+
success: true;
|
|
80
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, object, union, } from "../../_/index.js";
|
|
4
|
+
import { SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
|
|
5
|
+
export function createClient(options) {
|
|
6
|
+
return bind(new Transport(options));
|
|
7
|
+
}
|
|
8
|
+
export function bind(transport) {
|
|
9
|
+
return {
|
|
10
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const ListOperation = {
|
|
14
|
+
method: "GET",
|
|
15
|
+
route: "/v1/sura/professionals",
|
|
16
|
+
query: { areaId: "areaId", serviceId: "serviceId", cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
|
+
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec])]]),
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
|
+
};
|
|
@@ -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, ListRequest, ListResponse, } from "./client.js";
|
|
5
|
+
export type { SuraProfessional, SuraProfessionalPage, } from "./models.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PageInfo } from "../../models.js";
|
|
2
|
+
export interface SuraProfessional {
|
|
3
|
+
areaId: string;
|
|
4
|
+
availabilityChecked: false;
|
|
5
|
+
/**
|
|
6
|
+
* Opaque directory identity. Use name, not this id, when requesting
|
|
7
|
+
* availability.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
registered: true;
|
|
12
|
+
serviceId: string;
|
|
13
|
+
serviceName: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SuraProfessionalPage {
|
|
16
|
+
/**
|
|
17
|
+
* Items admitted by this resource contract within the verified organization.
|
|
18
|
+
*/
|
|
19
|
+
data: SuraProfessional[];
|
|
20
|
+
/**
|
|
21
|
+
* Discriminator for a resource list response.
|
|
22
|
+
*/
|
|
23
|
+
object: "list";
|
|
24
|
+
/**
|
|
25
|
+
* Opaque navigation cursors for this page’s stable keyset order.
|
|
26
|
+
*/
|
|
27
|
+
pageInfo: PageInfo;
|
|
28
|
+
}
|
|
@@ -47,6 +47,13 @@ export interface ListRequest {
|
|
|
47
47
|
* another cursor.
|
|
48
48
|
*/
|
|
49
49
|
limit?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Set agentMode=true when calling this tool for an AI agent. The answer is
|
|
52
|
+
* concise Spanish text instead of JSON. Omit it for structured machine data.
|
|
53
|
+
* This changes presentation only, never authorization, consent or
|
|
54
|
+
* idempotency.
|
|
55
|
+
*/
|
|
56
|
+
agentMode?: boolean;
|
|
50
57
|
/**
|
|
51
58
|
* Which of the organization's SURA connections to run on, by its id. Optional
|
|
52
59
|
* while the organization has one; required when it has several.
|
|
@@ -13,7 +13,7 @@ export function bind(transport) {
|
|
|
13
13
|
const ListOperation = {
|
|
14
14
|
method: "GET",
|
|
15
15
|
route: "/v1/sura/services",
|
|
16
|
-
query: { areaId: "areaId", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
query: { areaId: "areaId", cursor: "cursor", direction: "direction", limit: "limit", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
|
|
17
17
|
response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec])]]),
|
|
18
18
|
errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arbol",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"packageManager": "bun@1.4.3",
|
|
51
51
|
"arbol": {
|
|
52
52
|
"openapi": {
|
|
53
|
-
"release": "1.
|
|
54
|
-
"sha256": "
|
|
53
|
+
"release": "1.20261022.214640",
|
|
54
|
+
"sha256": "7ab911484cc0f05d9a2ef6b4851b369b666ccfdb43cb7086b6f91f60755f855a"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|