@arbol-ai/sdk 2.19.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/client.d.ts +0 -4
- package/dist/raiz/client.js +0 -10
- 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,18 @@
|
|
|
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
|
+
list: (request, options) => transport.send(ListOperation, request, options),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const ListOperation = {
|
|
13
|
+
method: "GET",
|
|
14
|
+
route: "/v1/somos/contracts",
|
|
15
|
+
query: { eps: "eps", regimen: "regimen", refresh: "refresh", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
|
|
16
|
+
response: null,
|
|
17
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
18
|
+
};
|
|
@@ -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 { SomosContract, SomosContractPage, SomosContractPageResponse, SomosListContractsBadGatewayError, SomosListContractsConflictError, SomosListContractsConflictFailure, SomosListContractsNotFoundError, SomosListContractsNotFoundFailure, SomosListContractsServiceUnavailableError, SomosListContractsServiceUnavailableFailure, SomosListContractsUnprocessableContentError, } from "./models.js";
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, ListContractsBadGatewayFailure, ListContractsUnprocessableContentFailure, PageInfo, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
|
|
3
|
+
export interface SomosContract {
|
|
4
|
+
/**
|
|
5
|
+
* The contract, as somos.services.list and somos.availability.lookup take it.
|
|
6
|
+
*/
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* The only specialties this contract schedules, when the clinic splits a
|
|
10
|
+
* payer into several contracts: another specialty is in a sibling contract of
|
|
11
|
+
* the same payer.
|
|
12
|
+
*/
|
|
13
|
+
covers?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* The contract's name: the payer or plan, to say to the person.
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SomosContractPage {
|
|
20
|
+
/**
|
|
21
|
+
* Items admitted by this resource contract within the verified organization.
|
|
22
|
+
*/
|
|
23
|
+
data: SomosContract[];
|
|
24
|
+
/**
|
|
25
|
+
* Discriminator for a resource list response.
|
|
26
|
+
*/
|
|
27
|
+
object: "list";
|
|
28
|
+
/**
|
|
29
|
+
* Opaque navigation cursors for this page’s stable keyset order.
|
|
30
|
+
*/
|
|
31
|
+
pageInfo: PageInfo;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A successful answer.
|
|
35
|
+
*/
|
|
36
|
+
export interface SomosContractPageResponse {
|
|
37
|
+
data: SomosContractPage;
|
|
38
|
+
error: null;
|
|
39
|
+
/**
|
|
40
|
+
* What every answer carries besides its data or error.
|
|
41
|
+
*/
|
|
42
|
+
metadata: SomosResponseMetadata;
|
|
43
|
+
success: true;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A failed answer.
|
|
47
|
+
*/
|
|
48
|
+
export interface SomosListContractsBadGatewayError {
|
|
49
|
+
data: null;
|
|
50
|
+
error: ListContractsBadGatewayFailure;
|
|
51
|
+
/**
|
|
52
|
+
* What every answer carries besides its data or error.
|
|
53
|
+
*/
|
|
54
|
+
metadata: SomosResponseMetadata;
|
|
55
|
+
success: false;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A failed answer.
|
|
59
|
+
*/
|
|
60
|
+
export interface SomosListContractsConflictError {
|
|
61
|
+
data: null;
|
|
62
|
+
error: SomosListContractsConflictFailure;
|
|
63
|
+
/**
|
|
64
|
+
* What every answer carries besides its data or error.
|
|
65
|
+
*/
|
|
66
|
+
metadata: SomosResponseMetadata;
|
|
67
|
+
success: false;
|
|
68
|
+
}
|
|
69
|
+
export type SomosListContractsConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
|
|
70
|
+
/**
|
|
71
|
+
* A failed answer.
|
|
72
|
+
*/
|
|
73
|
+
export interface SomosListContractsNotFoundError {
|
|
74
|
+
data: null;
|
|
75
|
+
error: SomosListContractsNotFoundFailure;
|
|
76
|
+
/**
|
|
77
|
+
* What every answer carries besides its data or error.
|
|
78
|
+
*/
|
|
79
|
+
metadata: SomosResponseMetadata;
|
|
80
|
+
success: false;
|
|
81
|
+
}
|
|
82
|
+
export type SomosListContractsNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
|
|
83
|
+
/**
|
|
84
|
+
* A failed answer.
|
|
85
|
+
*/
|
|
86
|
+
export interface SomosListContractsServiceUnavailableError {
|
|
87
|
+
data: null;
|
|
88
|
+
error: SomosListContractsServiceUnavailableFailure;
|
|
89
|
+
/**
|
|
90
|
+
* What every answer carries besides its data or error.
|
|
91
|
+
*/
|
|
92
|
+
metadata: SomosResponseMetadata;
|
|
93
|
+
success: false;
|
|
94
|
+
}
|
|
95
|
+
export type SomosListContractsServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
|
|
96
|
+
/**
|
|
97
|
+
* A failed answer.
|
|
98
|
+
*/
|
|
99
|
+
export interface SomosListContractsUnprocessableContentError {
|
|
100
|
+
data: null;
|
|
101
|
+
error: ListContractsUnprocessableContentFailure;
|
|
102
|
+
/**
|
|
103
|
+
* What every answer carries besides its data or error.
|
|
104
|
+
*/
|
|
105
|
+
metadata: SomosResponseMetadata;
|
|
106
|
+
success: false;
|
|
107
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { SomosTherapyGroupPageResponse } from "./models.js";
|
|
3
|
+
export interface ClientOptions extends BaseClientOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The URL the paths of the API are relative to.
|
|
6
|
+
*/
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Client {
|
|
10
|
+
/**
|
|
11
|
+
* List therapy groups
|
|
12
|
+
*
|
|
13
|
+
* The current therapy groups of a specialty, each with how it matched the
|
|
14
|
+
* name the person said: exact is their group; suggested and all are options
|
|
15
|
+
* the person recognizes theirs among, never one an Agent picks. The age
|
|
16
|
+
* validates a group and never chooses it. Never invent a group or an age
|
|
17
|
+
* range. A refusal is TOOL_REFUSED: data.reason says why, data.guidance what
|
|
18
|
+
* to do next and data.details what it offers instead; it is never an outage.
|
|
19
|
+
* Somos Salud's tool pack sets this tool's rules, parameters and accepted
|
|
20
|
+
* values (somos.tools.list answers them), and every call is checked against
|
|
21
|
+
* them.
|
|
22
|
+
*/
|
|
23
|
+
list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
26
|
+
export declare function bind(transport: Transport): Client;
|
|
27
|
+
export interface ListRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Fonoaudiología/fono o terapia ocupacional/to; el servidor normaliza el
|
|
30
|
+
* nombre clínico al código interno.
|
|
31
|
+
*/
|
|
32
|
+
specialty: string;
|
|
33
|
+
/**
|
|
34
|
+
* Nombre del grupo tal como lo dijo la persona; el servidor lo empareja con
|
|
35
|
+
* los grupos vigentes. Usa solo un nombre de grupo realmente asignado.
|
|
36
|
+
* Lenguaje, terapia o grupo son términos genéricos y devuelven
|
|
37
|
+
* GROUP_ASSIGNMENT_REQUIRED, sin catálogo. Una aproximación reconocible
|
|
38
|
+
* devuelve hasta tres sugerencias para confirmar; un texto sin coincidencias
|
|
39
|
+
* requiere aclarar la asignación.
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
44
|
+
*/
|
|
45
|
+
cursor?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
48
|
+
*/
|
|
49
|
+
direction?: "forward" | "backward";
|
|
50
|
+
/**
|
|
51
|
+
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
52
|
+
* another cursor.
|
|
53
|
+
*/
|
|
54
|
+
limit?: number;
|
|
55
|
+
/**
|
|
56
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
57
|
+
* the organization has one; required when it has several. Another
|
|
58
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
59
|
+
*/
|
|
60
|
+
connectionId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
63
|
+
* default).
|
|
64
|
+
*/
|
|
65
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
66
|
+
}
|
|
67
|
+
export type ListResponse = SomosTherapyGroupPageResponse;
|
|
@@ -11,8 +11,8 @@ export function bind(transport) {
|
|
|
11
11
|
}
|
|
12
12
|
const ListOperation = {
|
|
13
13
|
method: "GET",
|
|
14
|
-
route: "/v1/
|
|
14
|
+
route: "/v1/somos/groups",
|
|
15
15
|
query: { specialty: "specialty", name: "name", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
|
|
16
16
|
response: null,
|
|
17
|
-
errors: { "400": true, "401": true, "403": true, "404": true, "
|
|
17
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
18
18
|
};
|
|
@@ -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 { SomosListGroupsBadGatewayError, SomosListGroupsBadGatewayFailure, SomosListGroupsConflictError, SomosListGroupsConflictFailure, SomosListGroupsNotFoundError, SomosListGroupsNotFoundFailure, SomosListGroupsServiceUnavailableError, SomosListGroupsServiceUnavailableFailure, SomosListGroupsUnprocessableContentError, SomosListGroupsUnprocessableContentFailure, SomosTherapyGroup, SomosTherapyGroupPage, SomosTherapyGroupPageResponse, } from "./models.js";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CredentialsRejectedFailure, OutcomeUnknownFailure, PageInfo, ProviderUnavailableFailure, ToolRefusedFailure, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface SomosListGroupsBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: SomosListGroupsBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: SomosResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export type SomosListGroupsBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
|
|
16
|
+
/**
|
|
17
|
+
* A failed answer.
|
|
18
|
+
*/
|
|
19
|
+
export interface SomosListGroupsConflictError {
|
|
20
|
+
data: null;
|
|
21
|
+
error: SomosListGroupsConflictFailure;
|
|
22
|
+
/**
|
|
23
|
+
* What every answer carries besides its data or error.
|
|
24
|
+
*/
|
|
25
|
+
metadata: SomosResponseMetadata;
|
|
26
|
+
success: false;
|
|
27
|
+
}
|
|
28
|
+
export type SomosListGroupsConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
|
|
29
|
+
/**
|
|
30
|
+
* A failed answer.
|
|
31
|
+
*/
|
|
32
|
+
export interface SomosListGroupsNotFoundError {
|
|
33
|
+
data: null;
|
|
34
|
+
error: SomosListGroupsNotFoundFailure;
|
|
35
|
+
/**
|
|
36
|
+
* What every answer carries besides its data or error.
|
|
37
|
+
*/
|
|
38
|
+
metadata: SomosResponseMetadata;
|
|
39
|
+
success: false;
|
|
40
|
+
}
|
|
41
|
+
export type SomosListGroupsNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
|
|
42
|
+
/**
|
|
43
|
+
* A failed answer.
|
|
44
|
+
*/
|
|
45
|
+
export interface SomosListGroupsServiceUnavailableError {
|
|
46
|
+
data: null;
|
|
47
|
+
error: SomosListGroupsServiceUnavailableFailure;
|
|
48
|
+
/**
|
|
49
|
+
* What every answer carries besides its data or error.
|
|
50
|
+
*/
|
|
51
|
+
metadata: SomosResponseMetadata;
|
|
52
|
+
success: false;
|
|
53
|
+
}
|
|
54
|
+
export type SomosListGroupsServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
|
|
55
|
+
/**
|
|
56
|
+
* A failed answer.
|
|
57
|
+
*/
|
|
58
|
+
export interface SomosListGroupsUnprocessableContentError {
|
|
59
|
+
data: null;
|
|
60
|
+
error: SomosListGroupsUnprocessableContentFailure;
|
|
61
|
+
/**
|
|
62
|
+
* What every answer carries besides its data or error.
|
|
63
|
+
*/
|
|
64
|
+
metadata: SomosResponseMetadata;
|
|
65
|
+
success: false;
|
|
66
|
+
}
|
|
67
|
+
export type SomosListGroupsUnprocessableContentFailure = CredentialsRejectedFailure | ToolRefusedFailure;
|
|
68
|
+
export interface SomosTherapyGroup {
|
|
69
|
+
/**
|
|
70
|
+
* The ages the group admits: it validates a choice, never makes one.
|
|
71
|
+
*/
|
|
72
|
+
ageRange: string;
|
|
73
|
+
/**
|
|
74
|
+
* The group, as somos.availability.lookup takes it.
|
|
75
|
+
*/
|
|
76
|
+
id: string;
|
|
77
|
+
/**
|
|
78
|
+
* The group's name, to read to the person.
|
|
79
|
+
*/
|
|
80
|
+
label: string;
|
|
81
|
+
/**
|
|
82
|
+
* exact: the group the person named. suggested: the closest to the name, and
|
|
83
|
+
* all: every group, when nothing matched; the person recognizes theirs, an
|
|
84
|
+
* Agent never picks one.
|
|
85
|
+
*/
|
|
86
|
+
match: "exact" | "suggested" | "all";
|
|
87
|
+
/**
|
|
88
|
+
* When the group meets.
|
|
89
|
+
*/
|
|
90
|
+
schedule: string;
|
|
91
|
+
}
|
|
92
|
+
export interface SomosTherapyGroupPage {
|
|
93
|
+
/**
|
|
94
|
+
* Items admitted by this resource contract within the verified organization.
|
|
95
|
+
*/
|
|
96
|
+
data: SomosTherapyGroup[];
|
|
97
|
+
/**
|
|
98
|
+
* Discriminator for a resource list response.
|
|
99
|
+
*/
|
|
100
|
+
object: "list";
|
|
101
|
+
/**
|
|
102
|
+
* Opaque navigation cursors for this page’s stable keyset order.
|
|
103
|
+
*/
|
|
104
|
+
pageInfo: PageInfo;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A successful answer.
|
|
108
|
+
*/
|
|
109
|
+
export interface SomosTherapyGroupPageResponse {
|
|
110
|
+
data: SomosTherapyGroupPage;
|
|
111
|
+
error: null;
|
|
112
|
+
/**
|
|
113
|
+
* What every answer carries besides its data or error.
|
|
114
|
+
*/
|
|
115
|
+
metadata: SomosResponseMetadata;
|
|
116
|
+
success: true;
|
|
117
|
+
}
|
|
@@ -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 { SomosClinicNotServedFailure, SomosCredentialsRejectedError, SomosForbiddenError, SomosInternalError, SomosInvalidInputError, SomosRateLimitedError, SomosRequestTooLargeError, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure, SomosToolResultResponse, SomosUnauthorizedError, SomosUnsupportedMediaTypeError, SomosUpstreamTimeoutError, } 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 Somos
|
|
4
|
+
* Salud's alone.
|
|
5
|
+
*/
|
|
6
|
+
export interface SomosClinicNotServedFailure {
|
|
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 SomosCredentialsRejectedError {
|
|
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: SomosResponseMetadata;
|
|
38
|
+
success: false;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A failed answer.
|
|
42
|
+
*/
|
|
43
|
+
export interface SomosForbiddenError {
|
|
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: SomosResponseMetadata;
|
|
53
|
+
success: false;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A failed answer.
|
|
57
|
+
*/
|
|
58
|
+
export interface SomosInternalError {
|
|
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: SomosResponseMetadata;
|
|
68
|
+
success: false;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A failed answer.
|
|
72
|
+
*/
|
|
73
|
+
export interface SomosInvalidInputError {
|
|
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: SomosResponseMetadata;
|
|
83
|
+
success: false;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A failed answer.
|
|
87
|
+
*/
|
|
88
|
+
export interface SomosRateLimitedError {
|
|
89
|
+
data: null;
|
|
90
|
+
/**
|
|
91
|
+
* The request rate limit was exceeded. Try again later.
|
|
92
|
+
*/
|
|
93
|
+
error: RateLimitedFailure;
|
|
94
|
+
/**
|
|
95
|
+
* What every answer carries besides its data or error.
|
|
96
|
+
*/
|
|
97
|
+
metadata: SomosResponseMetadata;
|
|
98
|
+
success: false;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A failed answer.
|
|
102
|
+
*/
|
|
103
|
+
export interface SomosRequestTooLargeError {
|
|
104
|
+
data: null;
|
|
105
|
+
/**
|
|
106
|
+
* The request exceeds the allowed size.
|
|
107
|
+
*/
|
|
108
|
+
error: RequestTooLargeFailure;
|
|
109
|
+
/**
|
|
110
|
+
* What every answer carries besides its data or error.
|
|
111
|
+
*/
|
|
112
|
+
metadata: SomosResponseMetadata;
|
|
113
|
+
success: false;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* What every answer carries besides its data or error.
|
|
117
|
+
*/
|
|
118
|
+
export interface SomosResponseMetadata {
|
|
119
|
+
/**
|
|
120
|
+
* Request correlation identifier, also sent as X-Request-Id.
|
|
121
|
+
*/
|
|
122
|
+
requestId: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* This backend is not configured to sign its references.
|
|
126
|
+
*/
|
|
127
|
+
export interface SomosSomosNotConfiguredFailure {
|
|
128
|
+
/**
|
|
129
|
+
* The failure code, stable across releases.
|
|
130
|
+
*/
|
|
131
|
+
code: "SOMOS_NOT_CONFIGURED";
|
|
132
|
+
/**
|
|
133
|
+
* No fields.
|
|
134
|
+
*/
|
|
135
|
+
data: Empty;
|
|
136
|
+
/**
|
|
137
|
+
* What went wrong, for people; it never contains input values.
|
|
138
|
+
*/
|
|
139
|
+
message: string;
|
|
140
|
+
/**
|
|
141
|
+
* Whether repeating the same request may succeed.
|
|
142
|
+
*/
|
|
143
|
+
retryable: false;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* This tool is unavailable for the clinic; use only the tools somos.tools.list
|
|
147
|
+
* answers.
|
|
148
|
+
*/
|
|
149
|
+
export interface SomosToolNotAvailableFailure {
|
|
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 SomosToolResultResponse {
|
|
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: SomosResponseMetadata;
|
|
181
|
+
success: true;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A failed answer.
|
|
185
|
+
*/
|
|
186
|
+
export interface SomosUnauthorizedError {
|
|
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: SomosResponseMetadata;
|
|
196
|
+
success: false;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A failed answer.
|
|
200
|
+
*/
|
|
201
|
+
export interface SomosUnsupportedMediaTypeError {
|
|
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: SomosResponseMetadata;
|
|
211
|
+
success: false;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* A failed answer.
|
|
215
|
+
*/
|
|
216
|
+
export interface SomosUpstreamTimeoutError {
|
|
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: SomosResponseMetadata;
|
|
226
|
+
success: false;
|
|
227
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { SomosToolResultResponse } from "../models.js";
|
|
3
|
+
import type { SomosCorrectPatientBody, SomosCreatePatientBody, SomosLookupPatientBody } 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. Somos Salud's tool pack sets this tool's rules, parameters and
|
|
17
|
+
* accepted values (somos.tools.list answers them), and every call is checked
|
|
18
|
+
* 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. Somos Salud's tool pack sets this
|
|
27
|
+
* tool's rules, parameters and accepted values (somos.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. Somos Salud's
|
|
39
|
+
* tool pack sets this tool's rules, parameters and accepted values
|
|
40
|
+
* (somos.tools.list answers them), and every call is checked against them.
|
|
41
|
+
*/
|
|
42
|
+
lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
|
|
43
|
+
}
|
|
44
|
+
export declare function createClient(options: ClientOptions): Client;
|
|
45
|
+
export declare function bind(transport: Transport): Client;
|
|
46
|
+
export type CorrectRequest = SomosCorrectPatientBody;
|
|
47
|
+
export type CorrectResponse = SomosToolResultResponse;
|
|
48
|
+
export type CreateRequest = SomosCreatePatientBody;
|
|
49
|
+
export type CreateResponse = SomosToolResultResponse;
|
|
50
|
+
export type LookupRequest = SomosLookupPatientBody;
|
|
51
|
+
export type LookupResponse = SomosToolResultResponse;
|