@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.
Files changed (203) hide show
  1. package/README.md +19 -1
  2. package/dist/client.d.ts +4 -0
  3. package/dist/client.js +10 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/models.d.ts +396 -0
  6. package/dist/models.js +5 -1
  7. package/dist/nuevaEps/affiliations/models.d.ts +6 -5
  8. package/dist/nuevaEps/connections/models.d.ts +18 -18
  9. package/dist/nuevaEps/index.d.ts +1 -1
  10. package/dist/nuevaEps/models.d.ts +16 -232
  11. package/dist/{visoft/tools → orsovision/agencies}/client.d.ts +13 -19
  12. package/dist/{visoft/tools → orsovision/agencies}/client.js +2 -2
  13. package/dist/orsovision/agencies/index.d.ts +5 -0
  14. package/dist/orsovision/agencies/models.d.ts +107 -0
  15. package/dist/orsovision/appointments/client.d.ts +39 -0
  16. package/dist/orsovision/appointments/client.js +29 -0
  17. package/dist/orsovision/appointments/index.d.ts +5 -0
  18. package/dist/orsovision/appointments/models.d.ts +206 -0
  19. package/dist/orsovision/appointments/models.js +9 -0
  20. package/dist/orsovision/availability/client.d.ts +32 -0
  21. package/dist/orsovision/availability/client.js +19 -0
  22. package/dist/orsovision/availability/index.d.ts +5 -0
  23. package/dist/orsovision/availability/models.d.ts +239 -0
  24. package/dist/orsovision/availability/models.js +15 -0
  25. package/dist/orsovision/client.d.ts +27 -0
  26. package/dist/orsovision/client.js +50 -0
  27. package/dist/orsovision/clinic/client.d.ts +34 -0
  28. package/dist/{visoft/specialtyRules → orsovision/clinic}/client.js +3 -3
  29. package/dist/orsovision/clinic/index.d.ts +5 -0
  30. package/dist/orsovision/clinic/models.d.ts +89 -0
  31. package/dist/orsovision/contracts/client.d.ts +69 -0
  32. package/dist/orsovision/contracts/client.js +18 -0
  33. package/dist/orsovision/contracts/index.d.ts +5 -0
  34. package/dist/orsovision/contracts/models.d.ts +108 -0
  35. package/dist/orsovision/index.d.ts +5 -0
  36. package/dist/orsovision/index.js +4 -0
  37. package/dist/orsovision/models.d.ts +227 -0
  38. package/dist/orsovision/patients/client.d.ts +52 -0
  39. package/dist/orsovision/patients/client.js +34 -0
  40. package/dist/orsovision/patients/index.d.ts +5 -0
  41. package/dist/orsovision/patients/models.d.ts +297 -0
  42. package/dist/orsovision/patients/models.js +3 -0
  43. package/dist/orsovision/services/client.d.ts +74 -0
  44. package/dist/orsovision/services/client.js +18 -0
  45. package/dist/orsovision/services/index.d.ts +5 -0
  46. package/dist/orsovision/services/index.js +4 -0
  47. package/dist/orsovision/services/models.d.ts +105 -0
  48. package/dist/orsovision/services/models.js +3 -0
  49. package/dist/orsovision/tools/client.d.ts +44 -0
  50. package/dist/{raiz/roles → orsovision/tools}/client.js +3 -3
  51. package/dist/orsovision/tools/index.d.ts +5 -0
  52. package/dist/orsovision/tools/index.js +4 -0
  53. package/dist/orsovision/tools/models.d.ts +101 -0
  54. package/dist/orsovision/tools/models.js +3 -0
  55. package/dist/raiz/client.d.ts +0 -4
  56. package/dist/raiz/client.js +0 -10
  57. package/dist/raiz/organization/client.d.ts +40 -40
  58. package/dist/raiz/organization/client.js +10 -10
  59. package/dist/raiz/organization/index.d.ts +1 -1
  60. package/dist/raiz/reports/client.d.ts +3 -3
  61. package/dist/raiz/reports/client.js +2 -2
  62. package/dist/raiz/reports/index.d.ts +1 -1
  63. package/dist/somos/appointments/client.d.ts +40 -0
  64. package/dist/somos/appointments/client.js +29 -0
  65. package/dist/somos/appointments/index.d.ts +5 -0
  66. package/dist/somos/appointments/index.js +4 -0
  67. package/dist/somos/appointments/models.d.ts +301 -0
  68. package/dist/somos/appointments/models.js +9 -0
  69. package/dist/somos/availability/client.d.ts +33 -0
  70. package/dist/somos/availability/client.js +19 -0
  71. package/dist/somos/availability/index.d.ts +5 -0
  72. package/dist/somos/availability/index.js +4 -0
  73. package/dist/somos/availability/models.d.ts +340 -0
  74. package/dist/somos/availability/models.js +15 -0
  75. package/dist/somos/client.d.ts +29 -0
  76. package/dist/somos/client.js +55 -0
  77. package/dist/somos/clinic/client.d.ts +33 -0
  78. package/dist/somos/clinic/client.js +18 -0
  79. package/dist/somos/clinic/index.d.ts +5 -0
  80. package/dist/somos/clinic/index.js +4 -0
  81. package/dist/somos/clinic/models.d.ts +89 -0
  82. package/dist/somos/clinic/models.js +3 -0
  83. package/dist/somos/contracts/client.d.ts +74 -0
  84. package/dist/somos/contracts/client.js +18 -0
  85. package/dist/somos/contracts/index.d.ts +5 -0
  86. package/dist/somos/contracts/index.js +4 -0
  87. package/dist/somos/contracts/models.d.ts +107 -0
  88. package/dist/somos/contracts/models.js +3 -0
  89. package/dist/somos/groups/client.d.ts +67 -0
  90. package/dist/{visoft → somos}/groups/client.js +2 -2
  91. package/dist/somos/groups/index.d.ts +5 -0
  92. package/dist/somos/groups/index.js +4 -0
  93. package/dist/somos/groups/models.d.ts +117 -0
  94. package/dist/somos/groups/models.js +3 -0
  95. package/dist/somos/index.d.ts +5 -0
  96. package/dist/somos/index.js +4 -0
  97. package/dist/somos/models.d.ts +227 -0
  98. package/dist/somos/models.js +3 -0
  99. package/dist/somos/patients/client.d.ts +51 -0
  100. package/dist/somos/patients/client.js +34 -0
  101. package/dist/somos/patients/index.d.ts +5 -0
  102. package/dist/somos/patients/index.js +4 -0
  103. package/dist/somos/patients/models.d.ts +327 -0
  104. package/dist/somos/patients/models.js +3 -0
  105. package/dist/somos/services/client.d.ts +117 -0
  106. package/dist/somos/services/client.js +26 -0
  107. package/dist/somos/services/index.d.ts +5 -0
  108. package/dist/somos/services/index.js +4 -0
  109. package/dist/somos/services/models.d.ts +272 -0
  110. package/dist/somos/services/models.js +3 -0
  111. package/dist/somos/specialtyRules/client.d.ts +44 -0
  112. package/dist/somos/specialtyRules/client.js +18 -0
  113. package/dist/somos/specialtyRules/index.d.ts +5 -0
  114. package/dist/somos/specialtyRules/index.js +4 -0
  115. package/dist/somos/specialtyRules/models.d.ts +54 -0
  116. package/dist/somos/specialtyRules/models.js +3 -0
  117. package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
  118. package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
  119. package/dist/somos/tools/index.d.ts +5 -0
  120. package/dist/somos/tools/index.js +4 -0
  121. package/dist/somos/tools/models.d.ts +101 -0
  122. package/dist/somos/tools/models.js +3 -0
  123. package/dist/visoft/appointments/client.d.ts +20 -194
  124. package/dist/visoft/appointments/client.js +5 -4
  125. package/dist/visoft/appointments/index.d.ts +1 -0
  126. package/dist/visoft/appointments/models.d.ts +391 -0
  127. package/dist/visoft/appointments/models.js +15 -0
  128. package/dist/visoft/availability/client.d.ts +10 -164
  129. package/dist/visoft/availability/client.js +9 -9
  130. package/dist/visoft/availability/index.d.ts +2 -2
  131. package/dist/visoft/availability/models.d.ts +154 -64
  132. package/dist/visoft/availability/models.js +10 -8
  133. package/dist/visoft/client.d.ts +6 -8
  134. package/dist/visoft/client.js +15 -20
  135. package/dist/visoft/clinic/client.d.ts +30 -0
  136. package/dist/visoft/clinic/client.js +18 -0
  137. package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
  138. package/dist/visoft/clinic/index.js +4 -0
  139. package/dist/visoft/clinic/models.d.ts +13 -0
  140. package/dist/visoft/clinic/models.js +3 -0
  141. package/dist/visoft/clinics/client.d.ts +2 -31
  142. package/dist/visoft/clinics/client.js +1 -8
  143. package/dist/visoft/clinics/index.d.ts +2 -2
  144. package/dist/visoft/clinics/models.d.ts +13 -24
  145. package/dist/visoft/connections/client.d.ts +17 -74
  146. package/dist/visoft/connections/client.js +10 -11
  147. package/dist/visoft/connections/index.d.ts +1 -1
  148. package/dist/visoft/connections/models.d.ts +93 -1
  149. package/dist/visoft/connections/models.js +6 -0
  150. package/dist/visoft/contracts/client.d.ts +14 -49
  151. package/dist/visoft/contracts/client.js +2 -2
  152. package/dist/visoft/contracts/index.d.ts +1 -1
  153. package/dist/visoft/contracts/models.d.ts +43 -7
  154. package/dist/visoft/index.d.ts +1 -1
  155. package/dist/visoft/models.d.ts +311 -139
  156. package/dist/visoft/patients/client.d.ts +24 -264
  157. package/dist/visoft/patients/client.js +7 -6
  158. package/dist/visoft/patients/index.d.ts +1 -0
  159. package/dist/visoft/patients/models.d.ts +737 -0
  160. package/dist/visoft/patients/models.js +15 -0
  161. package/dist/visoft/professionals/client.d.ts +56 -0
  162. package/dist/visoft/professionals/client.js +18 -0
  163. package/dist/visoft/professionals/index.d.ts +5 -0
  164. package/dist/visoft/professionals/index.js +4 -0
  165. package/dist/visoft/professionals/models.d.ts +54 -0
  166. package/dist/visoft/professionals/models.js +3 -0
  167. package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
  168. package/dist/visoft/serviceCatalogs/client.js +18 -0
  169. package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
  170. package/dist/visoft/serviceCatalogs/index.js +4 -0
  171. package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
  172. package/dist/visoft/serviceCatalogs/models.js +3 -0
  173. package/dist/visoft/services/client.d.ts +25 -61
  174. package/dist/visoft/services/client.js +2 -2
  175. package/dist/visoft/services/index.d.ts +1 -1
  176. package/dist/visoft/services/models.d.ts +52 -15
  177. package/package.json +9 -3
  178. package/dist/raiz/members/client.d.ts +0 -102
  179. package/dist/raiz/members/client.js +0 -35
  180. package/dist/raiz/members/index.d.ts +0 -5
  181. package/dist/raiz/members/models.d.ts +0 -48
  182. package/dist/raiz/members/models.js +0 -10
  183. package/dist/raiz/roles/index.d.ts +0 -5
  184. package/dist/raiz/roles/models.d.ts +0 -32
  185. package/dist/visoft/agencies/client.d.ts +0 -58
  186. package/dist/visoft/agencies/index.d.ts +0 -5
  187. package/dist/visoft/agencies/models.d.ts +0 -29
  188. package/dist/visoft/groups/client.d.ts +0 -69
  189. package/dist/visoft/groups/index.d.ts +0 -5
  190. package/dist/visoft/groups/models.d.ts +0 -39
  191. package/dist/visoft/specialtyRules/client.d.ts +0 -50
  192. package/dist/visoft/tools/index.d.ts +0 -5
  193. package/dist/visoft/tools/models.d.ts +0 -37
  194. /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
  195. /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
  196. /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
  197. /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
  198. /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
  199. /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
  200. /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
  201. /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
  202. /package/dist/{visoft/tools → orsovision}/models.js +0 -0
  203. /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
