@arbol-ai/sdk 5.58.0 → 5.60.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 (49) hide show
  1. package/dist/account/billing/client.d.ts +23 -0
  2. package/dist/account/billing/client.js +18 -0
  3. package/dist/account/billing/index.d.ts +5 -0
  4. package/dist/account/billing/index.js +4 -0
  5. package/dist/account/billing/models.d.ts +97 -0
  6. package/dist/account/billing/models.js +13 -0
  7. package/dist/account/billingPortalSessions/client.d.ts +24 -0
  8. package/dist/account/billingPortalSessions/client.js +18 -0
  9. package/dist/account/billingPortalSessions/index.d.ts +5 -0
  10. package/dist/account/billingPortalSessions/index.js +4 -0
  11. package/dist/account/billingPortalSessions/models.d.ts +69 -0
  12. package/dist/account/billingPortalSessions/models.js +3 -0
  13. package/dist/account/client.d.ts +10 -0
  14. package/dist/account/client.js +25 -0
  15. package/dist/account/connections/models.d.ts +1 -1
  16. package/dist/account/index.d.ts +1 -1
  17. package/dist/account/models.d.ts +42 -0
  18. package/dist/account/usageSummary/client.d.ts +35 -0
  19. package/dist/account/usageSummary/client.js +19 -0
  20. package/dist/account/usageSummary/index.d.ts +5 -0
  21. package/dist/account/usageSummary/index.js +4 -0
  22. package/dist/account/usageSummary/models.d.ts +55 -0
  23. package/dist/account/usageSummary/models.js +10 -0
  24. package/dist/account/walletTopUps/client.d.ts +23 -0
  25. package/dist/account/walletTopUps/client.js +18 -0
  26. package/dist/account/walletTopUps/index.d.ts +5 -0
  27. package/dist/account/walletTopUps/index.js +4 -0
  28. package/dist/account/walletTopUps/models.d.ts +80 -0
  29. package/dist/account/walletTopUps/models.js +3 -0
  30. package/dist/account/walletTransactions/client.d.ts +36 -0
  31. package/dist/account/walletTransactions/client.js +19 -0
  32. package/dist/account/walletTransactions/index.d.ts +5 -0
  33. package/dist/account/walletTransactions/index.js +4 -0
  34. package/dist/account/walletTransactions/models.d.ts +78 -0
  35. package/dist/account/walletTransactions/models.js +13 -0
  36. package/dist/raiz/agents/models.d.ts +2 -0
  37. package/dist/raiz/channels/models.d.ts +7 -7
  38. package/dist/raiz/conversations/client.d.ts +89 -44
  39. package/dist/raiz/conversations/client.js +3 -3
  40. package/dist/raiz/conversations/index.d.ts +1 -1
  41. package/dist/raiz/conversations/models.d.ts +73 -2
  42. package/dist/raiz/conversations/models.js +6 -0
  43. package/dist/raiz/index.d.ts +1 -1
  44. package/dist/raiz/models.d.ts +43 -0
  45. package/dist/raiz/organization/models.d.ts +2 -0
  46. package/dist/raiz/reports/client.d.ts +36 -28
  47. package/dist/raiz/reports/models.d.ts +18 -0
  48. package/dist/raiz/reports/models.js +1 -1
  49. package/package.json +3 -3
@@ -1,5 +1,21 @@
1
1
  import { type InvalidInputFailure, type OutcomeUnknownFailure, type PageInfo, type RateLimitedFailure, type ResponseMetadata, type SignedUrl, type UpstreamUnavailableFailure } from "../../models.js";
