@arbol-ai/sdk 2.1.0 → 2.2.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 (58) hide show
  1. package/dist/raiz/agents/client.js +2 -2
  2. package/dist/raiz/agents/index.d.ts +1 -1
  3. package/dist/raiz/agents/models.d.ts +1 -46
  4. package/dist/raiz/agents/models.js +1 -5
  5. package/dist/raiz/bulletins/client.d.ts +182 -0
  6. package/dist/raiz/bulletins/client.js +53 -0
  7. package/dist/raiz/bulletins/index.d.ts +5 -0
  8. package/dist/raiz/bulletins/index.js +4 -0
  9. package/dist/raiz/bulletins/models.d.ts +53 -0
  10. package/dist/raiz/bulletins/models.js +12 -0
  11. package/dist/raiz/campaigns/client.js +2 -2
  12. package/dist/raiz/campaigns/index.d.ts +1 -1
  13. package/dist/raiz/campaigns/models.d.ts +6 -57
  14. package/dist/raiz/campaigns/models.js +1 -9
  15. package/dist/raiz/changes/client.js +1 -1
  16. package/dist/raiz/changes/models.d.ts +2 -2
  17. package/dist/raiz/channels/client.d.ts +2 -2
  18. package/dist/raiz/channels/client.js +3 -3
  19. package/dist/raiz/channels/index.d.ts +1 -1
  20. package/dist/raiz/channels/models.d.ts +23 -96
  21. package/dist/raiz/channels/models.js +2 -8
  22. package/dist/raiz/client.d.ts +2 -0
  23. package/dist/raiz/client.js +5 -0
  24. package/dist/raiz/contacts/client.js +6 -6
  25. package/dist/raiz/contacts/index.d.ts +1 -1
  26. package/dist/raiz/contacts/models.d.ts +4 -40
  27. package/dist/raiz/contacts/models.js +2 -8
  28. package/dist/raiz/conversations/client.d.ts +17 -11
  29. package/dist/raiz/conversations/client.js +5 -5
  30. package/dist/raiz/conversations/index.d.ts +1 -1
  31. package/dist/raiz/conversations/models.d.ts +17 -103
  32. package/dist/raiz/conversations/models.js +5 -12
  33. package/dist/raiz/definitions/client.js +2 -2
  34. package/dist/raiz/evalCases/client.js +2 -2
  35. package/dist/raiz/evalRuns/client.js +1 -1
  36. package/dist/raiz/facts/client.js +1 -1
  37. package/dist/raiz/index.d.ts +1 -1
  38. package/dist/raiz/knowledge/client.d.ts +3 -2
  39. package/dist/raiz/knowledge/client.js +4 -4
  40. package/dist/raiz/knowledge/index.d.ts +1 -1
  41. package/dist/raiz/knowledge/models.d.ts +1 -42
  42. package/dist/raiz/knowledge/models.js +1 -6
  43. package/dist/raiz/members/client.d.ts +3 -2
  44. package/dist/raiz/models.d.ts +17 -0
  45. package/dist/raiz/organization/client.d.ts +4 -2
  46. package/dist/raiz/organization/client.js +2 -2
  47. package/dist/raiz/organization/index.d.ts +1 -1
  48. package/dist/raiz/organization/models.d.ts +6 -4
  49. package/dist/raiz/profiles/client.js +2 -2
  50. package/dist/raiz/reports/client.d.ts +10 -9
  51. package/dist/raiz/reports/client.js +1 -1
  52. package/dist/raiz/reports/models.d.ts +2 -0
  53. package/dist/raiz/suppressions/client.d.ts +2 -1
  54. package/dist/raiz/suppressions/client.js +1 -1
  55. package/dist/raiz/tasks/client.js +4 -4
  56. package/dist/raiz/templates/client.d.ts +2 -1
  57. package/dist/raiz/voices/client.js +1 -1
  58. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import type { PageInfo } from "../../models.js";
