@arbol-ai/sdk 5.63.0 → 5.64.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.
@@ -11,6 +11,7 @@ import { type Client as OrganizationsClient } from "./organizations/client.js";
11
11
  import { type Client as PermissionsClient } from "./permissions/client.js";
12
12
  import { type Client as RegistryInstallationsClient } from "./registryInstallations/client.js";
13
13
  import { type Client as RolesClient } from "./roles/client.js";
14
+ import { type Client as ServersClient } from "./servers/client.js";
14
15
  import { type Client as UsageSummaryClient } from "./usageSummary/client.js";
15
16
  import { type Client as WalletTopUpsClient } from "./walletTopUps/client.js";
16
17
  import { type Client as WalletTransactionsClient } from "./walletTransactions/client.js";
@@ -33,6 +34,7 @@ export interface Client {
33
34
  readonly permissions: PermissionsClient;
34
35
  readonly registryInstallations: RegistryInstallationsClient;
35
36
  readonly roles: RolesClient;
37
+ readonly servers: ServersClient;
36
38
  readonly usageSummary: UsageSummaryClient;
37
39
  readonly walletTopUps: WalletTopUpsClient;
38
40
  readonly walletTransactions: WalletTransactionsClient;
@@ -13,6 +13,7 @@ import { bind as bindOrganizations, } from "./organizations/client.js";
13
13
  import { bind as bindPermissions, } from "./permissions/client.js";
14
14
  import { bind as bindRegistryInstallations, } from "./registryInstallations/client.js";
15
15
  import { bind as bindRoles, } from "./roles/client.js";
16
+ import { bind as bindServers, } from "./servers/client.js";
16
17
  import { bind as bindUsageSummary, } from "./usageSummary/client.js";
17
18
  import { bind as bindWalletTopUps, } from "./walletTopUps/client.js";
18
19
  import { bind as bindWalletTransactions, } from "./walletTransactions/client.js";
@@ -32,6 +33,7 @@ export function bind(transport) {
32
33
  let permissionsClient;
33
34
  let registryInstallationsClient;
34
35
  let rolesClient;
36
+ let serversClient;
35
37
  let usageSummaryClient;
36
38
  let walletTopUpsClient;
37
39
  let walletTransactionsClient;
@@ -72,6 +74,9 @@ export function bind(transport) {
72
74
  get roles() {
73
75
  return (rolesClient ??= bindRoles(transport));
74
76
  },
77
+ get servers() {
78
+ return (serversClient ??= bindServers(transport));
79
+ },
75
80
  get usageSummary() {
76
81
  return (usageSummaryClient ??= bindUsageSummary(transport));
77
82
  },
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { AccountConnectionPageResponse } from "./models.js";
2
+ import type { Empty } from "../../models.js";
3
+ import type { AccountConnectionPageResponse, AccountRefreshConnectionResultResponse } from "./models.js";
3
4
  export interface ClientOptions extends BaseClientOptions {
4
5
  /**
5
6
  * The URL the paths of the API are relative to.
@@ -14,6 +15,18 @@ export interface Client {
14
15
  * custom servers) with the tools each offers an agent and their version.
15
16
  */
16
17
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
18
+ /**
19
+ * Read a custom server's tools again now
20
+ *
21
+ * Read the organization's own server again now, as Account does by itself
22
+ * every 30 minutes, so a deploy of the server reaches its agents at their
23
+ * next turn. What a tool says and takes follows the server. A new tool, or
24
+ * one that now writes or writes through more integrations, waits for Arbol
25
+ * staff and counts as held, as its writes do until Arbol verifies the
26
+ * server's domain. A server's deploy calls this with an API key holding
27
+ * account:connections:write.
28
+ */
29
+ refresh(request: RefreshRequest, options?: RequestOptions): Promise<RefreshResponse>;
17
30
  }
18
31
  export declare function createClient(options: ClientOptions): Client;
19
32
  export declare function bind(transport: Transport): Client;
@@ -37,3 +50,12 @@ export interface ListRequest {
37
50
  tag?: "postconsulta" | "facturacion";
38
51
  }
39
52
  export type ListResponse = AccountConnectionPageResponse;
53
+ export interface RefreshRequest {
54
+ /**
55
+ * A connection's id: con_ and 26 characters, stable and unique across the
56
+ * platform.
57
+ */
58
+ connectionId: string;
59
+ body: Empty;
60
+ }
61
+ export type RefreshResponse = AccountRefreshConnectionResultResponse;
@@ -7,6 +7,7 @@ export function createClient(options) {
7
7
  export function bind(transport) {
8
8
  return {
9
9
  list: (request, options) => transport.send(ListOperation, request, options),
10
+ refresh: (request, options) => transport.send(RefreshOperation, request, options),
10
11
  };
11
12
  }
12
13
  const ListOperation = {
@@ -16,3 +17,10 @@ const ListOperation = {
16
17
  response: null,
17
18
  errors: { "400": true, "401": true, "403": true, "429": true, "500": true, "502": true, "503": true, "504": true },
18
19
  };
20
+ const RefreshOperation = {
21
+ method: "POST",
22
+ route: "/v1/account/connections/{connectionId}/refresh",
23
+ body: "nested",
24
+ response: null,
25
+ errors: { "400": true, "401": true, "403": true, "404": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
26
+ };
@@ -1,5 +1,5 @@
1
1
  export { ApiError } from "../../_/index.js";
2
2
  export type { RequestOptions } from "../../_/index.js";
3
3
  export { createClient } from "./client.js";
4
- export type { Client, ClientOptions, ListRequest, ListResponse, } from "./client.js";
5
- export type { AccountConnection, AccountConnectionPage, AccountConnectionPageResponse, } from "./models.js";
4
+ export type { Client, ClientOptions, ListRequest, ListResponse, RefreshRequest, RefreshResponse, } from "./client.js";
5
+ export type { AccountConnectionNotFoundError, AccountConnectionNotFoundFailure, AccountConnectionPage, AccountConnectionPageResponse, AccountIntegrationUnsupportedError, AccountIntegrationUnsupportedFailure, AccountRefreshConnectionResult, AccountRefreshConnectionResultResponse, } from "./models.js";
@@ -1,112 +1,40 @@
1
- import type { PageInfo, ResponseMetadata } from "../../models.js";
2
- export interface AccountConnection {
1
+ import type { Empty, PageInfo, ResponseMetadata } from "../../models.js";
2
+ import type { AccountConnection } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface AccountConnectionNotFoundError {
7
+ data: null;
3
8
  /**
4
- * Whether Arbi, the organization's assistant, may use this connection. On
5
- * until someone turns it off.
9
+ * This connection does not exist.
6
10
  */
7
- arbi: {
8
- enabled: boolean;
9
- };
10
- errorCode: string | null;
11
+ error: AccountConnectionNotFoundFailure;
11
12
  /**
12
- * Its settings by name. Every caller reads a custom server's; only staff read
13
- * an Arbol integration's, which is empty for other callers.
13
+ * What every answer carries besides its data or error.
14
14
  */
15
- fields: {
16
- [key: string]: unknown;
17
- };
15
+ metadata: ResponseMetadata;
16
+ success: false;
17
+ }
18
+ /**
19
+ * This connection does not exist.
20
+ */
21
+ export interface AccountConnectionNotFoundFailure {
18
22
  /**
19
- * A connection's id: con_ and 26 characters, stable and unique across the
20
- * platform.
23
+ * The failure code, stable across releases.
21
24
  */
22
- id: string;
23
- /**
24
- * sura, visoft, agenda, or a custom server's name.
25
- */
26
- integration: string;
27
- kind: "arbol" | "custom";
28
- /**
29
- * Staff only; empty for other callers.
30
- */
31
- logins: {
32
- login: number;
33
- username: string | null;
34
- verifiedAt: string | null;
35
- }[];
36
- name: string;
37
- /**
38
- * Which of the provider's independent sites this connection reaches.
39
- */
40
- portal?: string;
41
- /**
42
- * Its WhatsApp appointment reminders, or null when its integration cannot
43
- * feed them. Until someone changes them they are off, at 09:00, the day
44
- * before.
45
- */
46
- reminders: {
47
- daysBefore: number;
48
- mode: "off" | "review" | "automatic";
49
- sendAt: string;
50
- } | null;
51
- server: {
52
- authHeader: string | null;
53
- fileArgument: string | null;
54
- transport: "http" | "mcp";
55
- url: string;
56
- } | null;
57
- /**
58
- * A custom server's skills: procedures its document publishes beside its
59
- * tools.
60
- */
61
- skills?: {
62
- description: string;
63
- instructions: string;
64
- name: string;
65
- }[];
66
- /**
67
- * active: agents may use it. disabled: turned off. failed: agents cannot use
68
- * it until Arbol's team reviews it.
69
- */
70
- status: "active" | "disabled" | "failed";
71
- summary: string | null;
72
- /**
73
- * The workflow labels assigned to this connection.
74
- */
75
- tags?: ("postconsulta" | "facturacion")[];
76
- tools: {
77
- capabilities?: {
78
- match: "any" | "all";
79
- scopes: string[];
80
- };
81
- description: string;
82
- effect: "read" | "write";
83
- input: {
84
- [key: string]: unknown;
85
- };
86
- name: string;
87
- operation?: string;
88
- rest?: {
89
- method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
90
- path: string;
91
- };
92
- rpcMethod?: string | null;
93
- runtimeInputs?: ("connectionId" | "channel" | "conversationUrl" | "verifiedContact" | "outboundRecipient")[];
94
- writesThrough?: string[];
95
- }[];
96
- /**
97
- * The release version (arbol) or the SHA-256 of the stored tool list
98
- * (custom).
25
+ code: "CONNECTION_NOT_FOUND";
26
+ /**
27
+ * No fields.
99
28
  */
100
- toolsVersion: string;
101
- updatedAt: string | null;
29
+ data: Empty;
102
30
  /**
103
- * Staff only; empty for other callers.
31
+ * What went wrong, for people; it never contains input values.
104
32
  */
105
- username: string | null;
33
+ message: string;
106
34
  /**
107
- * Staff only; empty for other callers.
35
+ * Whether repeating the same request may succeed.
108
36
  */
109
- verifiedAt: string | null;
37
+ retryable: false;
110
38
  }
111
39
  export interface AccountConnectionPage {
112
40
  /**
@@ -134,3 +62,76 @@ export interface AccountConnectionPageResponse {
134
62
  metadata: ResponseMetadata;
135
63
  success: true;
136
64
  }
65
+ /**
66
+ * A failed answer.
67
+ */
68
+ export interface AccountIntegrationUnsupportedError {
69
+ data: null;
70
+ /**
71
+ * This integration's connections are not managed from Account.
72
+ */
73
+ error: AccountIntegrationUnsupportedFailure;
74
+ /**
75
+ * What every answer carries besides its data or error.
76
+ */
77
+ metadata: ResponseMetadata;
78
+ success: false;
79
+ }
80
+ /**
81
+ * This integration's connections are not managed from Account.
82
+ */
83
+ export interface AccountIntegrationUnsupportedFailure {
84
+ /**
85
+ * The failure code, stable across releases.
86
+ */
87
+ code: "INTEGRATION_UNSUPPORTED";
88
+ /**
89
+ * No fields.
90
+ */
91
+ data: Empty;
92
+ /**
93
+ * What went wrong, for people; it never contains input values.
94
+ */
95
+ message: string;
96
+ /**
97
+ * Whether repeating the same request may succeed.
98
+ */
99
+ retryable: false;
100
+ }
101
+ export interface AccountRefreshConnectionResult {
102
+ /**
103
+ * A connection's id: con_ and 26 characters, stable and unique across the
104
+ * platform.
105
+ */
106
+ connectionId: string;
107
+ /**
108
+ * How many tools the server offers that wait for Arbol staff: new ones, ones
109
+ * that now write or write through more integrations, and its writes until
110
+ * Arbol verifies the server's domain.
111
+ */
112
+ held: number;
113
+ /**
114
+ * How many tools the connection offers now.
115
+ */
116
+ tools: number;
117
+ /**
118
+ * The version of the connection's tools, which changes with them.
119
+ */
120
+ toolsVersion: string;
121
+ /**
122
+ * Whether this read changed the connection's tools.
123
+ */
124
+ updated: boolean;
125
+ }
126
+ /**
127
+ * A successful answer.
128
+ */
129
+ export interface AccountRefreshConnectionResultResponse {
130
+ data: AccountRefreshConnectionResult;
131
+ error: null;
132
+ /**
133
+ * What every answer carries besides its data or error.
134
+ */
135
+ metadata: ResponseMetadata;
136
+ success: true;
137
+ }
@@ -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 { AccountAccountNotConfiguredFailure, AccountBillingNotConfiguredFailure, AccountBillingUnavailableFailure, AccountIdentityRejectedError, AccountIdentityRejectedFailure, AccountIdentityUnavailableFailure, AccountMemberProtectedFailure, AccountProductRole, AccountRoleNotAssignableFailure, } from "./models.js";
5
+ export type { AccountAccountNotConfiguredFailure, AccountBillingNotConfiguredFailure, AccountBillingUnavailableFailure, AccountConnection, AccountCustomServerUnreachableError, AccountCustomServerUnreachableFailure, AccountCustomServerUnreachableFailureData, AccountIdentityRejectedError, AccountIdentityRejectedFailure, AccountIdentityUnavailableFailure, AccountMemberProtectedFailure, AccountProductRole, AccountRoleNotAssignableFailure, } from "./models.js";
@@ -62,6 +62,178 @@ export interface AccountBillingUnavailableFailure {
62
62
  */
63
63
  retryable: true;
64
64
  }
65
+ export interface AccountConnection {
66
+ /**
67
+ * Whether Arbi, the organization's assistant, may use this connection. On
68
+ * until someone turns it off.
69
+ */
70
+ arbi: {
71
+ enabled: boolean;
72
+ };
73
+ errorCode: string | null;
74
+ /**
75
+ * Its settings by name. Every caller reads a custom server's; only staff read
76
+ * an Arbol integration's, which is empty for other callers.
77
+ */
78
+ fields: {
79
+ [key: string]: unknown;
80
+ };
81
+ /**
82
+ * A custom server's tools that agents do not get yet: its writes, until Arbol
83
+ * verifies that the server's domain belongs to the organization.
84
+ */
85
+ heldTools?: {
86
+ capabilities?: {
87
+ match: "any" | "all";
88
+ scopes: string[];
89
+ };
90
+ description: string;
91
+ effect: "read" | "write";
92
+ input: {
93
+ [key: string]: unknown;
94
+ };
95
+ name: string;
96
+ operation?: string;
97
+ rest?: {
98
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
99
+ path: string;
100
+ };
101
+ rpcMethod?: string | null;
102
+ runtimeInputs?: ("connectionId" | "channel" | "conversationUrl" | "verifiedContact" | "outboundRecipient")[];
103
+ writesThrough?: string[];
104
+ }[];
105
+ /**
106
+ * A connection's id: con_ and 26 characters, stable and unique across the
107
+ * platform.
108
+ */
109
+ id: string;
110
+ /**
111
+ * sura, visoft, agenda, or a custom server's name.
112
+ */
113
+ integration: string;
114
+ kind: "arbol" | "custom";
115
+ /**
116
+ * Staff only; empty for other callers.
117
+ */
118
+ logins: {
119
+ login: number;
120
+ username: string | null;
121
+ verifiedAt: string | null;
122
+ }[];
123
+ name: string;
124
+ /**
125
+ * Which of the provider's independent sites this connection reaches.
126
+ */
127
+ portal?: string;
128
+ /**
129
+ * Its WhatsApp appointment reminders, or null when its integration cannot
130
+ * feed them. Until someone changes them they are off, at 09:00, the day
131
+ * before.
132
+ */
133
+ reminders: {
134
+ daysBefore: number;
135
+ mode: "off" | "review" | "automatic";
136
+ sendAt: string;
137
+ } | null;
138
+ server: {
139
+ authHeader: string | null;
140
+ fileArgument: string | null;
141
+ transport: "http" | "mcp";
142
+ url: string;
143
+ } | null;
144
+ /**
145
+ * A custom server's skills: procedures its document publishes beside its
146
+ * tools.
147
+ */
148
+ skills?: {
149
+ description: string;
150
+ instructions: string;
151
+ name: string;
152
+ }[];
153
+ /**
154
+ * active: agents may use it. disabled: turned off. failed: agents cannot use
155
+ * it until Arbol's team reviews it.
156
+ */
157
+ status: "active" | "disabled" | "failed";
158
+ summary: string | null;
159
+ /**
160
+ * The workflow labels assigned to this connection.
161
+ */
162
+ tags?: ("postconsulta" | "facturacion")[];
163
+ tools: {
164
+ capabilities?: {
165
+ match: "any" | "all";
166
+ scopes: string[];
167
+ };
168
+ description: string;
169
+ effect: "read" | "write";
170
+ input: {
171
+ [key: string]: unknown;
172
+ };
173
+ name: string;
174
+ operation?: string;
175
+ rest?: {
176
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
177
+ path: string;
178
+ };
179
+ rpcMethod?: string | null;
180
+ runtimeInputs?: ("connectionId" | "channel" | "conversationUrl" | "verifiedContact" | "outboundRecipient")[];
181
+ writesThrough?: string[];
182
+ }[];
183
+ /**
184
+ * The release version (arbol) or the SHA-256 of the stored tool list
185
+ * (custom).
186
+ */
187
+ toolsVersion: string;
188
+ updatedAt: string | null;
189
+ /**
190
+ * Staff only; empty for other callers.
191
+ */
192
+ username: string | null;
193
+ /**
194
+ * Staff only; empty for other callers.
195
+ */
196
+ verifiedAt: string | null;
197
+ }
198
+ /**
199
+ * A failed answer.
200
+ */
201
+ export interface AccountCustomServerUnreachableError {
202
+ data: null;
203
+ /**
204
+ * The server's tools could not be read.
205
+ */
206
+ error: AccountCustomServerUnreachableFailure;
207
+ /**
208
+ * What every answer carries besides its data or error.
209
+ */
210
+ metadata: ResponseMetadata;
211
+ success: false;
212
+ }
213
+ /**
214
+ * The server's tools could not be read.
215
+ */
216
+ export interface AccountCustomServerUnreachableFailure {
217
+ /**
218
+ * The failure code, stable across releases.
219
+ */
220
+ code: "CUSTOM_SERVER_UNREACHABLE";
221
+ data: AccountCustomServerUnreachableFailureData;
222
+ /**
223
+ * What went wrong, for people; it never contains input values.
224
+ */
225
+ message: string;
226
+ /**
227
+ * Whether repeating the same request may succeed.
228
+ */
229
+ retryable: false;
230
+ }
231
+ export interface AccountCustomServerUnreachableFailureData {
232
+ /**
233
+ * What stopped the read.
234
+ */
235
+ reason: "destination" | "redirect" | "status" | "too_large" | "timeout" | "network" | "document" | "no_tools";
236
+ }
65
237
  /**
66
238
  * A failed answer.
67
239
  */
@@ -0,0 +1,37 @@
1
+ import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
+ import type { AccountConnectionResponse, AccountCreateServerBody, AccountDiscoverServersBody, AccountServerDiscoveryResponse } from "./models.js";
3
+ export interface ClientOptions extends BaseClientOptions {
4
+ /**
5
+ * The URL the paths of the API are relative to.
6
+ */
7
+ baseUrl: string;
8
+ }
9
+ export interface Client {
10
+ /**
11
+ * Register the organization's own server
12
+ *
13
+ * Register an organization's own server as one of its connections, read again
14
+ * as servers.discover reads it. Its agents may use its reads at once; its
15
+ * writes wait until Arbol verifies that the server's domain belongs to the
16
+ * organization. The secret is kept encrypted, sent only to this server and
17
+ * never shown again.
18
+ */
19
+ create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
20
+ /**
21
+ * Read the organization's own server
22
+ *
23
+ * Read an organization's own server before registering it: its https address
24
+ * and the secret it admits calls with. Account finds whether it serves an
25
+ * OpenAPI document or MCP, and which header the secret travels in, and
26
+ * answers the tools an agent would get. Its writes wait until Arbol verifies
27
+ * that the server's domain belongs to the organization. Nothing is stored. It
28
+ * is a write because it sends the secret to the server.
29
+ */
30
+ discover(request: DiscoverRequest, options?: RequestOptions): Promise<DiscoverResponse>;
31
+ }
32
+ export declare function createClient(options: ClientOptions): Client;
33
+ export declare function bind(transport: Transport): Client;
34
+ export type CreateRequest = AccountCreateServerBody;
35
+ export type CreateResponse = AccountConnectionResponse;
36
+ export type DiscoverRequest = AccountDiscoverServersBody;
37
+ export type DiscoverResponse = AccountServerDiscoveryResponse;
@@ -0,0 +1,26 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ import { Transport, } from "../../_/index.js";
4
+ export function createClient(options) {
5
+ return bind(new Transport(options));
6
+ }
7
+ export function bind(transport) {
8
+ return {
9
+ create: (request, options) => transport.send(CreateOperation, request, options),
10
+ discover: (request, options) => transport.send(DiscoverOperation, request, options),
11
+ };
12
+ }
13
+ const CreateOperation = {
14
+ method: "POST",
15
+ route: "/v1/account/servers",
16
+ body: "flat",
17
+ response: null,
18
+ errors: { "400": true, "401": true, "403": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
19
+ };
20
+ const DiscoverOperation = {
21
+ method: "POST",
22
+ route: "/v1/account/servers/discover",
23
+ body: "flat",
24
+ response: null,
25
+ errors: { "400": true, "401": true, "403": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
26
+ };
@@ -0,0 +1,5 @@
1
+ export { ApiError } from "../../_/index.js";
2
+ export type { RequestOptions } from "../../_/index.js";
3
+ export { createClient } from "./client.js";
4
+ export type { Client, ClientOptions, CreateRequest, CreateResponse, DiscoverRequest, DiscoverResponse, } from "./client.js";
5
+ export type { AccountConnectionNameTakenError, AccountConnectionNameTakenFailure, AccountConnectionResponse, AccountCreateServerBody, AccountDiscoverServersBody, AccountServerDiscovery, AccountServerDiscoveryResponse, } from "./models.js";
@@ -0,0 +1,4 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export { ApiError } from "../../_/index.js";
4
+ export { createClient } from "./client.js";
@@ -0,0 +1,172 @@
1
+ import type { Empty, ResponseMetadata } from "../../models.js";
2
+ import type { AccountConnection } from "../models.js";
3
+ /**
4
+ * A failed answer.
5
+ */
6
+ export interface AccountConnectionNameTakenError {
7
+ data: null;
8
+ /**
9
+ * Another connection of this integration already has this name.
10
+ */
11
+ error: AccountConnectionNameTakenFailure;
12
+ /**
13
+ * What every answer carries besides its data or error.
14
+ */
15
+ metadata: ResponseMetadata;
16
+ success: false;
17
+ }
18
+ /**
19
+ * Another connection of this integration already has this name.
20
+ */
21
+ export interface AccountConnectionNameTakenFailure {
22
+ /**
23
+ * The failure code, stable across releases.
24
+ */
25
+ code: "CONNECTION_NAME_TAKEN";
26
+ /**
27
+ * No fields.
28
+ */
29
+ data: Empty;
30
+ /**
31
+ * What went wrong, for people; it never contains input values.
32
+ */
33
+ message: string;
34
+ /**
35
+ * Whether repeating the same request may succeed.
36
+ */
37
+ retryable: false;
38
+ }
39
+ /**
40
+ * A successful answer.
41
+ */
42
+ export interface AccountConnectionResponse {
43
+ /**
44
+ * One connection of an integration: what it is, its state and the tools it
45
+ * offers.
46
+ */
47
+ data: AccountConnection;
48
+ error: null;
49
+ /**
50
+ * What every answer carries besides its data or error.
51
+ */
52
+ metadata: ResponseMetadata;
53
+ success: true;
54
+ }
55
+ export interface AccountCreateServerBody {
56
+ /**
57
+ * The header the secret travels in, or null for Authorization: Bearer. Leave
58
+ * it out and Account uses the API key header the server's OpenAPI document
59
+ * declares, else Authorization: Bearer.
60
+ */
61
+ authHeader?: string | null;
62
+ /**
63
+ * The connection's name, as an agent's builder sees it and an agent picks it:
64
+ * 'Sede Norte'.
65
+ */
66
+ name: string;
67
+ /**
68
+ * The secret the server admits calls with. Arbol keeps it encrypted, sends it
69
+ * only to this server and never shows it again.
70
+ */
71
+ secret: string;
72
+ /**
73
+ * http: an OpenAPI 3 document (or a server whose /openapi.json serves one).
74
+ * mcp: an MCP endpoint (Streamable HTTP). Leave it out and Account finds
75
+ * which the address serves.
76
+ */
77
+ transport?: "http" | "mcp";
78
+ /**
79
+ * The OpenAPI document or the MCP endpoint: https, at a public address,
80
+ * without a query or a fragment.
81
+ */
82
+ url: string;
83
+ }
84
+ export interface AccountDiscoverServersBody {
85
+ /**
86
+ * The header the secret travels in, or null for Authorization: Bearer. Leave
87
+ * it out and Account uses the API key header the server's OpenAPI document
88
+ * declares, else Authorization: Bearer.
89
+ */
90
+ authHeader?: string | null;
91
+ /**
92
+ * The secret the server admits calls with. Arbol keeps it encrypted, sends it
93
+ * only to this server and never shows it again.
94
+ */
95
+ secret: string;
96
+ /**
97
+ * http: an OpenAPI 3 document (or a server whose /openapi.json serves one).
98
+ * mcp: an MCP endpoint (Streamable HTTP). Leave it out and Account finds
99
+ * which the address serves.
100
+ */
101
+ transport?: "http" | "mcp";
102
+ /**
103
+ * The OpenAPI document or the MCP endpoint: https, at a public address,
104
+ * without a query or a fragment.
105
+ */
106
+ url: string;
107
+ }
108
+ export interface AccountServerDiscovery {
109
+ /**
110
+ * The header the secret travels in, or null for Authorization: Bearer.
111
+ */
112
+ authHeader: string | null;
113
+ /**
114
+ * Where the tools' requests go.
115
+ */
116
+ baseUrl: string;
117
+ skills: {
118
+ description: string;
119
+ instructions: string;
120
+ name: string;
121
+ }[];
122
+ skipped: {
123
+ name: string;
124
+ reason: "no_operation_id" | "invalid_name" | "duplicate_name" | "non_json_body" | "unsupported_parameter" | "parameter_conflict" | "unresolvable_schema" | "no_read_only_hint" | "invalid_input_schema" | "too_many" | "invalid_skill" | "duplicate_skill" | "too_many_skills";
125
+ }[];
126
+ /**
127
+ * The tools an agent would get. Its reads are offered once the server is
128
+ * registered; its writes wait until Arbol verifies that the server's domain
129
+ * belongs to the organization.
130
+ */
131
+ tools: {
132
+ capabilities?: {
133
+ match: "any" | "all";
134
+ scopes: string[];
135
+ };
136
+ description: string;
137
+ effect: "read" | "write";
138
+ input: {
139
+ [key: string]: unknown;
140
+ };
141
+ name: string;
142
+ operation?: string;
143
+ rest?: {
144
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
145
+ path: string;
146
+ };
147
+ rpcMethod?: string | null;
148
+ runtimeInputs?: ("connectionId" | "channel" | "conversationUrl" | "verifiedContact" | "outboundRecipient")[];
149
+ writesThrough?: string[];
150
+ }[];
151
+ toolsVersion: string;
152
+ /**
153
+ * What the address serves: an OpenAPI document (http) or an MCP endpoint
154
+ * (mcp).
155
+ */
156
+ transport: "http" | "mcp";
157
+ }
158
+ /**
159
+ * A successful answer.
160
+ */
161
+ export interface AccountServerDiscoveryResponse {
162
+ /**
163
+ * An organization's own server as Account read it, before it is registered.
164
+ */
165
+ data: AccountServerDiscovery;
166
+ error: null;
167
+ /**
168
+ * What every answer carries besides its data or error.
169
+ */
170
+ metadata: ResponseMetadata;
171
+ success: true;
172
+ }
@@ -0,0 +1,3 @@
1
+ // Code generated by forge. DO NOT EDIT.
2
+ /* eslint-disable */
3
+ export {};
@@ -36,7 +36,7 @@ export interface RaizAgent {
36
36
  }[];
37
37
  /**
38
38
  * The integrations' tools the Agent may call, each on the connection it runs
39
- * on, with the definition it was saved with.
39
+ * on. The Agent runs each as its connection lists it now.
40
40
  */
41
41
  integrationTools: {
42
42
  connectionId: string;
@@ -367,6 +367,19 @@ export interface RaizAgentSettings {
367
367
  pauseOnHumanReply: boolean | null;
368
368
  policy: RaizAgentTurnPolicy | null;
369
369
  pollPendingOperations: boolean | null;
370
+ protection: {
371
+ spamHours?: number;
372
+ voiceCallsPerHour?: number;
373
+ voiceEnabled?: boolean;
374
+ voiceMinutesPerDay?: number;
375
+ voiceSilentCallsPerHour?: number;
376
+ webConversationTokens?: number;
377
+ webEnabled?: boolean;
378
+ webMessagesPerDay?: number;
379
+ whatsappConversationTokens?: number;
380
+ whatsappEnabled?: boolean;
381
+ whatsappRepliesPerHour?: number;
382
+ } | null;
370
383
  reasoningEffort: "none" | "low" | "medium" | "high" | "xhigh" | null;
371
384
  recoveryManager: {
372
385
  advisorAgentId?: string | null;
@@ -412,6 +425,19 @@ export interface RaizAgentSettingsInput {
412
425
  pauseOnHumanReply?: boolean | null;
413
426
  policy?: RaizAgentTurnPolicy | null;
414
427
  pollPendingOperations?: boolean | null;
428
+ protection?: {
429
+ spamHours?: number;
430
+ voiceCallsPerHour?: number;
431
+ voiceEnabled?: boolean;
432
+ voiceMinutesPerDay?: number;
433
+ voiceSilentCallsPerHour?: number;
434
+ webConversationTokens?: number;
435
+ webEnabled?: boolean;
436
+ webMessagesPerDay?: number;
437
+ whatsappConversationTokens?: number;
438
+ whatsappEnabled?: boolean;
439
+ whatsappRepliesPerHour?: number;
440
+ } | null;
415
441
  reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh" | null;
416
442
  recoveryManager?: {
417
443
  advisorAgentId?: string | null;
@@ -552,7 +578,7 @@ export interface RaizAgentVoiceSettings {
552
578
  * setting.
553
579
  */
554
580
  responseDelayMessages?: boolean;
555
- silenceEndCallTimeoutSeconds: number | null;
581
+ silenceEndCallTimeoutSeconds: number | 0 | null;
556
582
  similarityBoost: number | null;
557
583
  speed: number | null;
558
584
  stability: number | null;
@@ -634,8 +660,8 @@ export interface RaizCreateAgentBody {
634
660
  /**
635
661
  * The integrations' tools the Agent may call, each on one of the
636
662
  * organization's connections (`listConnections`, checked live in Account).
637
- * Each is saved with its current definition. In an update, the complete new
638
- * set.
663
+ * The Agent runs each as its connection lists it at every turn. In an update,
664
+ * the complete new set.
639
665
  */
640
666
  integrationTools?: RaizAgentIntegrationToolInput[];
641
667
  /**
@@ -814,8 +840,8 @@ export interface RaizUpdateAgentBody {
814
840
  /**
815
841
  * The integrations' tools the Agent may call, each on one of the
816
842
  * organization's connections (`listConnections`, checked live in Account).
817
- * Each is saved with its current definition. In an update, the complete new
818
- * set.
843
+ * The Agent runs each as its connection lists it at every turn. In an update,
844
+ * the complete new set.
819
845
  */
820
846
  integrationTools?: RaizAgentIntegrationToolInput[];
821
847
  /**
@@ -84,9 +84,22 @@ export interface RaizOrganization {
84
84
  };
85
85
  productNotices: {
86
86
  administrators: RaizEmailAddress[];
87
- events: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "template-approved" | "template-rejected" | "weekly-summary")[];
87
+ events: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[];
88
88
  recipients: RaizEmailAddress[];
89
89
  };
90
+ protection: {
91
+ spamHours: number;
92
+ voiceCallsPerHour: number;
93
+ voiceEnabled: boolean;
94
+ voiceMinutesPerDay: number;
95
+ voiceSilentCallsPerHour: number;
96
+ webConversationTokens: number;
97
+ webEnabled: boolean;
98
+ webMessagesPerDay: number;
99
+ whatsappConversationTokens: number;
100
+ whatsappEnabled: boolean;
101
+ whatsappRepliesPerHour: number;
102
+ };
90
103
  whatsapp: {
91
104
  maxConcurrentReplies: number;
92
105
  };
@@ -210,9 +223,22 @@ export interface RaizUpdateOrganizationBody {
210
223
  };
211
224
  productNotices?: {
212
225
  administrators?: RaizEmailAddress[] | null;
213
- events?: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "template-approved" | "template-rejected" | "weekly-summary")[] | null;
226
+ events?: ("agent-idle" | "agent-live" | "budget-reached" | "budget-warning" | "campaign-finished" | "channel-disconnected" | "channel-limit" | "channel-quality" | "channel-restored" | "import-finished" | "knowledge-failed" | "milestone" | "monthly-summary" | "outage-resolved" | "spam-blocked" | "template-approved" | "template-rejected" | "weekly-summary")[] | null;
214
227
  recipients?: RaizEmailAddress[] | null;
215
228
  };
229
+ protection?: {
230
+ spamHours?: number | null;
231
+ voiceCallsPerHour?: number | null;
232
+ voiceEnabled?: boolean | null;
233
+ voiceMinutesPerDay?: number | null;
234
+ voiceSilentCallsPerHour?: number | null;
235
+ webConversationTokens?: number | null;
236
+ webEnabled?: boolean | null;
237
+ webMessagesPerDay?: number | null;
238
+ whatsappConversationTokens?: number | null;
239
+ whatsappEnabled?: boolean | null;
240
+ whatsappRepliesPerHour?: number | null;
241
+ };
216
242
  whatsapp?: {
217
243
  maxConcurrentReplies?: number | null;
218
244
  };
@@ -72,11 +72,13 @@ export interface RaizListSuppressionsServiceUnavailableError {
72
72
  }
73
73
  export type RaizListSuppressionsServiceUnavailableFailure = UpstreamUnavailableFailure | RaizIntegrationsUnavailableFailure;
74
74
  export interface RaizSuppression {
75
+ cause: "VOICE_CALLS" | "VOICE_MINUTES" | "VOICE_SILENT_CALLS" | "WEB_MESSAGES" | "WEB_TOKENS" | "WHATSAPP_REPLIES" | "WHATSAPP_TOKENS" | null;
75
76
  countryCode: string | null;
76
77
  /**
77
78
  * An instant in RFC 3339 format, in UTC.
78
79
  */
79
80
  createdAt: Temporal.Instant;
81
+ expiresAt: Temporal.Instant | null;
80
82
  /**
81
83
  * Suppression id.
82
84
  */
@@ -86,6 +88,7 @@ export interface RaizSuppression {
86
88
  phone: string | null;
87
89
  phonePrefix: string | null;
88
90
  reason: string;
91
+ scope: "voice" | "whatsapp" | "web" | null;
89
92
  }
90
93
  /**
91
94
  * A failed answer.
@@ -3,6 +3,7 @@
3
3
  import { array, instant, object } from "../../_/index.js";
4
4
  export const RaizSuppressionCodec = object([
5
5
  ["createdAt", null, instant],
6
+ ["expiresAt", null, instant],
6
7
  ]);
7
8
  export const RaizSuppressionPageCodec = object([
8
9
  ["data", null, array(() => RaizSuppressionCodec)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "5.63.0",
3
+ "version": "5.64.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.20261117.205209",
62
- "sha256": "0ea12dd1936ee90f23963abef6e8b210db52937fb9708a3a69a2c4399890a94b"
61
+ "release": "1.20261118.42105",
62
+ "sha256": "f98cfd70300bba52a0443c5ad5e04e4c84abd6a0cc0024c7fa72155b3ddb21ce"
63
63
  }
64
64
  }
65
65
  }