@arbol-ai/sdk 5.26.0 → 5.28.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.
- package/README.md +4 -4
- package/dist/agenda/models.d.ts +105 -0
- package/dist/client.d.ts +0 -4
- package/dist/client.js +0 -10
- package/dist/index.d.ts +1 -1
- package/dist/models.d.ts +0 -282
- package/dist/models.js +1 -5
- package/dist/raiz/conversations/client.d.ts +4 -3
- package/dist/raiz/organization/client.d.ts +11 -4
- package/dist/raiz/organization/models.d.ts +6 -0
- package/dist/visoft/appointments/index.d.ts +1 -1
- package/dist/visoft/appointments/models.d.ts +32 -6
- package/dist/visoft/availability/models.d.ts +4 -4
- package/dist/visoft/contracts/index.d.ts +1 -1
- package/dist/visoft/contracts/models.d.ts +16 -3
- package/dist/visoft/index.d.ts +1 -1
- package/dist/visoft/models.d.ts +67 -2
- package/dist/visoft/patients/index.d.ts +1 -1
- package/dist/visoft/patients/models.d.ts +35 -6
- package/dist/visoft/professionals/models.d.ts +4 -4
- package/dist/visoft/serviceCatalogs/models.d.ts +4 -4
- package/dist/visoft/services/index.d.ts +1 -1
- package/dist/visoft/services/models.d.ts +16 -3
- package/package.json +3 -3
- package/dist/orsovision/agencies/client.d.ts +0 -51
- package/dist/orsovision/agencies/client.js +0 -18
- package/dist/orsovision/agencies/index.d.ts +0 -5
- package/dist/orsovision/agencies/index.js +0 -4
- package/dist/orsovision/agencies/models.d.ts +0 -107
- package/dist/orsovision/agencies/models.js +0 -3
- package/dist/orsovision/appointments/client.d.ts +0 -39
- package/dist/orsovision/appointments/client.js +0 -29
- package/dist/orsovision/appointments/index.d.ts +0 -5
- package/dist/orsovision/appointments/index.js +0 -4
- package/dist/orsovision/appointments/models.d.ts +0 -182
- package/dist/orsovision/appointments/models.js +0 -9
- package/dist/orsovision/availability/client.d.ts +0 -32
- package/dist/orsovision/availability/client.js +0 -19
- package/dist/orsovision/availability/index.d.ts +0 -5
- package/dist/orsovision/availability/index.js +0 -4
- package/dist/orsovision/availability/models.d.ts +0 -228
- package/dist/orsovision/availability/models.js +0 -15
- package/dist/orsovision/client.d.ts +0 -27
- package/dist/orsovision/client.js +0 -50
- package/dist/orsovision/clinic/client.d.ts +0 -34
- package/dist/orsovision/clinic/client.js +0 -18
- package/dist/orsovision/clinic/index.d.ts +0 -5
- package/dist/orsovision/clinic/index.js +0 -4
- package/dist/orsovision/clinic/models.d.ts +0 -90
- package/dist/orsovision/clinic/models.js +0 -3
- package/dist/orsovision/contracts/client.d.ts +0 -69
- package/dist/orsovision/contracts/client.js +0 -18
- package/dist/orsovision/contracts/index.d.ts +0 -5
- package/dist/orsovision/contracts/index.js +0 -4
- package/dist/orsovision/contracts/models.d.ts +0 -84
- package/dist/orsovision/contracts/models.js +0 -3
- package/dist/orsovision/index.d.ts +0 -5
- package/dist/orsovision/index.js +0 -4
- package/dist/orsovision/models.d.ts +0 -66
- package/dist/orsovision/models.js +0 -3
- package/dist/orsovision/patients/client.d.ts +0 -52
- package/dist/orsovision/patients/client.js +0 -34
- package/dist/orsovision/patients/index.d.ts +0 -5
- package/dist/orsovision/patients/index.js +0 -4
- package/dist/orsovision/patients/models.d.ts +0 -287
- package/dist/orsovision/patients/models.js +0 -3
- package/dist/orsovision/services/client.d.ts +0 -74
- package/dist/orsovision/services/client.js +0 -18
- package/dist/orsovision/services/index.d.ts +0 -5
- package/dist/orsovision/services/index.js +0 -4
- package/dist/orsovision/services/models.d.ts +0 -81
- package/dist/orsovision/services/models.js +0 -3
- package/dist/orsovision/tools/client.d.ts +0 -44
- package/dist/orsovision/tools/client.js +0 -18
- package/dist/orsovision/tools/index.d.ts +0 -5
- package/dist/orsovision/tools/index.js +0 -4
- package/dist/orsovision/tools/models.d.ts +0 -102
- package/dist/orsovision/tools/models.js +0 -3
- package/dist/somos/appointments/client.d.ts +0 -40
- package/dist/somos/appointments/client.js +0 -29
- package/dist/somos/appointments/index.d.ts +0 -5
- package/dist/somos/appointments/index.js +0 -4
- package/dist/somos/appointments/models.d.ts +0 -303
- package/dist/somos/appointments/models.js +0 -9
- package/dist/somos/availability/client.d.ts +0 -33
- package/dist/somos/availability/client.js +0 -19
- package/dist/somos/availability/index.d.ts +0 -5
- package/dist/somos/availability/index.js +0 -4
- package/dist/somos/availability/models.d.ts +0 -338
- package/dist/somos/availability/models.js +0 -15
- package/dist/somos/client.d.ts +0 -29
- package/dist/somos/client.js +0 -55
- package/dist/somos/clinic/client.d.ts +0 -33
- package/dist/somos/clinic/client.js +0 -18
- package/dist/somos/clinic/index.d.ts +0 -5
- package/dist/somos/clinic/index.js +0 -4
- package/dist/somos/clinic/models.d.ts +0 -90
- package/dist/somos/clinic/models.js +0 -3
- package/dist/somos/contracts/client.d.ts +0 -74
- package/dist/somos/contracts/client.js +0 -18
- package/dist/somos/contracts/index.d.ts +0 -5
- package/dist/somos/contracts/index.js +0 -4
- package/dist/somos/contracts/models.d.ts +0 -96
- package/dist/somos/contracts/models.js +0 -3
- package/dist/somos/groups/client.d.ts +0 -67
- package/dist/somos/groups/client.js +0 -18
- package/dist/somos/groups/index.d.ts +0 -5
- package/dist/somos/groups/index.js +0 -4
- package/dist/somos/groups/models.d.ts +0 -117
- package/dist/somos/groups/models.js +0 -3
- package/dist/somos/index.d.ts +0 -5
- package/dist/somos/index.js +0 -4
- package/dist/somos/models.d.ts +0 -88
- package/dist/somos/models.js +0 -3
- package/dist/somos/patients/client.d.ts +0 -51
- package/dist/somos/patients/client.js +0 -34
- package/dist/somos/patients/index.d.ts +0 -5
- package/dist/somos/patients/index.js +0 -4
- package/dist/somos/patients/models.d.ts +0 -330
- package/dist/somos/patients/models.js +0 -3
- package/dist/somos/services/client.d.ts +0 -116
- package/dist/somos/services/client.js +0 -26
- package/dist/somos/services/index.d.ts +0 -5
- package/dist/somos/services/index.js +0 -4
- package/dist/somos/services/models.d.ts +0 -261
- package/dist/somos/services/models.js +0 -3
- package/dist/somos/specialtyRules/client.d.ts +0 -44
- package/dist/somos/specialtyRules/client.js +0 -18
- package/dist/somos/specialtyRules/index.d.ts +0 -5
- package/dist/somos/specialtyRules/index.js +0 -4
- package/dist/somos/specialtyRules/models.d.ts +0 -54
- package/dist/somos/specialtyRules/models.js +0 -3
- package/dist/somos/tools/client.d.ts +0 -44
- package/dist/somos/tools/client.js +0 -18
- package/dist/somos/tools/index.d.ts +0 -5
- package/dist/somos/tools/index.js +0 -4
- package/dist/somos/tools/models.d.ts +0 -102
- package/dist/somos/tools/models.js +0 -3
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
|
|
2
|
-
import type { ToolResultResponse } 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 = ToolResultResponse;
|
|
38
|
-
export type CreateRequest = OrsovisionCreateAppointmentBody;
|
|
39
|
-
export type CreateResponse = ToolResultResponse;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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 { OrsovisionCancelAppointmentBody, OrsovisionCancelAppointmentConflictError, OrsovisionCancelAppointmentConflictFailure, OrsovisionCancelAppointmentNotFoundError, OrsovisionCancelAppointmentNotFoundFailure, OrsovisionCancelAppointmentServiceUnavailableError, OrsovisionCancelAppointmentServiceUnavailableFailure, OrsovisionCreateAppointmentBody, OrsovisionCreateAppointmentConflictError, OrsovisionCreateAppointmentConflictFailure, OrsovisionCreateAppointmentNotFoundError, OrsovisionCreateAppointmentNotFoundFailure, OrsovisionCreateAppointmentServiceUnavailableError, OrsovisionCreateAppointmentServiceUnavailableFailure, } from "./models.js";
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import type { ConnectionNotConfiguredFailure, ConnectionNotFoundFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import type { OrsovisionClinicNotServedFailure, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionToolNotAvailableFailure } from "../models.js";
|
|
3
|
-
export interface OrsovisionCancelAppointmentBody {
|
|
4
|
-
/**
|
|
5
|
-
* El cancelToken de la cita a cancelar, copiado literal de
|
|
6
|
-
* upcomingAppointments[] en un patient_context fresco. Nunca otro
|
|
7
|
-
* identificador ni un token guardado de turnos viejos.
|
|
8
|
-
*/
|
|
9
|
-
cancelToken: string;
|
|
10
|
-
/**
|
|
11
|
-
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
12
|
-
* default).
|
|
13
|
-
*/
|
|
14
|
-
channel?: "voice" | "web" | "whatsapp";
|
|
15
|
-
/**
|
|
16
|
-
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
17
|
-
* the organization has one; required when it has several. Another
|
|
18
|
-
* organization's connection is CONNECTION_NOT_FOUND.
|
|
19
|
-
*/
|
|
20
|
-
connectionId?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
23
|
-
*
|
|
24
|
-
* @deprecated
|
|
25
|
-
*/
|
|
26
|
-
date?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Documento confirmado del paciente dueño de la cita; solo dígitos.
|
|
29
|
-
*/
|
|
30
|
-
documentNumber: string;
|
|
31
|
-
/**
|
|
32
|
-
* The appointment's moment, as an RFC 3339 instant with its offset, exactly
|
|
33
|
-
* as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
|
|
34
|
-
* Send it in place of the former date and time; sent beside them, they must
|
|
35
|
-
* name the same moment.
|
|
36
|
-
*/
|
|
37
|
-
startsAt?: Temporal.Instant;
|
|
38
|
-
/**
|
|
39
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
40
|
-
*
|
|
41
|
-
* @deprecated
|
|
42
|
-
*/
|
|
43
|
-
time?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A failed answer.
|
|
47
|
-
*/
|
|
48
|
-
export interface OrsovisionCancelAppointmentConflictError {
|
|
49
|
-
data: null;
|
|
50
|
-
error: OrsovisionCancelAppointmentConflictFailure;
|
|
51
|
-
/**
|
|
52
|
-
* What every answer carries besides its data or error.
|
|
53
|
-
*/
|
|
54
|
-
metadata: ResponseMetadata;
|
|
55
|
-
success: false;
|
|
56
|
-
}
|
|
57
|
-
export type OrsovisionCancelAppointmentConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
58
|
-
/**
|
|
59
|
-
* A failed answer.
|
|
60
|
-
*/
|
|
61
|
-
export interface OrsovisionCancelAppointmentNotFoundError {
|
|
62
|
-
data: null;
|
|
63
|
-
error: OrsovisionCancelAppointmentNotFoundFailure;
|
|
64
|
-
/**
|
|
65
|
-
* What every answer carries besides its data or error.
|
|
66
|
-
*/
|
|
67
|
-
metadata: ResponseMetadata;
|
|
68
|
-
success: false;
|
|
69
|
-
}
|
|
70
|
-
export type OrsovisionCancelAppointmentNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
71
|
-
/**
|
|
72
|
-
* A failed answer.
|
|
73
|
-
*/
|
|
74
|
-
export interface OrsovisionCancelAppointmentServiceUnavailableError {
|
|
75
|
-
data: null;
|
|
76
|
-
error: OrsovisionCancelAppointmentServiceUnavailableFailure;
|
|
77
|
-
/**
|
|
78
|
-
* What every answer carries besides its data or error.
|
|
79
|
-
*/
|
|
80
|
-
metadata: ResponseMetadata;
|
|
81
|
-
success: false;
|
|
82
|
-
}
|
|
83
|
-
export type OrsovisionCancelAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|
|
84
|
-
export interface OrsovisionCreateAppointmentBody {
|
|
85
|
-
/**
|
|
86
|
-
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
87
|
-
* default).
|
|
88
|
-
*/
|
|
89
|
-
channel?: "voice" | "web" | "whatsapp";
|
|
90
|
-
/**
|
|
91
|
-
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
92
|
-
* the organization has one; required when it has several. Another
|
|
93
|
-
* organization's connection is CONNECTION_NOT_FOUND.
|
|
94
|
-
*/
|
|
95
|
-
connectionId?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
98
|
-
*
|
|
99
|
-
* @deprecated
|
|
100
|
-
*/
|
|
101
|
-
date?: string;
|
|
102
|
-
/**
|
|
103
|
-
* Documento del paciente para quien se consultó la disponibilidad.
|
|
104
|
-
*/
|
|
105
|
-
documentNumber: string;
|
|
106
|
-
/**
|
|
107
|
-
* Tipo de documento de patient_context.
|
|
108
|
-
*/
|
|
109
|
-
documentType?: string;
|
|
110
|
-
/**
|
|
111
|
-
* true SOLO si la persona quiere explícitamente una segunda cita del mismo
|
|
112
|
-
* servicio que ya tiene (una serie de sesiones). Sin series, un duplicado se
|
|
113
|
-
* rechaza con APPOINTMENT_ALREADY_EXISTS: nunca agendes dos primeras
|
|
114
|
-
* valoraciones.
|
|
115
|
-
*/
|
|
116
|
-
series?: boolean;
|
|
117
|
-
/**
|
|
118
|
-
* The appointment's moment, as an RFC 3339 instant with its offset, exactly
|
|
119
|
-
* as an answer gave it in startsAt (for example "2026-11-04T08:50:00-05:00").
|
|
120
|
-
* Send it in place of the former date and time; sent beside them, they must
|
|
121
|
-
* name the same moment.
|
|
122
|
-
*/
|
|
123
|
-
startsAt?: Temporal.Instant;
|
|
124
|
-
/**
|
|
125
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
126
|
-
*
|
|
127
|
-
* @deprecated
|
|
128
|
-
*/
|
|
129
|
-
time?: string;
|
|
130
|
-
/**
|
|
131
|
-
* El token del horario elegido, copiado literal de data[].token de
|
|
132
|
-
* appointment_availability. Nunca lo alteres, recortes ni reconstruyas, y
|
|
133
|
-
* nunca lo leas en voz alta.
|
|
134
|
-
*/
|
|
135
|
-
token: string;
|
|
136
|
-
/**
|
|
137
|
-
* Normalmente omítelo (viene en el token); usa solo un valor confirmado por
|
|
138
|
-
* el flujo de agendamiento.
|
|
139
|
-
*/
|
|
140
|
-
visitType?: string;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* A failed answer.
|
|
144
|
-
*/
|
|
145
|
-
export interface OrsovisionCreateAppointmentConflictError {
|
|
146
|
-
data: null;
|
|
147
|
-
error: OrsovisionCreateAppointmentConflictFailure;
|
|
148
|
-
/**
|
|
149
|
-
* What every answer carries besides its data or error.
|
|
150
|
-
*/
|
|
151
|
-
metadata: ResponseMetadata;
|
|
152
|
-
success: false;
|
|
153
|
-
}
|
|
154
|
-
export type OrsovisionCreateAppointmentConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
155
|
-
/**
|
|
156
|
-
* A failed answer.
|
|
157
|
-
*/
|
|
158
|
-
export interface OrsovisionCreateAppointmentNotFoundError {
|
|
159
|
-
data: null;
|
|
160
|
-
error: OrsovisionCreateAppointmentNotFoundFailure;
|
|
161
|
-
/**
|
|
162
|
-
* What every answer carries besides its data or error.
|
|
163
|
-
*/
|
|
164
|
-
metadata: ResponseMetadata;
|
|
165
|
-
success: false;
|
|
166
|
-
}
|
|
167
|
-
export type OrsovisionCreateAppointmentNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
168
|
-
/**
|
|
169
|
-
* A failed answer.
|
|
170
|
-
*/
|
|
171
|
-
export interface OrsovisionCreateAppointmentServiceUnavailableError {
|
|
172
|
-
data: null;
|
|
173
|
-
error: OrsovisionCreateAppointmentServiceUnavailableFailure;
|
|
174
|
-
/**
|
|
175
|
-
* What every answer carries besides its data or error.
|
|
176
|
-
*/
|
|
177
|
-
metadata: ResponseMetadata;
|
|
178
|
-
success: false;
|
|
179
|
-
}
|
|
180
|
-
export type OrsovisionCreateAppointmentServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|
|
181
|
-
export declare const OrsovisionCancelAppointmentBodyCodec: import("../../_/codec.js").Codec;
|
|
182
|
-
export declare const OrsovisionCreateAppointmentBodyCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
]);
|
|
@@ -1,32 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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, OrsovisionListAvailabilityBadGatewayFailure, OrsovisionListAvailabilityBody, OrsovisionListAvailabilityConflictError, OrsovisionListAvailabilityConflictFailure, OrsovisionListAvailabilityNotFoundError, OrsovisionListAvailabilityNotFoundFailure, OrsovisionListAvailabilityServiceUnavailableError, OrsovisionListAvailabilityServiceUnavailableFailure, } from "./models.js";
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { type AvailabilityBookingInput, type ConnectionNotConfiguredFailure, type ConnectionNotFoundFailure, type OutcomeUnknownFailure, type PageInfo, type ProviderUnavailableFailure, type ResponseMetadata, type UpstreamUnavailableFailure } from "../../models.js";
|
|
2
|
-
import type { OrsovisionClinicNotServedFailure, OrsovisionOrsovisionNotConfiguredFailure, OrsovisionToolNotAvailableFailure } from "../models.js";
|
|
3
|
-
export interface OrsovisionAvailabilitySlot {
|
|
4
|
-
/**
|
|
5
|
-
* The professional's agenda, when they run several.
|
|
6
|
-
*/
|
|
7
|
-
agenda?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Copy these exact arguments to orsovision.appointments.create only after the
|
|
10
|
-
* person confirms this slot and service; add the confirmed documentNumber.
|
|
11
|
-
* Retain separately confirmed consent. Never replace the service or contract
|
|
12
|
-
* with a fresh EPS guess.
|
|
13
|
-
*/
|
|
14
|
-
bookingInput?: AvailabilityBookingInput;
|
|
15
|
-
/**
|
|
16
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
17
|
-
*
|
|
18
|
-
* @deprecated
|
|
19
|
-
*/
|
|
20
|
-
date: Temporal.PlainDate;
|
|
21
|
-
/**
|
|
22
|
-
* The day as it is said to the person.
|
|
23
|
-
*/
|
|
24
|
-
dateSpoken: string;
|
|
25
|
-
fonoGroup?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The professional, as a later search names them (medic).
|
|
28
|
-
*/
|
|
29
|
-
medicId: string;
|
|
30
|
-
/**
|
|
31
|
-
* The professional's name: this slot is theirs and no one else's.
|
|
32
|
-
*/
|
|
33
|
-
medicName: string;
|
|
34
|
-
modality?: string;
|
|
35
|
-
/**
|
|
36
|
-
* For a pair of consecutive exams: whether the next slot with the same
|
|
37
|
-
* professional is free too.
|
|
38
|
-
*/
|
|
39
|
-
pairable?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The room, when the clinic schedules by room.
|
|
42
|
-
*/
|
|
43
|
-
sala?: string;
|
|
44
|
-
/**
|
|
45
|
-
* The slot's specialty, as the clinic's agenda names it.
|
|
46
|
-
*/
|
|
47
|
-
specialty: string;
|
|
48
|
-
/**
|
|
49
|
-
* The slot's moment, with the clinic's offset: what
|
|
50
|
-
* orsovision.appointments.create books.
|
|
51
|
-
*/
|
|
52
|
-
startsAt: Temporal.Instant;
|
|
53
|
-
/**
|
|
54
|
-
* Deprecated: use `startsAt`. Answered until 2027-01-28.
|
|
55
|
-
*
|
|
56
|
-
* @deprecated
|
|
57
|
-
*/
|
|
58
|
-
time: string;
|
|
59
|
-
toGroup?: string;
|
|
60
|
-
/**
|
|
61
|
-
* The booking reference orsovision.appointments.create takes, unchanged; null
|
|
62
|
-
* when the slot cannot be booked by reference.
|
|
63
|
-
*/
|
|
64
|
-
token: string | null;
|
|
65
|
-
/**
|
|
66
|
-
* The day's weekday.
|
|
67
|
-
*/
|
|
68
|
-
weekday: string;
|
|
69
|
-
/**
|
|
70
|
-
* requested: inside the dates and times asked for. extended: the dates asked
|
|
71
|
-
* for had none, so the search went on to the nearest. alternative: inside
|
|
72
|
-
* those dates but outside the time preference, which had none.
|
|
73
|
-
*/
|
|
74
|
-
window: "requested" | "extended" | "alternative";
|
|
75
|
-
}
|
|
76
|
-
export interface OrsovisionAvailabilitySlotPage {
|
|
77
|
-
/**
|
|
78
|
-
* Items admitted by this resource contract within the verified organization.
|
|
79
|
-
*/
|
|
80
|
-
data: OrsovisionAvailabilitySlot[];
|
|
81
|
-
/**
|
|
82
|
-
* Discriminator for a resource list response.
|
|
83
|
-
*/
|
|
84
|
-
object: "list";
|
|
85
|
-
/**
|
|
86
|
-
* Opaque navigation cursors for this page’s stable keyset order.
|
|
87
|
-
*/
|
|
88
|
-
pageInfo: PageInfo;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* A successful answer.
|
|
92
|
-
*/
|
|
93
|
-
export interface OrsovisionAvailabilitySlotPageResponse {
|
|
94
|
-
data: OrsovisionAvailabilitySlotPage;
|
|
95
|
-
error: null;
|
|
96
|
-
/**
|
|
97
|
-
* What every answer carries besides its data or error.
|
|
98
|
-
*/
|
|
99
|
-
metadata: ResponseMetadata;
|
|
100
|
-
success: true;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* A failed answer.
|
|
104
|
-
*/
|
|
105
|
-
export interface OrsovisionListAvailabilityBadGatewayError {
|
|
106
|
-
data: null;
|
|
107
|
-
error: OrsovisionListAvailabilityBadGatewayFailure;
|
|
108
|
-
/**
|
|
109
|
-
* What every answer carries besides its data or error.
|
|
110
|
-
*/
|
|
111
|
-
metadata: ResponseMetadata;
|
|
112
|
-
success: false;
|
|
113
|
-
}
|
|
114
|
-
export type OrsovisionListAvailabilityBadGatewayFailure = OutcomeUnknownFailure | ProviderUnavailableFailure;
|
|
115
|
-
export interface OrsovisionListAvailabilityBody {
|
|
116
|
-
/**
|
|
117
|
-
* Código de sede elegido y confirmado con la persona.
|
|
118
|
-
*/
|
|
119
|
-
agency: string;
|
|
120
|
-
/**
|
|
121
|
-
* The channel the conversation happens on: voice, whatsapp or web (the
|
|
122
|
-
* default).
|
|
123
|
-
*/
|
|
124
|
-
channel?: "voice" | "web" | "whatsapp";
|
|
125
|
-
/**
|
|
126
|
-
* The Visoft connection to run on, as Account lists it (con_…). Optional when
|
|
127
|
-
* the organization has one; required when it has several. Another
|
|
128
|
-
* organization's connection is CONNECTION_NOT_FOUND.
|
|
129
|
-
*/
|
|
130
|
-
connectionId?: string;
|
|
131
|
-
/**
|
|
132
|
-
* Código de contrato de list_contracts para esta misma sede.
|
|
133
|
-
*/
|
|
134
|
-
contract: string;
|
|
135
|
-
/**
|
|
136
|
-
* Opaque cursor returned by pageInfo; omit it to request the first page.
|
|
137
|
-
*/
|
|
138
|
-
cursor?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Un día exacto YYYY-MM-DD cuando la persona nombró la fecha. Omítelo para
|
|
141
|
-
* buscar con from/to; nunca uses una ventana de un día en su lugar.
|
|
142
|
-
*/
|
|
143
|
-
date?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Direction to traverse the stable keyset ordering from the supplied cursor.
|
|
146
|
-
*/
|
|
147
|
-
direction?: "forward" | "backward";
|
|
148
|
-
/**
|
|
149
|
-
* Opcional. Envíalo para que el servidor resuelva contrato y servicio desde
|
|
150
|
-
* el historial del paciente; omítelo si ya pasas contract y service. Leer la
|
|
151
|
-
* agenda no necesita paciente.
|
|
152
|
-
*/
|
|
153
|
-
documentNumber?: string;
|
|
154
|
-
/**
|
|
155
|
-
* Inicio de la ventana YYYY-MM-DD (mañana por defecto). Usa from/to cuando la
|
|
156
|
-
* persona no dio fecha exacta.
|
|
157
|
-
*/
|
|
158
|
-
from?: string;
|
|
159
|
-
/**
|
|
160
|
-
* Maximum items returned in one page. Defaults to 25; larger reads require
|
|
161
|
-
* another cursor.
|
|
162
|
-
*/
|
|
163
|
-
limit?: number;
|
|
164
|
-
/**
|
|
165
|
-
* Id del profesional devuelto por una disponibilidad anterior. Omítelo si la
|
|
166
|
-
* persona acepta cualquier profesional; si pidió uno, consérvalo en TODAS las
|
|
167
|
-
* búsquedas siguientes y no lo quites sin su aceptación.
|
|
168
|
-
*/
|
|
169
|
-
medic?: string;
|
|
170
|
-
/**
|
|
171
|
-
* true solo si un profesional recién agregado no aparece; relee el directorio
|
|
172
|
-
* (caché de 1 h). Los cupos libres SIEMPRE se leen en vivo: refresh no
|
|
173
|
-
* 'actualiza' horarios.
|
|
174
|
-
*/
|
|
175
|
-
refresh?: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Código de servicio AGENDABLE de get_contract_services para esta misma sede
|
|
178
|
-
* y contrato; nunca un producto óptico.
|
|
179
|
-
*/
|
|
180
|
-
service: string;
|
|
181
|
-
/**
|
|
182
|
-
* Fin de la ventana YYYY-MM-DD (from + 30 días por defecto). Para una fecha
|
|
183
|
-
* exacta pasa date, nunca una ventana de un día.
|
|
184
|
-
*/
|
|
185
|
-
to?: string;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* A failed answer.
|
|
189
|
-
*/
|
|
190
|
-
export interface OrsovisionListAvailabilityConflictError {
|
|
191
|
-
data: null;
|
|
192
|
-
error: OrsovisionListAvailabilityConflictFailure;
|
|
193
|
-
/**
|
|
194
|
-
* What every answer carries besides its data or error.
|
|
195
|
-
*/
|
|
196
|
-
metadata: ResponseMetadata;
|
|
197
|
-
success: false;
|
|
198
|
-
}
|
|
199
|
-
export type OrsovisionListAvailabilityConflictFailure = ConnectionNotConfiguredFailure | OrsovisionClinicNotServedFailure;
|
|
200
|
-
/**
|
|
201
|
-
* A failed answer.
|
|
202
|
-
*/
|
|
203
|
-
export interface OrsovisionListAvailabilityNotFoundError {
|
|
204
|
-
data: null;
|
|
205
|
-
error: OrsovisionListAvailabilityNotFoundFailure;
|
|
206
|
-
/**
|
|
207
|
-
* What every answer carries besides its data or error.
|
|
208
|
-
*/
|
|
209
|
-
metadata: ResponseMetadata;
|
|
210
|
-
success: false;
|
|
211
|
-
}
|
|
212
|
-
export type OrsovisionListAvailabilityNotFoundFailure = ConnectionNotFoundFailure | OrsovisionToolNotAvailableFailure;
|
|
213
|
-
/**
|
|
214
|
-
* A failed answer.
|
|
215
|
-
*/
|
|
216
|
-
export interface OrsovisionListAvailabilityServiceUnavailableError {
|
|
217
|
-
data: null;
|
|
218
|
-
error: OrsovisionListAvailabilityServiceUnavailableFailure;
|
|
219
|
-
/**
|
|
220
|
-
* What every answer carries besides its data or error.
|
|
221
|
-
*/
|
|
222
|
-
metadata: ResponseMetadata;
|
|
223
|
-
success: false;
|
|
224
|
-
}
|
|
225
|
-
export type OrsovisionListAvailabilityServiceUnavailableFailure = UpstreamUnavailableFailure | OrsovisionOrsovisionNotConfiguredFailure;
|
|
226
|
-
export declare const OrsovisionAvailabilitySlotCodec: import("../../_/codec.js").Codec;
|
|
227
|
-
export declare const OrsovisionAvailabilitySlotPageCodec: import("../../_/codec.js").Codec;
|
|
228
|
-
export declare const OrsovisionAvailabilitySlotPageResponseCodec: import("../../_/codec.js").Codec;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Code generated by forge. DO NOT EDIT.
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
import { array, date, instant, object } from "../../_/index.js";
|
|
4
|
-
import { AvailabilityBookingInputCodec, } from "../../models.js";
|
|
5
|
-
export const OrsovisionAvailabilitySlotCodec = object([
|
|
6
|
-
["bookingInput", null, () => AvailabilityBookingInputCodec],
|
|
7
|
-
["date", null, date],
|
|
8
|
-
["startsAt", null, instant],
|
|
9
|
-
]);
|
|
10
|
-
export const OrsovisionAvailabilitySlotPageCodec = object([
|
|
11
|
-
["data", null, array(() => OrsovisionAvailabilitySlotCodec)],
|
|
12
|
-
]);
|
|
13
|
-
export const OrsovisionAvailabilitySlotPageResponseCodec = object([
|
|
14
|
-
["data", null, () => OrsovisionAvailabilitySlotPageCodec],
|
|
15
|
-
]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { type BaseClientOptions, Transport } from "../_/index.js";
|
|
2
|
-
import { type Client as AgenciesClient } from "./agencies/client.js";
|
|
3
|
-
import { type Client as AppointmentsClient } from "./appointments/client.js";
|
|
4
|
-
import { type Client as AvailabilityClient } from "./availability/client.js";
|
|
5
|
-
import { type Client as ClinicClient } from "./clinic/client.js";
|
|
6
|
-
import { type Client as ContractsClient } from "./contracts/client.js";
|
|
7
|
-
import { type Client as PatientsClient } from "./patients/client.js";
|
|
8
|
-
import { type Client as ServicesClient } from "./services/client.js";
|
|
9
|
-
import { type Client as ToolsClient } from "./tools/client.js";
|
|
10
|
-
export interface ClientOptions extends BaseClientOptions {
|
|
11
|
-
/**
|
|
12
|
-
* The URL the paths of the API are relative to.
|
|
13
|
-
*/
|
|
14
|
-
baseUrl: string;
|
|
15
|
-
}
|
|
16
|
-
export interface Client {
|
|
17
|
-
readonly agencies: AgenciesClient;
|
|
18
|
-
readonly appointments: AppointmentsClient;
|
|
19
|
-
readonly availability: AvailabilityClient;
|
|
20
|
-
readonly clinic: ClinicClient;
|
|
21
|
-
readonly contracts: ContractsClient;
|
|
22
|
-
readonly patients: PatientsClient;
|
|
23
|
-
readonly services: ServicesClient;
|
|
24
|
-
readonly tools: ToolsClient;
|
|
25
|
-
}
|
|
26
|
-
export declare function createClient(options: ClientOptions): Client;
|
|
27
|
-
export declare function bind(transport: Transport): Client;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Code generated by forge. DO NOT EDIT.
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
import { Transport } from "../_/index.js";
|
|
4
|
-
import { bind as bindAgencies, } from "./agencies/client.js";
|
|
5
|
-
import { bind as bindAppointments, } from "./appointments/client.js";
|
|
6
|
-
import { bind as bindAvailability, } from "./availability/client.js";
|
|
7
|
-
import { bind as bindClinic, } from "./clinic/client.js";
|
|
8
|
-
import { bind as bindContracts, } from "./contracts/client.js";
|
|
9
|
-
import { bind as bindPatients, } from "./patients/client.js";
|
|
10
|
-
import { bind as bindServices, } from "./services/client.js";
|
|
11
|
-
import { bind as bindTools, } from "./tools/client.js";
|
|
12
|
-
export function createClient(options) {
|
|
13
|
-
return bind(new Transport(options));
|
|
14
|
-
}
|
|
15
|
-
export function bind(transport) {
|
|
16
|
-
let agenciesClient;
|
|
17
|
-
let appointmentsClient;
|
|
18
|
-
let availabilityClient;
|
|
19
|
-
let clinicClient;
|
|
20
|
-
let contractsClient;
|
|
21
|
-
let patientsClient;
|
|
22
|
-
let servicesClient;
|
|
23
|
-
let toolsClient;
|
|
24
|
-
return {
|
|
25
|
-
get agencies() {
|
|
26
|
-
return (agenciesClient ??= bindAgencies(transport));
|
|
27
|
-
},
|
|
28
|
-
get appointments() {
|
|
29
|
-
return (appointmentsClient ??= bindAppointments(transport));
|
|
30
|
-
},
|
|
31
|
-
get availability() {
|
|
32
|
-
return (availabilityClient ??= bindAvailability(transport));
|
|
33
|
-
},
|
|
34
|
-
get clinic() {
|
|
35
|
-
return (clinicClient ??= bindClinic(transport));
|
|
36
|
-
},
|
|
37
|
-
get contracts() {
|
|
38
|
-
return (contractsClient ??= bindContracts(transport));
|
|
39
|
-
},
|
|
40
|
-
get patients() {
|
|
41
|
-
return (patientsClient ??= bindPatients(transport));
|
|
42
|
-
},
|
|
43
|
-
get services() {
|
|
44
|
-
return (servicesClient ??= bindServices(transport));
|
|
45
|
-
},
|
|
46
|
-
get tools() {
|
|
47
|
-
return (toolsClient ??= bindTools(transport));
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|