@arbol-ai/sdk 5.55.0 → 5.57.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.
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import { type OficlinicListBookingSlotsResultResponse } from "./models.js";
2
+ import { type OficlinicListBookingSlotsResultResponse, type OficlinicSearchBookingSlotsBody, type OficlinicSearchBookingSlotsResultResponse } from "./models.js";
3
3
  export interface ClientOptions extends BaseClientOptions {
4
4
  /**
5
5
  * The URL the paths of the API are relative to.
@@ -25,6 +25,36 @@ export interface Client {
25
25
  * concise Spanish text instead.
26
26
  */
27
27
  list(request: ListRequest, options?: RequestOptions): Promise<ListResponse>;
28
+ /**
29
+ * Search booking slots
30
+ *
31
+ * Find the nearest real slots e-Oficlinic offers for one payer, service,
32
+ * program and attention type, in one call: it opens an availability flow,
33
+ * reads the professionals the provider schedules for the service, their rooms
34
+ * and each combination's agenda days, then the slots of the earliest days,
35
+ * and answers up to slotsPerRoom future slots for each room with the
36
+ * professional, the room, the day and the flowId and slotId that book it. Use
37
+ * it instead of walking list_booking_professionals, list_booking_rooms,
38
+ * list_booking_days and list_booking_slots. Without from it starts today in
39
+ * Colombia; for one requested day pass that day as both from and to.
40
+ * professionalIds keeps a named professional; roomIds keeps the rooms of one
41
+ * site, since a room is the place of care and this provider names the site
42
+ * only in the room's name. dates lists every agenda day with availability
43
+ * found in those days, at most 60, so another date can be offered and
44
+ * searched next. Slots already past are left out. complete false means a
45
+ * bound stopped the search early (at most 40 professionals, 60 professional
46
+ * and room combinations, 16 agenda days read for slots, and 8 seconds):
47
+ * narrow the filters, and never present the result as the nearest. An empty
48
+ * slots list concerns this payer, service and filters only. The payer must be
49
+ * one list_payers answers, or PAYER_NOT_FOUND; the program and attention type
50
+ * come from list_programs, or BOOKING_OPTION_NOT_FOUND, and an attention type
51
+ * that is not exactly one unit answers PROGRAM_UNITS_NOT_SUPPORTED.
52
+ * Read-only: nothing is locked or reserved. The flow expires 30 minutes after
53
+ * the search; for create_appointment or reschedule_appointment, copy the
54
+ * selected slot's flowId and slotId verbatim. agentMode true answers concise
55
+ * Spanish text instead.
56
+ */
57
+ search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
28
58
  }
29
59
  export declare function createClient(options: ClientOptions): Client;
30
60
  export declare function bind(transport: Transport): Client;
@@ -64,3 +94,5 @@ export interface ListRequest {
64
94
  agentMode?: boolean;
65
95
  }
66
96
  export type ListResponse = OficlinicListBookingSlotsResultResponse;
97
+ export type SearchRequest = OficlinicSearchBookingSlotsBody;
98
+ export type SearchResponse = OficlinicSearchBookingSlotsResultResponse;
@@ -1,13 +1,14 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, } from "../../_/index.js";
4
- import { OficlinicListBookingSlotsResultResponseCodec, } from "./models.js";
4
+ import { OficlinicListBookingSlotsResultResponseCodec, OficlinicSearchBookingSlotsResultResponseCodec, } from "./models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
8
8
  export function bind(transport) {
9
9
  return {
10
10
  list: (request, options) => transport.send(ListOperation, request, options),
11
+ search: (request, options) => transport.send(SearchOperation, request, options),
11
12
  };
12
13
  }
