@arbol-ai/sdk 5.73.0 → 5.74.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.
@@ -79,7 +79,15 @@ export interface Client {
79
79
  * (AGENT_WORKFLOW_INVALID). `status: paused` stops it from answering and
80
80
  * calling. `modality` changes only while it has no channels and no published
81
81
  * voice line (AGENT_MODALITY_LOCKED). A voice Agent republishes in the
82
- * background: check `synced`.
82
+ * background: check `synced`. The update applies to the working copy
83
+ * `get_agent` shows and publishes it; `publish: false` keeps it unpublished
84
+ * until `publish_agent`. While the branch has unpublished changes
85
+ * (`publication.unpublishedChanges`), an update that does not say `publish`
86
+ * is refused (AGENT_DRAFT_PENDING): `publish: true` publishes them with it,
87
+ * `publish: false` adds to them (AGENT_DRAFT_STALE: main was published
88
+ * meanwhile, read it again). With `branchId` it changes a candidate's content
89
+ * only (AGENT_BRANCH_FIELD for the Agent's own fields: name, description,
90
+ * status, modality, budgets and timers; AGENT_BRANCH_ENDED once it ended).
83
91
  */
84
92
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
85
93
  }
@@ -99,6 +107,11 @@ export interface GetRequest {
99
107
  * Agent id.
100
108
  */
101
109
  agentId: string;
110
+ /**
111
+ * Show this branch's working copy (its unpublished changes, or what it runs).
112
+ * Omitted: main.
113
+ */
114
+ branchId?: string;
102
115
  }
103
116
  export type GetResponse = RaizAgentResponse;
