@arbol-ai/sdk 2.19.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.
Files changed (233) hide show
  1. package/README.md +19 -1
  2. package/dist/client.d.ts +4 -0
  3. package/dist/client.js +10 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/models.d.ts +396 -0
  6. package/dist/models.js +5 -1
  7. package/dist/nuevaEps/affiliations/models.d.ts +6 -5
  8. package/dist/nuevaEps/connections/models.d.ts +18 -18
  9. package/dist/nuevaEps/index.d.ts +1 -1
  10. package/dist/nuevaEps/models.d.ts +16 -232
  11. package/dist/{visoft/tools → orsovision/agencies}/client.d.ts +13 -19
  12. package/dist/{visoft/tools → orsovision/agencies}/client.js +2 -2
  13. package/dist/orsovision/agencies/index.d.ts +5 -0
  14. package/dist/orsovision/agencies/models.d.ts +107 -0
  15. package/dist/orsovision/appointments/client.d.ts +39 -0
  16. package/dist/orsovision/appointments/client.js +29 -0
  17. package/dist/orsovision/appointments/index.d.ts +5 -0
  18. package/dist/orsovision/appointments/models.d.ts +206 -0
  19. package/dist/orsovision/appointments/models.js +9 -0
  20. package/dist/orsovision/availability/client.d.ts +32 -0
  21. package/dist/orsovision/availability/client.js +19 -0
  22. package/dist/orsovision/availability/index.d.ts +5 -0
  23. package/dist/orsovision/availability/models.d.ts +239 -0
  24. package/dist/orsovision/availability/models.js +15 -0
  25. package/dist/orsovision/client.d.ts +27 -0
  26. package/dist/orsovision/client.js +50 -0
  27. package/dist/orsovision/clinic/client.d.ts +34 -0
  28. package/dist/{visoft/specialtyRules → orsovision/clinic}/client.js +3 -3
  29. package/dist/orsovision/clinic/index.d.ts +5 -0
  30. package/dist/orsovision/clinic/models.d.ts +89 -0
  31. package/dist/orsovision/contracts/client.d.ts +69 -0
  32. package/dist/orsovision/contracts/client.js +18 -0
  33. package/dist/orsovision/contracts/index.d.ts +5 -0
  34. package/dist/orsovision/contracts/models.d.ts +108 -0
  35. package/dist/orsovision/index.d.ts +5 -0
  36. package/dist/orsovision/index.js +4 -0
  37. package/dist/orsovision/models.d.ts +227 -0
  38. package/dist/orsovision/patients/client.d.ts +52 -0
  39. package/dist/orsovision/patients/client.js +34 -0
  40. package/dist/orsovision/patients/index.d.ts +5 -0
  41. package/dist/orsovision/patients/models.d.ts +297 -0
  42. package/dist/orsovision/patients/models.js +3 -0
  43. package/dist/orsovision/services/client.d.ts +74 -0
  44. package/dist/orsovision/services/client.js +18 -0
  45. package/dist/orsovision/services/index.d.ts +5 -0
  46. package/dist/orsovision/services/index.js +4 -0
  47. package/dist/orsovision/services/models.d.ts +105 -0
  48. package/dist/orsovision/services/models.js +3 -0
  49. package/dist/orsovision/tools/client.d.ts +44 -0
  50. package/dist/{raiz/roles → orsovision/tools}/client.js +3 -3
  51. package/dist/orsovision/tools/index.d.ts +5 -0
  52. package/dist/orsovision/tools/index.js +4 -0
  53. package/dist/orsovision/tools/models.d.ts +101 -0
  54. package/dist/orsovision/tools/models.js +3 -0
  55. package/dist/raiz/agents/client.js +3 -4
  56. package/dist/raiz/agents/models.d.ts +1 -0
  57. package/dist/raiz/bulletins/client.d.ts +4 -1
  58. package/dist/raiz/bulletins/client.js +5 -6
  59. package/dist/raiz/campaigns/client.d.ts +6 -5
  60. package/dist/raiz/campaigns/client.js +4 -4
  61. package/dist/raiz/channels/client.d.ts +19 -5
  62. package/dist/raiz/channels/client.js +9 -9
  63. package/dist/raiz/client.d.ts +0 -4
  64. package/dist/raiz/client.js +0 -10
  65. package/dist/raiz/contacts/client.js +4 -4
  66. package/dist/raiz/conversations/client.d.ts +7 -4
  67. package/dist/raiz/conversations/client.js +6 -6
  68. package/dist/raiz/definitions/client.d.ts +4 -4
  69. package/dist/raiz/definitions/client.js +3 -4
  70. package/dist/raiz/evalCases/client.d.ts +13 -12
  71. package/dist/raiz/evalCases/client.js +2 -2
  72. package/dist/raiz/evalRuns/client.d.ts +7 -4
  73. package/dist/raiz/evalRuns/client.js +2 -3
  74. package/dist/raiz/evalRuns/models.d.ts +7 -1
  75. package/dist/raiz/facts/client.js +2 -2
  76. package/dist/raiz/knowledge/client.d.ts +17 -11
  77. package/dist/raiz/knowledge/client.js +4 -4
  78. package/dist/raiz/models.d.ts +0 -42
  79. package/dist/raiz/organization/client.d.ts +38 -42
  80. package/dist/raiz/organization/client.js +11 -12
  81. package/dist/raiz/organization/index.d.ts +1 -1
  82. package/dist/raiz/organization/models.d.ts +0 -10
  83. package/dist/raiz/profiles/client.d.ts +4 -4
  84. package/dist/raiz/profiles/client.js +3 -4
  85. package/dist/raiz/reports/client.d.ts +3 -3
  86. package/dist/raiz/reports/client.js +2 -2
  87. package/dist/raiz/reports/index.d.ts +1 -1
  88. package/dist/raiz/suppressions/client.js +1 -1
  89. package/dist/raiz/tasks/client.d.ts +6 -0
  90. package/dist/raiz/tasks/client.js +5 -6
  91. package/dist/raiz/templates/client.d.ts +2 -1
  92. package/dist/raiz/templates/client.js +1 -1
  93. package/dist/somos/appointments/client.d.ts +40 -0
  94. package/dist/somos/appointments/client.js +29 -0
  95. package/dist/somos/appointments/index.d.ts +5 -0
  96. package/dist/somos/appointments/index.js +4 -0
  97. package/dist/somos/appointments/models.d.ts +301 -0
  98. package/dist/somos/appointments/models.js +9 -0
  99. package/dist/somos/availability/client.d.ts +33 -0
  100. package/dist/somos/availability/client.js +19 -0
  101. package/dist/somos/availability/index.d.ts +5 -0
  102. package/dist/somos/availability/index.js +4 -0
  103. package/dist/somos/availability/models.d.ts +340 -0
  104. package/dist/somos/availability/models.js +15 -0
  105. package/dist/somos/client.d.ts +29 -0
  106. package/dist/somos/client.js +55 -0
  107. package/dist/somos/clinic/client.d.ts +33 -0
  108. package/dist/somos/clinic/client.js +18 -0
  109. package/dist/somos/clinic/index.d.ts +5 -0
  110. package/dist/somos/clinic/index.js +4 -0
  111. package/dist/somos/clinic/models.d.ts +89 -0
  112. package/dist/somos/clinic/models.js +3 -0
  113. package/dist/somos/contracts/client.d.ts +74 -0
  114. package/dist/somos/contracts/client.js +18 -0
  115. package/dist/somos/contracts/index.d.ts +5 -0
  116. package/dist/somos/contracts/index.js +4 -0
  117. package/dist/somos/contracts/models.d.ts +107 -0
  118. package/dist/somos/contracts/models.js +3 -0
  119. package/dist/somos/groups/client.d.ts +67 -0
  120. package/dist/{visoft → somos}/groups/client.js +2 -2
  121. package/dist/somos/groups/index.d.ts +5 -0
  122. package/dist/somos/groups/index.js +4 -0
  123. package/dist/somos/groups/models.d.ts +117 -0
  124. package/dist/somos/groups/models.js +3 -0
  125. package/dist/somos/index.d.ts +5 -0
  126. package/dist/somos/index.js +4 -0
  127. package/dist/somos/models.d.ts +227 -0
  128. package/dist/somos/models.js +3 -0
  129. package/dist/somos/patients/client.d.ts +51 -0
  130. package/dist/somos/patients/client.js +34 -0
  131. package/dist/somos/patients/index.d.ts +5 -0
  132. package/dist/somos/patients/index.js +4 -0
  133. package/dist/somos/patients/models.d.ts +327 -0
  134. package/dist/somos/patients/models.js +3 -0
  135. package/dist/somos/services/client.d.ts +117 -0
  136. package/dist/somos/services/client.js +26 -0
  137. package/dist/somos/services/index.d.ts +5 -0
  138. package/dist/somos/services/index.js +4 -0
  139. package/dist/somos/services/models.d.ts +272 -0
  140. package/dist/somos/services/models.js +3 -0
  141. package/dist/somos/specialtyRules/client.d.ts +44 -0
  142. package/dist/somos/specialtyRules/client.js +18 -0
  143. package/dist/somos/specialtyRules/index.d.ts +5 -0
  144. package/dist/somos/specialtyRules/index.js +4 -0
  145. package/dist/somos/specialtyRules/models.d.ts +54 -0
  146. package/dist/somos/specialtyRules/models.js +3 -0
  147. package/dist/{raiz/roles → somos/tools}/client.d.ts +14 -12
  148. package/dist/{visoft/agencies → somos/tools}/client.js +3 -3
  149. package/dist/somos/tools/index.d.ts +5 -0
  150. package/dist/somos/tools/index.js +4 -0
  151. package/dist/somos/tools/models.d.ts +101 -0
  152. package/dist/somos/tools/models.js +3 -0
  153. package/dist/visoft/appointments/client.d.ts +20 -194
  154. package/dist/visoft/appointments/client.js +5 -4
  155. package/dist/visoft/appointments/index.d.ts +1 -0
  156. package/dist/visoft/appointments/models.d.ts +391 -0
  157. package/dist/visoft/appointments/models.js +15 -0
  158. package/dist/visoft/availability/client.d.ts +10 -164
  159. package/dist/visoft/availability/client.js +9 -9
  160. package/dist/visoft/availability/index.d.ts +2 -2
  161. package/dist/visoft/availability/models.d.ts +154 -64
  162. package/dist/visoft/availability/models.js +10 -8
  163. package/dist/visoft/client.d.ts +6 -8
  164. package/dist/visoft/client.js +15 -20
  165. package/dist/visoft/clinic/client.d.ts +30 -0
  166. package/dist/visoft/clinic/client.js +18 -0
  167. package/dist/visoft/{specialtyRules → clinic}/index.d.ts +1 -0
  168. package/dist/visoft/clinic/index.js +4 -0
  169. package/dist/visoft/clinic/models.d.ts +13 -0
  170. package/dist/visoft/clinic/models.js +3 -0
  171. package/dist/visoft/clinics/client.d.ts +2 -31
  172. package/dist/visoft/clinics/client.js +1 -8
  173. package/dist/visoft/clinics/index.d.ts +2 -2
  174. package/dist/visoft/clinics/models.d.ts +13 -24
  175. package/dist/visoft/connections/client.d.ts +17 -74
  176. package/dist/visoft/connections/client.js +10 -11
  177. package/dist/visoft/connections/index.d.ts +1 -1
  178. package/dist/visoft/connections/models.d.ts +93 -1
  179. package/dist/visoft/connections/models.js +6 -0
  180. package/dist/visoft/contracts/client.d.ts +14 -49
  181. package/dist/visoft/contracts/client.js +2 -2
  182. package/dist/visoft/contracts/index.d.ts +1 -1
  183. package/dist/visoft/contracts/models.d.ts +43 -7
  184. package/dist/visoft/index.d.ts +1 -1
  185. package/dist/visoft/models.d.ts +311 -139
  186. package/dist/visoft/patients/client.d.ts +24 -264
  187. package/dist/visoft/patients/client.js +7 -6
  188. package/dist/visoft/patients/index.d.ts +1 -0
  189. package/dist/visoft/patients/models.d.ts +737 -0
  190. package/dist/visoft/patients/models.js +15 -0
  191. package/dist/visoft/professionals/client.d.ts +56 -0
  192. package/dist/visoft/professionals/client.js +18 -0
  193. package/dist/visoft/professionals/index.d.ts +5 -0
  194. package/dist/visoft/professionals/index.js +4 -0
  195. package/dist/visoft/professionals/models.d.ts +54 -0
  196. package/dist/visoft/professionals/models.js +3 -0
  197. package/dist/visoft/serviceCatalogs/client.d.ts +45 -0
  198. package/dist/visoft/serviceCatalogs/client.js +18 -0
  199. package/dist/visoft/serviceCatalogs/index.d.ts +5 -0
  200. package/dist/visoft/serviceCatalogs/index.js +4 -0
  201. package/dist/visoft/serviceCatalogs/models.d.ts +68 -0
  202. package/dist/visoft/serviceCatalogs/models.js +3 -0
  203. package/dist/visoft/services/client.d.ts +25 -61
  204. package/dist/visoft/services/client.js +2 -2
  205. package/dist/visoft/services/index.d.ts +1 -1
  206. package/dist/visoft/services/models.d.ts +52 -15
  207. package/package.json +9 -3
  208. package/dist/raiz/members/client.d.ts +0 -102
  209. package/dist/raiz/members/client.js +0 -35
  210. package/dist/raiz/members/index.d.ts +0 -5
  211. package/dist/raiz/members/models.d.ts +0 -48
  212. package/dist/raiz/members/models.js +0 -10
  213. package/dist/raiz/roles/index.d.ts +0 -5
  214. package/dist/raiz/roles/models.d.ts +0 -32
  215. package/dist/visoft/agencies/client.d.ts +0 -58
  216. package/dist/visoft/agencies/index.d.ts +0 -5
  217. package/dist/visoft/agencies/models.d.ts +0 -29
  218. package/dist/visoft/groups/client.d.ts +0 -69
  219. package/dist/visoft/groups/index.d.ts +0 -5
  220. package/dist/visoft/groups/models.d.ts +0 -39
  221. package/dist/visoft/specialtyRules/client.d.ts +0 -50
  222. package/dist/visoft/tools/index.d.ts +0 -5
  223. package/dist/visoft/tools/models.d.ts +0 -37
  224. /package/dist/{raiz/members → orsovision/agencies}/index.js +0 -0
  225. /package/dist/{raiz/roles → orsovision/agencies}/models.js +0 -0
  226. /package/dist/{raiz/roles → orsovision/appointments}/index.js +0 -0
  227. /package/dist/{visoft/agencies → orsovision/availability}/index.js +0 -0
  228. /package/dist/{visoft/groups → orsovision/clinic}/index.js +0 -0
  229. /package/dist/{visoft/agencies → orsovision/clinic}/models.js +0 -0
  230. /package/dist/{visoft/specialtyRules → orsovision/contracts}/index.js +0 -0
  231. /package/dist/{visoft/groups → orsovision/contracts}/models.js +0 -0
  232. /package/dist/{visoft/tools → orsovision}/models.js +0 -0
  233. /package/dist/{visoft/tools → orsovision/patients}/index.js +0 -0
