@arbol-ai/sdk 5.57.0 → 5.59.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 (35) hide show
  1. package/dist/account/connections/models.d.ts +1 -1
  2. package/dist/gmedic/appointments/client.d.ts +7 -4
  3. package/dist/gmedic/appointments/index.d.ts +1 -1
  4. package/dist/gmedic/appointments/models.d.ts +59 -1
  5. package/dist/gmedic/availability/client.d.ts +8 -2
  6. package/dist/gmedic/availability/client.js +1 -1
  7. package/dist/gmedic/availability/index.d.ts +1 -1
  8. package/dist/gmedic/availability/models.d.ts +14 -1
  9. package/dist/gmedic/index.d.ts +1 -1
  10. package/dist/gmedic/models.d.ts +23 -0
  11. package/dist/oficlinic/appointments/client.d.ts +61 -38
  12. package/dist/oficlinic/appointments/index.d.ts +1 -1
  13. package/dist/oficlinic/appointments/models.d.ts +100 -38
  14. package/dist/oficlinic/patients/client.d.ts +7 -6
  15. package/dist/oficlinic/patients/models.d.ts +6 -4
  16. package/dist/raiz/agents/models.d.ts +2 -0
  17. package/dist/raiz/channels/models.d.ts +7 -7
  18. package/dist/raiz/conversations/client.d.ts +89 -44
  19. package/dist/raiz/conversations/client.js +3 -3
  20. package/dist/raiz/conversations/index.d.ts +1 -1
  21. package/dist/raiz/conversations/models.d.ts +73 -2
  22. package/dist/raiz/conversations/models.js +6 -0
  23. package/dist/raiz/index.d.ts +1 -1
  24. package/dist/raiz/models.d.ts +43 -0
  25. package/dist/raiz/organization/models.d.ts +2 -0
  26. package/dist/raiz/reports/client.d.ts +36 -28
  27. package/dist/raiz/reports/models.d.ts +18 -0
  28. package/dist/raiz/reports/models.js +1 -1
  29. package/dist/sanitas/affiliations/client.d.ts +9 -5
  30. package/dist/sanitas/affiliations/client.js +2 -2
  31. package/dist/sanitas/affiliations/index.d.ts +1 -1
  32. package/dist/sanitas/affiliations/models.d.ts +23 -12
  33. package/dist/sanitas/affiliations/models.js +7 -3
  34. package/dist/sanitas/models.d.ts +2 -1
  35. package/package.json +3 -3
@@ -164,6 +164,30 @@ export interface OficlinicAppointmentReschedule {
164
164
  */
165
165
  status: "completed" | "partial";
166
166
  }
167
+ /**
168
+ * A value the booking needs could not be resolved from the provider's own data,
169
+ * so the caller must supply it: a contract, a relationship, a list status, an
170
+ * authorization number, a salary range the regime lists, or the billing values.
171
+ * Nothing was written.
172
+ */
173
+ export interface OficlinicBookingValueUnresolvedFailure {
174
+ /**
175
+ * The failure code, stable across releases.
176
+ */
177
+ code: "BOOKING_VALUE_UNRESOLVED";
178
+ /**
179
+ * No fields.
180
+ */
181
+ data: Empty;
182
+ /**
183
+ * What went wrong, for people; it never contains input values.
184
+ */
185
+ message: string;
186
+ /**
187
+ * Whether repeating the same request may succeed.
188
+ */
189
+ retryable: false;
190
+ }
167
191
  /**
168
192
  * A failed answer.
169
193
  */
@@ -207,11 +231,13 @@ export interface OficlinicCancelAppointmentBody {
207
231
  */
208
232
  documentType: "CC";
209
233
  /**
210
- * A key the caller chooses once per intended write, such as a UUID. Repeating
211
- * it with the same request answers the recorded outcome and never writes
212
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
234
+ * Optional. Without it the service derives the key from the request itself,
235
+ * so repeating the identical request answers the recorded outcome and never
236
+ * writes again. A caller that retries with changed values can choose one key
237
+ * per intended write, such as a UUID; another request with it answers
238
+ * IDEMPOTENCY_KEY_REUSED.
213
239
  */
214
- idempotencyKey: string;
240
+ idempotencyKey?: string;
215
241
  }
216
242
  /**
217
243
  * A failed answer.
@@ -312,10 +338,15 @@ export interface OficlinicCreateAppointmentBody {
312
338
  */
313
339
  agentMode?: boolean;