13
14
  const ListOperation = {
@@ -17,3 +18,10 @@ const ListOperation = {
17
18
  response: OficlinicListBookingSlotsResultResponseCodec,
18
19
  errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "410": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
20
  };
21
+ const SearchOperation = {
22
+ method: "POST",
23
+ route: "/v1/oficlinic/booking-slots/search",
24
+ body: "flat",
25
+ response: OficlinicSearchBookingSlotsResultResponseCodec,
26
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "410": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
27
+ };
@@ -1,5 +1,5 @@
1
1
  export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
- export type { OficlinicBookingSlot, OficlinicBookingSlotPage, OficlinicListBookingSlotsBadGatewayError, OficlinicListBookingSlotsBadGatewayFailure, OficlinicListBookingSlotsBadRequestError, OficlinicListBookingSlotsBadRequestFailure, OficlinicListBookingSlotsConflictError, OficlinicListBookingSlotsConflictFailure, OficlinicListBookingSlotsNotFoundError, OficlinicListBookingSlotsNotFoundFailure, OficlinicListBookingSlotsResult, OficlinicListBookingSlotsResultResponse, OficlinicListBookingSlotsServiceUnavailableError, OficlinicListBookingSlotsServiceUnavailableFailure, OficlinicListBookingSlotsTooManyRequestsError, OficlinicListBookingSlotsTooManyRequestsFailure, OficlinicListBookingSlotsUnprocessableContentError, OficlinicListBookingSlotsUnprocessableContentFailure, } from "./models.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, SearchRequest, SearchResponse, } from "./client.js";
5
+ export type { OficlinicBookingDateOffer, OficlinicBookingSlot, OficlinicBookingSlotOffer, OficlinicBookingSlotPage, OficlinicBookingSlotSearch, OficlinicListBookingSlotsBadGatewayError, OficlinicListBookingSlotsBadGatewayFailure, OficlinicListBookingSlotsBadRequestError, OficlinicListBookingSlotsBadRequestFailure, OficlinicListBookingSlotsConflictError, OficlinicListBookingSlotsConflictFailure, OficlinicListBookingSlotsNotFoundError, OficlinicListBookingSlotsNotFoundFailure, OficlinicListBookingSlotsResult, OficlinicListBookingSlotsResultResponse, OficlinicListBookingSlotsServiceUnavailableError, OficlinicListBookingSlotsServiceUnavailableFailure, OficlinicListBookingSlotsTooManyRequestsError, OficlinicListBookingSlotsTooManyRequestsFailure, OficlinicListBookingSlotsUnprocessableContentError, OficlinicListBookingSlotsUnprocessableContentFailure, OficlinicSearchBookingSlotsBadGatewayError, OficlinicSearchBookingSlotsBadGatewayFailure, OficlinicSearchBookingSlotsBadRequestError, OficlinicSearchBookingSlotsBadRequestFailure, OficlinicSearchBookingSlotsBody, OficlinicSearchBookingSlotsConflictError, OficlinicSearchBookingSlotsConflictFailure, OficlinicSearchBookingSlotsNotFoundError, OficlinicSearchBookingSlotsNotFoundFailure, OficlinicSearchBookingSlotsResult, OficlinicSearchBookingSlotsResultResponse, OficlinicSearchBookingSlotsServiceUnavailableError, OficlinicSearchBookingSlotsServiceUnavailableFailure, OficlinicSearchBookingSlotsTooManyRequestsError, OficlinicSearchBookingSlotsTooManyRequestsFailure, OficlinicSearchBookingSlotsUnprocessableContentError, OficlinicSearchBookingSlotsUnprocessableContentFailure, } from "./models.js";
@@ -1,5 +1,28 @@
1
1
  import type { CredentialsRejectedFailure, InvalidInputFailure, OutcomeUnknownFailure, PageInfo, ProviderProtocolChangedFailure, ProviderUnavailableFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import type { OficlinicAgentText, OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionNotFoundFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicInvalidCursorFailure, OficlinicLoginCoolingDownFailure, OficlinicPayerNotFoundFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSelectionNotAvailableFailure, OficlinicSignInOutcomeUnknownFailure } from "../models.js";
2
+ import type { OficlinicAgentText, OficlinicBookingOptionNotFoundFailure, OficlinicConnectionBusyFailure, OficlinicConnectionNotActiveFailure, OficlinicConnectionNotFoundFailure, OficlinicConnectionRequiredFailure, OficlinicContextNotAvailableFailure, OficlinicInvalidCursorFailure, OficlinicLoginCoolingDownFailure, OficlinicPayerNotFoundFailure, OficlinicProgramUnitsNotSupportedFailure, OficlinicProviderIdentityMismatchFailure, OficlinicReauthenticationRequiredFailure, OficlinicSelectionNotAvailableFailure, OficlinicSignInOutcomeUnknownFailure } from "../models.js";
3
+ export interface OficlinicBookingDateOffer {
4
+ /**
5
+ * The provider's Disponibles count; null when not a count.
6
+ */
7
+ availableCount: number | null;
8
+ date: string;
9
+ /**
10
+ * The provider's agenda id (agendaID): pass it as dayId for its slots.
11
+ */
12
+ dayId: string;
13
+ professional: {
14
+ id: string;
15
+ name: string;
16
+ };
17
+ room: {
18
+ id: string;
19
+ name: string;
20
+ };
21
+ /**
22
+ * Whether this search read the day's slots; its future ones are in slots.
23
+ */
24
+ slotsListed: boolean;
25
+ }
3
26
  export interface OficlinicBookingSlot {
4
27
  date: string | null;
5
28
  dayId: string;
@@ -44,6 +67,44 @@ export interface OficlinicBookingSlot {
44
67
  */
45
68
  webBookable: boolean;
46
69
  }
70
+ export interface OficlinicBookingSlotOffer {
71
+ /**
72
+ * The slot's day in Colombia.
73
+ */
74
+ date: string;
75
+ /**
76
+ * The provider's agenda id of the slot's day.
77
+ */
78
+ dayId: string;
79
+ /**
80
+ * The slot's exact end; null if unrecognized.
81
+ */
82
+ endsAt: Temporal.Instant | null;
83
+ /**
84
+ * The availability flow of this slot: pass it with slotId to book.
85
+ */
86
+ flowId: string;
87
+ /**
88
+ * The provider's slot id (citaID): pass it as slotId to book.
89
+ */
90
+ id: string;
91
+ /**
92
+ * The slot as the provider describes it (citaDescripcion), usually its time.
93
+ */
94
+ label: string | null;
95
+ professional: {
96
+ id: string;
97
+ name: string;
98
+ };
99
+ room: {
100
+ id: string;
101
+ name: string;
102
+ };
103
+ /**
104
+ * The slot's exact start in America/Bogota; null if unrecognized.
105
+ */
106
+ startsAt: Temporal.Instant | null;
107
+ }
47
108
  export interface OficlinicBookingSlotPage {
48
109
  /**
49
110
  * Items admitted by this resource contract within the verified organization.
@@ -58,6 +119,38 @@ export interface OficlinicBookingSlotPage {
58
119
  */
59
120
  pageInfo: PageInfo;
60
121
  }
122
+ export interface OficlinicBookingSlotSearch {
123
+ /**
124
+ * false when a bound stopped the search before every matching professional,
125
+ * room and day was read: nearer slots may exist.
126
+ */
127
+ complete: boolean;
128
+ /**
129
+ * The agenda days with availability in the searched days, earliest first.
130
+ */
131
+ dates: OficlinicBookingDateOffer[];
132
+ /**
133
+ * When the flow expires.
134
+ */
135
+ flowExpiresAt: Temporal.Instant;
136
+ /**
137
+ * The availability flow id every booking list item carries (flowId). It
138
+ * expires 30 minutes after the first list.
139
+ */
140
+ flowId: string;
141
+ /**
142
+ * The first day searched.
143
+ */
144
+ from: string;
145
+ /**
146
+ * The nearest future slots of each room, earliest first.
147
+ */
148
+ slots: OficlinicBookingSlotOffer[];
149
+ /**
150
+ * The last day searched; null when open.
151
+ */
152
+ to: string | null;
153
+ }
61
154
  /**
62
155
  * A failed answer.
63
156
  */
@@ -162,6 +255,166 @@ export interface OficlinicListBookingSlotsUnprocessableContentError {
162
255
  success: false;
163
256
  }
164
257
  export type OficlinicListBookingSlotsUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure;
258
+ /**
259
+ * A failed answer.
260
+ */
261
+ export interface OficlinicSearchBookingSlotsBadGatewayError {
262
+ data: null;
263
+ error: OficlinicSearchBookingSlotsBadGatewayFailure;
264
+ /**
265
+ * What every answer carries besides its data or error.
266
+ */
267
+ metadata: ResponseMetadata;
268
+ success: false;
269
+ }
270
+ export type OficlinicSearchBookingSlotsBadGatewayFailure = OutcomeUnknownFailure | OficlinicSignInOutcomeUnknownFailure | ProviderProtocolChangedFailure;
271
+ /**
272
+ * A failed answer.
273
+ */
274
+ export interface OficlinicSearchBookingSlotsBadRequestError {
275
+ data: null;
276
+ error: OficlinicSearchBookingSlotsBadRequestFailure;
277
+ /**
278
+ * What every answer carries besides its data or error.
279
+ */
280
+ metadata: ResponseMetadata;
281
+ success: false;
282
+ }
283
+ export type OficlinicSearchBookingSlotsBadRequestFailure = InvalidInputFailure | OficlinicInvalidCursorFailure;
284
+ export interface OficlinicSearchBookingSlotsBody {
285
+ /**
286
+ * true answers { text }: concise Spanish facts for a messaging or voice
287
+ * agent, with the short ids and the cursor needed to continue. false, the
288
+ * default, answers the structured object.
289
+ */
290
+ agentMode?: boolean;
291
+ /**
292
+ * An attention type id the program lists in list_programs, with bookable
293
+ * true.
294
+ */
295
+ attentionTypeId: string;
296
+ /**
297
+ * An Account connection id of the caller's organization.
298
+ */
299
+ connectionId?: string;
300
+ /**
301
+ * The first day to search, YYYY-MM-DD in Colombia. Today when absent or in
302
+ * the past.
303
+ */
304
+ from?: string;
305
+ /**
306
+ * A payer id from list_payers.
307
+ */
308
+ payerId: string;
309
+ /**
310
+ * Only these professionals. Empty, the default, searches every professional
311
+ * the provider schedules for the service.
312
+ */
313
+ professionalIds?: string[];
314
+ /**
315
+ * A program id from list_programs.
316
+ */
317
+ programId: string;
318
+ /**
319
+ * Only these rooms, such as the rooms of one site. Empty, the default,
320
+ * searches every room.
321
+ */
322
+ roomIds?: string[];
323
+ /**
324
+ * A service id, such as one search_services answers.
325
+ */
326
+ serviceId: string;
327
+ /**
328
+ * The most slots answered for each room, nearest first.
329
+ */
330
+ slotsPerRoom?: number;
331
+ /**
332
+ * The last day to search, YYYY-MM-DD, not before from. Open when absent. The
333
+ * same day as from searches one day.
334
+ */
335
+ to?: string;
336
+ }
337
+ /**
338
+ * A failed answer.
339
+ */
340
+ export interface OficlinicSearchBookingSlotsConflictError {
341
+ data: null;
342
+ error: OficlinicSearchBookingSlotsConflictFailure;
343
+ /**
344
+ * What every answer carries besides its data or error.
345
+ */
346
+ metadata: ResponseMetadata;
347
+ success: false;
348
+ }
349
+ export type OficlinicSearchBookingSlotsConflictFailure = OficlinicConnectionRequiredFailure | OficlinicConnectionNotActiveFailure | OficlinicConnectionBusyFailure | OficlinicReauthenticationRequiredFailure | OficlinicSelectionNotAvailableFailure;
350
+ /**
351
+ * A failed answer.
352
+ */
353
+ export interface OficlinicSearchBookingSlotsNotFoundError {
354
+ data: null;
355
+ error: OficlinicSearchBookingSlotsNotFoundFailure;
356
+ /**
357
+ * What every answer carries besides its data or error.
358
+ */
359
+ metadata: ResponseMetadata;
360
+ success: false;
361
+ }
362
+ export type OficlinicSearchBookingSlotsNotFoundFailure = OficlinicConnectionNotFoundFailure | OficlinicPayerNotFoundFailure | OficlinicBookingOptionNotFoundFailure;
363
+ export type OficlinicSearchBookingSlotsResult = OficlinicBookingSlotSearch | OficlinicAgentText;
364
+ /**
365
+ * A successful answer.
366
+ */
367
+ export interface OficlinicSearchBookingSlotsResultResponse {
368
+ data: OficlinicSearchBookingSlotsResult;
369
+ error: null;
370
+ /**
371
+ * What every answer carries besides its data or error.
372
+ */
373
+ metadata: ResponseMetadata;
374
+ success: true;
375
+ }
376
+ /**
377
+ * A failed answer.
378
+ */
379
+ export interface OficlinicSearchBookingSlotsServiceUnavailableError {
380
+ data: null;
381
+ error: OficlinicSearchBookingSlotsServiceUnavailableFailure;
382
+ /**
383
+ * What every answer carries besides its data or error.
384
+ */
385
+ metadata: ResponseMetadata;
386
+ success: false;
387
+ }
388
+ export type OficlinicSearchBookingSlotsServiceUnavailableFailure = UpstreamUnavailableFailure | ProviderUnavailableFailure;
389
+ /**
390
+ * A failed answer.
391
+ */
392
+ export interface OficlinicSearchBookingSlotsTooManyRequestsError {
393
+ data: null;
394
+ error: OficlinicSearchBookingSlotsTooManyRequestsFailure;
395
+ /**
396
+ * What every answer carries besides its data or error.
397
+ */
398
+ metadata: ResponseMetadata;
399
+ success: false;
400
+ }
401
+ export type OficlinicSearchBookingSlotsTooManyRequestsFailure = RateLimitedFailure | OficlinicLoginCoolingDownFailure;
402
+ /**
403
+ * A failed answer.
404
+ */
405
+ export interface OficlinicSearchBookingSlotsUnprocessableContentError {
406
+ data: null;
407
+ error: OficlinicSearchBookingSlotsUnprocessableContentFailure;
408
+ /**
409
+ * What every answer carries besides its data or error.
410
+ */
411
+ metadata: ResponseMetadata;
412
+ success: false;
413
+ }
414
+ export type OficlinicSearchBookingSlotsUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
165
415
  export declare const OficlinicBookingSlotCodec: import("../../_/codec.js").Codec;
416
+ export declare const OficlinicBookingSlotOfferCodec: import("../../_/codec.js").Codec;
166
417
  export declare const OficlinicBookingSlotPageCodec: import("../../_/codec.js").Codec;
418
+ export declare const OficlinicBookingSlotSearchCodec: import("../../_/codec.js").Codec;
167
419
  export declare const OficlinicListBookingSlotsResultResponseCodec: import("../../_/codec.js").Codec;
420
+ export declare const OficlinicSearchBookingSlotsResultResponseCodec: import("../../_/codec.js").Codec;
@@ -5,9 +5,20 @@ export const OficlinicBookingSlotCodec = object([
5
5
  ["endsAt", null, instant],
6
6
  ["startsAt", null, instant],
7
7
  ]);
8
+ export const OficlinicBookingSlotOfferCodec = object([
9
+ ["endsAt", null, instant],
10
+ ["startsAt", null, instant],
11
+ ]);
8
12
  export const OficlinicBookingSlotPageCodec = object([
9
13
  ["data", null, array(() => OficlinicBookingSlotCodec)],
10
14
  ]);
15
+ export const OficlinicBookingSlotSearchCodec = object([
16
+ ["flowExpiresAt", null, instant],
17
+ ["slots", null, array(() => OficlinicBookingSlotOfferCodec)],
18
+ ]);
11
19
  export const OficlinicListBookingSlotsResultResponseCodec = object([
12
20
  ["data", null, () => OficlinicBookingSlotPageCodec],
13
21
  ]);
22
+ export const OficlinicSearchBookingSlotsResultResponseCodec = object([
23
+ ["data", null, () => OficlinicBookingSlotSearchCodec],
24
+ ]);
@@ -1,4 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { DeletedObjectResponse } from "../../models.js";
2
3
  import { type RaizAgentPageResponse, type RaizAgentResponse, type RaizCreateAgentBody, type RaizUpdateAgentBody } from "./models.js";
3
4
  export interface ClientOptions extends BaseClientOptions {
4
5
  /**
@@ -29,6 +30,16 @@ export interface Client {
29
30
  * first.
30
31
  */
31
32
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
33
+ /**
34
+ * Delete an Agent
35
+ *
36
+ * Delete an Agent for good; its conversations remain. Refused with
37
+ * AGENT_IN_USE while a channel or an active campaign uses it: unassign its
38
+ * channels (`update_channel` with `agentId: null`) or finish the campaign
39
+ * first. Not an AI tool; to stop an Agent without deleting it, pause it with
40
+ * `update_agent` (`status: paused`).
41
+ */
42
+ delete(request: DeleteRequest, options?: RequestOptions): Promise<DeleteResponse>;
32
43
  /**
33
44
  * Get an Agent
34
45
  *
@@ -76,6 +87,13 @@ export declare function createClient(options: ClientOptions): Client;
76
87
  export declare function bind(transport: Transport): Client;
77
88
  export type CreateRequest = RaizCreateAgentBody;
78
89
  export type CreateResponse = RaizAgentResponse;
90
+ export interface DeleteRequest {
91
+ /**
92
+ * Agent id.
93
+ */
94
+ agentId: string;
95
+ }
96
+ export type DeleteResponse = DeletedObjectResponse;
79
97
  export interface GetRequest {
80
98
  /**
81
99
  * Agent id.
@@ -8,6 +8,7 @@ export function createClient(options) {
8
8
  export function bind(transport) {
9
9
  return {
10
10
  create: (request, options) => transport.send(CreateOperation, request, options),
11
+ delete: (request, options) => transport.send(DeleteOperation, request, options),
11
12
  get: (request, options) => transport.send(GetOperation, request, options),
12
13
  list: (request, options) => transport.send(ListOperation, request, options),
13
14
  update: (request, options) => transport.send(UpdateOperation, request, options),
@@ -21,6 +22,12 @@ const CreateOperation = {
21
22
  response: RaizAgentResponseCodec,
22
23
  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 },
23
24
  };
25
+ const DeleteOperation = {
26
+ method: "DELETE",
27
+ route: "/v1/raiz/agents/{agentId}",
28
+ response: null,
29
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
+ };
24
31
  const GetOperation = {
25
32
  method: "GET",
26
33
  route: "/v1/raiz/agents/{agentId}",
@@ -1,5 +1,5 @@
1
1
  export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, CreateRequest, CreateResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentPageResponse, RaizAgentProcedure, RaizAgentResponse, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, RaizAgentWorkflow, RaizCreateAgentBody, RaizCreateAgentConflictError, RaizCreateAgentConflictFailure, RaizCreateAgentServiceUnavailableError, RaizCreateAgentServiceUnavailableFailure, RaizCreateAgentUnprocessableContentError, RaizCreateAgentUnprocessableContentFailure, RaizGetAgentServiceUnavailableError, RaizGetAgentServiceUnavailableFailure, RaizListAgentsBadRequestError, RaizListAgentsBadRequestFailure, RaizListAgentsServiceUnavailableError, RaizListAgentsServiceUnavailableFailure, RaizUpdateAgentBody, RaizUpdateAgentConflictError, RaizUpdateAgentConflictFailure, RaizUpdateAgentServiceUnavailableError, RaizUpdateAgentServiceUnavailableFailure, RaizUpdateAgentUnprocessableContentError, RaizUpdateAgentUnprocessableContentFailure, } from "./models.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
+ export type { RaizAgent, RaizAgentGreeting, RaizAgentIntegrationToolInput, RaizAgentModelTrial, RaizAgentPage, RaizAgentPageResponse, RaizAgentProcedure, RaizAgentResponse, RaizAgentSettings, RaizAgentSettingsInput, RaizAgentTurnPolicy, RaizAgentVoiceSettings, RaizAgentWorkflow, RaizCreateAgentBody, RaizCreateAgentConflictError, RaizCreateAgentConflictFailure, RaizCreateAgentServiceUnavailableError, RaizCreateAgentServiceUnavailableFailure, RaizCreateAgentUnprocessableContentError, RaizCreateAgentUnprocessableContentFailure, RaizDeleteAgentConflictError, RaizDeleteAgentConflictFailure, RaizGetAgentServiceUnavailableError, RaizGetAgentServiceUnavailableFailure, RaizKnowledgeDocumentUnavailableError, RaizListAgentsBadRequestError, RaizListAgentsBadRequestFailure, RaizListAgentsServiceUnavailableError, RaizListAgentsServiceUnavailableFailure, RaizUpdateAgentBody, RaizUpdateAgentConflictError, RaizUpdateAgentConflictFailure, RaizUpdateAgentServiceUnavailableError, RaizUpdateAgentServiceUnavailableFailure, RaizUpdateAgentUnprocessableContentError, RaizUpdateAgentUnprocessableContentFailure, } from "./models.js";
@@ -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
  /**
@@ -641,6 +721,19 @@ export interface RaizCreateAgentUnprocessableContentError {
641
721
  success: false;
642
722
  }
643
723
  export type RaizCreateAgentUnprocessableContentFailure = RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure;
724
+ /**
725
+ * A failed answer.
726
+ */
727
+ export interface RaizDeleteAgentConflictError {
728
+ data: null;
729
+ error: RaizDeleteAgentConflictFailure;
730
+ /**
731
+ * What every answer carries besides its data or error.
732
+ */
733
+ metadata: ResponseMetadata;
734
+ success: false;
735
+ }
736
+ export type RaizDeleteAgentConflictFailure = RaizAgentInUseFailure | RaizAgentModalityLockedFailure | RaizVersionConflictFailure;
644
737
  /**
645
738
  * A failed answer.
646
739
  */
@@ -654,6 +747,21 @@ export interface RaizGetAgentServiceUnavailableError {
654
747
  success: false;
655
748
  }
656
749
  export type RaizGetAgentServiceUnavailableFailure = UpstreamUnavailableFailure | RaizVoiceUnavailableFailure | RaizIntegrationsUnavailableFailure;
750
+ /**
751
+ * A failed answer.
752
+ */
753
+ export interface RaizKnowledgeDocumentUnavailableError {
754
+ data: null;
755
+ /**
756
+ * A Knowledge document does not exist in this organization.
757
+ */
758
+ error: RaizKnowledgeDocumentUnavailableFailure;
759
+ /**
760
+ * What every answer carries besides its data or error.
761
+ */
762
+ metadata: ResponseMetadata;
763
+ success: false;
764
+ }
657
765
  /**
658
766
  * A failed answer.
659
767
  */
@@ -37,11 +37,11 @@ export interface Client {
37
37
  /**
38
38
  * Update the organization
39
39
  *
40
- * Change the organization's name, default language, time zone or settings.
41
- * Settings merge: an omitted setting stays and `null` returns it to its
42
- * default; `notifications.recipients` is replaced as a whole. Fails with
43
- * TIME_ZONE_UNKNOWN when the time zone is not a valid IANA zone (for example
44
- * `America/Bogota`).
40
+ * Change the organization's default language, time zone or settings. Edit the
41
+ * organization's name in Arbol Account. Settings merge: an omitted setting
42
+ * stays and `null` returns it to its default; `notifications.recipients` is
43
+ * replaced as a whole. Fails with TIME_ZONE_UNKNOWN when the time zone is not
44
+ * a valid IANA zone (for example `America/Bogota`).
45
45
  */
46
46
  update(request?: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
47
47
  }
@@ -177,6 +177,12 @@ export interface RaizUpdateOrganizationBody {
177
177
  * BCP 47 language tag.
178
178
  */
179
179
  language?: string;
180
+ /**
181
+ * Legacy field for clients that echo the existing name. Edit the organization
182
+ * name in Arbol Account.
183
+ *
184
+ * @deprecated
185
+ */
180
186
  name?: string;
181
187
  /**
182
188
  * Settings to change. An omitted setting stays as it is; `null` returns it to
@@ -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.55.0",
3
+ "version": "5.57.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.173149",
62
- "sha256": "65ea07f7d13d4676ad71c33b8aacc2ee3205bc106d2fa42b9248c1caa96e6c64"
61
+ "release": "1.20261113.63907",
62
+ "sha256": "12e277340eb5ed2a2a2732fd87021c32c6d9bb2bfbba22f2a0eef5ed12e475dd"
63
63
  }
64
64
  }
65
65
  }