@arbol-ai/sdk 5.31.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/account/permissions/models.d.ts +1 -1
  2. package/dist/agenda/models.d.ts +21 -0
  3. package/dist/agenda/waitlist/client.d.ts +205 -20
  4. package/dist/agenda/waitlist/client.js +18 -0
  5. package/dist/agenda/waitlist/index.d.ts +1 -1
  6. package/dist/client.d.ts +2 -0
  7. package/dist/client.js +5 -0
  8. package/dist/comfachoco/affiliations/client.d.ts +24 -0
  9. package/dist/comfachoco/affiliations/client.js +19 -0
  10. package/dist/comfachoco/affiliations/index.d.ts +5 -0
  11. package/dist/comfachoco/affiliations/index.js +4 -0
  12. package/dist/comfachoco/affiliations/models.d.ts +97 -0
  13. package/dist/comfachoco/affiliations/models.js +13 -0
  14. package/dist/comfachoco/client.d.ts +15 -0
  15. package/dist/comfachoco/client.js +20 -0
  16. package/dist/comfachoco/connections/client.d.ts +55 -0
  17. package/dist/comfachoco/connections/client.js +33 -0
  18. package/dist/comfachoco/connections/index.d.ts +5 -0
  19. package/dist/comfachoco/connections/index.js +4 -0
  20. package/dist/comfachoco/connections/models.d.ts +204 -0
  21. package/dist/comfachoco/connections/models.js +9 -0
  22. package/dist/comfachoco/index.d.ts +5 -0
  23. package/dist/comfachoco/index.js +4 -0
  24. package/dist/comfachoco/models.d.ts +220 -0
  25. package/dist/comfachoco/models.js +3 -0
  26. package/dist/index.d.ts +1 -1
  27. package/dist/models.d.ts +12 -0
  28. package/dist/models.js +3 -0
  29. package/dist/nuevaEps/affiliations/models.d.ts +2 -2
  30. package/dist/nuevaEps/client.d.ts +6 -0
  31. package/dist/nuevaEps/client.js +15 -0
  32. package/dist/nuevaEps/connections/models.d.ts +6 -5
  33. package/dist/nuevaEps/index.d.ts +1 -1
  34. package/dist/nuevaEps/ingestionErrorReports/client.d.ts +33 -0
  35. package/dist/nuevaEps/ingestionErrorReports/client.js +19 -0
  36. package/dist/nuevaEps/ingestionErrorReports/index.d.ts +5 -0
  37. package/dist/nuevaEps/ingestionErrorReports/index.js +4 -0
  38. package/dist/nuevaEps/ingestionErrorReports/models.d.ts +87 -0
  39. package/dist/nuevaEps/ingestionErrorReports/models.js +10 -0
  40. package/dist/nuevaEps/ingestions/client.d.ts +68 -0
  41. package/dist/nuevaEps/ingestions/client.js +26 -0
  42. package/dist/nuevaEps/ingestions/index.d.ts +5 -0
  43. package/dist/nuevaEps/ingestions/index.js +4 -0
  44. package/dist/nuevaEps/ingestions/models.d.ts +182 -0
  45. package/dist/nuevaEps/ingestions/models.js +3 -0
  46. package/dist/nuevaEps/models.d.ts +65 -0
  47. package/dist/nuevaEps/precursoras/client.d.ts +27 -0
  48. package/dist/nuevaEps/precursoras/client.js +18 -0
  49. package/dist/nuevaEps/precursoras/index.d.ts +5 -0
  50. package/dist/nuevaEps/precursoras/index.js +4 -0
  51. package/dist/nuevaEps/precursoras/models.d.ts +94 -0
  52. package/dist/nuevaEps/precursoras/models.js +3 -0
  53. package/dist/raiz/channels/models.d.ts +10 -10
  54. package/dist/raiz/channels/models.js +1 -1
  55. package/dist/raiz/conversations/client.d.ts +24 -9
  56. package/dist/raiz/conversations/index.d.ts +1 -1
  57. package/dist/raiz/conversations/models.d.ts +3 -14
  58. package/dist/raiz/conversations/models.js +2 -4
  59. package/dist/raiz/index.d.ts +1 -1
  60. package/dist/raiz/knowledge/client.d.ts +4 -3
  61. package/dist/raiz/models.d.ts +8 -2
  62. package/dist/raiz/organization/models.d.ts +1 -1
  63. package/dist/raiz/reports/client.d.ts +35 -20
  64. package/dist/raiz/reports/client.js +1 -1
  65. package/dist/raiz/reports/models.d.ts +21 -0
  66. package/dist/raiz/reports/models.js +1 -1
  67. package/package.json +5 -4
