@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,107 @@
1
+ import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CredentialsRejectedFailure, OutcomeUnknownFailure, PageInfo, ProviderUnavailableFailure, ToolRefusedFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { OrsovisionClinicNotServedFailure, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionResponseMetadata, OrsovisionToolNotAvailableFailure } from "../models.js";
3
+ export interface OrsovisionAgency {
4
+ /**
5
+ * The location, as every later call names it: pass it exactly.
6
+ */
7
+ code: string;
8
+ /**
9
+ * Whether a call that names no location runs at this one.
10
+ */
11
+ default: boolean;
12
+ /**
13
+ * The location's name, to say to the person.
14
+ */
15
+ label: string;
16
+ }
17
+ export interface OrsovisionAgencyPage {
18
+ /**
19
+ * Items admitted by this resource contract within the verified organization.
20
+ */
21
+ data: OrsovisionAgency[];
22
+ /**
23
+ * Discriminator for a resource list response.
24
+ */
25
+ object: "list";
26
+ /**
27
+ * Opaque navigation cursors for this page’s stable keyset order.
28
+ */
29
+ pageInfo: PageInfo;
30
+ }
31
+ /**
32
+ * A successful answer.
33
+ */
34
+ export interface OrsovisionAgencyPageResponse {
35
+ data: OrsovisionAgencyPage;
36
+ error: null;
37
+ /**
38
+ * What every answer carries besides its data or error.
39
+ */
40
+ metadata: OrsovisionResponseMetadata;
41
+ success: true;
42
+ }
43
+ /**
44
+ * A failed answer.
45
+ */
46
+ export interface OrsovisionListAgenciesBadGatewayError {
47
+ data: null;
48
+ error: OrsovisionListAgenciesBadGatewayFailure;
49
+ /**
50
+ * What every answer carries besides its data or error.
51
+ */
52
+ metadata: OrsovisionResponseMetadata;
53
+ success: false;
54
+ }
55
+ export type OrsovisionListAgenciesBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
56
+ /**
57
+ * A failed answer.
58
+ */
59
+ export interface OrsovisionListAgenciesConflictError {
60
+ data: null;
61
+ error: OrsovisionListAgenciesConflictFailure;
62
+ /**
63
+ * What every answer carries besides its data or error.
64
+ */
65
+ metadata: OrsovisionResponseMetadata;
66
+ success: false;
67
+ }
68
+ export type OrsovisionListAgenciesConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
69
+ /**
70
+ * A failed answer.
71
+ */
72
+ export interface OrsovisionListAgenciesNotFoundError {
73
+ data: null;
74
+ error: OrsovisionListAgenciesNotFoundFailure;
75
+ /**
76
+ * What every answer carries besides its data or error.
77
+ */
78
+ metadata: OrsovisionResponseMetadata;
79
+ success: false;
80
+ }
81
+ export type OrsovisionListAgenciesNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
82
+ /**
83
+ * A failed answer.
84
+ */
85
+ export interface OrsovisionListAgenciesServiceUnavailableError {
86
+ data: null;
87
+ error: OrsovisionListAgenciesServiceUnavailableFailure;
88
+ /**
89
+ * What every answer carries besides its data or error.
90
+ */
91
+ metadata: OrsovisionResponseMetadata;
92
+ success: false;
93
+ }
94
+ export type OrsovisionListAgenciesServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
95
+ /**
96
+ * A failed answer.
97
+ */
98
+ export interface OrsovisionListAgenciesUnprocessableContentError {
99
+ data: null;
100
+ error: OrsovisionListAgenciesUnprocessableContentFailure;
101
+ /**
102
+ * What every answer carries besides its data or error.
103
+ */
104
+ metadata: OrsovisionResponseMetadata;
105
+ success: false;
106
+ }
107
+ export type OrsovisionListAgenciesUnprocessableContentFailure = CredentialsRejectedFailure | ToolRefusedFailure;
@@ -0,0 +1,39 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { OrsovisionToolResultResponse } from "../models.js";
3
+ import { type OrsovisionCancelAppointmentBody, type OrsovisionCreateAppointmentBody } from "./models.js";
4
+ export interface ClientOptions extends BaseClientOptions {
5
+ /**
6
+ * The URL the paths of the API are relative to.
7
+ */
8
+ baseUrl: string;
9
+ }
10
+ export interface Client {
11
+ /**
12
+ * Cancel an appointment
13
+ *
14
+ * Cancel one exact future appointment, only after the person explicitly
15
+ * confirmed it, with the cancellation reference from a fresh patient lookup.
16
+ * Never repeat a cancellation whose outcome is unknown. Orsovision's tool
17
+ * pack sets this tool's rules, parameters and accepted values
18
+ * (orsovision.tools.list answers them), and every call is checked against
19
+ * them.
20
+ */
21
+ cancel(request: CancelRequest, options?: RequestOptions): Promise<CancelResponse>;
22
+ /**
23
+ * Book an appointment
24
+ *
25
+ * Book one slot orsovision.availability.lookup returned, only after the
26
+ * person explicitly confirmed that exact appointment. Pass its reference
27
+ * unchanged. Never repeat a booking whose outcome is unknown. Orsovision's
28
+ * tool pack sets this tool's rules, parameters and accepted values
29
+ * (orsovision.tools.list answers them), and every call is checked against
30
+ * them.
31
+ */
32
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
33
+ }
34
+ export declare function createClient(options: ClientOptions): Client;
35
+ export declare function bind(transport: Transport): Client;
36
+ export type CancelRequest = OrsovisionCancelAppointmentBody;
37
+ export type CancelResponse = OrsovisionToolResultResponse;
38
+ export type CreateRequest = OrsovisionCreateAppointmentBody;
39
+ export type CreateResponse = OrsovisionToolResultResponse;
@@ -0,0 +1,29 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { OrsovisionCancelAppointmentBodyCodec, OrsovisionCreateAppointmentBodyCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ cancel: (request, options) => transport.send(CancelOperation, request, options),
11
+ create: (request, options) => transport.send(CreateOperation, request, options),
12
+ };
13
+ }
14
+ const CancelOperation = {
15
+ method: "POST",
16
+ route: "/v1/orsovision/appointments/cancel",
17
+ body: "flat",
18
+ request: OrsovisionCancelAppointmentBodyCodec,
19
+ response: null,
20
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
21
+ };
22
+ const CreateOperation = {
23
+ method: "POST",
24
+ route: "/v1/orsovision/appointments",
25
+ body: "flat",
26
+ request: OrsovisionCreateAppointmentBodyCodec,
27
+ response: null,
28
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
29
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, CancelRequest, CancelResponse, CreateRequest, CreateResponse, } from "./client.js";
5
+ export type { OrsovisionCancelAppointmentBadGatewayError, OrsovisionCancelAppointmentBody, OrsovisionCancelAppointmentConflictError, OrsovisionCancelAppointmentConflictFailure, OrsovisionCancelAppointmentNotFoundError, OrsovisionCancelAppointmentNotFoundFailure, OrsovisionCancelAppointmentServiceUnavailableError, OrsovisionCancelAppointmentServiceUnavailableFailure, OrsovisionCreateAppointmentBadGatewayError, OrsovisionCreateAppointmentBody, OrsovisionCreateAppointmentConflictError, OrsovisionCreateAppointmentConflictFailure, OrsovisionCreateAppointmentNotFoundError, OrsovisionCreateAppointmentNotFoundFailure, OrsovisionCreateAppointmentServiceUnavailableError, OrsovisionCreateAppointmentServiceUnavailableFailure, } from "./models.js";
@@ -0,0 +1,206 @@
1
+ import type { CancelAppointmentBadGatewayFailure, ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, CreateAppointmentBadGatewayFailure, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { OrsovisionClinicNotServedFailure, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionResponseMetadata, OrsovisionToolNotAvailableFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface OrsovisionCancelAppointmentBadGatewayError {
7
+ data: null;
8
+ error: CancelAppointmentBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: OrsovisionResponseMetadata;
13
+ success: false;
14
+ }
15
+ export interface OrsovisionCancelAppointmentBody {
16
+ /**
17
+ * El cancelToken de la cita a cancelar, copiado literal de
18
+ * upcomingAppointments[] en un patient_context fresco. Nunca otro
19
+ * identificador ni un token guardado de turnos viejos.
20
+ */
21
+ cancelToken: string;
22
+ /**
23
+ * The channel the conversation happens on: voice, whatsapp or web (the
24
+ * default).
25
+ */
26
+ channel?: "voice" | "web" | "whatsapp";
27
+ /**
28
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
29
+ * the organization has one; required when it has several. Another
30
+ * organization's connection is CONNECTION_NOT_FOUND.
31
+ */
32
+ connectionId?: string;
33
+ /**
34
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
35
+ *
36
+ * @deprecated
37
+ */
38
+ date?: string;
39
+ /**
40
+ * Documento confirmado del paciente dueño de la cita; solo dígitos.
41
+ */
42
+ documentNumber: string;
43
+ /**
44
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
45
+ * as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
46
+ * Send it in place of the former date and time; sent beside them, they must
47
+ * name the same moment.
48
+ */
49
+ startsAt?: Temporal.Instant;
50
+ /**
51
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
52
+ *
53
+ * @deprecated
54
+ */
55
+ time?: string;
56
+ }
57
+ /**
58
+ * A failed answer.
59
+ */
60
+ export interface OrsovisionCancelAppointmentConflictError {
61
+ data: null;
62
+ error: OrsovisionCancelAppointmentConflictFailure;
63
+ /**
64
+ * What every answer carries besides its data or error.
65
+ */
66
+ metadata: OrsovisionResponseMetadata;
67
+ success: false;
68
+ }
69
+ export type OrsovisionCancelAppointmentConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
70
+ /**
71
+ * A failed answer.
72
+ */
73
+ export interface OrsovisionCancelAppointmentNotFoundError {
74
+ data: null;
75
+ error: OrsovisionCancelAppointmentNotFoundFailure;
76
+ /**
77
+ * What every answer carries besides its data or error.
78
+ */
79
+ metadata: OrsovisionResponseMetadata;
80
+ success: false;
81
+ }
82
+ export type OrsovisionCancelAppointmentNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
83
+ /**
84
+ * A failed answer.
85
+ */
86
+ export interface OrsovisionCancelAppointmentServiceUnavailableError {
87
+ data: null;
88
+ error: OrsovisionCancelAppointmentServiceUnavailableFailure;
89
+ /**
90
+ * What every answer carries besides its data or error.
91
+ */
92
+ metadata: OrsovisionResponseMetadata;
93
+ success: false;
94
+ }
95
+ export type OrsovisionCancelAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
96
+ /**
97
+ * A failed answer.
98
+ */
99
+ export interface OrsovisionCreateAppointmentBadGatewayError {
100
+ data: null;
101
+ error: CreateAppointmentBadGatewayFailure;
102
+ /**
103
+ * What every answer carries besides its data or error.
104
+ */
105
+ metadata: OrsovisionResponseMetadata;
106
+ success: false;
107
+ }
108
+ export interface OrsovisionCreateAppointmentBody {
109
+ /**
110
+ * The channel the conversation happens on: voice, whatsapp or web (the
111
+ * default).
112
+ */
113
+ channel?: "voice" | "web" | "whatsapp";
114
+ /**
115
+ * The Visoft connection to run on, as Account lists it (con_…). Optional when
116
+ * the organization has one; required when it has several. Another
117
+ * organization's connection is CONNECTION_NOT_FOUND.
118
+ */
119
+ connectionId?: string;
120
+ /**
121
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
122
+ *
123
+ * @deprecated
124
+ */
125
+ date?: string;
126
+ /**
127
+ * Documento del paciente para quien se consultó la disponibilidad.
128
+ */
129
+ documentNumber: string;
130
+ /**
131
+ * Tipo de documento de patient_context.
132
+ */
133
+ documentType?: string;
134
+ /**
135
+ * true SOLO si la persona quiere explícitamente una segunda cita del mismo
136
+ * servicio que ya tiene (una serie de sesiones). Sin series, un duplicado se
137
+ * rechaza con APPOINTMENT_ALREADY_EXISTS: nunca agendes dos primeras
138
+ * valoraciones.
139
+ */
140
+ series?: boolean;
141
+ /**
142
+ * The appointment's moment, as an RFC 3339 instant with its offset, exactly
143
+ * as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
144
+ * Send it in place of the former date and time; sent beside them, they must
145
+ * name the same moment.
146
+ */
147
+ startsAt?: Temporal.Instant;
148
+ /**
149
+ * Deprecated: use `startsAt`. Answered until 2027-01-28.
150
+ *
151
+ * @deprecated
152
+ */
153
+ time?: string;
154
+ /**
155
+ * El token del horario elegido, copiado literal de data[].token de
156
+ * appointment_availability. Nunca lo alteres, recortes ni reconstruyas, y
157
+ * nunca lo leas en voz alta.
158
+ */
159
+ token: string;
160
+ /**
161
+ * Normalmente omítelo (viene en el token); usa solo un valor confirmado por
162
+ * el flujo de agendamiento.
163
+ */
164
+ visitType?: string;
165
+ }
166
+ /**
167
+ * A failed answer.
168
+ */
169
+ export interface OrsovisionCreateAppointmentConflictError {
170
+ data: null;
171
+ error: OrsovisionCreateAppointmentConflictFailure;
172
+ /**
173
+ * What every answer carries besides its data or error.
174
+ */
175
+ metadata: OrsovisionResponseMetadata;
176
+ success: false;
177
+ }
178
+ export type OrsovisionCreateAppointmentConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
179
+ /**
180
+ * A failed answer.
181
+ */
182
+ export interface OrsovisionCreateAppointmentNotFoundError {
183
+ data: null;
184
+ error: OrsovisionCreateAppointmentNotFoundFailure;
185
+ /**
186
+ * What every answer carries besides its data or error.
187
+ */
188
+ metadata: OrsovisionResponseMetadata;
189
+ success: false;
190
+ }
191
+ export type OrsovisionCreateAppointmentNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
192
+ /**
193
+ * A failed answer.
194
+ */
195
+ export interface OrsovisionCreateAppointmentServiceUnavailableError {
196
+ data: null;
197
+ error: OrsovisionCreateAppointmentServiceUnavailableFailure;
198
+ /**
199
+ * What every answer carries besides its data or error.
200
+ */
201
+ metadata: OrsovisionResponseMetadata;
202
+ success: false;
203
+ }
204
+ export type OrsovisionCreateAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
205
+ export declare const OrsovisionCancelAppointmentBodyCodec: import("../../_/codec.js").Codec;
206
+ export declare const OrsovisionCreateAppointmentBodyCodec: import("../../_/codec.js").Codec;
@@ -0,0 +1,9 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { instant, object } from "../../_/index.js";
4
+ export const OrsovisionCancelAppointmentBodyCodec = object([
5
+ ["startsAt", null, instant],
6
+ ]);
7
+ export const OrsovisionCreateAppointmentBodyCodec = object([
8
+ ["startsAt", null, instant],
9
+ ]);
@@ -0,0 +1,32 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import { type OrsovisionAvailabilitySlotPageResponse, type OrsovisionListAvailabilityBody } from "./models.js";
3
+ export interface ClientOptions extends BaseClientOptions {
4
+ /**
5
+ * The URL the paths of the API are relative to.
6
+ */
7
+ baseUrl: string;
8
+ }
9
+ export interface Client {
10
+ /**
11
+ * Find available appointments
12
+ *
13
+ * Real available appointments for a service under a contract, one slot per
14
+ * item in chronological order, each with its professional and the booking
15
+ * reference (token) orsovision.appointments.create takes. limit is how many
16
+ * slots to offer (three in a conversation); for more, call again with the
17
+ * same arguments and pageInfo.nextCursor. window: requested; extended, the
18
+ * dates asked for had none; alternative, the time preference had none (say
19
+ * those first). A completed search without slots is TOOL_REFUSED
20
+ * (NO_AVAILABILITY); never search again without the person's filters. This
21
+ * read never books anything. A refusal is TOOL_REFUSED: data.reason says why,
22
+ * data.guidance what to do next and data.details what it offers instead; it
23
+ * is never an outage. Orsovision's tool pack sets this tool's rules,
24
+ * parameters and accepted values (orsovision.tools.list answers them), and
25
+ * every call is checked against them.
26
+ */
27
+ lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
28
+ }
29
+ export declare function createClient(options: ClientOptions): Client;
30
+ export declare function bind(transport: Transport): Client;
31
+ export type LookupRequest = OrsovisionListAvailabilityBody;
32
+ export type LookupResponse = OrsovisionAvailabilitySlotPageResponse;
@@ -0,0 +1,19 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ import { OrsovisionAvailabilitySlotPageResponseCodec, } from "./models.js";
5
+ export function createClient(options) {
6
+ return bind(new Transport(options));
7
+ }
8
+ export function bind(transport) {
9
+ return {
10
+ lookup: (request, options) => transport.send(LookupOperation, request, options),
11
+ };
12
+ }
13
+ const LookupOperation = {
14
+ method: "POST",
15
+ route: "/v1/orsovision/availability/lookup",
16
+ body: "flat",
17
+ response: OrsovisionAvailabilitySlotPageResponseCodec,
18
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
+ export type { OrsovisionAvailabilitySlot, OrsovisionAvailabilitySlotPage, OrsovisionAvailabilitySlotPageResponse, OrsovisionListAvailabilityBadGatewayError, OrsovisionListAvailabilityBody, OrsovisionListAvailabilityConflictError, OrsovisionListAvailabilityConflictFailure, OrsovisionListAvailabilityNotFoundError, OrsovisionListAvailabilityNotFoundFailure, OrsovisionListAvailabilityServiceUnavailableError, OrsovisionListAvailabilityServiceUnavailableFailure, OrsovisionListAvailabilityUnprocessableContentError, } from "./models.js";