@arbol-ai/sdk 4.0.0 → 5.1.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 (250) hide show
  1. package/README.md +15 -3
  2. package/dist/agenda/appointments/client.d.ts +165 -52
  3. package/dist/agenda/appointments/client.js +19 -11
  4. package/dist/agenda/appointments/index.d.ts +1 -1
  5. package/dist/agenda/availability/client.d.ts +11 -72
  6. package/dist/agenda/availability/client.js +5 -14
  7. package/dist/agenda/availability/index.d.ts +1 -1
  8. package/dist/agenda/bookingLocations/client.d.ts +51 -0
  9. package/dist/agenda/bookingLocations/client.js +19 -0
  10. package/dist/agenda/bookingLocations/index.d.ts +4 -0
  11. package/dist/agenda/bookingLocations/index.js +4 -0
  12. package/dist/agenda/bookingOfferings/client.d.ts +82 -0
  13. package/dist/agenda/bookingOfferings/client.js +18 -0
  14. package/dist/agenda/bookingOfferings/index.d.ts +5 -0
  15. package/dist/agenda/bookingOfferings/index.js +4 -0
  16. package/dist/agenda/bookingOfferings/models.d.ts +92 -0
  17. package/dist/agenda/bookingOfferings/models.js +3 -0
  18. package/dist/agenda/bookingRequirements/client.d.ts +118 -0
  19. package/dist/agenda/bookingRequirements/client.js +18 -0
  20. package/dist/agenda/bookingRequirements/index.d.ts +4 -0
  21. package/dist/agenda/bookingRequirements/index.js +4 -0
  22. package/dist/agenda/bookingSlots/client.d.ts +78 -0
  23. package/dist/agenda/bookingSlots/client.js +19 -0
  24. package/dist/agenda/bookingSlots/index.d.ts +4 -0
  25. package/dist/agenda/bookingSlots/index.js +4 -0
  26. package/dist/agenda/bookings/client.d.ts +44 -375
  27. package/dist/agenda/bookings/client.js +10 -52
  28. package/dist/agenda/bookings/index.d.ts +2 -2
  29. package/dist/agenda/bookings/models.d.ts +0 -92
  30. package/dist/agenda/client.d.ts +14 -0
  31. package/dist/agenda/client.js +35 -0
  32. package/dist/agenda/firstAvailability/client.d.ts +74 -0
  33. package/dist/agenda/firstAvailability/client.js +19 -0
  34. package/dist/agenda/firstAvailability/index.d.ts +5 -0
  35. package/dist/agenda/firstAvailability/index.js +4 -0
  36. package/dist/agenda/firstAvailability/models.d.ts +31 -0
  37. package/dist/agenda/firstAvailability/models.js +7 -0
  38. package/dist/agenda/index.d.ts +1 -1
  39. package/dist/agenda/models.d.ts +19 -94
  40. package/dist/agenda/models.js +0 -3
  41. package/dist/agenda/nearestBookingSlots/client.d.ts +93 -0
  42. package/dist/agenda/nearestBookingSlots/client.js +19 -0
  43. package/dist/agenda/nearestBookingSlots/index.d.ts +5 -0
  44. package/dist/agenda/nearestBookingSlots/index.js +4 -0
  45. package/dist/agenda/nearestBookingSlots/models.d.ts +38 -0
  46. package/dist/agenda/nearestBookingSlots/models.js +7 -0
  47. package/dist/agenda/offerings/client.d.ts +2 -2
  48. package/dist/agenda/offerings/client.js +1 -1
  49. package/dist/agenda/resourceSchedules/client.d.ts +75 -0
  50. package/dist/agenda/resourceSchedules/client.js +19 -0
  51. package/dist/agenda/resourceSchedules/index.d.ts +4 -0
  52. package/dist/agenda/resourceSchedules/index.js +4 -0
  53. package/dist/agenda/resources/client.d.ts +2 -2
  54. package/dist/agenda/resources/client.js +1 -1
  55. package/dist/agenda/scheduleRules/client.d.ts +125 -85
  56. package/dist/agenda/scheduleRules/client.js +17 -16
  57. package/dist/agenda/scheduleRules/index.d.ts +2 -1
  58. package/dist/agenda/scheduleRules/models.d.ts +33 -0
  59. package/dist/agenda/scheduleRules/models.js +6 -0
  60. package/dist/agenda/services/client.d.ts +2 -2
  61. package/dist/agenda/services/client.js +1 -1
  62. package/dist/agenda/waitlist/client.d.ts +40 -29
  63. package/dist/agenda/waitlist/client.js +4 -4
  64. package/dist/agenda/waitlist/index.d.ts +1 -1
  65. package/dist/agenda/waitlist/models.d.ts +17 -0
  66. package/dist/agenda/waitlist/models.js +4 -1
  67. package/dist/axxa/authorizations/client.d.ts +3 -35
  68. package/dist/axxa/authorizations/client.js +1 -1
  69. package/dist/axxa/authorizations/index.d.ts +1 -0
  70. package/dist/axxa/authorizations/models.d.ts +112 -0
  71. package/dist/axxa/authorizations/models.js +3 -0
  72. package/dist/axxa/connections/client.d.ts +19 -45
  73. package/dist/axxa/connections/client.js +10 -11
  74. package/dist/axxa/connections/index.d.ts +1 -0
  75. package/dist/axxa/connections/models.d.ts +269 -0
  76. package/dist/axxa/connections/models.js +3 -0
  77. package/dist/axxa/eligibility/client.d.ts +3 -25
  78. package/dist/axxa/eligibility/client.js +1 -1
  79. package/dist/axxa/eligibility/index.d.ts +1 -0
  80. package/dist/axxa/eligibility/models.d.ts +102 -0
  81. package/dist/axxa/eligibility/models.js +3 -0
  82. package/dist/axxa/index.d.ts +1 -1
  83. package/dist/axxa/models.d.ts +243 -168
  84. package/dist/axxa/provider/client.d.ts +5 -11
  85. package/dist/axxa/provider/client.js +1 -1
  86. package/dist/axxa/provider/index.d.ts +1 -0
  87. package/dist/axxa/provider/models.d.ts +87 -0
  88. package/dist/axxa/provider/models.js +3 -0
  89. package/dist/client.d.ts +2 -0
  90. package/dist/client.js +5 -0
  91. package/dist/gmedic/agendaServices/client.d.ts +13 -9
  92. package/dist/gmedic/agendaServices/client.js +2 -2
  93. package/dist/gmedic/agendaServices/index.d.ts +1 -1
  94. package/dist/gmedic/agendaServices/models.d.ts +53 -1
  95. package/dist/gmedic/agendas/client.d.ts +16 -9
  96. package/dist/gmedic/agendas/client.js +2 -2
  97. package/dist/gmedic/agendas/index.d.ts +1 -1
  98. package/dist/gmedic/agendas/models.d.ts +53 -1
  99. package/dist/gmedic/appointments/client.d.ts +34 -241
  100. package/dist/gmedic/appointments/client.js +12 -10
  101. package/dist/gmedic/appointments/index.d.ts +1 -1
  102. package/dist/gmedic/appointments/models.d.ts +518 -1
  103. package/dist/gmedic/appointments/models.js +28 -2
  104. package/dist/gmedic/availability/client.d.ts +24 -10
  105. package/dist/gmedic/availability/client.js +4 -3
  106. package/dist/gmedic/availability/index.d.ts +1 -1
  107. package/dist/gmedic/availability/models.d.ts +57 -1
  108. package/dist/gmedic/availability/models.js +7 -1
  109. package/dist/gmedic/availableDays/client.d.ts +11 -8
  110. package/dist/gmedic/availableDays/client.js +1 -1
  111. package/dist/gmedic/availableDays/index.d.ts +1 -1
  112. package/dist/gmedic/availableDays/models.d.ts +53 -1
  113. package/dist/gmedic/branchOffices/client.d.ts +13 -9
  114. package/dist/gmedic/branchOffices/client.js +2 -2
  115. package/dist/gmedic/branchOffices/index.d.ts +1 -1
  116. package/dist/gmedic/branchOffices/models.d.ts +58 -1
  117. package/dist/gmedic/connections/client.d.ts +19 -42
  118. package/dist/gmedic/connections/client.js +10 -11
  119. package/dist/gmedic/connections/index.d.ts +1 -0
  120. package/dist/gmedic/connections/models.d.ts +162 -0
  121. package/dist/gmedic/connections/models.js +3 -0
  122. package/dist/gmedic/dictionaryEntries/client.d.ts +20 -10
  123. package/dist/gmedic/dictionaryEntries/client.js +2 -2
  124. package/dist/gmedic/dictionaryEntries/index.d.ts +1 -1
  125. package/dist/gmedic/dictionaryEntries/models.d.ts +53 -1
  126. package/dist/gmedic/healthPartners/client.d.ts +19 -9
  127. package/dist/gmedic/healthPartners/client.js +2 -2
  128. package/dist/gmedic/healthPartners/index.d.ts +1 -1
  129. package/dist/gmedic/healthPartners/models.d.ts +53 -1
  130. package/dist/gmedic/healthPromotionEntities/client.d.ts +20 -10
  131. package/dist/gmedic/healthPromotionEntities/client.js +2 -2
  132. package/dist/gmedic/healthPromotionEntities/index.d.ts +1 -1
  133. package/dist/gmedic/healthPromotionEntities/models.d.ts +53 -1
  134. package/dist/gmedic/index.d.ts +1 -1
  135. package/dist/gmedic/laboralRiskManagers/client.d.ts +20 -10
  136. package/dist/gmedic/laboralRiskManagers/client.js +2 -2
  137. package/dist/gmedic/laboralRiskManagers/index.d.ts +1 -1
  138. package/dist/gmedic/laboralRiskManagers/models.d.ts +53 -1
  139. package/dist/gmedic/models.d.ts +194 -133
  140. package/dist/gmedic/occupations/client.d.ts +19 -9
  141. package/dist/gmedic/occupations/client.js +2 -2
  142. package/dist/gmedic/occupations/index.d.ts +1 -1
  143. package/dist/gmedic/occupations/models.d.ts +53 -1
  144. package/dist/gmedic/patientNotes/client.d.ts +25 -55
  145. package/dist/gmedic/patientNotes/client.js +5 -5
  146. package/dist/gmedic/patientNotes/index.d.ts +1 -1
  147. package/dist/gmedic/patientNotes/models.d.ts +232 -1
  148. package/dist/gmedic/patients/client.d.ts +40 -359
  149. package/dist/gmedic/patients/client.js +13 -5
  150. package/dist/gmedic/patients/index.d.ts +2 -2
  151. package/dist/gmedic/patients/models.d.ts +795 -1
  152. package/dist/gmedic/services/client.d.ts +22 -16
  153. package/dist/gmedic/services/client.js +2 -2
  154. package/dist/gmedic/services/index.d.ts +1 -1
  155. package/dist/gmedic/services/models.d.ts +53 -3
  156. package/dist/gmedic/sessionPackages/client.d.ts +21 -58
  157. package/dist/gmedic/sessionPackages/client.js +5 -5
  158. package/dist/gmedic/sessionPackages/index.d.ts +1 -1
  159. package/dist/gmedic/sessionPackages/models.d.ts +183 -1
  160. package/dist/index.d.ts +1 -1
  161. package/dist/models.d.ts +61 -0
  162. package/dist/models.js +6 -0
  163. package/dist/nuevaEps/affiliations/client.js +1 -1
  164. package/dist/nuevaEps/affiliations/models.d.ts +3 -1
  165. package/dist/nuevaEps/connections/client.d.ts +9 -9
  166. package/dist/nuevaEps/connections/client.js +9 -9
  167. package/dist/nuevaEps/connections/index.d.ts +1 -1
  168. package/dist/nuevaEps/connections/models.d.ts +1 -47
  169. package/dist/nuevaEps/connections/models.js +1 -8
  170. package/dist/saludTotal/client.d.ts +15 -0
  171. package/dist/saludTotal/client.js +20 -0
  172. package/dist/saludTotal/connections/client.d.ts +53 -0
  173. package/dist/saludTotal/connections/client.js +33 -0
  174. package/dist/saludTotal/connections/index.d.ts +5 -0
  175. package/dist/saludTotal/connections/index.js +4 -0
  176. package/dist/saludTotal/connections/models.d.ts +62 -0
  177. package/dist/saludTotal/connections/models.js +9 -0
  178. package/dist/saludTotal/index.d.ts +5 -0
  179. package/dist/saludTotal/index.js +4 -0
  180. package/dist/saludTotal/models.d.ts +37 -0
  181. package/dist/saludTotal/models.js +3 -0
  182. package/dist/saludTotal/portals/client.d.ts +35 -0
  183. package/dist/saludTotal/portals/client.js +18 -0
  184. package/dist/saludTotal/portals/index.d.ts +5 -0
  185. package/dist/saludTotal/portals/index.js +4 -0
  186. package/dist/saludTotal/portals/models.d.ts +30 -0
  187. package/dist/saludTotal/portals/models.js +3 -0
  188. package/dist/sura/affiliations/client.d.ts +3 -35
  189. package/dist/sura/affiliations/client.js +6 -6
  190. package/dist/sura/affiliations/index.d.ts +1 -0
  191. package/dist/sura/affiliations/models.d.ts +71 -0
  192. package/dist/sura/affiliations/models.js +8 -0
  193. package/dist/sura/appointments/client.d.ts +27 -327
  194. package/dist/sura/appointments/client.js +15 -21
  195. package/dist/sura/appointments/index.d.ts +2 -1
  196. package/dist/sura/appointments/models.d.ts +310 -0
  197. package/dist/sura/appointments/models.js +22 -0
  198. package/dist/sura/authorizations/client.d.ts +3 -43
  199. package/dist/sura/authorizations/client.js +6 -6
  200. package/dist/sura/authorizations/index.d.ts +1 -0
  201. package/dist/sura/authorizations/models.d.ts +79 -0
  202. package/dist/sura/authorizations/models.js +8 -0
  203. package/dist/sura/availability/client.d.ts +4 -68
  204. package/dist/sura/availability/client.js +9 -9
  205. package/dist/sura/availability/index.d.ts +2 -1
  206. package/dist/sura/availability/models.d.ts +103 -0
  207. package/dist/sura/availability/models.js +8 -0
  208. package/dist/sura/bookingOptions/client.d.ts +35 -0
  209. package/dist/sura/bookingOptions/client.js +19 -0
  210. package/dist/sura/bookingOptions/index.d.ts +5 -0
  211. package/dist/sura/bookingOptions/index.js +4 -0
  212. package/dist/sura/bookingOptions/models.d.ts +143 -0
  213. package/dist/sura/bookingOptions/models.js +8 -0
  214. package/dist/sura/client.d.ts +2 -0
  215. package/dist/sura/client.js +5 -0
  216. package/dist/sura/connections/client.d.ts +20 -98
  217. package/dist/sura/connections/client.js +10 -10
  218. package/dist/sura/connections/index.d.ts +1 -1
  219. package/dist/sura/connections/models.d.ts +102 -1
  220. package/dist/sura/connections/models.js +6 -0
  221. package/dist/sura/copays/client.d.ts +4 -40
  222. package/dist/sura/copays/client.js +9 -9
  223. package/dist/sura/copays/index.d.ts +2 -1
  224. package/dist/sura/copays/models.d.ts +75 -0
  225. package/dist/sura/copays/models.js +8 -0
  226. package/dist/sura/index.d.ts +1 -1
  227. package/dist/sura/models.d.ts +204 -148
  228. package/dist/sura/models.js +20 -1
  229. package/dist/sura/operations/client.d.ts +2 -7
  230. package/dist/sura/operations/client.js +4 -4
  231. package/dist/sura/operations/index.d.ts +1 -0
  232. package/dist/sura/operations/models.d.ts +43 -0
  233. package/dist/sura/operations/models.js +8 -0
  234. package/dist/sura/patients/client.d.ts +3 -40
  235. package/dist/sura/patients/client.js +6 -6
  236. package/dist/sura/patients/index.d.ts +1 -0
  237. package/dist/sura/patients/models.d.ts +76 -0
  238. package/dist/sura/patients/models.js +8 -0
  239. package/dist/sura/professionals/client.d.ts +7 -9
  240. package/dist/sura/professionals/client.js +3 -4
  241. package/dist/sura/professionals/index.d.ts +1 -1
  242. package/dist/sura/professionals/models.d.ts +40 -1
  243. package/dist/sura/services/client.d.ts +7 -8
  244. package/dist/sura/services/client.js +3 -4
  245. package/dist/sura/services/index.d.ts +1 -0
  246. package/dist/sura/services/models.d.ts +40 -0
  247. package/dist/sura/services/models.js +3 -0
  248. package/dist/visoft/index.d.ts +1 -1
  249. package/dist/visoft/models.d.ts +1 -16
  250. package/package.json +3 -3
