@arbol-ai/sdk 2.19.0 → 3.0.1

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 (233) 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/agents/client.js +3 -4
  56. package/dist/raiz/agents/models.d.ts +1 -0
  57. package/dist/raiz/bulletins/client.d.ts +4 -1
  58. package/dist/raiz/bulletins/client.js +5 -6
  59. package/dist/raiz/campaigns/client.d.ts +6 -5
  60. package/dist/raiz/campaigns/client.js +4 -4
  61. package/dist/raiz/channels/client.d.ts +19 -5
  62. package/dist/raiz/channels/client.js +9 -9
  63. package/dist/raiz/client.d.ts +0 -4
  64. package/dist/raiz/client.js +0 -10
  65. package/dist/raiz/contacts/client.js +4 -4
  66. package/dist/raiz/conversations/client.d.ts +7 -4
  67. package/dist/raiz/conversations/client.js +6 -6
  68. package/dist/raiz/definitions/client.d.ts +4 -4
  69. package/dist/raiz/definitions/client.js +3 -4
  70. package/dist/raiz/evalCases/client.d.ts +13 -12
  71. package/dist/raiz/evalCases/client.js +2 -2
  72. package/dist/raiz/evalRuns/client.d.ts +7 -4
  73. package/dist/raiz/evalRuns/client.js +2 -3
  74. package/dist/raiz/evalRuns/models.d.ts +7 -1
  75. package/dist/raiz/facts/client.js +2 -2
  76. package/dist/raiz/knowledge/client.d.ts +17 -11
  77. package/dist/raiz/knowledge/client.js +4 -4
  78. package/dist/raiz/models.d.ts +0 -42
  79. package/dist/raiz/organization/client.d.ts +38 -42
  80. package/dist/raiz/organization/client.js +11 -12
  81. package/dist/raiz/organization/index.d.ts +1 -1
  82. package/dist/raiz/organization/models.d.ts +0 -10
  83. package/dist/raiz/profiles/client.d.ts +4 -4
  84. package/dist/raiz/profiles/client.js +3 -4
  85. package/dist/raiz/reports/client.d.ts +3 -3
  86. package/dist/raiz/reports/client.js +2 -2
  87. package/dist/raiz/reports/index.d.ts +1 -1
  88. package/dist/raiz/suppressions/client.js +1 -1
  89. package/dist/raiz/tasks/client.d.ts +6 -0
  90. package/dist/raiz/tasks/client.js +5 -6
  91. package/dist/raiz/templates/client.d.ts +2 -1
  92. package/dist/raiz/templates/client.js +1 -1
  93. package/dist/somos/appointments/client.d.ts +40 -0
  94. package/dist/somos/appointments/client.js +29 -0
  95. package/dist/somos/appointments/index.d.ts +5 -0
  96. package/dist/somos/appointments/index.js +4 -0
  97. package/dist/somos/appointments/models.d.ts +301 -0
  98. package/dist/somos/appointments/models.js +9 -0
  99. package/dist/somos/availability/client.d.ts +33 -0
  100. package/dist/somos/availability/client.js +19 -0
  101. package/dist/somos/availability/index.d.ts +5 -0
  102. package/dist/somos/availability/index.js +4 -0
  103. package/dist/somos/availability/models.d.ts +340 -0
  104. package/dist/somos/availability/models.js +15 -0
  105. package/dist/somos/client.d.ts +29 -0
  106. package/dist/somos/client.js +55 -0
  107. package/dist/somos/clinic/client.d.ts +33 -0
  108. package/dist/somos/clinic/client.js +18 -0
  109. package/dist/somos/clinic/index.d.ts +5 -0
  110. package/dist/somos/clinic/index.js +4 -0
  111. package/dist/somos/clinic/models.d.ts +89 -0
  112. package/dist/somos/clinic/models.js +3 -0
  113. package/dist/somos/contracts/client.d.ts +74 -0
  114. package/dist/somos/contracts/client.js +18 -0
  115. package/dist/somos/contracts/index.d.ts +5 -0
  116. package/dist/somos/contracts/index.js +4 -0
  117. package/dist/somos/contracts/models.d.ts +107 -0
  118. package/dist/somos/contracts/models.js +3 -0
  119. package/dist/somos/groups/client.d.ts +67 -0
  120. package/dist/{visoft → somos}/groups/client.js +2 -2
  121. package/dist/somos/groups/index.d.ts +5 -0
  122. package/dist/somos/groups/index.js +4 -0
  123. package/dist/somos/groups/models.d.ts +117 -0
  124. package/dist/somos/groups/models.js +3 -0
  125. package/dist/somos/index.d.ts +5 -0
  126. package/dist/somos/index.js +4 -0
  127. package/dist/somos/models.d.ts +227 -0
  128. package/dist/somos/models.js +3 -0
  129. package/dist/somos/patients/client.d.ts +51 -0
  130. package/dist/somos/patients/client.js +34 -0
  131. package/dist/somos/patients/index.d.ts +5 -0
  132. package/dist/somos/patients/index.js +4 -0
  133. package/dist/somos/patients/models.d.ts +327 -0
  134. package/dist/somos/patients/models.js +3 -0
  135. package/dist/somos/services/client.d.ts +117 -0
  136. package/dist/somos/services/client.js +26 -0
  137. package/dist/somos/services/index.d.ts +5 -0
  138. package/dist/somos/services/index.js +4 -0
  139. package/dist/somos/services/models.d.ts +272 -0
  140. package/dist/somos/services/models.js +3 -0
  141. package/dist/somos/specialtyRules/client.d.ts +44 -0
  142. package/dist/somos/specialtyRules/client.js +18 -0
  143. package/dist/somos/specialtyRules/index.d.ts +5 -0
  144. package/dist/somos/specialtyRules/index.js +4 -0
  145. package/dist/somos/specialtyRules/models.d.ts +54 -0
  146. package/dist/somos/specialtyRules/models.js +3 -0
  147. package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
  148. package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
  149. package/dist/somos/tools/index.d.ts +5 -0
  150. package/dist/somos/tools/index.js +4 -0
  151. package/dist/somos/tools/models.d.ts +101 -0
  152. package/dist/somos/tools/models.js +3 -0
  153. package/dist/visoft/appointments/client.d.ts +20 -194
  154. package/dist/visoft/appointments/client.js +5 -4
  155. package/dist/visoft/appointments/index.d.ts +1 -0
  156. package/dist/visoft/appointments/models.d.ts +391 -0
  157. package/dist/visoft/appointments/models.js +15 -0
  158. package/dist/visoft/availability/client.d.ts +10 -164
  159. package/dist/visoft/availability/client.js +9 -9
  160. package/dist/visoft/availability/index.d.ts +2 -2
  161. package/dist/visoft/availability/models.d.ts +154 -64
  162. package/dist/visoft/availability/models.js +10 -8
  163. package/dist/visoft/client.d.ts +6 -8
  164. package/dist/visoft/client.js +15 -20
  165. package/dist/visoft/clinic/client.d.ts +30 -0
  166. package/dist/visoft/clinic/client.js +18 -0
  167. package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
  168. package/dist/visoft/clinic/index.js +4 -0
  169. package/dist/visoft/clinic/models.d.ts +13 -0
  170. package/dist/visoft/clinic/models.js +3 -0
  171. package/dist/visoft/clinics/client.d.ts +2 -31
  172. package/dist/visoft/clinics/client.js +1 -8
  173. package/dist/visoft/clinics/index.d.ts +2 -2
  174. package/dist/visoft/clinics/models.d.ts +13 -24
  175. package/dist/visoft/connections/client.d.ts +17 -74
  176. package/dist/visoft/connections/client.js +10 -11
  177. package/dist/visoft/connections/index.d.ts +1 -1
  178. package/dist/visoft/connections/models.d.ts +93 -1
  179. package/dist/visoft/connections/models.js +6 -0
  180. package/dist/visoft/contracts/client.d.ts +14 -49
  181. package/dist/visoft/contracts/client.js +2 -2
  182. package/dist/visoft/contracts/index.d.ts +1 -1
  183. package/dist/visoft/contracts/models.d.ts +43 -7
  184. package/dist/visoft/index.d.ts +1 -1
  185. package/dist/visoft/models.d.ts +311 -139
  186. package/dist/visoft/patients/client.d.ts +24 -264
  187. package/dist/visoft/patients/client.js +7 -6
  188. package/dist/visoft/patients/index.d.ts +1 -0
  189. package/dist/visoft/patients/models.d.ts +737 -0
  190. package/dist/visoft/patients/models.js +15 -0
  191. package/dist/visoft/professionals/client.d.ts +56 -0
  192. package/dist/visoft/professionals/client.js +18 -0
  193. package/dist/visoft/professionals/index.d.ts +5 -0
  194. package/dist/visoft/professionals/index.js +4 -0
  195. package/dist/visoft/professionals/models.d.ts +54 -0
  196. package/dist/visoft/professionals/models.js +3 -0
  197. package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
  198. package/dist/visoft/serviceCatalogs/client.js +18 -0
  199. package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
  200. package/dist/visoft/serviceCatalogs/index.js +4 -0
  201. package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
  202. package/dist/visoft/serviceCatalogs/models.js +3 -0
  203. package/dist/visoft/services/client.d.ts +25 -61
  204. package/dist/visoft/services/client.js +2 -2
  205. package/dist/visoft/services/index.d.ts +1 -1
  206. package/dist/visoft/services/models.d.ts +52 -15
  207. package/package.json +9 -3
  208. package/dist/raiz/members/client.d.ts +0 -102
  209. package/dist/raiz/members/client.js +0 -35
  210. package/dist/raiz/members/index.d.ts +0 -5
  211. package/dist/raiz/members/models.d.ts +0 -48
  212. package/dist/raiz/members/models.js +0 -10
  213. package/dist/raiz/roles/index.d.ts +0 -5
  214. package/dist/raiz/roles/models.d.ts +0 -32
  215. package/dist/visoft/agencies/client.d.ts +0 -58
  216. package/dist/visoft/agencies/index.d.ts +0 -5
  217. package/dist/visoft/agencies/models.d.ts +0 -29
  218. package/dist/visoft/groups/client.d.ts +0 -69
  219. package/dist/visoft/groups/index.d.ts +0 -5
  220. package/dist/visoft/groups/models.d.ts +0 -39
  221. package/dist/visoft/specialtyRules/client.d.ts +0 -50
  222. package/dist/visoft/tools/index.d.ts +0 -5
  223. package/dist/visoft/tools/models.d.ts +0 -37
  224. /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
  225. /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
  226. /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
  227. /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
  228. /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
  229. /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
  230. /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
  231. /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
  232. /package/dist/{visoft/tools → orsovision}/models.js +0 -0
  233. /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
