@arbol-ai/sdk 2.1.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +2 -1
  2. package/dist/raiz/agents/client.js +2 -2
  3. package/dist/raiz/agents/index.d.ts +1 -1
  4. package/dist/raiz/agents/models.d.ts +1 -46
  5. package/dist/raiz/agents/models.js +1 -5
  6. package/dist/raiz/bulletins/client.d.ts +182 -0
  7. package/dist/raiz/bulletins/client.js +53 -0
  8. package/dist/raiz/bulletins/index.d.ts +5 -0
  9. package/dist/raiz/bulletins/index.js +4 -0
  10. package/dist/raiz/bulletins/models.d.ts +53 -0
  11. package/dist/raiz/bulletins/models.js +12 -0
  12. package/dist/raiz/campaigns/client.js +2 -2
  13. package/dist/raiz/campaigns/index.d.ts +1 -1
  14. package/dist/raiz/campaigns/models.d.ts +6 -57
  15. package/dist/raiz/campaigns/models.js +1 -9
  16. package/dist/raiz/changes/client.js +1 -1
  17. package/dist/raiz/changes/models.d.ts +2 -2
  18. package/dist/raiz/channels/client.d.ts +100 -3
  19. package/dist/raiz/channels/client.js +26 -2
  20. package/dist/raiz/channels/index.d.ts +2 -2
  21. package/dist/raiz/channels/models.d.ts +23 -96
  22. package/dist/raiz/channels/models.js +2 -8
  23. package/dist/raiz/client.d.ts +2 -0
  24. package/dist/raiz/client.js +5 -0
  25. package/dist/raiz/contacts/client.js +6 -6
  26. package/dist/raiz/contacts/index.d.ts +1 -1
  27. package/dist/raiz/contacts/models.d.ts +4 -40
  28. package/dist/raiz/contacts/models.js +2 -8
  29. package/dist/raiz/conversations/client.d.ts +17 -11
  30. package/dist/raiz/conversations/client.js +5 -5
  31. package/dist/raiz/conversations/index.d.ts +1 -1
  32. package/dist/raiz/conversations/models.d.ts +17 -103
  33. package/dist/raiz/conversations/models.js +5 -12
  34. package/dist/raiz/definitions/client.js +2 -2
  35. package/dist/raiz/evalCases/client.js +2 -2
  36. package/dist/raiz/evalRuns/client.js +1 -1
  37. package/dist/raiz/facts/client.js +1 -1
  38. package/dist/raiz/index.d.ts +1 -1
  39. package/dist/raiz/knowledge/client.d.ts +3 -2
  40. package/dist/raiz/knowledge/client.js +4 -4
  41. package/dist/raiz/knowledge/index.d.ts +1 -1
  42. package/dist/raiz/knowledge/models.d.ts +1 -42
  43. package/dist/raiz/knowledge/models.js +1 -6
  44. package/dist/raiz/members/client.d.ts +3 -2
  45. package/dist/raiz/models.d.ts +17 -0
  46. package/dist/raiz/organization/client.d.ts +4 -2
  47. package/dist/raiz/organization/client.js +2 -2
  48. package/dist/raiz/organization/index.d.ts +1 -1
  49. package/dist/raiz/organization/models.d.ts +6 -4
  50. package/dist/raiz/profiles/client.js +2 -2
  51. package/dist/raiz/reports/client.d.ts +10 -9
  52. package/dist/raiz/reports/client.js +1 -1
  53. package/dist/raiz/reports/models.d.ts +2 -0
  54. package/dist/raiz/suppressions/client.d.ts +2 -1
  55. package/dist/raiz/suppressions/client.js +1 -1
  56. package/dist/raiz/tasks/client.js +4 -4
  57. package/dist/raiz/templates/client.d.ts +2 -1
  58. package/dist/raiz/voices/client.js +1 -1
  59. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- export type OrganizationId = string;
