@arbol-ai/sdk 5.56.0 → 5.58.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.
@@ -10,8 +10,10 @@ export interface Client {
10
10
  /**
11
11
  * Create appointment
12
12
  *
13
- * Use the organization gMedic account. No automatic write retries; reconcile
14
- * an unknown outcome before repeating.
13
+ * Create a patient appointment. For agents at clinics using colored booking
14
+ * windows, send bookingRoute with the verified payment route. The connector
15
+ * selects the appointment color and rechecks the entire interval. Reconcile
16
+ * unknown outcomes before repeating.
15
17
  */
16
18
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
17
19
  /**
@@ -24,8 +26,9 @@ export interface Client {
24
26
  /**
25
27
  * Update appointment
26
28
  *
27
- * Use the organization gMedic account. No automatic write retries; reconcile
28
- * an unknown outcome before repeating.
29
+ * Update a patient appointment. For agents at clinics using colored booking
30
+ * windows, send the verified bookingRoute when changing the time. Reconcile
31
+ * unknown outcomes before repeating.
29
32
  */
30
33
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
31
34
  }
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, CreateRequest, CreateResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { GmedicAppointmentNotFoundFailure, GmedicAppointmentsPage, GmedicAppointmentsPageResponse, GmedicCreateAppointmentBadGatewayError, GmedicCreateAppointmentBadGatewayFailure, GmedicCreateAppointmentBody, GmedicCreateAppointmentNotFoundError, GmedicCreateAppointmentNotFoundFailure, GmedicCreateAppointmentResult, GmedicCreateAppointmentResultResponse, GmedicCreateAppointmentServiceUnavailableError, GmedicCreateAppointmentServiceUnavailableFailure, GmedicListAppointmentsBadGatewayError, GmedicListAppointmentsBadGatewayFailure, GmedicListAppointmentsNotFoundError, GmedicListAppointmentsNotFoundFailure, GmedicListAppointmentsServiceUnavailableError, GmedicListAppointmentsServiceUnavailableFailure, GmedicUpdateAppointmentBadGatewayError, GmedicUpdateAppointmentBadGatewayFailure, GmedicUpdateAppointmentBody, GmedicUpdateAppointmentNotFoundError, GmedicUpdateAppointmentNotFoundFailure, GmedicUpdateAppointmentResult, GmedicUpdateAppointmentResultResponse, GmedicUpdateAppointmentServiceUnavailableError, GmedicUpdateAppointmentServiceUnavailableFailure, } from "./models.js";
5
+ export type { GmedicAppointmentNotFoundFailure, GmedicAppointmentsPage, GmedicAppointmentsPageResponse, GmedicBookingInProgressFailure, GmedicCreateAppointmentBadGatewayError, GmedicCreateAppointmentBadGatewayFailure, GmedicCreateAppointmentBody, GmedicCreateAppointmentConflictError, GmedicCreateAppointmentConflictFailure, GmedicCreateAppointmentNotFoundError, GmedicCreateAppointmentNotFoundFailure, GmedicCreateAppointmentResult, GmedicCreateAppointmentResultResponse, GmedicCreateAppointmentServiceUnavailableError, GmedicCreateAppointmentServiceUnavailableFailure, GmedicListAppointmentsBadGatewayError, GmedicListAppointmentsBadGatewayFailure, GmedicListAppointmentsNotFoundError, GmedicListAppointmentsNotFoundFailure, GmedicListAppointmentsServiceUnavailableError, GmedicListAppointmentsServiceUnavailableFailure, GmedicUpdateAppointmentBadGatewayError, GmedicUpdateAppointmentBadGatewayFailure, GmedicUpdateAppointmentBody, GmedicUpdateAppointmentConflictError, GmedicUpdateAppointmentConflictFailure, GmedicUpdateAppointmentNotFoundError, GmedicUpdateAppointmentNotFoundFailure, GmedicUpdateAppointmentResult, GmedicUpdateAppointmentResultResponse, GmedicUpdateAppointmentServiceUnavailableError, GmedicUpdateAppointmentServiceUnavailableFailure, } from "./models.js";
@@ -1,5 +1,5 @@
1
1
  import type { Empty, OutcomeUnknownFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
2
+ import type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
3
3
  /**
4
4
  * gMedic has no appointment with this id.
5
5
  */
@@ -145,6 +145,28 @@ export interface GmedicAppointmentsPageResponse {
145
145
  metadata: ResponseMetadata;
146
146
  success: true;
147
147
  }
148
+ /**
149
+ * Another appointment change is in progress. Check the agenda again before
150
+ * trying to book.
151
+ */
152
+ export interface GmedicBookingInProgressFailure {
153
+ /**
154
+ * The failure code, stable across releases.
155
+ */
156
+ code: "BOOKING_IN_PROGRESS";
157
+ /**
158
+ * No fields.
159
+ */
160
+ data: Empty;
161
+ /**
162
+ * What went wrong, for people; it never contains input values.
163
+ */
164
+ message: string;
165
+ /**
166
+ * Whether repeating the same request may succeed.
167
+ */
168
+ retryable: false;
169
+ }
148
170
  /**
149
171
  * A failed answer.
150
172
  */
@@ -159,6 +181,11 @@ export interface GmedicCreateAppointmentBadGatewayError {
159
181
  }
160
182
  export type GmedicCreateAppointmentBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
161
183
  export interface GmedicCreateAppointmentBody {
184
+ /**
185
+ * Verified payment route, required for agent scheduling at clinics using
186
+ * colored booking windows.
187
+ */
188
+ bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
162
189
  connectionId?: string;
163
190
  data: {
164
191
  agendaId: string;
@@ -195,6 +222,19 @@ export interface GmedicCreateAppointmentBody {
195
222
  viaEntryId?: string;
196
223
  };
197
224
  }
225
+ /**
226
+ * A failed answer.
227
+ */
228
+ export interface GmedicCreateAppointmentConflictError {
229
+ data: null;
230
+ error: GmedicCreateAppointmentConflictFailure;
231
+ /**
232
+ * What every answer carries besides its data or error.
233
+ */
234
+ metadata: ResponseMetadata;
235
+ success: false;
236
+ }
237
+ export type GmedicCreateAppointmentConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure | GmedicBookingInProgressFailure;
198
238
  /**
199
239
  * A failed answer.
200
240
  */
@@ -420,6 +460,11 @@ export interface GmedicUpdateAppointmentBadGatewayError {
420
460
  }
421
461
  export type GmedicUpdateAppointmentBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
422
462
  export interface GmedicUpdateAppointmentBody {
463
+ /**
464
+ * Verified payment route, required for agent scheduling at clinics using
465
+ * colored booking windows.
466
+ */
467
+ bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
423
468
  color?: "BLUE" | "RED" | "PINK" | "PURPLE" | "DARK_PURPLE" | "STEELE_BLUE" | "LIGHT_BLUE" | "TEAL" | "LIGHT_TEAL" | "GREEN" | "LIGHT_GREEN" | "YELLOW_GREEN" | "YELLOW" | "ORANGE" | "RED_ORANGE" | "LIGHT_BROWN" | "LIGHT_PURPLE" | "GREY" | "BLUE_GREY" | "YELLOW_GREY" | "BROWN";
424
469
  connectionId?: string;
425
470
  /**
@@ -439,6 +484,19 @@ export interface GmedicUpdateAppointmentBody {
439
484
  startsAt?: Temporal.Instant;
440
485
  status?: "SCHEDULED" | "ATTENDED" | "UNATTENDED" | "CANCELED" | "PENALIZED" | "CONFIRMED" | "DECLINED";
441
486
  }
487
+ /**
488
+ * A failed answer.
489
+ */
490
+ export interface GmedicUpdateAppointmentConflictError {
491
+ data: null;
492
+ error: GmedicUpdateAppointmentConflictFailure;
493
+ /**
494
+ * What every answer carries besides its data or error.
495
+ */
496
+ metadata: ResponseMetadata;
497
+ success: false;
498
+ }
499
+ export type GmedicUpdateAppointmentConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure | GmedicBookingInProgressFailure;
442
500
  /**
443
501
  * A failed answer.
444
502
  */
@@ -10,8 +10,9 @@ export interface Client {
10
10
  /**
11
11
  * List availability
12
12
  *
13
- * Use the organization gMedic account. Read-only request; provider failures
14
- * are never empty results.
13
+ * List available intervals. At clinics using colored booking windows, send
14
+ * the verified bookingRoute. Check the full duration within a returned
15
+ * interval and a compatible agenda.
15
16
  */
16
17
  list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
17
18
  }
@@ -33,6 +34,11 @@ export interface ListRequest {
33
34
  * another cursor.
34
35
  */
35
36
  limit?: number;
37
+ /**
38
+ * Verified payment route, required for agent scheduling at clinics using
39
+ * colored booking windows.
40
+ */
41
+ bookingRoute?: "PRIVATE" | "AXA_PREPAID" | "AXA_ARL" | "PONAL_STARKEY" | "EPS_SURA";
36
42
  /**
37
43
  * The agenda id.
38
44
  */
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  const ListOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/gmedic/availability",
16
- query: { cursor: "cursor", direction: "direction", limit: "limit", agendaId: "agendaId", from: "from", to: "to", connectionId: "connectionId", startDate: "startDate", endDate: "endDate" },
16
+ query: { cursor: "cursor", direction: "direction", limit: "limit", bookingRoute: "bookingRoute", agendaId: "agendaId", from: "from", to: "to", connectionId: "connectionId", startDate: "startDate", endDate: "endDate" },
17
17
  response: GmedicAvailabilityPageResponseCodec,
18
18
  errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
- export type { GmedicAvailabilityPage, GmedicAvailabilityPageResponse, GmedicListAvailabilityBadGatewayError, GmedicListAvailabilityBadGatewayFailure, GmedicListAvailabilityNotFoundError, GmedicListAvailabilityNotFoundFailure, GmedicListAvailabilityServiceUnavailableError, GmedicListAvailabilityServiceUnavailableFailure, } from "./models.js";
5
+ export type { GmedicAvailabilityPage, GmedicAvailabilityPageResponse, GmedicListAvailabilityBadGatewayError, GmedicListAvailabilityBadGatewayFailure, GmedicListAvailabilityConflictError, GmedicListAvailabilityConflictFailure, GmedicListAvailabilityNotFoundError, GmedicListAvailabilityNotFoundFailure, GmedicListAvailabilityServiceUnavailableError, GmedicListAvailabilityServiceUnavailableFailure, } from "./models.js";
@@ -1,5 +1,5 @@
1
1
  import type { OutcomeUnknownFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
2
+ import type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure } from "../models.js";
3
3
  export interface GmedicAvailabilityPage {
4
4
  /**
5
5
  * Items admitted by this resource contract within the verified organization.
@@ -56,6 +56,19 @@ export interface GmedicListAvailabilityBadGatewayError {
56
56
  success: false;
57
57
  }
58
58
  export type GmedicListAvailabilityBadGatewayFailure = OutcomeUnknownFailure | GmedicProviderAccessRejectedFailure | GmedicProviderResponseInvalidFailure;
59
+ /**
60
+ * A failed answer.
61
+ */
62
+ export interface GmedicListAvailabilityConflictError {
63
+ data: null;
64
+ error: GmedicListAvailabilityConflictFailure;
65
+ /**
66
+ * What every answer carries besides its data or error.
67
+ */
68
+ metadata: ResponseMetadata;
69
+ success: false;
70
+ }
71
+ export type GmedicListAvailabilityConflictFailure = GmedicNotConfiguredFailure | GmedicBookingColorRequiredFailure;
59
72
  /**
60
73
  * A failed answer.
61
74
  */
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
2
2
  export type { RequestOptions } from "../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, } from "./client.js";
5
- export type { GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredError, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderInputRejectedError, GmedicProviderInputRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure, } from "./models.js";
5
+ export type { GmedicBookingColorRequiredFailure, GmedicCatalogSearchIncompleteFailure, GmedicConnectionNotFoundFailure, GmedicNotConfiguredError, GmedicNotConfiguredFailure, GmedicProviderAccessRejectedFailure, GmedicProviderInputRejectedError, GmedicProviderInputRejectedFailure, GmedicProviderResponseInvalidFailure, GmedicProviderUnavailableFailure, GmedicRecordNotFoundFailure, } from "./models.js";
@@ -1,4 +1,27 @@
1
1
  import type { Empty, ResponseMetadata } from "../models.js";
2
+ /**
3
+ * This booking requires a verified free interval in the clinic’s correct blue
4
+ * or gray window. Check availability with the required booking color or refer
5
+ * the request to reception.
6
+ */
7
+ export interface GmedicBookingColorRequiredFailure {
8
+ /**
9
+ * The failure code, stable across releases.
10
+ */
11
+ code: "BOOKING_COLOR_REQUIRED";
12
+ /**
13
+ * No fields.
14
+ */
15
+ data: Empty;
16
+ /**
17
+ * What went wrong, for people; it never contains input values.
18
+ */
19
+ message: string;
20
+ /**
21
+ * Whether repeating the same request may succeed.
22
+ */
23
+ retryable: false;
24
+ }
2
25
  /**
3
26
  * The service catalog search could not be completed within its limits. Service
4
27
  * absence cannot be concluded.
@@ -14,9 +14,9 @@ export interface Client {
14
14
  * resolved by citizenship card. Use the exact CAS (serviceNumber) from that
15
15
  * patient's assigned appointments, one exact listed cancellation reason, and
16
16
  * confirm true only after the patient or authorized staff confirms this
17
- * specific cancellation. The same idempotency key and request return the
18
- * recorded result without sending again. OUTCOME_UNKNOWN means the
19
- * cancellation may have happened: look up the patient's cancelled
17
+ * specific cancellation. Repeating the identical request returns the recorded
18
+ * result without sending again; no idempotency key is needed. OUTCOME_UNKNOWN
19
+ * means the cancellation may have happened: look up the patient's cancelled
20
20
  * appointments and do not dispatch it again. agentMode true answers concise
21
21
  * Spanish text instead.
22
22
  */
@@ -25,28 +25,44 @@ export interface Client {
25
25
  * Create an appointment
26
26
  *
27
27
  * Book one appointment in e-Oficlinic (ASIGNAR_CITAS) for a slot that
28
- * list_booking_slots offered in an availability flow. Requires confirm true
29
- * and an idempotencyKey. Before anything is written, the patient is resolved
30
- * by citizenship card; the program and attention type must be the flow's, and
31
- * the source must still count exactly one unit for them; the regime,
32
- * affiliate type and relationship must be listed by the provider; the payer,
33
- * plan, subplan and contract must be listed by the provider for the
34
- * connection; the service must be configured for the slot's professional; and
35
- * a fresh read must still show the slot. The classification, billing and
36
- * referral values are the clinic's own provider codes, which the caller
37
- * supplies explicitly: this service never guesses them, never derives them
38
- * from a program and never loads the clinic's tariff matrix. The intent and a
39
- * fence on the slot are recorded before the single provider request, which is
40
- * never resent. Success means the provider answered a strictly positive
41
- * appointment number, the source's own creation signal (verification
42
- * provider_acknowledgement). OUTCOME_UNKNOWN means the appointment may exist:
43
- * do not book again; check lookup_appointments with status assigned and ask
44
- * staff. WRITE_TARGET_UNRESOLVED means another key's write to this slot has
45
- * no final outcome, so nothing was sent. WRITE_LEDGER_FULL means the
46
- * connection's ledger refused a new write and nothing was sent. Repeating the
47
- * same idempotencyKey and request answers the recorded outcome. One-slot,
48
- * one-unit bookings only. agentMode true answers concise Spanish text
49
- * instead.
28
+ * search_booking_slots or list_booking_slots offered in an availability flow.
29
+ * Send what a person at the desk chooses: confirm true; the slot's flowId and
30
+ * slotId; the patient's documentType and documentNumber; the payer's planId
31
+ * and subplanId (list_payer_plans, list_payer_subplans); and in
32
+ * classification the patient's regime and affiliateType (list_regimes,
33
+ * list_affiliate_types) and, for copayments, salaryRange
34
+ * (list_salary_ranges). Leave the rest out: the service resolves it as the
35
+ * provider's own booking screen does. The payer, program and attention type
36
+ * are the flow's; the purpose is the form's default, 10; the contract is the
37
+ * payer's only active one, or none when it has none; billing takes its flags
38
+ * from the payer's row, its copayment rate, cap and moderator fee from the
39
+ * salary range's row, and its tariff from the payer's tariff matrix for the
40
+ * flow's service under the plan and subplan. A value the caller does send is
41
+ * used as given, and a billing object is sent unchanged with nothing
42
+ * resolved. BOOKING_VALUE_UNRESOLVED means a needed value could not be
43
+ * resolved from the provider's own data and nothing was written; send it and
44
+ * repeat: contractId when the payer has several active contracts;
45
+ * classification.relationship when the affiliate type is neither C nor N;
46
+ * classification.listStatus when the payer uses an attention list;
47
+ * referral.authorizationNumber when the payer requires authorization; a
48
+ * classification.salaryRange the regime lists; or billing when the payer's
49
+ * tariff grid has no positive tariff for the service. Before anything is
50
+ * written, the patient is resolved by citizenship card; the source must still
51
+ * count exactly one unit for the program and attention type; the regime,
52
+ * affiliate type, relationship and salary range, and the payer, plan, subplan
53
+ * and contract, must be listed by the provider; the service must be
54
+ * configured for the slot's professional; and a fresh read must still show
55
+ * the slot. The intent and a fence on the slot are recorded before the single
56
+ * provider request, which is never resent. Success means the provider
57
+ * answered a strictly positive appointment number, the source's own creation
58
+ * signal (verification provider_acknowledgement). OUTCOME_UNKNOWN means the
59
+ * appointment may exist: do not book again; check lookup_appointments with
60
+ * status assigned and ask staff. WRITE_TARGET_UNRESOLVED means another key's
61
+ * write to this slot has no final outcome, so nothing was sent.
62
+ * WRITE_LEDGER_FULL means the connection's ledger refused a new write and
63
+ * nothing was sent. Repeating the identical request answers the recorded
64
+ * outcome; no idempotency key is needed. One-slot, one-unit bookings only.
65
+ * agentMode true answers concise Spanish text instead.
50
66
  */
51
67
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
52
68
  /**
@@ -72,19 +88,26 @@ export interface Client {
72
88
  * must be an upcoming assigned appointment of the patient resolved by
73
89
  * citizenship card (its CAS, serviceNumber in lookup_appointments); the
74
90
  * cancellation reason must be exactly one list_cancellation_reasons answers;
75
- * the new slot is booked first exactly as create_appointment books it; only
76
- * after the provider acknowledged the new booking is the original cancelled
77
- * (CANECELAR_CITAS) with the given reason and observations. If the new
78
- * booking fails, nothing changes; if its outcome is unknown, OUTCOME_UNKNOWN
79
- * answers and the original is never cancelled. Once the new booking is
80
- * acknowledged the answer reports each phase: completed when the cancellation
81
- * was confirmed too, partial otherwise (cancellation pending, unknown or not
82
- * possible), when the patient may hold both appointments. pending continues
83
- * when the same request is repeated with the same idempotencyKey, which
84
- * resumes the cancellation alone; nothing is ever resent. The slot and the
85
- * original are fenced from the first dispatch: WRITE_TARGET_UNRESOLVED means
86
- * another key's write to either has no final outcome, and nothing was sent.
87
- * agentMode true answers concise Spanish text instead.
91
+ * the new slot is booked first exactly as create_appointment books it, from
92
+ * the same input: the new slot's flowId and slotId, the patient's document,
93
+ * the payer's planId and subplanId, and in classification the patient's
94
+ * regime, affiliateType and, for copayments, salaryRange. The service
95
+ * resolves the payer, program, attention type, purpose, contract and billing
96
+ * with its tariff from the flow and the provider's own data, as
97
+ * create_appointment describes; BOOKING_VALUE_UNRESOLVED means a needed value
98
+ * could not be resolved, nothing was written and the original is untouched:
99
+ * send it and repeat. Only after the provider acknowledged the new booking is
100
+ * the original cancelled (CANECELAR_CITAS) with the given reason and
101
+ * observations. If the new booking fails, nothing changes; if its outcome is
102
+ * unknown, OUTCOME_UNKNOWN answers and the original is never cancelled. Once
103
+ * the new booking is acknowledged the answer reports each phase: completed
104
+ * when the cancellation was confirmed too, partial otherwise (cancellation
105
+ * pending, unknown or not possible), when the patient may hold both
106
+ * appointments. pending continues when the identical request is repeated,
107
+ * which resumes the cancellation alone; nothing is ever resent. The slot and
108
+ * the original are fenced from the first dispatch: WRITE_TARGET_UNRESOLVED
109
+ * means another key's write to either has no final outcome, and nothing was
110
+ * sent. agentMode true answers concise Spanish text instead.
88
111
  */
89
112
  reschedule(request: RescheduleRequest, options?: RequestOptions): Promise<RescheduleResponse>;
90
113
  }
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, CancelRequest, CancelResponse, CreateRequest, CreateResponse, LookupRequest, LookupResponse, RescheduleRequest, RescheduleResponse, } from "./client.js";
5
- export type { OficlinicAppointment, OficlinicAppointmentBooking, OficlinicAppointmentCancellation, OficlinicAppointmentNotCancellableFailure, OficlinicAppointmentNotFoundFailure, OficlinicAppointmentNotReschedulableFailure, OficlinicAppointmentPage, OficlinicAppointmentReschedule, OficlinicCancelAppointmentBadGatewayError, OficlinicCancelAppointmentBadGatewayFailure, OficlinicCancelAppointmentBody, OficlinicCancelAppointmentConflictError, OficlinicCancelAppointmentConflictFailure, OficlinicCancelAppointmentNotFoundError, OficlinicCancelAppointmentNotFoundFailure, OficlinicCancelAppointmentResult, OficlinicCancelAppointmentResultResponse, OficlinicCancelAppointmentServiceUnavailableError, OficlinicCancelAppointmentServiceUnavailableFailure, OficlinicCancelAppointmentTooManyRequestsError, OficlinicCancelAppointmentTooManyRequestsFailure, OficlinicCancelAppointmentUnprocessableContentError, OficlinicCancelAppointmentUnprocessableContentFailure, OficlinicCreateAppointmentBadGatewayError, OficlinicCreateAppointmentBadGatewayFailure, OficlinicCreateAppointmentBody, OficlinicCreateAppointmentConflictError, OficlinicCreateAppointmentConflictFailure, OficlinicCreateAppointmentNotFoundError, OficlinicCreateAppointmentNotFoundFailure, OficlinicCreateAppointmentResult, OficlinicCreateAppointmentResultResponse, OficlinicCreateAppointmentServiceUnavailableError, OficlinicCreateAppointmentServiceUnavailableFailure, OficlinicCreateAppointmentTooManyRequestsError, OficlinicCreateAppointmentTooManyRequestsFailure, OficlinicCreateAppointmentUnprocessableContentError, OficlinicCreateAppointmentUnprocessableContentFailure, OficlinicLookupAppointmentsBadGatewayError, OficlinicLookupAppointmentsBadGatewayFailure, OficlinicLookupAppointmentsBadRequestError, OficlinicLookupAppointmentsBadRequestFailure, OficlinicLookupAppointmentsBody, OficlinicLookupAppointmentsConflictError, OficlinicLookupAppointmentsConflictFailure, OficlinicLookupAppointmentsNotFoundError, OficlinicLookupAppointmentsNotFoundFailure, OficlinicLookupAppointmentsResult, OficlinicLookupAppointmentsResultResponse, OficlinicLookupAppointmentsServiceUnavailableError, OficlinicLookupAppointmentsServiceUnavailableFailure, OficlinicLookupAppointmentsTooManyRequestsError, OficlinicLookupAppointmentsTooManyRequestsFailure, OficlinicLookupAppointmentsUnprocessableContentError, OficlinicLookupAppointmentsUnprocessableContentFailure, OficlinicPatientNotFoundFailure, OficlinicRescheduleAppointmentBadGatewayError, OficlinicRescheduleAppointmentBadGatewayFailure, OficlinicRescheduleAppointmentBody, OficlinicRescheduleAppointmentConflictError, OficlinicRescheduleAppointmentConflictFailure, OficlinicRescheduleAppointmentNotFoundError, OficlinicRescheduleAppointmentNotFoundFailure, OficlinicRescheduleAppointmentResult, OficlinicRescheduleAppointmentResultResponse, OficlinicRescheduleAppointmentServiceUnavailableError, OficlinicRescheduleAppointmentServiceUnavailableFailure, OficlinicRescheduleAppointmentTooManyRequestsError, OficlinicRescheduleAppointmentTooManyRequestsFailure, OficlinicRescheduleAppointmentUnprocessableContentError, OficlinicRescheduleAppointmentUnprocessableContentFailure, OficlinicServiceNotAvailableFailure, } from "./models.js";
5
+ export type { OficlinicAppointment, OficlinicAppointmentBooking, OficlinicAppointmentCancellation, OficlinicAppointmentNotCancellableFailure, OficlinicAppointmentNotFoundFailure, OficlinicAppointmentNotReschedulableFailure, OficlinicAppointmentPage, OficlinicAppointmentReschedule, OficlinicBookingValueUnresolvedFailure, OficlinicCancelAppointmentBadGatewayError, OficlinicCancelAppointmentBadGatewayFailure, OficlinicCancelAppointmentBody, OficlinicCancelAppointmentConflictError, OficlinicCancelAppointmentConflictFailure, OficlinicCancelAppointmentNotFoundError, OficlinicCancelAppointmentNotFoundFailure, OficlinicCancelAppointmentResult, OficlinicCancelAppointmentResultResponse, OficlinicCancelAppointmentServiceUnavailableError, OficlinicCancelAppointmentServiceUnavailableFailure, OficlinicCancelAppointmentTooManyRequestsError, OficlinicCancelAppointmentTooManyRequestsFailure, OficlinicCancelAppointmentUnprocessableContentError, OficlinicCancelAppointmentUnprocessableContentFailure, OficlinicCreateAppointmentBadGatewayError, OficlinicCreateAppointmentBadGatewayFailure, OficlinicCreateAppointmentBody, OficlinicCreateAppointmentConflictError, OficlinicCreateAppointmentConflictFailure, OficlinicCreateAppointmentNotFoundError, OficlinicCreateAppointmentNotFoundFailure, OficlinicCreateAppointmentResult, OficlinicCreateAppointmentResultResponse, OficlinicCreateAppointmentServiceUnavailableError, OficlinicCreateAppointmentServiceUnavailableFailure, OficlinicCreateAppointmentTooManyRequestsError, OficlinicCreateAppointmentTooManyRequestsFailure, OficlinicCreateAppointmentUnprocessableContentError, OficlinicCreateAppointmentUnprocessableContentFailure, OficlinicLookupAppointmentsBadGatewayError, OficlinicLookupAppointmentsBadGatewayFailure, OficlinicLookupAppointmentsBadRequestError, OficlinicLookupAppointmentsBadRequestFailure, OficlinicLookupAppointmentsBody, OficlinicLookupAppointmentsConflictError, OficlinicLookupAppointmentsConflictFailure, OficlinicLookupAppointmentsNotFoundError, OficlinicLookupAppointmentsNotFoundFailure, OficlinicLookupAppointmentsResult, OficlinicLookupAppointmentsResultResponse, OficlinicLookupAppointmentsServiceUnavailableError, OficlinicLookupAppointmentsServiceUnavailableFailure, OficlinicLookupAppointmentsTooManyRequestsError, OficlinicLookupAppointmentsTooManyRequestsFailure, OficlinicLookupAppointmentsUnprocessableContentError, OficlinicLookupAppointmentsUnprocessableContentFailure, OficlinicPatientNotFoundFailure, OficlinicRescheduleAppointmentBadGatewayError, OficlinicRescheduleAppointmentBadGatewayFailure, OficlinicRescheduleAppointmentBody, OficlinicRescheduleAppointmentConflictError, OficlinicRescheduleAppointmentConflictFailure, OficlinicRescheduleAppointmentNotFoundError, OficlinicRescheduleAppointmentNotFoundFailure, OficlinicRescheduleAppointmentResult, OficlinicRescheduleAppointmentResultResponse, OficlinicRescheduleAppointmentServiceUnavailableError, OficlinicRescheduleAppointmentServiceUnavailableFailure, OficlinicRescheduleAppointmentTooManyRequestsError, OficlinicRescheduleAppointmentTooManyRequestsFailure, OficlinicRescheduleAppointmentUnprocessableContentError, OficlinicRescheduleAppointmentUnprocessableContentFailure, OficlinicServiceNotAvailableFailure, } from "./models.js";
@@ -164,6 +164,30 @@ export interface OficlinicAppointmentReschedule {
164
164
  */
165
165
  status: "completed" | "partial";
166
166
  }
167
+ /**
168
+ * A value the booking needs could not be resolved from the provider's own data,
169
+ * so the caller must supply it: a contract, a relationship, a list status, an
170
+ * authorization number, a salary range the regime lists, or the billing values.
171
+ * Nothing was written.
172
+ */
173
+ export interface OficlinicBookingValueUnresolvedFailure {
174
+ /**
175
+ * The failure code, stable across releases.
176
+ */
177
+ code: "BOOKING_VALUE_UNRESOLVED";
178
+ /**
179
+ * No fields.
180
+ */
181
+ data: Empty;
182
+ /**
183
+ * What went wrong, for people; it never contains input values.
184
+ */
185
+ message: string;
186
+ /**
187
+ * Whether repeating the same request may succeed.
188
+ */
189
+ retryable: false;
190
+ }
167
191
  /**
168
192
  * A failed answer.
169
193
  */
@@ -207,11 +231,13 @@ export interface OficlinicCancelAppointmentBody {
207
231
  */
208
232
  documentType: "CC";
209
233
  /**
210
- * A key the caller chooses once per intended write, such as a UUID. Repeating
211
- * it with the same request answers the recorded outcome and never writes
212
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
234
+ * Optional. Without it the service derives the key from the request itself,
235
+ * so repeating the identical request answers the recorded outcome and never
236
+ * writes again. A caller that retries with changed values can choose one key
237
+ * per intended write, such as a UUID; another request with it answers
238
+ * IDEMPOTENCY_KEY_REUSED.
213
239
  */
214
- idempotencyKey: string;
240
+ idempotencyKey?: string;
215
241
  }
216
242
  /**
217
243
  * A failed answer.
@@ -312,10 +338,15 @@ export interface OficlinicCreateAppointmentBody {
312
338
  */
313
339
  agentMode?: boolean;
314
340
  /**
315
- * Billing values of the clinic's tariff matrix. Never guessed: the caller
316
- * supplies them as the clinic's workflow defines them.
341
+ * Billing values of the booking screen. Leave the whole object out and the
342
+ * service resolves them as the screen does: tariff from the payer's tariff
343
+ * matrix for the flow's service under the plan and subplan; billPrivately,
344
+ * billCopayments and enteredCopayment from the payer's row;
345
+ * copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
346
+ * classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
347
+ * When given, every value is sent exactly as given and nothing is resolved.
317
348
  */
318
- billing: {
349
+ billing?: {
319
350
  billCopayments: string | null;
320
351
  billPrivately: string | null;
321
352
  copaymentPercentage: string | null;
@@ -329,14 +360,15 @@ export interface OficlinicCreateAppointmentBody {
329
360
  };
330
361
  /**
331
362
  * Coverage and clinical classification codes, as the clinic's own provider
332
- * catalogs define them. Never guessed: the caller supplies them.
363
+ * catalogs define them. regime and affiliateType are never guessed: the
364
+ * caller supplies them. The rest has the defaults each field states.
333
365
  */
334
366
  classification: {
335
367
  affiliateType: string;
336
- attentionTypeId: string;
368
+ attentionTypeId?: string;
337
369
  listStatus?: string | null;
338
- programId: string;
339
- purposeId: string;
370
+ programId?: string;
371
+ purposeId?: string;
340
372
  regime: string;
341
373
  relationship?: string | null;
342
374
  salaryRange?: string | null;
@@ -352,7 +384,12 @@ export interface OficlinicCreateAppointmentBody {
352
384
  connectionId?: string;
353
385
  /**
354
386
  * A contract of the payer from list_payer_contracts, which must not be
355
- * inactive; null (the default) sends none.
387
+ * inactive. An explicit null sends none. Leaving the key out is not the same
388
+ * as null: the service then sends the payer's only contract when
389
+ * list_payer_contracts has exactly one that is not inactive and marks it
390
+ * active, sends none when the payer has no contract or only inactive ones,
391
+ * and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
392
+ * unrecognized active flag).
356
393
  */
357
394
  contractId?: string | null;
358
395
  /**
@@ -370,31 +407,38 @@ export interface OficlinicCreateAppointmentBody {
370
407
  */
371
408
  flowId: string;
372
409
  /**
373
- * A key the caller chooses once per intended write, such as a UUID. Repeating
374
- * it with the same request answers the recorded outcome and never writes
375
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
410
+ * Optional. Without it the service derives the key from the request itself,
411
+ * so repeating the identical request answers the recorded outcome and never
412
+ * writes again. A caller that retries with changed values can choose one key
413
+ * per intended write, such as a UUID; another request with it answers
414
+ * IDEMPOTENCY_KEY_REUSED.
376
415
  */
377
- idempotencyKey: string;
416
+ idempotencyKey?: string;
378
417
  /**
379
418
  * Observations sent as pObservaciones, accents removed and uppercased; null
380
419
  * (the default) sends none.
381
420
  */
382
421
  observations?: string | null;
383
422
  /**
384
- * The flow's payer, repeated as a check.
423
+ * The payer the availability flow was opened for. Left out: that payer. When
424
+ * given it must be that payer.
385
425
  */
386
- payerId: string;
426
+ payerId?: string;
387
427
  /**
388
428
  * A plan of the payer, from list_payer_plans.
389
429
  */
390
430
  planId: string;
391
- referral: {
431
+ /**
432
+ * Referral values of the booking screen. Left out: no requesting
433
+ * professional, no authorization number and requestedByUser false.
434
+ */
435
+ referral?: {
392
436
  authorizationNumber?: string | null;
393
437
  requestedByUser?: boolean;
394
438
  requestingProfessionalId?: string | null;
395
439
  };
396
440
  /**
397
- * A slot id from list_booking_slots in the same flow.
441
+ * A slot id from search_booking_slots or list_booking_slots in the same flow.
398
442
  */
399
443
  slotId: string;
400
444
  /**
@@ -479,7 +523,7 @@ export interface OficlinicCreateAppointmentUnprocessableContentError {
479
523
  metadata: ResponseMetadata;
480
524
  success: false;
481
525
  }
482
- export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
526
+ export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
483
527
  /**
484
528
  * A failed answer.
485
529
  */
@@ -666,10 +710,15 @@ export interface OficlinicRescheduleAppointmentBody {
666
710
  */
667
711
  agentMode?: boolean;
668
712
  /**
669
- * Billing values of the clinic's tariff matrix. Never guessed: the caller
670
- * supplies them as the clinic's workflow defines them.
713
+ * Billing values of the booking screen. Leave the whole object out and the
714
+ * service resolves them as the screen does: tariff from the payer's tariff
715
+ * matrix for the flow's service under the plan and subplan; billPrivately,
716
+ * billCopayments and enteredCopayment from the payer's row;
717
+ * copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
718
+ * classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
719
+ * When given, every value is sent exactly as given and nothing is resolved.
671
720
  */
672
- billing: {
721
+ billing?: {
673
722
  billCopayments: string | null;
674
723
  billPrivately: string | null;
675
724
  copaymentPercentage: string | null;
@@ -687,14 +736,15 @@ export interface OficlinicRescheduleAppointmentBody {
687
736
  };
688
737
  /**
689
738
  * Coverage and clinical classification codes, as the clinic's own provider
690
- * catalogs define them. Never guessed: the caller supplies them.
739
+ * catalogs define them. regime and affiliateType are never guessed: the
740
+ * caller supplies them. The rest has the defaults each field states.
691
741
  */
692
742
  classification: {
693
743
  affiliateType: string;
694
- attentionTypeId: string;
744
+ attentionTypeId?: string;
695
745
  listStatus?: string | null;
696
- programId: string;
697
- purposeId: string;
746
+ programId?: string;
747
+ purposeId?: string;
698
748
  regime: string;
699
749
  relationship?: string | null;
700
750
  salaryRange?: string | null;
@@ -710,7 +760,12 @@ export interface OficlinicRescheduleAppointmentBody {
710
760
  connectionId?: string;
711
761
  /**
712
762
  * A contract of the payer from list_payer_contracts, which must not be
713
- * inactive; null (the default) sends none.
763
+ * inactive. An explicit null sends none. Leaving the key out is not the same
764
+ * as null: the service then sends the payer's only contract when
765
+ * list_payer_contracts has exactly one that is not inactive and marks it
766
+ * active, sends none when the payer has no contract or only inactive ones,
767
+ * and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
768
+ * unrecognized active flag).
714
769
  */
715
770
  contractId?: string | null;
716
771
  /**
@@ -728,31 +783,38 @@ export interface OficlinicRescheduleAppointmentBody {
728
783
  */
729
784
  flowId: string;
730
785
  /**
731
- * A key the caller chooses once per intended write, such as a UUID. Repeating
732
- * it with the same request answers the recorded outcome and never writes
733
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
786
+ * Optional. Without it the service derives the key from the request itself,
787
+ * so repeating the identical request answers the recorded outcome and never
788
+ * writes again. A caller that retries with changed values can choose one key
789
+ * per intended write, such as a UUID; another request with it answers
790
+ * IDEMPOTENCY_KEY_REUSED.
734
791
  */
735
- idempotencyKey: string;
792
+ idempotencyKey?: string;
736
793
  /**
737
794
  * Observations sent as pObservaciones, accents removed and uppercased; null
738
795
  * (the default) sends none.
739
796
  */
740
797
  observations?: string | null;
741
798
  /**
742
- * The flow's payer, repeated as a check.
799
+ * The payer the availability flow was opened for. Left out: that payer. When
800
+ * given it must be that payer.
743
801
  */
744
- payerId: string;
802
+ payerId?: string;
745
803
  /**
746
804
  * A plan of the payer, from list_payer_plans.
747
805
  */
748
806
  planId: string;
749
- referral: {
807
+ /**
808
+ * Referral values of the booking screen. Left out: no requesting
809
+ * professional, no authorization number and requestedByUser false.
810
+ */
811
+ referral?: {
750
812
  authorizationNumber?: string | null;
751
813
  requestedByUser?: boolean;
752
814
  requestingProfessionalId?: string | null;
753
815
  };
754
816
  /**
755
- * A slot id from list_booking_slots in the same flow.
817
+ * A slot id from search_booking_slots or list_booking_slots in the same flow.
756
818
  */
757
819
  slotId: string;
758
820
  /**
@@ -837,7 +899,7 @@ export interface OficlinicRescheduleAppointmentUnprocessableContentError {
837
899
  metadata: ResponseMetadata;
838
900
  success: false;
839
901
  }
840
- export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
902
+ export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
841
903
  /**
842
904
  * The service is not configured for the selected professional.
843
905
  */
@@ -13,12 +13,13 @@ export interface Client {
13
13
  * Create one new patient in e-Oficlinic using the clinic-confirmed legal
14
14
  * identity, contact and classification fields. Use only with verified
15
15
  * authority to register this person and explicit confirmation of their
16
- * details. Requires confirm true and one idempotency key for this intent. An
17
- * existing patient is never changed. An uncertain result must be checked with
18
- * lookup_patient and must not be sent again. The result contains no patient
19
- * data. Verify the saved patient with lookup_patient before attempting a
20
- * booking. The submission follows the live-verified Cardiología scheduling
21
- * form. agentMode true answers concise Spanish text instead.
16
+ * details. Requires confirm true; repeating the identical request answers the
17
+ * recorded outcome, with no idempotency key needed. An existing patient is
18
+ * never changed. An uncertain result must be checked with lookup_patient and
19
+ * must not be sent again. The result contains no patient data. Verify the
20
+ * saved patient with lookup_patient before attempting a booking. The
21
+ * submission follows the live-verified Cardiología scheduling form. agentMode
22
+ * true answers concise Spanish text instead.
22
23
  */
23
24
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
24
25
  /**
@@ -63,11 +63,13 @@ export interface OficlinicCreatePatientBody {
63
63
  */
64
64
  genderId: string;
65
65
  /**
66
- * A key the caller chooses once per intended write, such as a UUID. Repeating
67
- * it with the same request answers the recorded outcome and never writes
68
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
66
+ * Optional. Without it the service derives the key from the request itself,
67
+ * so repeating the identical request answers the recorded outcome and never
68
+ * writes again. A caller that retries with changed values can choose one key
69
+ * per intended write, such as a UUID; another request with it answers
70
+ * IDEMPOTENCY_KEY_REUSED.
69
71
  */
70
- idempotencyKey: string;
72
+ idempotencyKey?: string;
71
73
  /**
72
74
  * The confirmed municipality code from the provider's catalog.
73
75
  */
@@ -462,13 +462,69 @@ export interface RaizAgentTurnPolicy {
462
462
  };
463
463
  }
464
464
  export interface RaizAgentVoiceSettings {
465
+ backgroundSound?: {
466
+ sound: "office1" | "office2" | "restaurant" | "city";
467
+ volume?: number;
468
+ } | null;
465
469
  backupModels?: ("arbolito/agile" | "arbolito/balanced" | "arbolito/advanced" | "arbolito/top")[] | null;
470
+ capacity?: {
471
+ callsPerDay: number | null;
472
+ maxHoldSeconds: number | null;
473
+ simultaneousCalls: number | null;
474
+ } | null;
475
+ guardrails?: {
476
+ blockManipulation: boolean;
477
+ blockedTopics: ("sexual" | "violence" | "harassment" | "selfHarm" | "profanity" | "religionOrPolitics" | "medicalAndLegal")[];
478
+ rules: {
479
+ blocks: string;
480
+ name: string;
481
+ }[];
482
+ stayOnTopic: boolean;
483
+ } | null;
484
+ /**
485
+ * Keep other people talking near the caller out of the conversation, so they
486
+ * neither answer for the caller nor interrupt the Agent. False turns it off.
487
+ * Left out, the Agent keeps its current value; until it is first set, calls
488
+ * keep behaving as they did. Applies to future calls once the Agent is
489
+ * published.
490
+ */
491
+ ignoreBackgroundVoices?: boolean;
492
+ /**
493
+ * Let callers type on their phone's keypad. What they type reaches the Agent
494
+ * as their message, and the Agent is told it may ask for a number that is
495
+ * long or easy to mishear (an identification number, a phone number) to be
496
+ * typed, ending with #. False ignores the keypad. On for an Agent that never
497
+ * set it; left out of a write, the Agent keeps its current value. Phone calls
498
+ * only. Applies to future calls once the Agent is published.
499
+ */
500
+ keypadInput?: boolean;
466
501
  /**
467
502
  * Names and terms the transcriber should favor (people, places, products).
468
503
  */
469
504
  keywords: string[];
470
505
  llm: "arbolito/agile" | "arbolito/balanced" | "arbolito/advanced" | "arbolito/top" | null;
506
+ maxDurationMessage?: string | null;
471
507
  maxDurationSeconds: number | null;
508
+ /**
509
+ * Short words a caller says while listening (`ajá`, `sí`, `ok`) that must not
510
+ * cut the Agent off. Matched whole, whatever the case. An empty list removes
511
+ * them all. Left out, the Agent keeps its current value; until it is first
512
+ * set, calls keep behaving as they did. Applies to future calls once the
513
+ * Agent is published.
514
+ */
515
+ nonInterruptingWords?: string[];
516
+ /**
517
+ * How the Agent pronounces the organization's own words: each `term` is
518
+ * spoken as its `spokenAs`. Terms are matched whatever their case, so a term
519
+ * repeated in another case keeps only its first entry. An empty list removes
520
+ * them all. Left out, the Agent keeps its current value; until it is first
521
+ * set, calls keep behaving as they did. Applies to future calls once the
522
+ * Agent is published.
523
+ */
524
+ pronunciations?: {
525
+ spokenAs: string;
526
+ term: string;
527
+ }[];
472
528
  reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | null;
473
529
  /**
474
530
  * Keep the call recording (copied to Raíz after the call).
@@ -480,6 +536,14 @@ export interface RaizAgentVoiceSettings {
480
536
  * to future calls; the Agent still receives the digits during the call.
481
537
  */
482
538
  redactKeypadInput?: boolean;
539
+ /**
540
+ * How soon the Agent replies once the caller pauses: `patient` waits longer,
541
+ * for people who think aloud or speak slowly; `normal`; `quick` replies
542
+ * sooner. Left out, the Agent keeps its current value; until it is first set,
543
+ * calls keep behaving as they did. Applies to future calls once the Agent is
544
+ * published.
545
+ */
546
+ replyTiming?: "patient" | "normal" | "quick";
483
547
  /**
484
548
  * Speak a short contextual message while preparing a slow response. False
485
549
  * disables automatic delay messages. Omitted preserves the current runtime
@@ -490,9 +554,25 @@ export interface RaizAgentVoiceSettings {
490
554
  similarityBoost: number | null;
491
555
  speed: number | null;
492
556
  stability: number | null;
493
- toolCallSound?: "typing" | null;
557
+ toolCallSound?: "typing" | "music1" | "music2" | "music3" | "music4" | null;
494
558
  turnTimeoutSeconds: number | null;
559
+ /**
560
+ * Say the first message whole: the caller cannot cut it off. For a greeting
561
+ * that carries a notice the caller must hear. False lets the caller interrupt
562
+ * it. Left out, the Agent keeps its current value; until it is first set,
563
+ * calls keep behaving as they did. Applies to future calls once the Agent is
564
+ * published.
565
+ */
566
+ uninterruptibleGreeting?: boolean;
495
567
  voiceId: string | null;
568
+ /**
569
+ * Which version of the voice speaks. `classic` (what every Agent has spoken
570
+ * with) or `turbo`: it answers sooner and with more expression, ignores
571
+ * `speed`, and a voice can sound somewhat different in it. Left out, the
572
+ * Agent keeps its current value; until it is first set, calls keep behaving
573
+ * as they did. Applies to future calls once the Agent is published.
574
+ */
575
+ voiceVersion?: "classic" | "turbo";
496
576
  }
497
577
  export interface RaizAgentWorkflow {
498
578
  /**
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type SanitasLookupAffiliationBody, type SanitasSanitasAffiliationResponse } from "./models.js";
2
+ import { type SanitasLookupAffiliationBody, type SanitasLookupAffiliationResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -11,13 +11,17 @@ export interface Client {
11
11
  * Look up affiliation
12
12
  *
13
13
  * Read one matching member contract from an active Account connection.
14
- * Confirmed affiliation results are reused for seven days. Unknown or
15
- * unresolved is never inactive. Session cookies are reused; one renewal is
16
- * admitted only on expiry. This does not authorize care.
14
+ * Confirmed affiliation results are reused for seven days. When the provider
15
+ * lists no contract for the document in the company, the answer is outcome
16
+ * noContract with active null: an answer, not a failure and not inactive, so
17
+ * confirm the document number and the company with the person.
18
+ * PATIENT_UNRESOLVED means it listed several contracts and none was chosen.
19
+ * The session is kept alive through the day, and one renewal is admitted only
20
+ * on expiry. This does not authorize care.
17
21
  */
18
22
  lookup(request: LookupRequest, options?: RequestOptions): Promise<LookupResponse>;
19
23
  }
20
24
  export declare function createClient(options: ClientOptions): Client;
21
25
  export declare function bind(transport: Transport): Client;
22
26
  export type LookupRequest = SanitasLookupAffiliationBody;
23
- export type LookupResponse = SanitasSanitasAffiliationResponse;
27
+ export type LookupResponse = SanitasLookupAffiliationResultResponse;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, } from "../../_/index.js";
4
- import { SanitasSanitasAffiliationResponseCodec, } from "./models.js";
4
+ import { SanitasLookupAffiliationResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -14,6 +14,6 @@ const LookupOperation = {
14
14
  method: "POST",
15
15
  route: "/v1/sanitas/affiliations/lookup",
16
16
  body: "flat",
17
- response: SanitasSanitasAffiliationResponseCodec,
17
+ response: SanitasLookupAffiliationResultResponseCodec,
18
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
  };
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, LookupRequest, LookupResponse, } from "./client.js";
5
- export type { SanitasLookupAffiliationBadGatewayError, SanitasLookupAffiliationBadGatewayFailure, SanitasLookupAffiliationBody, SanitasLookupAffiliationConflictError, SanitasLookupAffiliationConflictFailure, SanitasLookupAffiliationServiceUnavailableError, SanitasLookupAffiliationServiceUnavailableFailure, SanitasLookupAffiliationTooManyRequestsError, SanitasLookupAffiliationTooManyRequestsFailure, SanitasSanitasAffiliation, SanitasSanitasAffiliationResponse, } from "./models.js";
5
+ export type { SanitasLookupAffiliationBadGatewayError, SanitasLookupAffiliationBadGatewayFailure, SanitasLookupAffiliationBody, SanitasLookupAffiliationConflictError, SanitasLookupAffiliationConflictFailure, SanitasLookupAffiliationResult, SanitasLookupAffiliationResultResponse, SanitasLookupAffiliationServiceUnavailableError, SanitasLookupAffiliationServiceUnavailableFailure, SanitasLookupAffiliationTooManyRequestsError, SanitasLookupAffiliationTooManyRequestsFailure, SanitasSanitasAffiliation, SanitasSanitasNoContract, } from "./models.js";
@@ -37,6 +37,19 @@ export interface SanitasLookupAffiliationConflictError {
37
37
  success: false;
38
38
  }
39
39
  export type SanitasLookupAffiliationConflictFailure = SanitasConnectionRequiredFailure | SanitasProviderContextRequiredFailure | SanitasProviderSessionExpiredFailure | SanitasPatientUnresolvedFailure;
40
+ export type SanitasLookupAffiliationResult = SanitasSanitasAffiliation | SanitasSanitasNoContract;
41
+ /**
42
+ * A successful answer.
43
+ */
44
+ export interface SanitasLookupAffiliationResultResponse {
45
+ data: SanitasLookupAffiliationResult;
46
+ error: null;
47
+ /**
48
+ * What every answer carries besides its data or error.
49
+ */
50
+ metadata: ResponseMetadata;
51
+ success: true;
52
+ }
40
53
  /**
41
54
  * A failed answer.
42
55
  */
@@ -75,17 +88,15 @@ export interface SanitasSanitasAffiliation {
75
88
  plan: string | null;
76
89
  status: string;
77
90
  }
78
- /**
79
- * A successful answer.
80
- */
81
- export interface SanitasSanitasAffiliationResponse {
82
- data: SanitasSanitasAffiliation;
83
- error: null;
84
- /**
85
- * What every answer carries besides its data or error.
86
- */
87
- metadata: ResponseMetadata;
88
- success: true;
91
+ export interface SanitasSanitasNoContract {
92
+ active: null;
93
+ checkedAt: Temporal.Instant;
94
+ company: "sanitas" | "colsanitas" | "medisanitas";
95
+ documentNumber: string;
96
+ documentType: "AS" | "CC" | "CD" | "CE" | "CN" | "MS" | "NI" | "NU" | "PA" | "PD" | "PE" | "PT" | "RC" | "SC" | "TI";
97
+ outcome: "noContract";
89
98
  }
99
+ export declare const SanitasLookupAffiliationResultCodec: import("../../_/codec.js").Codec;
100
+ export declare const SanitasLookupAffiliationResultResponseCodec: import("../../_/codec.js").Codec;
90
101
  export declare const SanitasSanitasAffiliationCodec: import("../../_/codec.js").Codec;
91
- export declare const SanitasSanitasAffiliationResponseCodec: import("../../_/codec.js").Codec;
102
+ export declare const SanitasSanitasNoContractCodec: import("../../_/codec.js").Codec;
@@ -1,9 +1,13 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
- import { instant, object } from "../../_/index.js";
3
+ import { instant, object, union } from "../../_/index.js";
4
+ export const SanitasLookupAffiliationResultCodec = union([() => SanitasSanitasAffiliationCodec, () => SanitasSanitasNoContractCodec]);
5
+ export const SanitasLookupAffiliationResultResponseCodec = object([
6
+ ["data", null, () => SanitasLookupAffiliationResultCodec],
7
+ ]);
4
8
  export const SanitasSanitasAffiliationCodec = object([
5
9
  ["checkedAt", null, instant],
6
10
  ]);
7
- export const SanitasSanitasAffiliationResponseCodec = object([
8
- ["data", null, () => SanitasSanitasAffiliationCodec],
11
+ export const SanitasSanitasNoContractCodec = object([
12
+ ["checkedAt", null, instant],
9
13
  ]);
@@ -114,7 +114,8 @@ export interface SanitasLoginCoolingDownFailure {
114
114
  retryable: false;
115
115
  }
116
116
  /**
117
- * The provider did not return one matching contract. Coverage is unknown.
117
+ * The provider listed several contracts for this document in this company and
118
+ * none was chosen. Coverage is unknown.
118
119
  */
119
120
  export interface SanitasPatientUnresolvedFailure {
120
121
  /**
@@ -38,6 +38,12 @@ export interface SuraBookAppointmentBody {
38
38
  * while the organization has one; required when it has several.
39
39
  */
40
40
  connectionId?: string;
41
+ /**
42
+ * Exact plan printed on the reviewed SURA authorization. Send POS only when
43
+ * the document specifies it. Agenda must offer that plan for the same
44
+ * patient. Keep it when booking the returned opening.
45
+ */
46
+ coveragePlan?: "POS" | null;
41
47
  /**
42
48
  * Deprecated: use `startsAt`. Answered until 2027-01-28.
43
49
  *
@@ -47,6 +47,12 @@ export interface SuraPrepareAppointmentBody {
47
47
  * while the organization has one; required when it has several.
48
48
  */
49
49
  connectionId?: string;
50
+ /**
51
+ * Exact plan printed on the reviewed SURA authorization. Send POS only when
52
+ * the document specifies it. Agenda must offer that plan for the same
53
+ * patient. Keep it when booking the returned opening.
54
+ */
55
+ coveragePlan?: "POS" | null;
50
56
  /**
51
57
  * A day the person asked for, as YYYY-MM-DD. Its openings come first; when it
52
58
  * has none, the openings nearest to it on either side are offered instead and
@@ -464,6 +464,7 @@ export interface SuraPreparationAvailable {
464
464
  appointments: SuraAppointment[];
465
465
  booking: {
466
466
  areaId?: string;
467
+ coveragePlan?: "POS" | null;
467
468
  date: string | null;
468
469
  documentNumber: string;
469
470
  documentType: "ASI" | "CC" | "CD" | "CE" | "CN" | "DE" | "IFE" | "MS" | "NIT" | "NUIP" | "PA" | "PC" | "PD" | "PE" | "PF" | "PT" | "RC" | "RCP" | "RES" | "SC" | "TE" | "TI";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.56.0",
3
+ "version": "5.58.0",
4
4
  "description": "The Arbol API for TypeScript and JavaScript, generated by Cloudflare Forge from the platform's public OpenAPI.",
5
5
  "keywords": [
6
6
  "arbol",
@@ -58,8 +58,8 @@
58
58
  "packageManager": "bun@1.4.3",
59
59
  "arbol": {
60
60
  "openapi": {
61
- "release": "1.20261112.191820",
62
- "sha256": "2f7c07c79d552e9dc7f380e56101da2571ccb50d22ebd1568c1282c69a0ef313"
61
+ "release": "1.20261113.150152",
62
+ "sha256": "5846d7f85161ffc99a3121a402c3da9d4715375f9ea331a74c815e682af08e8d"
63
63
  }
64
64
  }
65
65
  }