@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,272 @@
1
+ import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, Empty, ListServicesBadGatewayFailure, ListServicesUnprocessableContentFailure, OutcomeUnknownFailure, PageInfo, ProviderUnavailableFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
3
+ /**
4
+ * The clinic has no contract with that code; somos.contracts.list answers the
5
+ * clinic's contracts.
6
+ */
7
+ export interface SomosContractNotFoundFailure {
8
+ /**
9
+ * The failure code, stable across releases.
10
+ */
11
+ code: "CONTRACT_NOT_FOUND";
12
+ /**
13
+ * No fields.
14
+ */
15
+ data: Empty;
16
+ /**
17
+ * What went wrong, for people; it never contains input values.
18
+ */
19
+ message: string;
20
+ /**
21
+ * Whether repeating the same request may succeed.
22
+ */
23
+ retryable: false;
24
+ }
25
+ export interface SomosContractService {
26
+ /**
27
+ * The service, as somos.availability.lookup takes it.
28
+ */
29
+ code: string;
30
+ /**
31
+ * The service's name in the clinic's catalog.
32
+ */
33
+ name: string;
34
+ /**
35
+ * The contract's price, when the catalog states one.
36
+ */
37
+ price: number | null;
38
+ }
39
+ export interface SomosContractServicePage {
40
+ /**
41
+ * Items admitted by this resource contract within the verified organization.
42
+ */
43
+ data: SomosContractService[];
44
+ /**
45
+ * Discriminator for a resource list response.
46
+ */
47
+ object: "list";
48
+ /**
49
+ * Opaque navigation cursors for this page’s stable keyset order.
50
+ */
51
+ pageInfo: PageInfo;
52
+ }
53
+ /**
54
+ * A successful answer.
55
+ */
56
+ export interface SomosContractServicePageResponse {
57
+ data: SomosContractServicePage;
58
+ error: null;
59
+ /**
60
+ * What every answer carries besides its data or error.
61
+ */
62
+ metadata: SomosResponseMetadata;
63
+ success: true;
64
+ }
65
+ /**
66
+ * A failed answer.
67
+ */
68
+ export interface SomosListServicesBadGatewayError {
69
+ data: null;
70
+ error: ListServicesBadGatewayFailure;
71
+ /**
72
+ * What every answer carries besides its data or error.
73
+ */
74
+ metadata: SomosResponseMetadata;
75
+ success: false;
76
+ }
77
+ /**
78
+ * A failed answer.
79
+ */
80
+ export interface SomosListServicesConflictError {
81
+ data: null;
82
+ error: SomosListServicesConflictFailure;
83
+ /**
84
+ * What every answer carries besides its data or error.
85
+ */
86
+ metadata: SomosResponseMetadata;
87
+ success: false;
88
+ }
89
+ export type SomosListServicesConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
90
+ /**
91
+ * A failed answer.
92
+ */
93
+ export interface SomosListServicesNotFoundError {
94
+ data: null;
95
+ error: SomosListServicesNotFoundFailure;
96
+ /**
97
+ * What every answer carries besides its data or error.
98
+ */
99
+ metadata: SomosResponseMetadata;
100
+ success: false;
101
+ }
102
+ export type SomosListServicesNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
103
+ /**
104
+ * A failed answer.
105
+ */
106
+ export interface SomosListServicesServiceUnavailableError {
107
+ data: null;
108
+ error: SomosListServicesServiceUnavailableFailure;
109
+ /**
110
+ * What every answer carries besides its data or error.
111
+ */
112
+ metadata: SomosResponseMetadata;
113
+ success: false;
114
+ }
115
+ export type SomosListServicesServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
116
+ /**
117
+ * A failed answer.
118
+ */
119
+ export interface SomosListServicesUnprocessableContentError {
120
+ data: null;
121
+ error: ListServicesUnprocessableContentFailure;
122
+ /**
123
+ * What every answer carries besides its data or error.
124
+ */
125
+ metadata: SomosResponseMetadata;
126
+ success: false;
127
+ }
128
+ /**
129
+ * A failed answer.
130
+ */
131
+ export interface SomosLookupServicesBadGatewayError {
132
+ data: null;
133
+ error: SomosLookupServicesBadGatewayFailure;
134
+ /**
135
+ * What every answer carries besides its data or error.
136
+ */
137
+ metadata: SomosResponseMetadata;
138
+ success: false;
139
+ }
140
+ export type SomosLookupServicesBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
141
+ export interface SomosLookupServicesBody {
142
+ /**
143
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
144
+ * the organization has one; required when it has several. Another
145
+ * organization's connection is CONNECTION_NOT_FOUND.
146
+ */
147
+ connectionId?: string;
148
+ /**
149
+ * The contract whose current services may answer, as somos.contracts.list
150
+ * names it.
151
+ */
152
+ contractCode: string;
153
+ /**
154
+ * How many services to answer at most: 5 by default.
155
+ */
156
+ limit?: number;
157
+ /**
158
+ * The service as the person or their order names it: words, a code or both.
159
+ * Case and accents do not matter.
160
+ */
161
+ q: string;
162
+ /**
163
+ * Only services of this specialty, when the conversation has confirmed one.
164
+ */
165
+ specialty?: "fisio" | "fono" | "to" | "neuropsi" | "psico" | "respi" | "nutri" | "audio" | "espiro";
166
+ }
167
+ /**
168
+ * A failed answer.
169
+ */
170
+ export interface SomosLookupServicesConflictError {
171
+ data: null;
172
+ error: SomosLookupServicesConflictFailure;
173
+ /**
174
+ * What every answer carries besides its data or error.
175
+ */
176
+ metadata: SomosResponseMetadata;
177
+ success: false;
178
+ }
179
+ export type SomosLookupServicesConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
180
+ /**
181
+ * A failed answer.
182
+ */
183
+ export interface SomosLookupServicesNotFoundError {
184
+ data: null;
185
+ error: SomosLookupServicesNotFoundFailure;
186
+ /**
187
+ * What every answer carries besides its data or error.
188
+ */
189
+ metadata: SomosResponseMetadata;
190
+ success: false;
191
+ }
192
+ export type SomosLookupServicesNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure | SomosContractNotFoundFailure;
193
+ /**
194
+ * A failed answer.
195
+ */
196
+ export interface SomosLookupServicesServiceUnavailableError {
197
+ data: null;
198
+ error: SomosLookupServicesServiceUnavailableFailure;
199
+ /**
200
+ * What every answer carries besides its data or error.
201
+ */
202
+ metadata: SomosResponseMetadata;
203
+ success: false;
204
+ }
205
+ export type SomosLookupServicesServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure | SomosServicesSearchUnavailableFailure;
206
+ export interface SomosServiceLookup {
207
+ /**
208
+ * The contract whose current services answered.
209
+ */
210
+ contractCode: string;
211
+ /**
212
+ * The closest services first: matches by words, then by meaning. Empty when
213
+ * none is close enough, which says nothing about coverage.
214
+ */
215
+ data: SomosServiceMatch[];
216
+ object: "service_lookup";
217
+ }
218
+ /**
219
+ * A successful answer.
220
+ */
221
+ export interface SomosServiceLookupResponse {
222
+ data: SomosServiceLookup;
223
+ error: null;
224
+ /**
225
+ * What every answer carries besides its data or error.
226
+ */
227
+ metadata: SomosResponseMetadata;
228
+ success: true;
229
+ }
230
+ export interface SomosServiceMatch {
231
+ /**
232
+ * The service, as somos.availability.lookup takes it.
233
+ */
234
+ code: string;
235
+ /**
236
+ * words: the code or the name contains the query. meaning: Cloudflare AI
237
+ * Search found it close to the query in meaning; confirm it with the person
238
+ * or the order before using it.
239
+ */
240
+ match: "words" | "meaning";
241
+ /**
242
+ * The service's name in the contract's catalog.
243
+ */
244
+ name: string;
245
+ /**
246
+ * How close the service is to the query: 1 for a match by words, otherwise AI
247
+ * Search's score.
248
+ */
249
+ score: number;
250
+ }
251
+ /**
252
+ * The services index could not be searched or written; the contract's catalog
253
+ * still answers.
254
+ */
255
+ export interface SomosServicesSearchUnavailableFailure {
256
+ /**
257
+ * The failure code, stable across releases.
258
+ */
259
+ code: "SERVICES_SEARCH_UNAVAILABLE";
260
+ /**
261
+ * No fields.
262
+ */
263
+ data: Empty;
264
+ /**
265
+ * What went wrong, for people; it never contains input values.
266
+ */
267
+ message: string;
268
+ /**
269
+ * Whether repeating the same request may succeed.
270
+ */
271
+ retryable: true;
272
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -0,0 +1,44 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { SomosToolResultResponse } 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
+ * Get a specialty's rules
12
+ *
13
+ * A specialty's prerequisites and scheduling rules, as the clinic publishes
14
+ * them. Somos Salud's tool pack sets this tool's rules, parameters and
15
+ * accepted values (somos.tools.list answers them), and every call is checked
16
+ * against them.
17
+ */
18
+ get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
19
+ }
20
+ export declare function createClient(options: ClientOptions): Client;
21
+ export declare function bind(transport: Transport): Client;
22
+ export interface GetRequest {
23
+ /**
24
+ * Nombre clínico o código de la especialidad. Acepta, por ejemplo,
25
+ * fisioterapia/fisio, fonoaudiología/fono, terapia ocupacional/to,
26
+ * neuropsicología/neuropsi, psicología/psico, terapia respiratoria/respi,
27
+ * nutrición/nutri, audiología/audio y espirometría/espiro. 'Salud
28
+ * ocupacional' es ambiguo: los exámenes médicos laborales no se agendan por
29
+ * este canal.
30
+ */
31
+ name: string;
32
+ /**
33
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
34
+ * the organization has one; required when it has several. Another
35
+ * organization's connection is CONNECTION_NOT_FOUND.
36
+ */
37
+ connectionId?: string;
38
+ /**
39
+ * The channel the conversation happens on: voice, whatsapp or web (the
40
+ * default).
41
+ */
42
+ channel?: "voice" | "web" | "whatsapp";
43
+ }
44
+ export type GetResponse = SomosToolResultResponse;
@@ -0,0 +1,18 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ get: (request, options) => transport.send(GetOperation, request, options),
10
+ };
11
+ }
12
+ const GetOperation = {
13
+ method: "GET",
14
+ route: "/v1/somos/specialty-rules",
15
+ query: { name: "name", connectionId: "connectionId", channel: "channel" },
16
+ response: null,
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, GetRequest, GetResponse, } from "./client.js";
5
+ export type { SomosGetSpecialtyRulesBadGatewayError, SomosGetSpecialtyRulesBadGatewayFailure, SomosGetSpecialtyRulesConflictError, SomosGetSpecialtyRulesConflictFailure, SomosGetSpecialtyRulesNotFoundError, SomosGetSpecialtyRulesNotFoundFailure, SomosGetSpecialtyRulesServiceUnavailableError, SomosGetSpecialtyRulesServiceUnavailableFailure, } 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,54 @@
1
+ import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, OutcomeUnknownFailure, ProviderUnavailableFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface SomosGetSpecialtyRulesBadGatewayError {
7
+ data: null;
8
+ error: SomosGetSpecialtyRulesBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: SomosResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type SomosGetSpecialtyRulesBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
16
+ /**
17
+ * A failed answer.
18
+ */
19
+ export interface SomosGetSpecialtyRulesConflictError {
20
+ data: null;
21
+ error: SomosGetSpecialtyRulesConflictFailure;
22
+ /**
23
+ * What every answer carries besides its data or error.
24
+ */
25
+ metadata: SomosResponseMetadata;
26
+ success: false;
27
+ }
28
+ export type SomosGetSpecialtyRulesConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
29
+ /**
30
+ * A failed answer.
31
+ */
32
+ export interface SomosGetSpecialtyRulesNotFoundError {
33
+ data: null;
34
+ error: SomosGetSpecialtyRulesNotFoundFailure;
35
+ /**
36
+ * What every answer carries besides its data or error.
37
+ */
38
+ metadata: SomosResponseMetadata;
39
+ success: false;
40
+ }
41
+ export type SomosGetSpecialtyRulesNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
42
+ /**
43
+ * A failed answer.
44
+ */
45
+ export interface SomosGetSpecialtyRulesServiceUnavailableError {
46
+ data: null;
47
+ error: SomosGetSpecialtyRulesServiceUnavailableFailure;
48
+ /**
49
+ * What every answer carries besides its data or error.
50
+ */
51
+ metadata: SomosResponseMetadata;
52
+ success: false;
53
+ }
54
+ export type SomosGetSpecialtyRulesServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { RaizRolePage } from "./models.js";
2
+ import type { SomosClinicToolPageResponse } from "./models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -9,11 +8,13 @@ export interface ClientOptions extends BaseClientOptions {
9
8
  }