1
+ import type { RaizEmailAddress } from "../models.js";
2
2
  export interface RaizOrganization {
3
3
  /**
4
4
  * With `expand=applications`: Arbol's applications and whether you open each
@@ -20,7 +20,7 @@ export interface RaizOrganization {
20
20
  /**
21
21
  * Verified organization identifier.
22
22
  */
23
- id: OrganizationId;
23
+ id: RaizOrganizationId;
24
24
  /**
25
25
  * Default language of the organization's Agents (BCP 47).
26
26
  */
@@ -33,14 +33,15 @@ export interface RaizOrganization {
33
33
  };
34
34
  dailyReport: {
35
35
  enabled: boolean;
36
- recipients: string[];
36
+ recipients: RaizEmailAddress[];
37
37
  sendAt: string;
38
38
  };
39
39
  notifications: {
40
40
  escalations: boolean;
41
41
  failedOutcomes: boolean;
42
42
  failures: boolean;
43
- recipients: string[];
43
+ phones: string[];
44
+ recipients: RaizEmailAddress[];
44
45
  };
45
46
  whatsapp: {
46
47
  maxConcurrentReplies: number;
@@ -55,4 +56,5 @@ export interface RaizOrganization {
55
56
  */
56
57
  updatedAt: Temporal.Instant;
57
58
  }
59
+ export type RaizOrganizationId = string;
58
60
  export declare const RaizOrganizationCodec: import("../../_/codec.js").Codec;
@@ -25,14 +25,14 @@ const GetOperation = {
25
25
  route: "/v1/raiz/profiles/get",
26
26
  query: { profileId: "profileId" },
27
27
  response: object([["data", null, () => RaizProfileCodec]]),
28
- 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
+ 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
29
  };
30
30
  const ListOperation = {
31
31
  method: "GET",
32
32
  route: "/v1/raiz/profiles",
33
33
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", channelType: "channelType" },
34
34
  response: object([["data", null, () => RaizProfilePageCodec]]),
35
- 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 },
35
+ 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 },
36
36
  };