2
- import { type RaizBusinessHours } from "../models.js";
2
+ import { type RaizBusinessHours, type RaizHttpsUrl } from "../models.js";
3
3
  export interface RaizChannel {
4
4
  address: string | null;
5
5
  agent: RaizChannelAgent | null;
@@ -91,7 +91,7 @@ export interface RaizChannelPage {
91
91
  /**
92
92
  * Items admitted by this resource contract within the verified organization.
93
93
  */
94
- data: RaizChannelSummary[];
94
+ data: RaizChannel[];
95
95
  /**
96
96
  * Discriminator for a resource list response.
97
97
  */
@@ -101,67 +101,6 @@ export interface RaizChannelPage {
101
101
  */
102
102
  pageInfo: PageInfo;
103
103
  }
104
- export interface RaizChannelSummary {
105
- address: string | null;
106
- agent: RaizChannelAgent | null;
107
- /**
108
- * Percentage of new inbound WhatsApp conversations assigned to AI. Zero keeps
109
- * conversations human-managed until explicitly activated. Existing
110
- * assignments stay unchanged.
111
- */
112
- aiCoveragePercent: number;
113
- businessHours: RaizBusinessHours | null;
114
- /**
115
- * `voice`: a phone number or the organization's own carrier, for calls.
116
- * `whatsapp`: a WhatsApp number. `web`: the chat widget on the organization's
117
- * sites.
118
- */
119
- channelType: "voice" | "whatsapp" | "web";
120
- /**
121
- * An instant in RFC 3339 format, in UTC.
122
- */
123
- createdAt: Temporal.Instant;
124
- /**
125
- * Channel id.
126
- */
127
- id: string;
128
- /**
129
- * Calls and messages from people are answered. Off: inbound traffic is
130
- * ignored (a web widget is switched off).
131
- */
132
- inboundEnabled: boolean;
133
- name: string | null;
134
- /**
135
- * The organization may start calls or WhatsApp conversations from this
136
- * channel.
137
- */
138
- outboundEnabled: boolean;
139
- /**
140
- * What the endpoint is: `phone` (a phone number: the platform's, or one on
141
- * the organization's own telephony account when `providerAccountId` is set),
142
- * `sip` (the organization's own number and carrier, over SIP), `whatsapp` (a
143
- * WhatsApp number) or `web` (the chat widget, served by Raíz).
144
- */
145
- provider: "phone" | "sip" | "whatsapp" | "web";
146
- providerAccountId: string | null;
147
- /**
148
- * Active with enabled traffic; WhatsApp outbound notifications do not need an
149
- * Agent.
150
- */
151
- ready: boolean;
152
- setupExpiresAt: Temporal.Instant | null;
153
- /**
154
- * `pending`: a WhatsApp number whose setup the customer has not finished.
155
- * `active`: connected. `degraded`: connected, but the last provider check
156
- * failed; `verifyChannel` checks again.
157
- */
158
- status: "pending" | "active" | "degraded";
159
- /**
160
- * An instant in RFC 3339 format, in UTC.
161
- */
162
- updatedAt: Temporal.Instant;
163
- version: number;
164
- }
165
104
  export interface RaizWidgetAgentChoice {
166
105
  /**
167
106
  * A text Agent of the same organization.
@@ -179,6 +118,19 @@ export interface RaizWidgetClientTool {
179
118
  type: "string" | "number" | "boolean";
180
119
  }[];
181
120
  }
121
+ export interface RaizWidgetCopy {
122
+ consentText?: string;
123
+ firstMessageLabel?: string;
124
+ formTitle?: string;
125
+ greeting?: string;
126
+ launcherLabel?: string;
127
+ submitLabel?: string;
128
+ subtitle?: string;
129
+ thankYou?: string;
130
+ title?: string;
131
+ welcomeText?: string;
132
+ welcomeTitle?: string;
133
+ }
182
134
  export interface RaizWidgetField {
183
135
  label: string;
184
136
  name: string;
@@ -213,7 +165,7 @@ export interface RaizWidgetSettings {
213
165
  assistantColor?: string;
214
166
  attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
215
167
  attachmentsEnabled?: boolean;
216
- avatarUrl?: string | null;
168
+ avatarUrl?: RaizHttpsUrl | null;
217
169
  /**
218
170
  * A color in `#RRGGBB` form.
219
171
  */
@@ -241,7 +193,7 @@ export interface RaizWidgetSettings {
241
193
  font?: "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
242
194
  fontFamily?: string;
243
195
  fontSize?: number;
244
- fontUrl?: string | null;
196
+ fontUrl?: RaizHttpsUrl | null;
245
197
  formTitle?: string;
246
198
  greeting?: string;
247
199
  /**
@@ -285,7 +237,7 @@ export interface RaizWidgetSettings {
285
237
  * A color in `#RRGGBB` form.
286
238
  */
287
239
  primaryColor?: string;
288
- privacyUrl?: string | null;
240
+ privacyUrl?: RaizHttpsUrl | null;
289
241
  /**
290
242
  * Also serve the widget on its own hosted page, outside any embedding site.
291
243
  */
@@ -355,7 +307,7 @@ export interface RaizWidgetSettingsInput {
355
307
  assistantColor?: string;
356
308
  attachmentTypes?: ("image/png" | "image/jpeg" | "application/pdf" | "text/plain")[];
357
309
  attachmentsEnabled?: boolean;
358
- avatarUrl?: string | null;
310
+ avatarUrl?: RaizHttpsUrl | null;
359
311
  /**
360
312
  * A color in `#RRGGBB` form.
361
313
  */
@@ -383,7 +335,7 @@ export interface RaizWidgetSettingsInput {
383
335
  font?: "arbol" | "system" | "serif" | "rounded" | "page" | "custom";
384
336
  fontFamily?: string;
385
337
  fontSize?: number;
386
- fontUrl?: string | null;
338
+ fontUrl?: RaizHttpsUrl | null;
387
339
  formTitle?: string;
388
340
  greeting?: string;
389
341
  /**
@@ -422,7 +374,7 @@ export interface RaizWidgetSettingsInput {
422
374
  * A color in `#RRGGBB` form.
423
375
  */
424
376
  primaryColor?: string;
425
- privacyUrl?: string | null;
377
+ privacyUrl?: RaizHttpsUrl | null;
426
378
  /**
427
379
  * Also serve the widget on its own hosted page, outside any embedding site.
428
380
  */
@@ -467,33 +419,8 @@ export interface RaizWidgetSettingsInput {
467
419
  welcomeTitle?: string;
468
420
  }
469
421
  export interface RaizWidgetTranslations {
470
- en?: {
471
- consentText?: string;
472
- firstMessageLabel?: string;
473
- formTitle?: string;
474
- greeting?: string;
475
- launcherLabel?: string;
476
- submitLabel?: string;
477
- subtitle?: string;
478
- thankYou?: string;
479
- title?: string;
480
- welcomeText?: string;
481
- welcomeTitle?: string;
482
- };
483
- es?: {
484
- consentText?: string;
485
- firstMessageLabel?: string;
486
- formTitle?: string;
487
- greeting?: string;
488
- launcherLabel?: string;
489
- submitLabel?: string;
490
- subtitle?: string;
491
- thankYou?: string;
492
- title?: string;
493
- welcomeText?: string;
494
- welcomeTitle?: string;
495
- };
422
+ en?: RaizWidgetCopy;
423
+ es?: RaizWidgetCopy;
496
424
  }
497
425
  export declare const RaizChannelCodec: import("../../_/codec.js").Codec;
498
426
  export declare const RaizChannelPageCodec: import("../../_/codec.js").Codec;
499
- export declare const RaizChannelSummaryCodec: import("../../_/codec.js").Codec;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object } from "../../_/index.js";
4
- import { RaizBusinessHoursCodec } from "../models.js";
4
+ import { RaizBusinessHoursCodec, } from "../models.js";
5
5
  export const RaizChannelCodec = object([
6
6
  ["businessHours", null, () => RaizBusinessHoursCodec],
7
7
  ["createdAt", null, instant],
@@ -10,11 +10,5 @@ export const RaizChannelCodec = object([
10
10
  ["updatedAt", null, instant],
11
11
  ]);
12
12
  export const RaizChannelPageCodec = object([
13
- ["data", null, array(() => RaizChannelSummaryCodec)],
14
- ]);
15
- export const RaizChannelSummaryCodec = object([
16
- ["businessHours", null, () => RaizBusinessHoursCodec],
17
- ["createdAt", null, instant],
18
- ["setupExpiresAt", null, instant],
19
- ["updatedAt", null, instant],
13
+ ["data", null, array(() => RaizChannelCodec)],
20
14
  ]);
@@ -1,5 +1,6 @@
1
1
  import { type BaseClientOptions, Transport } from "../_/index.js";
2
2
  import { type Client as AgentsClient } from "./agents/client.js";
3
+ import { type Client as BulletinsClient } from "./bulletins/client.js";
3
4
  import { type Client as CampaignsClient } from "./campaigns/client.js";
4
5
  import { type Client as ChangesClient } from "./changes/client.js";
5
6
  import { type Client as ChannelsClient } from "./channels/client.js";
@@ -27,6 +28,7 @@ export interface ClientOptions extends BaseClientOptions {
27
28
  }
28
29
  export interface Client {
29
30
  readonly agents: AgentsClient;
31
+ readonly bulletins: BulletinsClient;
30
32
  readonly campaigns: CampaignsClient;
31
33
  readonly changes: ChangesClient;
32
34
  readonly channels: ChannelsClient;
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable */
3
3
  import { Transport } from "../_/index.js";
4
4
  import { bind as bindAgents, } from "./agents/client.js";
5
+ import { bind as bindBulletins, } from "./bulletins/client.js";
5
6
  import { bind as bindCampaigns, } from "./campaigns/client.js";
6
7
  import { bind as bindChanges, } from "./changes/client.js";
7
8
  import { bind as bindChannels, } from "./channels/client.js";
@@ -26,6 +27,7 @@ export function createClient(options) {
26
27
  }
27
28
  export function bind(transport) {
28
29
  let agentsClient;
30
+ let bulletinsClient;
29
31
  let campaignsClient;
30
32
  let changesClient;
31
33
  let channelsClient;
@@ -49,6 +51,9 @@ export function bind(transport) {
49
51
  get agents() {
50
52
  return (agentsClient ??= bindAgents(transport));
51
53
  },
54
+ get bulletins() {
55
+ return (bulletinsClient ??= bindBulletins(transport));
56
+ },
52
57
  get campaigns() {
53
58
  return (campaignsClient ??= bindCampaigns(transport));
54
59
  },
@@ -21,21 +21,21 @@ const CountOperation = {
21
21
  route: "/v1/raiz/contacts/count",
22
22
  query: { agentId: "agentId", channelType: "channelType", handling: "handling", lastContactedAfter: "lastContactedAfter", q: "q" },
23
23
  response: null,
24
- 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 },
24
+ 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 },
25
25
  };
26
26
  const CreateOperation = {
27
27
  method: "POST",
28
28
  route: "/v1/raiz/contacts/create",
29
29
  body: "flat",
30
30
  response: object([["data", null, () => RaizContactCodec]]),
31
- 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 },
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
35
  route: "/v1/raiz/contacts/get",
36
36
  query: { contactId: "contactId", expand: "expand", timelineCursor: "timelineCursor", timelineDirection: "timelineDirection", timelineLimit: "timelineLimit" },
37
37
  response: object([["data", null, () => RaizContactCodec]]),
38
- 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 },
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
  };
40
40
  const ImportOperation = {
41
41
  method: "POST",
@@ -43,19 +43,19 @@ const ImportOperation = {
43
43
  body: "flat",
44
44
  request: object([["file", null, object([["data", null, bytes]])]]),
45
45
  response: object([["data", null, () => RaizTaskCodec]]),
46
- 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 },
46
+ 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 },
47
47
  };
48
48
  const ListOperation = {
49
49
  method: "GET",
50
50
  route: "/v1/raiz/contacts",
51
51
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", channelType: "channelType", handling: "handling", lastContactedAfter: "lastContactedAfter", q: "q", sort: "sort" },
52
52
  response: object([["data", null, () => RaizContactPageCodec]]),
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 },
53
+ 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 },
54
54
  };
55
55
  const UpdateOperation = {
56
56
  method: "PATCH",
57
57
  route: "/v1/raiz/contacts/update",
58
58
  body: "flat",
59
59
  response: object([["data", null, () => RaizContactCodec]]),
60
- 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 },
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 },
61
61
  };
@@ -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, CountRequest, CountResponse, CreateRequest, CreateResponse, GetRequest, GetResponse, ImportRequest, ImportResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizContact, RaizContactIdentifierInput, RaizContactLastConversation, RaizContactPage, RaizContactPointInput, RaizContactSummary, RaizContactTimelinePage, RaizPostalAddress, } from "./models.js";
5
+ export type { RaizContact, RaizContactIdentifierInput, RaizContactLastConversation, RaizContactPage, RaizContactPointInput, RaizContactTimelinePage, RaizPostalAddress, } from "./models.js";
@@ -1,5 +1,5 @@
1
1
  import type { PageInfo } from "../../models.js";