@@ -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 },
@@ -11,11 +11,9 @@ import { type Client as EvalCasesClient } from "./evalCases/client.js";
11
11
  import { type Client as EvalRunsClient } from "./evalRuns/client.js";
12
12
  import { type Client as FactsClient } from "./facts/client.js";
13
13
  import { type Client as KnowledgeClient } from "./knowledge/client.js";
14
- import { type Client as MembersClient } from "./members/client.js";
15
14
  import { type Client as OrganizationClient } from "./organization/client.js";
16
15
  import { type Client as ProfilesClient } from "./profiles/client.js";
17
16
  import { type Client as ReportsClient } from "./reports/client.js";
18
- import { type Client as RolesClient } from "./roles/client.js";
19
17
  import { type Client as SuppressionsClient } from "./suppressions/client.js";
20
18
  import { type Client as TasksClient } from "./tasks/client.js";
21
19
  import { type Client as TemplatesClient } from "./templates/client.js";
@@ -39,11 +37,9 @@ export interface Client {
39
37
  readonly evalRuns: EvalRunsClient;
40
38
  readonly facts: FactsClient;
41
39
  readonly knowledge: KnowledgeClient;
42
- readonly members: MembersClient;
43
40
  readonly organization: OrganizationClient;
44
41
  readonly profiles: ProfilesClient;
45
42
  readonly reports: ReportsClient;
46
- readonly roles: RolesClient;
47
43
  readonly suppressions: SuppressionsClient;
48
44
  readonly tasks: TasksClient;
49
45
  readonly templates: TemplatesClient;
@@ -13,11 +13,9 @@ import { bind as bindEvalCases, } from "./evalCases/client.js";
13
13
  import { bind as bindEvalRuns, } from "./evalRuns/client.js";
14
14
  import { bind as bindFacts, } from "./facts/client.js";
15
15
  import { bind as bindKnowledge, } from "./knowledge/client.js";
16
- import { bind as bindMembers, } from "./members/client.js";
17
16
  import { bind as bindOrganization, } from "./organization/client.js";
18
17
  import { bind as bindProfiles, } from "./profiles/client.js";
19
18
  import { bind as bindReports, } from "./reports/client.js";
20
- import { bind as bindRoles, } from "./roles/client.js";
21
19
  import { bind as bindSuppressions, } from "./suppressions/client.js";
22
20
  import { bind as bindTasks, } from "./tasks/client.js";
23
21
  import { bind as bindTemplates, } from "./templates/client.js";
@@ -38,11 +36,9 @@ export function bind(transport) {
38
36
  let evalRunsClient;
39
37
  let factsClient;
40
38
  let knowledgeClient;
41
- let membersClient;
42
39
  let organizationClient;
43
40
  let profilesClient;
44
41
  let reportsClient;
45
- let rolesClient;
46
42
  let suppressionsClient;
47
43
  let tasksClient;
48
44
  let templatesClient;
@@ -84,9 +80,6 @@ export function bind(transport) {
84
80
  get knowledge() {
85
81
  return (knowledgeClient ??= bindKnowledge(transport));
86
82
  },
87
- get members() {
88
- return (membersClient ??= bindMembers(transport));
89
- },
90
83
  get organization() {
91
84
  return (organizationClient ??= bindOrganization(transport));
92
85
  },
@@ -96,9 +89,6 @@ export function bind(transport) {
96
89
  get reports() {
97
90
  return (reportsClient ??= bindReports(transport));
98
91
  },
99
- get roles() {
100
- return (rolesClient ??= bindRoles(transport));
101
- },
102
92
  get suppressions() {
103
93
  return (suppressionsClient ??= bindSuppressions(transport));
104
94
  },
@@ -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: {