314
340
  /**
315
- * Billing values of the clinic's tariff matrix. Never guessed: the caller
316
- * supplies them as the clinic's workflow defines them.
341
+ * Billing values of the booking screen. Leave the whole object out and the
342
+ * service resolves them as the screen does: tariff from the payer's tariff
343
+ * matrix for the flow's service under the plan and subplan; billPrivately,
344
+ * billCopayments and enteredCopayment from the payer's row;
345
+ * copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
346
+ * classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
347
+ * When given, every value is sent exactly as given and nothing is resolved.
317
348
  */
318
- billing: {
349
+ billing?: {
319
350
  billCopayments: string | null;
320
351
  billPrivately: string | null;
321
352
  copaymentPercentage: string | null;
@@ -329,14 +360,15 @@ export interface OficlinicCreateAppointmentBody {
329
360
  };
330
361
  /**
331
362
  * Coverage and clinical classification codes, as the clinic's own provider
332
- * catalogs define them. Never guessed: the caller supplies them.
363
+ * catalogs define them. regime and affiliateType are never guessed: the
364
+ * caller supplies them. The rest has the defaults each field states.
333
365
  */
334
366
  classification: {
335
367
  affiliateType: string;
336
- attentionTypeId: string;
368
+ attentionTypeId?: string;
337
369
  listStatus?: string | null;
338
- programId: string;
339
- purposeId: string;
370
+ programId?: string;
371
+ purposeId?: string;
340
372
  regime: string;
341
373
  relationship?: string | null;
342
374
  salaryRange?: string | null;
@@ -352,7 +384,12 @@ export interface OficlinicCreateAppointmentBody {
352
384
  connectionId?: string;
353
385
  /**
354
386
  * A contract of the payer from list_payer_contracts, which must not be
355
- * inactive; null (the default) sends none.
387
+ * inactive. An explicit null sends none. Leaving the key out is not the same
388
+ * as null: the service then sends the payer's only contract when
389
+ * list_payer_contracts has exactly one that is not inactive and marks it
390
+ * active, sends none when the payer has no contract or only inactive ones,
391
+ * and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
392
+ * unrecognized active flag).
356
393
  */
357
394
  contractId?: string | null;
358
395
  /**
@@ -370,31 +407,38 @@ export interface OficlinicCreateAppointmentBody {
370
407
  */
371
408
  flowId: string;
372
409
  /**
373
- * A key the caller chooses once per intended write, such as a UUID. Repeating
374
- * it with the same request answers the recorded outcome and never writes
375
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
410
+ * Optional. Without it the service derives the key from the request itself,
411
+ * so repeating the identical request answers the recorded outcome and never
412
+ * writes again. A caller that retries with changed values can choose one key
413
+ * per intended write, such as a UUID; another request with it answers
414
+ * IDEMPOTENCY_KEY_REUSED.
376
415
  */
377
- idempotencyKey: string;
416
+ idempotencyKey?: string;
378
417
  /**
379
418
  * Observations sent as pObservaciones, accents removed and uppercased; null
380
419
  * (the default) sends none.
381
420
  */
382
421
  observations?: string | null;
383
422
  /**
384
- * The flow's payer, repeated as a check.
423
+ * The payer the availability flow was opened for. Left out: that payer. When
424
+ * given it must be that payer.
385
425
  */
386
- payerId: string;
426
+ payerId?: string;
387
427
  /**
388
428
  * A plan of the payer, from list_payer_plans.
389
429
  */
390
430
  planId: string;
391
- referral: {
431
+ /**
432
+ * Referral values of the booking screen. Left out: no requesting
433
+ * professional, no authorization number and requestedByUser false.
434
+ */
435
+ referral?: {
392
436
  authorizationNumber?: string | null;
393
437
  requestedByUser?: boolean;
394
438
  requestingProfessionalId?: string | null;
395
439
  };
396
440
  /**
397
- * A slot id from list_booking_slots in the same flow.
441
+ * A slot id from search_booking_slots or list_booking_slots in the same flow.
398
442
  */
399
443
  slotId: string;
400
444
  /**
@@ -479,7 +523,7 @@ export interface OficlinicCreateAppointmentUnprocessableContentError {
479
523
  metadata: ResponseMetadata;
480
524
  success: false;
481
525
  }
482
- export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
526
+ export type OficlinicCreateAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
483
527
  /**
484
528
  * A failed answer.
485
529
  */
@@ -666,10 +710,15 @@ export interface OficlinicRescheduleAppointmentBody {
666
710
  */
667
711
  agentMode?: boolean;
668
712
  /**
669
- * Billing values of the clinic's tariff matrix. Never guessed: the caller
670
- * supplies them as the clinic's workflow defines them.
713
+ * Billing values of the booking screen. Leave the whole object out and the
714
+ * service resolves them as the screen does: tariff from the payer's tariff
715
+ * matrix for the flow's service under the plan and subplan; billPrivately,
716
+ * billCopayments and enteredCopayment from the payer's row;
717
+ * copaymentPercentage, maxCopayment and indicatedModeratorFee from the row of
718
+ * classification.salaryRange; exempt 0, courtOrder 0 and markExempt false.
719
+ * When given, every value is sent exactly as given and nothing is resolved.
671
720
  */
672
- billing: {
721
+ billing?: {
673
722
  billCopayments: string | null;
674
723
  billPrivately: string | null;
675
724
  copaymentPercentage: string | null;
@@ -687,14 +736,15 @@ export interface OficlinicRescheduleAppointmentBody {
687
736
  };
688
737
  /**
689
738
  * Coverage and clinical classification codes, as the clinic's own provider
690
- * catalogs define them. Never guessed: the caller supplies them.
739
+ * catalogs define them. regime and affiliateType are never guessed: the
740
+ * caller supplies them. The rest has the defaults each field states.
691
741
  */
692
742
  classification: {
693
743
  affiliateType: string;
694
- attentionTypeId: string;
744
+ attentionTypeId?: string;
695
745
  listStatus?: string | null;
696
- programId: string;
697
- purposeId: string;
746
+ programId?: string;
747
+ purposeId?: string;
698
748
  regime: string;
699
749
  relationship?: string | null;
700
750
  salaryRange?: string | null;
@@ -710,7 +760,12 @@ export interface OficlinicRescheduleAppointmentBody {
710
760
  connectionId?: string;
711
761
  /**
712
762
  * A contract of the payer from list_payer_contracts, which must not be
713
- * inactive; null (the default) sends none.
763
+ * inactive. An explicit null sends none. Leaving the key out is not the same
764
+ * as null: the service then sends the payer's only contract when
765
+ * list_payer_contracts has exactly one that is not inactive and marks it
766
+ * active, sends none when the payer has no contract or only inactive ones,
767
+ * and answers BOOKING_VALUE_UNRESOLVED otherwise (several contracts, or an
768
+ * unrecognized active flag).
714
769
  */
715
770
  contractId?: string | null;
716
771
  /**
@@ -728,31 +783,38 @@ export interface OficlinicRescheduleAppointmentBody {
728
783
  */
729
784
  flowId: string;
730
785
  /**
731
- * A key the caller chooses once per intended write, such as a UUID. Repeating
732
- * it with the same request answers the recorded outcome and never writes
733
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
786
+ * Optional. Without it the service derives the key from the request itself,
787
+ * so repeating the identical request answers the recorded outcome and never
788
+ * writes again. A caller that retries with changed values can choose one key
789
+ * per intended write, such as a UUID; another request with it answers
790
+ * IDEMPOTENCY_KEY_REUSED.
734
791
  */
735
- idempotencyKey: string;
792
+ idempotencyKey?: string;
736
793
  /**
737
794
  * Observations sent as pObservaciones, accents removed and uppercased; null
738
795
  * (the default) sends none.
739
796
  */
740
797
  observations?: string | null;
741
798
  /**
742
- * The flow's payer, repeated as a check.
799
+ * The payer the availability flow was opened for. Left out: that payer. When
800
+ * given it must be that payer.
743
801
  */
744
- payerId: string;
802
+ payerId?: string;
745
803
  /**
746
804
  * A plan of the payer, from list_payer_plans.
747
805
  */
748
806
  planId: string;
749
- referral: {
807
+ /**
808
+ * Referral values of the booking screen. Left out: no requesting
809
+ * professional, no authorization number and requestedByUser false.
810
+ */
811
+ referral?: {
750
812
  authorizationNumber?: string | null;
751
813
  requestedByUser?: boolean;
752
814
  requestingProfessionalId?: string | null;
753
815
  };
754
816
  /**
755
- * A slot id from list_booking_slots in the same flow.
817
+ * A slot id from search_booking_slots or list_booking_slots in the same flow.
756
818
  */
757
819
  slotId: string;
758
820
  /**
@@ -837,7 +899,7 @@ export interface OficlinicRescheduleAppointmentUnprocessableContentError {
837
899
  metadata: ResponseMetadata;
838
900
  success: false;
839
901
  }
840
- export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicProgramUnitsNotSupportedFailure;
902
+ export type OficlinicRescheduleAppointmentUnprocessableContentFailure = CredentialsRejectedFailure | OficlinicContextNotAvailableFailure | OficlinicProviderIdentityMismatchFailure | OficlinicBookingValueUnresolvedFailure | OficlinicProgramUnitsNotSupportedFailure;
841
903
  /**
842
904
  * The service is not configured for the selected professional.
843
905
  */
@@ -13,12 +13,13 @@ export interface Client {
13
13
  * Create one new patient in e-Oficlinic using the clinic-confirmed legal
14
14
  * identity, contact and classification fields. Use only with verified
15
15
  * authority to register this person and explicit confirmation of their
16
- * details. Requires confirm true and one idempotency key for this intent. An
17
- * existing patient is never changed. An uncertain result must be checked with
18
- * lookup_patient and must not be sent again. The result contains no patient
19
- * data. Verify the saved patient with lookup_patient before attempting a
20
- * booking. The submission follows the live-verified Cardiología scheduling
21
- * form. agentMode true answers concise Spanish text instead.
16
+ * details. Requires confirm true; repeating the identical request answers the
17
+ * recorded outcome, with no idempotency key needed. An existing patient is
18
+ * never changed. An uncertain result must be checked with lookup_patient and
19
+ * must not be sent again. The result contains no patient data. Verify the
20
+ * saved patient with lookup_patient before attempting a booking. The
21
+ * submission follows the live-verified Cardiología scheduling form. agentMode
22
+ * true answers concise Spanish text instead.
22
23
  */
23
24
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
24
25
  /**
@@ -63,11 +63,13 @@ export interface OficlinicCreatePatientBody {
63
63
  */
64
64
  genderId: string;
65
65
  /**
66
- * A key the caller chooses once per intended write, such as a UUID. Repeating
67
- * it with the same request answers the recorded outcome and never writes
68
- * again; another request with it answers IDEMPOTENCY_KEY_REUSED.
66
+ * Optional. Without it the service derives the key from the request itself,
67
+ * so repeating the identical request answers the recorded outcome and never
68
+ * writes again. A caller that retries with changed values can choose one key
69
+ * per intended write, such as a UUID; another request with it answers
70
+ * IDEMPOTENCY_KEY_REUSED.
69
71
  */
70
- idempotencyKey: string;
72
+ idempotencyKey?: string;
71
73
  /**
72
74
  * The confirmed municipality code from the provider's catalog.
73
75
  */
@@ -383,6 +383,7 @@ export interface RaizAgentSettings {
383
383
  } | null;
384
384
  replyChoices: boolean | null;
385
385
  sessionCloseAfterMinutes: number | null;
386
+ teamCloseAfterMinutes: number | null;
386
387
  temperature: number | null;
387
388
  toolDiscovery: boolean | null;
388
389
  voice: RaizAgentVoiceSettings | null;
@@ -427,6 +428,7 @@ export interface RaizAgentSettingsInput {
427
428
  } | null;
428
429
  replyChoices?: boolean | null;
429
430
  sessionCloseAfterMinutes?: number | null;
431
+ teamCloseAfterMinutes?: number | null;
430
432
  temperature?: number | null;
431
433
  toolDiscovery?: boolean | null;
432
434
  voice?: RaizAgentVoiceSettings | null;
@@ -1,5 +1,5 @@
1
1
  import type { Empty, ForbiddenFailure, HttpsUrl, InternalFailure, InvalidInputFailure, OutcomeUnknownFailure, PageInfo, RateLimitedFailure, RequestTooLargeFailure, ResponseMetadata, UpstreamTimeoutFailure, UpstreamUnavailableFailure } from "../../models.js";
2
- import { type RaizAddressInUseFailure, type RaizAgentInUseFailure, type RaizAgentModalityLockedFailure, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizBulletinLimitReachedFailure, type RaizBulletinPeriodInvalidFailure, type RaizBusinessHours, type RaizCallInProgressFailure, type RaizCampaignAgentNotReadyFailure, type RaizCampaignHeaderMissingFailure, type RaizCampaignHeaderNotStoredFailure, type RaizCampaignNoRecipientsFailure, type RaizCampaignVariableMissingFailure, type RaizChannelAgentMismatchFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizDailyReportInProgressFailure, type RaizDailyReportRecipientsMissingFailure, type RaizDefinitionNotActiveFailure, type RaizDefinitionOptionsInvalidFailure, type RaizDefinitionRetiredFailure, type RaizDefinitionTypeLockedFailure, type RaizEvalCasesUnavailableFailure, type RaizEvalGateUnmetFailure, type RaizFactSubjectMismatchFailure, type RaizFactValueInvalidFailure, type RaizFeedbackProposalUnavailableFailure, type RaizHandoffAlreadyContinuedFailure, type RaizIdentifierInUseFailure, type RaizImportFileInvalidFailure, type RaizImportFileTooLargeFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizIpNetworkInvalidFailure, type RaizKeyInUseFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizKnowledgeFileInvalidFailure, type RaizKnowledgeKindMismatchFailure, type RaizPhoneNumber, type RaizProviderRejectedFailure, type RaizReplyInProgressFailure, type RaizReportFilterUnsupportedFailure, type RaizReportRangeInvalidFailure, type RaizResourceNotFoundFailure, type RaizSourceConversationOpenFailure, type RaizSuppressionExistsFailure, type RaizTaskNotRetryableFailure, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizTimeZoneUnknownFailure, type RaizVersionConflictFailure, type RaizVoiceAgentNotReadyFailure, type RaizVoiceUnavailableFailure, type RaizWebsiteNotApprovedFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
2
+ import { type RaizAddressInUseFailure, type RaizAgentInUseFailure, type RaizAgentModalityLockedFailure, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizAssigneeUnavailableFailure, type RaizBulletinLimitReachedFailure, type RaizBulletinPeriodInvalidFailure, type RaizBusinessHours, type RaizCallInProgressFailure, type RaizCampaignAgentNotReadyFailure, type RaizCampaignHeaderMissingFailure, type RaizCampaignHeaderNotStoredFailure, type RaizCampaignNoRecipientsFailure, type RaizCampaignVariableMissingFailure, type RaizChannelAgentMismatchFailure, type RaizChannelNotReadyFailure, type RaizChannelTypeMismatchFailure, type RaizContactSuppressedFailure, type RaizConversationClosedFailure, type RaizConversationNotHandedOffFailure, type RaizConversationOpenFailure, type RaizDailyReportInProgressFailure, type RaizDailyReportRecipientsMissingFailure, type RaizDefinitionNotActiveFailure, type RaizDefinitionOptionsInvalidFailure, type RaizDefinitionRetiredFailure, type RaizDefinitionTypeLockedFailure, type RaizEvalCasesUnavailableFailure, type RaizEvalGateUnmetFailure, type RaizFactSubjectMismatchFailure, type RaizFactValueInvalidFailure, type RaizFeedbackProposalUnavailableFailure, type RaizHandoffAlreadyContinuedFailure, type RaizIdentifierInUseFailure, type RaizImportFileInvalidFailure, type RaizImportFileTooLargeFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizInvalidStateFailure, type RaizIpNetworkInvalidFailure, type RaizKeyInUseFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizKnowledgeFileInvalidFailure, type RaizKnowledgeKindMismatchFailure, type RaizPhoneNumber, type RaizProviderRejectedFailure, type RaizReplyInProgressFailure, type RaizReportFilterUnsupportedFailure, type RaizReportRangeInvalidFailure, type RaizResourceNotFoundFailure, type RaizSourceConversationOpenFailure, type RaizSuppressionExistsFailure, type RaizTaskNotRetryableFailure, type RaizTeamUnavailableFailure, type RaizTemplateHeaderMismatchFailure, type RaizTemplateHeaderRequiredFailure, type RaizTemplateNotApprovedFailure, type RaizTemplateNotFoundFailure, type RaizTemplateParametersMismatchFailure, type RaizTemplateUnsupportedFailure, type RaizTimeZoneUnknownFailure, type RaizVersionConflictFailure, type RaizVoiceAgentNotReadyFailure, type RaizVoiceUnavailableFailure, type RaizWebsiteNotApprovedFailure, type RaizWhatsappAiPausedFailure, type RaizWhatsappDeliveryFailedFailure, type RaizWhatsappMarketingStoppedFailure, type RaizWhatsappMediaRejectedFailure, type RaizWhatsappMessageUnsupportedFailure, type RaizWhatsappRateLimitedFailure, type RaizWhatsappRecipientUnavailableFailure, type RaizWhatsappWindowClosedFailure } from "../models.js";
3
3
  /**
4
4
  * Only a text Agent can hold a web conversation; a voice Agent only with
5
5
  * `origin: test`, to try it by text.
@@ -472,7 +472,7 @@ export interface RaizCreateChannelServiceUnavailableError {
472
472
  metadata: ResponseMetadata;
473
473
  success: false;
474
474
  }
475
- export type RaizCreateChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
475
+ export type RaizCreateChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizTeamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
476
476
  /**
477
477
  * A failed answer.
478
478
  */
@@ -498,7 +498,7 @@ export interface RaizCreateChannelUnprocessableContentError {
498
498
  metadata: ResponseMetadata;
499
499
  success: false;
500
500
  }
501
- export type RaizCreateChannelUnprocessableContentFailure = RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
501
+ export type RaizCreateChannelUnprocessableContentFailure = RaizAssigneeUnavailableFailure | RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
502
502
  /**
503
503
  * A failed answer.
504
504
  */
@@ -602,7 +602,7 @@ export interface RaizDeleteChannelServiceUnavailableError {
602
602
  metadata: ResponseMetadata;
603
603
  success: false;
604
604
  }
605
- export type RaizDeleteChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
605
+ export type RaizDeleteChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizTeamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
606
606
  /**
607
607
  * A failed answer.
608
608
  */
@@ -628,7 +628,7 @@ export interface RaizDeleteChannelUnprocessableContentError {
628
628
  metadata: ResponseMetadata;
629
629
  success: false;
630
630
  }
631
- export type RaizDeleteChannelUnprocessableContentFailure = RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
631
+ export type RaizDeleteChannelUnprocessableContentFailure = RaizAssigneeUnavailableFailure | RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
632
632
  /**
633
633
  * A failed answer.
634
634
  */
@@ -1100,7 +1100,7 @@ export interface RaizUpdateChannelServiceUnavailableError {
1100
1100
  metadata: ResponseMetadata;
1101
1101
  success: false;
1102
1102
  }
1103
- export type RaizUpdateChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
1103
+ export type RaizUpdateChannelServiceUnavailableFailure = UpstreamUnavailableFailure | RaizTeamUnavailableFailure | RaizCampaignHeaderNotStoredFailure | RaizVoiceUnavailableFailure | RaizFeedbackProposalUnavailableFailure | RaizIntegrationsUnavailableFailure;
1104
1104
  /**
1105
1105
  * A failed answer.
1106
1106
  */
@@ -1126,7 +1126,7 @@ export interface RaizUpdateChannelUnprocessableContentError {
1126
1126
  metadata: ResponseMetadata;
1127
1127
  success: false;
1128
1128
  }
1129
- export type RaizUpdateChannelUnprocessableContentFailure = RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
1129
+ export type RaizUpdateChannelUnprocessableContentFailure = RaizAssigneeUnavailableFailure | RaizContactUnreachableFailure | RaizDailyReportRecipientsMissingFailure | RaizDefinitionOptionsInvalidFailure | RaizFactSubjectMismatchFailure | RaizFactValueInvalidFailure | RaizImportFileInvalidFailure | RaizIpNetworkInvalidFailure | RaizProfileVariableMissingFailure | RaizTimeZoneUnknownFailure | RaizCampaignHeaderMissingFailure | RaizCampaignVariableMissingFailure | RaizChannelAgentMismatchFailure | RaizTemplateHeaderMismatchFailure | RaizTemplateHeaderRequiredFailure | RaizTemplateParametersMismatchFailure | RaizTemplateUnsupportedFailure | RaizWhatsappMediaRejectedFailure | RaizWhatsappMessageUnsupportedFailure | RaizWhatsappRecipientUnavailableFailure | RaizCallRejectedFailure | RaizProviderAccountUnsupportedFailure | RaizProviderCredentialsRejectedFailure | RaizVoiceNotAvailableFailure | RaizVoiceNumberNotOwnedFailure | RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizBulletinPeriodInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure | RaizKnowledgeFileInvalidFailure | RaizKnowledgeKindMismatchFailure | RaizWebsiteNotApprovedFailure | RaizWidgetVoiceUnheardFailure | RaizProviderRejectedFailure;
1130
1130
  export interface RaizVerifyChannelBody {
1131
1131
  /**
1132
1132
  * Phone number in E.164 format.
@@ -33,11 +33,12 @@ export interface Client {
33
33
  * at least that many match. `averageMessageCount` and
34
34
  * `averageDurationSeconds` are their average length. `groupBy` also divides
35
35
  * them, largest group first, each with its outcomes: by `outcome`, `status`,
36
- * `channel`, `agent`, `sentiment`, `tool` (which Agent tools they used, and
37
- * in how many a tool failed), `toolError` (why calls of `toolName` failed) or
38
- * `fact:<definition key>` (such as the reason for contact). Use it to answer
39
- * how many conversations match, or how they divide, instead of paging through
40
- * the list; for volumes per day use `get_report`.
36
+ * `channel`, `agent`, `sentiment`, `waitingOn` (who each open conversation
37
+ * waits for: the AI, the team or the contact), `tool` (which Agent tools they
38
+ * used, and in how many a tool failed), `toolError` (why calls of `toolName`
39
+ * failed) or `fact:<definition key>` (such as the reason for contact). Use it
40
+ * to answer how many conversations match, or how they divide, instead of
41
+ * paging through the list; for volumes per day use `get_report`.
41
42
  */
42
43
  count(request?: CountRequest, options?: RequestOptions): Promise<CountResponse>;
43
44
  /**
@@ -55,12 +56,15 @@ export interface Client {
55
56
  * (`workers`: each Agent and the team, and who answers now), title, summary,
56
57
  * outcome, sentiment and current facts. Add `expand=messages` for the
57
58
  * transcript, oldest first, each message with its author, the Agent's tool
58
- * calls and quoted replies (continue with `messagesCursor`), and
59
- * `expand=recording` for a short-lived link to the call recording. Staff may
60
- * also request `expand=diagnostics` for bounded live call-termination
61
- * evidence; this additionally requires raiz:staff:operate and never changes
62
- * the conversation. The `review-conversation` skill explains how to read and
63
- * summarize one.
59
+ * calls and quoted replies (continue with `messagesCursor`),
60
+ * `expand=recording` for a short-lived link to the call recording, and
61
+ * `expand=history` for the case's history: the handoff to the team, who took
62
+ * it or was given it, the return to the AI and the closing. `waitingOn` says
63
+ * who an open conversation waits for (the AI, the team or the contact) and
64
+ * `assigneeId` who has its case. Staff may also request `expand=diagnostics`
65
+ * for bounded live call-termination evidence; this additionally requires
66
+ * raiz:staff:operate and never changes the conversation. The
67
+ * `review-conversation` skill explains how to read and summarize one.
64
68
  */
65
69
  get(request: GetRequest, options?: RequestOptions): Promise<GetResponse>;
66
70
  /**
@@ -70,23 +74,26 @@ export interface Client {
70
74
  * counterpart or subject), `agentId`, `channelId`, `channelType`, `status`,
71
75
  * `conversationDirection`, `origin`, `outcome`, `sentiment`, `handling` (`ai`
72
76
  * or `team`: whether the AI takes part; `escalated`: handed to the team by
73
- * the AI), `worker` (`ai` or `team`: who answers it now), the Agent's tools
74
- * (`toolName`, `toolStatus`: which tool it called and how the call ended), a
75
- * captured fact (`factDefinition`, `factValue`), `assessment` (`failed` or
76
- * `passed`), `toReview` (evaluated failures or unresolved handoffs;
77
- * explicitly resolved successes leave this queue), length (`messagesMin`,
78
- * `messagesMax`, `durationMin`, `durationMax`), `campaignId`, `profileId`,
79
- * `requestedBy` and start time (`startedAfter`, `startedBefore`); `q`
80
- * searches participant identities (names, profile names, usernames, phones,
81
- * emails and documents), visible messages, titles, summaries and exact
82
- * conversation references; `count_conversations` counts every match. Each
83
- * item already carries its title, summary, outcome, sentiment, workers and
84
- * tool calls (how many, how many failed, the latest failure), often enough to
85
- * answer. `sort`: `started` (newest first), `last_message` (latest activity
86
- * first) or `changed`, the feed of status, outcome and analysis changes,
87
- * oldest first, that systems poll from a saved `pageInfo.nextCursor` (a
88
- * deleted conversation appears once with `deletedAt`). Next:
89
- * `get_conversation` for a transcript.
77
+ * the AI), `worker` (`ai` or `team`: who answers it now), `waitingOn` (`ai`,
78
+ * `team` or `contact`: who an open conversation waits for; `team` lists the
79
+ * cases a person has to answer), `assignee` (a member id, `me` or `none`:
80
+ * whose case it is), `unattended` (closed with a handoff nobody of the team
81
+ * answered), the Agent's tools (`toolName`, `toolStatus`: which tool it
82
+ * called and how the call ended), a captured fact (`factDefinition`,
83
+ * `factValue`), `assessment` (`failed` or `passed`), `toReview` (evaluated
84
+ * failures or unresolved handoffs; explicitly resolved successes leave this
85
+ * queue), length (`messagesMin`, `messagesMax`, `durationMin`,
86
+ * `durationMax`), `campaignId`, `profileId`, `requestedBy` and start time
87
+ * (`startedAfter`, `startedBefore`); `q` searches participant identities
88
+ * (names, profile names, usernames, phones, emails and documents), visible
89
+ * messages, titles, summaries and exact conversation references;
90
+ * `count_conversations` counts every match. Each item already carries its
91
+ * title, summary, outcome, sentiment, workers and tool calls (how many, how
92
+ * many failed, the latest failure), often enough to answer. `sort`: `started`
93
+ * (newest first), `last_message` (latest activity first) or `changed`, the
94
+ * feed of status, outcome and analysis changes, oldest first, that systems
95
+ * poll from a saved `pageInfo.nextCursor` (a deleted conversation appears
96
+ * once with `deletedAt`). Next: `get_conversation` for a transcript.
90
97
  */
91
98
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
92
99
  /**
@@ -108,16 +115,19 @@ export interface Client {
108
115
  /**
109
116
  * Update a conversation
110
117
  *
111
- * Change a conversation's title, summary, metadata, contact or subject, or
112
- * close it (`status: closed`), which starts its analysis. A title or summary
113
- * written here always wins over the generated one. A call closes by itself
114
- * (CALL_IN_PROGRESS); a web chat cannot close while the Agent is replying
115
- * (REPLY_IN_PROGRESS, retry shortly). On WhatsApp, `aiEnabled` activates or
116
- * pauses AI only for this open conversation and leaves future episodes
117
- * unchanged; `aiPaused` pauses or resumes the Agent for this person until
118
- * their open conversation closes. Activating or resuming answers what the
119
- * contact wrote after the last real answer, the team's or the Agent's (a wait
120
- * notice is not one).
118
+ * Change a conversation's title, summary, metadata, contact or subject, give
119
+ * its case to a person of the organization (`assigneeId`: a member id from
120
+ * `listAssignees`, `me`, or `null` for nobody; its new owner is told by
121
+ * email), or close it (`status: closed`), which starts its analysis. A title
122
+ * or summary written here always wins over the generated one. A call closes
123
+ * by itself (CALL_IN_PROGRESS); a web chat cannot close while the Agent is
124
+ * replying (REPLY_IN_PROGRESS, retry shortly). On WhatsApp, `aiEnabled`
125
+ * activates or pauses AI only for this open conversation and leaves future
126
+ * episodes unchanged; `aiPaused` pauses or resumes the Agent for this person
127
+ * until their open conversation closes (one a person handles closes by itself
128
+ * after the Agent's `teamCloseAfterMinutes` without messages). Activating or
129
+ * resuming answers what the contact wrote after the last real answer, the
130
+ * team's or the Agent's (a wait notice is not one).
121
131
  */
122
132
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
123
133
  }
@@ -178,6 +188,23 @@ export interface CountRequest {
178
188
  * then handed to people is `team` while open.
179
189
  */
180
190
  worker?: "ai" | "team";
191
+ /**
192
+ * Open conversations by who they wait for, as each conversation's `waitingOn`
193
+ * says: `ai`, `team` (the team's cases to answer) or `contact`. Closed
194
+ * conversations never match.
195
+ */
196
+ waitingOn?: "ai" | "team" | "contact";
197
+ /**
198
+ * Conversations by the case's owner: a member id, `me` (the person calling)
199
+ * or `none` (nobody has it). With `waitingOn=team`: one person's cases to
200
+ * answer, or the ones nobody took.
201
+ */
202
+ assignee?: string;
203
+ /**
204
+ * `true`: conversations that closed for inactivity with a handoff nobody of
205
+ * the team answered.
206
+ */
207
+ unattended?: boolean;
181
208
  /**
182
209
  * Comma-separated origins.
183
210
  */
@@ -284,11 +311,12 @@ export interface CountRequest {
284
311
  */
285
312
  durationMax?: number;
286
313
  /**
287
- * `outcome`, `status`, `channel` (type), `agent`, `sentiment`, `tool` (each
288
- * Agent tool and the conversations that used it; null for those that used
289
- * none), `toolError` (failed calls, of `toolName` when given, by error) or
290
- * `fact:<definition key>` (the current value of that definition, such as the
291
- * reason for contact).
314
+ * `outcome`, `status`, `channel` (type), `agent`, `sentiment`, `waitingOn`
315
+ * (who each open conversation waits for: `ai`, `team` or `contact`; null for
316
+ * the closed ones), `tool` (each Agent tool and the conversations that used
317
+ * it; null for those that used none), `toolError` (failed calls, of
318
+ * `toolName` when given, by error) or `fact:<definition key>` (the current
319
+ * value of that definition, such as the reason for contact).
292
320
  */
293
321
  groupBy?: string;
294
322
  }
@@ -307,7 +335,7 @@ export interface GetRequest {
307
335
  conversationId: string;
308
336
  /**
309
337
  * Related data to include, comma-separated: `messages`, `recording`,
310
- * `diagnostics`.
338
+ * `diagnostics`, `history`.
311
339
  */
312
340
  expand?: string;
313
341
  /**
@@ -386,6 +414,23 @@ export interface ListRequest {
386
414
  * then handed to people is `team` while open.
387
415
  */
388
416
  worker?: "ai" | "team";
417
+ /**
418
+ * Open conversations by who they wait for, as each conversation's `waitingOn`
419
+ * says: `ai`, `team` (the team's cases to answer) or `contact`. Closed
420
+ * conversations never match.
421
+ */
422
+ waitingOn?: "ai" | "team" | "contact";
423
+ /**
424
+ * Conversations by the case's owner: a member id, `me` (the person calling)
425
+ * or `none` (nobody has it). With `waitingOn=team`: one person's cases to
426
+ * answer, or the ones nobody took.
427
+ */
428
+ assignee?: string;
429
+ /**
430
+ * `true`: conversations that closed for inactivity with a handoff nobody of
431
+ * the team answered.
432
+ */
433
+ unattended?: boolean;
389
434
  /**
390
435
  * Comma-separated origins.
391
436
  */