@arbol-ai/sdk 3.0.0 → 4.0.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 (236) hide show
  1. package/README.md +23 -0
  2. package/dist/account/apiKeys/client.d.ts +15 -47
  3. package/dist/account/apiKeys/client.js +11 -12
  4. package/dist/account/apiKeys/index.d.ts +1 -1
  5. package/dist/account/apiKeys/models.d.ts +164 -1
  6. package/dist/account/apiKeys/models.js +6 -0
  7. package/dist/account/billing/client.d.ts +4 -10
  8. package/dist/account/billing/client.js +7 -7
  9. package/dist/account/billing/index.d.ts +2 -2
  10. package/dist/account/billing/models.d.ts +32 -0
  11. package/dist/account/billing/models.js +5 -2
  12. package/dist/account/billingProfiles/client.d.ts +13 -24
  13. package/dist/account/billingProfiles/client.js +4 -4
  14. package/dist/account/billingProfiles/index.d.ts +1 -1
  15. package/dist/account/billingProfiles/models.d.ts +48 -0
  16. package/dist/account/client.d.ts +6 -0
  17. package/dist/account/client.js +15 -0
  18. package/dist/account/connections/client.d.ts +2 -200
  19. package/dist/account/connections/client.js +1 -25
  20. package/dist/account/connections/index.d.ts +2 -2
  21. package/dist/account/connections/models.d.ts +22 -7
  22. package/dist/account/index.d.ts +1 -1
  23. package/dist/account/invitations/client.d.ts +9 -38
  24. package/dist/account/invitations/client.js +8 -9
  25. package/dist/account/invitations/index.d.ts +1 -1
  26. package/dist/account/invitations/models.d.ts +221 -2
  27. package/dist/account/invitations/models.js +6 -0
  28. package/dist/account/invoiceDocuments/client.d.ts +25 -0
  29. package/dist/account/invoiceDocuments/client.js +17 -0
  30. package/dist/account/invoiceDocuments/index.d.ts +5 -0
  31. package/dist/account/invoiceDocuments/index.js +4 -0
  32. package/dist/account/invoiceDocuments/models.d.ts +35 -0
  33. package/dist/account/invoiceDocuments/models.js +3 -0
  34. package/dist/account/invoices/client.d.ts +7 -34
  35. package/dist/account/invoices/client.js +7 -14
  36. package/dist/account/invoices/index.d.ts +2 -2
  37. package/dist/account/invoices/models.d.ts +66 -1
  38. package/dist/account/invoices/models.js +8 -0
  39. package/dist/account/members/client.d.ts +14 -55
  40. package/dist/account/members/client.js +6 -7
  41. package/dist/account/members/index.d.ts +1 -1
  42. package/dist/account/members/models.d.ts +261 -2
  43. package/dist/account/models.d.ts +210 -259
  44. package/dist/account/organization/client.d.ts +31 -0
  45. package/dist/account/organization/client.js +25 -0
  46. package/dist/account/organization/index.d.ts +5 -0
  47. package/dist/account/organization/index.js +4 -0
  48. package/dist/account/organization/models.d.ts +89 -0
  49. package/dist/account/organization/models.js +3 -0
  50. package/dist/account/organizations/client.d.ts +2 -48
  51. package/dist/account/organizations/client.js +1 -16
  52. package/dist/account/organizations/index.d.ts +2 -2
  53. package/dist/account/organizations/models.d.ts +26 -37
  54. package/dist/account/payments/client.d.ts +2 -8
  55. package/dist/account/payments/client.js +4 -4
  56. package/dist/account/payments/index.d.ts +1 -1
  57. package/dist/account/payments/models.d.ts +28 -1
  58. package/dist/account/payments/models.js +3 -0
  59. package/dist/account/permissions/client.d.ts +2 -8
  60. package/dist/account/permissions/client.js +1 -1
  61. package/dist/account/permissions/index.d.ts +1 -1
  62. package/dist/account/permissions/models.d.ts +27 -1
  63. package/dist/account/roles/client.d.ts +2 -8
  64. package/dist/account/roles/client.js +1 -1
  65. package/dist/account/roles/index.d.ts +1 -1
  66. package/dist/account/roles/models.d.ts +27 -1
  67. package/dist/account/usage/client.d.ts +7 -44
  68. package/dist/account/usage/client.js +5 -13
  69. package/dist/account/usage/index.d.ts +2 -2
  70. package/dist/account/usage/models.d.ts +27 -1
  71. package/dist/account/usageSummary/client.d.ts +26 -0
  72. package/dist/account/usageSummary/client.js +19 -0
  73. package/dist/account/usageSummary/index.d.ts +5 -0
  74. package/dist/account/usageSummary/index.js +4 -0
  75. package/dist/account/usageSummary/models.d.ts +50 -0
  76. package/dist/account/usageSummary/models.js +9 -0
  77. package/dist/account/walletTransactions/client.d.ts +2 -8
  78. package/dist/account/walletTransactions/client.js +4 -4
  79. package/dist/account/walletTransactions/index.d.ts +1 -1
  80. package/dist/account/walletTransactions/models.d.ts +28 -1
  81. package/dist/account/walletTransactions/models.js +3 -0
  82. package/dist/agenda/appointments/client.d.ts +6 -7
  83. package/dist/agenda/availability/client.d.ts +3 -4
  84. package/dist/agenda/bookings/client.d.ts +11 -12
  85. package/dist/agenda/index.d.ts +1 -1
  86. package/dist/agenda/locations/client.d.ts +2 -3
  87. package/dist/agenda/locations/client.js +1 -1
  88. package/dist/agenda/models.d.ts +8 -2
  89. package/dist/agenda/offerings/client.d.ts +4 -4
  90. package/dist/agenda/resources/client.d.ts +4 -4
  91. package/dist/agenda/scheduleRules/client.d.ts +4 -4
  92. package/dist/agenda/services/client.d.ts +4 -4
  93. package/dist/agenda/waitlist/client.d.ts +3 -4
  94. package/dist/axxa/authorizations/client.d.ts +2 -2
  95. package/dist/axxa/connections/client.d.ts +6 -5
  96. package/dist/axxa/eligibility/client.d.ts +2 -2
  97. package/dist/axxa/index.d.ts +1 -1
  98. package/dist/axxa/models.d.ts +8 -2
  99. package/dist/axxa/provider/client.d.ts +2 -2
  100. package/dist/gmedic/agendaServices/client.d.ts +2 -2
  101. package/dist/gmedic/agendas/client.d.ts +2 -2
  102. package/dist/gmedic/appointments/client.d.ts +4 -4
  103. package/dist/gmedic/availability/client.d.ts +2 -2
  104. package/dist/gmedic/availableDays/client.d.ts +2 -2
  105. package/dist/gmedic/branchOffices/client.d.ts +2 -2
  106. package/dist/gmedic/connections/client.d.ts +6 -5
  107. package/dist/gmedic/dictionaryEntries/client.d.ts +2 -2
  108. package/dist/gmedic/healthPartners/client.d.ts +2 -2
  109. package/dist/gmedic/healthPromotionEntities/client.d.ts +2 -2
  110. package/dist/gmedic/index.d.ts +1 -1
  111. package/dist/gmedic/laboralRiskManagers/client.d.ts +2 -2
  112. package/dist/gmedic/models.d.ts +8 -2
  113. package/dist/gmedic/occupations/client.d.ts +2 -2
  114. package/dist/gmedic/patientNotes/client.d.ts +4 -4
  115. package/dist/gmedic/patients/client.d.ts +4 -4
  116. package/dist/gmedic/services/client.d.ts +2 -2
  117. package/dist/gmedic/sessionPackages/client.d.ts +3 -3
  118. package/dist/index.d.ts +1 -1
  119. package/dist/models.d.ts +293 -5
  120. package/dist/nuevaEps/affiliations/models.d.ts +8 -8
  121. package/dist/nuevaEps/connections/client.d.ts +3 -2
  122. package/dist/nuevaEps/connections/index.d.ts +1 -1
  123. package/dist/nuevaEps/connections/models.d.ts +25 -37
  124. package/dist/nuevaEps/index.d.ts +1 -1
  125. package/dist/nuevaEps/models.d.ts +2 -101
  126. package/dist/orsovision/agencies/models.d.ts +8 -8
  127. package/dist/orsovision/appointments/client.d.ts +3 -3
  128. package/dist/orsovision/appointments/index.d.ts +1 -1
  129. package/dist/orsovision/appointments/models.d.ts +8 -32
  130. package/dist/orsovision/availability/index.d.ts +1 -1
  131. package/dist/orsovision/availability/models.d.ts +9 -20
  132. package/dist/orsovision/clinic/index.d.ts +1 -1
  133. package/dist/orsovision/clinic/models.d.ts +9 -8
  134. package/dist/orsovision/contracts/index.d.ts +1 -1
  135. package/dist/orsovision/contracts/models.d.ts +6 -30
  136. package/dist/orsovision/index.d.ts +1 -1
  137. package/dist/orsovision/models.d.ts +1 -162
  138. package/dist/orsovision/patients/client.d.ts +4 -4
  139. package/dist/orsovision/patients/index.d.ts +1 -1
  140. package/dist/orsovision/patients/models.d.ts +17 -27
  141. package/dist/orsovision/services/index.d.ts +1 -1
  142. package/dist/orsovision/services/models.d.ts +6 -30
  143. package/dist/orsovision/tools/index.d.ts +1 -1
  144. package/dist/orsovision/tools/models.d.ts +9 -8
  145. package/dist/raiz/agents/client.d.ts +5 -6
  146. package/dist/raiz/agents/client.js +3 -4
  147. package/dist/raiz/agents/models.d.ts +1 -0
  148. package/dist/raiz/bulletins/client.d.ts +11 -7
  149. package/dist/raiz/bulletins/client.js +5 -6
  150. package/dist/raiz/campaigns/client.d.ts +11 -11
  151. package/dist/raiz/campaigns/client.js +4 -4
  152. package/dist/raiz/changes/client.d.ts +2 -2
  153. package/dist/raiz/channels/client.d.ts +28 -14
  154. package/dist/raiz/channels/client.js +9 -9
  155. package/dist/raiz/contacts/client.d.ts +7 -8
  156. package/dist/raiz/contacts/client.js +5 -5
  157. package/dist/raiz/conversations/client.d.ts +15 -12
  158. package/dist/raiz/conversations/client.js +6 -6
  159. package/dist/raiz/definitions/client.d.ts +9 -9
  160. package/dist/raiz/definitions/client.js +3 -4
  161. package/dist/raiz/evalCases/client.d.ts +17 -16
  162. package/dist/raiz/evalCases/client.js +2 -2
  163. package/dist/raiz/evalRuns/client.d.ts +10 -8
  164. package/dist/raiz/evalRuns/client.js +2 -3
  165. package/dist/raiz/evalRuns/models.d.ts +7 -1
  166. package/dist/raiz/facts/client.d.ts +3 -4
  167. package/dist/raiz/facts/client.js +3 -3
  168. package/dist/raiz/index.d.ts +1 -1
  169. package/dist/raiz/knowledge/client.d.ts +23 -18
  170. package/dist/raiz/knowledge/client.js +4 -4
  171. package/dist/raiz/models.d.ts +8 -44
  172. package/dist/raiz/organization/client.d.ts +6 -11
  173. package/dist/raiz/organization/client.js +2 -3
  174. package/dist/raiz/organization/models.d.ts +0 -10
  175. package/dist/raiz/profiles/client.d.ts +9 -10
  176. package/dist/raiz/profiles/client.js +3 -4
  177. package/dist/raiz/reports/client.d.ts +2 -2
  178. package/dist/raiz/suppressions/client.d.ts +3 -4
  179. package/dist/raiz/suppressions/client.js +1 -1
  180. package/dist/raiz/tasks/client.d.ts +11 -6
  181. package/dist/raiz/tasks/client.js +6 -7
  182. package/dist/raiz/templates/client.d.ts +5 -5
  183. package/dist/raiz/templates/client.js +1 -1
  184. package/dist/raiz/voices/client.d.ts +2 -2
  185. package/dist/somos/appointments/client.d.ts +3 -3
  186. package/dist/somos/appointments/index.d.ts +1 -1
  187. package/dist/somos/appointments/models.d.ts +14 -12
  188. package/dist/somos/availability/index.d.ts +1 -1
  189. package/dist/somos/availability/models.d.ts +9 -20
  190. package/dist/somos/clinic/index.d.ts +1 -1
  191. package/dist/somos/clinic/models.d.ts +9 -8
  192. package/dist/somos/contracts/index.d.ts +1 -1
  193. package/dist/somos/contracts/models.d.ts +9 -20
  194. package/dist/somos/groups/models.d.ts +9 -9
  195. package/dist/somos/index.d.ts +1 -1
  196. package/dist/somos/models.d.ts +12 -151
  197. package/dist/somos/patients/client.d.ts +4 -4
  198. package/dist/somos/patients/index.d.ts +1 -1
  199. package/dist/somos/patients/models.d.ts +20 -17
  200. package/dist/somos/services/index.d.ts +1 -1
  201. package/dist/somos/services/models.d.ts +15 -26
  202. package/dist/somos/specialtyRules/client.d.ts +2 -2
  203. package/dist/somos/specialtyRules/models.d.ts +7 -7
  204. package/dist/somos/tools/index.d.ts +1 -1
  205. package/dist/somos/tools/models.d.ts +9 -8
  206. package/dist/sura/affiliations/client.d.ts +2 -3
  207. package/dist/sura/appointments/client.d.ts +5 -6
  208. package/dist/sura/authorizations/client.d.ts +2 -3
  209. package/dist/sura/availability/client.d.ts +2 -3
  210. package/dist/sura/connections/client.d.ts +6 -5
  211. package/dist/sura/copays/client.d.ts +2 -3
  212. package/dist/sura/index.d.ts +1 -1
  213. package/dist/sura/models.d.ts +8 -2
  214. package/dist/sura/operations/client.d.ts +2 -3
  215. package/dist/sura/patients/client.d.ts +2 -3
  216. package/dist/sura/professionals/client.d.ts +2 -3
  217. package/dist/sura/services/client.d.ts +2 -3
  218. package/dist/visoft/appointments/index.d.ts +1 -1
  219. package/dist/visoft/appointments/models.d.ts +8 -32
  220. package/dist/visoft/availability/models.d.ts +6 -6
  221. package/dist/visoft/clinic/models.d.ts +3 -2
  222. package/dist/visoft/clinics/models.d.ts +3 -3
  223. package/dist/visoft/connections/client.d.ts +3 -2
  224. package/dist/visoft/connections/index.d.ts +1 -1
  225. package/dist/visoft/connections/models.d.ts +4 -17
  226. package/dist/visoft/contracts/index.d.ts +1 -1
  227. package/dist/visoft/contracts/models.d.ts +4 -16
  228. package/dist/visoft/index.d.ts +1 -1
  229. package/dist/visoft/models.d.ts +3 -162
  230. package/dist/visoft/patients/index.d.ts +1 -1
  231. package/dist/visoft/patients/models.d.ts +10 -38
  232. package/dist/visoft/professionals/models.d.ts +5 -5
  233. package/dist/visoft/serviceCatalogs/models.d.ts +6 -6
  234. package/dist/visoft/services/index.d.ts +1 -1
  235. package/dist/visoft/services/models.d.ts +5 -17
  236. package/package.json +3 -3