@@ -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 VisoftAvailabilitySlotPage } from "./models.js";
2
+ import { type VisoftAvailabilityResponse, type VisoftLookupAvailabilityBody } 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,170 +8,17 @@ export interface ClientOptions extends BaseClientOptions {
9
8
  }
10
9
  export interface Client {
11
10
  /**
12
- * Find available appointments
11
+ * Find free slots
13
12
  *
14
- * Real available appointments for a service under a contract, one slot per
15
- * item in chronological order, each with its professional and the booking
16
- * reference (token) visoft.appointments.create takes. limit is how many slots
17
- * to offer (three in a conversation); for more, call again with the same
18
- * arguments and pageInfo.nextCursor. window: requested; extended, the dates
19
- * asked for had none; alternative, the time preference had none (say those
20
- * first). A completed search without slots is TOOL_REFUSED (NO_AVAILABILITY);
21
- * never search again without the person's filters. This read never books
22
- * anything. A refusal is TOOL_REFUSED: data.reason says why, data.guidance
23
- * what to do next and data.details what it offers instead; it is never an
24
- * outage. The connection's clinic sets this tool's rules, parameters and
25
- * accepted values: visoft.tools.list answers them for the connection, and
26
- * every call is checked against them.
13
+ * The free slots of one service under one contract at a cost centre, from a
14
+ * day on, read from every professional's agenda (or the one named), each with
15
+ * the reference visoft.appointments.create takes. A professional whose agenda
16
+ * SIIPS did not answer is failed:true: their slots are unknown, never none.
17
+ * Never cached. This read never books anything.
27
18
  */
28
- list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
19
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
29
20
  }