@@ -0,0 +1,94 @@
1
+ import type { ForbiddenFailure, OutcomeUnknownFailure, RateLimitedFailure, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
+ import type { NuevaEpsLoginCooldownFailure, NuevaEpsLoginRejectedFailure, NuevaEpsNotConfiguredFailure, NuevaEpsPasswordChangeRequiredFailure, NuevaEpsPortalChangedFailure, NuevaEpsPortalMismatchFailure, NuevaEpsPortalNotConfiguredFailure, NuevaEpsPortalUnavailableFailure, NuevaEpsRegionBlockedFailure, NuevaEpsSessionBusyFailure, NuevaEpsSessionRequiredFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface NuevaEpsGetPrecursorasBadGatewayError {
7
+ data: null;
8
+ error: NuevaEpsGetPrecursorasBadGatewayFailure;
9
+ /**
10
+ * What every answer carries besides its data or error.
11
+ */
12
+ metadata: ResponseMetadata;
13
+ success: false;
14
+ }
15
+ export type NuevaEpsGetPrecursorasBadGatewayFailure = OutcomeUnknownFailure | NuevaEpsPortalChangedFailure;
16
+ /**
17
+ * A failed answer.
18
+ */
19
+ export interface NuevaEpsGetPrecursorasConflictError {
20
+ data: null;
21
+ error: NuevaEpsGetPrecursorasConflictFailure;
22
+ /**
23
+ * What every answer carries besides its data or error.
24
+ */
25
+ metadata: ResponseMetadata;
26
+ success: false;
27
+ }
28
+ export type NuevaEpsGetPrecursorasConflictFailure = NuevaEpsPortalNotConfiguredFailure | NuevaEpsPortalMismatchFailure | NuevaEpsPasswordChangeRequiredFailure | NuevaEpsNotConfiguredFailure | NuevaEpsSessionRequiredFailure | NuevaEpsSessionBusyFailure;
29
+ /**
30
+ * A failed answer.
31
+ */
32
+ export interface NuevaEpsGetPrecursorasForbiddenError {
33
+ data: null;
34
+ error: NuevaEpsGetPrecursorasForbiddenFailure;
35
+ /**
36
+ * What every answer carries besides its data or error.
37
+ */
38
+ metadata: ResponseMetadata;
39
+ success: false;
40
+ }
41
+ export type NuevaEpsGetPrecursorasForbiddenFailure = ForbiddenFailure | NuevaEpsLoginRejectedFailure;
42
+ /**
43
+ * A failed answer.
44
+ */
45
+ export interface NuevaEpsGetPrecursorasServiceUnavailableError {
46
+ data: null;
47
+ error: NuevaEpsGetPrecursorasServiceUnavailableFailure;
48
+ /**
49
+ * What every answer carries besides its data or error.
50
+ */
51
+ metadata: ResponseMetadata;
52
+ success: false;
53
+ }
54
+ export type NuevaEpsGetPrecursorasServiceUnavailableFailure = UpstreamUnavailableFailure | NuevaEpsPortalUnavailableFailure | NuevaEpsRegionBlockedFailure;
55
+ /**
56
+ * A failed answer.
57
+ */
58
+ export interface NuevaEpsGetPrecursorasTooManyRequestsError {
59
+ data: null;
60
+ error: NuevaEpsGetPrecursorasTooManyRequestsFailure;
61
+ /**
62
+ * What every answer carries besides its data or error.
63
+ */
64
+ metadata: ResponseMetadata;
65
+ success: false;
66
+ }
67
+ export type NuevaEpsGetPrecursorasTooManyRequestsFailure = RateLimitedFailure | NuevaEpsLoginCooldownFailure;
68
+ export interface NuevaEpsPrecursorasCatalog {
69
+ applications: {
70
+ code: string;
71
+ name: string;
72
+ }[];
73
+ providers: {
74
+ id: number;
75
+ name: string;
76
+ }[];
77
+ structures: {
78
+ fieldCount: number;
79
+ id: number;
80
+ name: string;
81
+ }[];
82
+ }
83
+ /**
84
+ * A successful answer.
85
+ */
86
+ export interface NuevaEpsPrecursorasCatalogResponse {
87
+ data: NuevaEpsPrecursorasCatalog;
88
+ error: null;
89
+ /**
90
+ * What every answer carries besides its data or error.
91
+ */
92
+ metadata: ResponseMetadata;
93
+ success: true;
94
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -1,5 +1,5 @@
1
- import type { PageInfo } from "../../models.js";
2
- import { type RaizBusinessHours, type RaizHttpsUrl } from "../models.js";
1
+ import type { HttpsUrl, PageInfo } from "../../models.js";
2
+ import { type RaizBusinessHours } from "../models.js";
3
3
  export interface RaizChannel {
4
4
  address: string | null;
5
5
  agent: RaizChannelAgent | null;
@@ -195,7 +195,7 @@ export interface RaizWidgetSettings {
195
195
  assistantTextColor?: string | null;
196
196
  attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
197
197
  attachmentsEnabled?: boolean;
198
- avatarUrl?: RaizHttpsUrl | null;
198
+ avatarUrl?: HttpsUrl | null;
199
199
  /**
200
200
  * A color in `#RRGGBB` form.
201
201
  */
@@ -241,7 +241,7 @@ export interface RaizWidgetSettings {
241
241
  */
242
242
  fontFamily?: string;
243
243
  fontSize?: number;
244
- fontUrl?: RaizHttpsUrl | null;
244
+ fontUrl?: HttpsUrl | null;
245
245
  formTitle?: string;
246
246
  greeting?: string;
247
247
  /**
@@ -261,7 +261,7 @@ export interface RaizWidgetSettings {
261
261
  * The CSS font-family of `headingFont: custom`.
262
262
  */
263
263
  headingFontFamily?: string;
264
- headingFontUrl?: RaizHttpsUrl | null;
264
+ headingFontUrl?: HttpsUrl | null;
265
265
  /**
266
266
  * The headings' weight, from 300 (light) to 800 (heavy).
267
267
  */
@@ -319,7 +319,7 @@ export interface RaizWidgetSettings {
319
319
  * A color in `#RRGGBB` form.
320
320
  */
321
321
  primaryColor?: string;
322
- privacyUrl?: RaizHttpsUrl | null;
322
+ privacyUrl?: HttpsUrl | null;
323
323
  /**
324
324
  * Also serve the widget on its own hosted page, outside any embedding site.
325
325
  */
@@ -411,7 +411,7 @@ export interface RaizWidgetSettingsInput {
411
411
  assistantTextColor?: string | null;
412
412
  attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
413
413
  attachmentsEnabled?: boolean;
414
- avatarUrl?: RaizHttpsUrl | null;
414
+ avatarUrl?: HttpsUrl | null;
415
415
  /**
416
416
  * A color in `#RRGGBB` form.
417
417
  */
@@ -457,7 +457,7 @@ export interface RaizWidgetSettingsInput {
457
457
  */
458
458
  fontFamily?: string;
459
459
  fontSize?: number;
460
- fontUrl?: RaizHttpsUrl | null;
460
+ fontUrl?: HttpsUrl | null;
461
461
  formTitle?: string;
462
462
  greeting?: string;
463
463
  /**
@@ -477,7 +477,7 @@ export interface RaizWidgetSettingsInput {
477
477
  * The CSS font-family of `headingFont: custom`.
478
478
  */
479
479
  headingFontFamily?: string;
480
- headingFontUrl?: RaizHttpsUrl | null;
480
+ headingFontUrl?: HttpsUrl | null;
481
481
  /**
482
482
  * The headings' weight, from 300 (light) to 800 (heavy).
483
483
  */
@@ -530,7 +530,7 @@ export interface RaizWidgetSettingsInput {
530
530
  * A color in `#RRGGBB` form.
531
531
  */
532
532
  primaryColor?: string;
533
- privacyUrl?: RaizHttpsUrl | null;
533
+ privacyUrl?: HttpsUrl | null;
534
534
  /**
535
535
  * Also serve the widget on its own hosted page, outside any embedding site.
536
536
  */
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object } from "../../_/index.js";
4
- import { RaizBusinessHoursCodec, } from "../models.js";
4
+ import { RaizBusinessHoursCodec } from "../models.js";
5
5
  export const RaizChannelCodec = object([
6
6
  ["businessHours", null, () => RaizBusinessHoursCodec],
7
7
  ["createdAt", null, instant],
@@ -14,12 +14,13 @@ export interface Client {
14
14
  *
15
15
  * Give a WhatsApp conversation the AI handed to the team back to the AI,
16
16
  * which continues the contact's pending request now, though the contact has
17
- * not written. `note` tells the Agent what changed; the contact never sees
18
- * it. Only while WhatsApp's 24-hour window is open (WHATSAPP_WINDOW_CLOSED
19
- * otherwise, and nothing changes), once per handoff
20
- * (HANDOFF_ALREADY_CONTINUED), and only for a conversation the AI handed off
21
- * (CONVERSATION_NOT_HANDED_OFF). Not an AI tool: it makes the Agent write to
22
- * a real person.
17
+ * not written. Review the resolved blocker first; use expectedVersion and
18
+ * expectedHandoffMessageId to refuse a stale decision with VERSION_CONFLICT.
19
+ * `note` preserves the evidence and remaining request for the Agent. Only
20
+ * inside WhatsApp's 24-hour window, once per handoff, and for an AI handoff.
21
+ * Preserve explicit human requests, unresolved clinical/administrative
22
+ * decisions, identity conflicts and uncertain writes with the team. Not an AI
23
+ * tool: it makes the Agent write to a real person.
23
24
  */
24
25
  continue(request: ContinueRequest, options?: RequestOptions): Promise<ContinueResponse>;
25
26
  /**
@@ -109,9 +110,23 @@ export interface ContinueRequest {
109
110
  */
110
111
  conversationId: string;
111
112
  /**
112
- * A short note for the Agent about what changed (for example «Ya se pueden
113
- * agendar potenciales visuales»). The Agent reads it; the contact never sees
114
- * it.
113
+ * The humanReviewMessageId just reviewed by the operator. A different current
114
+ * handoff refuses the continuation with VERSION_CONFLICT, without resuming or
115
+ * sending anything. Use with expectedVersion after checking that the original
116
+ * blocker is resolved.
117
+ */
118
+ expectedHandoffMessageId?: string;
119
+ /**
120
+ * The `version` you read. When present, the change applies only if nobody
121
+ * changed the resource since; otherwise it fails with VERSION_CONFLICT.
122
+ */
123
+ expectedVersion?: number;
124
+ /**
125
+ * A short internal note about the resolved blocker, authoritative evidence,
126
+ * confirmed appointments and any remaining request. A note does not establish
127
+ * coverage, clinical equivalence, consent or a booking. Preserve explicit
128
+ * human requests and unresolved clinical decisions, identity conflicts or
129
+ * uncertain writes with the team.
115
130
  */
116
131
  note?: string;
117
132
  }
@@ -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, ContinueRequest, ContinueResponse, CountRequest, CountResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizConversation, RaizConversationCount, RaizConversationDiagnostics, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizMessage, RaizMessagePage, RaizSignedUrl, } from "./models.js";
5
+ export type { RaizConversation, RaizConversationCount, RaizConversationDiagnostics, RaizConversationGroup, RaizConversationOutcomeCounts, RaizConversationPage, RaizConversationToolCalls, RaizConversationToolFailure, RaizConversationWorker, RaizMessage, RaizMessagePage, } from "./models.js";
@@ -1,5 +1,5 @@
1
- import type { PageInfo } from "../../models.js";
2
- import { type RaizFact, type RaizHttpsUrl } from "../models.js";
1
+ import { type PageInfo, type SignedUrl } from "../../models.js";
2
+ import { type RaizFact } from "../models.js";
3
3
  export interface RaizConversation {
4
4
  agentId: string | null;
5
5
  agentName: string | null;
@@ -86,7 +86,7 @@ export interface RaizConversation {
86
86
  origin: "inbound" | "manual" | "api" | "campaign" | "import" | "test";
87
87
  outcome: "success" | "failure" | "unknown" | null;
88
88
  profileId: string | null;
89
- recording?: RaizSignedUrl | null;
89
+ recording?: SignedUrl | null;
90
90
  recordingAvailable: boolean;
91
91
  requestedBy: string | null;
92
92
  sentiment: "positive" | "neutral" | "negative" | null;
@@ -351,19 +351,8 @@ export interface RaizMessagePage {
351
351
  */
352
352
  pageInfo: PageInfo;
353
353
  }
354
- export interface RaizSignedUrl {
355
- /**
356
- * When the URL stops working.
357
- */
358
- expiresAt: Temporal.Instant;
359
- /**
360
- * The signed URL. Anyone holding it has access until it expires.
361
- */
362
- url: RaizHttpsUrl;
363
- }
364
354
  export declare const RaizConversationCodec: import("../../_/codec.js").Codec;
365
355
  export declare const RaizConversationPageCodec: import("../../_/codec.js").Codec;
366
356
  export declare const RaizConversationWorkerCodec: import("../../_/codec.js").Codec;
367
357
  export declare const RaizMessageCodec: import("../../_/codec.js").Codec;
368
358
  export declare const RaizMessagePageCodec: import("../../_/codec.js").Codec;
369
- export declare const RaizSignedUrlCodec: import("../../_/codec.js").Codec;
@@ -1,6 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object, union } from "../../_/index.js";
4
+ import { SignedUrlCodec } from "../../models.js";
4
5
  import { RaizFactCodec } from "../models.js";
5
6
  export const RaizConversationCodec = object([
6
7
  ["analyzedAt", null, instant],
@@ -10,7 +11,7 @@ export const RaizConversationCodec = object([
10
11
  ["facts", null, array(() => RaizFactCodec)],
11
12
  ["lastMessageAt", null, instant],
12
13
  ["messages", null, () => RaizMessagePageCodec],
13
- ["recording", null, () => RaizSignedUrlCodec],
14
+ ["recording", null, () => SignedUrlCodec],
14
15
  ["startedAt", null, instant],
15
16
  ["updatedAt", null, instant],
16
17
  ["workers", null, array(() => RaizConversationWorkerCodec)],
@@ -29,6 +30,3 @@ export const RaizMessageCodec = object([
29
30
  export const RaizMessagePageCodec = object([
30
31
  ["data", null, array(() => RaizMessageCodec)],
31
32
  ]);
32
- export const RaizSignedUrlCodec = object([
33
- ["expiresAt", null, instant],
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, } from "./client.js";
5
- export type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
5
+ export type { RaizAgentIntegrationProcedureInput, RaizAgentProcedureInput, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { RaizHttpsUrl, RaizResponseMetadata } from "../models.js";
2
+ import type { HttpsUrl } from "../../models.js";
3
+ import type { RaizResponseMetadata } from "../models.js";
3
4
  import { type RaizCrawlSettings, type RaizKnowledgeDocument, type RaizKnowledgeDocumentPage, type RaizKnowledgeFileInput, type RaizKnowledgePassagePage } from "./models.js";
4
5
  export interface ClientOptions extends BaseClientOptions {
5
6
  /**
@@ -83,7 +84,7 @@ export interface CreateRequest {
83
84
  * approved for this deployment; only same-origin pages under its path are
84
85
  * followed, and robots.txt is respected.
85
86
  */
86
- sourceUrl?: RaizHttpsUrl;
87
+ sourceUrl?: HttpsUrl;
87
88
  /**
88
89
  * A paused document is never searched; its index is kept.
89
90
  */
@@ -221,7 +222,7 @@ export interface UpdateRequest {
221
222
  * approved for this deployment; only same-origin pages under its path are
222
223
  * followed, and robots.txt is respected.
223
224
  */
224
- sourceUrl?: RaizHttpsUrl;
225
+ sourceUrl?: HttpsUrl;
225
226
  /**
226
227
  * A paused document is never searched; its index is kept.
227
228
  */
@@ -807,7 +807,14 @@ export interface RaizFailureResponse {
807
807
  data: {
808
808
  [key: string]: unknown;
809
809
  };
810
- message: "No voice line can place this call. Give an active outbound voice channel, or assign one to the Agent.";
810
+ message: "No voice line can place this call. Name an active outbound line of the organization with `from` or `channelId`, or assign one to the Agent.";
811
+ retryable: false;
812
+ } | {
813
+ code: "VOICE_NOT_AVAILABLE";
814
+ data: {
815
+ [key: string]: unknown;
816
+ };
817
+ message: "This voice is not available. Choose one from `listVoices`.";
811
818
  retryable: false;
812
819
  } | {
813
820
  code: "VOICE_NUMBER_IN_USE";
@@ -1047,7 +1054,6 @@ export interface RaizFailureResponse {
1047
1054
  metadata: RaizResponseMetadata;
1048
1055
  success: false;
1049
1056
  }
1050
- export type RaizHttpsUrl = string;
1051
1057
  export interface RaizOutsideHoursTemplate {
1052
1058
  /**
1053
1059
  * The template's language in WhatsApp's code, for example `es` or `es_MX`.
@@ -35,7 +35,7 @@ export interface RaizOrganization {
35
35
  phones: string[];
36
36
  recipients: RaizEmailAddress[];
37
37
  };
38
- productNotices?: {
38
+ productNotices: {
39
39
  administrators: RaizEmailAddress[];
40
40
  events: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "template-approved" | "template-rejected" | "weekly-summary")[];
41
41
  recipients: RaizEmailAddress[];
@@ -12,10 +12,13 @@ export interface Client {
12
12
  * Get a report
13
13
  *
14
14
  * Get the numbers behind a question. `name`: `conversations_daily`
15
- * (conversations the AI took part in, per day), `booking_outcomes` (verified
16
- * saved booking receipts by completion day and integration, excluding tests,
17
- * imports and deleted conversations; createdCount counts new appointments
18
- * created by the AI, not confirmations of existing appointments;
15
+ * (conversations the AI took part in, per day), `booking_details` (verified
16
+ * individual creation receipts with patient, specialty, appointments and
17
+ * later recorded cancellations; also requires conversation read/write
18
+ * permission; filter specialty by its recorded code), `booking_outcomes`
19
+ * (verified saved booking receipts by completion day and integration,
20
+ * excluding tests, imports and deleted conversations; createdCount counts new
21
+ * appointments created by the AI, not confirmations of existing appointments;
19
22
  * confirmedCount is its compatibility alias and must not be added again;
20
23
  * reschedules, cancellations, failures, pending and unverified results
21
24
  * separately), `tool_calls_daily` (Agent tool calls per day), `tool_calls`
@@ -37,6 +40,11 @@ export interface Client {
37
40
  export declare function createClient(options: ClientOptions): Client;
38
41
  export declare function bind(transport: Transport): Client;
39
42
  export interface GetRequest {
43
+ /**
44
+ * Only booking_details: exact specialty code recorded in the booking
45
+ * (case-insensitive). Omit to read all specialties.
46
+ */
47
+ specialty?: string;
40
48
  /**
41
49
  * Agent id.
42
50
  */
@@ -58,23 +66,30 @@ export interface GetRequest {
58
66
  /**
59
67
  * `conversations_daily`: conversations the AI took part in per day, Agent,
60
68
  * channel type and direction, with outcomes and escalations (filters
61
- * `agentId`, `channelType`). `booking_outcomes`: verified saved booking
62
- * receipts per completion day, Agent and integration, excluding
63
- * test/import/deleted conversations; confirmed new bookings, reschedules,
64
- * cancellations, failed, pending, unverified and duplicate receipts
65
- * separately (filter `agentId`). Historical evidence, not current appointment
66
- * status; hasMore requires splitting the range and returns no partial totals.
67
- * `tool_calls_daily`: tool calls per day, Agent and tool with
68
- * failures/durations (filter `agentId`). `tool_calls`: individual calls,
69
- * never inputs/outputs (filter `agentId`). `assessment_results_daily`:
70
- * assessments per day/definition (filter `definitionId`). `pqrsf_daily`:
71
- * classification, confirmed resolution and referral-link counts from the
72
- * pqrsf_* definitions, including pending/unclassified conversations,
73
- * excluding tests/imports/deleted records (filters `agentId`, `channelType`);
74
- * no measured filing reduction is inferred. `campaign_progress`: recipients
75
- * by status (filter `campaignId`; no dates).
69
+ * `agentId`, `channelType`). `booking_details`: individual patients and
70
+ * appointments from explicit successful creation receipts, including
71
+ * specialty, paired exams, deduplication, matched patient names and later
72
+ * recorded cancellations; filters agentId and specialty; requires
73
+ * conversation read/write permission too. Historical receipts with
74
+ * created=true, not current provider status or all provider protocols.
75
+ * unverifiedCount covers explicit creations missing a stable patient/slot.
76
+ * `booking_outcomes`: verified saved booking receipts per completion day,
77
+ * Agent and integration, excluding test/import/deleted conversations;
78
+ * confirmed new bookings, reschedules, cancellations, failed, pending,
79
+ * unverified and duplicate receipts separately (filter `agentId`). Historical
80
+ * evidence, not current appointment status; hasMore requires splitting the
81
+ * range and returns no partial totals. `tool_calls_daily`: tool calls per
82
+ * day, Agent and tool with failures/durations (filter `agentId`).
83
+ * `tool_calls`: individual calls, never inputs/outputs (filter `agentId`).
84
+ * `assessment_results_daily`: assessments per day/definition (filter
85
+ * `definitionId`). `pqrsf_daily`: classification, confirmed resolution and
86
+ * referral-link counts from the pqrsf_* definitions, including
87
+ * pending/unclassified conversations, excluding tests/imports/deleted records
88
+ * (filters `agentId`, `channelType`); no measured filing reduction is
89
+ * inferred. `campaign_progress`: recipients by status (filter `campaignId`;
90
+ * no dates).
76
91
  */
77
- name: "conversations_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "assessment_results_daily" | "campaign_progress";
92
+ name: "conversations_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress";
78
93
  /**
79
94
  * Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in
80
95
  * the organization's time zone.
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  const GetOperation = {
14
14
  method: "GET",
15
15
  route: "/v1/raiz/reports",
16
- query: { agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
16
+ query: { specialty: "specialty", agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
17
17
  response: object([["data", null, () => RaizReportCodec]]),
18
18
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
19
  };
@@ -92,6 +92,27 @@ export type RaizReport = {
92
92
  unverifiedCount: number;
93
93
  }[];
94
94
  to: Temporal.PlainDate;
95
+ } | {
96
+ from: Temporal.PlainDate;
97
+ hasMore: boolean;
98
+ name: "booking_details";
99
+ rows: {
100
+ appointmentDate: Temporal.PlainDate;
101
+ appointmentTime: string;
102
+ cancelledAt: Temporal.Instant | null;
103
+ conversationId: string;
104
+ createdAt: Temporal.Instant;
105
+ day: Temporal.PlainDate;
106
+ exam: string | null;
107
+ messageId: string;
108
+ patientDocument: string;
109
+ patientName: string | null;
110
+ professionalName: string | null;
111
+ specialty: string | null;
112
+ }[];
113
+ snapshotAt: Temporal.Instant;
114
+ to: Temporal.PlainDate;
115
+ unverifiedCount: number;
95
116
  } | {
96
117
  from: Temporal.PlainDate;
97
118
  hasMore: boolean;
@@ -1,4 +1,4 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, date, instant, object, union } from "../../_/index.js";
4
- export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
4
+ export const RaizReportCodec = union([object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["occurredAt", null, instant]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["appointmentDate", null, date], ["cancelledAt", null, instant], ["createdAt", null, instant], ["day", null, date]]))], ["snapshotAt", null, instant], ["to", null, date]]), object([["from", null, date], ["rows", null, array(object([["day", null, date]]))], ["to", null, date]])]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.31.0",
3
+ "version": "5.33.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",
@@ -49,7 +49,8 @@
49
49
  "typecheck": "tsc -p tsconfig.json --noEmit",
50
50
  "build": "rm -rf dist && tsc -p tsconfig.json",
51
51
  "test": "bun test ./tests",
52
- "verify": "bun run typecheck && bun run test && bun run build"
52
+ "verify": "bun run typecheck && bun run build",
53
+ "verify:with-tests": "bun run typecheck && bun run test && bun run build"
53
54
  },
54
55
  "devDependencies": {
55
56
  "typescript": "7.0.2"
@@ -57,8 +58,8 @@
57
58
  "packageManager": "bun@1.4.3",
58
59
  "arbol": {
59
60
  "openapi": {
60
- "release": "1.20261104.21009",
61
- "sha256": "831514a41a6ae6b57eb4f86971c3dc87b1ab333f03d62d789f04657c7b19def3"
61
+ "release": "1.20261105.5813",
62
+ "sha256": "608afec9826be487c1894d6251251afa6b6f329d8145fb1d1f26a306a8b7be26"
62
63
  }
63
64
  }
64
65
  }