10
9
  export interface Client {
11
10
  /**
12
- * List roles
11
+ * List the clinic's tools
13
12
  *
14
- * List the roles that grant Raíz access, what each allows and whether you may
15
- * give it (`assignable`). Owner, Arbol staff and other products' roles are
16
- * protected; you can give only Raíz roles whose permissions you hold.
13
+ * Every tool Somos Salud's agents may call, in ascending name order, with the
14
+ * clinic's exact parameters and instructions, each naming the operation that
15
+ * runs it; a list's tool declares the page fields too. The clinic itself, its
16
+ * timezone and the version of these definitions are somos.clinic.get's.
17
+ * Contains no patient data and performs no clinical login.
17
18
  */
18
19
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
19
20
  }
@@ -33,10 +34,11 @@ export interface ListRequest {
33
34
  * another cursor.
34
35
  */
35
36
  limit?: number;
37
+ /**
38
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
39
+ * the organization has one; required when it has several. Another
40
+ * organization's connection is CONNECTION_NOT_FOUND.
41
+ */
42
+ connectionId?: string;
36
43
  }
37
- export interface ListResponse {
38
- data: RaizRolePage;
39
- error: null;
40
- metadata: ResponseMetadata;
41
- success: true;
42
- }
44
+ export type ListResponse = SomosClinicToolPageResponse;
@@ -11,8 +11,8 @@ export function bind(transport) {
11
11
  }