104
117
  export interface ListRequest {
@@ -31,6 +31,7 @@ const DeleteOperation = {
31
31
  const GetOperation = {
32
32
  method: "GET",
33
33
  route: "/v1/raiz/agents/{agentId}",
34
+ query: { branchId: "branchId" },
34
35
  response: RaizAgentResponseCodec,
35
36
  errors: { "400": true, "401": true, "403": true, "404": true, "429": true, "500": true, "502": true, "503": true, "504": true },
36
37
  };
@@ -1,6 +1,7 @@
1
1
  import type { InvalidInputFailure, PageInfo, ResponseMetadata, UpstreamUnavailableFailure } from "../../models.js";
2
- import { type RaizAgentInUseFailure, type RaizAgentIntegrationProcedureInput, type RaizAgentModalityLockedFailure, type RaizAgentProcedureInput, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizBusinessHours, type RaizEvalGateUnmetFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizVersionConflictFailure, type RaizVoiceUnavailableFailure } from "../models.js";
2
+ import { type RaizAgentBranchEndedFailure, type RaizAgentBranchFieldFailure, type RaizAgentDraftPendingFailure, type RaizAgentDraftStaleFailure, type RaizAgentInUseFailure, type RaizAgentIntegrationProcedureInput, type RaizAgentModalityLockedFailure, type RaizAgentProcedureInput, type RaizAgentProceduresInvalidFailure, type RaizAgentSettingsInvalidFailure, type RaizAgentWorkflowInvalidFailure, type RaizBusinessHours, type RaizEvalGateUnmetFailure, type RaizIntegrationProcedureUnavailableFailure, type RaizIntegrationToolUnavailableFailure, type RaizIntegrationsUnavailableFailure, type RaizInvalidCursorFailure, type RaizKnowledgeDocumentUnavailableFailure, type RaizVersionConflictFailure, type RaizVoiceUnavailableFailure } from "../models.js";
3
3
  export interface RaizAgent {
4
+ branchId: string | null;
4
5
  channelCount: number;
5
6
  /**
6
7
  * Channels assigned to the Agent. Assign one with `updateChannel`.
@@ -64,6 +65,16 @@ export interface RaizAgent {
64
65
  * complete new set.
65
66
  */
66
67
  procedures: RaizAgentProcedure[];
68
+ /**
69
+ * What the branch shown runs, and whether this view holds changes not
70
+ * published yet.
71
+ */
72
+ publication: {
73
+ draftStale: boolean;
74
+ unpublishedChanges: boolean;
75
+ version: number | null;
76
+ versionId: string | null;
77
+ };
67
78
  /**
68
79
  * Whether the Agent can hold conversations: active, with instructions and,
69
80
  * for voice, published for calls.
@@ -817,6 +828,12 @@ export interface RaizListAgentsServiceUnavailableError {
817
828
  }
818
829
  export type RaizListAgentsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizVoiceUnavailableFailure | RaizIntegrationsUnavailableFailure;
819
830
  export interface RaizUpdateAgentBody {
831
+ /**
832
+ * Change this candidate's content instead of main's. A candidate holds only
833
+ * content: its name, description, status, modality and the settings that take
834
+ * effect at once belong to the Agent (AGENT_BRANCH_FIELD).
835
+ */
836
+ branchId?: string;
820
837
  description?: string | null;
821
838
  /**
822
839
  * With the Agent's `settings.evalGate`: the completed evaluation run
@@ -863,6 +880,13 @@ export interface RaizUpdateAgentBody {
863
880
  * Keep each existing procedure's `id`; a new one may omit it.
864
881
  */
865
882
  procedures?: RaizAgentProcedureInput[];
883
+ /**
884
+ * Whether the change reaches conversations now (the default). `false` keeps
885
+ * it with the branch's other unpublished changes until `publishAgent`; the
886
+ * Agent's own fields (status, description, modality and the settings that
887
+ * take effect at once) still change now.
888
+ */
889
+ publish?: boolean;
866
890
  /**
867
891
  * How the Agent behaves. In an update, only the keys you send change: a key
868
892
  * left out stays and `null` returns it to its default. A key's own value,
@@ -902,7 +926,7 @@ export interface RaizUpdateAgentConflictError {
902
926
  metadata: ResponseMetadata;
903
927
  success: false;
904
928
  }
905
- export type RaizUpdateAgentConflictFailure = RaizAgentInUseFailure | RaizAgentModalityLockedFailure | RaizEvalGateUnmetFailure | RaizVersionConflictFailure;
929
+ export type RaizUpdateAgentConflictFailure = RaizAgentBranchEndedFailure | RaizAgentDraftPendingFailure | RaizAgentDraftStaleFailure | RaizAgentInUseFailure | RaizAgentModalityLockedFailure | RaizEvalGateUnmetFailure | RaizVersionConflictFailure;
906
930
  /**
907
931
  * A failed answer.
908
932
  */
@@ -928,7 +952,7 @@ export interface RaizUpdateAgentUnprocessableContentError {
928
952
  metadata: ResponseMetadata;
929
953
  success: false;
930
954
  }
931
- export type RaizUpdateAgentUnprocessableContentFailure = RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentSettingsInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure;
955
+ export type RaizUpdateAgentUnprocessableContentFailure = RaizAgentProceduresInvalidFailure | RaizAgentWorkflowInvalidFailure | RaizAgentBranchFieldFailure | RaizAgentSettingsInvalidFailure | RaizIntegrationProcedureUnavailableFailure | RaizIntegrationToolUnavailableFailure | RaizKnowledgeDocumentUnavailableFailure;
932
956
  export declare const RaizAgentCodec: import("../../_/codec.js").Codec;
933
957
  export declare const RaizAgentPageCodec: import("../../_/codec.js").Codec;
934
958
  export declare const RaizAgentPageResponseCodec: import("../../_/codec.js").Codec;
@@ -82,7 +82,10 @@ export interface Client {
82
82
  * Agent; WhatsApp outbound notifications do not. WhatsApp channels accept
83
83
  * `profile` (the business profile people see in WhatsApp); web channels
84
84
  * accept `widget` (the complete new widget configuration) and `widgetLogo`
85
- * (PNG, JPEG or WebP up to 256 KiB; `null` removes it). Omitted fields stay.
85
+ * (PNG, JPEG or WebP up to 256 KiB; `null` removes it). Staff only:
86
+ * `branchId` makes every call on a voice line run the Agent's active
87
+ * candidate, to try it by phone before it gets traffic (`null` returns the
88
+ * line to main). Omitted fields stay.
86
89
  */
87
90
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
88
91
  /**
@@ -2,4 +2,4 @@ export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, CreateRequest, CreateResponse, DeleteRequest, DeleteResponse, GetRequest, GetResponse, ListRequest, ListResponse, RenewSetupRequest, RenewSetupResponse, UpdateRequest, UpdateResponse, VerifyRequest, VerifyResponse, } from "./client.js";
5
- export type { RaizAgentNotTextFailure, RaizCallRejectedFailure, RaizChannel, RaizChannelAgent, RaizChannelAgentRequiredFailure, RaizChannelCreationInAppFailure, RaizChannelEndpointInUseFailure, RaizChannelPage, RaizChannelPageResponse, RaizChannelResponse, RaizContactUnreachableFailure, RaizConversationViewAuthorOnlyFailure, RaizConversationViewLimitReachedFailure, RaizConversationViewNameTakenFailure, RaizCreateChannelBadGatewayError, RaizCreateChannelBadGatewayFailure, RaizCreateChannelBadRequestError, RaizCreateChannelBadRequestFailure, RaizCreateChannelBody, RaizCreateChannelConflictError, RaizCreateChannelConflictFailure, RaizCreateChannelContentTooLargeError, RaizCreateChannelContentTooLargeFailure, RaizCreateChannelForbiddenError, RaizCreateChannelForbiddenFailure, RaizCreateChannelGatewayTimeoutError, RaizCreateChannelGatewayTimeoutFailure, RaizCreateChannelInternalServerErrorError, RaizCreateChannelInternalServerErrorFailure, RaizCreateChannelNotFoundError, RaizCreateChannelNotFoundFailure, RaizCreateChannelServiceUnavailableError, RaizCreateChannelServiceUnavailableFailure, RaizCreateChannelTooManyRequestsError, RaizCreateChannelTooManyRequestsFailure, RaizCreateChannelUnprocessableContentError, RaizCreateChannelUnprocessableContentFailure, RaizDeleteChannelBadGatewayError, RaizDeleteChannelBadGatewayFailure, RaizDeleteChannelBadRequestError, RaizDeleteChannelBadRequestFailure, RaizDeleteChannelConflictError, RaizDeleteChannelConflictFailure, RaizDeleteChannelForbiddenError, RaizDeleteChannelForbiddenFailure, RaizDeleteChannelGatewayTimeoutError, RaizDeleteChannelGatewayTimeoutFailure, RaizDeleteChannelInternalServerErrorError, RaizDeleteChannelInternalServerErrorFailure, RaizDeleteChannelNotFoundError, RaizDeleteChannelNotFoundFailure, RaizDeleteChannelServiceUnavailableError, RaizDeleteChannelServiceUnavailableFailure, RaizDeleteChannelTooManyRequestsError, RaizDeleteChannelTooManyRequestsFailure, RaizDeleteChannelUnprocessableContentError, RaizDeleteChannelUnprocessableContentFailure, RaizGetChannelServiceUnavailableError, RaizGetChannelServiceUnavailableFailure, RaizGetChannelTooManyRequestsError, RaizGetChannelTooManyRequestsFailure, RaizImportFileTooLargeError, RaizListChannelsBadRequestError, RaizListChannelsBadRequestFailure, RaizListChannelsServiceUnavailableError, RaizListChannelsServiceUnavailableFailure, RaizOutboundChannelInternalFailure, RaizOutboundChannelRefusedFailure, RaizOutsideContactHoursFailure, RaizProfileVariableMissingFailure, RaizProviderAccountExistsFailure, RaizProviderAccountInUseFailure, RaizProviderAccountMismatchFailure, RaizProviderAccountUnsupportedFailure, RaizProviderCredentialsRejectedFailure, RaizProviderSecretUnavailableFailure, RaizRenewChannelSetupConflictError, RaizRenewChannelSetupConflictFailure, RaizRenewChannelSetupTooManyRequestsError, RaizRenewChannelSetupTooManyRequestsFailure, RaizUpdateChannelBadGatewayError, RaizUpdateChannelBadGatewayFailure, RaizUpdateChannelBadRequestError, RaizUpdateChannelBadRequestFailure, RaizUpdateChannelBody, RaizUpdateChannelConflictError, RaizUpdateChannelConflictFailure, RaizUpdateChannelContentTooLargeError, RaizUpdateChannelContentTooLargeFailure, RaizUpdateChannelForbiddenError, RaizUpdateChannelForbiddenFailure, RaizUpdateChannelGatewayTimeoutError, RaizUpdateChannelGatewayTimeoutFailure, RaizUpdateChannelInternalServerErrorError, RaizUpdateChannelInternalServerErrorFailure, RaizUpdateChannelNotFoundError, RaizUpdateChannelNotFoundFailure, RaizUpdateChannelServiceUnavailableError, RaizUpdateChannelServiceUnavailableFailure, RaizUpdateChannelTooManyRequestsError, RaizUpdateChannelTooManyRequestsFailure, RaizUpdateChannelUnprocessableContentError, RaizUpdateChannelUnprocessableContentFailure, RaizVerifyChannelBody, RaizVerifyChannelConflictError, RaizVerifyChannelConflictFailure, RaizVerifyChannelServiceUnavailableError, RaizVerifyChannelServiceUnavailableFailure, RaizVerifyChannelTooManyRequestsError, RaizVerifyChannelTooManyRequestsFailure, RaizVoiceLineUnavailableFailure, RaizVoiceNotAvailableFailure, RaizVoiceNumberInUseFailure, RaizVoiceNumberNotOwnedFailure, RaizWhatsappAccountRestrictedFailure, RaizWhatsappChannelInternalFailure, RaizWhatsappChannelRefusedFailure, RaizWhatsappDeliveryUnconfirmedFailure, RaizWhatsappEngagementLimitedFailure, RaizWhatsappNotSentFailure, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetConflictFailure, RaizWidgetCopy, RaizWidgetField, RaizWidgetInternalFailure, RaizWidgetLimitReachedFailure, RaizWidgetPublication, RaizWidgetRefusedFailure, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, RaizWidgetVoiceUnheardFailure, } from "./models.js";
5
+ export type { RaizChannel, RaizChannelAgent, RaizChannelPage, RaizChannelPageResponse, RaizChannelResponse, RaizCreateChannelBadGatewayError, RaizCreateChannelBadGatewayFailure, RaizCreateChannelBadRequestError, RaizCreateChannelBadRequestFailure, RaizCreateChannelBody, RaizCreateChannelConflictError, RaizCreateChannelConflictFailure, RaizCreateChannelContentTooLargeError, RaizCreateChannelContentTooLargeFailure, RaizCreateChannelForbiddenError, RaizCreateChannelForbiddenFailure, RaizCreateChannelGatewayTimeoutError, RaizCreateChannelGatewayTimeoutFailure, RaizCreateChannelInternalServerErrorError, RaizCreateChannelInternalServerErrorFailure, RaizCreateChannelNotFoundError, RaizCreateChannelNotFoundFailure, RaizCreateChannelServiceUnavailableError, RaizCreateChannelServiceUnavailableFailure, RaizCreateChannelTooManyRequestsError, RaizCreateChannelTooManyRequestsFailure, RaizCreateChannelUnprocessableContentError, RaizCreateChannelUnprocessableContentFailure, RaizDeleteChannelBadGatewayError, RaizDeleteChannelBadGatewayFailure, RaizDeleteChannelBadRequestError, RaizDeleteChannelBadRequestFailure, RaizDeleteChannelConflictError, RaizDeleteChannelConflictFailure, RaizDeleteChannelForbiddenError, RaizDeleteChannelForbiddenFailure, RaizDeleteChannelGatewayTimeoutError, RaizDeleteChannelGatewayTimeoutFailure, RaizDeleteChannelInternalServerErrorError, RaizDeleteChannelInternalServerErrorFailure, RaizDeleteChannelNotFoundError, RaizDeleteChannelNotFoundFailure, RaizDeleteChannelServiceUnavailableError, RaizDeleteChannelServiceUnavailableFailure, RaizDeleteChannelTooManyRequestsError, RaizDeleteChannelTooManyRequestsFailure, RaizDeleteChannelUnprocessableContentError, RaizDeleteChannelUnprocessableContentFailure, RaizGetChannelServiceUnavailableError, RaizGetChannelServiceUnavailableFailure, RaizGetChannelTooManyRequestsError, RaizGetChannelTooManyRequestsFailure, RaizImportFileTooLargeError, RaizListChannelsBadRequestError, RaizListChannelsBadRequestFailure, RaizListChannelsServiceUnavailableError, RaizListChannelsServiceUnavailableFailure, RaizRenewChannelSetupConflictError, RaizRenewChannelSetupConflictFailure, RaizRenewChannelSetupTooManyRequestsError, RaizRenewChannelSetupTooManyRequestsFailure, RaizUpdateChannelBadGatewayError, RaizUpdateChannelBadGatewayFailure, RaizUpdateChannelBadRequestError, RaizUpdateChannelBadRequestFailure, RaizUpdateChannelBody, RaizUpdateChannelConflictError, RaizUpdateChannelConflictFailure, RaizUpdateChannelContentTooLargeError, RaizUpdateChannelContentTooLargeFailure, RaizUpdateChannelForbiddenError, RaizUpdateChannelForbiddenFailure, RaizUpdateChannelGatewayTimeoutError, RaizUpdateChannelGatewayTimeoutFailure, RaizUpdateChannelInternalServerErrorError, RaizUpdateChannelInternalServerErrorFailure, RaizUpdateChannelNotFoundError, RaizUpdateChannelNotFoundFailure, RaizUpdateChannelServiceUnavailableError, RaizUpdateChannelServiceUnavailableFailure, RaizUpdateChannelTooManyRequestsError, RaizUpdateChannelTooManyRequestsFailure, RaizUpdateChannelUnprocessableContentError, RaizUpdateChannelUnprocessableContentFailure, RaizVerifyChannelBody, RaizVerifyChannelConflictError, RaizVerifyChannelConflictFailure, RaizVerifyChannelServiceUnavailableError, RaizVerifyChannelServiceUnavailableFailure, RaizVerifyChannelTooManyRequestsError, RaizVerifyChannelTooManyRequestsFailure, RaizWidgetAgentChoice, RaizWidgetClientTool, RaizWidgetCopy, RaizWidgetField, RaizWidgetPublication, RaizWidgetSettings, RaizWidgetSettingsInput, RaizWidgetTranslations, } from "./models.js";