@@ -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 },
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
2
+ import type { RaizResponseMetadata } from "../models.js";
3
3
  import { type RaizDefinition, type RaizDefinitionOptionInput, type RaizDefinitionPage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
@@ -101,7 +101,7 @@ export interface CreateRequest {
101
101
  export interface CreateResponse {
102
102
  data: RaizDefinition;
103
103
  error: null;
104
- metadata: ResponseMetadata;
104
+ metadata: RaizResponseMetadata;
105
105
  success: true;
106
106
  }
107
107
  export interface GetRequest {
@@ -113,7 +113,7 @@ export interface GetRequest {
113
113
  export interface GetResponse {
114
114
  data: RaizDefinition;
115
115
  error: null;
116
- metadata: ResponseMetadata;
116
+ metadata: RaizResponseMetadata;
117
117
  success: true;
118
118
  }
119
119
  export interface ListRequest {
@@ -149,19 +149,19 @@ export interface ListRequest {
149
149
  export interface ListResponse {
150
150
  data: RaizDefinitionPage;
151
151
  error: null;
152
- metadata: ResponseMetadata;
152
+ metadata: RaizResponseMetadata;
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
@@ -206,6 +206,6 @@ export interface UpdateRequest {
206
206
  export interface UpdateResponse {
207
207
  data: RaizDefinition;
208
208
  error: null;
209
- metadata: ResponseMetadata;
209
+ metadata: RaizResponseMetadata;
210
210
  success: true;
211
211
  }
@@ -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 },
@@ -1,5 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
2
+ import type { RaizResponseMetadata } from "../models.js";
3
3
  import { type RaizEvalCase, type RaizEvalCasePage } from "./models.js";
4
4
  export interface ClientOptions extends BaseClientOptions {
5
5
  /**
@@ -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
  /**
@@ -66,7 +67,7 @@ export interface CreateRequest {
66
67
  export interface CreateResponse {
67
68
  data: RaizEvalCase;
68
69
  error: null;
69
- metadata: ResponseMetadata;
70
+ metadata: RaizResponseMetadata;
70
71
  success: true;
71
72
  }
72
73
  export interface ListRequest {
@@ -102,7 +103,7 @@ export interface ListRequest {
102
103
  export interface ListResponse {
103
104
  data: RaizEvalCasePage;
104
105
  error: null;
105
- metadata: ResponseMetadata;
106
+ metadata: RaizResponseMetadata;
106
107
  success: true;
107
108
  }
108
109
  export interface UpdateRequest {
@@ -128,6 +129,6 @@ export interface UpdateRequest {
128
129
  export interface UpdateResponse {
129
130
  data: RaizEvalCase;
130
131
  error: null;
131
- metadata: ResponseMetadata;
132
+ metadata: RaizResponseMetadata;
132
133
  success: true;
133
134
  }
@@ -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 },
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { RaizAgentIntegrationSkillInput, RaizAgentSkill } from "../models.js";
2
+ import type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizResponseMetadata } from "../models.js";
4
3
  import { type RaizEvalRun } from "./models.js";
5
4
  export interface ClientOptions extends BaseClientOptions {
6
5
  /**
@@ -15,10 +14,13 @@ export interface Client {
15
14
  * With feedbackCaseId, prepare conditional guidance from that kept correction
16
15
  * and test it with the Agent’s newest kept cases, always including the
17
16
  * 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
17
+ * not publish. Requires conversation read access. Voice Agents use a
18
+ * spoken-content rehearsal with an independent model (evaluationMode
19
+ * voice_text), not the live voice model, audio, interruptions or telephony. A
20
+ * person must review its applicability to calls before approval. Otherwise
21
+ * measure a candidate version on its kept evaluation cases before publishing
22
+ * it: the WhatsApp Agent rewrites each case's reply with the candidate's
23
+ * `instructions`, `skills`, `integrationSkills`, `model` and
22
24
  * `reasoningEffort` (omitted ones stay as the live Agent has them), without
23
25
  * running any integration tool (each answers with what it answered in the
24
26
  * original conversation) and without sending anything; then a judge model
@@ -77,7 +79,7 @@ export interface CreateRequest {
77
79
  export interface CreateResponse {
78
80
  data: RaizEvalRun;
79
81
  error: null;
80
- metadata: ResponseMetadata;
82
+ metadata: RaizResponseMetadata;
81
83
  success: true;
82
84
  }
83
85
  export interface GetRequest {
@@ -89,6 +91,6 @@ export interface GetRequest {
89
91
  export interface GetResponse {
90
92
  data: RaizEvalRun;
91
93
  error: null;
92
- metadata: ResponseMetadata;
94
+ metadata: RaizResponseMetadata;
93
95
  success: true;
94
96
  }
@@ -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
  */
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import { type RaizFact } from "../models.js";
2
+ import { type RaizFact, type RaizResponseMetadata } from "../models.js";
4
3
  export interface ClientOptions extends BaseClientOptions {
5
4
  /**
6
5
  * The URL the paths of the API are relative to.
@@ -80,7 +79,7 @@ export interface CreateRequest {
80
79
  export interface CreateResponse {
81
80
  data: RaizFact;
82
81
  error: null;
83
- metadata: ResponseMetadata;
82
+ metadata: RaizResponseMetadata;
84
83
  success: true;
85
84
  }
86
85
  export interface UpdateRequest {
@@ -97,6 +96,6 @@ export interface UpdateRequest {
97
96
  export interface UpdateResponse {
98
97
  data: RaizFact;
99
98
  error: null;
100
- metadata: ResponseMetadata;
99
+ metadata: RaizResponseMetadata;
101
100
  success: true;
102
101
  }
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { Transport, instant, object, } from "../../_/index.js";
4
- import { RaizFactCodec } from "../models.js";
4
+ import { RaizFactCodec, } from "../models.js";
5
5
  export function createClient(options) {
6
6
  return bind(new Transport(options));
7
7
  }
@@ -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 },
@@ -2,4 +2,4 @@ export { ApiError } from "../_/index.js";
2
2
  export type { RequestOptions } from "../_/index.js";
3
3
  export { createClient } from "./client.js";
4
4
  export type { Client, ClientOptions, } from "./client.js";
5
- export type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizCount, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizTask, } from "./models.js";
5
+ export type { RaizAgentIntegrationSkillInput, RaizAgentSkill, RaizBusinessHours, RaizBusinessHoursWindow, RaizContactHoursWindow, RaizCount, RaizEmailAddress, RaizFact, RaizFailureResponse, RaizHttpsUrl, RaizOutsideHoursTemplate, RaizPhoneNumber, RaizResponseMetadata, RaizTask, } from "./models.js";
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { RaizHttpsUrl } from "../models.js";
2
+ import type { RaizHttpsUrl, RaizResponseMetadata } from "../models.js";
4
3
  import { type RaizCrawlSettings, type RaizKnowledgeDocument, type RaizKnowledgeDocumentPage, type RaizKnowledgeFileInput, type RaizKnowledgePassagePage } from "./models.js";
5
4
  export interface ClientOptions extends BaseClientOptions {
6
5
  /**
@@ -43,13 +42,13 @@ export interface Client {
43
42
  /**
44
43
  * Search Knowledge
45
44
  *
46
- * Find the passages that best answer `query` in the organization's searchable
45
+ * Find the passages that best answer `q` in the organization's searchable
47
46
  * documents, best first. `agentId` searches exactly what that Agent can find;
48
47
  * `knowledgeDocumentIds` limits the search to those documents. Paused,
49
48
  * deleted and not-yet-indexed documents are never searched. Read a whole
50
49
  * document with `get_knowledge_document` and `expand=content`.
51
50
  */
52
- search(request: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
51
+ search(request?: SearchRequest, options?: RequestOptions): Promise<SearchResponse>;
53
52
  /**
54
53
  * Update a Knowledge document
55
54
  *
@@ -98,23 +97,23 @@ export interface CreateRequest {
98
97
  export interface CreateResponse {
99
98
  data: RaizKnowledgeDocument;
100
99
  error: null;
101
- metadata: ResponseMetadata;
100
+ metadata: RaizResponseMetadata;
102
101
  success: true;
103
102
  }
104
103
  export interface GetRequest {
105
- /**
106
- * Related data to include, comma-separated: `content`.
107
- */
108
- expand?: string;
109
104
  /**
110
105
  * Knowledge document id.
111
106
  */
112
107
  knowledgeDocumentId: string;
108
+ /**
109
+ * Related data to include, comma-separated: `content`.
110
+ */
111
+ expand?: string;
113
112
  }
114
113
  export interface GetResponse {
115
114
  data: RaizKnowledgeDocument;
116
115
  error: null;
117
- metadata: ResponseMetadata;
116
+ metadata: RaizResponseMetadata;
118
117
  success: true;
119
118
  }
120
119
  export interface ListRequest {
@@ -155,7 +154,7 @@ export interface ListRequest {
155
154
  export interface ListResponse {
156
155
  data: RaizKnowledgeDocumentPage;
157
156
  error: null;
158
- metadata: ResponseMetadata;
157
+ metadata: RaizResponseMetadata;
159
158
  success: true;
160
159
  }
161
160
  export interface SearchRequest {
@@ -184,15 +183,25 @@ export interface SearchRequest {
184
183
  /**
185
184
  * What to look for, in a few words.
186
185
  */
187
- query: string;
186
+ q?: string;
187
+ /**
188
+ * Deprecated: use `q`. Answered until 2027-01-28.
189
+ *
190
+ * @deprecated
191
+ */
192
+ query?: string;
188
193
  }
189
194
  export interface SearchResponse {
190
195
  data: RaizKnowledgePassagePage;
191
196
  error: null;
192
- metadata: ResponseMetadata;
197
+ metadata: RaizResponseMetadata;
193
198
  success: true;
194
199
  }
195
200
  export interface UpdateRequest {
201
+ /**
202
+ * Knowledge document id.
203
+ */
204
+ knowledgeDocumentId: string;
196
205
  /**
197
206
  * Website documents only. Default: 20 pages, depth 2.
198
207
  */
@@ -207,10 +216,6 @@ export interface UpdateRequest {
207
216
  * File documents only.
208
217
  */
209
218
  file?: RaizKnowledgeFileInput;
210
- /**
211
- * Knowledge document id.
212
- */
213
- knowledgeDocumentId: string;
214
219
  /**
215
220
  * Website documents only: the HTTPS page to start from. Its origin must be
216
221
  * approved for this deployment; only same-origin pages under its path are
@@ -230,6 +235,6 @@ export interface UpdateRequest {
230
235
  export interface UpdateResponse {
231
236
  data: RaizKnowledgeDocument;
232
237
  error: null;
233
- metadata: ResponseMetadata;
238
+ metadata: RaizResponseMetadata;
234
239
  success: true;
235
240
  }
@@ -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]]),
@@ -1,4 +1,4 @@
1
- import type { Failure, ResponseMetadata, ValidationIssue } from "../models.js";
1
+ import type { Failure, ValidationIssue } from "../models.js";
2
2
  export interface RaizAgentIntegrationSkillInput {
3
3
  /**
4
4
  * A connection's id in Account (`con_…`).
@@ -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: {
@@ -910,7 +868,7 @@ export interface RaizFailureResponse {
910
868
  message: "The resource changed after it was read. Read it again and retry with the new version.";
911
869
  retryable: false;
912
870
  });
913
- metadata: ResponseMetadata;
871
+ metadata: RaizResponseMetadata;
914
872
  success: false;
915
873
  }
916
874
  export type RaizHttpsUrl = string;
@@ -925,6 +883,12 @@ export interface RaizOutsideHoursTemplate {
925
883
  name: string;
926
884
  }
927
885
  export type RaizPhoneNumber = string;
886
+ export interface RaizResponseMetadata {
887
+ /**
888
+ * Request correlation identifier, also sent as X-Request-Id.
889
+ */
890
+ requestId: string;
891
+ }
928
892
  export interface RaizTask {
929
893
  /**
930
894
  * Attempts the task has made so far, retries included. A task that works in
@@ -1,6 +1,5 @@
1
1
  import { type BaseClientOptions, type RequestOptions, Transport } from "../../_/index.js";
2
- import type { ResponseMetadata } from "../../models.js";
3
- import type { RaizEmailAddress } from "../models.js";
2
+ import type { RaizEmailAddress, RaizResponseMetadata } from "../models.js";
4
3
  import { type RaizOrganization } from "./models.js";
5
4
  export interface ClientOptions extends BaseClientOptions {
6
5
  /**
@@ -18,8 +17,7 @@ export interface Client {
18
17
  * conversation or fails in it, and the daily report.
19
18
  * capabilities.managedVoiceOutbound reports whether the shared outbound line
20
19
  * 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.
20
+ * organization's separate permission to use it.
23
21
  */
24
22
  get(request?: GetRequest, options?: RequestOptions): Promise<GetResponse>;
25
23
  /**
@@ -48,15 +46,11 @@ export interface Client {
48
46
  export declare function createClient(options: ClientOptions): Client;
49
47
  export declare function bind(transport: Transport): Client;
50
48
  export interface GetRequest {
51
- /**
52
- * Related data to include, comma-separated: `applications`.
53
- */
54
- expand?: string;
55
49
  }
56
50
  export interface GetResponse {
57
51
  data: RaizOrganization;
58
52
  error: null;
59
- metadata: ResponseMetadata;
53
+ metadata: RaizResponseMetadata;
60
54
  success: true;
61
55
  }
62
56
  export interface SendDailyReportRequest {
@@ -66,12 +60,13 @@ export interface SendDailyReportRequest {
66
60
  }
67
61
  export interface SendDailyReportResponse {
68
62
  data: {
63
+ endsAt: Temporal.Instant;
69
64
  recipients: number;
70
65
  requestedAt: Temporal.Instant;
71
66
  until: Temporal.Instant;
72
67
  };
73
68
  error: null;
74
- metadata: ResponseMetadata;
69
+ metadata: RaizResponseMetadata;
75
70
  success: true;
76
71
  }
77
72
  export interface UpdateRequest {
@@ -113,6 +108,6 @@ export interface UpdateRequest {
113
108
  export interface UpdateResponse {
114
109
  data: RaizOrganization;
115
110
  error: null;
116
- metadata: ResponseMetadata;
111
+ metadata: RaizResponseMetadata;
117
112
  success: true;
118
113
  }