@@ -0,0 +1,310 @@
1
+ import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
2
+ import { type SuraAppointmentPage, type SuraBookedAppointment, type SuraCancelledAppointment, type SuraConnectionNotConfiguredFailure, type SuraPatientNotFound, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraRefusal } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface SuraBookAppointmentBadGatewayError {
7
+ data: null;
8
+ error: SuraBookAppointmentBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type SuraBookAppointmentBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
16
+ export interface SuraBookAppointmentBody {
17
+ /**
18
+ * Set agentMode=true when calling this tool for an AI agent. The answer is
19
+ * concise Spanish text instead of JSON. Omit it for structured machine data.
20
+ * This changes presentation only, never authorization, consent or
21
+ * idempotency.
22
+ */
23
+ agentMode?: boolean;
24
+ /**
25
+ * The areaId list_services returned beside that service. Pass it with an
26
+ * exact serviceId to skip a catalog lookup; omit it whenever you are naming
27
+ * the service in words.
28
+ */
29
+ areaId?: string | null;
30
+ /**
31
+ * The channel the caller is waiting on, which sets how long it waits before
32
+ * an answer comes back pending, and puts a phone call's reads ahead of
33
+ * others. Defaults to web.
34
+ */
35
+ channel?: "voice" | "whatsapp" | "web";
36
+ /**
37
+ * Which of the organization's SURA connections to run on, by its id. Optional
38
+ * while the organization has one; required when it has several.
39
+ */
40
+ connectionId?: string;
41
+ /**
42
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
43
+ *
44
+ * @deprecated
45
+ */
46
+ date?: string;
47
+ /**
48
+ * Complete document number of the patient receiving care, from readable
49
+ * original evidence or their message. Normalize separators without changing
50
+ * digits. Request correction only for missing, illegible or conflicting
51
+ * identity; never guess digits.
52
+ */
53
+ documentNumber: string;
54
+ /**
55
+ * Patient document type read legibly from the original or explicitly
56
+ * supplied. Ask only if unknown or genuinely conflicting; never infer it from
57
+ * age or number length.
58
+ */
59
+ documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
60
+ /**
61
+ * Stable 32-character lowercase hexadecimal command key supplied by a trusted
62
+ * coordinator. Reuse it only for the same accepted offer.
63
+ */
64
+ idempotencyKey?: string | null;
65
+ /**
66
+ * Doctor's name when the caller chose one. Pass the same value used in
67
+ * find_availability, so the hour booked is that doctor's.
68
+ */
69
+ professional?: string | null;
70
+ /**
71
+ * What the appointment is for: either an id from list_services or the
72
+ * service's own name, in the caller's words ("neurología", "control"). A name
73
+ * that matches more than one service is answered with the choices, so you can
74
+ * ask which one instead of guessing.
75
+ */
76
+ serviceId: string;
77
+ /**
78
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
79
+ * as an answer gave it in startsAt (for example "2026-11-04T17:00:00-05:00").
80
+ * Send it in place of the former date and time; sent beside them, they must
81
+ * name the same moment.
82
+ */
83
+ startsAt?: Temporal.Instant;
84
+ /**
85
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
86
+ *
87
+ * @deprecated
88
+ */
89
+ time?: string;
90
+ }
91
+ /**
92
+ * A failed answer.
93
+ */
94
+ export interface SuraBookAppointmentConflictError {
95
+ data: null;
96
+ error: SuraBookAppointmentConflictFailure;
97
+ /**
98
+ * What every answer carries besides its data or error.
99
+ */
100
+ metadata: ResponseMetadata;
101
+ success: false;
102
+ }
103
+ export type SuraBookAppointmentConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
104
+ export type SuraBookAppointmentResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraBookedAppointment;
105
+ /**
106
+ * A successful answer.
107
+ */
108
+ export interface SuraBookAppointmentResultResponse {
109
+ data: SuraBookAppointmentResult;
110
+ error: null;
111
+ /**
112
+ * What every answer carries besides its data or error.
113
+ */
114
+ metadata: ResponseMetadata;
115
+ success: true;
116
+ }
117
+ /**
118
+ * A failed answer.
119
+ */
120
+ export interface SuraCancelAppointmentBadGatewayError {
121
+ data: null;
122
+ error: SuraCancelAppointmentBadGatewayFailure;
123
+ /**
124
+ * What every answer carries besides its data or error.
125
+ */
126
+ metadata: ResponseMetadata;
127
+ success: false;
128
+ }
129
+ export type SuraCancelAppointmentBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
130
+ export interface SuraCancelAppointmentBody {
131
+ /**
132
+ * Set agentMode=true when calling this tool for an AI agent. The answer is
133
+ * concise Spanish text instead of JSON. Omit it for structured machine data.
134
+ * This changes presentation only, never authorization, consent or
135
+ * idempotency.
136
+ */
137
+ agentMode?: boolean;
138
+ /**
139
+ * The channel the caller is waiting on, which sets how long it waits before
140
+ * an answer comes back pending, and puts a phone call's reads ahead of
141
+ * others. Defaults to web.
142
+ */
143
+ channel?: "voice" | "whatsapp" | "web";
144
+ /**
145
+ * Which of the organization's SURA connections to run on, by its id. Optional
146
+ * while the organization has one; required when it has several.
147
+ */
148
+ connectionId?: string;
149
+ /**
150
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
151
+ *
152
+ * @deprecated
153
+ */
154
+ date?: string;
155
+ /**
156
+ * Complete document number of the patient receiving care, from readable
157
+ * original evidence or their message. Normalize separators without changing
158
+ * digits. Request correction only for missing, illegible or conflicting
159
+ * identity; never guess digits.
160
+ */
161
+ documentNumber: string;
162
+ /**
163
+ * Patient document type read legibly from the original or explicitly
164
+ * supplied. Ask only if unknown or genuinely conflicting; never infer it from
165
+ * age or number length.
166
+ */
167
+ documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
168
+ /**
169
+ * Why it is being cancelled. Defaults to patient_request. Use reschedule when
170
+ * the caller wants a different time and you are about to book another one.
171
+ */
172
+ reason?: "patient_request" | "reschedule" | "provider_request" | null;
173
+ /**
174
+ * Only needed when the patient has more than one appointment at that exact
175
+ * date and time, which the tool will tell you.
176
+ */
177
+ serviceId?: string | null;
178
+ /**
179
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
180
+ * as an answer gave it in startsAt (for example "2026-11-04T17:00:00-05:00").
181
+ * Send it in place of the former date and time; sent beside them, they must
182
+ * name the same moment.
183
+ */
184
+ startsAt?: Temporal.Instant;
185
+ /**
186
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
187
+ *
188
+ * @deprecated
189
+ */
190
+ time?: string;
191
+ }
192
+ /**
193
+ * A failed answer.
194
+ */
195
+ export interface SuraCancelAppointmentConflictError {
196
+ data: null;
197
+ error: SuraCancelAppointmentConflictFailure;
198
+ /**
199
+ * What every answer carries besides its data or error.
200
+ */
201
+ metadata: ResponseMetadata;
202
+ success: false;
203
+ }
204
+ export type SuraCancelAppointmentConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
205
+ export type SuraCancelAppointmentResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraCancelledAppointment;
206
+ /**
207
+ * A successful answer.
208
+ */
209
+ export interface SuraCancelAppointmentResultResponse {
210
+ data: SuraCancelAppointmentResult;
211
+ error: null;
212
+ /**
213
+ * What every answer carries besides its data or error.
214
+ */
215
+ metadata: ResponseMetadata;
216
+ success: true;
217
+ }
218
+ /**
219
+ * A failed answer.
220
+ */
221
+ export interface SuraListAppointmentsBadGatewayError {
222
+ data: null;
223
+ error: SuraListAppointmentsBadGatewayFailure;
224
+ /**
225
+ * What every answer carries besides its data or error.
226
+ */
227
+ metadata: ResponseMetadata;
228
+ success: false;
229
+ }
230
+ export type SuraListAppointmentsBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
231
+ export interface SuraListAppointmentsBody {
232
+ /**
233
+ * Set agentMode=true when calling this tool for an AI agent. The answer is
234
+ * concise Spanish text instead of JSON. Omit it for structured machine data.
235
+ * This changes presentation only, never authorization, consent or
236
+ * idempotency.
237
+ */
238
+ agentMode?: boolean;
239
+ /**
240
+ * The channel the caller is waiting on, which sets how long it waits before
241
+ * an answer comes back pending, and puts a phone call's reads ahead of
242
+ * others. Defaults to web.
243
+ */
244
+ channel?: "voice" | "whatsapp" | "web";
245
+ /**
246
+ * Which of the organization's SURA connections to run on, by its id. Optional
247
+ * while the organization has one; required when it has several.
248
+ */
249
+ connectionId?: string;
250
+ /**
251
+ * Opaque cursor returned by pageInfo; omit it to request the first page.
252
+ */
253
+ cursor?: string;
254
+ /**
255
+ * Direction to traverse the stable keyset ordering from the supplied cursor.
256
+ */
257
+ direction?: "forward" | "backward";
258
+ /**
259
+ * Complete document number of the patient receiving care, from readable
260
+ * original evidence or their message. Normalize separators without changing
261
+ * digits. Request correction only for missing, illegible or conflicting
262
+ * identity; never guess digits.
263
+ */
264
+ documentNumber: string;
265
+ /**
266
+ * Patient document type read legibly from the original or explicitly
267
+ * supplied. Ask only if unknown or genuinely conflicting; never infer it from
268
+ * age or number length.
269
+ */
270
+ documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
271
+ /**
272
+ * Maximum items returned in one page. Defaults to 25; larger reads require
273
+ * another cursor.
274
+ */
275
+ limit?: number;
276
+ }
277
+ /**
278
+ * A failed answer.
279
+ */
280
+ export interface SuraListAppointmentsConflictError {
281
+ data: null;
282
+ error: SuraListAppointmentsConflictFailure;
283
+ /**
284
+ * What every answer carries besides its data or error.
285
+ */
286
+ metadata: ResponseMetadata;
287
+ success: false;
288
+ }
289
+ export type SuraListAppointmentsConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
290
+ export type SuraListAppointmentsResult = SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraAppointmentPage;
291
+ /**
292
+ * A successful answer.
293
+ */
294
+ export interface SuraListAppointmentsResultResponse {
295
+ data: SuraListAppointmentsResult;
296
+ error: null;
297
+ /**
298
+ * What every answer carries besides its data or error.
299
+ */
300
+ metadata: ResponseMetadata;
301
+ success: true;
302
+ }
303
+ export declare const SuraBookAppointmentBodyCodec: import("../../_/codec.js").Codec;
304
+ export declare const SuraBookAppointmentResultCodec: import("../../_/codec.js").Codec;
305
+ export declare const SuraBookAppointmentResultResponseCodec: import("../../_/codec.js").Codec;
306
+ export declare const SuraCancelAppointmentBodyCodec: import("../../_/codec.js").Codec;
307
+ export declare const SuraCancelAppointmentResultCodec: import("../../_/codec.js").Codec;
308
+ export declare const SuraCancelAppointmentResultResponseCodec: import("../../_/codec.js").Codec;
309
+ export declare const SuraListAppointmentsResultCodec: import("../../_/codec.js").Codec;
310
+ export declare const SuraListAppointmentsResultResponseCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,22 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { instant, object, union } from "../../_/index.js";
4
+ import { SuraAppointmentPageCodec, SuraBookedAppointmentCodec, SuraCancelledAppointmentCodec, SuraPatientNotFoundCodec, SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
5
+ export const SuraBookAppointmentBodyCodec = object([
6
+ ["startsAt", null, instant],
7
+ ]);
8
+ export const SuraBookAppointmentResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraBookedAppointmentCodec]);
9
+ export const SuraBookAppointmentResultResponseCodec = object([
10
+ ["data", null, () => SuraBookAppointmentResultCodec],
11
+ ]);
12
+ export const SuraCancelAppointmentBodyCodec = object([
13
+ ["startsAt", null, instant],
14
+ ]);
15
+ export const SuraCancelAppointmentResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraCancelledAppointmentCodec]);
16
+ export const SuraCancelAppointmentResultResponseCodec = object([
17
+ ["data", null, () => SuraCancelAppointmentResultCodec],
18
+ ]);
19
+ export const SuraListAppointmentsResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraAppointmentPageCodec]);
20
+ export const SuraListAppointmentsResultResponseCodec = object([
21
+ ["data", null, () => SuraListAppointmentsResultCodec],
22
+ ]);
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type SuraAuthorization, type SuraPendingResult, type SuraRefusal, type SuraResponseMetadata } from "../models.js";
2
+ import { type SuraLookupAuthorizationBody, type SuraLookupAuthorizationResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -20,45 +20,5 @@ export interface Client {
20
20
  }
21
21
  export declare function createClient(options: ClientOptions): Client;
22
22
  export declare function bind(transport: Transport): Client;
23
- export interface LookupRequest {
24
- /**
25
- * Authorization number after the hyphen in the authorization identifier.
26
- */
27
- authorizationNumber: string;
28
- /**
29
- * Exact patient document number.
30
- */
31
- documentNumber: string;
32
- /**
33
- * Document type. Defaults to CC.
34
- */
35
- documentType?: "CC" | null;
36
- /**
37
- * Issuer code before the hyphen in the authorization identifier.
38
- */
39
- issuerCode: string;
40
- /**
41
- * Set agentMode=true when calling this tool for an AI agent. The answer is
42
- * concise Spanish text instead of JSON. Omit it for structured machine data.
43
- * This changes presentation only, never authorization, consent or
44
- * idempotency.
45
- */
46
- agentMode?: boolean;
47
- /**
48
- * Which of the organization's SURA connections to run on, by its id. Optional
49
- * while the organization has one; required when it has several.
50
- */
51
- connectionId?: string;
52
- /**
53
- * The channel the caller is waiting on, which sets how long it waits before
54
- * an answer comes back pending, and puts a phone call's reads ahead of
55
- * others. Defaults to web.
56
- */
57
- channel?: "voice" | "whatsapp" | "web";
58
- }
59
- export interface LookupResponse {
60
- data: SuraPendingResult | SuraRefusal | SuraAuthorization;
61
- error: null;
62
- metadata: SuraResponseMetadata;
63
- success: true;
64
- }
23
+ export type LookupRequest = SuraLookupAuthorizationBody;
24
+ export type LookupResponse = SuraLookupAuthorizationResultResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, union, } from "../../_/index.js";
4
- import { SuraAuthorizationCodec, SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SuraLookupAuthorizationResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -11,9 +11,9 @@ export function bind(transport) {
11
11
  };
12
12
  }