30
21
  export declare function createClient(options: ClientOptions): Client;
31
22
  export declare function bind(transport: Transport): Client;
32
- export interface ListRequest {
33
- /**
34
- * As the connection's clinic defines it: visoft.tools.list answers its
35
- * meaning, accepted values and whether it is required.
36
- */
37
- documentNumber?: string;
38
- /**
39
- * As the connection's clinic defines it: visoft.tools.list answers its
40
- * meaning, accepted values and whether it is required.
41
- */
42
- agency?: string;
43
- /**
44
- * As the connection's clinic defines it: visoft.tools.list answers its
45
- * meaning, accepted values and whether it is required.
46
- */
47
- contract?: string;
48
- /**
49
- * As the connection's clinic defines it: visoft.tools.list answers its
50
- * meaning, accepted values and whether it is required.
51
- */
52
- service?: string;
53
- /**
54
- * As the connection's clinic defines it: visoft.tools.list answers its
55
- * meaning, accepted values and whether it is required.
56
- */
57
- date?: string;
58
- /**
59
- * As the connection's clinic defines it: visoft.tools.list answers its
60
- * meaning, accepted values and whether it is required.
61
- */
62
- medic?: string;
63
- /**
64
- * As the connection's clinic defines it: visoft.tools.list answers its
65
- * meaning, accepted values and whether it is required.
66
- */
67
- from?: string;
68
- /**
69
- * As the connection's clinic defines it: visoft.tools.list answers its
70
- * meaning, accepted values and whether it is required.
71
- */
72
- to?: string;
73
- /**
74
- * As the connection's clinic defines it: visoft.tools.list answers its
75
- * meaning, accepted values and whether it is required.
76
- */
77
- refresh?: boolean;
78
- /**
79
- * As the connection's clinic defines it: visoft.tools.list answers its
80
- * meaning, accepted values and whether it is required.
81
- */
82
- specialty?: string;
83
- /**
84
- * As the connection's clinic defines it: visoft.tools.list answers its
85
- * meaning, accepted values and whether it is required.
86
- */
87
- regimen?: string;
88
- /**
89
- * As the connection's clinic defines it: visoft.tools.list answers its
90
- * meaning, accepted values and whether it is required.
91
- */
92
- eps?: string;
93
- /**
94
- * As the connection's clinic defines it: visoft.tools.list answers its
95
- * meaning, accepted values and whether it is required.
96
- */
97
- sala?: string;
98
- /**
99
- * As the connection's clinic defines it: visoft.tools.list answers its
100
- * meaning, accepted values and whether it is required.
101
- */
102
- modality?: string;
103
- /**
104
- * As the connection's clinic defines it: visoft.tools.list answers its
105
- * meaning, accepted values and whether it is required.
106
- */
107
- authorizationService?: string;
108
- /**
109
- * As the connection's clinic defines it: visoft.tools.list answers its
110
- * meaning, accepted values and whether it is required.
111
- */
112
- timeFrom?: string;
113
- /**
114
- * As the connection's clinic defines it: visoft.tools.list answers its
115
- * meaning, accepted values and whether it is required.
116
- */
117
- timeTo?: string;
118
- /**
119
- * As the connection's clinic defines it: visoft.tools.list answers its
120
- * meaning, accepted values and whether it is required.
121
- */
122
- intent?: string;
123
- /**
124
- * As the connection's clinic defines it: visoft.tools.list answers its
125
- * meaning, accepted values and whether it is required.
126
- */
127
- patientAgeMonths?: string;
128
- /**
129
- * As the connection's clinic defines it: visoft.tools.list answers its
130
- * meaning, accepted values and whether it is required.
131
- */
132
- fonoGroup?: string;
133
- /**
134
- * As the connection's clinic defines it: visoft.tools.list answers its
135
- * meaning, accepted values and whether it is required.
136
- */
137
- toGroup?: string;
138
- /**
139
- * As the connection's clinic defines it: visoft.tools.list answers its
140
- * meaning, accepted values and whether it is required.
141
- */
142
- pairWithNext?: boolean;
143
- /**
144
- * As the connection's clinic defines it: visoft.tools.list answers its
145
- * meaning, accepted values and whether it is required.
146
- */
147
- professionalChangeConfirmed?: boolean;
148
- /**
149
- * Opaque cursor returned by pageInfo; omit it to request the first page.
150
- */
151
- cursor?: string;
152
- /**
153
- * Direction to traverse the stable keyset ordering from the supplied cursor.
154
- */
155
- direction?: "forward" | "backward";
156
- /**
157
- * Maximum items returned in one page. Defaults to 25; larger reads require
158
- * another cursor.
159
- */
160
- limit?: number;
161
- /**
162
- * The connection to run on. Optional when the organization has one Visoft
163
- * connection; required when it has several. Another organization's connection
164
- * is NOT_FOUND.
165
- */
166
- connectionId?: string;
167
- /**
168
- * The channel the conversation happens on: voice, whatsapp or web (the
169
- * default).
170
- */
171
- channel?: "voice" | "web" | "whatsapp";
172
- }
173
- export interface ListResponse {
174
- data: VisoftAvailabilitySlotPage;
175
- error: null;
176
- metadata: ResponseMetadata;
177
- success: true;
178
- }
23
+ export type LookupRequest = VisoftLookupAvailabilityBody;
24
+ export type LookupResponse = VisoftAvailabilityResponse;
@@ -1,19 +1,19 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { Transport, object, } from "../../_/index.js";
4
- import { VisoftAvailabilitySlotPageCodec, } from "./models.js";
3
+ import { Transport, } from "../../_/index.js";
4
+ import { VisoftAvailabilityResponseCodec, } 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/visoft/availability",
16
- query: { documentNumber: "documentNumber", agency: "agency", contract: "contract", service: "service", date: "date", medic: "medic", from: "from", to: "to", refresh: "refresh", specialty: "specialty", regimen: "regimen", eps: "eps", sala: "sala", modality: "modality", authorizationService: "authorizationService", timeFrom: "timeFrom", timeTo: "timeTo", intent: "intent", patientAgeMonths: "patientAgeMonths", fonoGroup: "fonoGroup", toGroup: "toGroup", pairWithNext: "pairWithNext", professionalChangeConfirmed: "professionalChangeConfirmed", cursor: "cursor", direction: "direction", limit: "limit", connectionId: "connectionId", channel: "channel" },
17
- response: object([["data", null, () => VisoftAvailabilitySlotPageCodec]]),
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/visoft/availability/lookup",
16
+ body: "flat",
17
+ response: VisoftAvailabilityResponseCodec,
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
19
  };
