@arbol-ai/sdk 3.0.0 → 3.0.1

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.
@@ -15,7 +15,7 @@ export function bind(transport) {
15
15
  }
16
16
  const CreateOperation = {
17
17
  method: "POST",
18
- route: "/v1/raiz/agents/create",
18
+ route: "/v1/raiz/agents",
19
19
  body: "flat",
20
20
  request: object([["settings", null, () => RaizAgentSettingsInputCodec]]),
21
21
  response: object([["data", null, () => RaizAgentCodec]]),
@@ -23,8 +23,7 @@ const CreateOperation = {
23
23
  };
24
24
  const GetOperation = {
25
25
  method: "GET",
26
- route: "/v1/raiz/agents/get",
27
- query: { agentId: "agentId" },
26
+ route: "/v1/raiz/agents/{agentId}",
28
27
  response: object([["data", null, () => RaizAgentCodec]]),
29
28
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
29
  };
@@ -37,7 +36,7 @@ const ListOperation = {
37
36
  };
38
37
  const UpdateOperation = {
39
38
  method: "PATCH",
40
- route: "/v1/raiz/agents/update",
39
+ route: "/v1/raiz/agents/{agentId}",
41
40
  body: "flat",
42
41
  request: object([["settings", null, () => RaizAgentSettingsInputCodec]]),
43
42
  response: object([["data", null, () => RaizAgentCodec]]),
@@ -278,6 +278,7 @@ export interface RaizAgentVoiceSettings {
278
278
  similarityBoost: number | null;
279
279
  speed: number | null;
280
280
  stability: number | null;
281
+ toolCallSound?: "typing" | null;
281
282
  turnTimeoutSeconds: number | null;
282
283
  voiceId: string | null;
283
284
  }
@@ -99,6 +99,9 @@ export interface DeleteRequest {
99
99
  * Bulletin id.
100
100
  */
101
101
  bulletinId: string;
102
+ body: {
103
+ [key: string]: unknown;
104
+ };
102
105
  }
103
106
  export interface DeleteResponse {
104
107
  data: DeletedObject;
@@ -153,11 +156,11 @@ export interface ListResponse {
153
156
  success: true;
154
157
  }
155
158
  export interface UpdateRequest {
156
- agentId?: string | null;
157
159
  /**
158
160
  * Bulletin id.
159
161
  */
160
162
  bulletinId: string;
163
+ agentId?: string | null;
161
164
  /**
162
165
  * When Agents stop applying it, later than its start; send the current
163
166
  * instant to end it now, or null to keep it until it is deleted.
@@ -16,7 +16,7 @@ export function bind(transport) {
16
16
  }
17
17
  const CreateOperation = {
18
18
  method: "POST",
19
- route: "/v1/raiz/bulletins/create",
19
+ route: "/v1/raiz/bulletins",
20
20
  body: "flat",
21
21
  request: object([["endsAt", null, instant], ["startsAt", null, instant]]),
22
22
  response: object([["data", null, () => RaizBulletinCodec]]),
@@ -24,15 +24,14 @@ const CreateOperation = {
24
24
  };
25
25
  const DeleteOperation = {
26
26
  method: "DELETE",
27
- route: "/v1/raiz/bulletins/delete",
28
- body: "flat",
27
+ route: "/v1/raiz/bulletins/{bulletinId}",
28
+ body: "nested",
29
29
  response: null,
30
30
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
31
31
  };
32
32
  const GetOperation = {
33
33
  method: "GET",
34
- route: "/v1/raiz/bulletins/get",
35
- query: { bulletinId: "bulletinId" },
34
+ route: "/v1/raiz/bulletins/{bulletinId}",
36
35
  response: object([["data", null, () => RaizBulletinCodec]]),
37
36
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
38
37
  };
@@ -45,7 +44,7 @@ const ListOperation = {
45
44
  };
46
45
  const UpdateOperation = {
47
46
  method: "PATCH",
48
- route: "/v1/raiz/bulletins/update",
47
+ route: "/v1/raiz/bulletins/{bulletinId}",
49
48
  body: "flat",
50
49
  request: object([["endsAt", null, instant], ["startsAt", null, instant]]),
51
50
  response: object([["data", null, () => RaizBulletinCodec]]),
@@ -21,7 +21,8 @@ export interface Client {
21
21
  * `scheduledStartAt` and `scheduledEndAt`; each recipient gets up to
22
22
  * `maxAttempts` calls, retried `retryAfterMinutes` later after the results in
23
23
  * `retryOn` (`no_answer`, `failure`). Starting it (REST `POST
24
- * /v1/campaigns/start`) is not an AI tool. Read the `run-a-campaign` skill.
24
+ * /v1/campaigns/{campaignId}/start`) is not an AI tool. Read the
25
+ * `run-a-campaign` skill.
25
26
  */
26
27
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
27
28
  /**
@@ -170,14 +171,14 @@ export interface ListResponse {
170
171
  success: true;
171
172
  }
172
173
  export interface UpdateRequest {
173
- /**
174
- * Changes only before the campaign starts.
175
- */
176
- agentId?: string;
177
174
  /**
178
175
  * Campaign id.
179
176
  */
180
177
  campaignId: string;
178
+ /**
179
+ * Changes only before the campaign starts.
180
+ */
181
+ agentId?: string;
181
182
  channelId?: string | null;
182
183
  /**
183
184
  * When calls may start, in the campaign's time zone. Empty: any time.
@@ -15,7 +15,7 @@ export function bind(transport) {
15
15
  }
16
16
  const CreateOperation = {
17
17
  method: "POST",
18
- route: "/v1/raiz/campaigns/create",
18
+ route: "/v1/raiz/campaigns",
19
19
  body: "flat",
20
20
  request: object([["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]),
21
21
  response: object([["data", null, () => RaizCampaignCodec]]),
@@ -23,8 +23,8 @@ const CreateOperation = {
23
23
  };
24
24
  const GetOperation = {
25
25
  method: "GET",
26
- route: "/v1/raiz/campaigns/get",
27
- query: { campaignId: "campaignId", expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit" },
26
+ route: "/v1/raiz/campaigns/{campaignId}",
27
+ query: { expand: "expand", recipientsCursor: "recipientsCursor", recipientsDirection: "recipientsDirection", recipientsLimit: "recipientsLimit" },
28
28
  response: object([["data", null, () => RaizCampaignCodec]]),
29
29
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
30
  };
@@ -37,7 +37,7 @@ const ListOperation = {
37
37
  };
38
38
  const UpdateOperation = {
39
39
  method: "PATCH",
40
- route: "/v1/raiz/campaigns/update",
40
+ route: "/v1/raiz/campaigns/{campaignId}",
41
41
  body: "flat",
42
42
  request: object([["scheduledEndAt", null, instant], ["scheduledStartAt", null, instant]]),
43
43
  response: object([["data", null, () => RaizCampaignCodec]]),
@@ -112,14 +112,16 @@ export type CreateRequest = {
112
112
  endpoint: {
113
113
  kind: "platform_number";
114
114
  label?: string;
115
- phoneNumber: RaizPhoneNumber;
115
+ phone?: RaizPhoneNumber;
116
+ phoneNumber?: RaizPhoneNumber;
116
117
  } | {
117
118
  address: string;
118
119
  kind: "sip_trunk";
119
120
  label?: string;
120
121
  mediaEncryption?: "disabled" | "allowed" | "required";
121
122
  password?: string;
122
- phoneNumber: RaizPhoneNumber;
123
+ phone?: RaizPhoneNumber;
124
+ phoneNumber?: RaizPhoneNumber;
123
125
  transport?: "auto" | "udp" | "tcp" | "tls";
124
126
  username?: string;
125
127
  };
@@ -145,6 +147,9 @@ export interface DeleteRequest {
145
147
  * Channel id.
146
148
  */
147
149
  channelId: string;
150
+ body: {
151
+ [key: string]: unknown;
152
+ };
148
153
  }
149
154
  export interface DeleteResponse {
150
155
  data: DeletedObject;
@@ -210,6 +215,9 @@ export interface RenewSetupRequest {
210
215
  * Channel id.
211
216
  */
212
217
  channelId: string;
218
+ body: {
219
+ [key: string]: unknown;
220
+ };
213
221
  }
214
222
  export interface RenewSetupResponse {
215
223
  data: RaizChannel;
@@ -218,13 +226,13 @@ export interface RenewSetupResponse {
218
226
  success: true;
219
227
  }
220
228
  export interface UpdateRequest {
221
- agentId?: string | null;
222
- aiCoveragePercent?: number;
223
- businessHours?: RaizBusinessHours | null;
224
229
  /**
225
230
  * Channel id.
226
231
  */
227
232
  channelId: string;
233
+ agentId?: string | null;
234
+ aiCoveragePercent?: number;
235
+ businessHours?: RaizBusinessHours | null;
228
236
  /**
229
237
  * The `version` you read. When present, the change applies only if nobody
230
238
  * changed the resource since; otherwise it fails with VERSION_CONFLICT.
@@ -278,6 +286,12 @@ export interface VerifyRequest {
278
286
  /**
279
287
  * Phone number in E.164 format.
280
288
  */
289
+ phone?: RaizPhoneNumber;
290
+ /**
291
+ * Deprecated: use `phone`. Answered until 2027-01-28.
292
+ *
293
+ * @deprecated
294
+ */
281
295
  phoneNumber?: RaizPhoneNumber;
282
296
  }
283
297
  export interface VerifyResponse {
@@ -19,22 +19,22 @@ export function bind(transport) {
19
19
  }
20
20
  const CreateOperation = {
21
21
  method: "POST",
22
- route: "/v1/raiz/channels/create",
22
+ route: "/v1/raiz/channels",
23
23
  body: "flat",
24
24
  response: object([["data", null, () => RaizChannelCodec]]),
25
25
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
26
26
  };
27
27
  const DeleteOperation = {
28
28
  method: "DELETE",
29
- route: "/v1/raiz/channels/delete",
30
- body: "flat",
29
+ route: "/v1/raiz/channels/{channelId}",
30
+ body: "nested",
31
31
  response: null,
32
32
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
33
33
  };
34
34
  const GetOperation = {
35
35
  method: "GET",
36
- route: "/v1/raiz/channels/get",
37
- query: { channelId: "channelId", expand: "expand" },
36
+ route: "/v1/raiz/channels/{channelId}",
37
+ query: { expand: "expand" },
38
38
  response: object([["data", null, () => RaizChannelCodec]]),
39
39
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
40
40
  };
@@ -47,14 +47,14 @@ const ListOperation = {
47
47
  };
48
48
  const RenewSetupOperation = {
49
49
  method: "POST",
50
- route: "/v1/raiz/channels/renew-setup",
51
- body: "flat",
50
+ route: "/v1/raiz/channels/{channelId}/renew-setup",
51
+ body: "nested",
52
52
  response: object([["data", null, () => RaizChannelCodec]]),
53
53
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
54
54
  };
55
55
  const UpdateOperation = {
56
56
  method: "PATCH",
57
- route: "/v1/raiz/channels/update",
57
+ route: "/v1/raiz/channels/{channelId}",
58
58
  body: "flat",
59
59
  request: object([["businessHours", null, () => RaizBusinessHoursCodec], ["widgetLogo", null, object([["data", null, bytes]])]]),
60
60
  response: object([["data", null, () => RaizChannelCodec]]),
@@ -62,7 +62,7 @@ const UpdateOperation = {
62
62
  };
63
63
  const VerifyOperation = {
64
64
  method: "POST",
65
- route: "/v1/raiz/channels/verify",
65
+ route: "/v1/raiz/channels/{channelId}/verify",
66
66
  body: "flat",
67
67
  response: object([["data", null, () => RaizChannelCodec]]),
68
68
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -25,15 +25,15 @@ const CountOperation = {
25
25
  };
26
26
  const CreateOperation = {
27
27
  method: "POST",
28
- route: "/v1/raiz/contacts/create",
28
+ route: "/v1/raiz/contacts",
29
29
  body: "flat",
30
30
  response: object([["data", null, () => RaizContactCodec]]),
31
31
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
32
32
  };
33
33
  const GetOperation = {
34
34
  method: "GET",
35
- route: "/v1/raiz/contacts/get",
36
- query: { contactId: "contactId", expand: "expand", timelineCursor: "timelineCursor", timelineDirection: "timelineDirection", timelineLimit: "timelineLimit" },
35
+ route: "/v1/raiz/contacts/{contactId}",
36
+ query: { expand: "expand", timelineCursor: "timelineCursor", timelineDirection: "timelineDirection", timelineLimit: "timelineLimit" },
37
37
  response: object([["data", null, () => RaizContactCodec]]),
38
38
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
39
39
  };
@@ -54,7 +54,7 @@ const ListOperation = {
54
54
  };
55
55
  const UpdateOperation = {
56
56
  method: "PATCH",
57
- route: "/v1/raiz/contacts/update",
57
+ route: "/v1/raiz/contacts/{contactId}",
58
58
  body: "flat",
59
59
  response: object([["data", null, () => RaizContactCodec]]),
60
60
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -213,6 +213,9 @@ export interface DeleteRequest {
213
213
  * Conversation id.
214
214
  */
215
215
  conversationId: string;
216
+ body: {
217
+ [key: string]: unknown;
218
+ };
216
219
  }
217
220
  export interface DeleteResponse {
218
221
  data: DeletedObject;
@@ -368,6 +371,10 @@ export interface ListResponse {
368
371
  success: true;
369
372
  }
370
373
  export interface UpdateRequest {
374
+ /**
375
+ * Conversation id.
376
+ */
377
+ conversationId: string;
371
378
  /**
372
379
  * WhatsApp only: activate or pause AI for this open conversation alone.
373
380
  * Activation answers what the contact wrote after the last real answer, the
@@ -381,10 +388,6 @@ export interface UpdateRequest {
381
388
  */
382
389
  aiPaused?: boolean;
383
390
  contactId?: string | null;
384
- /**
385
- * Conversation id.
386
- */
387
- conversationId: string;
388
391
  /**
389
392
  * The `version` you read. When present, the change applies only if nobody
390
393
  * changed the resource since; otherwise it fails with VERSION_CONFLICT.
@@ -17,7 +17,7 @@ export function bind(transport) {
17
17
  }
18
18
  const ContinueOperation = {
19
19
  method: "POST",
20
- route: "/v1/raiz/conversations/continue",
20
+ route: "/v1/raiz/conversations/{conversationId}/continue",
21
21
  body: "flat",
22
22
  response: object([["data", null, () => RaizConversationCodec]]),
23
23
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -31,15 +31,15 @@ const CountOperation = {
31
31
  };
32
32
  const DeleteOperation = {
33
33
  method: "DELETE",
34
- route: "/v1/raiz/conversations/delete",
35
- body: "flat",
34
+ route: "/v1/raiz/conversations/{conversationId}",
35
+ body: "nested",
36
36
  response: null,
37
37
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
38
38
  };
39
39
  const GetOperation = {
40
40
  method: "GET",
41
- route: "/v1/raiz/conversations/get",
42
- query: { conversationId: "conversationId", expand: "expand", messagesCursor: "messagesCursor", messagesDirection: "messagesDirection", messagesLimit: "messagesLimit" },
41
+ route: "/v1/raiz/conversations/{conversationId}",
42
+ query: { expand: "expand", messagesCursor: "messagesCursor", messagesDirection: "messagesDirection", messagesLimit: "messagesLimit" },
43
43
  response: object([["data", null, () => RaizConversationCodec]]),
44
44
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
45
45
  };
@@ -52,7 +52,7 @@ const ListOperation = {
52
52
  };
53
53
  const UpdateOperation = {
54
54
  method: "PATCH",
55
- route: "/v1/raiz/conversations/update",
55
+ route: "/v1/raiz/conversations/{conversationId}",
56
56
  body: "flat",
57
57
  response: object([["data", null, () => RaizConversationCodec]]),
58
58
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -153,15 +153,15 @@ export interface ListResponse {
153
153
  success: true;
154
154
  }
155
155
  export interface UpdateRequest {
156
+ /**
157
+ * Definition id.
158
+ */
159
+ definitionId: string;
156
160
  /**
157
161
  * The Agents that use the definition; empty for every Agent. In an update,
158
162
  * the complete new set.
159
163
  */
160
164
  agentIds?: string[];
161
- /**
162
- * Definition id.
163
- */
164
- definitionId: string;
165
165
  description?: string | null;
166
166
  /**
167
167
  * The `version` you read. When present, the change applies only if nobody
@@ -15,15 +15,14 @@ export function bind(transport) {
15
15
  }
16
16
  const CreateOperation = {
17
17
  method: "POST",
18
- route: "/v1/raiz/definitions/create",
18
+ route: "/v1/raiz/definitions",
19
19
  body: "flat",
20
20
  response: object([["data", null, () => RaizDefinitionCodec]]),
21
21
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
22
22
  };
23
23
  const GetOperation = {
24
24
  method: "GET",
25
- route: "/v1/raiz/definitions/get",
26
- query: { definitionId: "definitionId" },
25
+ route: "/v1/raiz/definitions/{definitionId}",
27
26
  response: object([["data", null, () => RaizDefinitionCodec]]),
28
27
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
29
28
  };
@@ -36,7 +35,7 @@ const ListOperation = {
36
35
  };
37
36
  const UpdateOperation = {
38
37
  method: "PATCH",
39
- route: "/v1/raiz/definitions/update",
38
+ route: "/v1/raiz/definitions/{definitionId}",
40
39
  body: "flat",
41
40
  response: object([["data", null, () => RaizDefinitionCodec]]),
42
41
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -11,23 +11,24 @@ export interface Client {
11
11
  /**
12
12
  * Record Agent feedback
13
13
  *
14
- * Record internal feedback on one completed WhatsApp Agent reply: what should
15
- * be preserved or changed, a preferred response, and whether it was
16
- * incorrect, incomplete or could be simpler. Requires conversation write and
17
- * Agent read access. Does not contact anyone or change live instructions.
18
- * Repeating creation returns the existing authored case; edit it with
19
- * updateEvalCase and expectedVersion.
14
+ * Record internal feedback on one completed WhatsApp Agent reply or an Agent
15
+ * response from a completed voice call: what should be preserved or changed,
16
+ * a preferred response, and whether it was incorrect, incomplete or could be
17
+ * simpler. Requires conversation write and Agent read access. Does not
18
+ * contact anyone or change live instructions. Repeating creation returns the
19
+ * existing authored case; edit it with updateEvalCase and expectedVersion.
20
20
  */
21
21
  create(request: CreateRequest, options?: RequestOptions): Promise<CreateResponse>;
22
22
  /**
23
23
  * List evaluation cases
24
24
  *
25
- * The Agents' evaluation cases, newest first: completed WhatsApp replies with
26
- * explicit internal team feedback (`authored`) or a following team message
27
- * (`correction`), and the Agent version that wrote each reply. Filter by
28
- * agentId, replyMessageId, source or status (`open`, `kept`, `dismissed`).
29
- * Requires conversation read authority as well as Agent read authority. Read
30
- * the conversation with its own operations to judge a case. Not an AI tool.
25
+ * The Agents' evaluation cases, newest first: WhatsApp replies or completed
26
+ * voice-call responses with explicit internal team feedback (`authored`) or a
27
+ * following team message (`correction`), and the originating Agent version
28
+ * when recorded (unknown for historical voice calls). Filter by agentId,
29
+ * replyMessageId, source or status (`open`, `kept`, `dismissed`). Requires
30
+ * conversation read authority as well as Agent read authority. Read the
31
+ * conversation with its own operations to judge a case. Not an AI tool.
31
32
  */
32
33
  list(request?: ListRequest, options?: RequestOptions): Promise<ListResponse>;
33
34
  /**
@@ -14,7 +14,7 @@ export function bind(transport) {
14
14
  }
15
15
  const CreateOperation = {
16
16
  method: "POST",
17
- route: "/v1/raiz/eval-cases/create",
17
+ route: "/v1/raiz/eval-cases",
18
18
  body: "flat",
19
19
  response: object([["data", null, () => RaizEvalCaseCodec]]),
20
20
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -28,7 +28,7 @@ const ListOperation = {
28
28
  };
29
29
  const UpdateOperation = {
30
30
  method: "PATCH",
31
- route: "/v1/raiz/eval-cases/update",
31
+ route: "/v1/raiz/eval-cases/{evalCaseId}",
32
32
  body: "flat",
33
33
  response: object([["data", null, () => RaizEvalCaseCodec]]),
34
34
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -15,10 +15,13 @@ export interface Client {
15
15
  * With feedbackCaseId, prepare conditional guidance from that kept correction
16
16
  * and test it with the Agent’s newest kept cases, always including the
17
17
  * source. Do not combine feedbackCaseId with candidate or caseIds. This does
18
- * not publish. Requires conversation read access. Otherwise measure a
19
- * candidate version of a text Agent on its kept evaluation cases before
20
- * publishing it: the WhatsApp Agent rewrites each case's reply with the
21
- * candidate's `instructions`, `skills`, `integrationSkills`, `model` and
18
+ * not publish. Requires conversation read access. Voice Agents use a
19
+ * spoken-content rehearsal with an independent model (evaluationMode
20
+ * voice_text), not the live voice model, audio, interruptions or telephony. A
21
+ * person must review its applicability to calls before approval. Otherwise
22
+ * measure a candidate version on its kept evaluation cases before publishing
23
+ * it: the WhatsApp Agent rewrites each case's reply with the candidate's
24
+ * `instructions`, `skills`, `integrationSkills`, `model` and
22
25
  * `reasoningEffort` (omitted ones stay as the live Agent has them), without
23
26
  * running any integration tool (each answers with what it answered in the
24
27
  * original conversation) and without sending anything; then a judge model
@@ -13,15 +13,14 @@ export function bind(transport) {
13
13
  }
14
14
  const CreateOperation = {
15
15
  method: "POST",
16
- route: "/v1/raiz/eval-runs/create",
16
+ route: "/v1/raiz/eval-runs",
17
17
  body: "flat",
18
18
  response: object([["data", null, () => RaizEvalRunCodec]]),
19
19
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
20
20
  };
21
21
  const GetOperation = {
22
22
  method: "GET",
23
- route: "/v1/raiz/eval-runs/get",
24
- query: { evalRunId: "evalRunId" },
23
+ route: "/v1/raiz/eval-runs/{evalRunId}",
25
24
  response: object([["data", null, () => RaizEvalRunCodec]]),
26
25
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
27
26
  };
@@ -22,6 +22,12 @@ export interface RaizEvalRun {
22
22
  * Cases that could not be replayed or judged.
23
23
  */
24
24
  errors: number;
25
+ /**
26
+ * voice_text tests spoken response content with an independent model; it does
27
+ * not test the live voice model, audio, interruptions or telephony. Human
28
+ * review is required before approval.
29
+ */
30
+ evaluationMode: "text" | "voice_text";
25
31
  failed: number;
26
32
  feedbackCaseId: string | null;
27
33
  feedbackCaseVersion: number | null;
@@ -52,7 +58,7 @@ export interface RaizEvalRun {
52
58
  verdict: "passed" | "failed" | "error";
53
59
  }[];
54
60
  /**
55
- * `queued` until the WhatsApp Agent takes it (within a minute), `running`
61
+ * `queued` until the channel evaluator takes it (within a minute), `running`
56
62
  * while cases are replayed (each result appears as it is judged), `completed`
57
63
  * once every case has a result, `failed` when it could not continue.
58
64
  */
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  }
14
14
  const CreateOperation = {
15
15
  method: "POST",
16
- route: "/v1/raiz/facts/create",
16
+ route: "/v1/raiz/facts",
17
17
  body: "flat",
18
18
  request: object([["observedAt", null, instant]]),
19
19
  response: object([["data", null, () => RaizFactCodec]]),
@@ -21,7 +21,7 @@ const CreateOperation = {
21
21
  };
22
22
  const UpdateOperation = {
23
23
  method: "PATCH",
24
- route: "/v1/raiz/facts/update",
24
+ route: "/v1/raiz/facts/{factId}",
25
25
  body: "flat",
26
26
  response: object([["data", null, () => RaizFactCodec]]),
27
27
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -43,13 +43,13 @@ export interface Client {
43
43
  /**
44
44
  * Search Knowledge
45
45
  *
46
- * Find the passages that best answer `query` in the organization's searchable
46
+ * Find the passages that best answer `q` in the organization's searchable
47
47
  * documents, best first. `agentId` searches exactly what that Agent can find;
48
48
  * `knowledgeDocumentIds` limits the search to those documents. Paused,
49
49
  * deleted and not-yet-indexed documents are never searched. Read a whole
50
50
  * document with `get_knowledge_document` and `expand=content`.
51
51
  */
52
- search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
52
+ search(request?: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
53
53
  /**
54
54
  * Update a Knowledge document
55
55
  *
@@ -102,14 +102,14 @@ export interface CreateResponse {
102
102
  success: true;
103
103
  }
104
104
  export interface GetRequest {
105
- /**
106
- * Related data to include, comma-separated: `content`.
107
- */
108
- expand?: string;
109
105
  /**
110
106
  * Knowledge document id.
111
107
  */
112
108
  knowledgeDocumentId: string;
109
+ /**
110
+ * Related data to include, comma-separated: `content`.
111
+ */
112
+ expand?: string;
113
113
  }
114
114
  export interface GetResponse {
115
115
  data: RaizKnowledgeDocument;
@@ -184,7 +184,13 @@ export interface SearchRequest {
184
184
  /**
185
185
  * What to look for, in a few words.
186
186
  */
187
- query: string;
187
+ q?: string;
188
+ /**
189
+ * Deprecated: use `q`. Answered until 2027-01-28.
190
+ *
191
+ * @deprecated
192
+ */
193
+ query?: string;
188
194
  }
189
195
  export interface SearchResponse {
190
196
  data: RaizKnowledgePassagePage;
@@ -193,6 +199,10 @@ export interface SearchResponse {
193
199
  success: true;
194
200
  }
195
201
  export interface UpdateRequest {
202
+ /**
203
+ * Knowledge document id.
204
+ */
205
+ knowledgeDocumentId: string;
196
206
  /**
197
207
  * Website documents only. Default: 20 pages, depth 2.
198
208
  */
@@ -207,10 +217,6 @@ export interface UpdateRequest {
207
217
  * File documents only.
208
218
  */
209
219
  file?: RaizKnowledgeFileInput;
210
- /**
211
- * Knowledge document id.
212
- */
213
- knowledgeDocumentId: string;
214
220
  /**
215
221
  * Website documents only: the HTTPS page to start from. Its origin must be
216
222
  * approved for this deployment; only same-origin pages under its path are
@@ -16,7 +16,7 @@ export function bind(transport) {
16
16
  }
17
17
  const CreateOperation = {
18
18
  method: "POST",
19
- route: "/v1/raiz/knowledge/create",
19
+ route: "/v1/raiz/knowledge",
20
20
  body: "flat",
21
21
  request: object([["file", null, () => RaizKnowledgeFileInputCodec]]),
22
22
  response: object([["data", null, () => RaizKnowledgeDocumentCodec]]),
@@ -24,8 +24,8 @@ const CreateOperation = {
24
24
  };
25
25
  const GetOperation = {
26
26
  method: "GET",
27
- route: "/v1/raiz/knowledge/get",
28
- query: { expand: "expand", knowledgeDocumentId: "knowledgeDocumentId" },
27
+ route: "/v1/raiz/knowledge/{knowledgeDocumentId}",
28
+ query: { expand: "expand" },
29
29
  response: object([["data", null, () => RaizKnowledgeDocumentCodec]]),
30
30
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
31
31
  };
@@ -45,7 +45,7 @@ const SearchOperation = {
45
45
  };
46
46
  const UpdateOperation = {
47
47
  method: "PATCH",
48
- route: "/v1/raiz/knowledge/update",
48
+ route: "/v1/raiz/knowledge/{knowledgeDocumentId}",
49
49
  body: "flat",
50
50
  request: object([["file", null, () => RaizKnowledgeFileInputCodec]]),
51
51
  response: object([["data", null, () => RaizKnowledgeDocumentCodec]]),
@@ -223,13 +223,6 @@ export interface RaizFailureResponse {
223
223
  };
224
224
  message: "Only a text Agent can hold a web conversation.";
225
225
  retryable: false;
226
- } | {
227
- code: "APPLICATIONS_UNAVAILABLE";
228
- data: {
229
- [key: string]: unknown;
230
- };
231
- message: "The Arbol applications you can open cannot be read right now. Try again shortly.";
232
- retryable: true;
233
226
  } | {
234
227
  code: "CALL_IN_PROGRESS";
235
228
  data: {
@@ -356,41 +349,6 @@ export interface RaizFailureResponse {
356
349
  };
357
350
  message: "The IP network is not a valid IPv4 or IPv6 address or CIDR block.";
358
351
  retryable: false;
359
- } | {
360
- code: "MEMBER_EXISTS";
361
- data: {
362
- [key: string]: unknown;
363
- };
364
- message: "This person is already a member of the organization or has a pending invitation.";
365
- retryable: false;
366
- } | {
367
- code: "MEMBER_PROTECTED";
368
- data: {
369
- [key: string]: unknown;
370
- };
371
- message: "This access cannot be changed here: Arbol manages owners and staff, you can only change roles whose permissions you hold, and another product's access is never touched.";
372
- retryable: false;
373
- } | {
374
- code: "MEMBER_ROLE_INVALID";
375
- data: {
376
- [key: string]: unknown;
377
- };
378
- message: "A role is not one you can assign: it is unknown, it is the owner or staff role (granted by Arbol only), or it grants permissions you do not hold.";
379
- retryable: false;
380
- } | {
381
- code: "MEMBER_SELF_CHANGE";
382
- data: {
383
- [key: string]: unknown;
384
- };
385
- message: "You cannot change or remove your own access. Ask another member who manages the team.";
386
- retryable: false;
387
- } | {
388
- code: "MEMBERS_UNAVAILABLE";
389
- data: {
390
- [key: string]: unknown;
391
- };
392
- message: "Team management is not configured for this deployment yet. Ask Arbol to add or change members.";
393
- retryable: false;
394
352
  } | {
395
353
  code: "OUTSIDE_CONTACT_HOURS";
396
354
  data: {
@@ -18,8 +18,7 @@ export interface Client {
18
18
  * conversation or fails in it, and the daily report.
19
19
  * capabilities.managedVoiceOutbound reports whether the shared outbound line
20
20
  * is configured; settings.channels.managedVoiceOutboundEnabled is the
21
- * organization's separate permission to use it. With `expand=applications`,
22
- * also which Arbol applications (Agenda, Ámbar, Account) you can open in it.
21
+ * organization's separate permission to use it.
23
22
  */
24
23
  get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
25
24
  /**
@@ -48,10 +47,6 @@ export interface Client {
48
47
  export declare function createClient(options: ClientOptions): Client;
49
48
  export declare function bind(transport: Transport): Client;
50
49
  export interface GetRequest {
51
- /**
52
- * Related data to include, comma-separated: `applications`.
53
- */
54
- expand?: string;
55
50
  }
56
51
  export interface GetResponse {
57
52
  data: RaizOrganization;
@@ -66,6 +61,7 @@ export interface SendDailyReportRequest {
66
61
  }
67
62
  export interface SendDailyReportResponse {
68
63
  data: {
64
+ endsAt: Temporal.Instant;
69
65
  recipients: number;
70
66
  requestedAt: Temporal.Instant;
71
67
  until: Temporal.Instant;
@@ -15,7 +15,6 @@ export function bind(transport) {
15
15
  const GetOperation = {
16
16
  method: "GET",
17
17
  route: "/v1/raiz/organization",
18
- query: { expand: "expand" },
19
18
  response: object([["data", null, () => RaizOrganizationCodec]]),
20
19
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
21
20
  };
@@ -23,12 +22,12 @@ const SendDailyReportOperation = {
23
22
  method: "POST",
24
23
  route: "/v1/raiz/organization/send-daily-report",
25
24
  body: "nested",
26
- response: object([["data", null, object([["requestedAt", null, instant], ["until", null, instant]])]]),
25
+ response: object([["data", null, object([["endsAt", null, instant], ["requestedAt", null, instant], ["until", null, instant]])]]),
27
26
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
28
27
  };
29
28
  const UpdateOperation = {
30
29
  method: "PATCH",
31
- route: "/v1/raiz/organization/update",
30
+ route: "/v1/raiz/organization",
32
31
  body: "flat",
33
32
  response: object([["data", null, () => RaizOrganizationCodec]]),
34
33
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -1,16 +1,6 @@
1
1
  import type { RaizEmailAddress } from "../models.js";
2
2
  export type OrganizationId = string;
3
3
  export interface RaizOrganization {
4
- /**
5
- * With `expand=applications`: Arbol's applications and whether you open each
6
- * in this organization, as Account decides. Empty for a machine token, which
7
- * opens none.
8
- */
9
- applications?: {
10
- enabled: boolean;
11
- id: "raiz" | "agenda" | "ambar" | "account";
12
- opens: boolean;
13
- }[];
14
4
  capabilities: {
15
5
  managedVoiceOutbound: boolean;
16
6
  };
@@ -127,6 +127,10 @@ export interface ListResponse {
127
127
  success: true;
128
128
  }
129
129
  export interface UpdateRequest {
130
+ /**
131
+ * Communication profile id.
132
+ */
133
+ profileId: string;
130
134
  /**
131
135
  * Agent id.
132
136
  */
@@ -156,10 +160,6 @@ export interface UpdateRequest {
156
160
  * What the profile is for, as people read it.
157
161
  */
158
162
  name?: string;
159
- /**
160
- * Communication profile id.
161
- */
162
- profileId: string;
163
163
  /**
164
164
  * The approved template that opens every conversation. WhatsApp allows a
165
165
  * business to start a conversation only with one.
@@ -15,15 +15,14 @@ export function bind(transport) {
15
15
  }
16
16
  const CreateOperation = {
17
17
  method: "POST",
18
- route: "/v1/raiz/profiles/create",
18
+ route: "/v1/raiz/profiles",
19
19
  body: "flat",
20
20
  response: object([["data", null, () => RaizProfileCodec]]),
21
21
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
22
22
  };
23
23
  const GetOperation = {
24
24
  method: "GET",
25
- route: "/v1/raiz/profiles/get",
26
- query: { profileId: "profileId" },
25
+ route: "/v1/raiz/profiles/{profileId}",
27
26
  response: object([["data", null, () => RaizProfileCodec]]),
28
27
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
29
28
  };
@@ -36,7 +35,7 @@ const ListOperation = {
36
35
  };
37
36
  const UpdateOperation = {
38
37
  method: "PATCH",
39
- route: "/v1/raiz/profiles/update",
38
+ route: "/v1/raiz/profiles/{profileId}",
40
39
  body: "flat",
41
40
  response: object([["data", null, () => RaizProfileCodec]]),
42
41
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -13,7 +13,7 @@ export function bind(transport) {
13
13
  }
14
14
  const CreateOperation = {
15
15
  method: "POST",
16
- route: "/v1/raiz/suppressions/create",
16
+ route: "/v1/raiz/suppressions",
17
17
  body: "flat",
18
18
  response: object([["data", null, () => RaizSuppressionCodec]]),
19
19
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "422": true, "429": true, "500": true, "502": true, "503": true, "504": true },
@@ -57,6 +57,9 @@ export interface CancelRequest {
57
57
  * Task id.
58
58
  */
59
59
  taskId: string;
60
+ body: {
61
+ [key: string]: unknown;
62
+ };
60
63
  }
61
64
  export interface CancelResponse {
62
65
  data: RaizTask;
@@ -107,6 +110,9 @@ export interface RetryRequest {
107
110
  * Task id.
108
111
  */
109
112
  taskId: string;
113
+ body: {
114
+ [key: string]: unknown;
115
+ };
110
116
  }
111
117
  export interface RetryResponse {
112
118
  data: RaizTask;
@@ -16,15 +16,14 @@ export function bind(transport) {
16
16
  }
17
17
  const CancelOperation = {
18
18
  method: "POST",
19
- route: "/v1/raiz/tasks/cancel",
20
- body: "flat",
19
+ route: "/v1/raiz/tasks/{taskId}/cancel",
20
+ body: "nested",
21
21
  response: object([["data", null, () => RaizTaskCodec]]),
22
22
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
23
23
  };
24
24
  const GetOperation = {
25
25
  method: "GET",
26
- route: "/v1/raiz/tasks/get",
27
- query: { taskId: "taskId" },
26
+ route: "/v1/raiz/tasks/{taskId}",
28
27
  response: object([["data", null, () => RaizTaskCodec]]),
29
28
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
30
29
  };
@@ -37,8 +36,8 @@ const ListOperation = {
37
36
  };
38
37
  const RetryOperation = {
39
38
  method: "POST",
40
- route: "/v1/raiz/tasks/retry",
41
- body: "flat",
39
+ route: "/v1/raiz/tasks/{taskId}/retry",
40
+ body: "nested",
42
41
  response: object([["data", null, () => RaizTaskCodec]]),
43
42
  errors: { "400": true, "401": true, "403": true, "404": true, "405": true, "409": true, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
44
43
  };
@@ -54,7 +54,8 @@ export interface CreateRequest {
54
54
  type: "url";
55
55
  url: string;
56
56
  } | {
57
- phoneNumber: RaizPhoneNumber;
57
+ phone?: RaizPhoneNumber;
58
+ phoneNumber?: RaizPhoneNumber;
58
59
  text: string;
59
60
  type: "phone_number";
60
61
  })[];
@@ -12,7 +12,7 @@ export function bind(transport) {
12
12
  }
13
13
  const CreateOperation = {
14
14
  method: "POST",
15
- route: "/v1/raiz/templates/create",
15
+ route: "/v1/raiz/templates",
16
16
  body: "flat",
17
17
  request: object([["header", null, union([object([["example", null, object([["data", null, bytes]])]]), object([["example", null, object([["data", null, bytes]])]]), object([["example", null, object([["data", null, bytes]])]])])]]),
18
18
  response: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
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",
@@ -56,8 +56,8 @@
56
56
  "packageManager": "bun@1.4.3",
57
57
  "arbol": {
58
58
  "openapi": {
59
- "release": "1.20261031.152613",
60
- "sha256": "31b562a46a1814fea08ae43b56c1930f4e37e30db6bdc413edde3cd4cc1ba9cf"
59
+ "release": "1.20261031.154300",
60
+ "sha256": "dbc2563fac0a167d3630fc6c0c07a7594024f51bdbcb634085df02bab3d548a0"
61
61
  }
62
62
  }
63
63
  }