13
13
  const LookupOperation = {
14
- method: "GET",
14
+ method: "POST",
15
15
  route: "/v1/sura/authorizations/lookup",
16
- query: { authorizationNumber: "authorizationNumber", documentNumber: "documentNumber", documentType: "documentType", issuerCode: "issuerCode", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
17
- response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraAuthorizationCodec])]]),
18
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
16
+ body: "flat",
17
+ response: SuraLookupAuthorizationResultResponseCodec,
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -2,3 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { SuraLookupAuthorizationBadGatewayError, SuraLookupAuthorizationBadGatewayFailure, SuraLookupAuthorizationBody, SuraLookupAuthorizationConflictError, SuraLookupAuthorizationConflictFailure, SuraLookupAuthorizationResult, SuraLookupAuthorizationResultResponse, } from "./models.js";
@@ -0,0 +1,79 @@
1
+ import type { OutcomeUnknownFailure, ResponseMetadata } from "../../models.js";
2
+ import { type SuraAuthorization, type SuraConnectionNotConfiguredFailure, type SuraPendingResult, type SuraPortalCredentialsRejectedFailure, type SuraPortalSessionConflictFailure, type SuraPortalUnavailableFailure, type SuraRefusal } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface SuraLookupAuthorizationBadGatewayError {
7
+ data: null;
8
+ error: SuraLookupAuthorizationBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type SuraLookupAuthorizationBadGatewayFailure = OutcomeUnknownFailure | SuraPortalCredentialsRejectedFailure | SuraPortalUnavailableFailure;
16
+ export interface SuraLookupAuthorizationBody {
17
+ /**
18
+ * Set agentMode=true when calling this tool for an AI agent. The answer is
19
+ * concise Spanish text instead of JSON. Omit it for structured machine data.
20
+ * This changes presentation only, never authorization, consent or
21
+ * idempotency.
22
+ */
23
+ agentMode?: boolean;
24
+ /**
25
+ * Authorization number after the hyphen in the authorization identifier.
26
+ */
27
+ authorizationNumber: string;
28
+ /**
29
+ * The channel the caller is waiting on, which sets how long it waits before
30
+ * an answer comes back pending, and puts a phone call's reads ahead of
31
+ * others. Defaults to web.
32
+ */
33
+ channel?: "voice" | "whatsapp" | "web";
34
+ /**
35
+ * Which of the organization's SURA connections to run on, by its id. Optional
36
+ * while the organization has one; required when it has several.
37
+ */
38
+ connectionId?: string;
39
+ /**
40
+ * Exact patient document number.
41
+ */
42
+ documentNumber: string;
43
+ /**
44
+ * Document type. Defaults to CC.
45
+ */
46
+ documentType?: "CC" | null;
47
+ /**
48
+ * Issuer code before the hyphen in the authorization identifier.
49
+ */
50
+ issuerCode: string;
51
+ }
52
+ /**
53
+ * A failed answer.
54
+ */
55
+ export interface SuraLookupAuthorizationConflictError {
56
+ data: null;
57
+ error: SuraLookupAuthorizationConflictFailure;
58
+ /**
59
+ * What every answer carries besides its data or error.
60
+ */
61
+ metadata: ResponseMetadata;
62
+ success: false;
63
+ }
64
+ export type SuraLookupAuthorizationConflictFailure = SuraPortalSessionConflictFailure | SuraConnectionNotConfiguredFailure;
65
+ export type SuraLookupAuthorizationResult = SuraPendingResult | SuraRefusal | SuraAuthorization;
66
+ /**
67
+ * A successful answer.
68
+ */
69
+ export interface SuraLookupAuthorizationResultResponse {
70
+ data: SuraLookupAuthorizationResult;
71
+ error: null;
72
+ /**
73
+ * What every answer carries besides its data or error.
74
+ */
75
+ metadata: ResponseMetadata;
76
+ success: true;
77
+ }
78
+ export declare const SuraLookupAuthorizationResultCodec: import("../../_/codec.js").Codec;
79
+ export declare const SuraLookupAuthorizationResultResponseCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,8 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { object, union } from "../../_/index.js";
4
+ import { SuraAuthorizationCodec, SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
5
+ export const SuraLookupAuthorizationResultCodec = union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraAuthorizationCodec]);
6
+ export const SuraLookupAuthorizationResultResponseCodec = object([
7
+ ["data", null, () => SuraLookupAuthorizationResultCodec],
8
+ ]);
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type SuraAvailability, type SuraPatientNotFound, type SuraPendingResult, type SuraRefusal, type SuraResponseMetadata } from "../models.js";
2
+ import { type SuraFindAvailabilityBody, type SuraFindAvailabilityResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -16,73 +16,9 @@ export interface Client {
16
16
  * days that month with room, and otherProfessionals[] are the other doctors
17
17
  * who see this service. Offer two or three times, never the whole list.
18
18
  */
19
- list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
19
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
20
20
  }
21
21
  export declare function createClient(options: ClientOptions): Client;
22
22
  export declare function bind(transport: Transport): Client;
23
- export interface ListRequest {
24
- /**
25
- * The areaId list_services returned beside that service. Pass it with an
26
- * exact serviceId to skip a catalog lookup; omit it whenever you are naming
27
- * the service in words.
28
- */
29
- areaId?: string | null;
30
- /**
31
- * A day to look at, as YYYY-MM-DD. Omit it for the soonest day with room.
32
- * Resolve relative dates like "mañana" against the clinic's own timezone
33
- * before calling.
34
- */
35
- date?: string | null;
36
- /**
37
- * Complete document number of the patient receiving care, from readable
38
- * original evidence or their message. Normalize separators without changing
39
- * digits. Request correction only for missing, illegible or conflicting
40
- * identity; never guess digits.
41
- */
42
- documentNumber: string;
43
- /**
44
- * Patient document type read legibly from the original or explicitly
45
- * supplied. Ask only if unknown or genuinely conflicting; never infer it from
46
- * age or number length.
47
- */
48
- documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
49
- /**
50
- * Doctor's name, or part of it, when the caller asked for someone specific.
51
- * Use list_professionals to check the service's registered doctors
52
- * independently of available slots; absence from an open-agenda selector does
53
- * not mean the doctor does not exist. Omit it to see whoever has room
54
- * soonest.
55
- */
56
- professional?: string | null;
57
- /**
58
- * What the appointment is for: either an id from list_services or the
59
- * service's own name, in the caller's words ("neurología", "control"). A name
60
- * that matches more than one service is answered with the choices, so you can
61
- * ask which one instead of guessing.
62
- */
63
- serviceId: string;
64
- /**
65
- * Set agentMode=true when calling this tool for an AI agent. The answer is
66
- * concise Spanish text instead of JSON. Omit it for structured machine data.
67
- * This changes presentation only, never authorization, consent or
68
- * idempotency.
69
- */
70
- agentMode?: boolean;
71
- /**
72
- * Which of the organization's SURA connections to run on, by its id. Optional
73
- * while the organization has one; required when it has several.
74
- */
75
- connectionId?: string;
76
- /**
77
- * The channel the caller is waiting on, which sets how long it waits before
78
- * an answer comes back pending, and puts a phone call's reads ahead of
79
- * others. Defaults to web.
80
- */
81
- channel?: "voice" | "whatsapp" | "web";
82
- }
83
- export interface ListResponse {
84
- data: SuraPendingResult | SuraRefusal | SuraPatientNotFound | SuraAvailability;
85
- error: null;
86
- metadata: SuraResponseMetadata;
87
- success: true;
88
- }
23
+ export type LookupRequest = SuraFindAvailabilityBody;
24
+ export type LookupResponse = SuraFindAvailabilityResultResponse;
@@ -1,19 +1,19 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, union, } from "../../_/index.js";
4
- import { SuraAvailabilityCodec, SuraPatientNotFoundCodec, SuraPendingResultCodec, SuraRefusalCodec, } from "../models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { SuraFindAvailabilityResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
8
8
  export function bind(transport) {
9
9
  return {
10
- list: (request, options) => transport.send(ListOperation, request, options),
10
+ lookup: (request, options) => transport.send(LookupOperation, request, options),
11
11
  };
12
12
  }
13
- const ListOperation = {
14
- method: "GET",
15
- route: "/v1/sura/availability",
16
- query: { areaId: "areaId", date: "date", documentNumber: "documentNumber", documentType: "documentType", professional: "professional", serviceId: "serviceId", agentMode: "agentMode", connectionId: "connectionId", channel: "channel" },
17
- response: object([["data", null, union([() => SuraPendingResultCodec, () => SuraRefusalCodec, () => SuraPatientNotFoundCodec, () => SuraAvailabilityCodec])]]),
18
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
13
+ const LookupOperation = {
14
+ method: "POST",
15
+ route: "/v1/sura/availability/lookup",
16
+ body: "flat",
17
+ response: SuraFindAvailabilityResultResponseCodec,
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -1,4 +1,5 @@
1
1
  export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
4
+ export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { SuraFindAvailabilityBadGatewayError, SuraFindAvailabilityBadGatewayFailure, SuraFindAvailabilityBody, SuraFindAvailabilityConflictError, SuraFindAvailabilityConflictFailure, SuraFindAvailabilityResult, SuraFindAvailabilityResultResponse, } from "./models.js";