37
37
  const UpdateOperation = {
38
38
  method: "PATCH",
@@ -46,15 +46,16 @@ export interface CurrentRequest {
46
46
  from?: Temporal.PlainDate;
47
47
  /**
48
48
  * `conversations_daily`: conversations the AI took part in per day, Agent,
49
- * channel type and direction, with outcomes (filters `agentId`,
50
- * `channelType`); WhatsApp conversations the organization's people handled on
51
- * their own are left out. `tool_calls_daily`: AI tool calls per day, Agent
52
- * and tool, with failures and durations (filter `agentId`). `tool_calls`: the
53
- * same calls one by one, newest first, each with its conversation, status,
54
- * duration and error code, never its input or output (filter `agentId`).
55
- * `assessment_results_daily`: yes/no assessments per day and definition
56
- * (filter `definitionId`). `campaign_progress`: recipients per campaign by
57
- * status (filter `campaignId`; no date range).
49
+ * channel type and direction, with outcomes, escalations to the team and the
50
+ * conversations to review (filters `agentId`, `channelType`); WhatsApp
51
+ * conversations the organization's people handled on their own are left out.
52
+ * `tool_calls_daily`: AI tool calls per day, Agent and tool, with failures
53
+ * and durations (filter `agentId`). `tool_calls`: the same calls one by one,
54
+ * newest first, each with its conversation, status, duration and error code,
55
+ * never its input or output (filter `agentId`). `assessment_results_daily`:
56
+ * yes/no assessments per day and definition (filter `definitionId`).
57
+ * `campaign_progress`: recipients per campaign by status (filter
58
+ * `campaignId`; no date range).
58
59
  */
59
60
  name: "conversations_daily" | "tool_calls_daily" | "tool_calls" | "assessment_results_daily" | "campaign_progress";
60
61
  /**
@@ -15,5 +15,5 @@ const CurrentOperation = {
15
15
  route: "/v1/raiz/reports",
16
16
  query: { agentId: "agentId", campaignId: "campaignId", channelType: "channelType", definitionId: "definitionId", from: "from", name: "name", to: "to" },
17
17
  response: object([["data", null, () => RaizReportCodec]]),
18
- 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 },
18
+ 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 },
19
19
  };
@@ -10,9 +10,11 @@ export type RaizReport = {
10
10
  conversationCount: number;
11
11
  day: Temporal.PlainDate;
12
12
  direction: "inbound" | "outbound";
13
+ escalatedCount: number;
13
14
  failureCount: number;
14
15
  negativeCount: number;
15
16
  successCount: number;
17
+ toReviewCount: number;
16
18
  }[];
17
19
  to: Temporal.PlainDate;
18
20
  } | {
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
2
  import type { ResponseMetadata } from "../../models.js";
3
+ import type { RaizPhoneNumber } from "../models.js";
3
4
  import { type RaizSuppression, type RaizSuppressionPage } from "./models.js";
4
5
  export interface ClientOptions extends BaseClientOptions {
5
6
  /**
@@ -32,7 +33,7 @@ export declare function createClient(options: ClientOptions): Client;
32
33
  export declare function bind(transport: Transport): Client;
33
34
  export type CreateRequest = {
34
35
  kind: "phone";
35
- phone: string;
36
+ phone: RaizPhoneNumber;
36
37
  reason: string;
37
38
  } | {
38
39
  kind: "phone_prefix";
@@ -23,5 +23,5 @@ const ListOperation = {
23
23
  route: "/v1/raiz/suppressions",
24
24
  query: { cursor: "cursor", direction: "direction", limit: "limit", kind: "kind", phone: "phone", q: "q" },
25
25
  response: object([["data", null, () => RaizSuppressionPageCodec]]),
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 },
26
+ 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
27
  };
@@ -19,26 +19,26 @@ const CancelOperation = {
19
19
  route: "/v1/raiz/tasks/cancel",
20
20
  body: "flat",
21
21
  response: object([["data", null, () => RaizTaskCodec]]),
22
- 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
+ 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
26
  route: "/v1/raiz/tasks/get",
27
27
  query: { taskId: "taskId" },
28
28
  response: object([["data", null, () => RaizTaskCodec]]),
29
- 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 },
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
  };
31
31
  const ListOperation = {
32
32
  method: "GET",
33
33
  route: "/v1/raiz/tasks",
34
34
  query: { cursor: "cursor", direction: "direction", limit: "limit", kind: "kind", status: "status" },
35
35
  response: object([["data", null, () => RaizTaskPageCodec]]),
36
- 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 },
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 },
37
37
  };
38
38
  const RetryOperation = {
39
39
  method: "POST",
40
40
  route: "/v1/raiz/tasks/retry",
41
41
  body: "flat",
42
42
  response: object([["data", null, () => RaizTaskCodec]]),
43
- 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 },
43
+ 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
44
  };
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
2
  import type { ResponseMetadata } from "../../models.js";
3
+ import type { RaizPhoneNumber } from "../models.js";
3
4
  import type { RaizTemplate, RaizTemplatePage } from "./models.js";
4
5
  export interface ClientOptions extends BaseClientOptions {
5
6
  /**
@@ -53,7 +54,7 @@ export interface CreateRequest {
53
54
  type: "url";
54
55
  url: string;
55
56
  } | {
56
- phoneNumber: string;
57
+ phoneNumber: RaizPhoneNumber;
57
58
  text: string;
58
59
  type: "phone_number";
59
60
  })[];
@@ -14,5 +14,5 @@ const ListOperation = {
14
14
  route: "/v1/raiz/voices",
15
15
  query: { cursor: "cursor", direction: "direction", limit: "limit", language: "language", q: "q" },
16
16
  response: null,
17
- 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 },
17
+ 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 },
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbol-ai/sdk",
3
- "version": "2.1.0",
3
+ "version": "2.3.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",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public",
36
- "provenance": true
36
+ "provenance": false
37
37
  },
38
38
  "scripts": {
39
39
  "forge": "cargo install --quiet --locked --git https://github.com/cloudflare/forge --rev 7f86447210b7bea3779bfdab3cd5655eade0eadb --root .forge forge",
@@ -50,8 +50,8 @@
50
50
  "packageManager": "bun@1.4.3",
51
51
  "arbol": {
52
52
  "openapi": {
53
- "release": "1.20261019.4056",
54
- "sha256": "a160f98ddd0944d6e78111d113869b22cac6caabc036bb47f7609c009c37e501"
53
+ "release": "1.20261020.151758",
54
+ "sha256": "5b020e784bbc5ad68a94649af77543cd8c2b16717386ba15b59a9f7b7c71fe53"
55
55
  }
56
56
  }
57
57
  }