@@ -1,5 +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";
5
- export type { VisoftAvailabilityBookingInput, VisoftAvailabilitySlot, VisoftAvailabilitySlotPage, } from "./models.js";
4
+ export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { VisoftAvailability, VisoftAvailabilityResponse, VisoftAvailableSlot, VisoftLookupAvailabilityBadGatewayError, VisoftLookupAvailabilityBadGatewayFailure, VisoftLookupAvailabilityBody, VisoftLookupAvailabilityNotFoundError, VisoftLookupAvailabilityNotFoundFailure, VisoftLookupAvailabilityUnprocessableContentError, VisoftLookupAvailabilityUnprocessableContentFailure, VisoftProfessionalAvailability, VisoftProfessionalNotFoundFailure, } from "./models.js";
@@ -1,100 +1,190 @@
1
- import type { PageInfo } from "../../models.js";
2
- export interface VisoftAvailabilityBookingInput {
3
- agency: string;
4
- authorizationService?: string;
5
- contract: string;
6
- date: Temporal.PlainDate;
7
- fonoGroup?: string;
8
- intent?: string;
9
- medicName: string;
10
- modality?: string;
11
- pairWithNext?: boolean;
12
- patientAgeMonths?: string;
13
- professionalChangeConfirmed?: boolean;
14
- sala?: string;
15
- service: string;
16
- specialty?: string;
17
- time: string;
18
- toGroup?: string;
1
+ import type { ConnectionNotFoundFailure, CredentialsRejectedFailure, Empty, OutcomeUnknownFailure, ProviderUnavailableFailure } from "../../models.js";
2
+ import type { VisoftAgencyNotServedFailure, VisoftProfessional, VisoftResponseMetadata } from "../models.js";
3
+ export interface VisoftAvailability {
4
+ /**
5
+ * The day the search started, in the clinic: YYYY-MM-DD.
6
+ */
7
+ from: string;
8
+ /**
9
+ * Every professional of the service at the cost centre (or the one asked
10
+ * for), in the directory's order, each with their free slots. Never cached:
11
+ * read for this call.
12
+ */
13
+ professionals: VisoftProfessionalAvailability[];
19
14
  }
20
- export interface VisoftAvailabilitySlot {
15
+ /**
16
+ * A successful answer.
17
+ */
18
+ export interface VisoftAvailabilityResponse {
19
+ data: VisoftAvailability;
20
+ error: null;
21
21
  /**
22
- * The professional's agenda, when they run several.
22
+ * What every answer carries besides its data or error.
23
23
  */
24
- agenda?: string;
24
+ metadata: VisoftResponseMetadata;
25
+ success: true;
26
+ }
27
+ export interface VisoftAvailableSlot {
25
28
  /**
26
- * Copy these exact arguments to visoft.appointments.create only after the
27
- * person confirms this slot and service; add the confirmed documentNumber.
28
- * Retain separately confirmed consent. Never replace the service or contract
29
- * with a fresh EPS guess.
29
+ * The cost centre the slot is at.
30
30
  */
31
- bookingInput?: VisoftAvailabilityBookingInput;
31
+ agencyCode: string;
32
32
  /**
33
- * The day, in the clinic's timezone.
33
+ * The professional's SIIPS id.
34
34
  */
35
- date: Temporal.PlainDate;
35
+ professionalId: string;
36
36
  /**
37
- * The day as it is said to the person.
37
+ * The professional, as SIIPS names them.
38
38
  */
39
- dateSpoken: string;
40
- fonoGroup?: string;
39
+ professionalName: string;
41
40
  /**
42
- * The professional, as a later search names them (medic).
41
+ * The purpose SIIPS shows on the agenda.
43
42
  */
44
- medicId: string;
43
+ purpose: string;
45
44
  /**
46
- * The professional's name: this slot is theirs and no one else's.
45
+ * The free slot's SIIPS key, as visoft.availability.lookup answered it: pass
46
+ * it unchanged to visoft.appointments.create.
47
47
  */
48
- medicName: string;
49
- modality?: string;
48
+ reference: string;
50
49
  /**
51
- * For a pair of consecutive exams: whether the next slot with the same
52
- * professional is free too.
50
+ * The agenda block the slot belongs to.
53
51
  */
54
- pairable?: boolean;
52
+ scheduleId: string;
55
53
  /**
56
- * The room, when the clinic schedules by room.
54
+ * The slot's position in its agenda block.
57
55
  */
58
- sala?: string;
56
+ slotNumber: string;
59
57
  /**
60
- * The slot's specialty, as the clinic's agenda names it.
58
+ * The specialty SIIPS shows on the agenda.
61
59
  */
62
60
  specialty: string;
63
61
  /**
64
- * The time, HH:MM in the clinic's timezone.
62
+ * The moment, as an RFC 3339 instant written in the clinic's own offset (for
63
+ * example "2026-11-04T08:50:00-05:00"), so its first ten characters are the
64
+ * clinic's day and the next eight its hour.
65
+ */
66
+ startsAt: Temporal.Instant;
67
+ /**
68
+ * SIIPS's status of the slot.
69
+ */
70
+ status: string;
71
+ /**
72
+ * The sub cost centre of the agenda.
73
+ */
74
+ subCostCenter: string;
75
+ }
76
+ /**
77
+ * A failed answer.
78
+ */
79
+ export interface VisoftLookupAvailabilityBadGatewayError {
80
+ data: null;
81
+ error: VisoftLookupAvailabilityBadGatewayFailure;
82
+ /**
83
+ * What every answer carries besides its data or error.
84
+ */
85
+ metadata: VisoftResponseMetadata;
86
+ success: false;
87
+ }
88
+ export type VisoftLookupAvailabilityBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
89
+ export interface VisoftLookupAvailabilityBody {
90
+ /**
91
+ * One of the clinic's cost centres, as visoft.clinic.get lists them. Optional
92
+ * when the clinic has a default one.
93
+ */
94
+ agencyCode?: string;
95
+ /**
96
+ * How many agendas are read from SIIPS at once (5 by default).
65
97
  */
66
- time: string;
67
- toGroup?: string;
98
+ concurrency?: number;
68
99
  /**
69
- * The booking reference visoft.appointments.create takes, unchanged; null
70
- * when the slot cannot be booked by reference.
100
+ * The connection to run on. Optional when the organization has one Visoft
101
+ * connection; required when it has several. Another organization's connection
102
+ * is CONNECTION_NOT_FOUND.
71
103
  */
72
- token: string | null;
104
+ connectionId?: string;
73
105
  /**
74
- * The day's weekday.
106
+ * The contract, by the code visoft.contracts.list answers.
75
107
  */
76
- weekday: string;
108
+ contractCode: string;
77
109
  /**
78
- * requested: inside the dates and times asked for. extended: the dates asked
79
- * for had none, so the search went on to the nearest. alternative: inside
80
- * those dates but outside the time preference, which had none.
110
+ * The day the search starts, in the clinic's time (YYYY-MM-DD): SIIPS answers
111
+ * each professional's free slots from that day on.
81
112
  */
82
- window: "requested" | "extended" | "alternative";
113
+ from: string;
114
+ /**
115
+ * One professional's id, as visoft.professionals.list answers it: only their
116
+ * agenda.
117
+ */
118
+ professionalId?: string;
119
+ /**
120
+ * Read the professional directory again instead of its one-hour cache.
121
+ */
122
+ refreshProfessionals?: boolean;
123
+ /**
124
+ * The service, by the code a contract's services answer ("CUPS-890208").
125
+ */
126
+ serviceCode: string;
127
+ }
128
+ /**
129
+ * A failed answer.
130
+ */
131
+ export interface VisoftLookupAvailabilityNotFoundError {
132
+ data: null;
133
+ error: VisoftLookupAvailabilityNotFoundFailure;
134
+ /**
135
+ * What every answer carries besides its data or error.
136
+ */
137
+ metadata: VisoftResponseMetadata;
138
+ success: false;
83
139
  }
84
- export interface VisoftAvailabilitySlotPage {
140
+ export type VisoftLookupAvailabilityNotFoundFailure = ConnectionNotFoundFailure | VisoftProfessionalNotFoundFailure;
141
+ /**
142
+ * A failed answer.
143
+ */
144
+ export interface VisoftLookupAvailabilityUnprocessableContentError {
145
+ data: null;
146
+ error: VisoftLookupAvailabilityUnprocessableContentFailure;
147
+ /**
148
+ * What every answer carries besides its data or error.
149
+ */
150
+ metadata: VisoftResponseMetadata;
151
+ success: false;
152
+ }
153
+ export type VisoftLookupAvailabilityUnprocessableContentFailure = CredentialsRejectedFailure | VisoftAgencyNotServedFailure;
154
+ export interface VisoftProfessionalAvailability {
155
+ /**
156
+ * Whether SIIPS failed to answer this professional's agenda: their slots are
157
+ * unknown, never none.
158
+ */
159
+ failed: boolean;
160
+ professional: VisoftProfessional;
161
+ /**
162
+ * Their free slots, in the order SIIPS lists them.
163
+ */
164
+ slots: VisoftAvailableSlot[];
165
+ }
166
+ /**
167
+ * No professional with that id attends the service at the clinic's cost centre.
168
+ */
169
+ export interface VisoftProfessionalNotFoundFailure {
170
+ /**
171
+ * The failure code, stable across releases.
172
+ */
173
+ code: "PROFESSIONAL_NOT_FOUND";
85
174
  /**
86
- * Items admitted by this resource contract within the verified organization.
175
+ * No fields.
87
176
  */
88
- data: VisoftAvailabilitySlot[];
177
+ data: Empty;
89
178
  /**
90
- * Discriminator for a resource list response.
179
+ * What went wrong, for people; it never contains input values.
91
180
  */
92
- object: "list";
181
+ message: string;
93
182
  /**
94
- * Opaque navigation cursors for this page’s stable keyset order.
183
+ * Whether repeating the same request may succeed.
95
184
  */
96
- pageInfo: PageInfo;
185
+ retryable: false;
97
186
  }
98
- export declare const VisoftAvailabilityBookingInputCodec: import("../../_/codec.js").Codec;
99
- export declare const VisoftAvailabilitySlotCodec: import("../../_/codec.js").Codec;
100
- export declare const VisoftAvailabilitySlotPageCodec: import("../../_/codec.js").Codec;
187
+ export declare const VisoftAvailabilityCodec: import("../../_/codec.js").Codec;
188
+ export declare const VisoftAvailabilityResponseCodec: import("../../_/codec.js").Codec;
189
+ export declare const VisoftAvailableSlotCodec: import("../../_/codec.js").Codec;
190
+ export declare const VisoftProfessionalAvailabilityCodec: import("../../_/codec.js").Codec;
@@ -1,13 +1,15 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { array, date, object } from "../../_/index.js";
4
- export const VisoftAvailabilityBookingInputCodec = object([
5
- ["date", null, date],
3
+ import { array, instant, object } from "../../_/index.js";
4
+ export const VisoftAvailabilityCodec = object([
5
+ ["professionals", null, array(() => VisoftProfessionalAvailabilityCodec)],
6
6
  ]);
7
- export const VisoftAvailabilitySlotCodec = object([
8
- ["bookingInput", null, () => VisoftAvailabilityBookingInputCodec],
9
- ["date", null, date],
7
+ export const VisoftAvailabilityResponseCodec = object([
8
+ ["data", null, () => VisoftAvailabilityCodec],
10
9
  ]);
11
- export const VisoftAvailabilitySlotPageCodec = object([
12
- ["data", null, array(() => VisoftAvailabilitySlotCodec)],
10
+ export const VisoftAvailableSlotCodec = object([
11
+ ["startsAt", null, instant],
12
+ ]);
13
+ export const VisoftProfessionalAvailabilityCodec = object([
14
+ ["slots", null, array(() => VisoftAvailableSlotCodec)],
13
15
  ]);
@@ -1,15 +1,14 @@
1
1
  import { type BaseClientOptions, Transport } from "../_/index.js";
2
- import { type Client as AgenciesClient } from "./agencies/client.js";
3
2
  import { type Client as AppointmentsClient } from "./appointments/client.js";
4
3
  import { type Client as AvailabilityClient } from "./availability/client.js";
4
+ import { type Client as ClinicClient } from "./clinic/client.js";
5
5
  import { type Client as ClinicsClient } from "./clinics/client.js";
6
6
  import { type Client as ConnectionsClient } from "./connections/client.js";
7
7
  import { type Client as ContractsClient } from "./contracts/client.js";
8
- import { type Client as GroupsClient } from "./groups/client.js";
9
8
  import { type Client as PatientsClient } from "./patients/client.js";
9
+ import { type Client as ProfessionalsClient } from "./professionals/client.js";
10
+ import { type Client as ServiceCatalogsClient } from "./serviceCatalogs/client.js";
10
11
  import { type Client as ServicesClient } from "./services/client.js";
11
- import { type Client as SpecialtyRulesClient } from "./specialtyRules/client.js";
12
- import { type Client as ToolsClient } from "./tools/client.js";
13
12
  export interface ClientOptions extends BaseClientOptions {
14
13
  /**
15
14
  * The URL the paths of the API are relative to.
@@ -17,17 +16,16 @@ export interface ClientOptions extends BaseClientOptions {
17
16
  baseUrl: string;
18
17
  }
19
18
  export interface Client {
20
- readonly agencies: AgenciesClient;
21
19
  readonly appointments: AppointmentsClient;
22
20
  readonly availability: AvailabilityClient;
21
+ readonly clinic: ClinicClient;
23
22
  readonly clinics: ClinicsClient;
24
23
  readonly connections: ConnectionsClient;
25
24
  readonly contracts: ContractsClient;
26
- readonly groups: GroupsClient;
27
25
  readonly patients: PatientsClient;
26
+ readonly professionals: ProfessionalsClient;
27
+ readonly serviceCatalogs: ServiceCatalogsClient;
28
28
  readonly services: ServicesClient;
29
- readonly specialtyRules: SpecialtyRulesClient;
30
- readonly tools: ToolsClient;
31
29
  }
32
30
  export declare function createClient(options: ClientOptions): Client;
33
31
  export declare function bind(transport: Transport): Client;
@@ -1,42 +1,40 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport } from "../_/index.js";
4
- import { bind as bindAgencies, } from "./agencies/client.js";
5
4
  import { bind as bindAppointments, } from "./appointments/client.js";
6
5
  import { bind as bindAvailability, } from "./availability/client.js";
6
+ import { bind as bindClinic, } from "./clinic/client.js";
7
7
  import { bind as bindClinics, } from "./clinics/client.js";
8
8
  import { bind as bindConnections, } from "./connections/client.js";
9
9
  import { bind as bindContracts, } from "./contracts/client.js";
10
- import { bind as bindGroups, } from "./groups/client.js";
11
10
  import { bind as bindPatients, } from "./patients/client.js";
11
+ import { bind as bindProfessionals, } from "./professionals/client.js";
12
+ import { bind as bindServiceCatalogs, } from "./serviceCatalogs/client.js";
12
13
  import { bind as bindServices, } from "./services/client.js";
13
- import { bind as bindSpecialtyRules, } from "./specialtyRules/client.js";
14
- import { bind as bindTools, } from "./tools/client.js";
15
14
  export function createClient(options) {
16
15
  return bind(new Transport(options));
17
16
  }
18
17
  export function bind(transport) {
19
- let agenciesClient;
20
18
  let appointmentsClient;
21
19
  let availabilityClient;
20
+ let clinicClient;
22
21
  let clinicsClient;
23
22
  let connectionsClient;
24
23
  let contractsClient;
25
- let groupsClient;
26
24
  let patientsClient;
25
+ let professionalsClient;
26
+ let serviceCatalogsClient;
27
27
  let servicesClient;
28
- let specialtyRulesClient;
29
- let toolsClient;
30
28
  return {
31
- get agencies() {
32
- return (agenciesClient ??= bindAgencies(transport));
33
- },
34
29
  get appointments() {
35
30
  return (appointmentsClient ??= bindAppointments(transport));
36
31
  },
37
32
  get availability() {
38
33
  return (availabilityClient ??= bindAvailability(transport));
39
34
  },
35
+ get clinic() {
36
+ return (clinicClient ??= bindClinic(transport));
37
+ },
40
38
  get clinics() {
41
39
  return (clinicsClient ??= bindClinics(transport));
42
40
  },
@@ -46,20 +44,17 @@ export function bind(transport) {
46
44
  get contracts() {
47
45
  return (contractsClient ??= bindContracts(transport));
48
46
  },
49
- get groups() {
50
- return (groupsClient ??= bindGroups(transport));
51
- },
52
47
  get patients() {
53
48
  return (patientsClient ??= bindPatients(transport));
54
49
  },
55
- get services() {
56
- return (servicesClient ??= bindServices(transport));
50
+ get professionals() {
51
+ return (professionalsClient ??= bindProfessionals(transport));
57
52
  },
58
- get specialtyRules() {
59
- return (specialtyRulesClient ??= bindSpecialtyRules(transport));
53
+ get serviceCatalogs() {
54
+ return (serviceCatalogsClient ??= bindServiceCatalogs(transport));
60
55
  },
61
- get tools() {
62
- return (toolsClient ??= bindTools(transport));
56
+ get services() {
57
+ return (servicesClient ??= bindServices(transport));
63
58
  },
64
59
  };
65
60
  }
@@ -0,0 +1,30 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { VisoftClinicResponse } 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 the clinic
12
+ *
13
+ * The clinic a connection signs in to: its name, its SIIPS address, its
14
+ * timezone (every startsAt the clinical operations answer carries its offset)
15
+ * and its cost centres, with the one a call that names none runs at. Another
16
+ * organization's connection answers CONNECTION_NOT_FOUND. Contains no patient
17
+ * data and performs no clinical login.
18
+ */
19
+ get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
20
+ }
21
+ export declare function createClient(options: ClientOptions): Client;
22
+ export declare function bind(transport: Transport): Client;
23
+ export interface GetRequest {
24
+ /**
25
+ * The connection whose clinic to read. Optional when the organization has one
26
+ * Visoft connection; required when it has several.
27
+ */
28
+ connectionId?: string;
29
+ }
30
+ export type GetResponse = VisoftClinicResponse;