2
- import { type RaizCallInProgressFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizFact, type RaizHandoffAlreadyContinuedFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizReplyInProgressFailure, type RaizResourceNotFoundFailure, type RaizTemplateHeaderFile, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizVersionConflictFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
2
+ import { type RaizAssigneeUnavailableFailure, type RaizCallInProgressFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizFact, type RaizHandoffAlreadyContinuedFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizReplyInProgressFailure, type RaizResourceNotFoundFailure, type RaizTeamUnavailableFailure, type RaizTemplateHeaderFile, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizVersionConflictFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface RaizAssigneeUnavailableError {
7
+ data: null;
8
+ /**
9
+ * That person cannot take conversations in this organization. `listAssignees`
10
+ * names who can.
11
+ */
12
+ error: RaizAssigneeUnavailableFailure;
13
+ /**
14
+ * What every answer carries besides its data or error.
15
+ */
16
+ metadata: ResponseMetadata;
17
+ success: false;
18
+ }
3
19
  /**
4
20
  * A failed answer.
5
21
  */
@@ -124,6 +140,9 @@ export interface RaizConversation {
124
140
  aiPausedBy: "agent" | "operator" | null;
125
141
  analysisErrorCode: string | null;
126
142
  analyzedAt: Temporal.Instant | null;
143
+ assignedAt: Temporal.Instant | null;
144
+ assignedBy: string | null;
145
+ assigneeId: string | null;
127
146
  campaignId: string | null;
128
147
  campaignRecipientId: string | null;
129
148
  channelAddress: string | null;
@@ -155,6 +174,13 @@ export interface RaizConversation {
155
174
  * that was not rejected).
156
175
  */
157
176
  facts: RaizFact[];
177
+ /**
178
+ * The case's history, oldest first: the handoff, who took it or was given it,
179
+ * the return to the AI, a person's pause or resume, and the closing. Present
180
+ * only when expanded. Who answered the contact is in `workers` and in each
181
+ * message's `memberId`.
182
+ */
183
+ history?: RaizConversationEvent[];
158
184
  /**
159
185
  * Conversation id.
160
186
  */
@@ -216,11 +242,18 @@ export interface RaizConversation {
216
242
  title: string | null;
217
243
  titleAuthor: "person" | "ai" | "system" | "import" | "provider" | null;
218
244
  toolCalls: RaizConversationToolCalls;
245
+ /**
246
+ * It closed for inactivity with a handoff nobody of the team answered. Such a
247
+ * conversation is also one to review (`toReview`).
248
+ */
249
+ unattended: boolean;
219
250
  /**
220
251
  * An instant in RFC 3339 format, in UTC.
221
252
  */
222
253
  updatedAt: Temporal.Instant;
223
254
  version: number;
255
+ waitingOn: "ai" | "team" | "contact" | null;
256
+ waitingSinceAt: Temporal.Instant | null;
224
257
  /**
225
258
  * Who works the conversation for the organization, in the order each first
226
259
  * wrote something the contact saw (those who have not yet, last): each Agent
@@ -272,6 +305,42 @@ export interface RaizConversationDiagnostics {
272
305
  status: "available" | "unavailable" | "not_recorded" | "not_applicable";
273
306
  terminationReasonPresent: boolean;
274
307
  }
308
+ export interface RaizConversationEvent {
309
+ /**
310
+ * For `assigned`: the member who has the case from then on.
311
+ */
312
+ assigneeId?: string;
313
+ /**
314
+ * An instant in RFC 3339 format, in UTC.
315
+ */
316
+ at: Temporal.Instant;
317
+ /**
318
+ * Who did it: a `person` of the organization, the `ai`, or the `system` (a
319
+ * rule, such as the inactivity close).
320
+ */
321
+ author: "person" | "ai" | "system" | "import" | "provider";
322
+ authorId: string | null;
323
+ /**
324
+ * For `returned_to_ai`: nobody of the team asked for it; an unanswered
325
+ * technical handoff came back by itself.
326
+ */
327
+ automatic?: boolean;
328
+ closeReason?: string | null;
329
+ /**
330
+ * `handed_off`: the AI passed the conversation to the team (`messageId` is
331
+ * its handoff message). `assigned`: a person took the case or was given it
332
+ * (`authorId` is who decided, `assigneeId` who has it, `previousAssigneeId`
333
+ * who had it). `unassigned`: it was left with nobody. `returned_to_ai`: the
334
+ * team gave it back to the AI. `ai_paused`, `ai_resumed`: a person paused or
335
+ * resumed the AI for the recipient. `closed`: it closed, with `closeReason`.
336
+ */
337
+ kind: "handed_off" | "assigned" | "unassigned" | "returned_to_ai" | "ai_paused" | "ai_resumed" | "closed";
338
+ /**
339
+ * Message id.
340
+ */
341
+ messageId?: string;
342
+ previousAssigneeId?: string | null;
343
+ }
275
344
  export interface RaizConversationGroup {
276
345
  averageDurationSeconds: number | null;
277
346
  averageMessageCount: number | null;
@@ -718,6 +787,7 @@ export interface RaizUpdateConversationBody {
718
787
  * this conversation after the last real answer.
719
788
  */
720
789
  aiPaused?: boolean;
790
+ assigneeId?: string | null;
721
791
  contactId?: string | null;
722
792
  /**
723
793
  * The `version` you read. When present, the change applies only if nobody
@@ -765,9 +835,10 @@ export interface RaizUpdateConversationServiceUnavailableError {
765
835
  metadata: ResponseMetadata;
766
836
  success: false;
767
837
  }
768
- export type RaizUpdateConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
838
+ export type RaizUpdateConversationServiceUnavailableFailure = UpstreamUnavailableFailure | RaizTeamUnavailableFailure | RaizIntegrationsUnavailableFailure;
769
839
  export declare const RaizContinueConversationBodyCodec: import("../../_/codec.js").Codec;
770
840
  export declare const RaizConversationCodec: import("../../_/codec.js").Codec;
841
+ export declare const RaizConversationEventCodec: import("../../_/codec.js").Codec;
771
842
  export declare const RaizConversationPageCodec: import("../../_/codec.js").Codec;
772
843
  export declare const RaizConversationPageResponseCodec: import("../../_/codec.js").Codec;
773
844
  export declare const RaizConversationResponseCodec: import("../../_/codec.js").Codec;
@@ -8,18 +8,24 @@ export const RaizContinueConversationBodyCodec = object([
8
8
  ]);
9
9
  export const RaizConversationCodec = object([
10
10
  ["analyzedAt", null, instant],
11
+ ["assignedAt", null, instant],
11
12
  ["createdAt", null, instant],
12
13
  ["deletedAt", null, instant],
13
14
  ["endedAt", null, instant],
14
15
  ["facts", null, array(() => RaizFactCodec)],
16
+ ["history", null, array(() => RaizConversationEventCodec)],
15
17
  ["lastMessageAt", null, instant],
16
18
  ["messages", null, () => RaizMessagePageCodec],
17
19
  ["outcomeReview", null, object([["reviewedAt", null, instant]])],
18
20
  ["recording", null, () => SignedUrlCodec],
19
21
  ["startedAt", null, instant],
20
22
  ["updatedAt", null, instant],
23
+ ["waitingSinceAt", null, instant],
21
24
  ["workers", null, array(() => RaizConversationWorkerCodec)],
22
25
  ]);
26
+ export const RaizConversationEventCodec = object([
27
+ ["at", null, instant],
28
+ ]);
23
29
  export const RaizConversationPageCodec = object([
24
30
  ["data", null, array(() => RaizConversationCodec)],
25
31
  ]);
@@ -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 { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizContactSuppressedFailure, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTemplateHeaderFile, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappAiPausedFailure, RaizWhatsappDeliveryFailedFailure, RaizWhatsappMarketingStoppedFailure, RaizWhatsappMediaRejectedFailure, RaizWhatsappMessageUnsupportedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappRecipientUnavailableFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
5
+ export type { RaizAddressInUseFailure, RaizAgentInUseFailure, RaizAgentIntegrationProcedureInput, RaizAgentModalityLockedFailure, RaizAgentProcedureInput, RaizAgentProceduresInvalidFailure, RaizAgentProceduresInvalidFailureData, RaizAgentSettingsInvalidFailure, RaizAgentWorkflowInvalidFailure, RaizAgentWorkflowInvalidFailureData, RaizAssigneeUnavailableFailure, RaizBulletinLimitReachedFailure, RaizBulletinPeriodInvalidFailure, RaizBusinessHours, RaizBusinessHoursWindow, RaizCallInProgressFailure, RaizCampaignAgentNotReadyFailure, RaizCampaignHeaderMissingFailure, RaizCampaignHeaderNotStoredFailure, RaizCampaignHeaderNotStoredFailureData, RaizCampaignNoRecipientsFailure, RaizCampaignVariableMissingFailure, RaizCampaignVariableMissingFailureData, RaizChannelAgentMismatchFailure, RaizChannelNotReadyFailure, RaizChannelTypeMismatchFailure, RaizContactHoursWindow, RaizContactSuppressedFailure, RaizConversationClosedFailure, RaizConversationNotHandedOffFailure, RaizConversationOpenFailure, RaizDailyReportInProgressFailure, RaizDailyReportRecipientsMissingFailure, RaizDefinitionNotActiveFailure, RaizDefinitionOptionsInvalidFailure, RaizDefinitionRetiredFailure, RaizDefinitionTypeLockedFailure, RaizEmailAddress, RaizEvalCasesUnavailableFailure, RaizEvalGateUnmetFailure, RaizFact, RaizFactSubjectMismatchFailure, RaizFactValueInvalidFailure, RaizFeedbackProposalUnavailableFailure, RaizHandoffAlreadyContinuedFailure, RaizIdentifierInUseFailure, RaizImportFileInvalidFailure, RaizImportFileTooLargeFailure, RaizIntegrationProcedureUnavailableFailure, RaizIntegrationToolUnavailableFailure, RaizIntegrationsUnavailableFailure, RaizInvalidCursorFailure, RaizInvalidStateFailure, RaizIpNetworkInvalidFailure, RaizKeyInUseFailure, RaizKnowledgeDocumentUnavailableFailure, RaizKnowledgeFileInvalidFailure, RaizKnowledgeKindMismatchFailure, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizProviderRejectedError, RaizProviderRejectedFailure, RaizReplyInProgressFailure, RaizReportFilterUnsupportedFailure, RaizReportRangeInvalidFailure, RaizResourceNotFoundError, RaizResourceNotFoundFailure, RaizSourceConversationOpenFailure, RaizSuppressionExistsFailure, RaizTask, RaizTaskNotRetryableFailure, RaizTaskResponse, RaizTeamUnavailableFailure, RaizTemplateHeaderFile, RaizTemplateHeaderMismatchFailure, RaizTemplateHeaderRequiredFailure, RaizTemplateNotApprovedFailure, RaizTemplateNotFoundFailure, RaizTemplateParametersMismatchFailure, RaizTemplateUnsupportedFailure, RaizTimeZoneUnknownFailure, RaizVersionConflictError, RaizVersionConflictFailure, RaizVoiceAgentNotReadyFailure, RaizVoiceUnavailableFailure, RaizWebsiteNotApprovedFailure, RaizWhatsappAiPausedFailure, RaizWhatsappDeliveryFailedFailure, RaizWhatsappMarketingStoppedFailure, RaizWhatsappMediaRejectedFailure, RaizWhatsappMessageUnsupportedFailure, RaizWhatsappRateLimitedFailure, RaizWhatsappRecipientUnavailableFailure, RaizWhatsappWindowClosedFailure, } from "./models.js";
@@ -324,6 +324,28 @@ export interface RaizAgentWorkflowInvalidFailureData {
324
324
  path: string;
325
325
  }[];
326
326
  }
327
+ /**
328
+ * That person cannot take conversations in this organization. `listAssignees`
329
+ * names who can.
330
+ */
331
+ export interface RaizAssigneeUnavailableFailure {
332
+ /**
333
+ * The failure code, stable across releases.
334
+ */
335
+ code: "ASSIGNEE_UNAVAILABLE";
336
+ /**
337
+ * No fields.
338
+ */
339
+ data: Empty;
340
+ /**
341
+ * What went wrong, for people; it never contains input values.
342
+ */
343
+ message: string;
344
+ /**
345
+ * Whether repeating the same request may succeed.
346
+ */
347
+ retryable: false;
348
+ }
327
349
  /**
328
350
  * The organization already has 30 bulletins in force or scheduled. End or
329
351
  * delete one before adding another.
@@ -1561,6 +1583,27 @@ export interface RaizTaskResponse {
1561
1583
  metadata: ResponseMetadata;
1562
1584
  success: true;
1563
1585
  }
1586
+ /**
1587
+ * The organization's team cannot be read right now. Try again shortly.
1588
+ */
1589
+ export interface RaizTeamUnavailableFailure {
1590
+ /**
1591
+ * The failure code, stable across releases.
1592
+ */
1593
+ code: "TEAM_UNAVAILABLE";
1594
+ /**
1595
+ * No fields.
1596
+ */
1597
+ data: Empty;
1598
+ /**
1599
+ * What went wrong, for people; it never contains input values.
1600
+ */
1601
+ message: string;
1602
+ /**
1603
+ * Whether repeating the same request may succeed.
1604
+ */
1605
+ retryable: true;
1606
+ }
1564
1607
  export interface RaizTemplateHeaderFile {
1565
1608
  /**
1566
1609
  * The file's bytes in base64, at most 5242880 bytes decoded.
@@ -77,6 +77,7 @@ export interface RaizOrganization {
77
77
  escalations: boolean;
78
78
  failedOutcomes: boolean;
79
79
  failures: boolean;
80
+ firstReplyMinutes: number;
80
81
  frequency: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours";
81
82
  phones: string[];
82
83
  recipients: RaizEmailAddress[];
@@ -202,6 +203,7 @@ export interface RaizUpdateOrganizationBody {
202
203
  escalations?: boolean | null;
203
204
  failedOutcomes?: boolean | null;
204
205
  failures?: boolean | null;
206
+ firstReplyMinutes?: number | null;
205
207
  frequency?: "immediate" | "hourly" | "every3Hours" | "every6Hours" | "every12Hours" | null;
206
208
  phones?: string[] | null;
207
209
  recipients?: RaizEmailAddress[] | null;
@@ -11,28 +11,32 @@ export interface Client {
11
11
  * Get a report
12
12
  *
13
13
  * Get the numbers behind a question. `name`: `conversations_daily`
14
- * (conversations the AI took part in, per day), `booking_details` (verified
15
- * individual creation receipts with patient, specialty, appointments and
16
- * later recorded cancellations; also requires conversation read/write
17
- * permission; filter specialty by its recorded code), `booking_outcomes`
18
- * (verified saved booking receipts by completion day and integration,
19
- * excluding tests, imports and deleted conversations; createdCount counts new
20
- * appointments created by the AI, not confirmations of existing appointments;
21
- * confirmedCount is its compatibility alias and must not be added again;
22
- * reschedules, cancellations, failures, pending and unverified results
23
- * separately), `tool_calls_daily` (Agent tool calls per day), `tool_calls`
24
- * (each call, newest first), `assessment_results_daily` (assessment results
25
- * per day), `pqrsf_daily` (PQRSF classification, confirmed informational
26
- * resolution and correct referrals from current pqrsf_* facts; unknown and
27
- * pending analysis remain visible; excludes tests/imports/deleted records),
28
- * each over days in the organization's time zone (`from`, `to`; the last 30
29
- * days by default), or `campaign_progress`. Narrow with `agentId`,
30
- * `channelType`, `campaignId` or `definitionId`; unsupported filters fail. At
31
- * most 1000 rows: `hasMore` means split the range or filter. Booking outcomes
32
- * return no partial totals when their evidence scan exceeds its bound.
33
- * Conversation success and completed tool calls never establish a booking;
34
- * these are historical receipts, not the provider's current appointment
35
- * status.
14
+ * (conversations the AI took part in, per day), `handoffs_daily` (the
15
+ * conversations the AI handed to the team per day, Agent and person: how many
16
+ * a person answered, how many within the organization's first-reply time and
17
+ * how soon on average, how many still wait, how many closed with nobody
18
+ * answering and how many went back to the AI; filter `agentId`),
19
+ * `booking_details` (verified individual creation receipts with patient,
20
+ * specialty, appointments and later recorded cancellations; also requires
21
+ * conversation read/write permission; filter specialty by its recorded code),
22
+ * `booking_outcomes` (verified saved booking receipts by completion day and
23
+ * integration, excluding tests, imports and deleted conversations;
24
+ * createdCount counts new appointments created by the AI, not confirmations
25
+ * of existing appointments; confirmedCount is its compatibility alias and
26
+ * must not be added again; reschedules, cancellations, failures, pending and
27
+ * unverified results separately), `tool_calls_daily` (Agent tool calls per
28
+ * day), `tool_calls` (each call, newest first), `assessment_results_daily`
29
+ * (assessment results per day), `pqrsf_daily` (PQRSF classification,
30
+ * confirmed informational resolution and correct referrals from current
31
+ * pqrsf_* facts; unknown and pending analysis remain visible; excludes
32
+ * tests/imports/deleted records), each over days in the organization's time
33
+ * zone (`from`, `to`; the last 30 days by default), or `campaign_progress`.
34
+ * Narrow with `agentId`, `channelType`, `campaignId` or `definitionId`;
35
+ * unsupported filters fail. At most 1000 rows: `hasMore` means split the
36
+ * range or filter. Booking outcomes return no partial totals when their
37
+ * evidence scan exceeds its bound. Conversation success and completed tool
38
+ * calls never establish a booking; these are historical receipts, not the
39
+ * provider's current appointment status.
36
40
  */
37
41
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
38
42
  }
@@ -68,11 +72,15 @@ export interface GetRequest {
68
72
  /**
69
73
  * `conversations_daily`: conversations the AI took part in per day, Agent,
70
74
  * channel type and direction, with outcomes and escalations (filters
71
- * `agentId`, `channelType`). `booking_details`: individual patients and
72
- * appointments from explicit successful creation receipts, including
73
- * specialty, paired exams, deduplication, matched patient names and later
74
- * recorded cancellations; filters agentId and specialty; requires
75
- * conversation read/write permission too. Historical receipts with
75
+ * `agentId`, `channelType`). `handoffs_daily`: the conversations the AI
76
+ * handed to the team, per day of the handoff, Agent and person (who answered
77
+ * first, else the case's owner), with how many were answered, answered in
78
+ * time, still waiting, closed unattended or returned to the AI, and the
79
+ * average seconds to the first answer (filter `agentId`). `booking_details`:
80
+ * individual patients and appointments from explicit successful creation
81
+ * receipts, including specialty, paired exams, deduplication, matched patient
82
+ * names and later recorded cancellations; filters agentId and specialty;
83
+ * requires conversation read/write permission too. Historical receipts with
76
84
  * created=true, not current provider status or all provider protocols.
77
85
  * unverifiedCount covers explicit creations missing a stable patient/slot.
78
86
  * `booking_outcomes`: verified saved booking receipts per completion day,
@@ -91,7 +99,7 @@ export interface GetRequest {
91
99
  * inferred. `campaign_progress`: recipients by status (filter `campaignId`;
92
100
  * no dates).
93
101
  */
94
- name: "conversations_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress";
102
+ name: "conversations_daily" | "handoffs_daily" | "pqrsf_daily" | "tool_calls_daily" | "tool_calls" | "booking_outcomes" | "booking_details" | "assessment_results_daily" | "campaign_progress";
95
103
  /**
96
104
  * Last day (`YYYY-MM-DD`), inclusive, of a daily report. Default: today in
97
105
  * the organization's time zone.
@@ -45,6 +45,24 @@ export type RaizReport = {
45
45
  toReviewCount: number;
46
46
  }[];
47
47
  to: Temporal.PlainDate;
48
+ } | {
49
+ from: Temporal.PlainDate;
50
+ hasMore: boolean;
51
+ name: "handoffs_daily";
52
+ rows: {
53
+ agentId: string | null;
54
+ agentName: string | null;
55
+ answeredCount: number;
56
+ answeredInTimeCount: number;
57
+ avgFirstReplySeconds: number | null;
58
+ day: Temporal.PlainDate;
59
+ handoffCount: number;
60
+ memberId: string | null;
61
+ returnedCount: number;
62
+ unattendedCount: number;
63
+ waitingCount: number;
64
+ }[];
65
+ to: Temporal.PlainDate;
48
66
  } | {
49
67
  from: Temporal.PlainDate;
50
68
  hasMore: boolean;
@@ -1,7 +1,7 @@
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([["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]])]);
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([["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]])]);
5
5
  export const RaizReportResponseCodec = object([
6
6
  ["data", null, () => RaizReportCodec],
7
7
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.58.0",
3
+ "version": "5.60.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.20261113.150152",
62
- "sha256": "5846d7f85161ffc99a3121a402c3da9d4715375f9ea331a74c815e682af08e8d"
61
+ "release": "1.20261114.221927",
62
+ "sha256": "aed83503451737d4e09f8f24d1bfeb840077d6a93bc3e0496595b4229fe7b2cc"
63
63
  }
64
64
  }
65
65
  }