2
- import { type RaizFact } from "../models.js";
2
+ import { type RaizEmailAddress, type RaizFact, type RaizPhoneNumber } from "../models.js";
3
3
  export interface RaizContact {
4
4
  conversationCount: number;
5
5
  /**
@@ -106,7 +106,7 @@ export interface RaizContactPage {
106
106
  /**
107
107
  * Items admitted by this resource contract within the verified organization.
108
108
  */
109
- data: RaizContactSummary[];
109
+ data: RaizContact[];
110
110
  /**
111
111
  * Discriminator for a resource list response.
112
112
  */
@@ -117,12 +117,12 @@ export interface RaizContactPage {
117
117
  pageInfo: PageInfo;
118
118
  }
119
119
  export type RaizContactPointInput = {
120
- address: string;
120
+ address: RaizPhoneNumber;
121
121
  kind: "phone";
122
122
  label?: string | null;
123
123
  preferred?: boolean;
124
124
  } | {
125
- address: string;
125
+ address: RaizEmailAddress;
126
126
  kind: "email";
127
127
  label?: string | null;
128
128
  preferred?: boolean;
@@ -132,41 +132,6 @@ export type RaizContactPointInput = {
132
132
  label?: string | null;
133
133
  preferred?: boolean;
134
134
  };
135
- export interface RaizContactSummary {
136
- conversationCount: number;
137
- /**
138
- * An instant in RFC 3339 format, in UTC.
139
- */
140
- createdAt: Temporal.Instant;
141
- email: string | null;
142
- familyName: string | null;
143
- fullName: string | null;
144
- givenName: string | null;
145
- /**
146
- * Contact id.
147
- */
148
- id: string;
149
- lastContactedAt: Temporal.Instant | null;
150
- lastConversation: RaizContactLastConversation | null;
151
- /**
152
- * Your own keys and labels for this resource (up to 50 keys of 40 characters;
153
- * values up to 500 characters). Raíz never interprets them.
154
- */
155
- metadata: {
156
- [key: string]: unknown;
157
- };
158
- nameAuthor: "person" | "ai" | "system" | "import" | "provider" | null;
159
- phone: string | null;
160
- postalAddresses: RaizPostalAddress[];
161
- profileName: string | null;
162
- summary: string | null;
163
- summaryAuthor: "person" | "ai" | "system" | "import" | "provider" | null;
164
- /**
165
- * An instant in RFC 3339 format, in UTC.
166
- */
167
- updatedAt: Temporal.Instant;
168
- version: number;
169
- }
170
135
  export interface RaizContactTimelinePage {
171
136
  /**
172
137
  * Items admitted by this resource contract within the verified organization.
@@ -202,5 +167,4 @@ export interface RaizPostalAddress {
202
167
  export declare const RaizContactCodec: import("../../_/codec.js").Codec;
203
168
  export declare const RaizContactLastConversationCodec: import("../../_/codec.js").Codec;
204
169
  export declare const RaizContactPageCodec: import("../../_/codec.js").Codec;
205
- export declare const RaizContactSummaryCodec: import("../../_/codec.js").Codec;
206
170
  export declare const RaizContactTimelinePageCodec: import("../../_/codec.js").Codec;
@@ -1,7 +1,7 @@
1
1
  // Code generated by forge. DO NOT EDIT.
2
2
  /* eslint-disable */
3
3
  import { array, instant, object } from "../../_/index.js";
4
- import { RaizFactCodec } from "../models.js";
4
+ import { RaizFactCodec, } from "../models.js";
5
5
  export const RaizContactCodec = object([
6
6
  ["createdAt", null, instant],
7
7
  ["facts", null, array(() => RaizFactCodec)],
@@ -16,13 +16,7 @@ export const RaizContactLastConversationCodec = object([
16
16
  ["startedAt", null, instant],
17
17
  ]);
18
18
  export const RaizContactPageCodec = object([
19
- ["data", null, array(() => RaizContactSummaryCodec)],
20
- ]);
21
- export const RaizContactSummaryCodec = object([
22
- ["createdAt", null, instant],
23
- ["lastContactedAt", null, instant],
24
- ["lastConversation", null, () => RaizContactLastConversationCodec],
25
- ["updatedAt", null, instant],
19
+ ["data", null, array(() => RaizContactCodec)],
26
20
  ]);
27
21
  export const RaizContactTimelinePageCodec = object([
28
22
  ["data", null, array(object([["occurredAt", null, instant]]))],
@@ -73,10 +73,10 @@ export interface Client {
73
73
  * (CALL_IN_PROGRESS); a web chat cannot close while the Agent is replying
74
74
  * (REPLY_IN_PROGRESS, retry shortly). On WhatsApp, `aiEnabled` activates or
75
75
  * pauses AI only for this open conversation and leaves future episodes
76
- * unchanged; `aiPaused` pauses or resumes the Agent for this person, and
77
- * survives closing. Activating or resuming answers what the contact wrote
78
- * after the last real answer, the team's or the Agent's (a wait notice is not
79
- * one).
76
+ * unchanged; `aiPaused` pauses or resumes the Agent for this person until
77
+ * their open conversation closes. Activating or resuming answers what the
78
+ * contact wrote after the last real answer, the team's or the Agent's (a wait
79
+ * notice is not one).
80
80
  */
81
81
  update(request: UpdateRequest, options?: RequestOptions): Promise<UpdateResponse>;
82
82
  }
@@ -132,8 +132,11 @@ export interface CountRequest {
132
132
  * `ai`: conversations the AI takes part in (calls and web chats, and WhatsApp
133
133
  * conversations the AI handles or answered). `team`: WhatsApp conversations
134
134
  * the organization's people handle on their own. `escalated`: conversations
135
- * the AI handed to the team, still paused (an escalation or a requested
136
- * transfer).
135
+ * the AI handed to the team (a request it could not resolve, a contact who
136
+ * asked for a person, or a spent budget), also once the team gave them back
137
+ * to the AI; the ones `conversations_daily` counts in `escalatedCount`. A
138
+ * trial is not one, nor a conversation that opens while the AI is still
139
+ * paused for the number after an earlier handoff.
137
140
  */
138
141
  handling?: "ai" | "team" | "escalated";
139
142
  /**
@@ -268,8 +271,11 @@ export interface ListRequest {
268
271
  * `ai`: conversations the AI takes part in (calls and web chats, and WhatsApp
269
272
  * conversations the AI handles or answered). `team`: WhatsApp conversations
270
273
  * the organization's people handle on their own. `escalated`: conversations
271
- * the AI handed to the team, still paused (an escalation or a requested
272
- * transfer).
274
+ * the AI handed to the team (a request it could not resolve, a contact who
275
+ * asked for a person, or a spent budget), also once the team gave them back
276
+ * to the AI; the ones `conversations_daily` counts in `escalatedCount`. A
277
+ * trial is not one, nor a conversation that opens while the AI is still
278
+ * paused for the number after an earlier handoff.
273
279
  */
274
280
  handling?: "ai" | "team" | "escalated";
275
281
  /**
@@ -345,9 +351,9 @@ export interface UpdateRequest {
345
351
  */
346
352
  aiEnabled?: boolean;
347
353
  /**
348
- * WhatsApp only: pause or resume automatic replies for this recipient.
349
- * Resuming answers what the contact wrote in this conversation after the last
350
- * real answer.
354
+ * WhatsApp only: pause or resume automatic replies for this recipient until
355
+ * their open conversation closes. Resuming answers what the contact wrote in
356
+ * this conversation after the last real answer.
351
357
  */
352
358
  aiPaused?: boolean;
353
359
  contactId?: string | null;
@@ -19,33 +19,33 @@ const ContinueOperation = {
19
19
  route: "/v1/raiz/conversations/continue",
20
20
  body: "flat",
21
21
  response: object([["data", null, () => RaizConversationCodec]]),
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 CountOperation = {
25
25
  method: "GET",
26
26
  route: "/v1/raiz/conversations/count",
27
27
  query: { agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status" },
28
28
  response: null,
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 GetOperation = {
32
32
  method: "GET",
33
33
  route: "/v1/raiz/conversations/get",
34
34
  query: { conversationId: "conversationId", expand: "expand", messagesCursor: "messagesCursor", messagesDirection: "messagesDirection", messagesLimit: "messagesLimit" },
35
35
  response: object([["data", null, () => RaizConversationCodec]]),
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 ListOperation = {
39
39
  method: "GET",
40
40
  route: "/v1/raiz/conversations",
41
41
  query: { cursor: "cursor", direction: "direction", limit: "limit", agentId: "agentId", campaignId: "campaignId", channelId: "channelId", channelType: "channelType", contactId: "contactId", conversationDirection: "conversationDirection", handling: "handling", worker: "worker", origin: "origin", outcome: "outcome", metadataReference: "metadataReference", profileId: "profileId", q: "q", requestedBy: "requestedBy", startedAfter: "startedAfter", startedBefore: "startedBefore", status: "status", sort: "sort" },
42
42
  response: object([["data", null, () => RaizConversationPageCodec]]),
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, "413": true, "415": true, "429": true, "500": true, "502": true, "503": true, "504": true },
44
44
  };
45
45
  const UpdateOperation = {
46
46
  method: "PATCH",
47
47
  route: "/v1/raiz/conversations/update",
48
48
  body: "flat",
49
49
  response: object([["data", null, () => RaizConversationCodec]]),
50
- 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 },
50
+ 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 },
51
51
  };
@@ -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, ContinueRequest, ContinueResponse, CountRequest, CountResponse, GetRequest, GetResponse, ListRequest, ListResponse, UpdateRequest, UpdateResponse, } from "./client.js";
5
- export type { RaizConversation, RaizConversationPage, RaizConversationSummary, RaizConversationWorker, RaizMessage, RaizMessagePage, } from "./models.js";
5
+ export type { RaizConversation, RaizConversationPage, RaizConversationWorker, RaizMessage, RaizMessagePage, RaizSignedUrl, } from "./models.js";