@arbol-ai/sdk 2.18.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/dist/client.d.ts +4 -0
- package/dist/client.js +10 -0
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +396 -0
- package/dist/models.js +5 -1
- package/dist/nuevaEps/affiliations/models.d.ts +6 -5
- package/dist/nuevaEps/connections/models.d.ts +18 -18
- package/dist/nuevaEps/index.d.ts +1 -1
- package/dist/nuevaEps/models.d.ts +16 -232
- package/dist/{visoft/tools → orsovision/agencies}/client.d.ts +13 -19
- package/dist/{visoft/tools → orsovision/agencies}/client.js +2 -2
- package/dist/orsovision/agencies/index.d.ts +5 -0
- package/dist/orsovision/agencies/models.d.ts +107 -0
- package/dist/orsovision/appointments/client.d.ts +39 -0
- package/dist/orsovision/appointments/client.js +29 -0
- package/dist/orsovision/appointments/index.d.ts +5 -0
- package/dist/orsovision/appointments/models.d.ts +206 -0
- package/dist/orsovision/appointments/models.js +9 -0
- package/dist/orsovision/availability/client.d.ts +32 -0
- package/dist/orsovision/availability/client.js +19 -0
- package/dist/orsovision/availability/index.d.ts +5 -0
- package/dist/orsovision/availability/models.d.ts +239 -0
- package/dist/orsovision/availability/models.js +15 -0
- package/dist/orsovision/client.d.ts +27 -0
- package/dist/orsovision/client.js +50 -0
- package/dist/orsovision/clinic/client.d.ts +34 -0
- package/dist/{visoft/specialtyRules → orsovision/clinic}/client.js +3 -3
- package/dist/orsovision/clinic/index.d.ts +5 -0
- package/dist/orsovision/clinic/models.d.ts +89 -0
- package/dist/orsovision/contracts/client.d.ts +69 -0
- package/dist/orsovision/contracts/client.js +18 -0
- package/dist/orsovision/contracts/index.d.ts +5 -0
- package/dist/orsovision/contracts/models.d.ts +108 -0
- package/dist/orsovision/index.d.ts +5 -0
- package/dist/orsovision/index.js +4 -0
- package/dist/orsovision/models.d.ts +227 -0
- package/dist/orsovision/patients/client.d.ts +52 -0
- package/dist/orsovision/patients/client.js +34 -0
- package/dist/orsovision/patients/index.d.ts +5 -0
- package/dist/orsovision/patients/models.d.ts +297 -0
- package/dist/orsovision/patients/models.js +3 -0
- package/dist/orsovision/services/client.d.ts +74 -0
- package/dist/orsovision/services/client.js +18 -0
- package/dist/orsovision/services/index.d.ts +5 -0
- package/dist/orsovision/services/index.js +4 -0
- package/dist/orsovision/services/models.d.ts +105 -0
- package/dist/orsovision/services/models.js +3 -0
- package/dist/orsovision/tools/client.d.ts +44 -0
- package/dist/{raiz/roles → orsovision/tools}/client.js +3 -3
- package/dist/orsovision/tools/index.d.ts +5 -0
- package/dist/orsovision/tools/index.js +4 -0
- package/dist/orsovision/tools/models.d.ts +101 -0
- package/dist/orsovision/tools/models.js +3 -0
- package/dist/raiz/agents/models.d.ts +1 -0
- package/dist/raiz/client.d.ts +0 -4
- package/dist/raiz/client.js +0 -10
- package/dist/raiz/conversations/client.d.ts +7 -3
- package/dist/raiz/conversations/index.d.ts +1 -1
- package/dist/raiz/conversations/models.d.ts +22 -0
- package/dist/raiz/organization/client.d.ts +40 -40
- package/dist/raiz/organization/client.js +10 -10
- package/dist/raiz/organization/index.d.ts +1 -1
- package/dist/raiz/reports/client.d.ts +3 -3
- package/dist/raiz/reports/client.js +2 -2
- package/dist/raiz/reports/index.d.ts +1 -1
- package/dist/somos/appointments/client.d.ts +40 -0
- package/dist/somos/appointments/client.js +29 -0
- package/dist/somos/appointments/index.d.ts +5 -0
- package/dist/somos/appointments/index.js +4 -0
- package/dist/somos/appointments/models.d.ts +301 -0
- package/dist/somos/appointments/models.js +9 -0
- package/dist/somos/availability/client.d.ts +33 -0
- package/dist/somos/availability/client.js +19 -0
- package/dist/somos/availability/index.d.ts +5 -0
- package/dist/somos/availability/index.js +4 -0
- package/dist/somos/availability/models.d.ts +340 -0
- package/dist/somos/availability/models.js +15 -0
- package/dist/somos/client.d.ts +29 -0
- package/dist/somos/client.js +55 -0
- package/dist/somos/clinic/client.d.ts +33 -0
- package/dist/somos/clinic/client.js +18 -0
- package/dist/somos/clinic/index.d.ts +5 -0
- package/dist/somos/clinic/index.js +4 -0
- package/dist/somos/clinic/models.d.ts +89 -0
- package/dist/somos/clinic/models.js +3 -0
- package/dist/somos/contracts/client.d.ts +74 -0
- package/dist/somos/contracts/client.js +18 -0
- package/dist/somos/contracts/index.d.ts +5 -0
- package/dist/somos/contracts/index.js +4 -0
- package/dist/somos/contracts/models.d.ts +107 -0
- package/dist/somos/contracts/models.js +3 -0
- package/dist/somos/groups/client.d.ts +67 -0
- package/dist/{visoft → somos}/groups/client.js +2 -2
- package/dist/somos/groups/index.d.ts +5 -0
- package/dist/somos/groups/index.js +4 -0
- package/dist/somos/groups/models.d.ts +117 -0
- package/dist/somos/groups/models.js +3 -0
- package/dist/somos/index.d.ts +5 -0
- package/dist/somos/index.js +4 -0
- package/dist/somos/models.d.ts +227 -0
- package/dist/somos/models.js +3 -0
- package/dist/somos/patients/client.d.ts +51 -0
- package/dist/somos/patients/client.js +34 -0
- package/dist/somos/patients/index.d.ts +5 -0
- package/dist/somos/patients/index.js +4 -0
- package/dist/somos/patients/models.d.ts +327 -0
- package/dist/somos/patients/models.js +3 -0
- package/dist/somos/services/client.d.ts +117 -0
- package/dist/somos/services/client.js +26 -0
- package/dist/somos/services/index.d.ts +5 -0
- package/dist/somos/services/index.js +4 -0
- package/dist/somos/services/models.d.ts +272 -0
- package/dist/somos/services/models.js +3 -0
- package/dist/somos/specialtyRules/client.d.ts +44 -0
- package/dist/somos/specialtyRules/client.js +18 -0
- package/dist/somos/specialtyRules/index.d.ts +5 -0
- package/dist/somos/specialtyRules/index.js +4 -0
- package/dist/somos/specialtyRules/models.d.ts +54 -0
- package/dist/somos/specialtyRules/models.js +3 -0
- package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
- package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
- package/dist/somos/tools/index.d.ts +5 -0
- package/dist/somos/tools/index.js +4 -0
- package/dist/somos/tools/models.d.ts +101 -0
- package/dist/somos/tools/models.js +3 -0
- package/dist/visoft/appointments/client.d.ts +20 -194
- package/dist/visoft/appointments/client.js +5 -4
- package/dist/visoft/appointments/index.d.ts +1 -0
- package/dist/visoft/appointments/models.d.ts +391 -0
- package/dist/visoft/appointments/models.js +15 -0
- package/dist/visoft/availability/client.d.ts +10 -164
- package/dist/visoft/availability/client.js +9 -9
- package/dist/visoft/availability/index.d.ts +2 -2
- package/dist/visoft/availability/models.d.ts +154 -64
- package/dist/visoft/availability/models.js +10 -8
- package/dist/visoft/client.d.ts +6 -8
- package/dist/visoft/client.js +15 -20
- package/dist/visoft/clinic/client.d.ts +30 -0
- package/dist/visoft/clinic/client.js +18 -0
- package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
- package/dist/visoft/clinic/index.js +4 -0
- package/dist/visoft/clinic/models.d.ts +13 -0
- package/dist/visoft/clinic/models.js +3 -0
- package/dist/visoft/clinics/client.d.ts +2 -31
- package/dist/visoft/clinics/client.js +1 -8
- package/dist/visoft/clinics/index.d.ts +2 -2
- package/dist/visoft/clinics/models.d.ts +13 -24
- package/dist/visoft/connections/client.d.ts +17 -74
- package/dist/visoft/connections/client.js +10 -11
- package/dist/visoft/connections/index.d.ts +1 -1
- package/dist/visoft/connections/models.d.ts +93 -1
- package/dist/visoft/connections/models.js +6 -0
- package/dist/visoft/contracts/client.d.ts +14 -49
- package/dist/visoft/contracts/client.js +2 -2
- package/dist/visoft/contracts/index.d.ts +1 -1
- package/dist/visoft/contracts/models.d.ts +43 -7
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +311 -139
- package/dist/visoft/patients/client.d.ts +24 -264
- package/dist/visoft/patients/client.js +7 -6
- package/dist/visoft/patients/index.d.ts +1 -0
- package/dist/visoft/patients/models.d.ts +737 -0
- package/dist/visoft/patients/models.js +15 -0
- package/dist/visoft/professionals/client.d.ts +56 -0
- package/dist/visoft/professionals/client.js +18 -0
- package/dist/visoft/professionals/index.d.ts +5 -0
- package/dist/visoft/professionals/index.js +4 -0
- package/dist/visoft/professionals/models.d.ts +54 -0
- package/dist/visoft/professionals/models.js +3 -0
- package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
- package/dist/visoft/serviceCatalogs/client.js +18 -0
- package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
- package/dist/visoft/serviceCatalogs/index.js +4 -0
- package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
- package/dist/visoft/serviceCatalogs/models.js +3 -0
- package/dist/visoft/services/client.d.ts +25 -61
- package/dist/visoft/services/client.js +2 -2
- package/dist/visoft/services/index.d.ts +1 -1
- package/dist/visoft/services/models.d.ts +52 -15
- package/package.json +9 -3
- package/dist/raiz/members/client.d.ts +0 -102
- package/dist/raiz/members/client.js +0 -35
- package/dist/raiz/members/index.d.ts +0 -5
- package/dist/raiz/members/models.d.ts +0 -48
- package/dist/raiz/members/models.js +0 -10
- package/dist/raiz/roles/index.d.ts +0 -5
- package/dist/raiz/roles/models.d.ts +0 -32
- package/dist/visoft/agencies/client.d.ts +0 -58
- package/dist/visoft/agencies/index.d.ts +0 -5
- package/dist/visoft/agencies/models.d.ts +0 -29
- package/dist/visoft/groups/client.d.ts +0 -69
- package/dist/visoft/groups/index.d.ts +0 -5
- package/dist/visoft/groups/models.d.ts +0 -39
- package/dist/visoft/specialtyRules/client.d.ts +0 -50
- package/dist/visoft/tools/index.d.ts +0 -5
- package/dist/visoft/tools/models.d.ts +0 -37
- /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
- /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
- /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
- /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
- /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
- /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
- /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
- /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
- /package/dist/{visoft/tools → orsovision}/models.js +0 -0
- /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Code generated by forge. DO NOT EDIT.
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Transport, } from "../../_/index.js";
|
|
4
|
+
export function createClient(options) {
|
|
5
|
+
return bind(new Transport(options));
|
|
6
|
+
}
|
|
7
|
+
export function bind(transport) {
|
|
8
|
+
return {
|
|
9
|
+
correct: (request, options) => transport.send(CorrectOperation, request, options),
|
|
10
|
+
create: (request, options) => transport.send(CreateOperation, request, options),
|
|
11
|
+
lookup: (request, options) => transport.send(LookupOperation, request, options),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const CorrectOperation = {
|
|
15
|
+
method: "POST",
|
|
16
|
+
route: "/v1/somos/patients/correct",
|
|
17
|
+
body: "flat",
|
|
18
|
+
response: null,
|
|
19
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
20
|
+
};
|
|
21
|
+
const CreateOperation = {
|
|
22
|
+
method: "POST",
|
|
23
|
+
route: "/v1/somos/patients",
|
|
24
|
+
body: "flat",
|
|
25
|
+
response: null,
|
|
26
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
27
|
+
};
|
|
28
|
+
const LookupOperation = {
|
|
29
|
+
method: "POST",
|
|
30
|
+
route: "/v1/somos/patients/lookup",
|
|
31
|
+
body: "flat",
|
|
32
|
+
response: null,
|
|
33
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ApiError } from "../../_/index.js";
|
|
2
|
+
export type { RequestOptions } from "../../_/index.js";
|
|
3
|
+
export { createClient } from "./client.js";
|
|
4
|
+
export type { Client, ClientOptions, CorrectRequest, CorrectResponse, CreateRequest, CreateResponse, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
+
export type { SomosCorrectPatientBadGatewayError, SomosCorrectPatientBody, SomosCorrectPatientConflictError, SomosCorrectPatientConflictFailure, SomosCorrectPatientNotFoundError, SomosCorrectPatientNotFoundFailure, SomosCorrectPatientServiceUnavailableError, SomosCorrectPatientServiceUnavailableFailure, SomosCreatePatientBadGatewayError, SomosCreatePatientBody, SomosCreatePatientConflictError, SomosCreatePatientConflictFailure, SomosCreatePatientNotFoundError, SomosCreatePatientNotFoundFailure, SomosCreatePatientServiceUnavailableError, SomosCreatePatientServiceUnavailableFailure, SomosLookupPatientBadGatewayError, SomosLookupPatientBody, SomosLookupPatientConflictError, SomosLookupPatientConflictFailure, SomosLookupPatientNotFoundError, SomosLookupPatientNotFoundFailure, SomosLookupPatientServiceUnavailableError, SomosLookupPatientServiceUnavailableFailure, } from "./models.js";
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CorrectPatientBadGatewayFailure, CreatePatientBadGatewayFailure, LookupPatientBadGatewayFailure, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
+
import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
|
|
3
|
+
/**
|
|
4
|
+
* A failed answer.
|
|
5
|
+
*/
|
|
6
|
+
export interface SomosCorrectPatientBadGatewayError {
|
|
7
|
+
data: null;
|
|
8
|
+
error: CorrectPatientBadGatewayFailure;
|
|
9
|
+
/**
|
|
10
|
+
* What every answer carries besides its data or error.
|
|
11
|
+
*/
|
|
12
|
+
metadata: SomosResponseMetadata;
|
|
13
|
+
success: false;
|
|
14
|
+
}
|
|
15
|
+
export interface SomosCorrectPatientBody {
|
|
16
|
+
/**
|
|
17
|
+
* Dirección corregida; omítela si no cambió.
|
|
18
|
+
*/
|
|
19
|
+
address?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Nacimiento corregido YYYY-MM-DD; omítelo si no cambió.
|
|
22
|
+
*/
|
|
23
|
+
birthDate?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
26
|
+
* default).
|
|
27
|
+
*/
|
|
28
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
29
|
+
/**
|
|
30
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
31
|
+
* the organization has one; required when it has several. Another
|
|
32
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
33
|
+
*/
|
|
34
|
+
connectionId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Documento del paciente existente; solo dígitos.
|
|
37
|
+
*/
|
|
38
|
+
documentNumber: string;
|
|
39
|
+
/**
|
|
40
|
+
* Correo corregido; omítelo si no cambió.
|
|
41
|
+
*/
|
|
42
|
+
email?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Primer nombre corregido; omítelo si no cambió.
|
|
45
|
+
*/
|
|
46
|
+
firstName1?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Segundo nombre corregido; omítelo si no cambió.
|
|
49
|
+
*/
|
|
50
|
+
firstName2?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Primer apellido corregido; omítelo si no cambió.
|
|
53
|
+
*/
|
|
54
|
+
lastName1?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Segundo apellido corregido; omítelo si no cambió.
|
|
57
|
+
*/
|
|
58
|
+
lastName2?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Celular corregido; omítelo si no cambió.
|
|
61
|
+
*/
|
|
62
|
+
phoneMobile?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Teléfono fijo corregido; omítelo si no cambió.
|
|
65
|
+
*/
|
|
66
|
+
phoneOffice?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Sexo del registro corregido y confirmado explícitamente: M o F. No lo
|
|
69
|
+
* infieras del nombre ni lo confundas con identidad de género u orientación.
|
|
70
|
+
* Omítelo si no cambió; updated:true confirma la lectura posterior del dato
|
|
71
|
+
* guardado.
|
|
72
|
+
*/
|
|
73
|
+
sex?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A failed answer.
|
|
77
|
+
*/
|
|
78
|
+
export interface SomosCorrectPatientConflictError {
|
|
79
|
+
data: null;
|
|
80
|
+
error: SomosCorrectPatientConflictFailure;
|
|
81
|
+
/**
|
|
82
|
+
* What every answer carries besides its data or error.
|
|
83
|
+
*/
|
|
84
|
+
metadata: SomosResponseMetadata;
|
|
85
|
+
success: false;
|
|
86
|
+
}
|
|
87
|
+
export type SomosCorrectPatientConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
|
|
88
|
+
/**
|
|
89
|
+
* A failed answer.
|
|
90
|
+
*/
|
|
91
|
+
export interface SomosCorrectPatientNotFoundError {
|
|
92
|
+
data: null;
|
|
93
|
+
error: SomosCorrectPatientNotFoundFailure;
|
|
94
|
+
/**
|
|
95
|
+
* What every answer carries besides its data or error.
|
|
96
|
+
*/
|
|
97
|
+
metadata: SomosResponseMetadata;
|
|
98
|
+
success: false;
|
|
99
|
+
}
|
|
100
|
+
export type SomosCorrectPatientNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
|
|
101
|
+
/**
|
|
102
|
+
* A failed answer.
|
|
103
|
+
*/
|
|
104
|
+
export interface SomosCorrectPatientServiceUnavailableError {
|
|
105
|
+
data: null;
|
|
106
|
+
error: SomosCorrectPatientServiceUnavailableFailure;
|
|
107
|
+
/**
|
|
108
|
+
* What every answer carries besides its data or error.
|
|
109
|
+
*/
|
|
110
|
+
metadata: SomosResponseMetadata;
|
|
111
|
+
success: false;
|
|
112
|
+
}
|
|
113
|
+
export type SomosCorrectPatientServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
|
|
114
|
+
/**
|
|
115
|
+
* A failed answer.
|
|
116
|
+
*/
|
|
117
|
+
export interface SomosCreatePatientBadGatewayError {
|
|
118
|
+
data: null;
|
|
119
|
+
error: CreatePatientBadGatewayFailure;
|
|
120
|
+
/**
|
|
121
|
+
* What every answer carries besides its data or error.
|
|
122
|
+
*/
|
|
123
|
+
metadata: SomosResponseMetadata;
|
|
124
|
+
success: false;
|
|
125
|
+
}
|
|
126
|
+
export interface SomosCreatePatientBody {
|
|
127
|
+
/**
|
|
128
|
+
* Nacimiento confirmado, YYYY-MM-DD.
|
|
129
|
+
*/
|
|
130
|
+
birthDate: string;
|
|
131
|
+
/**
|
|
132
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
133
|
+
* default).
|
|
134
|
+
*/
|
|
135
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
136
|
+
/**
|
|
137
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
138
|
+
* the organization has one; required when it has several. Another
|
|
139
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
140
|
+
*/
|
|
141
|
+
connectionId?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Solo dígitos confirmados; nunca leas el número completo en voz alta.
|
|
144
|
+
*/
|
|
145
|
+
documentNumber: string;
|
|
146
|
+
/**
|
|
147
|
+
* Tipo tal como aparece en el documento; acepta el nombre completo (Registro
|
|
148
|
+
* Civil) o el código (RC). Para un adulto de 18 o más puedes omitirlo o
|
|
149
|
+
* enviar CC: el servidor asume cédula de ciudadanía. Para un menor pregunta
|
|
150
|
+
* siempre (RC o TI); CC se rechaza con menores. Extranjeros: CE, PA, PE o PT
|
|
151
|
+
* según digan.
|
|
152
|
+
*/
|
|
153
|
+
documentType?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Correo opcional; omítelo si no hay, nunca envíes vacío.
|
|
156
|
+
*/
|
|
157
|
+
email?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Si ya la conoces, la EPS confirmada; con specialty e intent el servidor
|
|
160
|
+
* devuelve availability en esta misma respuesta.
|
|
161
|
+
*/
|
|
162
|
+
eps?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Primer nombre confirmado. Con cuatro partes: las dos primeras son
|
|
165
|
+
* firstName1 y firstName2, las dos últimas lastName1 y lastName2; si la
|
|
166
|
+
* división es ambigua pregunta una sola vez.
|
|
167
|
+
*/
|
|
168
|
+
firstName1: string;
|
|
169
|
+
/**
|
|
170
|
+
* Segundo nombre confirmado; omítelo si no existe.
|
|
171
|
+
*/
|
|
172
|
+
firstName2?: string;
|
|
173
|
+
/**
|
|
174
|
+
* Si ya la conoces, la intención de hoy (valoracion para paciente nuevo).
|
|
175
|
+
*/
|
|
176
|
+
intent?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Primer apellido tal como se confirmó.
|
|
179
|
+
*/
|
|
180
|
+
lastName1: string;
|
|
181
|
+
/**
|
|
182
|
+
* Segundo apellido confirmado; omítelo si no existe.
|
|
183
|
+
*/
|
|
184
|
+
lastName2?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Celular confirmado: 10 dígitos y empieza por 3. Omítelo solo si la persona
|
|
187
|
+
* se niega a darlo.
|
|
188
|
+
*/
|
|
189
|
+
phoneMobile?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Si ya lo conoces, el régimen confirmado.
|
|
192
|
+
*/
|
|
193
|
+
regimen?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Dato confirmado: M=masculino, F=femenino. Se normalizan esas etiquetas
|
|
196
|
+
* exactas, mayúsculas y espacios. NUNCA lo infieras del nombre ni de la voz;
|
|
197
|
+
* pregunta si no está confirmado.
|
|
198
|
+
*/
|
|
199
|
+
sex: string;
|
|
200
|
+
/**
|
|
201
|
+
* Si ya la conoces, la especialidad pedida hoy: el servidor busca
|
|
202
|
+
* disponibilidad en la misma llamada y la devuelve en availability.
|
|
203
|
+
*/
|
|
204
|
+
specialty?: string;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A failed answer.
|
|
208
|
+
*/
|
|
209
|
+
export interface SomosCreatePatientConflictError {
|
|
210
|
+
data: null;
|
|
211
|
+
error: SomosCreatePatientConflictFailure;
|
|
212
|
+
/**
|
|
213
|
+
* What every answer carries besides its data or error.
|
|
214
|
+
*/
|
|
215
|
+
metadata: SomosResponseMetadata;
|
|
216
|
+
success: false;
|
|
217
|
+
}
|
|
218
|
+
export type SomosCreatePatientConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
|
|
219
|
+
/**
|
|
220
|
+
* A failed answer.
|
|
221
|
+
*/
|
|
222
|
+
export interface SomosCreatePatientNotFoundError {
|
|
223
|
+
data: null;
|
|
224
|
+
error: SomosCreatePatientNotFoundFailure;
|
|
225
|
+
/**
|
|
226
|
+
* What every answer carries besides its data or error.
|
|
227
|
+
*/
|
|
228
|
+
metadata: SomosResponseMetadata;
|
|
229
|
+
success: false;
|
|
230
|
+
}
|
|
231
|
+
export type SomosCreatePatientNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
|
|
232
|
+
/**
|
|
233
|
+
* A failed answer.
|
|
234
|
+
*/
|
|
235
|
+
export interface SomosCreatePatientServiceUnavailableError {
|
|
236
|
+
data: null;
|
|
237
|
+
error: SomosCreatePatientServiceUnavailableFailure;
|
|
238
|
+
/**
|
|
239
|
+
* What every answer carries besides its data or error.
|
|
240
|
+
*/
|
|
241
|
+
metadata: SomosResponseMetadata;
|
|
242
|
+
success: false;
|
|
243
|
+
}
|
|
244
|
+
export type SomosCreatePatientServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
|
|
245
|
+
/**
|
|
246
|
+
* A failed answer.
|
|
247
|
+
*/
|
|
248
|
+
export interface SomosLookupPatientBadGatewayError {
|
|
249
|
+
data: null;
|
|
250
|
+
error: LookupPatientBadGatewayFailure;
|
|
251
|
+
/**
|
|
252
|
+
* What every answer carries besides its data or error.
|
|
253
|
+
*/
|
|
254
|
+
metadata: SomosResponseMetadata;
|
|
255
|
+
success: false;
|
|
256
|
+
}
|
|
257
|
+
export interface SomosLookupPatientBody {
|
|
258
|
+
/**
|
|
259
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
260
|
+
* default).
|
|
261
|
+
*/
|
|
262
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
263
|
+
/**
|
|
264
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
265
|
+
* the organization has one; required when it has several. Another
|
|
266
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
267
|
+
*/
|
|
268
|
+
connectionId?: string;
|
|
269
|
+
/**
|
|
270
|
+
* Solo dígitos, sin puntos ni espacios, conservando ceros iniciales.
|
|
271
|
+
* WhatsApp: usa el documento escrito completo y claro sin otro turno de
|
|
272
|
+
* confirmación. Voz: úsalo únicamente después de confirmar el documento
|
|
273
|
+
* completo, repetido dígito por dígito, en un turno posterior.
|
|
274
|
+
*/
|
|
275
|
+
documentNumber: string;
|
|
276
|
+
/**
|
|
277
|
+
* true solo cuando necesites filas históricas: pastAppointments y admissions.
|
|
278
|
+
* therapyHistory ya resume el historial completo sin este indicador; no
|
|
279
|
+
* repitas la consulta para obtenerlo. Para control usa
|
|
280
|
+
* therapyHistory.<fono|to>.hasPriorVisit.
|
|
281
|
+
*/
|
|
282
|
+
includePast?: boolean;
|
|
283
|
+
/**
|
|
284
|
+
* Con includePast, limita pastAppointments a los últimos N días (p. ej. 3
|
|
285
|
+
* para '¿vine esta semana?'). Omítelo para el historial completo.
|
|
286
|
+
*/
|
|
287
|
+
pastDays?: number;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* A failed answer.
|
|
291
|
+
*/
|
|
292
|
+
export interface SomosLookupPatientConflictError {
|
|
293
|
+
data: null;
|
|
294
|
+
error: SomosLookupPatientConflictFailure;
|
|
295
|
+
/**
|
|
296
|
+
* What every answer carries besides its data or error.
|
|
297
|
+
*/
|
|
298
|
+
metadata: SomosResponseMetadata;
|
|
299
|
+
success: false;
|
|
300
|
+
}
|
|
301
|
+
export type SomosLookupPatientConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
|
|
302
|
+
/**
|
|
303
|
+
* A failed answer.
|
|
304
|
+
*/
|
|
305
|
+
export interface SomosLookupPatientNotFoundError {
|
|
306
|
+
data: null;
|
|
307
|
+
error: SomosLookupPatientNotFoundFailure;
|
|
308
|
+
/**
|
|
309
|
+
* What every answer carries besides its data or error.
|
|
310
|
+
*/
|
|
311
|
+
metadata: SomosResponseMetadata;
|
|
312
|
+
success: false;
|
|
313
|
+
}
|
|
314
|
+
export type SomosLookupPatientNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
|
|
315
|
+
/**
|
|
316
|
+
* A failed answer.
|
|
317
|
+
*/
|
|
318
|
+
export interface SomosLookupPatientServiceUnavailableError {
|
|
319
|
+
data: null;
|
|
320
|
+
error: SomosLookupPatientServiceUnavailableFailure;
|
|
321
|
+
/**
|
|
322
|
+
* What every answer carries besides its data or error.
|
|
323
|
+
*/
|
|
324
|
+
metadata: SomosResponseMetadata;
|
|
325
|
+
success: false;
|
|
326
|
+
}
|
|
327
|
+
export type SomosLookupPatientServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
+
import type { SomosContractServicePageResponse, SomosLookupServicesBody, SomosServiceLookupResponse } 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 a contract's services
|
|
12
|
+
*
|
|
13
|
+
* The services of one of the clinic's contracts (code), in ascending code
|
|
14
|
+
* order; with q, only those whose code or name contains it. When none does,
|
|
15
|
+
* the search is TOOL_REFUSED (SERVICE_SEARCH_NOT_FOUND), and
|
|
16
|
+
* data.details.didYouMean holds up to three of the contract's services,
|
|
17
|
+
* within the same filters, that Cloudflare AI Search finds closest in
|
|
18
|
+
* meaning: suggestions to confirm, never substitutes. A contract without the
|
|
19
|
+
* service asked for is TOOL_REFUSED (SERVICE_NOT_IN_CONTRACT), whose guidance
|
|
20
|
+
* names the contract that has it. Catalog items that cannot be booked are not
|
|
21
|
+
* appointment availability. A refusal is TOOL_REFUSED: data.reason says why,
|
|
22
|
+
* data.guidance what to do next and data.details what it offers instead; it
|
|
23
|
+
* is never an outage. Somos Salud's tool pack sets this tool's rules,
|
|
24
|
+
* parameters and accepted values (somos.tools.list answers them), and every
|
|
25
|
+
* call is checked against them.
|
|
26
|
+
*/
|
|
27
|
+
list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Look up a contract's services
|
|
30
|
+
*
|
|
31
|
+
* The services of one of the clinic's contracts closest to a query: first
|
|
32
|
+
* those whose code or name contains it (match words, score 1), then those
|
|
33
|
+
* Cloudflare AI Search finds close in meaning (match meaning), at most limit
|
|
34
|
+
* (5 by default). Every answer is one of the contract's current services,
|
|
35
|
+
* within specialty when it is named; a match by meaning is a suggestion to
|
|
36
|
+
* confirm with the person or the order, never a substitute for the service
|
|
37
|
+
* ordered. An empty answer says nothing about coverage. CONTRACT_NOT_FOUND
|
|
38
|
+
* when the clinic has no such contract; SERVICES_SEARCH_UNAVAILABLE when AI
|
|
39
|
+
* Search cannot answer and no service matched by words. Contains no patient
|
|
40
|
+
* data.
|
|
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 interface ListRequest {
|
|
47
|
+
/**
|
|
48
|
+
* Code exacto devuelto por list_contracts o presente en el historial del
|
|
49
|
+
* paciente para la misma especialidad.
|
|
50
|
+
*/
|
|
51
|
+
code: string;
|
|
52
|
+
/**
|
|
53
|
+
* Código o frase del servicio confirmado en la orden. Acota por contenido sin
|
|
54
|
+
* distinguir mayúsculas ni tildes, junto con los demás filtros; no cambia el
|
|
55
|
+
* convenio ni la especialidad.
|
|
56
|
+
*/
|
|
57
|
+
q?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Especialidad pedida hoy; acepta el nombre clínico o el código y la
|
|
60
|
+
* normaliza al código interno para acotar la respuesta al servicio correcto.
|
|
61
|
+
*/
|
|
62
|
+
specialty?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Intención confirmada para consultar el servicio. Audiometría tonal y
|
|
65
|
+
* logoaudiometría sí se agendan con specialty=audio; no preguntes valoración
|
|
66
|
+
* frente a control para estos exámenes. Inmitancia se coordina en MR.
|
|
67
|
+
*/
|
|
68
|
+
intent?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Solo para fisio con intent=modalidad.
|
|
71
|
+
*/
|
|
72
|
+
modality?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Solo para specialty=fisio: frase real del servicio en la autorización EPS
|
|
75
|
+
* cuando la modalidad la requiera. Para cualquier otra especialidad, omite
|
|
76
|
+
* este campo. Omite el campo en valoración/control de fisioterapia común.
|
|
77
|
+
* Nunca envíes x, NO, vacío ni otro relleno. Para biofeedback se requiere la
|
|
78
|
+
* frase exacta; no infieras el servicio de piso pélvico.
|
|
79
|
+
*/
|
|
80
|
+
authorizationService?: string;
|
|
81
|
+
/**
|
|
82
|
+
* true solo si la persona afirma que un servicio falta o acaba de
|
|
83
|
+
* habilitarse; relee el catálogo en vez del caché de 6 h.
|
|
84
|
+
*/
|
|
85
|
+
refresh?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
88
|
+
*/
|
|
89
|
+
cursor?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
92
|
+
*/
|
|
93
|
+
direction?: "forward" | "backward";
|
|
94
|
+
/**
|
|
95
|
+
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
96
|
+
* another cursor.
|
|
97
|
+
*/
|
|
98
|
+
limit?: number;
|
|
99
|
+
/**
|
|
100
|
+
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
101
|
+
* the organization has one; required when it has several. Another
|
|
102
|
+
* organization's connection is CONNECTION_NOT_FOUND.
|
|
103
|
+
*/
|
|
104
|
+
connectionId?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
107
|
+
* default).
|
|
108
|
+
*/
|
|
109
|
+
channel?: "voice" | "web" | "whatsapp";
|
|
110
|
+
/**
|
|
111
|
+
* Deprecated: use `q`. Answered until 2027-01-28.
|
|
112
|
+
*/
|
|
113
|
+
search?: string;
|
|
114
|
+
}
|
|
115
|
+
export type ListResponse = SomosContractServicePageResponse;
|
|
116
|
+
export type LookupRequest = SomosLookupServicesBody;
|
|
117
|
+
export type LookupResponse = SomosServiceLookupResponse;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
lookup: (request, options) => transport.send(LookupOperation, request, options),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
const ListOperation = {
|
|
14
|
+
method: "GET",
|
|
15
|
+
route: "/v1/somos/services",
|
|
16
|
+
query: { code: "code", q: "q", specialty: "specialty", intent: "intent", modality: "modality", authorizationService: "authorizationService", refresh: "refresh", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel", search: "search" },
|
|
17
|
+
response: null,
|
|
18
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
19
|
+
};
|
|
20
|
+
const LookupOperation = {
|
|
21
|
+
method: "POST",
|
|
22
|
+
route: "/v1/somos/services/lookup",
|
|
23
|
+
body: "flat",
|
|
24
|
+
response: null,
|
|
25
|
+
errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
|
|
26
|
+
};
|
|
@@ -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, LookupRequest, LookupResponse, } from "./client.js";
|
|
5
|
+
export type { SomosContractNotFoundFailure, SomosContractService, SomosContractServicePage, SomosContractServicePageResponse, SomosListServicesBadGatewayError, SomosListServicesConflictError, SomosListServicesConflictFailure, SomosListServicesNotFoundError, SomosListServicesNotFoundFailure, SomosListServicesServiceUnavailableError, SomosListServicesServiceUnavailableFailure, SomosListServicesUnprocessableContentError, SomosLookupServicesBadGatewayError, SomosLookupServicesBadGatewayFailure, SomosLookupServicesBody, SomosLookupServicesConflictError, SomosLookupServicesConflictFailure, SomosLookupServicesNotFoundError, SomosLookupServicesNotFoundFailure, SomosLookupServicesServiceUnavailableError, SomosLookupServicesServiceUnavailableFailure, SomosServiceLookup, SomosServiceLookupResponse, SomosServiceMatch, SomosServicesSearchUnavailableFailure, } from "./models.js";
|