12
12
  const ListOperation = {
13
13
  method: "GET",
14
- route: "/v1/visoft/agencies",
15
- query: { cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
14
+ route: "/v1/somos/tools",
15
+ query: { cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId" },
16
16
  response: null,
17
- errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
17
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
18
  };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
+ export type { SomosClinicTool, SomosClinicToolPage, SomosClinicToolPageResponse, SomosListToolsBadGatewayError, SomosListToolsConflictError, SomosListToolsConflictFailure, SomosListToolsNotFoundError, SomosListToolsNotFoundFailure, SomosListToolsServiceUnavailableError, SomosListToolsServiceUnavailableFailure, } 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,101 @@
1
+ import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, ListToolsBadGatewayFailure, PageInfo, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { SomosClinicNotServedFailure, SomosResponseMetadata, SomosSomosNotConfiguredFailure, SomosToolNotAvailableFailure } from "../models.js";
3
+ export interface SomosClinicTool {
4
+ /**
5
+ * The clinic's instructions for this tool.
6
+ */
7
+ description: string;
8
+ displayName: string;
9
+ /**
10
+ * JSON Schema of the clinic's exact parameters for this tool.
11
+ */
12
+ inputSchema: {
13
+ [key: string]: unknown;
14
+ };
15
+ mutates: boolean;
16
+ /**
17
+ * The tool's name, as the clinic's instructions name it.
18
+ */
19
+ name: string;
20
+ /**
21
+ * The operation that runs this tool, such as somos.patients.lookup.
22
+ */
23
+ operation: string | null;
24
+ }
25
+ export interface SomosClinicToolPage {
26
+ /**
27
+ * Items admitted by this resource contract within the verified organization.
28
+ */
29
+ data: SomosClinicTool[];
30
+ /**
31
+ * Discriminator for a resource list response.
32
+ */
33
+ object: "list";
34
+ /**
35
+ * Opaque navigation cursors for this page’s stable keyset order.
36
+ */
37
+ pageInfo: PageInfo;
38
+ }
39
+ /**
40
+ * A successful answer.
41
+ */
42
+ export interface SomosClinicToolPageResponse {
43
+ data: SomosClinicToolPage;
44
+ error: null;
45
+ /**
46
+ * What every answer carries besides its data or error.
47
+ */
48
+ metadata: SomosResponseMetadata;
49
+ success: true;
50
+ }
51
+ /**
52
+ * A failed answer.
53
+ */
54
+ export interface SomosListToolsBadGatewayError {
55
+ data: null;
56
+ error: ListToolsBadGatewayFailure;
57
+ /**
58
+ * What every answer carries besides its data or error.
59
+ */
60
+ metadata: SomosResponseMetadata;
61
+ success: false;
62
+ }
63
+ /**
64
+ * A failed answer.
65
+ */
66
+ export interface SomosListToolsConflictError {
67
+ data: null;
68
+ error: SomosListToolsConflictFailure;
69
+ /**
70
+ * What every answer carries besides its data or error.
71
+ */
72
+ metadata: SomosResponseMetadata;
73
+ success: false;
74
+ }
75
+ export type SomosListToolsConflictFailure = ConnectionNotConfiguredFailure | SomosClinicNotServedFailure;
76
+ /**
77
+ * A failed answer.
78
+ */
79
+ export interface SomosListToolsNotFoundError {
80
+ data: null;
81
+ error: SomosListToolsNotFoundFailure;
82
+ /**
83
+ * What every answer carries besides its data or error.
84
+ */
85
+ metadata: SomosResponseMetadata;
86
+ success: false;
87
+ }
88
+ export type SomosListToolsNotFoundFailure = ConnectionNotFoundFailure | SomosToolNotAvailableFailure;
89
+ /**
90
+ * A failed answer.
91
+ */
92
+ export interface SomosListToolsServiceUnavailableError {
93
+ data: null;
94
+ error: SomosListToolsServiceUnavailableFailure;
95
+ /**
96
+ * What every answer carries besides its data or error.
97
+ */
98
+ metadata: SomosResponseMetadata;
99
+ success: false;
100
+ }
101
+ export type SomosListToolsServiceUnavailableFailure = UpstreamUnavailableFailure | SomosSomosNotConfiguredFailure;
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};