@@ -0,0 +1,40 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { SomosToolResultResponse } from "../models.js";
3
+ import { type SomosCancelAppointmentBody, type SomosCreateAppointmentBody } 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
+ * Cancel an appointment
13
+ *
14
+ * Cancel one exact future appointment, only after the person explicitly
15
+ * confirmed it, with the cancellation reference from a fresh patient lookup.
16
+ * The clinic requires two hours of notice. Never repeat a cancellation whose
17
+ * outcome is unknown. Somos Salud's tool pack sets this tool's rules,
18
+ * parameters and accepted values (somos.tools.list answers them), and every
19
+ * call is checked against them.
20
+ */
21
+ cancel(request: CancelRequest, options?: RequestOptions): Promise<CancelResponse>;
22
+ /**
23
+ * Book an appointment
24
+ *
25
+ * Book one slot somos.availability.lookup returned, only after the person
26
+ * explicitly confirmed that exact appointment. Pass its reference unchanged.
27
+ * A service the clinic books with a companion is booked with it, in
28
+ * consecutive slots, in this one call. Never repeat a booking whose outcome
29
+ * is unknown. Somos Salud's tool pack sets this tool's rules, parameters and
30
+ * accepted values (somos.tools.list answers them), and every call is checked
31
+ * against them.
32
+ */
33
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
34
+ }
35
+ export declare function createClient(options: ClientOptions): Client;
36
+ export declare function bind(transport: Transport): Client;
37
+ export type CancelRequest = SomosCancelAppointmentBody;
38
+ export type CancelResponse = SomosToolResultResponse;
39
+ export type CreateRequest = SomosCreateAppointmentBody;
40
+ export type CreateResponse = SomosToolResultResponse;
@@ -0,0 +1,29 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SomosCancelAppointmentBodyCodec, SomosCreateAppointmentBodyCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ cancel: (request, options) => transport.send(CancelOperation, request, options),
11
+ create: (request, options) => transport.send(CreateOperation, request, options),
12
+ };
13
+ }
14
+ const CancelOperation = {
15
+ method: "POST",
16
+ route: "/v1/somos/appointments/cancel",
17
+ body: "flat",
18
+ request: SomosCancelAppointmentBodyCodec,
19
+ response: null,
20
+ 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 },
21
+ };
22
+ const CreateOperation = {
23
+ method: "POST",
24
+ route: "/v1/somos/appointments",
25
+ body: "flat",
26
+ request: SomosCreateAppointmentBodyCodec,
27
+ response: null,
28
+ 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 },
29
+ };
@@ -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, CancelRequest, CancelResponse, CreateRequest, CreateResponse, } from "./client.js";
5
+ export type { SomosCancelAppointmentBadGatewayError, SomosCancelAppointmentBody, SomosCancelAppointmentConflictError, SomosCancelAppointmentConflictFailure, SomosCancelAppointmentNotFoundError, SomosCancelAppointmentNotFoundFailure, SomosCancelAppointmentServiceUnavailableError, SomosCancelAppointmentServiceUnavailableFailure, SomosCreateAppointmentBadGatewayError, SomosCreateAppointmentBody, SomosCreateAppointmentConflictError, SomosCreateAppointmentConflictFailure, SomosCreateAppointmentNotFoundError, SomosCreateAppointmentNotFoundFailure, SomosCreateAppointmentServiceUnavailableError, SomosCreateAppointmentServiceUnavailableFailure, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -0,0 +1,301 @@
1
+ import type { CancelAppointmentBadGatewayFailure, ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CreateAppointmentBadGatewayFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface SomosCancelAppointmentBadGatewayError {
7
+ data: null;
8
+ error: CancelAppointmentBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: SomosResponseMetadata;
13
+ success: false;
14
+ }
15
+ export interface SomosCancelAppointmentBody {
16
+ /**
17
+ * No lo uses: cancela con date + time. Solo existe por compatibilidad.
18
+ */
19
+ cancelToken?: string;
20
+ /**
21
+ * The channel the conversation happens on: voice, whatsapp or web (the
22
+ * default).
23
+ */
24
+ channel?: "voice" | "web" | "whatsapp";
25
+ /**
26
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
27
+ * the organization has one; required when it has several. Another
28
+ * organization's connection is CONNECTION_NOT_FOUND.
29
+ */
30
+ connectionId?: string;
31
+ /**
32
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
33
+ *
34
+ * @deprecated
35
+ */
36
+ date?: string;
37
+ /**
38
+ * Documento confirmado del paciente dueño de la cita; solo dígitos.
39
+ */
40
+ documentNumber: string;
41
+ /**
42
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
43
+ * as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
44
+ * Send it in place of the former date and time; sent beside them, they must
45
+ * name the same moment.
46
+ */
47
+ startsAt?: Temporal.Instant;
48
+ /**
49
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
50
+ *
51
+ * @deprecated
52
+ */
53
+ time?: string;
54
+ }
55
+ /**
56
+ * A failed answer.
57
+ */
58
+ export interface SomosCancelAppointmentConflictError {
59
+ data: null;
60
+ error: SomosCancelAppointmentConflictFailure;
61
+ /**
62
+ * What every answer carries besides its data or error.
63
+ */
64
+ metadata: SomosResponseMetadata;
65
+ success: false;
66
+ }
67
+ export type SomosCancelAppointmentConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
68
+ /**
69
+ * A failed answer.
70
+ */
71
+ export interface SomosCancelAppointmentNotFoundError {
72
+ data: null;
73
+ error: SomosCancelAppointmentNotFoundFailure;
74
+ /**
75
+ * What every answer carries besides its data or error.
76
+ */
77
+ metadata: SomosResponseMetadata;
78
+ success: false;
79
+ }
80
+ export type SomosCancelAppointmentNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
81
+ /**
82
+ * A failed answer.
83
+ */
84
+ export interface SomosCancelAppointmentServiceUnavailableError {
85
+ data: null;
86
+ error: SomosCancelAppointmentServiceUnavailableFailure;
87
+ /**
88
+ * What every answer carries besides its data or error.
89
+ */
90
+ metadata: SomosResponseMetadata;
91
+ success: false;
92
+ }
93
+ export type SomosCancelAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
94
+ /**
95
+ * A failed answer.
96
+ */
97
+ export interface SomosCreateAppointmentBadGatewayError {
98
+ data: null;
99
+ error: CreateAppointmentBadGatewayFailure;
100
+ /**
101
+ * What every answer carries besides its data or error.
102
+ */
103
+ metadata: SomosResponseMetadata;
104
+ success: false;
105
+ }
106
+ export interface SomosCreateAppointmentBody {
107
+ /**
108
+ * La sede del horario elegido: copia bookingInput.agency tal cual u omítela.
109
+ * Nunca la cambies ni la inventes: el servidor rechaza una sede que no sea de
110
+ * esta clínica o que no sea la del horario.
111
+ */
112
+ agency?: string;
113
+ /**
114
+ * Solo para specialty=fisio: frase real del servicio en la autorización EPS
115
+ * cuando la modalidad la requiera. Para cualquier otra especialidad, omite
116
+ * este campo. Omite el campo en valoración/control de fisioterapia común.
117
+ * Nunca envíes x, NO, vacío ni otro relleno. Para biofeedback se requiere la
118
+ * frase exacta; no infieras el servicio de piso pélvico.
119
+ */
120
+ authorizationService?: string;
121
+ /**
122
+ * The channel the conversation happens on: voice, whatsapp or web (the
123
+ * default).
124
+ */
125
+ channel?: "voice" | "web" | "whatsapp";
126
+ /**
127
+ * Token de logoaudiometría consecutiva a la audiometría del mismo paciente,
128
+ * fecha y profesional. El servidor verifica el servicio distinto y el
129
+ * intervalo de diez minutos; pairWithNext=true permite resolverlo
130
+ * automáticamente.
131
+ */
132
+ companionToken?: string;
133
+ /**
134
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
135
+ * the organization has one; required when it has several. Another
136
+ * organization's connection is CONNECTION_NOT_FOUND.
137
+ */
138
+ connectionId?: string;
139
+ /**
140
+ * Solo si la búsqueda usó contract+service explícitos.
141
+ */
142
+ contract?: string;
143
+ /**
144
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
145
+ *
146
+ * @deprecated
147
+ */
148
+ date?: string;
149
+ /**
150
+ * Documento confirmado de quien recibirá la atención (no del cuidador); si no
151
+ * existe, primero create_patient.
152
+ */
153
+ documentNumber: string;
154
+ /**
155
+ * Tipo exacto de patient_context; CC por defecto.
156
+ */
157
+ documentType?: string;
158
+ /**
159
+ * La misma EPS de la búsqueda, cuando la enviaste.
160
+ */
161
+ eps?: string;
162
+ /**
163
+ * Solo Fono control: el mismo grupo de la búsqueda.
164
+ */
165
+ fonoGroup?: string;
166
+ /**
167
+ * La misma intención de la búsqueda; obligatoria cuando reservas por date +
168
+ * time.
169
+ */
170
+ intent?: string;
171
+ /**
172
+ * Copia bookingInput.medicName del horario elegido. Conserva el profesional
173
+ * aceptado y la continuidad. Nombre parcial inequívoco válido. SLOT_AMBIGUOUS
174
+ * devuelve recovery.retryOptions: corrige este campo con el mismo profesional
175
+ * ya elegido; si falta elección, pregunta antes de reservar. No concatenes
176
+ * especialidad, alias ni nombres.
177
+ */
178
+ medicName: string;
179
+ /**
180
+ * Solo fisio modalidad: la misma de la búsqueda.
181
+ */
182
+ modality?: string;
183
+ /**
184
+ * Obligatorio: true solo si la persona confirmó audiometría y logoaudiometría
185
+ * juntas, también cuando pidió la logoaudiometría, que nunca va sola; false
186
+ * para una audiometría sola y para las demás especialidades. Copia
187
+ * bookingInput.pairWithNext y conserva el alcance aceptado: una búsqueda de
188
+ * pareja no prueba consentimiento. Dos servicios distintos consecutivos; no
189
+ * repitas parejas parciales o inciertas. Inmitancia se coordina en MR.
190
+ */
191
+ pairWithNext: boolean;
192
+ /**
193
+ * Solo con fonoGroup o toGroup: la misma edad en meses de la búsqueda.
194
+ */
195
+ patientAgeMonths?: string;
196
+ /**
197
+ * Psychology only. true ONLY after explicit caller acceptance of the named
198
+ * change from the previous treating professional to the selected medicName.
199
+ * Carry that acceptance from availability to booking; never infer it from
200
+ * thanks, a date confirmation, or a future appointment. series=true does not
201
+ * bypass continuity. If the previous professional cannot be identified,
202
+ * explain that limitation instead of inventing their name; explicit
203
+ * acceptance of a real returned professionalCandidate permits the change.
204
+ */
205
+ professionalChangeConfirmed?: boolean;
206
+ /**
207
+ * El mismo régimen de la búsqueda, cuando lo enviaste.
208
+ */
209
+ regimen?: string;
210
+ /**
211
+ * Solo fisio control: la misma sala de la búsqueda, tal como la dijo la
212
+ * persona; el servidor la normaliza.
213
+ */
214
+ sala?: string;
215
+ /**
216
+ * true only for an explicitly requested additional session. Never use it
217
+ * instead of pairWithNext for audiometry plus logoaudiometry, replay a
218
+ * partial/uncertain pair or create duplicate first valuations. Psychology
219
+ * remains limited to one appointment every seven calendar days, including
220
+ * series and a professional change.
221
+ */
222
+ series?: boolean;
223
+ /**
224
+ * Solo si la búsqueda usó contract+service explícitos.
225
+ */
226
+ service?: string;
227
+ /**
228
+ * La especialidad pedida HOY por la persona, nunca deducida del historial.
229
+ * Acepta el nombre clínico o el código y lo normaliza al código interno.
230
+ */
231
+ specialty: string;
232
+ /**
233
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
234
+ * as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
235
+ * Send it in place of the former date and time; sent beside them, they must
236
+ * name the same moment.
237
+ */
238
+ startsAt?: Temporal.Instant;
239
+ /**
240
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
241
+ *
242
+ * @deprecated
243
+ */
244
+ time?: string;
245
+ /**
246
+ * Solo TO control: el mismo grupo de la búsqueda.
247
+ */
248
+ toGroup?: string;
249
+ /**
250
+ * No lo uses: reserva con date + time. Solo existe por compatibilidad.
251
+ */
252
+ token?: string;
253
+ /**
254
+ * Normalmente omítelo: se conserva el código del cupo/token. Si el flujo
255
+ * exige enviarlo, copia el código exacto devuelto; nunca etiquetas como
256
+ * valoracion o control. R=remisión y S=sesión solo cuando el flujo lo
257
+ * confirme.
258
+ */
259
+ visitType?: string;
260
+ }
261
+ /**
262
+ * A failed answer.
263
+ */
264
+ export interface SomosCreateAppointmentConflictError {
265
+ data: null;
266
+ error: SomosCreateAppointmentConflictFailure;
267
+ /**
268
+ * What every answer carries besides its data or error.
269
+ */
270
+ metadata: SomosResponseMetadata;
271
+ success: false;
272
+ }
273
+ export type SomosCreateAppointmentConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
274
+ /**
275
+ * A failed answer.
276
+ */
277
+ export interface SomosCreateAppointmentNotFoundError {
278
+ data: null;
279
+ error: SomosCreateAppointmentNotFoundFailure;
280
+ /**
281
+ * What every answer carries besides its data or error.
282
+ */
283
+ metadata: SomosResponseMetadata;
284
+ success: false;
285
+ }
286
+ export type SomosCreateAppointmentNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
287
+ /**
288
+ * A failed answer.
289
+ */
290
+ export interface SomosCreateAppointmentServiceUnavailableError {
291
+ data: null;
292
+ error: SomosCreateAppointmentServiceUnavailableFailure;
293
+ /**
294
+ * What every answer carries besides its data or error.
295
+ */
296
+ metadata: SomosResponseMetadata;
297
+ success: false;
298
+ }
299
+ export type SomosCreateAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
300
+ export declare const SomosCancelAppointmentBodyCodec: import("../../_/codec.js").Codec;
301
+ export declare const SomosCreateAppointmentBodyCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,9 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { instant, object } from "../../_/index.js";
4
+ export const SomosCancelAppointmentBodyCodec = object([
5
+ ["startsAt", null, instant],
6
+ ]);
7
+ export const SomosCreateAppointmentBodyCodec = object([
8
+ ["startsAt", null, instant],
9
+ ]);
@@ -0,0 +1,33 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type SomosAvailabilitySlotPageResponse, type SomosListAvailabilityBody } 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
+ * Find available appointments
12
+ *
13
+ * Real available appointments for a service under a contract, one slot per
14
+ * item in chronological order, each with its professional and the booking
15
+ * reference (token) somos.appointments.create takes. A service that must be
16
+ * booked with a companion (logoaudiometry after its audiometry) offers only
17
+ * the slots whose companion is free too. limit is how many slots to offer
18
+ * (three in a conversation); for more, call again with the same arguments and
19
+ * pageInfo.nextCursor. window: requested; extended, the dates asked for had
20
+ * none; alternative, the time preference had none (say those first). A
21
+ * completed search without slots is TOOL_REFUSED (NO_AVAILABILITY); never
22
+ * search again without the person's filters. This read never books anything.
23
+ * A refusal is TOOL_REFUSED: data.reason says why, data.guidance what to do
24
+ * next and data.details what it offers instead; it is never an outage. Somos
25
+ * Salud's tool pack sets this tool's rules, parameters and accepted values
26
+ * (somos.tools.list answers them), and every call is checked against them.
27
+ */
28
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
29
+ }
30
+ export declare function createClient(options: ClientOptions): Client;
31
+ export declare function bind(transport: Transport): Client;
32
+ export type LookupRequest = SomosListAvailabilityBody;
33
+ export type LookupResponse = SomosAvailabilitySlotPageResponse;
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SomosAvailabilitySlotPageResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ lookup: (request, options) => transport.send(LookupOperation, request, options),
11
+ };
12
+ }
13
+ const LookupOperation = {
14
+ method: "POST",
15
+ route: "/v1/somos/availability/lookup",
16
+ body: "flat",
17
+ response: SomosAvailabilitySlotPageResponseCodec,
18
+ 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 },
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, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { SomosAvailabilitySlot, SomosAvailabilitySlotPage, SomosAvailabilitySlotPageResponse, SomosListAvailabilityBadGatewayError, SomosListAvailabilityBody, SomosListAvailabilityConflictError, SomosListAvailabilityConflictFailure, SomosListAvailabilityNotFoundError, SomosListAvailabilityNotFoundFailure, SomosListAvailabilityServiceUnavailableError, SomosListAvailabilityServiceUnavailableFailure, SomosListAvailabilityUnprocessableContentError, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";