@gravity-rail/sdk 4.0.0 → 6.1.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 (51) hide show
  1. package/README.md +4 -2
  2. package/dist/account-DLwJWX9b.d.cts +522 -0
  3. package/dist/account-DLwJWX9b.d.ts +522 -0
  4. package/dist/{path-CUY-Iw70.d.ts → agent_standing_job-D60O007y.d.cts} +1068 -140
  5. package/dist/{path-B3b3_El9.d.cts → agent_standing_job-DbKkPDyY.d.ts} +1068 -140
  6. package/dist/{chat-interaction-DXgKjFqZ.d.cts → chat-interaction-CCdK_MtC.d.ts} +13616 -9394
  7. package/dist/{chat-interaction-a7U-tHfQ.d.ts → chat-interaction-rktAADW0.d.cts} +13616 -9394
  8. package/dist/{chunk-D5VNVTUQ.js → chunk-P2MSMMMJ.js} +120 -2
  9. package/dist/chunk-P2MSMMMJ.js.map +1 -0
  10. package/dist/{chunk-ZLF3N3ZD.js → chunk-P2X5TOYY.js} +31 -5
  11. package/dist/chunk-P2X5TOYY.js.map +1 -0
  12. package/dist/{chunk-WHRIIBJ4.js → chunk-VFOWHCQ7.js} +1773 -475
  13. package/dist/chunk-VFOWHCQ7.js.map +1 -0
  14. package/dist/helpers.cjs.map +1 -1
  15. package/dist/helpers.d.cts +3 -2
  16. package/dist/helpers.d.ts +3 -2
  17. package/dist/helpers.js +1 -1
  18. package/dist/index.cjs +1961 -917
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +87 -249
  21. package/dist/index.d.ts +87 -249
  22. package/dist/index.js +171 -458
  23. package/dist/index.js.map +1 -1
  24. package/dist/internal.cjs +1928 -448
  25. package/dist/internal.cjs.map +1 -1
  26. package/dist/internal.d.cts +2449 -263
  27. package/dist/internal.d.ts +2449 -263
  28. package/dist/internal.js +146 -27
  29. package/dist/internal.js.map +1 -1
  30. package/dist/{member-import-BHtOru8g.d.cts → member-import-Bk2nh1YU.d.cts} +1 -1
  31. package/dist/{member-import-VOLKR5dY.d.ts → member-import-CybXt3PK.d.ts} +1 -1
  32. package/dist/realtime.cjs +250 -3
  33. package/dist/realtime.cjs.map +1 -1
  34. package/dist/realtime.d.cts +87 -4
  35. package/dist/realtime.d.ts +87 -4
  36. package/dist/realtime.js +245 -3
  37. package/dist/realtime.js.map +1 -1
  38. package/dist/schemas.cjs +154 -19
  39. package/dist/schemas.cjs.map +1 -1
  40. package/dist/schemas.d.cts +621 -69
  41. package/dist/schemas.d.ts +621 -69
  42. package/dist/schemas.js +72 -21
  43. package/dist/schemas.js.map +1 -1
  44. package/dist/{tasks-CgptqCsN.d.cts → tasks-CGiE1y_T.d.ts} +2243 -1979
  45. package/dist/{tasks-CgptqCsN.d.ts → tasks-DChznvPX.d.cts} +2243 -1979
  46. package/dist/{types-BXaWYGHj.d.cts → types-Bv6GtLZ2.d.cts} +25 -2
  47. package/dist/{types-BXaWYGHj.d.ts → types-Bv6GtLZ2.d.ts} +25 -2
  48. package/package.json +4 -4
  49. package/dist/chunk-D5VNVTUQ.js.map +0 -1
  50. package/dist/chunk-WHRIIBJ4.js.map +0 -1
  51. package/dist/chunk-ZLF3N3ZD.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { t as SessionKind, r as TwoFactorStatusResponse$1, q as TwoFactorMethodResponse$1, A as AccountResponse, o as AdminAccountResponse, B as AdminAccountMembershipResponse$1 } from './account-DLwJWX9b.cjs';
2
3
 
3
4
  /**
4
5
  * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
@@ -23,37 +24,571 @@ interface EnumOption$1 {
23
24
  /**
24
25
  * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
25
26
  * (group map from emit_openapi.py). Do not edit manually.
26
- * Group: session
27
+ * Group: theme
27
28
  */
28
29
  /**
29
- * ``{token, sessionKind, expiresAt}`` as sign-in and exchange responses carry it.
30
+ * Capabilities a theme supports.
31
+ *
32
+ * Lets the builder adapt its UI to the active theme — e.g. hide the Pages tab
33
+ * for a theme that doesn't render CMS pages, or the locale picker for one
34
+ * without i18n. Declared statically per theme in ``lib/themes.py`` for
35
+ * hard-coded themes, and in the ``gravityrail.config.json`` manifest for
36
+ * source-site themes (resolved per site).
37
+ */
38
+ interface ThemeFeatures {
39
+ /** Renders CMS-style pages (the Pages tab) */
40
+ dynamicPages?: boolean;
41
+ /** Renders localized content for multiple locales */
42
+ i18n?: boolean;
43
+ /** Locales the theme constrains itself to; null means it follows the site's configured locales. */
44
+ locales?: string[] | null;
45
+ /** Color-scheme support */
46
+ darkMode?: ThemeFeaturesDarkMode;
47
+ /** Exposes a runtime API to the rendered site (e.g. grFetch) */
48
+ apiAccess?: boolean;
49
+ /** Supports authenticated (logged-in) members at all */
50
+ auth?: boolean;
51
+ /** Supports public self-service signup (implies auth) */
52
+ signup?: boolean;
53
+ /** Operator/admin-facing surface rather than a public/member site */
54
+ admin?: boolean;
55
+ /** Permission scopes the theme relies on to function */
56
+ scopes?: string[];
57
+ }
58
+ /**
59
+ * Color-scheme support
30
60
  */
31
- interface MintedSessionFields {
32
- token: string;
33
- sessionKind: SessionKind;
34
- expiresAt: string;
61
+ type ThemeFeaturesDarkMode = typeof ThemeFeaturesDarkMode[keyof typeof ThemeFeaturesDarkMode];
62
+ declare const ThemeFeaturesDarkMode: {
63
+ readonly light: "light";
64
+ readonly dark: "dark";
65
+ readonly both: "both";
66
+ };
67
+ /**
68
+ * Response model for theme information.
69
+ */
70
+ interface ThemeResponse {
71
+ slug: string;
72
+ name: string;
73
+ description: string;
74
+ features?: ThemeFeatures;
75
+ /** Present on admin theme catalog; omitted for workspace-scoped lists. */
76
+ globalAccess?: boolean | null;
77
+ }
78
+ /**
79
+ * Response model for a list of themes.
80
+ */
81
+ interface ThemesListResponse {
82
+ items: ThemeResponse[];
83
+ }
84
+
85
+ /**
86
+ * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
87
+ * (group map from emit_openapi.py). Do not edit manually.
88
+ * Group: site
89
+ */
90
+
91
+ /**
92
+ * A resource's directional contract with an independently owned local Form.
93
+ */
94
+ interface DataTypeRequirement {
95
+ /**
96
+ * @minItems 1
97
+ * @maxItems 100
98
+ */
99
+ fields: RequirementSchemaField[];
100
+ access?: DataTypeRequirementAccess;
101
+ recordScope?: DataTypeRequirementRecordScope;
102
+ isCollection?: boolean | null;
103
+ }
104
+ type DataTypeRequirementAccess = typeof DataTypeRequirementAccess[keyof typeof DataTypeRequirementAccess];
105
+ declare const DataTypeRequirementAccess: {
106
+ readonly read: "read";
107
+ readonly write: "write";
108
+ readonly read_write: "read_write";
109
+ };
110
+ type DataTypeRequirementRecordScope = typeof DataTypeRequirementRecordScope[keyof typeof DataTypeRequirementRecordScope] | null;
111
+ declare const DataTypeRequirementRecordScope: {
112
+ readonly member: "member";
113
+ readonly workspace: "workspace";
114
+ readonly anonymous: "anonymous";
115
+ };
116
+ /**
117
+ * Response model for a menu item.
118
+ */
119
+ interface MenuItemResponse {
120
+ id: number;
121
+ siteId: number;
122
+ label: string;
123
+ itemType: MenuItemResponseItemType;
124
+ pageId?: number | null;
125
+ pageSlug?: string | null;
126
+ pageTitle?: string | null;
127
+ url?: string | null;
128
+ parentId?: number | null;
129
+ position: number;
130
+ icon?: string | null;
131
+ cssClass?: string | null;
132
+ target?: string | null;
133
+ isActive?: boolean;
134
+ translations?: MenuItemResponseTranslations;
135
+ createdAt: string;
136
+ updatedAt: string;
137
+ children?: MenuItemResponse[];
138
+ }
139
+ type MenuItemResponseItemType = typeof MenuItemResponseItemType[keyof typeof MenuItemResponseItemType];
140
+ declare const MenuItemResponseItemType: {
141
+ readonly page: "page";
142
+ readonly url: "url";
143
+ readonly products: "products";
144
+ readonly none: "none";
145
+ };
146
+ type MenuItemResponseTranslations = {
147
+ [key: string]: string;
148
+ } | null;
149
+ /**
150
+ * Response model for the complete menu tree of a site.
151
+ */
152
+ interface MenuTreeResponse {
153
+ siteId: number;
154
+ items?: MenuItemResponse[];
155
+ }
156
+ interface PageResponse {
157
+ id: number;
158
+ slug: string;
159
+ title: string;
160
+ status?: string;
161
+ url?: string | null;
162
+ contentBlocks: TipTapDocumentOutput | null;
163
+ contentMarkdown: string | null;
164
+ contentHtml: string | null;
165
+ contentAMP: string | null;
166
+ sourceMetadata: PageResponseSourceMetadata;
167
+ sourceHtml: string | null;
168
+ sourceMarkdown: string | null;
169
+ sourceUrl: string | null;
170
+ createdAt: string;
171
+ updatedAt: string;
172
+ crawledAt: string | null;
173
+ siteId: number;
174
+ isHomePage?: boolean;
175
+ }
176
+ type PageResponseSourceMetadata = {
177
+ [key: string]: unknown;
178
+ } | null;
179
+ interface RenderedPageResponse {
180
+ id: number;
181
+ slug: string;
182
+ title: string;
183
+ status?: string;
184
+ metaDescription?: string | null;
185
+ content: string;
186
+ contentBlocks?: TipTapDocumentOutput | null;
187
+ createdAt: string;
188
+ updatedAt?: string | null;
189
+ locale?: string;
190
+ availableLocales?: string[] | null;
191
+ primaryLocale?: string | null;
192
+ }
193
+ /**
194
+ * The existing field vocabulary, rejecting unrecognized constraints.
195
+ */
196
+ interface RequirementSchemaField {
197
+ /** Unique field identifier */
198
+ slug: string;
199
+ /** Display name for the field */
200
+ name: string;
201
+ /** Optional field description */
202
+ description?: string | null;
203
+ fieldType?: RequirementSchemaFieldFieldType;
204
+ /** Whether field is required */
205
+ required?: boolean;
206
+ /** Deprecated: Display order is now determined by array position */
207
+ order?: number | null;
208
+ /** Options for enum fields as {label, value} objects. */
209
+ options?: EnumOption$1[] | null;
210
+ /** Referenced DataType ID for reference fields */
211
+ referencedTypeId?: number | null;
212
+ /** Server-issued reference field identity; preserve on schema round trips */
213
+ referenceFieldId?: number | null;
214
+ /** Whether to index this field */
215
+ shouldIndex?: boolean;
216
+ /** Whether only admins can see this field */
217
+ adminOnly?: boolean;
218
+ /** Default value for the field */
219
+ defaultValue?: unknown;
220
+ /** CEL expression that computes this field's value. CONSTRAINT: Can ONLY reference regular fields (TEXT, NUMBER, DATE, etc.). Cannot reference other FUNCTION fields. Syntax: record.data.<field_slug>. Example: 'record.data.score1 + record.data.score2' */
221
+ celFunction?: string | null;
222
+ /** CEL expression for cross-field validation. Context: 'value' (current field value), 'record.data.<field_slug>' (other fields). Returns: true if valid, or a string error message if invalid. CONSTRAINT: Can only reference non-FUNCTION fields. Example: 'value >= record.data.min_score' or 'value < record.data.min_score ? "Must be >= " + string(record.data.min_score) : true' */
223
+ validateCel?: string | null;
224
+ /** Disclosure severity for audit and access policy */
225
+ sensitivity?: RequirementSchemaFieldSensitivity;
226
+ /** Regulatory or content categories for audit and policy */
227
+ categories?: RequirementSchemaFieldCategoriesItem[];
228
+ }
229
+ type RequirementSchemaFieldCategoriesItem = typeof RequirementSchemaFieldCategoriesItem[keyof typeof RequirementSchemaFieldCategoriesItem];
230
+ declare const RequirementSchemaFieldCategoriesItem: {
231
+ readonly personal: "personal";
232
+ readonly identifier: "identifier";
233
+ readonly phi: "phi";
234
+ readonly credential: "credential";
235
+ };
236
+ type RequirementSchemaFieldFieldType = typeof RequirementSchemaFieldFieldType[keyof typeof RequirementSchemaFieldFieldType];
237
+ declare const RequirementSchemaFieldFieldType: {
238
+ readonly array: "array";
239
+ readonly boolean: "boolean";
240
+ readonly date: "date";
241
+ readonly datetime: "datetime";
242
+ readonly email: "email";
243
+ readonly enum: "enum";
244
+ readonly function: "function";
245
+ readonly integer: "integer";
246
+ readonly longtext: "longtext";
247
+ readonly number: "number";
248
+ readonly object: "object";
249
+ readonly phone: "phone";
250
+ readonly reference: "reference";
251
+ readonly text: "text";
252
+ readonly time_of_day: "time_of_day";
253
+ readonly us_zip_code: "us_zip_code";
254
+ };
255
+ /**
256
+ * Disclosure severity for audit and access policy
257
+ */
258
+ type RequirementSchemaFieldSensitivity = typeof RequirementSchemaFieldSensitivity[keyof typeof RequirementSchemaFieldSensitivity];
259
+ declare const RequirementSchemaFieldSensitivity: {
260
+ readonly public: "public";
261
+ readonly internal: "internal";
262
+ readonly confidential: "confidential";
263
+ readonly restricted: "restricted";
264
+ readonly secret: "secret";
265
+ };
266
+ interface SiteCountsResponse {
267
+ pages: number;
268
+ }
269
+ interface SiteResponse {
270
+ id: number;
271
+ name: string;
272
+ uuid: string;
273
+ slug: string;
274
+ assetsFolderId?: number | null;
275
+ sourceFolderId?: number | null;
276
+ sourceReleaseId?: number | null;
277
+ theme: SiteResponseTheme;
278
+ themeSettings?: SiteResponseThemeSettings;
279
+ resolvedThemeSettings?: SiteResponseResolvedThemeSettings;
280
+ content: string;
281
+ authorized: boolean;
282
+ tagLine: string | null;
283
+ metaDescription: string | null;
284
+ customDomain: string | null;
285
+ redirectUrl: string | null;
286
+ allowSignup: boolean;
287
+ signupMemberRoleId?: number | null;
288
+ signupMemberRoleName?: string | null;
289
+ isMapped: boolean;
290
+ isPublic: boolean;
291
+ allowAccountLogin?: boolean;
292
+ authenticationMethods?: 'name_dob'[];
293
+ allowedScopes?: SiteResponseAllowedScopesItem[];
294
+ createdAt: string;
295
+ updatedAt: string;
296
+ isReseller: boolean;
297
+ workspaceName: string;
298
+ workspaceUuid?: string | null;
299
+ ownerId?: number | null;
300
+ defaultWorkflowId?: number | null;
301
+ homePageId?: number | null;
302
+ operatorLineE164?: string | null;
303
+ url: string | null;
304
+ defaultUrl?: string | null;
305
+ googleAnalyticsId?: string | null;
306
+ googleAdwordsId?: string | null;
307
+ showCookieConsentBanner?: boolean;
308
+ permissions?: number;
309
+ organizationLogoUrl?: string | null;
310
+ primaryLocale?: string;
311
+ availableLocales?: string[];
312
+ pageCount?: number | null;
313
+ }
314
+ type SiteResponseAllowedScopesItem = typeof SiteResponseAllowedScopesItem[keyof typeof SiteResponseAllowedScopesItem];
315
+ declare const SiteResponseAllowedScopesItem: {
316
+ readonly 'records:read': "records:read";
317
+ readonly 'records:write': "records:write";
318
+ readonly 'records:admin': "records:admin";
319
+ };
320
+ type SiteResponseResolvedThemeSettings = {
321
+ [key: string]: unknown;
322
+ };
323
+ type SiteResponseTheme = typeof SiteResponseTheme[keyof typeof SiteResponseTheme] | null;
324
+ declare const SiteResponseTheme: {
325
+ readonly default: "default";
326
+ readonly 'gravityrail-start': "gravityrail-start";
327
+ readonly 'gravityrail-home': "gravityrail-home";
328
+ readonly 'gravityrail-home-2': "gravityrail-home-2";
329
+ readonly 'gravityrail-launch': "gravityrail-launch";
330
+ readonly 'gravity-rail-feb-2026': "gravity-rail-feb-2026";
331
+ readonly 'leapcure-home': "leapcure-home";
332
+ readonly 'leapcure-home-no-chat': "leapcure-home-no-chat";
333
+ readonly 'leapcure-home-pre-launch': "leapcure-home-pre-launch";
334
+ readonly 'admin-clinical-trial': "admin-clinical-trial";
335
+ readonly 'customer-basic': "customer-basic";
336
+ readonly 'public-demo': "public-demo";
337
+ readonly 'rc360-demo': "rc360-demo";
338
+ readonly 'patient-engagement-demo': "patient-engagement-demo";
339
+ readonly 'operator-product': "operator-product";
340
+ readonly 'gravity-health': "gravity-health";
341
+ readonly 'gravity-developer': "gravity-developer";
342
+ readonly 'gravity-rail-2026-v2': "gravity-rail-2026-v2";
343
+ readonly 'operator-2026': "operator-2026";
344
+ readonly 'cosan-enrollment': "cosan-enrollment";
345
+ readonly 'cosan-enrollment-v2': "cosan-enrollment-v2";
346
+ readonly 'gravity-health-enrollment': "gravity-health-enrollment";
347
+ readonly 'source-site': "source-site";
348
+ };
349
+ type SiteResponseThemeSettings = {
350
+ [key: string]: unknown;
351
+ };
352
+ interface SiteSignupResponse {
353
+ status: SiteSignupResponseStatus;
354
+ message: string;
355
+ memberId?: number | null;
356
+ roleName?: string | null;
357
+ }
358
+ type SiteSignupResponseStatus = typeof SiteSignupResponseStatus[keyof typeof SiteSignupResponseStatus];
359
+ declare const SiteSignupResponseStatus: {
360
+ readonly success: "success";
361
+ readonly already_member: "already_member";
362
+ };
363
+ /**
364
+ * One configurable value a theme declares.
365
+ */
366
+ interface ThemeSettingField {
367
+ /** Machine name; the key under Site.theme_settings */
368
+ key: string;
369
+ /** Display label shown in the Theme Settings form */
370
+ label: string;
371
+ /** Field/value type */
372
+ type: ThemeSettingFieldType;
373
+ /** Help text shown under the field */
374
+ description?: string | null;
375
+ /** Whether a value must be set */
376
+ required?: boolean;
377
+ /** Default value used when none is saved */
378
+ default?: unknown | null;
379
+ /** Choices for a 'select' field */
380
+ options?: EnumOption$1[] | null;
381
+ /** Optional section header to group fields under */
382
+ group?: string | null;
383
+ /** For reference fields (e.g. data_type): a payload matching the entity's create API (DataTypeFormData), used by the field's Create button to scaffold a new entity pre-populated with the theme's defaults. */
384
+ createDefaults?: ThemeSettingFieldCreateDefaults;
385
+ /** Schema contract the selected workspace-local Form must satisfy */
386
+ dataTypeRequirement?: DataTypeRequirement | null;
387
+ /** The value is the workspace's own (for example a practice name or logo, or the scheduling environment it books in). A template clone copies it so the theme can render, and import readiness reports it while it still equals the template's value, unless that value is the field's own default. A Bundle never carries or installs the publisher's value: the installing workspace supplies it as an installation slot. */
388
+ perWorkspace?: boolean;
389
+ /** A shared install field this per-workspace setting holds with settings of other kinds (lib/models/resources/installation_fields.py). A Bundle that carries this setting and another holding the same field asks the installing workspace for the value once and writes it to both. */
390
+ installField?: string | null;
391
+ /** Let editor clients identify reference pickers from the server schema. */
392
+ readonly isReference: boolean;
393
+ }
394
+ /**
395
+ * For reference fields (e.g. data_type): a payload matching the entity's create API (DataTypeFormData), used by the field's Create button to scaffold a new entity pre-populated with the theme's defaults.
396
+ */
397
+ type ThemeSettingFieldCreateDefaults = {
398
+ [key: string]: unknown;
399
+ } | null;
400
+ /**
401
+ * Field/value type
402
+ */
403
+ type ThemeSettingFieldType = typeof ThemeSettingFieldType[keyof typeof ThemeSettingFieldType];
404
+ declare const ThemeSettingFieldType: {
405
+ readonly text: "text";
406
+ readonly textarea: "textarea";
407
+ readonly number: "number";
408
+ readonly boolean: "boolean";
409
+ readonly select: "select";
410
+ readonly color: "color";
411
+ readonly url: "url";
412
+ readonly image: "image";
413
+ readonly data_type: "data_type";
414
+ readonly workflow: "workflow";
415
+ readonly page: "page";
416
+ readonly member_role: "member_role";
417
+ readonly phone_number: "phone_number";
418
+ };
419
+ /**
420
+ * The install field of an installed Bundle that fills one Site setting.
421
+ */
422
+ interface ThemeSettingInstallField {
423
+ fieldKey: string;
424
+ label: string;
425
+ installationUuid: string;
426
+ bundleUuid: string;
427
+ bundleName: string;
35
428
  }
36
429
  /**
37
- * What ``describe_session_token`` reports about a presented session.
430
+ * The active theme's configurable settings, their saved values, and the
431
+ * theme's capabilities — everything the Theme Settings tab needs in one call.
432
+ *
433
+ * ``fields`` is the declared schema (source-site manifest or hard-coded
434
+ * registry); ``values`` are editor values keyed by field key (saved UUID references
435
+ * are adapted to entity IDs for the existing pickers); ``features`` are the theme's capabilities.
436
+ */
437
+ interface ThemeSettingsResponse {
438
+ fields: ThemeSettingField[];
439
+ values: ThemeSettingsResponseValues;
440
+ features: ThemeFeatures;
441
+ installFields?: ThemeSettingsResponseInstallFields;
442
+ }
443
+ type ThemeSettingsResponseInstallFields = {
444
+ [key: string]: ThemeSettingInstallField;
445
+ };
446
+ type ThemeSettingsResponseValues = {
447
+ [key: string]: unknown;
448
+ };
449
+ /**
450
+ * TipTap native document structure.
38
451
  *
39
- * ``accountUuid`` / ``switchedFromAccountUuid`` let the frontend check that an
40
- * account-switch stash belongs to the account that switched (the restore in
41
- * ``/api/auth/end-temp-session``). Both describe a token the caller already
42
- * holds.
452
+ * Matches the TypeScript interface:
453
+ * {
454
+ * type: 'doc';
455
+ * content?: Array<{
456
+ * type: string;
457
+ * attrs?: Record<string, any>;
458
+ * content?: any[];
459
+ * marks?: Array<{ type: string; attrs?: Record<string, any> }>;
460
+ * text?: string;
461
+ * }>;
462
+ * }
463
+ */
464
+ interface TipTapDocumentOutput {
465
+ type?: 'doc';
466
+ content?: TipTapNodeOutput[] | null;
467
+ translations?: TipTapDocumentOutputTranslations;
468
+ [key: string]: unknown;
469
+ }
470
+ type TipTapDocumentOutputTranslations = {
471
+ [key: string]: TipTapDocumentOutput;
472
+ } | null;
473
+ /**
474
+ * A mark in TipTap (like bold, italic, etc.)
43
475
  */
44
- interface SessionDescription {
45
- sessionKind: SessionKind;
46
- expiresAt: string;
47
- accountUuid?: string | null;
48
- switchedFromAccountUuid?: string | null;
476
+ interface TipTapMark {
477
+ type: string;
478
+ attrs?: TipTapMarkAttrs;
479
+ [key: string]: unknown;
49
480
  }
481
+ type TipTapMarkAttrs = {
482
+ [key: string]: unknown;
483
+ } | null;
484
+ /**
485
+ * A node in the TipTap document structure
486
+ */
487
+ interface TipTapNodeOutput {
488
+ type: string;
489
+ attrs?: TipTapNodeOutputAttrs;
490
+ content?: TipTapNodeOutput[] | null;
491
+ marks?: TipTapMark[] | null;
492
+ text?: string | null;
493
+ [key: string]: unknown;
494
+ }
495
+ type TipTapNodeOutputAttrs = {
496
+ [key: string]: unknown;
497
+ } | null;
498
+ interface UnauthorizedSiteResponse {
499
+ id: number;
500
+ name: string;
501
+ uuid: string;
502
+ slug: string;
503
+ assetsFolderId?: number | null;
504
+ sourceFolderId?: number | null;
505
+ sourceReleaseId?: number | null;
506
+ theme: UnauthorizedSiteResponseTheme;
507
+ themeSettings?: UnauthorizedSiteResponseThemeSettings;
508
+ resolvedThemeSettings?: UnauthorizedSiteResponseResolvedThemeSettings;
509
+ content: string;
510
+ authorized: boolean;
511
+ tagLine: string | null;
512
+ metaDescription: string | null;
513
+ customDomain?: string | null;
514
+ redirectUrl: string | null;
515
+ allowSignup?: boolean;
516
+ signupMemberRoleId?: number | null;
517
+ signupMemberRoleName?: string | null;
518
+ isMapped?: boolean;
519
+ isPublic: boolean;
520
+ allowAccountLogin?: boolean;
521
+ authenticationMethods?: 'name_dob'[];
522
+ allowedScopes?: UnauthorizedSiteResponseAllowedScopesItem[];
523
+ createdAt: string;
524
+ updatedAt: string;
525
+ isReseller: boolean;
526
+ workspaceName?: string;
527
+ workspaceUuid?: string | null;
528
+ ownerId?: number | null;
529
+ defaultWorkflowId?: number | null;
530
+ homePageId?: number | null;
531
+ operatorLineE164?: string | null;
532
+ url?: string | null;
533
+ defaultUrl?: string | null;
534
+ googleAnalyticsId?: string | null;
535
+ googleAdwordsId?: string | null;
536
+ showCookieConsentBanner?: boolean;
537
+ permissions?: number;
538
+ organizationLogoUrl?: string | null;
539
+ primaryLocale?: string;
540
+ availableLocales?: string[];
541
+ pageCount?: number | null;
542
+ }
543
+ type UnauthorizedSiteResponseAllowedScopesItem = typeof UnauthorizedSiteResponseAllowedScopesItem[keyof typeof UnauthorizedSiteResponseAllowedScopesItem];
544
+ declare const UnauthorizedSiteResponseAllowedScopesItem: {
545
+ readonly 'records:read': "records:read";
546
+ readonly 'records:write': "records:write";
547
+ readonly 'records:admin': "records:admin";
548
+ };
549
+ type UnauthorizedSiteResponseResolvedThemeSettings = {
550
+ [key: string]: unknown;
551
+ };
552
+ type UnauthorizedSiteResponseTheme = typeof UnauthorizedSiteResponseTheme[keyof typeof UnauthorizedSiteResponseTheme] | null;
553
+ declare const UnauthorizedSiteResponseTheme: {
554
+ readonly default: "default";
555
+ readonly 'gravityrail-start': "gravityrail-start";
556
+ readonly 'gravityrail-home': "gravityrail-home";
557
+ readonly 'gravityrail-home-2': "gravityrail-home-2";
558
+ readonly 'gravityrail-launch': "gravityrail-launch";
559
+ readonly 'gravity-rail-feb-2026': "gravity-rail-feb-2026";
560
+ readonly 'leapcure-home': "leapcure-home";
561
+ readonly 'leapcure-home-no-chat': "leapcure-home-no-chat";
562
+ readonly 'leapcure-home-pre-launch': "leapcure-home-pre-launch";
563
+ readonly 'admin-clinical-trial': "admin-clinical-trial";
564
+ readonly 'customer-basic': "customer-basic";
565
+ readonly 'public-demo': "public-demo";
566
+ readonly 'rc360-demo': "rc360-demo";
567
+ readonly 'patient-engagement-demo': "patient-engagement-demo";
568
+ readonly 'operator-product': "operator-product";
569
+ readonly 'gravity-health': "gravity-health";
570
+ readonly 'gravity-developer': "gravity-developer";
571
+ readonly 'gravity-rail-2026-v2': "gravity-rail-2026-v2";
572
+ readonly 'operator-2026': "operator-2026";
573
+ readonly 'cosan-enrollment': "cosan-enrollment";
574
+ readonly 'cosan-enrollment-v2': "cosan-enrollment-v2";
575
+ readonly 'gravity-health-enrollment': "gravity-health-enrollment";
576
+ readonly 'source-site': "source-site";
577
+ };
578
+ type UnauthorizedSiteResponseThemeSettings = {
579
+ [key: string]: unknown;
580
+ };
50
581
  /**
51
- * The kind of session a cookie carries, and the kind of host that reads it.
582
+ * Save values for the active theme's declared settings.
583
+ *
584
+ * Values are validated/coerced against the resolved schema in the handler
585
+ * (undeclared keys dropped, references checked); see lib/services/theme_settings.py.
52
586
  */
53
- type SessionKind = typeof SessionKind[keyof typeof SessionKind];
54
- declare const SessionKind: {
55
- readonly account: "account";
56
- readonly site: "site";
587
+ interface UpdateThemeSettingsRequest {
588
+ values?: UpdateThemeSettingsRequestValues;
589
+ }
590
+ type UpdateThemeSettingsRequestValues = {
591
+ [key: string]: unknown;
57
592
  };
58
593
 
59
594
  /**
@@ -77,10 +612,6 @@ declare const EventRuleActionType$1: {
77
612
  readonly 'task:switch': "task:switch";
78
613
  readonly 'assistant:message': "assistant:message";
79
614
  readonly 'form:update_field': "form:update_field";
80
- readonly 'record:cel_mutate': "record:cel_mutate";
81
- readonly 'record:copy_fields': "record:copy_fields";
82
- readonly 'record:upsert_linked': "record:upsert_linked";
83
- readonly 'record:verify_fields': "record:verify_fields";
84
615
  readonly 'message:validation': "message:validation";
85
616
  readonly 'chat:create': "chat:create";
86
617
  readonly 'chat:continue': "chat:continue";
@@ -91,8 +622,6 @@ declare const EventRuleActionType$1: {
91
622
  readonly 'whatsapp:send': "whatsapp:send";
92
623
  readonly 'phone:call': "phone:call";
93
624
  readonly 'custom_tool:invoke': "custom_tool:invoke";
94
- readonly 'monday:upsert_item': "monday:upsert_item";
95
- readonly 'monday:refresh': "monday:refresh";
96
625
  readonly 'assignment:conclude': "assignment:conclude";
97
626
  readonly 'journey:enroll': "journey:enroll";
98
627
  readonly 'connection:sync': "connection:sync";
@@ -101,7 +630,6 @@ declare const EventRuleActionType$1: {
101
630
  readonly 'ecw:refresh_member_encounters': "ecw:refresh_member_encounters";
102
631
  readonly 'audio:play': "audio:play";
103
632
  readonly 'charleston:send_pmd_page': "charleston:send_pmd_page";
104
- readonly 'patientsync:transfer': "patientsync:transfer";
105
633
  };
106
634
  /**
107
635
  * Event rule data for creating/updating rules with parent objects.
@@ -151,9 +679,6 @@ type EventRuleDataTriggerParams = {
151
679
  type EventRuleEventType$1 = typeof EventRuleEventType$1[keyof typeof EventRuleEventType$1];
152
680
  declare const EventRuleEventType$1: {
153
681
  readonly 'task:execute': "task:execute";
154
- readonly 'task:enter': "task:enter";
155
- readonly 'task:command': "task:command";
156
- readonly 'task:exit': "task:exit";
157
682
  readonly 'workspace:member_joined': "workspace:member_joined";
158
683
  readonly 'workspace:member_left': "workspace:member_left";
159
684
  readonly 'member:updated': "member:updated";
@@ -211,8 +736,6 @@ interface EventRuleResponse$1 {
211
736
  eventType: EventRuleEventType$1;
212
737
  conditions: string | null;
213
738
  actionType: EventRuleActionType$1;
214
- actionParams: EventRuleResponseActionParams;
215
- triggerParams: EventRuleResponseTriggerParams;
216
739
  active: boolean;
217
740
  createdAt: string;
218
741
  updatedAt: string;
@@ -235,6 +758,8 @@ interface EventRuleResponse$1 {
235
758
  delay: number;
236
759
  order: number;
237
760
  actionSetLocked?: boolean;
761
+ actionParams: EventRuleResponseActionParams;
762
+ triggerParams: EventRuleResponseTriggerParams;
238
763
  }
239
764
  type EventRuleResponseActionParams = {
240
765
  [key: string]: unknown;
@@ -289,6 +814,7 @@ interface DataRecordResponse {
289
814
  fieldValues: DataRecordResponseFieldValues;
290
815
  createdAt: string;
291
816
  updatedAt: string;
817
+ createdByMemberId?: number | null;
292
818
  externalId?: string | null;
293
819
  accessMode?: number | null;
294
820
  retirement?: DataRecordRetirementResponse | null;
@@ -608,10 +1134,10 @@ interface CapabilityStatus {
608
1134
  */
609
1135
  interface CreateSignupResponse {
610
1136
  token: string;
611
- account: SignupAccountResponse;
1137
+ account: SignupAccountResponse | null;
612
1138
  member: SignupMemberResponse;
613
1139
  wasCreated: boolean;
614
- warnings?: DataRecordFieldWarning[];
1140
+ warnings?: (DataRecordFieldWarning | MemberContactFieldWarning | MemberContactSharedWarning | MemberLoginIdentityWarning)[];
615
1141
  }
616
1142
  /**
617
1143
  * Response for the current user's member profile.
@@ -725,6 +1251,53 @@ declare const ImportContactConflictField: {
725
1251
  readonly email: "email";
726
1252
  readonly phone: "phone";
727
1253
  };
1254
+ /**
1255
+ * A soft-warning entry for a contact field that could not be stored.
1256
+ *
1257
+ * Emitted by an ingest path (EHR/CRM sync, bulk import) when an
1258
+ * externally-supplied contact value cannot be normalized to the canonical
1259
+ * storage form. The Member is still created or updated — dropping a
1260
+ * patient record because their phone was typed with an extension would
1261
+ * lose clinical reach entirely — but the field is left unset and one of
1262
+ * these records why, so an operator can fix the value at the source.
1263
+ *
1264
+ * ``reason`` is a :class:`lib.utils.phone_utils.PhoneRejectionReason`
1265
+ * value for ``field == "phone"``. It is a closed vocabulary, so it is safe
1266
+ * to count and aggregate across a sync run.
1267
+ *
1268
+ * API-facing camelCase to match the other warning shapes in this module.
1269
+ */
1270
+ interface MemberContactFieldWarning {
1271
+ code: 'member_contact_field_not_stored';
1272
+ field: 'phone';
1273
+ reason: string;
1274
+ message: string;
1275
+ }
1276
+ /**
1277
+ * A soft-warning entry for a contact value another identity holds.
1278
+ *
1279
+ * Emitted by a Signup API write that declared ``member.matchKeys``: a
1280
+ * submitted email or phone that is not a declared match key stays data, so it
1281
+ * never decides the match. When another Member in the workspace holds it as
1282
+ * primary, or any Account holds it globally, it is stored on this Member as a
1283
+ * non-primary contact point (``sharing="unknown"``) instead of becoming the
1284
+ * primary value or an Account login credential (GRA-11201, GRA-8779).
1285
+ *
1286
+ * ``field`` is the contact field NAME only. The rejected value is PHI and
1287
+ * never appears here; neither does the external system's record identifier.
1288
+ * Message mirrors ``DataRecordFieldWarning.message``: schema/field
1289
+ * identifiers and a closed-vocabulary code only.
1290
+ */
1291
+ interface MemberContactSharedWarning {
1292
+ code: 'member_contact_field_shared';
1293
+ field: MemberContactSharedWarningField;
1294
+ message: string;
1295
+ }
1296
+ type MemberContactSharedWarningField = typeof MemberContactSharedWarningField[keyof typeof MemberContactSharedWarningField];
1297
+ declare const MemberContactSharedWarningField: {
1298
+ readonly email: "email";
1299
+ readonly phone: "phone";
1300
+ };
728
1301
  /**
729
1302
  * Response model for member credentials.
730
1303
  */
@@ -1086,6 +1659,21 @@ interface MemberLabelResponse {
1086
1659
  color: string;
1087
1660
  description: string | null;
1088
1661
  }
1662
+ /**
1663
+ * A soft-warning entry for a signup that created no login identity.
1664
+ *
1665
+ * The Member exists and the request succeeded, but it has no global Account:
1666
+ * every contact value it sent was another person's, so it could not become an
1667
+ * Account credential, and the Member was created account-less (GRA-11201
1668
+ * decision D4). The response carries no signup token and ``account`` is null.
1669
+ * An operator or a later invitation links an Account the normal way.
1670
+ *
1671
+ * Field-less and value-free by construction.
1672
+ */
1673
+ interface MemberLoginIdentityWarning {
1674
+ code: 'member_login_identity_not_created';
1675
+ message: string;
1676
+ }
1089
1677
  /**
1090
1678
  * Response model for file access within a member role.
1091
1679
  */
@@ -1116,6 +1704,9 @@ interface MemberRoleResponse {
1116
1704
  folderAccess?: MemberRoleFolderAccessResponse[];
1117
1705
  memberCount?: number;
1118
1706
  isDefaultForNewMembers?: boolean;
1707
+ /** The installation that keeps this role's name and scopes up to date (ADR-63). They are changed by installing another Bundle version or detaching the Bundle; who holds the role stays local. */
1708
+ installationUuid?: string | null;
1709
+ installationItemKey?: string | null;
1119
1710
  createdAt: string;
1120
1711
  updatedAt: string;
1121
1712
  }
@@ -1194,6 +1785,42 @@ declare const SmsDisabledReason: {
1194
1785
  readonly default: "default";
1195
1786
  readonly crm_opt_out: "crm_opt_out";
1196
1787
  };
1788
+ /**
1789
+ * Self-service profile contract for ``PUT /me``.
1790
+ *
1791
+ * Administrative member, account, role, label, trust, and integration identity
1792
+ * fields are intentionally absent and rejected rather than silently ignored.
1793
+ * ``releaseContactFromMemberId`` remains available because the profile UI uses
1794
+ * it to claim the member's own verified contact value; the mutation itself
1795
+ * independently requires ``members:admin`` before editing the other member.
1796
+ */
1797
+ interface UpdateCurrentWorkspaceMemberRequest {
1798
+ tosAccepted?: boolean | null;
1799
+ notifySms?: boolean | null;
1800
+ smsDisabledReason?: UpdateCurrentWorkspaceMemberRequestSmsDisabledReason;
1801
+ notifyEmail?: boolean | null;
1802
+ notifyVoice?: boolean | null;
1803
+ notifyWhatsapp?: boolean | null;
1804
+ locale?: string | null;
1805
+ timezone?: string | null;
1806
+ name?: string | null;
1807
+ firstName?: string | null;
1808
+ middleName?: string | null;
1809
+ lastName?: string | null;
1810
+ title?: string | null;
1811
+ description?: string | null;
1812
+ phone?: string | null;
1813
+ email?: string | null;
1814
+ dateOfBirth?: string | null;
1815
+ releaseContactFromMemberId?: number | null;
1816
+ }
1817
+ type UpdateCurrentWorkspaceMemberRequestSmsDisabledReason = typeof UpdateCurrentWorkspaceMemberRequestSmsDisabledReason[keyof typeof UpdateCurrentWorkspaceMemberRequestSmsDisabledReason] | null;
1818
+ declare const UpdateCurrentWorkspaceMemberRequestSmsDisabledReason: {
1819
+ readonly upstream_deactivation: "upstream_deactivation";
1820
+ readonly manual: "manual";
1821
+ readonly other: "other";
1822
+ readonly crm_opt_out: "crm_opt_out";
1823
+ };
1197
1824
  /**
1198
1825
  * Aggregate member counts for a workspace (superuser admin view).
1199
1826
  *
@@ -1279,358 +1906,47 @@ declare const WorkspaceMemberResponseTestMemberKind: {
1279
1906
  /**
1280
1907
  * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
1281
1908
  * (group map from emit_openapi.py). Do not edit manually.
1282
- * Group: account
1909
+ * Group: page
1283
1910
  */
1284
1911
 
1285
1912
  /**
1286
- * One Organization in which the Account has finance access.
1287
- */
1288
- interface AccountBillingOrganizationRef {
1289
- id: number;
1290
- name?: string | null;
1913
+ * TipTap native document structure.
1914
+ *
1915
+ * Matches the TypeScript interface:
1916
+ * {
1917
+ * type: 'doc';
1918
+ * content?: Array<{
1919
+ * type: string;
1920
+ * attrs?: Record<string, any>;
1921
+ * content?: any[];
1922
+ * marks?: Array<{ type: string; attrs?: Record<string, any> }>;
1923
+ * text?: string;
1924
+ * }>;
1925
+ * }
1926
+ */
1927
+ interface TipTapDocumentInput {
1928
+ type?: 'doc';
1929
+ content?: TipTapNodeInput[] | null;
1930
+ translations?: TipTapDocumentInputTranslations;
1931
+ [key: string]: unknown;
1291
1932
  }
1933
+ type TipTapDocumentInputTranslations = {
1934
+ [key: string]: TipTapDocumentInput;
1935
+ } | null;
1292
1936
  /**
1293
- * Base account response for non-admin endpoints.
1294
- *
1295
- * Note: With Verified Credential Architecture, if email/phone is set,
1296
- * it's verified by construction. The *_verified_at timestamps record when.
1297
- * Credentials are IMMUTABLE once set.
1937
+ * A node in the TipTap document structure
1298
1938
  */
1299
- interface AccountResponse {
1300
- id: number;
1301
- uuid: string;
1302
- loggedIn: boolean;
1303
- avatarUrl: string | null;
1304
- email: string | null;
1305
- phone: string | null;
1306
- emailVerifiedAt: string | null;
1307
- phoneVerifiedAt: string | null;
1308
- name: string | null;
1309
- createdAt: string;
1310
- isSuperuser: boolean;
1311
- enabled: boolean;
1312
- signupWorkspaceId: number | null;
1313
- tosAccepted: boolean;
1314
- optedOut: boolean;
1315
- locale: string | null;
1316
- timezone: string | null;
1317
- }
1318
- interface AdminAccountMembershipResponse$1 {
1319
- workspaceUuid: string;
1320
- workspaceName: string;
1321
- role: string;
1322
- createdAt: string;
1323
- tosAccepted: boolean;
1324
- memberRoleId: number;
1325
- memberId: number;
1326
- }
1327
- /**
1328
- * Response for an account's organization membership.
1329
- */
1330
- interface AdminAccountOrgMembershipResponse {
1331
- organizationId: number;
1332
- organizationUuid: string;
1333
- organizationName: string;
1334
- organizationSlug: string;
1335
- organizationLogoUrl: string | null;
1336
- role: string;
1337
- name: string | null;
1338
- accountName: string | null;
1339
- externalId: string | null;
1340
- hasBillingAccess?: boolean;
1341
- createdAt: string;
1342
- updatedAt: string;
1343
- }
1344
- /**
1345
- * Detailed account response for admin endpoints including related entities
1346
- */
1347
- interface AdminAccountResponse {
1348
- id: number;
1349
- uuid: string;
1350
- loggedIn: boolean;
1351
- avatarUrl: string | null;
1352
- email: string | null;
1353
- phone: string | null;
1354
- emailVerifiedAt: string | null;
1355
- phoneVerifiedAt: string | null;
1356
- name: string | null;
1357
- createdAt: string;
1358
- isSuperuser: boolean;
1359
- enabled: boolean;
1360
- signupWorkspaceId: number | null;
1361
- tosAccepted: boolean;
1362
- optedOut: boolean;
1363
- locale: string | null;
1364
- timezone: string | null;
1365
- billingOrganizations?: AccountBillingOrganizationRef[];
1366
- pendingDeletion?: boolean;
1367
- deletionRequestedAt?: string | null;
1368
- }
1369
- /**
1370
- * Response model for when a new API key is created, including the full key.
1371
- */
1372
- interface ApiKeyCreatedResponse {
1373
- id: number;
1374
- uuid: string;
1375
- name: string;
1376
- keyPrefix: string;
1377
- createdAt: string;
1378
- expiresAt?: string | null;
1379
- lastUsedAt?: string | null;
1380
- enabled: boolean;
1381
- scopes: string[];
1382
- appId?: number | null;
1383
- dataUseMode?: DataUseMode;
1384
- key: string;
1385
- }
1386
- /**
1387
- * Response model for API key information.
1388
- */
1389
- interface ApiKeyResponse {
1390
- id: number;
1391
- uuid: string;
1392
- name: string;
1393
- keyPrefix: string;
1394
- createdAt: string;
1395
- expiresAt?: string | null;
1396
- lastUsedAt?: string | null;
1397
- enabled: boolean;
1398
- scopes: string[];
1399
- appId?: number | null;
1400
- dataUseMode?: DataUseMode;
1401
- }
1402
- /**
1403
- * Response after canceling a credential change invitation.
1404
- */
1405
- interface CancelCredentialChangeInviteResponse {
1406
- success: boolean;
1407
- message: string;
1408
- }
1409
- /**
1410
- * Response after canceling a credential change request.
1411
- */
1412
- interface CancelCredentialChangeResponse {
1413
- success: boolean;
1414
- message: string;
1415
- }
1416
- /**
1417
- * Response after confirming a credential change invitation.
1418
- */
1419
- interface CredentialChangeInviteConfirmResponse {
1420
- success: boolean;
1421
- message: string;
1422
- credentialType?: CredentialChangeInviteConfirmResponseCredentialType;
1423
- }
1424
- type CredentialChangeInviteConfirmResponseCredentialType = typeof CredentialChangeInviteConfirmResponseCredentialType[keyof typeof CredentialChangeInviteConfirmResponseCredentialType] | null;
1425
- declare const CredentialChangeInviteConfirmResponseCredentialType: {
1426
- readonly email: "email";
1427
- readonly phone: "phone";
1428
- };
1429
- /**
1430
- * Response with details of a credential change invitation.
1431
- *
1432
- * Used for the confirmation page to show what change is being proposed.
1433
- */
1434
- interface CredentialChangeInviteDetailsResponse {
1435
- id: number;
1436
- credentialType: CredentialChangeInviteDetailsResponseCredentialType;
1437
- newValue: string;
1438
- workspaceName: string;
1439
- workspaceUuid: string;
1440
- initiatedByName: string | null;
1441
- createdAt: string;
1442
- expiresAt: string;
1443
- isExpired: boolean;
1444
- isValid: boolean;
1445
- }
1446
- type CredentialChangeInviteDetailsResponseCredentialType = typeof CredentialChangeInviteDetailsResponseCredentialType[keyof typeof CredentialChangeInviteDetailsResponseCredentialType];
1447
- declare const CredentialChangeInviteDetailsResponseCredentialType: {
1448
- readonly email: "email";
1449
- readonly phone: "phone";
1450
- };
1451
- /**
1452
- * Response after creating a credential change invitation.
1453
- */
1454
- interface CredentialChangeInviteResponse {
1455
- id: number;
1456
- credentialType: CredentialChangeInviteResponseCredentialType;
1457
- maskedNewValue: string;
1458
- expiresAt: string;
1459
- message: string;
1460
- }
1461
- type CredentialChangeInviteResponseCredentialType = typeof CredentialChangeInviteResponseCredentialType[keyof typeof CredentialChangeInviteResponseCredentialType];
1462
- declare const CredentialChangeInviteResponseCredentialType: {
1463
- readonly email: "email";
1464
- readonly phone: "phone";
1465
- };
1466
- /**
1467
- * Response after requesting a credential change.
1468
- */
1469
- interface CredentialChangeRequestResponse {
1470
- id: number;
1471
- credentialType: CredentialChangeRequestResponseCredentialType;
1472
- expiresAt: string;
1473
- message: string;
1474
- }
1475
- type CredentialChangeRequestResponseCredentialType = typeof CredentialChangeRequestResponseCredentialType[keyof typeof CredentialChangeRequestResponseCredentialType];
1476
- declare const CredentialChangeRequestResponseCredentialType: {
1477
- readonly email: "email";
1478
- readonly phone: "phone";
1479
- };
1480
- /**
1481
- * Response after verifying a credential change.
1482
- */
1483
- interface CredentialChangeVerifyResponse {
1484
- success: boolean;
1485
- message: string;
1486
- credentialType?: CredentialChangeVerifyResponseCredentialType;
1487
- }
1488
- type CredentialChangeVerifyResponseCredentialType = typeof CredentialChangeVerifyResponseCredentialType[keyof typeof CredentialChangeVerifyResponseCredentialType] | null;
1489
- declare const CredentialChangeVerifyResponseCredentialType: {
1490
- readonly email: "email";
1491
- readonly phone: "phone";
1492
- };
1493
- /**
1494
- * What a *credential* may carry (ADR-18 §1), not what a member may see.
1495
- *
1496
- * This is an axis on the connection, deliberately not a scope: scopes are
1497
- * additive grants for cross-member access, and a member's own data is reached
1498
- * with no scope at all, so no scope value can express "this channel must not
1499
- * carry PHI". Computed at mint time and mutable afterwards **only toward**
1500
- * :attr:`NO_PHI` — the same "narrows, never widens" doctrine as
1501
- * ``scope_restriction`` and ``Device.enrollment_scope_ceiling``. Widening is a
1502
- * re-consent, i.e. revoke and re-mint under lifted conditions.
1503
- */
1504
- type DataUseMode = typeof DataUseMode[keyof typeof DataUseMode];
1505
- declare const DataUseMode: {
1506
- readonly unrestricted: "unrestricted";
1507
- readonly no_phi: "no_phi";
1508
- };
1509
- interface LoginResponse {
1510
- token: string;
1511
- accountId: number;
1512
- accountName?: string | null;
1513
- accountUuid?: string | null;
1514
- requiresTwoFactor?: boolean | null;
1515
- availableTwoFactorMethods?: unknown[] | null;
1516
- sessionKind?: SessionKind | 'widget' | null;
1517
- expiresAt?: string | null;
1518
- }
1519
- /**
1520
- * Response for a pending credential change invitation.
1521
- */
1522
- interface PendingCredentialChangeInviteResponse {
1523
- id: number;
1524
- credentialType: PendingCredentialChangeInviteResponseCredentialType;
1525
- maskedNewValue: string;
1526
- workspaceName: string;
1527
- initiatedByName: string | null;
1528
- createdAt: string;
1529
- expiresAt: string;
1530
- isExpired: boolean;
1531
- status: string;
1532
- }
1533
- type PendingCredentialChangeInviteResponseCredentialType = typeof PendingCredentialChangeInviteResponseCredentialType[keyof typeof PendingCredentialChangeInviteResponseCredentialType];
1534
- declare const PendingCredentialChangeInviteResponseCredentialType: {
1535
- readonly email: "email";
1536
- readonly phone: "phone";
1537
- };
1538
- /**
1539
- * Response for a pending credential change request.
1540
- */
1541
- interface PendingCredentialChangeResponse {
1542
- id: number;
1543
- credentialType: PendingCredentialChangeResponseCredentialType;
1544
- maskedNewValue: string;
1545
- createdAt: string;
1546
- expiresAt: string;
1547
- isExpired: boolean;
1548
- attempts: number;
1549
- }
1550
- type PendingCredentialChangeResponseCredentialType = typeof PendingCredentialChangeResponseCredentialType[keyof typeof PendingCredentialChangeResponseCredentialType];
1551
- declare const PendingCredentialChangeResponseCredentialType: {
1552
- readonly email: "email";
1553
- readonly phone: "phone";
1554
- };
1555
- /**
1556
- * Response model for recovery codes
1557
- */
1558
- interface RecoveryCodeResponse {
1559
- /** List of recovery codes (only shown once) */
1560
- codes: string[];
1561
- /** When the codes were generated */
1562
- generatedAt: string;
1563
- warning?: string;
1564
- }
1565
- interface SendLoginCodeResponse {
1566
- success: boolean;
1567
- message?: string | null;
1568
- }
1569
- /**
1570
- * Response for TOTP setup initiation
1571
- */
1572
- interface TOTPSetupResponse {
1573
- /** Session ID for completing setup */
1574
- setupId: string;
1575
- /** Base32 encoded TOTP secret */
1576
- secret: string;
1577
- /** QR code URL for easy setup */
1578
- qrCodeUrl: string;
1579
- /** Manual entry key for authenticator apps */
1580
- manualEntryKey: string;
1581
- /** Issuer name for TOTP */
1582
- issuer: string;
1583
- }
1584
- /**
1585
- * Response model for 2FA method details
1586
- */
1587
- interface TwoFactorMethodResponse$1 {
1588
- id: number;
1589
- methodType: string;
1590
- name: string;
1591
- enabled: boolean;
1592
- createdAt: string;
1593
- lastUsedAt?: string | null;
1594
- }
1595
- /**
1596
- * Generic response for 2FA operations
1597
- */
1598
- interface TwoFactorOperationResponse {
1599
- /** Whether the operation was successful */
1600
- success: boolean;
1601
- /** Human-readable message */
1602
- message: string;
1603
- /** ID of the affected 2FA method */
1604
- methodId?: number | null;
1605
- }
1606
- /**
1607
- * Response for overall 2FA status
1608
- */
1609
- interface TwoFactorStatusResponse$1 {
1610
- /** Whether any 2FA method is enabled */
1611
- enabled: boolean;
1612
- /** List of configured 2FA methods */
1613
- methods: TwoFactorMethodResponse$1[];
1614
- /** Number of unused recovery codes */
1615
- recoveryCodesCount: number;
1616
- /** When recovery codes were last generated */
1617
- lastRecoveryCodesGenerated?: string | null;
1618
- }
1619
- /**
1620
- * Response for WebAuthn registration initiation
1621
- */
1622
- interface WebAuthnRegistrationResponse {
1623
- /** Session ID for completing setup */
1624
- setupId: string;
1625
- /** Full WebAuthn credential creation options */
1626
- credentialCreationOptions: WebAuthnRegistrationResponseCredentialCreationOptions;
1939
+ interface TipTapNodeInput {
1940
+ type: string;
1941
+ attrs?: TipTapNodeInputAttrs;
1942
+ content?: TipTapNodeInput[] | null;
1943
+ marks?: TipTapMark[] | null;
1944
+ text?: string | null;
1945
+ [key: string]: unknown;
1627
1946
  }
1628
- /**
1629
- * Full WebAuthn credential creation options
1630
- */
1631
- type WebAuthnRegistrationResponseCredentialCreationOptions = {
1947
+ type TipTapNodeInputAttrs = {
1632
1948
  [key: string]: unknown;
1633
- };
1949
+ } | null;
1634
1950
 
1635
1951
  /**
1636
1952
  * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
@@ -1722,6 +2038,22 @@ interface CalendarScheduleResponse$1 {
1722
2038
  type CalendarScheduleResponseRecurrenceRule = {
1723
2039
  [key: string]: unknown;
1724
2040
  } | null;
2041
+ /**
2042
+ * Local removal may commit before linked calendar removal is confirmed.
2043
+ */
2044
+ interface EventDeletionResponse {
2045
+ success?: boolean;
2046
+ /** Native Google removal confirmation. Null means this response does not track provider removal; success only confirms local removal. */
2047
+ syncStatus?: EventDeletionResponseSyncStatus;
2048
+ }
2049
+ /**
2050
+ * Native Google removal confirmation. Null means this response does not track provider removal; success only confirms local removal.
2051
+ */
2052
+ type EventDeletionResponseSyncStatus = typeof EventDeletionResponseSyncStatus[keyof typeof EventDeletionResponseSyncStatus] | null;
2053
+ declare const EventDeletionResponseSyncStatus: {
2054
+ readonly PENDING: "PENDING";
2055
+ readonly FAILED: "FAILED";
2056
+ };
1725
2057
  /**
1726
2058
  * Response model for calendar events.
1727
2059
  */
@@ -1753,6 +2085,8 @@ interface EventResponse {
1753
2085
  isRecurringInstance: boolean;
1754
2086
  originalStartTime: string | null;
1755
2087
  remoteEventId: string | null;
2088
+ syncStatus?: string | null;
2089
+ lastSyncedAt?: string | null;
1756
2090
  attendees?: AttendeeResponse[];
1757
2091
  createdAt: string;
1758
2092
  updatedAt: string;
@@ -2639,18 +2973,14 @@ interface RoutineConfigEventResponse {
2639
2973
  actor?: MemberSummary | null;
2640
2974
  }
2641
2975
  /**
2642
- * Deliver a Routine result by email from an authorized workspace Inbox.
2976
+ * Email the run's Member from no-reply@gravityrail.com.
2643
2977
  *
2644
- * Omit the destination to return results to the interactive Chat.
2645
- * There is no recipient field: each run emails the Member the run is for, so
2646
- * the Routine's Who (Me, another Member, or every Member of a group) decides
2647
- * who receives the result. ``inboxId`` is the sender.
2978
+ * Results remain available in Chat. The Routine's audience selects recipients.
2648
2979
  */
2649
- interface RoutineDestination {
2650
- channel?: 'email';
2651
- /** @exclusiveMinimum 0 */
2652
- inboxId: number;
2653
- }
2980
+ declare const RoutineDestinationValue: {
2981
+ readonly channel: "email";
2982
+ };
2983
+ type RoutineDestination = typeof RoutineDestinationValue;
2654
2984
  /**
2655
2985
  * Response model for Routines.
2656
2986
  */
@@ -2674,6 +3004,8 @@ interface RoutineResponse$1 {
2674
3004
  agentId?: number | null;
2675
3005
  prompt?: string | null;
2676
3006
  skills?: string[] | null;
3007
+ managerModel?: string | null;
3008
+ managerReasoningEffort?: string | null;
2677
3009
  destination?: RoutineDestination | null;
2678
3010
  limit: number;
2679
3011
  visibility: string;
@@ -2917,613 +3249,439 @@ declare enum Scope {
2917
3249
  ORG_DELETE = "org:delete"
2918
3250
  }
2919
3251
 
2920
- type ChatSortField = 'createdAt' | 'updatedAt' | 'title' | 'mostRecentMessage';
2921
- type AssignmentSortField = 'createdAt' | 'updatedAt';
2922
- type MemberSortField = 'createdAt' | 'updatedAt' | 'name' | 'email' | 'externalId';
2923
- type SiteSortField = 'createdAt' | 'updatedAt' | 'name';
2924
- type FileSortField = 'createdAt' | 'updatedAt' | 'name';
2925
- type PageSortField = 'createdAt' | 'updatedAt' | 'title';
2926
- type RuleExecutionSortField = 'createdAt' | 'completedAt' | 'durationMs' | 'status';
2927
- type RoutineSortField = 'createdAt' | 'updatedAt' | 'name' | 'scheduledTime';
2928
- type EventRunSortField = 'createdAt';
2929
- type AccountSortField = 'createdAt' | 'updatedAt' | 'name' | 'email';
2930
- type WorkspaceSortField = 'createdAt' | 'updatedAt' | 'name';
2931
- type AdminWorkspaceSortField = 'name' | 'slug' | 'createdAt';
2932
- type BotSortField = 'createdAt' | 'updatedAt' | 'name';
2933
- type AgentSortField = 'createdAt' | 'updatedAt' | 'name';
2934
- type WorkflowSortField = 'name' | 'updatedAt' | 'createdAt';
2935
- type TaskSortField = 'name' | 'createdAt' | 'workflowId';
2936
- type QualificationSortField = 'name' | 'createdAt';
2937
- type JourneySortField = 'name' | 'createdAt';
2938
- type McpServerSortField = 'name' | 'createdAt' | 'state';
2939
- type DataTypeSortField = 'name' | 'createdAt';
2940
- type CalendarEventSortField = 'startTime' | 'createdAt';
2941
-
2942
- /** Client enums — preserve UPPER_SNAKE member names used across the app.
2943
- *
2944
- * OpenAPI codegen emits lowercase const-objects in `generated/event_rule.ts`.
2945
- * The app imports these enums everywhere (config objects, switch statements, i18n
2946
- * keys). We keep hand-written enums here and assert below that every generated
2947
- * string-literal value has a matching client member. When the backend adds a new
2948
- * event/action/object type, add it to the Pydantic model, run `yarn generate:types`,
2949
- * then add the UPPER_SNAKE member here. */
2950
- declare enum EventRuleObjectType {
2951
- TASK = "task",
2952
- WORKSPACE = "workspace",
2953
- CHAT = "chat",
2954
- DATA_RECORD = "data_record",
2955
- MEMBER = "member",
2956
- ROUTINE = "routine",
2957
- WORKFLOW = "workflow",
2958
- CALENDAR = "calendar",
2959
- CALENDAR_EVENT_TYPE = "calendar_event_type",
2960
- JOURNEY = "journey",
2961
- CALL = "call",
2962
- VOICEMAIL = "voicemail",
2963
- FAX = "fax"
3252
+ /**
3253
+ * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
3254
+ * (group map from emit_openapi.py). Do not edit manually.
3255
+ * Group: data_record_filter
3256
+ */
3257
+ /**
3258
+ * Create a new data record filter (query-only, scoped to one DataType).
3259
+ */
3260
+ interface CreateDataRecordFilterRequest {
3261
+ dataTypeId: number;
3262
+ name: string;
3263
+ description?: string | null;
3264
+ pinned?: boolean | null;
3265
+ query?: CreateDataRecordFilterRequestQuery;
2964
3266
  }
2965
- declare enum EventRuleEventType {
2966
- TASK_EXECUTE = "task:execute",
2967
- TASK_ENTER = "task:enter",
2968
- TASK_COMMAND = "task:command",
2969
- TASK_EXIT = "task:exit",
2970
- MEMBER_JOINED = "workspace:member_joined",
2971
- MEMBER_LEFT = "workspace:member_left",
2972
- DATA_RECORD_CREATED = "data_record:created",
2973
- DATA_RECORD_UPDATED = "data_record:updated",
2974
- DATA_RECORD_CHANGED = "data_record:changed",
2975
- CHAT_CREATED = "chat:created",
2976
- /** Fires after a chat summary is generated on any channel. */
2977
- CHAT_SUMMARY = "chat:summary",
2978
- /**
2979
- * Fires after a user/assistant Message is persisted (GRA-8699) — every
2980
- * channel, including paused and human-handled chats. Filter by channel /
2981
- * direction / workflow via triggerParams.
2982
- */
2983
- MESSAGE_CREATED = "message:created",
2984
- /**
2985
- * Fires when a tracked link (`{{links.<key>}}` → `/x/{slug}`) is clicked
2986
- * (GRA-8733). Fires on the FIRST click per member per destination only,
2987
- * attributed clicks only, and only when triggerParams name a scope
2988
- * (`destinationKeys` or `workflowUuids`).
2989
- */
2990
- LINK_CLICKED = "link:clicked",
2991
- /**
2992
- * Fires once per outbound SMS that reaches a final carrier failure
2993
- * (`undelivered` or `failed`), including a status that arrives after the
2994
- * send workflow's one-hour close. Payload: message id, member id, sending
2995
- * number, error code and the shared retry answer — never message content.
2996
- */
2997
- SMS_DELIVERY_FAILED = "sms:delivery_failed",
2998
- CHAT_CALLBACK = "chat:callback",
2999
- MEMBER_UPDATED = "member:updated",
3000
- ROUTINE_TRIGGERED = "routine:triggered",
3001
- ASSISTANT_MESSAGE = "workflow:assistant_message",
3002
- USER_MESSAGE = "workflow:user_message",
3003
- /** Fires when an assignment STARTS — `task:execute` one level up, for
3004
- * workflows that have no tasks to hang a rule off. */
3005
- WORKFLOW_EXECUTE = "workflow:execute",
3006
- CALENDAR_EVENT_CREATED = "calendar_event:created",
3007
- CALENDAR_EVENT_UPDATED = "calendar_event:updated",
3008
- CALENDAR_EVENT_CANCELLED = "calendar_event:cancelled",
3009
- CALENDAR_EVENT_STARTING = "calendar_event:starting",
3010
- CALENDAR_EVENT_ENDED = "calendar_event:ended",
3011
- CALENDAR_EVENT_NO_SHOW = "calendar_event:no_show",
3012
- CONNECTOR_EVENT = "connector:event",
3013
- ASSIGNMENT_CONCLUDED = "assignment:concluded",
3014
- JOURNEY_STEP_EXECUTE = "journey_step:execute",
3015
- JOURNEY_ENROLLED = "journey:enrolled",
3016
- JOURNEY_COMPLETED = "journey:completed",
3017
- CALL_STARTED = "call:started",
3018
- CALL_COMPLETED = "call:completed",
3019
- CALL_SUMMARY = "call:summary",
3020
- VOICEMAIL_RECEIVED = "voicemail:received",
3021
- FAX_RECEIVED = "fax:received"
3022
- }
3023
- declare enum EventRuleActionType {
3024
- MEMBER_NOTIFY_ACTION = "member:notify",
3025
- MEMBER_LABEL_ACTION = "member:label",
3026
- MEMBER_UPSERT = "member:upsert",
3027
- SWITCH_TASK_ACTION = "task:switch",
3028
- ASSISTANT_MESSAGE = "assistant:message",
3029
- FORM_FIELD_UPDATE = "form:update_field",
3030
- CEL_MUTATE = "record:cel_mutate",
3031
- RECORD_COPY_FIELDS = "record:copy_fields",
3032
- RECORD_UPSERT_LINKED = "record:upsert_linked",
3033
- RECORD_VERIFY_FIELDS = "record:verify_fields",
3034
- MESSAGE_VALIDATION = "message:validation",
3035
- CHAT_CREATE = "chat:create",
3036
- CHAT_CONTINUE = "chat:continue",
3037
- CHAT_PAUSE = "chat:pause",
3038
- CHAT_SUMMARIZE = "chat:summarize",
3039
- EMAIL_SEND = "email:send",
3040
- INVOKE_CUSTOM_TOOL = "custom_tool:invoke",
3041
- MONDAY_UPSERT_ITEM = "monday:upsert_item",
3042
- MONDAY_REFRESH = "monday:refresh",
3043
- HUBSPOT_CREATE_DEAL_FROM_BOOKING = "hubspot:create_deal_from_booking",
3044
- ASSIGNMENT_CONCLUDE = "assignment:conclude",
3045
- JOURNEY_ENROLL = "journey:enroll",
3046
- SMS_SEND = "sms:send",
3047
- WHATSAPP_SEND = "whatsapp:send",
3048
- PHONE_CALL = "phone:call",
3049
- CONNECTION_SYNC = "connection:sync",
3050
- CONNECTOR_OPERATION = "connector:operation",
3051
- ECW_REFRESH_MEMBER_ENCOUNTERS = "ecw:refresh_member_encounters",
3052
- PLAY_AUDIO = "audio:play",
3053
- CHARLESTON_SEND_PMD_PAGE = "charleston:send_pmd_page",
3054
- PATIENTSYNC_TRANSFER = "patientsync:transfer"
3267
+ type CreateDataRecordFilterRequestQuery = {
3268
+ [key: string]: unknown;
3269
+ } | null;
3270
+ /**
3271
+ * Response model for a data record filter.
3272
+ */
3273
+ interface DataRecordFilterResponse {
3274
+ id: number;
3275
+ uuid: string;
3276
+ dataTypeId: number;
3277
+ name: string;
3278
+ description?: string | null;
3279
+ pinned?: boolean | null;
3280
+ createdAt: string;
3281
+ updatedAt: string;
3282
+ query?: DataRecordFilterResponseQuery;
3055
3283
  }
3056
- /** Narrow actionParams — OpenAPI types this as Record<string, unknown>. */
3057
- declare function eventRuleActionParams<T>(params: Record<string, unknown> | null | undefined): T;
3058
- /** Re-bind enum fields to client enums (generated OpenAPI uses string-literal unions). */
3059
- type EventRuleResponse = Omit<EventRuleResponse$1, 'objectType' | 'eventType' | 'actionType' | 'actionParams' | 'triggerParams'> & {
3060
- objectType: EventRuleObjectType;
3061
- eventType: EventRuleEventType;
3062
- actionType: EventRuleActionType;
3063
- actionParams: Record<string, unknown> | null;
3064
- triggerParams: Record<string, unknown> | null;
3065
- workflowRevisionId?: number | null;
3066
- };
3067
- type EventRule = EventRuleResponse;
3068
-
3069
- /** OpenAPI omits nested last run; list/detail endpoints include it when available. */
3070
- type RoutineVisibility = 'private' | 'workspace';
3284
+ type DataRecordFilterResponseQuery = {
3285
+ [key: string]: unknown;
3286
+ } | null;
3071
3287
  /**
3072
- * `NONE` (no time trigger — webhook / manual `/run` only) and `MANUAL` are
3073
- * retired modes: no request mints them, but a legacy stored row can still hold
3074
- * one, so a response may carry them.
3288
+ * Update a data record filter (query-only).
3075
3289
  */
3076
- type RoutineScheduleMode = 'ONCE' | 'CRON' | 'INTERVAL' | 'NONE' | 'MANUAL';
3077
- interface RoutineResponse extends Omit<RoutineResponse$1, 'eventRules' | 'visibility' | 'scheduleMode' | 'webhookEnabled'> {
3078
- visibility: RoutineVisibility;
3079
- scheduleMode: RoutineScheduleMode;
3080
- webhookEnabled: boolean;
3081
- lastRun?: RoutineRunResponse;
3082
- eventRules?: EventRuleResponse[];
3290
+ interface UpdateDataRecordFilterRequest {
3291
+ name?: string | null;
3292
+ description?: string | null;
3293
+ pinned?: boolean | null;
3294
+ query?: UpdateDataRecordFilterRequestQuery;
3083
3295
  }
3084
- type Routine = RoutineResponse;
3296
+ type UpdateDataRecordFilterRequestQuery = {
3297
+ [key: string]: unknown;
3298
+ } | null;
3085
3299
 
3086
3300
  /**
3087
- * Sentinel value returned by the API when a secret field (like apiToken) is set.
3088
- * The client should detect this value and show a "secret is set" state instead
3089
- * of the actual value. When sending updates, if the user hasn't changed the
3090
- * secret, either omit the field or don't include it in the request.
3301
+ * Unified Query Engine types — hand-written mirror of `lib/query/ir.py`
3302
+ * and the `/w/{wid}/queries/*` route models.
3303
+ *
3304
+ * The JSON IR is the wire format AND the UI's source of truth: the
3305
+ * query-builder renders from and edits exactly this tree.
3091
3306
  */
3092
- declare const MASKED_SECRET_SENTINEL = "__SECRET_SET__";
3093
-
3094
- interface MemberLabelActionParams {
3095
- addLabelIds?: string[];
3096
- removeLabelIds?: string[];
3307
+ type QueryEntityType = 'member' | 'chat' | 'data_record';
3308
+ type QueryComparisonOp = 'eq' | 'neq' | 'contains' | 'notContains' | 'startsWith' | 'in' | 'notIn' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'notBetween' | 'isEmpty' | 'notEmpty' | 'exists' | 'onDay' | 'notOnDay';
3309
+ type QueryAggregateOp = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
3310
+ /** Operators that take no value. */
3311
+ declare const QUERY_VALUELESS_OPS: ReadonlySet<QueryComparisonOp>;
3312
+ interface QueryNowValue {
3313
+ type: 'now';
3097
3314
  }
3098
- type MemberUpsertBehavior = 'upsert' | 'create_only' | 'update_only';
3099
- interface MemberUpsertActionParams {
3100
- /** Controls create/update behavior: 'upsert' (default), 'create_only', or 'update_only' */
3101
- behavior?: MemberUpsertBehavior;
3102
- /** If true and member exists, skip instead of failing (only for create_only) */
3103
- skipIfExists?: boolean;
3104
- /** If true and member not found, skip instead of failing (only for update_only) */
3105
- skipIfNotFound?: boolean;
3315
+ interface QueryDaysAgoValue {
3316
+ type: 'daysAgo';
3317
+ days: number;
3318
+ /** Optional hour component (legacy "36h" duration windows). */
3319
+ hours?: number;
3106
3320
  }
3107
- interface SwitchTaskActionParams {
3108
- taskUUID: string;
3321
+ interface QueryDaysFromNowValue {
3322
+ type: 'daysFromNow';
3323
+ days: number;
3109
3324
  }
3110
- interface AssistantMessageActionParams {
3111
- message: string;
3112
- suggestions?: string[];
3113
- messageTranslations?: Record<string, string>;
3114
- suggestionTranslations?: Record<string, string[]>;
3115
- inboundMessage?: string;
3116
- outboundMessage?: string;
3117
- /**
3118
- * When false, the injected assistant message does NOT end the agent
3119
- * turn — the loop keeps running so a follow-up model response can be
3120
- * generated after the canned filler. Default true preserves the
3121
- * existing "ends-the-turn" semantics for every existing rule whose
3122
- * JSON lacks the new key.
3123
- */
3124
- waitForResponse?: boolean;
3125
- /**
3126
- * Barge-in control for a line that must be heard in full. When false, a
3127
- * native realtime provider with a canned-speech primitive (xAI
3128
- * `force_message`) drops caller audio until the line finishes, so the
3129
- * caller cannot talk over it. Defaults to true — a caller can barge in on
3130
- * canned speech. Independent of `waitForResponse` (turn ownership vs
3131
- * barge-in): do not derive one from the other. Only a native canned-speech
3132
- * provider can honour it; other render paths warn rather than silently
3133
- * deliver an interruptible line.
3134
- */
3135
- allowInterrupt?: boolean;
3325
+ interface QueryDayBoundaryValue {
3326
+ type: 'dayBoundary';
3327
+ /** 'today' | 'tomorrow' | 'yesterday' | ISO date (YYYY-MM-DD) */
3328
+ day: string;
3329
+ edge?: 'start' | 'end';
3330
+ /** Whole-day shift relative to `day` (legacy daysAgoEqual: N). */
3331
+ offsetDays?: number;
3332
+ /** UTC-pinned day bounds (legacy calendar-event day operators). */
3333
+ tz?: 'workspace' | 'utc';
3136
3334
  }
3137
- /** One field of the action's Form and the value a `form:update_field` write sets on it. */
3138
- interface FormFieldUpdateAssignment {
3139
- fieldSlug: string;
3140
- /** A literal for the field's type, or a Jinja template evaluated when the action runs. */
3141
- value: unknown;
3335
+ type QueryTemporalValue = QueryNowValue | QueryDaysAgoValue | QueryDaysFromNowValue | QueryDayBoundaryValue;
3336
+ /** The calendar month containing the evaluation instant, in the workspace timezone. */
3337
+ interface QueryCurrentMonthPeriod {
3338
+ type: 'currentMonth';
3142
3339
  }
3143
- interface FormFieldUpdateActionParams {
3144
- /** Slug of the Form whose record the action writes. */
3145
- dataTypeSlug: string;
3146
- /** At least one; each field of `dataTypeSlug` at most once, written in this order by one update. */
3147
- fields: FormFieldUpdateAssignment[];
3148
- updateType?: 'newest' | 'oldest' | 'create' | 'trigger' | 'matchField' | 'selector';
3149
- matchField?: string;
3150
- matchValue?: any;
3151
- tiebreaker?: 'newest' | 'oldest';
3152
- selector?: string;
3153
- createIfMissing?: boolean;
3340
+ /** One explicit calendar month (`YYYY-MM`) in the workspace timezone. */
3341
+ interface QueryNamedMonthPeriod {
3342
+ type: 'month';
3343
+ value: string;
3154
3344
  }
3155
- interface MessageValidationActionParams {
3156
- condition?: string;
3157
- reason?: string;
3345
+ /** The month a `sum` aggregate reads from `periodField`. */
3346
+ type QueryAggregatePeriod = QueryCurrentMonthPeriod | QueryNamedMonthPeriod;
3347
+ type QueryScalar = boolean | number | string;
3348
+ type QueryRangeBound = QueryScalar | QueryTemporalValue;
3349
+ interface QueryRangeValue {
3350
+ type: 'range';
3351
+ min: QueryRangeBound;
3352
+ max: QueryRangeBound;
3158
3353
  }
3159
- interface ChatCreateActionParams {
3160
- workflowUUID?: string;
3161
- taskUUID?: string;
3162
- channel?: string;
3163
- channels?: string[];
3164
- phoneNumberUUID?: string;
3165
- inboxUUID?: string;
3166
- initialUserMessage?: string;
3167
- messageTemplate?: string;
3354
+ type QueryValue = QueryScalar | QueryTemporalValue | QueryRangeValue | QueryScalar[];
3355
+ /**
3356
+ * Marks where a named parameter's value goes: `{ "param": "<name>" }`.
3357
+ *
3358
+ * A predicate that holds one is a template ({@link QueryTemplatePredicate}).
3359
+ * Replace every marker with a value before the predicate goes to
3360
+ * `/queries/*`: those endpoints take values only and refuse a marker.
3361
+ */
3362
+ interface QueryParameterRef {
3363
+ param: string;
3168
3364
  }
3169
- interface ChatContinueActionParams {
3170
- assistantPrompt?: string;
3171
- updateType?: string;
3172
- }
3173
- interface ChatPauseActionParams {
3174
- message?: string;
3175
- }
3176
- interface ChatSummarizeActionParams {
3177
- summarizationPrompt?: string;
3178
- chatModel?: string;
3179
- }
3180
- interface InvokeCustomToolActionParams {
3181
- /** UUID of the custom tool to invoke (canonical identifier, issue #10893). */
3182
- customToolUUID?: string;
3183
- /** Legacy integer id of the custom tool. Kept for backward compat with pre-rename rules. */
3184
- customToolId?: number;
3185
- outputMode?: 'none' | 'tool_output' | 'assistant_message';
3365
+ /** A compare value in a template: a value, or a marker for a parameter. */
3366
+ type QueryTemplateValue = QueryValue | QueryParameterRef;
3367
+ interface QueryAnd<V = QueryValue> {
3368
+ kind: 'and';
3369
+ children: QueryPredicate<V>[];
3186
3370
  }
3187
- interface ConcludeAssignmentActionParams {
3188
- outcome: string;
3189
- reason?: string;
3371
+ interface QueryOr<V = QueryValue> {
3372
+ kind: 'or';
3373
+ children: QueryPredicate<V>[];
3190
3374
  }
3191
- interface JourneyEnrollActionParams {
3192
- /** UUID of the journey to enroll the member in. */
3193
- journeyUUID: string;
3194
- /**
3195
- * When true, a member whose enrollment in this journey is COMPLETED is
3196
- * restarted from the beginning. Active, paused and canceled enrollments
3197
- * are left unchanged. Omitted (the default) means an existing enrollment
3198
- * in any status is skipped.
3199
- */
3200
- reenrollCompleted?: boolean;
3375
+ interface QueryNot<V = QueryValue> {
3376
+ kind: 'not';
3377
+ child: QueryPredicate<V>;
3201
3378
  }
3202
3379
  /**
3203
- * Parameters for the ``audio:play`` event-rule action.
3380
+ * Explicit "no filter" — matches every row the caller is authorized to see,
3381
+ * compiling to SQL TRUE.
3204
3382
  *
3205
- * Plays a pre-recorded workspace audio file on the current voice call,
3206
- * without the LLM in the loop. Branch on ``call.answered_by`` from a
3207
- * ``call:started`` rule; ``task:execute`` on the start task runs before the
3208
- * call is placed. See the backend handler at
3209
- * ``lib/rules/actions/builtin/play_audio.py``.
3383
+ * Send this instead of omitting `where` when the filter bar is empty: an
3384
+ * omitted predicate lets legacy server-side defaults (e.g. the chats list's
3385
+ * implicit `archived == false`) apply invisibly. `and`/`or` need at least one
3386
+ * child, so an empty group is not a legal stand-in. It references no field, so
3387
+ * it needs no scope and cannot reach a scope-gated column.
3210
3388
  */
3211
- interface PlayAudioActionParams {
3212
- /** UUID of the workspace File row to play. Required. */
3213
- clipFileUuid: string;
3214
- /**
3215
- * When false, the clip plays end-to-end ignoring barge-in. Pair with
3216
- * ``hangUpOnAudioEnd: true`` for compliance recordings that must not
3217
- * be interrupted by speech. Defaults to true.
3218
- */
3219
- allowInterrupt?: boolean;
3220
- /**
3221
- * When true, the call hangs up immediately after the clip finishes
3222
- * streaming — no further LLM turns. Defaults to false.
3223
- */
3224
- hangUpOnAudioEnd?: boolean;
3225
- /**
3226
- * Playback volume as a percent in [0, 100]. ``80`` is the unity
3227
- * baseline — no gain adjustment is applied. Higher values boost,
3228
- * lower values attenuate. Clipped at the int16 ceiling so a 100%
3229
- * setting on already-hot source material won't introduce
3230
- * distortion beyond the source's own. Defaults to 80.
3231
- */
3232
- volume?: number;
3389
+ interface QueryMatchAll {
3390
+ kind: 'all';
3233
3391
  }
3234
-
3235
- interface EmailSendActionParams {
3236
- subjectTemplate?: string;
3237
- bodyTemplate?: string;
3238
- inboxUUID: string;
3239
- /** Deprecated stored override; author recipients through `memberIds`. */
3240
- toEmail?: string;
3241
- recipientMode?: 'target_member' | 'specific_member';
3242
- memberIds?: number[];
3243
- contentType?: 'text' | 'html';
3244
- workflowUUID?: string;
3245
- initialUserMessage?: string;
3392
+ interface QueryCompare<V = QueryValue> {
3393
+ kind: 'compare';
3394
+ field: string;
3395
+ op: QueryComparisonOp;
3396
+ value?: V | null;
3246
3397
  }
3247
- interface SmsSendActionParams {
3248
- phoneNumberUUID: string;
3249
- messageTemplate?: string;
3250
- workflowUUID?: string;
3251
- initialUserMessage?: string;
3398
+ interface QueryRecordSelection {
3399
+ field: string;
3400
+ criterion: 'newest' | 'oldest' | 'highest' | 'lowest' | 'earliest' | 'latest' | 'true' | 'false';
3252
3401
  }
3253
- interface PhoneCallActionParams {
3254
- phoneNumberUUID: string;
3255
- workflowUUID: string;
3402
+ /**
3403
+ * Correlated record predicate (#16104): all conditions in `where` must
3404
+ * match the SAME DataRecord row.
3405
+ *
3406
+ * - any → EXISTS(match)
3407
+ * - none → NOT EXISTS(match), members with no records DO match
3408
+ * - noneWithRecord → NOT EXISTS(match) AND has at least one record
3409
+ */
3410
+ interface QueryRecordMatch<V = QueryValue> {
3411
+ kind: 'recordMatch';
3412
+ dataType: number | string;
3413
+ mode?: 'any' | 'none' | 'noneWithRecord';
3414
+ where?: QueryPredicate<V> | null;
3415
+ selection?: QueryRecordSelection | null;
3256
3416
  }
3257
3417
  /**
3258
- * Parameters for the ecw:refresh_member_encounters action.
3259
- * Refreshes the local eCW encounter cache for the target member before
3260
- * later actions (such as phone:call) run in the same rule chain.
3418
+ * Correlated EXISTS over a named related-entity relation (the RecordMatch
3419
+ * pattern generalized): all conditions in `where` apply to the SAME related
3420
+ * row. Relations and their sub-fields come from `QueryFieldsResponse.relations`
3421
+ * (e.g. member `workflowEntries` → entry.workflowId / entry.status /
3422
+ * entry.enteredAt; `calendarEvents` → event.calendarId / event.typeId /
3423
+ * event.startTime).
3424
+ *
3425
+ * - any → EXISTS(match)
3426
+ * - none → NOT EXISTS(match), members with no related rows DO match
3261
3427
  */
3262
- interface EcwRefreshMemberEncountersActionParams {
3263
- /** ID of the eCW FHIR connection whose encounter cache should be refreshed. */
3264
- connectionId: number;
3265
- /** Days of encounter history to pull on this refresh. Defaults to 30. */
3266
- lookbackDays?: number;
3428
+ interface QueryRelationMatch<V = QueryValue> {
3429
+ kind: 'relationMatch';
3430
+ relation: string;
3431
+ mode?: 'any' | 'none';
3432
+ where?: QueryPredicate<V> | null;
3433
+ }
3434
+ interface QueryAggregatePredicate {
3435
+ kind: 'aggregate';
3436
+ source: string;
3267
3437
  /**
3268
- * When true (default), a refresh failure raises a non-retryable action
3269
- * error so later rules in the same chain do not run. Set to false only
3270
- * when a time-critical outreach must proceed with stale cache on refresh
3271
- * failure.
3438
+ * Narrows a parameterized source (e.g. workflowEntries → workflow ids).
3439
+ * `records` takes exactly one DataType id (the Form); `sum` requires it.
3272
3440
  */
3273
- haltOnFailure?: boolean;
3441
+ sourceIds?: number[] | null;
3442
+ metric?: 'count' | 'max' | 'sum';
3443
+ /** `sum` only: the numeric record field to total (`record.<slug>`). */
3444
+ of?: string | null;
3445
+ op: QueryAggregateOp;
3446
+ /** metric=max also accepts an ISO datetime string. */
3447
+ value: number | string | QueryNowValue | QueryDaysAgoValue | QueryDaysFromNowValue;
3448
+ windowDays?: number | null;
3449
+ /** Mutually exclusive with windowDays. */
3450
+ windowHours?: number | null;
3451
+ /** `sum` only: the record date field the calendar month is read from. */
3452
+ periodField?: string | null;
3453
+ /** `sum` only: the calendar month the records must fall in. */
3454
+ period?: QueryAggregatePeriod | null;
3455
+ emptyPolicy?: 'include' | 'exclude';
3274
3456
  }
3275
- /**
3276
- * Column mapping for Monday.com create item action.
3277
- * Stores the column slug (e.g., 'text_abc123') and the user-friendly label
3278
- * along with the Jinja template value.
3279
- */
3280
- interface MondayColumnMapping {
3281
- columnId: string;
3282
- columnTitle: string;
3283
- columnType: string;
3284
- template: string;
3457
+ interface QuerySubQueryRef<V = QueryValue> {
3458
+ kind: 'subquery';
3459
+ entity: 'member';
3460
+ link: string;
3461
+ negate?: boolean;
3462
+ where?: QueryPredicate<V> | null;
3285
3463
  }
3286
- /**
3287
- * Upsert mode for Monday.com item action.
3288
- * Controls whether to create new items, update existing items, or both.
3289
- */
3290
- type MondayUpsertMode = 'create_only' | 'update_only' | 'upsert';
3291
- /**
3292
- * Lookup type for Monday.com item action.
3293
- * Controls how to find existing items to update.
3294
- */
3295
- type MondayLookupType = 'column_value' | 'item_id';
3296
- /**
3297
- * Behavior when multiple items match the lookup criteria.
3298
- */
3299
- type MultiMatchBehavior = 'fail' | 'update_first' | 'update_all';
3300
- /**
3301
- * Parameters for upserting (create or update) a Monday.com item.
3302
- * This is the primary action for Monday.com item operations.
3303
- */
3304
- interface MondayUpsertItemActionParams {
3305
- boardId: string;
3306
- groupId?: string;
3307
- itemNameTemplate?: string;
3308
- columnMappings?: MondayColumnMapping[];
3309
- lookupType?: MondayLookupType;
3310
- lookupColumnId?: string;
3311
- lookupValueTemplate?: string;
3312
- upsertMode?: MondayUpsertMode;
3313
- multiMatchBehavior?: MultiMatchBehavior;
3314
- apiToken?: string;
3464
+ interface QuerySavedFilterRef {
3465
+ kind: 'savedFilterRef';
3466
+ filterType?: 'member';
3467
+ filterIds: number[];
3468
+ combine?: 'union' | 'intersect';
3315
3469
  }
3316
3470
  /**
3317
- * Column mapping for Monday.com refresh action.
3318
- * Maps Monday.com columns to member or data fields.
3471
+ * A predicate tree. `V` is the type a compare node holds as its value: a
3472
+ * {@link QueryValue} for a predicate that can run, which is the default.
3319
3473
  */
3320
- interface MondayRefreshColumnMapping {
3321
- columnId: string;
3322
- columnType: string;
3474
+ type QueryPredicate<V = QueryValue> = QueryAnd<V> | QueryOr<V> | QueryNot<V> | QueryMatchAll | QueryCompare<V> | QueryRecordMatch<V> | QueryRelationMatch<V> | QueryAggregatePredicate | QuerySubQueryRef<V> | QuerySavedFilterRef;
3475
+ /** A predicate whose compare values may be parameter markers. */
3476
+ type QueryTemplatePredicate = QueryPredicate<QueryTemplateValue>;
3477
+ interface QuerySortKey {
3478
+ field: string;
3479
+ dir?: 'asc' | 'desc';
3323
3480
  }
3324
- /**
3325
- * Parameters for refreshing member data from Monday.com.
3326
- * Fetches data from a Monday.com item and updates the local member record.
3327
- */
3328
- interface MondayRefreshActionParams {
3329
- boardId: string;
3330
- itemIdSource?: string;
3331
- skipIfNoItemId?: boolean;
3332
- memberFieldMappings?: Record<string, MondayRefreshColumnMapping>;
3333
- dataFieldMappings?: Record<string, any>;
3334
- apiToken?: string;
3481
+ interface QueryGroupBy {
3482
+ field: string;
3483
+ bucket?: 'day' | 'week' | 'month' | null;
3484
+ alias?: string | null;
3335
3485
  }
3336
- interface EventRuleFormData {
3337
- name?: string | null;
3338
- uuid?: string;
3339
- objectType: EventRuleObjectType;
3340
- eventType: EventRuleEventType;
3341
- conditions?: string | null;
3342
- actionType: EventRuleActionType;
3343
- actionParams?: Record<string, any>;
3344
- triggerParams?: Record<string, any>;
3345
- active?: boolean;
3346
- taskId?: number | null;
3347
- dataTypeId?: number | null;
3348
- routineId?: number | null;
3349
- workflowRevisionId?: number | null;
3350
- calendarId?: number | null;
3351
- calendarEventTypeId?: number | null;
3352
- journeyStepId?: number | null;
3353
- delay?: number;
3354
- order?: number;
3486
+ interface QueryMetric {
3487
+ fn: 'count' | 'countDistinct' | 'sum' | 'avg' | 'min' | 'max';
3488
+ of?: string | null;
3489
+ as?: string;
3355
3490
  }
3356
- interface UpdateEventRuleFormData {
3357
- name?: string | null;
3358
- conditions?: string | null;
3359
- actionParams?: Record<string, any>;
3360
- triggerParams?: Record<string, any>;
3361
- active?: boolean;
3362
- delay?: number;
3363
- order?: number;
3491
+ interface QueryAggregateSpec {
3492
+ groupBy?: QueryGroupBy[];
3493
+ metrics: QueryMetric[];
3494
+ limit?: number;
3364
3495
  }
3365
3496
  /**
3366
- * Input type for batch event rule operations (create/update with parent object).
3367
- * Used when syncing event rules as part of a task or workflow update.
3368
- * UUID is required and used for matching existing rules.
3497
+ * A named per-member aggregate (member queries only). The fields of
3498
+ * {@link QueryAggregatePredicate} that say what is aggregated, validated by the
3499
+ * same rules, plus an `alias` that `sort` and `select` reference as
3500
+ * `computed.<alias>`. A member with no rows reads 0 for `count`/`sum` and null
3501
+ * for `max`, which sorts last in either direction.
3369
3502
  */
3370
- interface EventRuleInput {
3371
- uuid: string;
3372
- name?: string | null;
3373
- objectType?: EventRuleObjectType;
3374
- eventType: EventRuleEventType;
3375
- actionType: EventRuleActionType;
3376
- actionParams?: Record<string, any> | null;
3377
- triggerParams?: Record<string, any> | null;
3378
- conditions?: string | null;
3379
- active?: boolean;
3380
- delay?: number;
3503
+ interface QueryComputedAggregate {
3504
+ alias: string;
3505
+ source: string;
3506
+ sourceIds?: number[] | null;
3507
+ metric?: 'count' | 'max' | 'sum';
3508
+ /** `sum` only: the numeric record field to total (`record.<slug>`). */
3509
+ of?: string | null;
3510
+ windowDays?: number | null;
3511
+ /** Mutually exclusive with windowDays. */
3512
+ windowHours?: number | null;
3513
+ /** `sum` only: the record date field the calendar month is read from. */
3514
+ periodField?: string | null;
3515
+ /** `sum` only: the calendar month the records must fall in. */
3516
+ period?: QueryAggregatePeriod | null;
3381
3517
  }
3382
- interface RuleExecutionsQueryParams {
3383
- cursor?: string;
3384
- pageSize?: number;
3385
- sortBy?: RuleExecutionSortField;
3386
- sortOrder?: SortOrder;
3387
- ruleId?: number;
3388
- status?: string;
3389
- triggerType?: string;
3390
- actionSlug?: string;
3391
- objectType?: string;
3392
- eventType?: string;
3393
- actionType?: string;
3394
- workflowRevisionId?: number;
3518
+ interface QueryIR {
3519
+ entity: QueryEntityType;
3520
+ dataType?: number | string | null;
3521
+ where?: QueryPredicate | null;
3522
+ /** May include `computed.<alias>`, returned under that key in each row. */
3523
+ select?: string[] | null;
3524
+ /** May sort by `computed.<alias>`. */
3525
+ sort?: QuerySortKey[] | null;
3526
+ limit: number;
3527
+ cursor?: string | null;
3528
+ aggregate?: QueryAggregateSpec | null;
3529
+ includeArchived?: boolean;
3530
+ /** Member queries only; at most 3, unique aliases. Not with `aggregate`. */
3531
+ computed?: QueryComputedAggregate[] | null;
3395
3532
  }
3396
- type RoutineRunStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'SKIPPED';
3397
- interface CreateRoutineRequest {
3398
- name: string;
3399
- description?: string;
3400
- scheduleEnabled?: boolean;
3401
- scheduleMode?: 'ONCE' | 'CRON' | 'INTERVAL';
3402
- scheduledTime?: string;
3403
- intervalSeconds?: number;
3404
- repeatCount?: number;
3405
- cronString?: string;
3406
- /** IANA timezone the cronString is interpreted in (e.g.
3407
- * "America/Los_Angeles"). Omit to default to the workspace timezone,
3408
- * else UTC. Only meaningful for CRON mode. */
3409
- timezone?: string;
3410
- startDate?: string;
3411
- memberFilterId?: number | null;
3412
- targetMemberId?: number | null;
3413
- workflowId?: number | null;
3414
- /** Plain instruction executed by the selected Agent or the Workspace Manager. */
3415
- prompt?: string | null;
3416
- /** Agent responsible for executing a plain prompt. */
3417
- agentId?: number | null;
3418
- /** Optional starting skills for the plain prompt. */
3419
- skills?: string[] | null;
3420
- destination?: RoutineDestination | null;
3421
- limit?: number;
3422
- visibility?: 'private' | 'workspace';
3423
- /** When true, the server generates a webhook secret and returns its
3424
- * plaintext exactly once in the create response. */
3425
- webhookEnabled?: boolean;
3426
- /** Ordered event rules to attach in the same request. Server syncs by
3427
- * UUID: same-UUID updates, new UUID creates, omitted UUIDs are deleted. */
3428
- eventRules?: EventRuleInput[];
3533
+ type QueryRunMode = 'rows' | 'count' | 'aggregate';
3534
+ interface RunQueryRequest {
3535
+ query: QueryIR;
3536
+ mode?: QueryRunMode | null;
3429
3537
  }
3430
- interface UpdateRoutineRequest {
3431
- name?: string;
3432
- description?: string;
3433
- scheduleEnabled?: boolean;
3434
- /** A retired mode may be re-sent unchanged on a disabled row; enabling one
3435
- * is rejected by the server. */
3436
- scheduleMode?: 'ONCE' | 'CRON' | 'INTERVAL' | 'NONE' | 'MANUAL';
3437
- scheduledTime?: string;
3438
- intervalSeconds?: number;
3439
- repeatCount?: number;
3440
- cronString?: string;
3441
- /** IANA timezone the cronString is interpreted in. Pass empty string ""
3442
- * to reset it to the workspace timezone — the server stores that value
3443
- * explicitly rather than clearing the field. Omit to leave unchanged. */
3444
- timezone?: string;
3445
- /** ISO 8601 datetime string for deferred start. Pass empty string "" to clear the start date. */
3446
- startDate?: string;
3447
- memberFilterId?: number | null;
3448
- targetMemberId?: number | null;
3449
- workflowId?: number | null;
3450
- prompt?: string | null;
3451
- agentId?: number | null;
3452
- skills?: string[] | null;
3453
- destination?: RoutineDestination | null;
3454
- limit?: number;
3455
- visibility?: 'private' | 'workspace';
3456
- /** Ordered event rules to attach. Server syncs by UUID: same-UUID rows
3457
- * update, new UUIDs create, UUIDs missing from the list are deleted.
3458
- * Omit the field to leave existing rules untouched. */
3459
- eventRules?: EventRuleInput[];
3460
- /** Toggle inbound webhook. Enabling without a stored secret generates one and surfaces plaintext in the response exactly once. */
3461
- webhookEnabled?: boolean;
3462
- /** Rotate the stored secret without toggling enabled. Ignored when webhookEnabled=false. */
3463
- rotateWebhookSecret?: boolean;
3538
+ interface QueryCostInfo {
3539
+ score: number;
3540
+ budget: number;
3464
3541
  }
3465
- interface RoutinesQueryParams {
3466
- page?: number;
3467
- pageSize?: number;
3468
- sortBy?: RoutineSortField;
3469
- sortOrder?: SortOrder;
3542
+ interface ValidateQueryResponse {
3543
+ valid: boolean;
3544
+ cost: QueryCostInfo;
3545
+ warnings: string[];
3546
+ errors: string[];
3547
+ }
3548
+ interface RunQueryResponse {
3549
+ mode: string;
3550
+ items?: Record<string, unknown>[] | null;
3551
+ nextCursor?: string | null;
3552
+ count?: number | null;
3553
+ rows?: Record<string, unknown>[] | null;
3554
+ warnings: string[];
3555
+ cost?: QueryCostInfo | null;
3556
+ }
3557
+ /** A labeled choice for a field whose raw values are ids/codes. */
3558
+ interface QueryEnumOption {
3559
+ value: string | number;
3560
+ label: string;
3561
+ /** Display color (bare 6-digit hex, as stored on MemberLabel), if any. */
3562
+ color?: string | null;
3563
+ }
3564
+ interface QueryFieldInfo {
3565
+ path: string;
3566
+ type: string;
3567
+ operators: string[];
3568
+ sortable: boolean;
3569
+ selectable: boolean;
3570
+ enumValues?: unknown[] | null;
3470
3571
  /**
3471
- * 'mine' = routines I own, 'shared' = workspace-visible from others,
3472
- * 'all' = both. 'all_including_private' = every routine in the
3473
- * workspace; requires AUTOMATIONS_ADMIN and will 403 otherwise.
3572
+ * Labeled value options ({value, label}) for fields whose raw values are
3573
+ * meaningless to humans (label/role ids). Value stored in the IR is
3574
+ * `value`; the UI shows `label`.
3474
3575
  */
3475
- owner?: 'mine' | 'shared' | 'all' | 'all_including_private';
3476
- /** Narrow within the visibility filter; never widens it. */
3477
- ownerId?: number;
3478
- /** Narrow to Routines associated with this Agent. Never widens visibility. */
3479
- agentId?: number;
3480
- /** Narrow to Routines associated with an Agent. Never widens visibility. */
3481
- agentOnly?: boolean;
3576
+ enumOptions?: QueryEnumOption[] | null;
3577
+ /** Human picker label when the path tail is misleading (e.g. "labelId"). */
3578
+ displayName?: string | null;
3579
+ /**
3580
+ * Semantic group from the registry (profile/contact/notifications/
3581
+ * communications/workflows/calendar) — drives builder palette grouping.
3582
+ * Optional for older API versions; null = uncategorized.
3583
+ */
3584
+ category?: string | null;
3482
3585
  }
3483
- interface RoutineRunsQueryParams {
3484
- page?: number;
3485
- pageSize?: number;
3486
- sortBy?: EventRunSortField;
3487
- sortOrder?: SortOrder;
3488
- routineId?: number;
3489
- memberId?: number;
3490
- status?: RoutineRunStatus;
3586
+ interface QueryRecordFieldInfo {
3587
+ slug: string;
3588
+ name: string;
3589
+ /** The Query Engine's kind: `text`, `number`, `boolean`, `datetime`, `enum`. */
3590
+ type: string;
3591
+ /** Whether the field can split a record Metric's series; the server decides. */
3592
+ groupable: boolean;
3593
+ operators: string[];
3594
+ enumValues?: unknown[] | null;
3595
+ /**
3596
+ * The Form field's option labels, in `enumValues` order. The IR stores
3597
+ * `value`; the UI shows `label`. Absent for a field that is not an enum.
3598
+ */
3599
+ enumOptions?: QueryEnumOption[] | null;
3491
3600
  }
3492
- interface SchedulePreviewRequest {
3493
- cronString: string;
3494
- count?: number;
3495
- /** IANA timezone the cronString is interpreted in (default UTC) so the
3496
- * previewed run times match what the dispatcher will fire. */
3497
- timezone?: string;
3601
+ interface QueryDataTypeInfo {
3602
+ id: number;
3603
+ slug: string;
3604
+ name: string;
3605
+ isCollection: boolean;
3606
+ recordFields: QueryRecordFieldInfo[];
3607
+ }
3608
+ interface QueryFieldsResponse {
3609
+ entities: Record<string, QueryFieldInfo[]>;
3610
+ aggregateSources: Record<string, string[]>;
3611
+ dataTypes: QueryDataTypeInfo[];
3612
+ recordSystemFields: QueryFieldInfo[];
3613
+ /**
3614
+ * RelationMatch palette: entity → relation name → the relation's
3615
+ * queryable sub-fields (e.g. member.workflowEntries → entry.workflowId,
3616
+ * entry.status, entry.enteredAt). Same raw-ID hiding convention as
3617
+ * `entities`. Optional for older API versions.
3618
+ */
3619
+ relations?: Record<string, Record<string, QueryFieldInfo[]>>;
3620
+ /**
3621
+ * entity → aggregate source → semantic category. Only categorized sources
3622
+ * appear; uncategorized sources are internal (legacy-adapter parity) and
3623
+ * should not be offered in builder palettes. Optional for older API
3624
+ * versions.
3625
+ */
3626
+ aggregateSourceCategories?: Record<string, Record<string, string>>;
3498
3627
  }
3628
+
3629
+ type ChatSortField = 'createdAt' | 'updatedAt' | 'title' | 'mostRecentMessage';
3630
+ type AssignmentSortField = 'createdAt' | 'updatedAt';
3631
+ type MemberSortField = 'createdAt' | 'updatedAt' | 'name' | 'email' | 'externalId';
3632
+ type SiteSortField = 'createdAt' | 'updatedAt' | 'name';
3633
+ type FileSortField = 'createdAt' | 'updatedAt' | 'name';
3634
+ type PageSortField = 'createdAt' | 'updatedAt' | 'title';
3635
+ type RuleExecutionSortField = 'createdAt' | 'completedAt' | 'durationMs' | 'status';
3636
+ type RoutineSortField = 'createdAt' | 'updatedAt' | 'name' | 'scheduledTime';
3637
+ type EventRunSortField = 'createdAt';
3638
+ type AccountSortField = 'createdAt' | 'updatedAt' | 'name' | 'email';
3639
+ type WorkspaceSortField = 'createdAt' | 'updatedAt' | 'name';
3640
+ type AdminWorkspaceSortField = 'name' | 'slug' | 'createdAt';
3641
+ type BotSortField = 'createdAt' | 'updatedAt' | 'name';
3642
+ type AgentSortField = 'createdAt' | 'updatedAt' | 'name';
3643
+ type WorkflowSortField = 'name' | 'updatedAt' | 'createdAt';
3644
+ type TaskSortField = 'name' | 'createdAt' | 'workflowId';
3645
+ type QualificationSortField = 'name' | 'createdAt';
3646
+ type JourneySortField = 'name' | 'createdAt';
3647
+ type McpServerSortField = 'name' | 'createdAt' | 'state';
3648
+ type DataTypeSortField = 'name' | 'createdAt';
3649
+ type CalendarEventSortField = 'startTime' | 'createdAt';
3650
+
3499
3651
  /**
3500
- * Draft input for the non-persisting Routine voice-readiness preview
3501
- * (`POST /routines/preview-voice-readiness`). Hand-written (like
3502
- * {@link SchedulePreviewRequest}) so `eventRules` uses the app's
3503
- * {@link EventRuleInput} shape rather than the generated `EventRuleData`.
3652
+ * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
3653
+ * (group map from emit_openapi.py). Do not edit manually.
3654
+ * Group: workspace_selection
3504
3655
  */
3505
- interface RoutineVoiceReadinessPreviewRequest {
3506
- /** Set on update-style previews; the route enforces owner-or-admin. */
3507
- routineId?: number | null;
3508
- name?: string | null;
3509
- memberFilterId?: number | null;
3510
- targetMemberId?: number | null;
3511
- eventRules?: EventRuleInput[] | null;
3512
- }
3513
- interface TaskExportEventRuleRelation {
3514
- taskUuid: string;
3515
- eventRuleUuid: string;
3516
- ruleType: string;
3517
- }
3518
- interface EventRuleExportItem {
3519
- uuid: string;
3520
- name: string;
3521
- eventType: string;
3522
- objectType: string;
3523
- conditions: string | null;
3524
- actionType: string;
3525
- actionParams: Record<string, any>;
3656
+ /**
3657
+ * Which of the organization's workspaces a source or sink may reach.
3658
+ *
3659
+ * ``selected`` reaches ``workspaceUuids`` plus every workspace carrying ALL
3660
+ * of ``labelSelector`` and needs at least one of the two; ``all`` and
3661
+ * ``none`` carry neither list.
3662
+ */
3663
+ interface OrgWorkspaceScopeRequest {
3664
+ mode: WorkspaceScopeMode;
3665
+ /** @maxItems 100 */
3666
+ workspaceUuids?: string[];
3667
+ /** @maxItems 10 */
3668
+ labelSelector?: string[];
3526
3669
  }
3670
+ /**
3671
+ * The three modes a person picks and reads (ADR-55).
3672
+ *
3673
+ * Stored as ``all_workspaces`` plus the selection rows, never as a fourth
3674
+ * column: ``all`` is the stored bit, ``selected`` is a limited selection with
3675
+ * at least one workspace or label, and ``none`` is a limited selection with
3676
+ * neither. A limited selection whose last workspace was deleted therefore
3677
+ * reads as ``none`` — what it reaches.
3678
+ */
3679
+ type WorkspaceScopeMode = typeof WorkspaceScopeMode[keyof typeof WorkspaceScopeMode];
3680
+ declare const WorkspaceScopeMode: {
3681
+ readonly all: "all";
3682
+ readonly selected: "selected";
3683
+ readonly none: "none";
3684
+ };
3527
3685
 
3528
3686
  type TwoFactorMethodType = 'TOTP' | 'WEBAUTHN';
3529
3687
  type TwoFactorMethod = Omit<TwoFactorMethodResponse$1, 'methodType'> & {
@@ -3544,6 +3702,10 @@ type AdminOrganization = Omit<AdminOrganizationResponse$1, 'viewType'> & {
3544
3702
  viewType?: 'admin';
3545
3703
  };
3546
3704
  type AdminOrganizationResponse = AdminOrganization;
3705
+ /** What `/api/v2/admin/organizations` returns: the admin view plus superuser-only fields. */
3706
+ type SuperuserOrganization = AdminOrganization & {
3707
+ slackNotificationChannel?: string | null;
3708
+ };
3547
3709
 
3548
3710
  interface DetailedAccount extends AdminAccountResponse {
3549
3711
  }
@@ -3646,8 +3808,20 @@ interface ApiKeyFormData {
3646
3808
  expiresInDays: number;
3647
3809
  scopes: string[];
3648
3810
  }
3649
- interface ApiKeyScope {
3650
- name: string;
3811
+ /**
3812
+ * The organization mint form: the shared key fields plus the key's required
3813
+ * `workspaceScope` — the one organization -> workspace gate shared with
3814
+ * organization webhook endpoints and org Agents. `{ mode: 'all' }` reaches
3815
+ * every current and future workspace of the organization; `{ mode: 'selected',
3816
+ * workspaceUuids, labelSelector }` reaches the listed workspaces plus every
3817
+ * workspace carrying ALL of the `labelSelector` labels; `{ mode: 'none' }`
3818
+ * reaches nothing. The scope is fixed at mint.
3819
+ */
3820
+ interface OrgApiKeyFormData extends ApiKeyFormData {
3821
+ workspaceScope: OrgWorkspaceScopeRequest;
3822
+ }
3823
+ interface ApiKeyScope {
3824
+ name: string;
3651
3825
  description: string;
3652
3826
  value: number;
3653
3827
  }
@@ -3733,6 +3907,7 @@ interface UpdateOrganizationRequest {
3733
3907
  maxA2pBrands?: number;
3734
3908
  securityContactEmail?: string | null;
3735
3909
  securityContactName?: string | null;
3910
+ slackNotificationChannel?: string | null;
3736
3911
  }
3737
3912
  interface LogoUploadRequest {
3738
3913
  contentType: string;
@@ -3799,6 +3974,7 @@ type OrgMemberRole = 'member' | 'developer' | 'admin' | 'owner' | 'platform_supp
3799
3974
  interface OrgMember {
3800
3975
  id: number;
3801
3976
  accountId: number | null;
3977
+ orgAccountId?: number | null;
3802
3978
  organizationId: number;
3803
3979
  role: OrgMemberRole;
3804
3980
  billingRole?: 'billing_owner' | 'billing_contact' | null;
@@ -3818,6 +3994,8 @@ interface OrgMember {
3818
3994
  */
3819
3995
  interface CurrentOrgMember extends OrgMember {
3820
3996
  scopes: string[];
3997
+ principalKind: 'personal_account' | 'org_account';
3998
+ orgAccountUuid?: string | null;
3821
3999
  }
3822
4000
  interface OrgMemberListResponse {
3823
4001
  items: OrgMember[];
@@ -3934,503 +4112,550 @@ interface DeletionCancelResponse {
3934
4112
  message: string;
3935
4113
  }
3936
4114
 
3937
- /**
3938
- * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
3939
- * (group map from emit_openapi.py). Do not edit manually.
3940
- * Group: realtime_config
3941
- */
3942
- /**
3943
- * Configuration for Gemini Realtime models.
4115
+ /** Client enums — preserve UPPER_SNAKE member names used across the app.
3944
4116
  *
3945
- * Native-audio model — same invariants as `OpenAIRealtimeModelConfig`.
3946
- */
3947
- interface GeminiRealtimeModelConfig$1 {
3948
- /** Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order. */
3949
- thinkingSound?: GeminiRealtimeModelConfigThinkingSound;
3950
- /** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
3951
- thinkingSoundVolume?: number | null;
3952
- /** Delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
3953
- thinkingSoundInitialDelay?: number | null;
3954
- /** When `thinkingSound` is 'speech', one of these phrases is spoken while the assistant is processing tool calls. Phrases rotate in round-robin order per session. */
3955
- thinkingSpeechPhrases?: string[] | null;
3956
- /** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
3957
- interruptionSound?: GeminiRealtimeModelConfigInterruptionSound;
3958
- /** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
3959
- interruptionSoundVolume?: number | null;
3960
- /** Native realtime models always use the model's built-in audio. */
3961
- ttsModel?: 'native';
3962
- /** Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice. */
3963
- voiceModel: GeminiRealtimeModelConfigVoiceModel;
3964
- /** Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration. */
3965
- inactiveConfig?: GeminiRealtimeModelConfigInactiveConfig;
4117
+ * OpenAPI codegen emits lowercase const-objects in `generated/event_rule.ts`.
4118
+ * The app imports these enums everywhere (config objects, switch statements, i18n
4119
+ * keys). We keep hand-written enums here and assert below that every generated
4120
+ * string-literal value has a matching client member. When the backend adds a new
4121
+ * event/action/object type, add it to the Pydantic model, run `yarn generate:types`,
4122
+ * then add the UPPER_SNAKE member here. */
4123
+ declare enum EventRuleObjectType {
4124
+ TASK = "task",
4125
+ WORKSPACE = "workspace",
4126
+ CHAT = "chat",
4127
+ DATA_RECORD = "data_record",
4128
+ MEMBER = "member",
4129
+ ROUTINE = "routine",
4130
+ WORKFLOW = "workflow",
4131
+ CALENDAR = "calendar",
4132
+ CALENDAR_EVENT_TYPE = "calendar_event_type",
4133
+ JOURNEY = "journey",
4134
+ CALL = "call",
4135
+ VOICEMAIL = "voicemail",
4136
+ FAX = "fax"
3966
4137
  }
3967
- /**
3968
- * Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration.
3969
- */
3970
- type GeminiRealtimeModelConfigInactiveConfig = {
3971
- [key: string]: unknown;
3972
- } | null;
3973
- /**
3974
- * Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none.
3975
- */
3976
- type GeminiRealtimeModelConfigInterruptionSound = typeof GeminiRealtimeModelConfigInterruptionSound[keyof typeof GeminiRealtimeModelConfigInterruptionSound] | null;
3977
- declare const GeminiRealtimeModelConfigInterruptionSound: {
3978
- readonly none: "none";
3979
- readonly clav: "clav";
3980
- readonly bells: "bells";
3981
- readonly organ: "organ";
3982
- readonly guzheng: "guzheng";
4138
+ declare enum EventRuleEventType {
4139
+ TASK_EXECUTE = "task:execute",
4140
+ MEMBER_JOINED = "workspace:member_joined",
4141
+ MEMBER_LEFT = "workspace:member_left",
4142
+ DATA_RECORD_CREATED = "data_record:created",
4143
+ DATA_RECORD_UPDATED = "data_record:updated",
4144
+ DATA_RECORD_CHANGED = "data_record:changed",
4145
+ CHAT_CREATED = "chat:created",
4146
+ /** Fires after a chat summary is generated on any channel. */
4147
+ CHAT_SUMMARY = "chat:summary",
4148
+ /**
4149
+ * Fires after a user/assistant Message is persisted (GRA-8699) — every
4150
+ * channel, including paused and human-handled chats. Filter by channel /
4151
+ * direction / workflow via triggerParams.
4152
+ */
4153
+ MESSAGE_CREATED = "message:created",
4154
+ /**
4155
+ * Fires when a tracked link (`{{links.<key>}}` → `/x/{slug}`) is clicked
4156
+ * (GRA-8733). Fires on the FIRST click per member per destination only,
4157
+ * attributed clicks only, and only when triggerParams name a scope
4158
+ * (`destinationKeys` or `workflowUuids`).
4159
+ */
4160
+ LINK_CLICKED = "link:clicked",
4161
+ /**
4162
+ * Fires once per outbound SMS that reaches a final carrier failure
4163
+ * (`undelivered` or `failed`), including a status that arrives after the
4164
+ * send workflow's one-hour close. Payload: message id, member id, sending
4165
+ * number, error code and the shared retry answer — never message content.
4166
+ */
4167
+ SMS_DELIVERY_FAILED = "sms:delivery_failed",
4168
+ CHAT_CALLBACK = "chat:callback",
4169
+ MEMBER_UPDATED = "member:updated",
4170
+ ROUTINE_TRIGGERED = "routine:triggered",
4171
+ ASSISTANT_MESSAGE = "workflow:assistant_message",
4172
+ USER_MESSAGE = "workflow:user_message",
4173
+ /** Fires when an assignment STARTS — `task:execute` one level up, for
4174
+ * workflows that have no tasks to hang a rule off. */
4175
+ WORKFLOW_EXECUTE = "workflow:execute",
4176
+ CALENDAR_EVENT_CREATED = "calendar_event:created",
4177
+ CALENDAR_EVENT_UPDATED = "calendar_event:updated",
4178
+ CALENDAR_EVENT_CANCELLED = "calendar_event:cancelled",
4179
+ CALENDAR_EVENT_STARTING = "calendar_event:starting",
4180
+ CALENDAR_EVENT_ENDED = "calendar_event:ended",
4181
+ CALENDAR_EVENT_NO_SHOW = "calendar_event:no_show",
4182
+ CONNECTOR_EVENT = "connector:event",
4183
+ ASSIGNMENT_CONCLUDED = "assignment:concluded",
4184
+ JOURNEY_STEP_EXECUTE = "journey_step:execute",
4185
+ JOURNEY_ENROLLED = "journey:enrolled",
4186
+ JOURNEY_COMPLETED = "journey:completed",
4187
+ CALL_STARTED = "call:started",
4188
+ CALL_COMPLETED = "call:completed",
4189
+ CALL_SUMMARY = "call:summary",
4190
+ VOICEMAIL_RECEIVED = "voicemail:received",
4191
+ FAX_RECEIVED = "fax:received"
4192
+ }
4193
+ declare enum EventRuleActionType {
4194
+ MEMBER_NOTIFY_ACTION = "member:notify",
4195
+ MEMBER_LABEL_ACTION = "member:label",
4196
+ MEMBER_UPSERT = "member:upsert",
4197
+ SWITCH_TASK_ACTION = "task:switch",
4198
+ ASSISTANT_MESSAGE = "assistant:message",
4199
+ FORM_FIELD_UPDATE = "form:update_field",
4200
+ MESSAGE_VALIDATION = "message:validation",
4201
+ CHAT_CREATE = "chat:create",
4202
+ CHAT_CONTINUE = "chat:continue",
4203
+ CHAT_PAUSE = "chat:pause",
4204
+ CHAT_SUMMARIZE = "chat:summarize",
4205
+ EMAIL_SEND = "email:send",
4206
+ INVOKE_CUSTOM_TOOL = "custom_tool:invoke",
4207
+ HUBSPOT_CREATE_DEAL_FROM_BOOKING = "hubspot:create_deal_from_booking",
4208
+ ASSIGNMENT_CONCLUDE = "assignment:conclude",
4209
+ JOURNEY_ENROLL = "journey:enroll",
4210
+ SMS_SEND = "sms:send",
4211
+ WHATSAPP_SEND = "whatsapp:send",
4212
+ PHONE_CALL = "phone:call",
4213
+ CONNECTION_SYNC = "connection:sync",
4214
+ CONNECTOR_OPERATION = "connector:operation",
4215
+ ECW_REFRESH_MEMBER_ENCOUNTERS = "ecw:refresh_member_encounters",
4216
+ PLAY_AUDIO = "audio:play",
4217
+ CHARLESTON_SEND_PMD_PAGE = "charleston:send_pmd_page"
4218
+ }
4219
+ /** Narrow actionParams — OpenAPI types this as Record<string, unknown>. */
4220
+ declare function eventRuleActionParams<T>(params: Record<string, unknown> | null | undefined): T;
4221
+ /** Re-bind enum fields to client enums (generated OpenAPI uses string-literal unions). */
4222
+ type EventRuleResponse = Omit<EventRuleResponse$1, 'objectType' | 'eventType' | 'actionType' | 'actionParams' | 'triggerParams'> & {
4223
+ objectType: EventRuleObjectType;
4224
+ eventType: EventRuleEventType;
4225
+ actionType: EventRuleActionType;
4226
+ actionParams: Record<string, unknown> | null;
4227
+ triggerParams: Record<string, unknown> | null;
4228
+ workflowRevisionId?: number | null;
3983
4229
  };
4230
+ type EventRule = EventRuleResponse;
4231
+
4232
+ /** OpenAPI omits nested last run; list/detail endpoints include it when available. */
4233
+ type RoutineVisibility = 'private' | 'workspace';
3984
4234
  /**
3985
- * Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order.
4235
+ * `NONE` (no time trigger — webhook / manual `/run` only) and `MANUAL` are
4236
+ * retired modes: no request mints them, but a legacy stored row can still hold
4237
+ * one, so a response may carry them.
3986
4238
  */
3987
- type GeminiRealtimeModelConfigThinkingSound = typeof GeminiRealtimeModelConfigThinkingSound[keyof typeof GeminiRealtimeModelConfigThinkingSound] | null;
3988
- declare const GeminiRealtimeModelConfigThinkingSound: {
3989
- readonly none: "none";
3990
- readonly typing: "typing";
3991
- readonly strumming: "strumming";
3992
- readonly speech: "speech";
3993
- };
4239
+ type RoutineScheduleMode = 'ONCE' | 'CRON' | 'INTERVAL' | 'NONE' | 'MANUAL';
4240
+ interface RoutineResponse extends Omit<RoutineResponse$1, 'eventRules' | 'visibility' | 'scheduleMode' | 'webhookEnabled'> {
4241
+ visibility: RoutineVisibility;
4242
+ scheduleMode: RoutineScheduleMode;
4243
+ webhookEnabled: boolean;
4244
+ lastRun?: RoutineRunResponse;
4245
+ eventRules?: EventRuleResponse[];
4246
+ }
4247
+ type Routine = RoutineResponse;
4248
+
3994
4249
  /**
3995
- * Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice.
4250
+ * Sentinel value returned by the API when a secret field (like apiToken) is set.
4251
+ * The client should detect this value and show a "secret is set" state instead
4252
+ * of the actual value. When sending updates, if the user hasn't changed the
4253
+ * secret, either omit the field or don't include it in the request.
3996
4254
  */
3997
- type GeminiRealtimeModelConfigVoiceModel = typeof GeminiRealtimeModelConfigVoiceModel[keyof typeof GeminiRealtimeModelConfigVoiceModel];
3998
- declare const GeminiRealtimeModelConfigVoiceModel: {
3999
- readonly 'openai:voice:alloy': "openai:voice:alloy";
4000
- readonly 'openai:voice:ash': "openai:voice:ash";
4001
- readonly 'openai:voice:ballad': "openai:voice:ballad";
4002
- readonly 'openai:voice:coral': "openai:voice:coral";
4003
- readonly 'openai:voice:echo': "openai:voice:echo";
4004
- readonly 'openai:voice:sage': "openai:voice:sage";
4005
- readonly 'openai:voice:shimmer': "openai:voice:shimmer";
4006
- readonly 'openai:voice:verse': "openai:voice:verse";
4007
- readonly 'openai:voice:marin': "openai:voice:marin";
4008
- readonly 'openai:voice:cedar': "openai:voice:cedar";
4009
- readonly 'google:voice:puck': "google:voice:puck";
4010
- readonly 'google:voice:charon': "google:voice:charon";
4011
- readonly 'google:voice:kore': "google:voice:kore";
4012
- readonly 'google:voice:fenrir': "google:voice:fenrir";
4013
- readonly 'google:voice:aoede': "google:voice:aoede";
4014
- readonly 'aws:voice:polly-ruth': "aws:voice:polly-ruth";
4015
- readonly 'aws:voice:polly-matthew': "aws:voice:polly-matthew";
4016
- readonly 'aws:voice:polly-joanna': "aws:voice:polly-joanna";
4017
- readonly 'aws:voice:polly-stephen': "aws:voice:polly-stephen";
4018
- readonly 'aws:voice:polly-danielle': "aws:voice:polly-danielle";
4019
- readonly 'aws:voice:polly-salli': "aws:voice:polly-salli";
4020
- readonly 'elevenlabs:voice:dan': "elevenlabs:voice:dan";
4021
- readonly 'elevenlabs:voice:catt': "elevenlabs:voice:catt";
4022
- readonly 'elevenlabs:voice:river': "elevenlabs:voice:river";
4023
- readonly 'elevenlabs:voice:will': "elevenlabs:voice:will";
4024
- readonly 'elevenlabs:voice:eric': "elevenlabs:voice:eric";
4025
- readonly 'elevenlabs:voice:lily': "elevenlabs:voice:lily";
4026
- readonly 'elevenlabs:voice:patrick': "elevenlabs:voice:patrick";
4027
- readonly 'elevenlabs:voice:roger': "elevenlabs:voice:roger";
4028
- readonly 'elevenlabs:voice:suzanne': "elevenlabs:voice:suzanne";
4029
- readonly 'elevenlabs:voice:seamus': "elevenlabs:voice:seamus";
4030
- readonly 'deepgram:voice:aura-asteria-en': "deepgram:voice:aura-asteria-en";
4031
- readonly 'deepgram:voice:aura-luna-en': "deepgram:voice:aura-luna-en";
4032
- readonly 'deepgram:voice:aura-stella-en': "deepgram:voice:aura-stella-en";
4033
- readonly 'deepgram:voice:aura-athena-en': "deepgram:voice:aura-athena-en";
4034
- readonly 'deepgram:voice:aura-hera-en': "deepgram:voice:aura-hera-en";
4035
- readonly 'deepgram:voice:aura-orion-en': "deepgram:voice:aura-orion-en";
4036
- readonly 'deepgram:voice:aura-arcas-en': "deepgram:voice:aura-arcas-en";
4037
- readonly 'deepgram:voice:aura-perseus-en': "deepgram:voice:aura-perseus-en";
4038
- readonly 'deepgram:voice:aura-angus-en': "deepgram:voice:aura-angus-en";
4039
- readonly 'deepgram:voice:aura-orpheus-en': "deepgram:voice:aura-orpheus-en";
4040
- readonly 'deepgram:voice:aura-helios-en': "deepgram:voice:aura-helios-en";
4041
- readonly 'deepgram:voice:aura-zeus-en': "deepgram:voice:aura-zeus-en";
4042
- readonly 'deepgram:voice:aura-2-amalthea-en': "deepgram:voice:aura-2-amalthea-en";
4043
- readonly 'deepgram:voice:aura-2-andromeda-en': "deepgram:voice:aura-2-andromeda-en";
4044
- readonly 'deepgram:voice:aura-2-apollo-en': "deepgram:voice:aura-2-apollo-en";
4045
- readonly 'deepgram:voice:aura-2-arcas-en': "deepgram:voice:aura-2-arcas-en";
4046
- readonly 'deepgram:voice:aura-2-aries-en': "deepgram:voice:aura-2-aries-en";
4047
- readonly 'deepgram:voice:aura-2-asteria-en': "deepgram:voice:aura-2-asteria-en";
4048
- readonly 'deepgram:voice:aura-2-athena-en': "deepgram:voice:aura-2-athena-en";
4049
- readonly 'deepgram:voice:aura-2-atlas-en': "deepgram:voice:aura-2-atlas-en";
4050
- readonly 'deepgram:voice:aura-2-aurora-en': "deepgram:voice:aura-2-aurora-en";
4051
- readonly 'deepgram:voice:aura-2-callista-en': "deepgram:voice:aura-2-callista-en";
4052
- readonly 'deepgram:voice:aura-2-cora-en': "deepgram:voice:aura-2-cora-en";
4053
- readonly 'deepgram:voice:aura-2-cordelia-en': "deepgram:voice:aura-2-cordelia-en";
4054
- readonly 'deepgram:voice:aura-2-delia-en': "deepgram:voice:aura-2-delia-en";
4055
- readonly 'deepgram:voice:aura-2-draco-en': "deepgram:voice:aura-2-draco-en";
4056
- readonly 'deepgram:voice:aura-2-electra-en': "deepgram:voice:aura-2-electra-en";
4057
- readonly 'deepgram:voice:aura-2-harmonia-en': "deepgram:voice:aura-2-harmonia-en";
4058
- readonly 'deepgram:voice:aura-2-helena-en': "deepgram:voice:aura-2-helena-en";
4059
- readonly 'deepgram:voice:aura-2-hera-en': "deepgram:voice:aura-2-hera-en";
4060
- readonly 'deepgram:voice:aura-2-hermes-en': "deepgram:voice:aura-2-hermes-en";
4061
- readonly 'deepgram:voice:aura-2-hyperion-en': "deepgram:voice:aura-2-hyperion-en";
4062
- readonly 'deepgram:voice:aura-2-iris-en': "deepgram:voice:aura-2-iris-en";
4063
- readonly 'deepgram:voice:aura-2-janus-en': "deepgram:voice:aura-2-janus-en";
4064
- readonly 'deepgram:voice:aura-2-juno-en': "deepgram:voice:aura-2-juno-en";
4065
- readonly 'deepgram:voice:aura-2-jupiter-en': "deepgram:voice:aura-2-jupiter-en";
4066
- readonly 'deepgram:voice:aura-2-luna-en': "deepgram:voice:aura-2-luna-en";
4067
- readonly 'deepgram:voice:aura-2-mars-en': "deepgram:voice:aura-2-mars-en";
4068
- readonly 'deepgram:voice:aura-2-minerva-en': "deepgram:voice:aura-2-minerva-en";
4069
- readonly 'deepgram:voice:aura-2-neptune-en': "deepgram:voice:aura-2-neptune-en";
4070
- readonly 'deepgram:voice:aura-2-odysseus-en': "deepgram:voice:aura-2-odysseus-en";
4071
- readonly 'deepgram:voice:aura-2-ophelia-en': "deepgram:voice:aura-2-ophelia-en";
4072
- readonly 'deepgram:voice:aura-2-orion-en': "deepgram:voice:aura-2-orion-en";
4073
- readonly 'deepgram:voice:aura-2-orpheus-en': "deepgram:voice:aura-2-orpheus-en";
4074
- readonly 'deepgram:voice:aura-2-pandora-en': "deepgram:voice:aura-2-pandora-en";
4075
- readonly 'deepgram:voice:aura-2-phoebe-en': "deepgram:voice:aura-2-phoebe-en";
4076
- readonly 'deepgram:voice:aura-2-pluto-en': "deepgram:voice:aura-2-pluto-en";
4077
- readonly 'deepgram:voice:aura-2-saturn-en': "deepgram:voice:aura-2-saturn-en";
4078
- readonly 'deepgram:voice:aura-2-selene-en': "deepgram:voice:aura-2-selene-en";
4079
- readonly 'deepgram:voice:aura-2-thalia-en': "deepgram:voice:aura-2-thalia-en";
4080
- readonly 'deepgram:voice:aura-2-theia-en': "deepgram:voice:aura-2-theia-en";
4081
- readonly 'deepgram:voice:aura-2-vesta-en': "deepgram:voice:aura-2-vesta-en";
4082
- readonly 'deepgram:voice:aura-2-zeus-en': "deepgram:voice:aura-2-zeus-en";
4083
- readonly 'deepgram:voice:aura-2-agustina-es': "deepgram:voice:aura-2-agustina-es";
4084
- readonly 'deepgram:voice:aura-2-alvaro-es': "deepgram:voice:aura-2-alvaro-es";
4085
- readonly 'deepgram:voice:aura-2-antonia-es': "deepgram:voice:aura-2-antonia-es";
4086
- readonly 'deepgram:voice:aura-2-aquila-es': "deepgram:voice:aura-2-aquila-es";
4087
- readonly 'deepgram:voice:aura-2-carina-es': "deepgram:voice:aura-2-carina-es";
4088
- readonly 'deepgram:voice:aura-2-celeste-es': "deepgram:voice:aura-2-celeste-es";
4089
- readonly 'deepgram:voice:aura-2-diana-es': "deepgram:voice:aura-2-diana-es";
4090
- readonly 'deepgram:voice:aura-2-estrella-es': "deepgram:voice:aura-2-estrella-es";
4091
- readonly 'deepgram:voice:aura-2-gloria-es': "deepgram:voice:aura-2-gloria-es";
4092
- readonly 'deepgram:voice:aura-2-javier-es': "deepgram:voice:aura-2-javier-es";
4093
- readonly 'deepgram:voice:aura-2-luciano-es': "deepgram:voice:aura-2-luciano-es";
4094
- readonly 'deepgram:voice:aura-2-nestor-es': "deepgram:voice:aura-2-nestor-es";
4095
- readonly 'deepgram:voice:aura-2-olivia-es': "deepgram:voice:aura-2-olivia-es";
4096
- readonly 'deepgram:voice:aura-2-selena-es': "deepgram:voice:aura-2-selena-es";
4097
- readonly 'deepgram:voice:aura-2-silvia-es': "deepgram:voice:aura-2-silvia-es";
4098
- readonly 'deepgram:voice:aura-2-sirio-es': "deepgram:voice:aura-2-sirio-es";
4099
- readonly 'deepgram:voice:aura-2-valerio-es': "deepgram:voice:aura-2-valerio-es";
4100
- readonly 'deepgram:voice:aura-2-beatrix-nl': "deepgram:voice:aura-2-beatrix-nl";
4101
- readonly 'deepgram:voice:aura-2-cornelia-nl': "deepgram:voice:aura-2-cornelia-nl";
4102
- readonly 'deepgram:voice:aura-2-daphne-nl': "deepgram:voice:aura-2-daphne-nl";
4103
- readonly 'deepgram:voice:aura-2-hestia-nl': "deepgram:voice:aura-2-hestia-nl";
4104
- readonly 'deepgram:voice:aura-2-lars-nl': "deepgram:voice:aura-2-lars-nl";
4105
- readonly 'deepgram:voice:aura-2-leda-nl': "deepgram:voice:aura-2-leda-nl";
4106
- readonly 'deepgram:voice:aura-2-rhea-nl': "deepgram:voice:aura-2-rhea-nl";
4107
- readonly 'deepgram:voice:aura-2-roman-nl': "deepgram:voice:aura-2-roman-nl";
4108
- readonly 'deepgram:voice:aura-2-sander-nl': "deepgram:voice:aura-2-sander-nl";
4109
- readonly 'deepgram:voice:aura-2-agathe-fr': "deepgram:voice:aura-2-agathe-fr";
4110
- readonly 'deepgram:voice:aura-2-hector-fr': "deepgram:voice:aura-2-hector-fr";
4111
- readonly 'deepgram:voice:aura-2-aurelia-de': "deepgram:voice:aura-2-aurelia-de";
4112
- readonly 'deepgram:voice:aura-2-elara-de': "deepgram:voice:aura-2-elara-de";
4113
- readonly 'deepgram:voice:aura-2-fabian-de': "deepgram:voice:aura-2-fabian-de";
4114
- readonly 'deepgram:voice:aura-2-julius-de': "deepgram:voice:aura-2-julius-de";
4115
- readonly 'deepgram:voice:aura-2-kara-de': "deepgram:voice:aura-2-kara-de";
4116
- readonly 'deepgram:voice:aura-2-lara-de': "deepgram:voice:aura-2-lara-de";
4117
- readonly 'deepgram:voice:aura-2-viktoria-de': "deepgram:voice:aura-2-viktoria-de";
4118
- readonly 'deepgram:voice:aura-2-cesare-it': "deepgram:voice:aura-2-cesare-it";
4119
- readonly 'deepgram:voice:aura-2-cinzia-it': "deepgram:voice:aura-2-cinzia-it";
4120
- readonly 'deepgram:voice:aura-2-demetra-it': "deepgram:voice:aura-2-demetra-it";
4121
- readonly 'deepgram:voice:aura-2-dionisio-it': "deepgram:voice:aura-2-dionisio-it";
4122
- readonly 'deepgram:voice:aura-2-elio-it': "deepgram:voice:aura-2-elio-it";
4123
- readonly 'deepgram:voice:aura-2-flavio-it': "deepgram:voice:aura-2-flavio-it";
4124
- readonly 'deepgram:voice:aura-2-livia-it': "deepgram:voice:aura-2-livia-it";
4125
- readonly 'deepgram:voice:aura-2-maia-it': "deepgram:voice:aura-2-maia-it";
4126
- readonly 'deepgram:voice:aura-2-melia-it': "deepgram:voice:aura-2-melia-it";
4127
- readonly 'deepgram:voice:aura-2-perseo-it': "deepgram:voice:aura-2-perseo-it";
4128
- readonly 'deepgram:voice:aura-2-ama-ja': "deepgram:voice:aura-2-ama-ja";
4129
- readonly 'deepgram:voice:aura-2-ebisu-ja': "deepgram:voice:aura-2-ebisu-ja";
4130
- readonly 'deepgram:voice:aura-2-fujin-ja': "deepgram:voice:aura-2-fujin-ja";
4131
- readonly 'deepgram:voice:aura-2-izanami-ja': "deepgram:voice:aura-2-izanami-ja";
4132
- readonly 'deepgram:voice:aura-2-uzume-ja': "deepgram:voice:aura-2-uzume-ja";
4133
- readonly 'xai:voice:eve': "xai:voice:eve";
4134
- readonly 'xai:voice:ara': "xai:voice:ara";
4135
- readonly 'xai:voice:rex': "xai:voice:rex";
4136
- readonly 'xai:voice:sal': "xai:voice:sal";
4137
- readonly 'xai:voice:leo': "xai:voice:leo";
4138
- readonly 'xai:voice:altair': "xai:voice:altair";
4139
- readonly 'xai:voice:atlas': "xai:voice:atlas";
4140
- readonly 'xai:voice:carina': "xai:voice:carina";
4141
- readonly 'xai:voice:castor': "xai:voice:castor";
4142
- readonly 'xai:voice:celeste': "xai:voice:celeste";
4143
- readonly 'xai:voice:cosmo': "xai:voice:cosmo";
4144
- readonly 'xai:voice:helios': "xai:voice:helios";
4145
- readonly 'xai:voice:helix': "xai:voice:helix";
4146
- readonly 'xai:voice:iris': "xai:voice:iris";
4147
- readonly 'xai:voice:kepler': "xai:voice:kepler";
4148
- readonly 'xai:voice:lumen': "xai:voice:lumen";
4149
- readonly 'xai:voice:luna': "xai:voice:luna";
4150
- readonly 'xai:voice:lux': "xai:voice:lux";
4151
- readonly 'xai:voice:naksh': "xai:voice:naksh";
4152
- readonly 'xai:voice:orion': "xai:voice:orion";
4153
- readonly 'xai:voice:perseus': "xai:voice:perseus";
4154
- readonly 'xai:voice:rigel': "xai:voice:rigel";
4155
- readonly 'xai:voice:sirius': "xai:voice:sirius";
4156
- readonly 'xai:voice:ursa': "xai:voice:ursa";
4157
- readonly 'xai:voice:zagan': "xai:voice:zagan";
4158
- readonly 'xai:voice:zenith': "xai:voice:zenith";
4159
- };
4255
+ declare const MASKED_SECRET_SENTINEL = "__SECRET_SET__";
4256
+
4257
+ interface MemberLabelActionParams {
4258
+ addLabelIds?: string[];
4259
+ removeLabelIds?: string[];
4260
+ }
4261
+ type MemberUpsertBehavior = 'upsert' | 'create_only' | 'update_only';
4262
+ interface MemberUpsertActionParams {
4263
+ /** Controls create/update behavior: 'upsert' (default), 'create_only', or 'update_only' */
4264
+ behavior?: MemberUpsertBehavior;
4265
+ /** If true and member exists, skip instead of failing (only for create_only) */
4266
+ skipIfExists?: boolean;
4267
+ /** If true and member not found, skip instead of failing (only for update_only) */
4268
+ skipIfNotFound?: boolean;
4269
+ }
4270
+ interface SwitchTaskActionParams {
4271
+ taskUUID: string;
4272
+ }
4273
+ interface AssistantMessageActionParams {
4274
+ message: string;
4275
+ suggestions?: string[];
4276
+ messageTranslations?: Record<string, string>;
4277
+ suggestionTranslations?: Record<string, string[]>;
4278
+ inboundMessage?: string;
4279
+ outboundMessage?: string;
4280
+ /**
4281
+ * When false, the injected assistant message does NOT end the agent
4282
+ * turn — the loop keeps running so a follow-up model response can be
4283
+ * generated after the canned filler. Default true preserves the
4284
+ * existing "ends-the-turn" semantics for every existing rule whose
4285
+ * JSON lacks the new key.
4286
+ */
4287
+ waitForResponse?: boolean;
4288
+ /**
4289
+ * Barge-in control for a line that must be heard in full. When false, a
4290
+ * native realtime provider with a canned-speech primitive (xAI
4291
+ * `force_message`) drops caller audio until the line finishes, so the
4292
+ * caller cannot talk over it. Defaults to true — a caller can barge in on
4293
+ * canned speech. Independent of `waitForResponse` (turn ownership vs
4294
+ * barge-in): do not derive one from the other. Only a native canned-speech
4295
+ * provider can honour it; other render paths warn rather than silently
4296
+ * deliver an interruptible line.
4297
+ */
4298
+ allowInterrupt?: boolean;
4299
+ }
4300
+ /** One field of the action's Form and the value a `form:update_field` write sets on it. */
4301
+ interface FormFieldUpdateAssignment {
4302
+ fieldSlug: string;
4303
+ /** A literal for the field's type, or a Jinja template evaluated when the action runs. */
4304
+ value: unknown;
4305
+ }
4306
+ interface FormFieldUpdateActionParams {
4307
+ /** Slug of the Form whose record the action writes. */
4308
+ dataTypeSlug: string;
4309
+ /** At least one; each field of `dataTypeSlug` at most once, written in this order by one update. */
4310
+ fields: FormFieldUpdateAssignment[];
4311
+ updateType?: 'newest' | 'oldest' | 'create' | 'trigger' | 'matchField' | 'selector';
4312
+ matchField?: string;
4313
+ matchValue?: any;
4314
+ tiebreaker?: 'newest' | 'oldest';
4315
+ selector?: string;
4316
+ createIfMissing?: boolean;
4317
+ }
4318
+ interface MessageValidationActionParams {
4319
+ condition?: string;
4320
+ reason?: string;
4321
+ }
4322
+ interface ChatCreateActionParams {
4323
+ workflowUUID?: string;
4324
+ taskUUID?: string;
4325
+ channel?: string;
4326
+ channels?: string[];
4327
+ phoneNumberUUID?: string;
4328
+ inboxUUID?: string;
4329
+ initialUserMessage?: string;
4330
+ messageTemplate?: string;
4331
+ }
4332
+ interface ChatContinueActionParams {
4333
+ assistantPrompt?: string;
4334
+ updateType?: string;
4335
+ }
4336
+ interface ChatPauseActionParams {
4337
+ message?: string;
4338
+ }
4339
+ interface ChatSummarizeActionParams {
4340
+ summarizationPrompt?: string;
4341
+ chatModel?: string;
4342
+ }
4343
+ interface InvokeCustomToolActionParams {
4344
+ /** UUID of the custom tool to invoke (canonical identifier, issue #10893). */
4345
+ customToolUUID?: string;
4346
+ /** Legacy integer id of the custom tool. Kept for backward compat with pre-rename rules. */
4347
+ customToolId?: number;
4348
+ outputMode?: 'none' | 'tool_output' | 'assistant_message';
4349
+ }
4350
+ interface ConcludeAssignmentActionParams {
4351
+ outcome: string;
4352
+ reason?: string;
4353
+ }
4354
+ interface JourneyEnrollActionParams {
4355
+ /** UUID of the journey to enroll the member in. */
4356
+ journeyUUID: string;
4357
+ /**
4358
+ * When true, a member whose enrollment in this journey is COMPLETED is
4359
+ * restarted from the beginning. Active, paused and canceled enrollments
4360
+ * are left unchanged. Omitted (the default) means an existing enrollment
4361
+ * in any status is skipped.
4362
+ */
4363
+ reenrollCompleted?: boolean;
4364
+ }
4160
4365
  /**
4161
- * Configuration for OpenAI Realtime models.
4366
+ * Parameters for the ``audio:play`` event-rule action.
4162
4367
  *
4163
- * OpenAI realtime is a native-audio model: it produces speech itself,
4164
- * has no external STT layer, and only accepts its own voice catalog.
4165
- * The schema enforces this so PR `#10719`'s EventRule rendering can
4166
- * treat ``has_local_tts`` as authoritative without checking provider
4167
- * again at the call site.
4368
+ * Plays a pre-recorded workspace audio file on the current voice call,
4369
+ * without the LLM in the loop. Branch on ``call.answered_by`` from a
4370
+ * ``call:started`` rule; ``task:execute`` on the start task runs before the
4371
+ * call is placed. See the backend handler at
4372
+ * ``lib/rules/actions/builtin/play_audio.py``.
4168
4373
  */
4169
- interface OpenAIRealtimeModelConfig$1 {
4170
- /** Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order. */
4171
- thinkingSound?: OpenAIRealtimeModelConfigThinkingSound;
4172
- /** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
4173
- thinkingSoundVolume?: number | null;
4174
- /** Delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
4175
- thinkingSoundInitialDelay?: number | null;
4176
- /** When `thinkingSound` is 'speech', one of these phrases is spoken while the assistant is processing tool calls. Phrases rotate in round-robin order per session. */
4177
- thinkingSpeechPhrases?: string[] | null;
4178
- /** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
4179
- interruptionSound?: OpenAIRealtimeModelConfigInterruptionSound;
4180
- /** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
4181
- interruptionSoundVolume?: number | null;
4182
- /** Native realtime models always use the model's built-in audio. */
4183
- ttsModel?: 'native';
4184
- /** Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice. */
4185
- voiceModel: OpenAIRealtimeModelConfigVoiceModel;
4186
- /** Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration. */
4187
- inactiveConfig?: OpenAIRealtimeModelConfigInactiveConfig;
4188
- /** Configure how the model detects when the user has finished speaking. Set to null to disable server-side VAD. */
4189
- turnDetection?: OpenAISemanticVADTurnDetection$1 | OpenAIServerVADTurnDetection$1 | null;
4374
+ interface PlayAudioActionParams {
4375
+ /** UUID of the workspace File row to play. Required. */
4376
+ clipFileUuid: string;
4377
+ /**
4378
+ * When false, the clip plays end-to-end ignoring barge-in. Pair with
4379
+ * ``hangUpOnAudioEnd: true`` for compliance recordings that must not
4380
+ * be interrupted by speech. Defaults to true.
4381
+ */
4382
+ allowInterrupt?: boolean;
4383
+ /**
4384
+ * When true, the call hangs up immediately after the clip finishes
4385
+ * streaming — no further LLM turns. Defaults to false.
4386
+ */
4387
+ hangUpOnAudioEnd?: boolean;
4388
+ /**
4389
+ * Playback volume as a percent in [0, 100]. ``80`` is the unity
4390
+ * baseline — no gain adjustment is applied. Higher values boost,
4391
+ * lower values attenuate. Clipped at the int16 ceiling so a 100%
4392
+ * setting on already-hot source material won't introduce
4393
+ * distortion beyond the source's own. Defaults to 80.
4394
+ */
4395
+ volume?: number;
4396
+ }
4397
+
4398
+ interface EmailSendActionParams {
4399
+ subjectTemplate?: string;
4400
+ bodyTemplate?: string;
4401
+ inboxUUID: string;
4402
+ /** Deprecated stored override; author recipients through `memberIds`. */
4403
+ toEmail?: string;
4404
+ recipientMode?: 'target_member' | 'specific_member';
4405
+ memberIds?: number[];
4406
+ contentType?: 'text' | 'html';
4407
+ workflowUUID?: string;
4408
+ initialUserMessage?: string;
4409
+ }
4410
+ interface SmsSendActionParams {
4411
+ phoneNumberUUID: string;
4412
+ messageTemplate?: string;
4413
+ workflowUUID?: string;
4414
+ initialUserMessage?: string;
4415
+ }
4416
+ interface PhoneCallActionParams {
4417
+ phoneNumberUUID: string;
4418
+ workflowUUID: string;
4190
4419
  }
4191
4420
  /**
4192
- * Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration.
4193
- */
4194
- type OpenAIRealtimeModelConfigInactiveConfig = {
4195
- [key: string]: unknown;
4196
- } | null;
4197
- /**
4198
- * Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none.
4199
- */
4200
- type OpenAIRealtimeModelConfigInterruptionSound = typeof OpenAIRealtimeModelConfigInterruptionSound[keyof typeof OpenAIRealtimeModelConfigInterruptionSound] | null;
4201
- declare const OpenAIRealtimeModelConfigInterruptionSound: {
4202
- readonly none: "none";
4203
- readonly clav: "clav";
4204
- readonly bells: "bells";
4205
- readonly organ: "organ";
4206
- readonly guzheng: "guzheng";
4207
- };
4208
- /**
4209
- * Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order.
4210
- */
4211
- type OpenAIRealtimeModelConfigThinkingSound = typeof OpenAIRealtimeModelConfigThinkingSound[keyof typeof OpenAIRealtimeModelConfigThinkingSound] | null;
4212
- declare const OpenAIRealtimeModelConfigThinkingSound: {
4213
- readonly none: "none";
4214
- readonly typing: "typing";
4215
- readonly strumming: "strumming";
4216
- readonly speech: "speech";
4217
- };
4218
- /**
4219
- * Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice.
4421
+ * Parameters for the ecw:refresh_member_encounters action.
4422
+ * Refreshes the local eCW encounter cache for the target member before
4423
+ * later actions (such as phone:call) run in the same rule chain.
4220
4424
  */
4221
- type OpenAIRealtimeModelConfigVoiceModel = typeof OpenAIRealtimeModelConfigVoiceModel[keyof typeof OpenAIRealtimeModelConfigVoiceModel];
4222
- declare const OpenAIRealtimeModelConfigVoiceModel: {
4223
- readonly 'openai:voice:alloy': "openai:voice:alloy";
4224
- readonly 'openai:voice:ash': "openai:voice:ash";
4225
- readonly 'openai:voice:ballad': "openai:voice:ballad";
4226
- readonly 'openai:voice:coral': "openai:voice:coral";
4227
- readonly 'openai:voice:echo': "openai:voice:echo";
4228
- readonly 'openai:voice:sage': "openai:voice:sage";
4229
- readonly 'openai:voice:shimmer': "openai:voice:shimmer";
4230
- readonly 'openai:voice:verse': "openai:voice:verse";
4231
- readonly 'openai:voice:marin': "openai:voice:marin";
4232
- readonly 'openai:voice:cedar': "openai:voice:cedar";
4233
- readonly 'google:voice:puck': "google:voice:puck";
4234
- readonly 'google:voice:charon': "google:voice:charon";
4235
- readonly 'google:voice:kore': "google:voice:kore";
4236
- readonly 'google:voice:fenrir': "google:voice:fenrir";
4237
- readonly 'google:voice:aoede': "google:voice:aoede";
4238
- readonly 'aws:voice:polly-ruth': "aws:voice:polly-ruth";
4239
- readonly 'aws:voice:polly-matthew': "aws:voice:polly-matthew";
4240
- readonly 'aws:voice:polly-joanna': "aws:voice:polly-joanna";
4241
- readonly 'aws:voice:polly-stephen': "aws:voice:polly-stephen";
4242
- readonly 'aws:voice:polly-danielle': "aws:voice:polly-danielle";
4243
- readonly 'aws:voice:polly-salli': "aws:voice:polly-salli";
4244
- readonly 'elevenlabs:voice:dan': "elevenlabs:voice:dan";
4245
- readonly 'elevenlabs:voice:catt': "elevenlabs:voice:catt";
4246
- readonly 'elevenlabs:voice:river': "elevenlabs:voice:river";
4247
- readonly 'elevenlabs:voice:will': "elevenlabs:voice:will";
4248
- readonly 'elevenlabs:voice:eric': "elevenlabs:voice:eric";
4249
- readonly 'elevenlabs:voice:lily': "elevenlabs:voice:lily";
4250
- readonly 'elevenlabs:voice:patrick': "elevenlabs:voice:patrick";
4251
- readonly 'elevenlabs:voice:roger': "elevenlabs:voice:roger";
4252
- readonly 'elevenlabs:voice:suzanne': "elevenlabs:voice:suzanne";
4253
- readonly 'elevenlabs:voice:seamus': "elevenlabs:voice:seamus";
4254
- readonly 'deepgram:voice:aura-asteria-en': "deepgram:voice:aura-asteria-en";
4255
- readonly 'deepgram:voice:aura-luna-en': "deepgram:voice:aura-luna-en";
4256
- readonly 'deepgram:voice:aura-stella-en': "deepgram:voice:aura-stella-en";
4257
- readonly 'deepgram:voice:aura-athena-en': "deepgram:voice:aura-athena-en";
4258
- readonly 'deepgram:voice:aura-hera-en': "deepgram:voice:aura-hera-en";
4259
- readonly 'deepgram:voice:aura-orion-en': "deepgram:voice:aura-orion-en";
4260
- readonly 'deepgram:voice:aura-arcas-en': "deepgram:voice:aura-arcas-en";
4261
- readonly 'deepgram:voice:aura-perseus-en': "deepgram:voice:aura-perseus-en";
4262
- readonly 'deepgram:voice:aura-angus-en': "deepgram:voice:aura-angus-en";
4263
- readonly 'deepgram:voice:aura-orpheus-en': "deepgram:voice:aura-orpheus-en";
4264
- readonly 'deepgram:voice:aura-helios-en': "deepgram:voice:aura-helios-en";
4265
- readonly 'deepgram:voice:aura-zeus-en': "deepgram:voice:aura-zeus-en";
4266
- readonly 'deepgram:voice:aura-2-amalthea-en': "deepgram:voice:aura-2-amalthea-en";
4267
- readonly 'deepgram:voice:aura-2-andromeda-en': "deepgram:voice:aura-2-andromeda-en";
4268
- readonly 'deepgram:voice:aura-2-apollo-en': "deepgram:voice:aura-2-apollo-en";
4269
- readonly 'deepgram:voice:aura-2-arcas-en': "deepgram:voice:aura-2-arcas-en";
4270
- readonly 'deepgram:voice:aura-2-aries-en': "deepgram:voice:aura-2-aries-en";
4271
- readonly 'deepgram:voice:aura-2-asteria-en': "deepgram:voice:aura-2-asteria-en";
4272
- readonly 'deepgram:voice:aura-2-athena-en': "deepgram:voice:aura-2-athena-en";
4273
- readonly 'deepgram:voice:aura-2-atlas-en': "deepgram:voice:aura-2-atlas-en";
4274
- readonly 'deepgram:voice:aura-2-aurora-en': "deepgram:voice:aura-2-aurora-en";
4275
- readonly 'deepgram:voice:aura-2-callista-en': "deepgram:voice:aura-2-callista-en";
4276
- readonly 'deepgram:voice:aura-2-cora-en': "deepgram:voice:aura-2-cora-en";
4277
- readonly 'deepgram:voice:aura-2-cordelia-en': "deepgram:voice:aura-2-cordelia-en";
4278
- readonly 'deepgram:voice:aura-2-delia-en': "deepgram:voice:aura-2-delia-en";
4279
- readonly 'deepgram:voice:aura-2-draco-en': "deepgram:voice:aura-2-draco-en";
4280
- readonly 'deepgram:voice:aura-2-electra-en': "deepgram:voice:aura-2-electra-en";
4281
- readonly 'deepgram:voice:aura-2-harmonia-en': "deepgram:voice:aura-2-harmonia-en";
4282
- readonly 'deepgram:voice:aura-2-helena-en': "deepgram:voice:aura-2-helena-en";
4283
- readonly 'deepgram:voice:aura-2-hera-en': "deepgram:voice:aura-2-hera-en";
4284
- readonly 'deepgram:voice:aura-2-hermes-en': "deepgram:voice:aura-2-hermes-en";
4285
- readonly 'deepgram:voice:aura-2-hyperion-en': "deepgram:voice:aura-2-hyperion-en";
4286
- readonly 'deepgram:voice:aura-2-iris-en': "deepgram:voice:aura-2-iris-en";
4287
- readonly 'deepgram:voice:aura-2-janus-en': "deepgram:voice:aura-2-janus-en";
4288
- readonly 'deepgram:voice:aura-2-juno-en': "deepgram:voice:aura-2-juno-en";
4289
- readonly 'deepgram:voice:aura-2-jupiter-en': "deepgram:voice:aura-2-jupiter-en";
4290
- readonly 'deepgram:voice:aura-2-luna-en': "deepgram:voice:aura-2-luna-en";
4291
- readonly 'deepgram:voice:aura-2-mars-en': "deepgram:voice:aura-2-mars-en";
4292
- readonly 'deepgram:voice:aura-2-minerva-en': "deepgram:voice:aura-2-minerva-en";
4293
- readonly 'deepgram:voice:aura-2-neptune-en': "deepgram:voice:aura-2-neptune-en";
4294
- readonly 'deepgram:voice:aura-2-odysseus-en': "deepgram:voice:aura-2-odysseus-en";
4295
- readonly 'deepgram:voice:aura-2-ophelia-en': "deepgram:voice:aura-2-ophelia-en";
4296
- readonly 'deepgram:voice:aura-2-orion-en': "deepgram:voice:aura-2-orion-en";
4297
- readonly 'deepgram:voice:aura-2-orpheus-en': "deepgram:voice:aura-2-orpheus-en";
4298
- readonly 'deepgram:voice:aura-2-pandora-en': "deepgram:voice:aura-2-pandora-en";
4299
- readonly 'deepgram:voice:aura-2-phoebe-en': "deepgram:voice:aura-2-phoebe-en";
4300
- readonly 'deepgram:voice:aura-2-pluto-en': "deepgram:voice:aura-2-pluto-en";
4301
- readonly 'deepgram:voice:aura-2-saturn-en': "deepgram:voice:aura-2-saturn-en";
4302
- readonly 'deepgram:voice:aura-2-selene-en': "deepgram:voice:aura-2-selene-en";
4303
- readonly 'deepgram:voice:aura-2-thalia-en': "deepgram:voice:aura-2-thalia-en";
4304
- readonly 'deepgram:voice:aura-2-theia-en': "deepgram:voice:aura-2-theia-en";
4305
- readonly 'deepgram:voice:aura-2-vesta-en': "deepgram:voice:aura-2-vesta-en";
4306
- readonly 'deepgram:voice:aura-2-zeus-en': "deepgram:voice:aura-2-zeus-en";
4307
- readonly 'deepgram:voice:aura-2-agustina-es': "deepgram:voice:aura-2-agustina-es";
4308
- readonly 'deepgram:voice:aura-2-alvaro-es': "deepgram:voice:aura-2-alvaro-es";
4309
- readonly 'deepgram:voice:aura-2-antonia-es': "deepgram:voice:aura-2-antonia-es";
4310
- readonly 'deepgram:voice:aura-2-aquila-es': "deepgram:voice:aura-2-aquila-es";
4311
- readonly 'deepgram:voice:aura-2-carina-es': "deepgram:voice:aura-2-carina-es";
4312
- readonly 'deepgram:voice:aura-2-celeste-es': "deepgram:voice:aura-2-celeste-es";
4313
- readonly 'deepgram:voice:aura-2-diana-es': "deepgram:voice:aura-2-diana-es";
4314
- readonly 'deepgram:voice:aura-2-estrella-es': "deepgram:voice:aura-2-estrella-es";
4315
- readonly 'deepgram:voice:aura-2-gloria-es': "deepgram:voice:aura-2-gloria-es";
4316
- readonly 'deepgram:voice:aura-2-javier-es': "deepgram:voice:aura-2-javier-es";
4317
- readonly 'deepgram:voice:aura-2-luciano-es': "deepgram:voice:aura-2-luciano-es";
4318
- readonly 'deepgram:voice:aura-2-nestor-es': "deepgram:voice:aura-2-nestor-es";
4319
- readonly 'deepgram:voice:aura-2-olivia-es': "deepgram:voice:aura-2-olivia-es";
4320
- readonly 'deepgram:voice:aura-2-selena-es': "deepgram:voice:aura-2-selena-es";
4321
- readonly 'deepgram:voice:aura-2-silvia-es': "deepgram:voice:aura-2-silvia-es";
4322
- readonly 'deepgram:voice:aura-2-sirio-es': "deepgram:voice:aura-2-sirio-es";
4323
- readonly 'deepgram:voice:aura-2-valerio-es': "deepgram:voice:aura-2-valerio-es";
4324
- readonly 'deepgram:voice:aura-2-beatrix-nl': "deepgram:voice:aura-2-beatrix-nl";
4325
- readonly 'deepgram:voice:aura-2-cornelia-nl': "deepgram:voice:aura-2-cornelia-nl";
4326
- readonly 'deepgram:voice:aura-2-daphne-nl': "deepgram:voice:aura-2-daphne-nl";
4327
- readonly 'deepgram:voice:aura-2-hestia-nl': "deepgram:voice:aura-2-hestia-nl";
4328
- readonly 'deepgram:voice:aura-2-lars-nl': "deepgram:voice:aura-2-lars-nl";
4329
- readonly 'deepgram:voice:aura-2-leda-nl': "deepgram:voice:aura-2-leda-nl";
4330
- readonly 'deepgram:voice:aura-2-rhea-nl': "deepgram:voice:aura-2-rhea-nl";
4331
- readonly 'deepgram:voice:aura-2-roman-nl': "deepgram:voice:aura-2-roman-nl";
4332
- readonly 'deepgram:voice:aura-2-sander-nl': "deepgram:voice:aura-2-sander-nl";
4333
- readonly 'deepgram:voice:aura-2-agathe-fr': "deepgram:voice:aura-2-agathe-fr";
4334
- readonly 'deepgram:voice:aura-2-hector-fr': "deepgram:voice:aura-2-hector-fr";
4335
- readonly 'deepgram:voice:aura-2-aurelia-de': "deepgram:voice:aura-2-aurelia-de";
4336
- readonly 'deepgram:voice:aura-2-elara-de': "deepgram:voice:aura-2-elara-de";
4337
- readonly 'deepgram:voice:aura-2-fabian-de': "deepgram:voice:aura-2-fabian-de";
4338
- readonly 'deepgram:voice:aura-2-julius-de': "deepgram:voice:aura-2-julius-de";
4339
- readonly 'deepgram:voice:aura-2-kara-de': "deepgram:voice:aura-2-kara-de";
4340
- readonly 'deepgram:voice:aura-2-lara-de': "deepgram:voice:aura-2-lara-de";
4341
- readonly 'deepgram:voice:aura-2-viktoria-de': "deepgram:voice:aura-2-viktoria-de";
4342
- readonly 'deepgram:voice:aura-2-cesare-it': "deepgram:voice:aura-2-cesare-it";
4343
- readonly 'deepgram:voice:aura-2-cinzia-it': "deepgram:voice:aura-2-cinzia-it";
4344
- readonly 'deepgram:voice:aura-2-demetra-it': "deepgram:voice:aura-2-demetra-it";
4345
- readonly 'deepgram:voice:aura-2-dionisio-it': "deepgram:voice:aura-2-dionisio-it";
4346
- readonly 'deepgram:voice:aura-2-elio-it': "deepgram:voice:aura-2-elio-it";
4347
- readonly 'deepgram:voice:aura-2-flavio-it': "deepgram:voice:aura-2-flavio-it";
4348
- readonly 'deepgram:voice:aura-2-livia-it': "deepgram:voice:aura-2-livia-it";
4349
- readonly 'deepgram:voice:aura-2-maia-it': "deepgram:voice:aura-2-maia-it";
4350
- readonly 'deepgram:voice:aura-2-melia-it': "deepgram:voice:aura-2-melia-it";
4351
- readonly 'deepgram:voice:aura-2-perseo-it': "deepgram:voice:aura-2-perseo-it";
4352
- readonly 'deepgram:voice:aura-2-ama-ja': "deepgram:voice:aura-2-ama-ja";
4353
- readonly 'deepgram:voice:aura-2-ebisu-ja': "deepgram:voice:aura-2-ebisu-ja";
4354
- readonly 'deepgram:voice:aura-2-fujin-ja': "deepgram:voice:aura-2-fujin-ja";
4355
- readonly 'deepgram:voice:aura-2-izanami-ja': "deepgram:voice:aura-2-izanami-ja";
4356
- readonly 'deepgram:voice:aura-2-uzume-ja': "deepgram:voice:aura-2-uzume-ja";
4357
- readonly 'xai:voice:eve': "xai:voice:eve";
4358
- readonly 'xai:voice:ara': "xai:voice:ara";
4359
- readonly 'xai:voice:rex': "xai:voice:rex";
4360
- readonly 'xai:voice:sal': "xai:voice:sal";
4361
- readonly 'xai:voice:leo': "xai:voice:leo";
4362
- readonly 'xai:voice:altair': "xai:voice:altair";
4363
- readonly 'xai:voice:atlas': "xai:voice:atlas";
4364
- readonly 'xai:voice:carina': "xai:voice:carina";
4365
- readonly 'xai:voice:castor': "xai:voice:castor";
4366
- readonly 'xai:voice:celeste': "xai:voice:celeste";
4367
- readonly 'xai:voice:cosmo': "xai:voice:cosmo";
4368
- readonly 'xai:voice:helios': "xai:voice:helios";
4369
- readonly 'xai:voice:helix': "xai:voice:helix";
4370
- readonly 'xai:voice:iris': "xai:voice:iris";
4371
- readonly 'xai:voice:kepler': "xai:voice:kepler";
4372
- readonly 'xai:voice:lumen': "xai:voice:lumen";
4373
- readonly 'xai:voice:luna': "xai:voice:luna";
4374
- readonly 'xai:voice:lux': "xai:voice:lux";
4375
- readonly 'xai:voice:naksh': "xai:voice:naksh";
4376
- readonly 'xai:voice:orion': "xai:voice:orion";
4377
- readonly 'xai:voice:perseus': "xai:voice:perseus";
4378
- readonly 'xai:voice:rigel': "xai:voice:rigel";
4379
- readonly 'xai:voice:sirius': "xai:voice:sirius";
4380
- readonly 'xai:voice:ursa': "xai:voice:ursa";
4381
- readonly 'xai:voice:zagan': "xai:voice:zagan";
4382
- readonly 'xai:voice:zenith': "xai:voice:zenith";
4383
- };
4425
+ interface EcwRefreshMemberEncountersActionParams {
4426
+ /** ID of the eCW FHIR connection whose encounter cache should be refreshed. */
4427
+ connectionId: number;
4428
+ /** Days of encounter history to pull on this refresh. Defaults to 30. */
4429
+ lookbackDays?: number;
4430
+ /**
4431
+ * When true (default), a refresh failure raises a non-retryable action
4432
+ * error so later rules in the same chain do not run. Set to false only
4433
+ * when a time-critical outreach must proceed with stale cache on refresh
4434
+ * failure.
4435
+ */
4436
+ haltOnFailure?: boolean;
4437
+ }
4438
+ interface EventRuleFormData {
4439
+ name?: string | null;
4440
+ uuid?: string;
4441
+ objectType: EventRuleObjectType;
4442
+ eventType: EventRuleEventType;
4443
+ conditions?: string | null;
4444
+ actionType: EventRuleActionType;
4445
+ actionParams?: Record<string, any>;
4446
+ triggerParams?: Record<string, any>;
4447
+ active?: boolean;
4448
+ taskId?: number | null;
4449
+ dataTypeId?: number | null;
4450
+ routineId?: number | null;
4451
+ workflowRevisionId?: number | null;
4452
+ calendarId?: number | null;
4453
+ calendarEventTypeId?: number | null;
4454
+ journeyStepId?: number | null;
4455
+ delay?: number;
4456
+ order?: number;
4457
+ }
4458
+ interface UpdateEventRuleFormData {
4459
+ name?: string | null;
4460
+ conditions?: string | null;
4461
+ actionParams?: Record<string, any>;
4462
+ triggerParams?: Record<string, any>;
4463
+ active?: boolean;
4464
+ delay?: number;
4465
+ order?: number;
4466
+ }
4384
4467
  /**
4385
- * OpenAI Semantic VAD turn detection configuration.
4468
+ * Input type for batch event rule operations (create/update with parent object).
4469
+ * Used when syncing event rules as part of a task or workflow update.
4470
+ * UUID is required and used for matching existing rules.
4386
4471
  */
4387
- interface OpenAISemanticVADTurnDetection$1 {
4388
- /** Use semantic voice activity detection */
4389
- type?: 'semantic_vad';
4390
- /** How eager the model should be to detect turn completion */
4391
- eagerness?: OpenAISemanticVADTurnDetectionEagerness;
4392
- /** Automatically create response when user turn ends */
4393
- create_response?: boolean | null;
4394
- /** Allow user to interrupt the response */
4395
- interrupt_response?: boolean | null;
4472
+ interface EventRuleInput {
4473
+ uuid: string;
4474
+ name?: string | null;
4475
+ objectType?: EventRuleObjectType;
4476
+ eventType: EventRuleEventType;
4477
+ actionType: EventRuleActionType;
4478
+ actionParams?: Record<string, any> | null;
4479
+ triggerParams?: Record<string, any> | null;
4480
+ conditions?: string | null;
4481
+ active?: boolean;
4482
+ delay?: number;
4483
+ }
4484
+ interface RuleExecutionsQueryParams {
4485
+ cursor?: string;
4486
+ pageSize?: number;
4487
+ sortBy?: RuleExecutionSortField;
4488
+ sortOrder?: SortOrder;
4489
+ ruleId?: number;
4490
+ status?: string;
4491
+ triggerType?: string;
4492
+ actionSlug?: string;
4493
+ objectType?: string;
4494
+ eventType?: string;
4495
+ actionType?: string;
4496
+ workflowRevisionId?: number;
4497
+ }
4498
+ type RoutineRunStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'SKIPPED';
4499
+ interface CreateRoutineRequest {
4500
+ name: string;
4501
+ description?: string;
4502
+ scheduleEnabled?: boolean;
4503
+ scheduleMode?: 'ONCE' | 'CRON' | 'INTERVAL';
4504
+ scheduledTime?: string;
4505
+ intervalSeconds?: number;
4506
+ repeatCount?: number;
4507
+ cronString?: string;
4508
+ /** IANA timezone the cronString is interpreted in (e.g.
4509
+ * "America/Los_Angeles"). Omit to default to the workspace timezone,
4510
+ * else UTC. Only meaningful for CRON mode. */
4511
+ timezone?: string;
4512
+ startDate?: string;
4513
+ memberFilterId?: number | null;
4514
+ targetMemberId?: number | null;
4515
+ workflowId?: number | null;
4516
+ /** Plain instruction executed by the selected Agent or the Workspace Manager. */
4517
+ prompt?: string | null;
4518
+ /** Agent responsible for executing a plain prompt. */
4519
+ agentId?: number | null;
4520
+ /** Optional starting skills for the plain prompt. */
4521
+ skills?: string[] | null;
4522
+ /** Workspace Manager model id from `GET /ai-models/manager` for a prompt
4523
+ * the Manager runs (no agentId, no workflowId). Null = the default. */
4524
+ managerModel?: string | null;
4525
+ /** Reasoning effort the picked model offers. Requires managerModel. */
4526
+ managerReasoningEffort?: string | null;
4527
+ destination?: RoutineDestination | null;
4528
+ limit?: number;
4529
+ visibility?: 'private' | 'workspace';
4530
+ /** When true, the server generates a webhook secret and returns its
4531
+ * plaintext exactly once in the create response. */
4532
+ webhookEnabled?: boolean;
4533
+ /** Ordered event rules to attach in the same request. Server syncs by
4534
+ * UUID: same-UUID updates, new UUID creates, omitted UUIDs are deleted. */
4535
+ eventRules?: EventRuleInput[];
4536
+ }
4537
+ interface UpdateRoutineRequest {
4538
+ name?: string;
4539
+ description?: string;
4540
+ scheduleEnabled?: boolean;
4541
+ /** A retired mode may be re-sent unchanged on a disabled row; enabling one
4542
+ * is rejected by the server. */
4543
+ scheduleMode?: 'ONCE' | 'CRON' | 'INTERVAL' | 'NONE' | 'MANUAL';
4544
+ scheduledTime?: string;
4545
+ intervalSeconds?: number;
4546
+ repeatCount?: number;
4547
+ cronString?: string;
4548
+ /** IANA timezone the cronString is interpreted in. Pass empty string ""
4549
+ * to reset it to the workspace timezone — the server stores that value
4550
+ * explicitly rather than clearing the field. Omit to leave unchanged. */
4551
+ timezone?: string;
4552
+ /** ISO 8601 datetime string for deferred start. Pass empty string "" to clear the start date. */
4553
+ startDate?: string;
4554
+ memberFilterId?: number | null;
4555
+ targetMemberId?: number | null;
4556
+ workflowId?: number | null;
4557
+ prompt?: string | null;
4558
+ agentId?: number | null;
4559
+ skills?: string[] | null;
4560
+ /** Workspace Manager model pick. Omit both fields to leave the pick
4561
+ * unchanged; null clears the model and its effort (the default model).
4562
+ * Must be null when the Routine has an agentId or a workflowId. */
4563
+ managerModel?: string | null;
4564
+ /** An effort the model offers. Omitted with a new managerModel, the
4565
+ * model's default effort applies. */
4566
+ managerReasoningEffort?: string | null;
4567
+ destination?: RoutineDestination | null;
4568
+ limit?: number;
4569
+ visibility?: 'private' | 'workspace';
4570
+ /** Ordered event rules to attach. Server syncs by UUID: same-UUID rows
4571
+ * update, new UUIDs create, UUIDs missing from the list are deleted.
4572
+ * Omit the field to leave existing rules untouched. */
4573
+ eventRules?: EventRuleInput[];
4574
+ /** Toggle inbound webhook. Enabling without a stored secret generates one and surfaces plaintext in the response exactly once. */
4575
+ webhookEnabled?: boolean;
4576
+ /** Rotate the stored secret without toggling enabled. Ignored when webhookEnabled=false. */
4577
+ rotateWebhookSecret?: boolean;
4578
+ }
4579
+ interface RoutinesQueryParams {
4580
+ page?: number;
4581
+ pageSize?: number;
4582
+ sortBy?: RoutineSortField;
4583
+ sortOrder?: SortOrder;
4584
+ /**
4585
+ * 'mine' = routines I own, 'shared' = workspace-visible from others,
4586
+ * 'all' = both. 'all_including_private' = every routine in the
4587
+ * workspace; requires AUTOMATIONS_ADMIN and will 403 otherwise.
4588
+ */
4589
+ owner?: 'mine' | 'shared' | 'all' | 'all_including_private';
4590
+ /** Narrow within the visibility filter; never widens it. */
4591
+ ownerId?: number;
4592
+ /** Narrow to Routines associated with this Agent. Never widens visibility. */
4593
+ agentId?: number;
4594
+ /** Narrow to Routines associated with an Agent. Never widens visibility. */
4595
+ agentOnly?: boolean;
4596
+ }
4597
+ interface RoutineRunsQueryParams {
4598
+ page?: number;
4599
+ pageSize?: number;
4600
+ sortBy?: EventRunSortField;
4601
+ sortOrder?: SortOrder;
4602
+ routineId?: number;
4603
+ memberId?: number;
4604
+ status?: RoutineRunStatus;
4605
+ }
4606
+ interface SchedulePreviewRequest {
4607
+ cronString: string;
4608
+ count?: number;
4609
+ /** IANA timezone the cronString is interpreted in (default UTC) so the
4610
+ * previewed run times match what the dispatcher will fire. */
4611
+ timezone?: string;
4396
4612
  }
4397
4613
  /**
4398
- * How eager the model should be to detect turn completion
4614
+ * Draft input for the non-persisting Routine voice-readiness preview
4615
+ * (`POST /routines/preview-voice-readiness`). Hand-written (like
4616
+ * {@link SchedulePreviewRequest}) so `eventRules` uses the app's
4617
+ * {@link EventRuleInput} shape rather than the generated `EventRuleData`.
4399
4618
  */
4400
- type OpenAISemanticVADTurnDetectionEagerness = typeof OpenAISemanticVADTurnDetectionEagerness[keyof typeof OpenAISemanticVADTurnDetectionEagerness] | null;
4401
- declare const OpenAISemanticVADTurnDetectionEagerness: {
4402
- readonly low: "low";
4403
- readonly medium: "medium";
4404
- readonly high: "high";
4405
- readonly auto: "auto";
4406
- };
4619
+ interface RoutineVoiceReadinessPreviewRequest {
4620
+ /** Set on update-style previews; the route enforces owner-or-admin. */
4621
+ routineId?: number | null;
4622
+ name?: string | null;
4623
+ memberFilterId?: number | null;
4624
+ targetMemberId?: number | null;
4625
+ eventRules?: EventRuleInput[] | null;
4626
+ }
4627
+ interface TaskExportEventRuleRelation {
4628
+ taskUuid: string;
4629
+ eventRuleUuid: string;
4630
+ ruleType: string;
4631
+ }
4632
+ interface EventRuleExportItem {
4633
+ uuid: string;
4634
+ name: string;
4635
+ eventType: string;
4636
+ objectType: string;
4637
+ conditions: string | null;
4638
+ actionType: string;
4639
+ actionParams: Record<string, any>;
4640
+ }
4641
+
4407
4642
  /**
4408
- * OpenAI Server VAD turn detection configuration.
4643
+ * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
4644
+ * (group map from emit_openapi.py). Do not edit manually.
4645
+ * Group: realtime_config
4409
4646
  */
4410
- interface OpenAIServerVADTurnDetection$1 {
4411
- /** Use server-side voice activity detection */
4412
- type?: 'server_vad';
4413
- /** Activation threshold for voice detection (0.0 to 1.0) */
4414
- threshold?: number | null;
4415
- /** Milliseconds of audio to include before speech starts */
4416
- prefix_padding_ms?: number | null;
4417
- /** Milliseconds of silence before considering speech ended */
4418
- silence_duration_ms?: number | null;
4419
- /** Automatically create response when user turn ends */
4420
- create_response?: boolean | null;
4421
- /** Allow user to interrupt the response */
4422
- interrupt_response?: boolean | null;
4423
- }
4424
4647
  /**
4425
- * Configuration for xAI (Grok) Realtime models.
4648
+ * Configuration for OpenAI Realtime models.
4426
4649
  *
4427
- * xAI's Voice Agent API is OpenAI-compatible but only supports
4428
- * `server_vad` (not `semantic_vad`). Native-audio model — same
4429
- * invariants as `OpenAIRealtimeModelConfig`.
4650
+ * OpenAI realtime is a native-audio model: it produces speech itself,
4651
+ * has no external STT layer, and only accepts its own voice catalog.
4652
+ * The schema enforces this so PR `#10719`'s EventRule rendering can
4653
+ * treat ``has_local_tts`` as authoritative without checking provider
4654
+ * again at the call site.
4430
4655
  */
4431
- interface XAIRealtimeModelConfig$1 {
4656
+ interface OpenAIRealtimeModelConfig$1 {
4432
4657
  /** Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order. */
4433
- thinkingSound?: XAIRealtimeModelConfigThinkingSound;
4658
+ thinkingSound?: OpenAIRealtimeModelConfigThinkingSound;
4434
4659
  /** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
4435
4660
  thinkingSoundVolume?: number | null;
4436
4661
  /** Delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
@@ -4438,54 +4663,40 @@ interface XAIRealtimeModelConfig$1 {
4438
4663
  /** When `thinkingSound` is 'speech', one of these phrases is spoken while the assistant is processing tool calls. Phrases rotate in round-robin order per session. */
4439
4664
  thinkingSpeechPhrases?: string[] | null;
4440
4665
  /** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
4441
- interruptionSound?: XAIRealtimeModelConfigInterruptionSound;
4666
+ interruptionSound?: OpenAIRealtimeModelConfigInterruptionSound;
4442
4667
  /** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
4443
4668
  interruptionSoundVolume?: number | null;
4444
4669
  /** Native realtime models always use the model's built-in audio. */
4445
4670
  ttsModel?: 'native';
4446
- /** Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice. */
4447
- voiceModel: XAIRealtimeModelConfigVoiceModel;
4448
- /** Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration. */
4449
- inactiveConfig?: XAIRealtimeModelConfigInactiveConfig;
4450
- /** Configure how the model detects when the user has finished speaking, and whether it re-engages after silence. xAI only supports server VAD. This block replaces xAI's defaults wholesale rather than merging with them. */
4451
- turnDetection?: XAIServerVADTurnDetection$1 | null;
4452
- /** Domain vocabulary that biases xAI's speech recognition — drug and procedure names, clinic and department names, the call-reason words a routing menu speaks aloud. At most 100 terms of 50 characters each. NEVER patient identifiers: this list is workspace config, it is sent to the provider on every session update, and it applies to every caller on the workflow. Entries shaped like phone numbers, dates, record numbers or email addresses are rejected on save; everything else still needs human review before the list goes live. */
4453
- keyterms?: string[] | null;
4454
- /** BCP-47 language tag (e.g. 'en-US') telling xAI's transcriber which language to expect. Leave unset for xAI's own multilingual detection — pinning a hint on a line that takes Spanish-language calls degrades those transcripts. */
4455
- languageHint?: string | null;
4456
- /** Per-workflow override for xAI's background reasoning. Leave unset to use xAI's own default ('high'). 'none' trades tool-call fidelity for latency. Per-task reasoning effort is deliberately not offered. */
4457
- reasoningEffort?: XAIRealtimeModelConfigReasoningEffort;
4671
+ /** Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice. */
4672
+ voiceModel: OpenAIRealtimeModelConfigVoiceModel;
4673
+ /** Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration. */
4674
+ inactiveConfig?: OpenAIRealtimeModelConfigInactiveConfig;
4675
+ /** Configure how the model detects when the user has finished speaking. Set to null to disable server-side VAD. */
4676
+ turnDetection?: OpenAISemanticVADTurnDetection$1 | OpenAIServerVADTurnDetection$1 | null;
4458
4677
  }
4459
4678
  /**
4460
4679
  * Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration.
4461
4680
  */
4462
- type XAIRealtimeModelConfigInactiveConfig = {
4681
+ type OpenAIRealtimeModelConfigInactiveConfig = {
4463
4682
  [key: string]: unknown;
4464
4683
  } | null;
4465
4684
  /**
4466
4685
  * Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none.
4467
4686
  */
4468
- type XAIRealtimeModelConfigInterruptionSound = typeof XAIRealtimeModelConfigInterruptionSound[keyof typeof XAIRealtimeModelConfigInterruptionSound] | null;
4469
- declare const XAIRealtimeModelConfigInterruptionSound: {
4687
+ type OpenAIRealtimeModelConfigInterruptionSound = typeof OpenAIRealtimeModelConfigInterruptionSound[keyof typeof OpenAIRealtimeModelConfigInterruptionSound] | null;
4688
+ declare const OpenAIRealtimeModelConfigInterruptionSound: {
4470
4689
  readonly none: "none";
4471
4690
  readonly clav: "clav";
4472
4691
  readonly bells: "bells";
4473
4692
  readonly organ: "organ";
4474
4693
  readonly guzheng: "guzheng";
4475
4694
  };
4476
- /**
4477
- * Per-workflow override for xAI's background reasoning. Leave unset to use xAI's own default ('high'). 'none' trades tool-call fidelity for latency. Per-task reasoning effort is deliberately not offered.
4478
- */
4479
- type XAIRealtimeModelConfigReasoningEffort = typeof XAIRealtimeModelConfigReasoningEffort[keyof typeof XAIRealtimeModelConfigReasoningEffort] | null;
4480
- declare const XAIRealtimeModelConfigReasoningEffort: {
4481
- readonly high: "high";
4482
- readonly none: "none";
4483
- };
4484
4695
  /**
4485
4696
  * Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order.
4486
4697
  */
4487
- type XAIRealtimeModelConfigThinkingSound = typeof XAIRealtimeModelConfigThinkingSound[keyof typeof XAIRealtimeModelConfigThinkingSound] | null;
4488
- declare const XAIRealtimeModelConfigThinkingSound: {
4698
+ type OpenAIRealtimeModelConfigThinkingSound = typeof OpenAIRealtimeModelConfigThinkingSound[keyof typeof OpenAIRealtimeModelConfigThinkingSound] | null;
4699
+ declare const OpenAIRealtimeModelConfigThinkingSound: {
4489
4700
  readonly none: "none";
4490
4701
  readonly typing: "typing";
4491
4702
  readonly strumming: "strumming";
@@ -4494,8 +4705,8 @@ declare const XAIRealtimeModelConfigThinkingSound: {
4494
4705
  /**
4495
4706
  * Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice.
4496
4707
  */
4497
- type XAIRealtimeModelConfigVoiceModel = typeof XAIRealtimeModelConfigVoiceModel[keyof typeof XAIRealtimeModelConfigVoiceModel];
4498
- declare const XAIRealtimeModelConfigVoiceModel: {
4708
+ type OpenAIRealtimeModelConfigVoiceModel = typeof OpenAIRealtimeModelConfigVoiceModel[keyof typeof OpenAIRealtimeModelConfigVoiceModel];
4709
+ declare const OpenAIRealtimeModelConfigVoiceModel: {
4499
4710
  readonly 'openai:voice:alloy': "openai:voice:alloy";
4500
4711
  readonly 'openai:voice:ash': "openai:voice:ash";
4501
4712
  readonly 'openai:voice:ballad': "openai:voice:ballad";
@@ -4658,24 +4869,32 @@ declare const XAIRealtimeModelConfigVoiceModel: {
4658
4869
  readonly 'xai:voice:zenith': "xai:voice:zenith";
4659
4870
  };
4660
4871
  /**
4661
- * xAI's server-VAD block — OpenAI's fields plus ``idle_timeout_ms``.
4662
- *
4663
- * xAI documents ``idle_timeout_ms`` as part of its ``turn_detection``
4664
- * schema; OpenAI's has no such field, so it lives on this subclass rather
4665
- * than on the shared one. The adapter sends ``turnDetection`` verbatim
4666
- * (``model_dump(exclude_none=True, by_alias=True)``), so an unset value
4667
- * never reaches the wire and this class needs no adapter change.
4668
- *
4669
- * READ THIS BEFORE SETTING ANY FIELD HERE. A configured ``turnDetection``
4670
- * REPLACES xAI's default block wholesale — it is not merged with
4671
- * ``XAIRealtimeSocketManager._build_default_turn_detection()``. Setting
4672
- * ``idle_timeout_ms`` alone therefore also drops the provider-resolved
4673
- * ``threshold`` (0.85 for μ-law phone legs resolved to PCM16/24 kHz;
4674
- * 0.6 for direct G.711/A-law) and ``prefix_padding_ms`` (333) back to this
4675
- * schema's OpenAI-shaped defaults (0.5 / 300). Carry the values you want
4676
- * explicitly in the same block.
4872
+ * OpenAI Semantic VAD turn detection configuration.
4677
4873
  */
4678
- interface XAIServerVADTurnDetection$1 {
4874
+ interface OpenAISemanticVADTurnDetection$1 {
4875
+ /** Use semantic voice activity detection */
4876
+ type?: 'semantic_vad';
4877
+ /** How eager the model should be to detect turn completion */
4878
+ eagerness?: OpenAISemanticVADTurnDetectionEagerness;
4879
+ /** Automatically create response when user turn ends */
4880
+ create_response?: boolean | null;
4881
+ /** Allow user to interrupt the response */
4882
+ interrupt_response?: boolean | null;
4883
+ }
4884
+ /**
4885
+ * How eager the model should be to detect turn completion
4886
+ */
4887
+ type OpenAISemanticVADTurnDetectionEagerness = typeof OpenAISemanticVADTurnDetectionEagerness[keyof typeof OpenAISemanticVADTurnDetectionEagerness] | null;
4888
+ declare const OpenAISemanticVADTurnDetectionEagerness: {
4889
+ readonly low: "low";
4890
+ readonly medium: "medium";
4891
+ readonly high: "high";
4892
+ readonly auto: "auto";
4893
+ };
4894
+ /**
4895
+ * OpenAI Server VAD turn detection configuration.
4896
+ */
4897
+ interface OpenAIServerVADTurnDetection$1 {
4679
4898
  /** Use server-side voice activity detection */
4680
4899
  type?: 'server_vad';
4681
4900
  /** Activation threshold for voice detection (0.0 to 1.0) */
@@ -4688,496 +4907,477 @@ interface XAIServerVADTurnDetection$1 {
4688
4907
  create_response?: boolean | null;
4689
4908
  /** Allow user to interrupt the response */
4690
4909
  interrupt_response?: boolean | null;
4691
- /** How long xAI waits through caller silence before speaking again unprompted. Unset — the default — leaves re-engagement off. There is deliberately NO platform default: whether an agent should break a silence, and after how long, is a per-workflow decision made from eval evidence. xAI CLAMPS THIS UP TO ITS OWN FLOOR: an acceptance spike against grok-voice-think-fast-2.0 sent 3000 and `session.updated` echoed back 5000, so read the echoed session rather than this field when the exact wait matters. A synthetic Grok Voice 3 PCM16/24 kHz probe observed idle audio responses with threshold 0.85 and an 8000 ms timeout; live caller delivery still needs call evidence. On native resume, this also enables one short platform liveness prompt at the configured interval when ordinary handoff turn recovery does not apply. Either side speaking cancels it. */
4692
- idle_timeout_ms?: number | null;
4693
4910
  }
4694
-
4695
- type OpenAITurnDetectionType = 'semantic_vad' | 'server_vad';
4696
- type OpenAISemanticVADEagerness = 'low' | 'medium' | 'high' | 'auto';
4697
- interface OpenAISemanticVADTurnDetection {
4698
- type: 'semantic_vad';
4699
- eagerness?: OpenAISemanticVADEagerness;
4700
- create_response?: boolean;
4701
- interrupt_response?: boolean;
4702
- }
4703
- interface OpenAIServerVADTurnDetection {
4704
- type: 'server_vad';
4705
- threshold?: number;
4706
- prefix_padding_ms?: number;
4707
- silence_duration_ms?: number;
4708
- create_response?: boolean;
4709
- interrupt_response?: boolean;
4710
- }
4711
- type OpenAITurnDetection = OpenAISemanticVADTurnDetection | OpenAIServerVADTurnDetection;
4712
4911
  /**
4713
- * xAI's server-VAD block: OpenAI's fields plus `idle_timeout_ms`, which xAI
4714
- * documents and OpenAI has no equivalent for. Mirrors
4715
- * `lib/voice/realtime_config.py:XAIServerVADTurnDetection`.
4912
+ * Configuration for xAI (Grok) Realtime models.
4716
4913
  *
4717
- * A configured `turnDetection` REPLACES xAI's default block wholesale rather
4718
- * than merging with it, so setting `idle_timeout_ms` alone also drops the
4719
- * phone-tuned threshold and prefix padding back to schema defaults.
4720
- */
4721
- interface XAIServerVADTurnDetection extends OpenAIServerVADTurnDetection {
4722
- /**
4723
- * Silence (ms) before xAI speaks again unprompted. Unset means
4724
- * re-engagement is off; there is deliberately no platform default. xAI
4725
- * clamps the value up to its own floor, so read back the echoed session
4726
- * when the exact wait matters.
4727
- */
4728
- idle_timeout_ms?: number | null;
4729
- }
4730
- type ThinkingSound = 'none' | 'typing' | 'strumming' | 'speech';
4731
- type InterruptionSound = 'none' | 'clav' | 'bells' | 'organ' | 'guzheng';
4732
- /** Default filler phrases suggested when the user first enables "speech" mode. */
4733
- declare const DEFAULT_THINKING_SPEECH_PHRASES: readonly string[];
4734
- type TTSModel = 'native' | 'xai:tts:v1' | 'elevenlabs:tts:eleven_turbo_v2' | 'elevenlabs:tts:eleven_turbo_v2_5' | 'elevenlabs:tts:eleven_multilingual_v2' | 'elevenlabs:tts:eleven_flash_v2_5' | 'elevenlabs:tts:eleven_v4_turbo' | 'openai:tts:tts-1' | 'openai:tts:tts-1-hd' | 'openai:tts:gpt-4o-mini-tts' | 'aws:tts:polly-generative' | 'aws:tts:polly-neural' | 'google:tts:chirp';
4735
- /** Extract the provider from a TTSModel ID (e.g. "xai:tts:v1" -> "xai"). */
4736
- declare function getTTSProvider(ttsModel: string | null | undefined): string | null;
4737
- /**
4738
- * Base configuration for all realtime models.
4739
- * Contains common fields that apply to all realtime model providers.
4914
+ * xAI's Voice Agent API is OpenAI-compatible but only supports
4915
+ * `server_vad` (not `semantic_vad`). Native-audio model — same
4916
+ * invariants as `OpenAIRealtimeModelConfig`.
4740
4917
  */
4741
- interface BaseRealtimeModelConfig {
4742
- /** Sound to play while the agent is processing tool calls. */
4743
- thinkingSound?: ThinkingSound | null;
4918
+ interface XAIRealtimeModelConfig$1 {
4919
+ /** Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order. */
4920
+ thinkingSound?: XAIRealtimeModelConfigThinkingSound;
4744
4921
  /** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
4745
4922
  thinkingSoundVolume?: number | null;
4746
- /** Initial delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
4923
+ /** Delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
4747
4924
  thinkingSoundInitialDelay?: number | null;
4748
- /** When `thinkingSound` is 'speech', one of these phrases is spoken while the agent runs a tool. Phrases rotate round-robin per session. */
4925
+ /** When `thinkingSound` is 'speech', one of these phrases is spoken while the assistant is processing tool calls. Phrases rotate in round-robin order per session. */
4749
4926
  thinkingSpeechPhrases?: string[] | null;
4750
4927
  /** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
4751
- interruptionSound?: InterruptionSound | null;
4928
+ interruptionSound?: XAIRealtimeModelConfigInterruptionSound;
4752
4929
  /** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
4753
4930
  interruptionSoundVolume?: number | null;
4754
- /** TTS model ID in provider:tts:model format (e.g. 'xai:tts:v1'), or 'native'. */
4755
- ttsModel?: TTSModel | null;
4756
- /** Canonical voice identifier (e.g., xai:voice:lux) that selects the specific agent voice. */
4757
- voiceModel?: string | null;
4758
- /**
4759
- * Settings belonging to the voice architecture that is NOT currently
4760
- * selected, parked so switching between the composable stack and a native
4761
- * speech-to-speech model is lossless and reversible.
4762
- *
4763
- * Declared on the base because the native schemas set `extra="forbid"`
4764
- * server-side: an undeclared key would be rejected on save. Written and
4765
- * read only by the switch itself (`reconcile_realtime_model_config` on the
4766
- * server, `parkComposableConfig` / `restoreComposableConfig` in the
4767
- * editor). Nothing at call time reads it — it is a holding area, never
4768
- * live configuration.
4769
- */
4770
- inactiveConfig?: Record<string, unknown> | null;
4771
- }
4772
- /**
4773
- * Native realtime providers always use the model's built-in audio. The
4774
- * backend Pydantic schemas now enforce `ttsModel: "native"` and reject
4775
- * external `sttModel`. Mirroring that contract on the client surface
4776
- * keeps the editor in sync — see `useVoiceConfig.buildSubmitConfig`.
4777
- */
4778
- interface OpenAIRealtimeModelConfig extends BaseRealtimeModelConfig {
4779
- ttsModel?: 'native' | null;
4780
- turnDetection?: OpenAITurnDetection | null;
4781
- }
4782
- interface GeminiRealtimeModelConfig extends BaseRealtimeModelConfig {
4783
- ttsModel?: 'native' | null;
4784
- }
4785
- interface CustomRealtimeModelConfig extends BaseRealtimeModelConfig {
4786
- sttModel?: string | null;
4787
- sttConfig?: Record<string, unknown> | null;
4788
- inferenceModel: string;
4789
- inferenceModelConfig?: ChatModelConfig | null;
4790
- }
4791
- /**
4792
- * xAI Voice Agent realtime config. Only `server_vad` is supported, so
4793
- * the server-side schema rejects `semantic_vad`. Mirrors
4794
- * `lib/voice/realtime_config.py:XAIRealtimeModelConfig`.
4795
- */
4796
- interface XAIRealtimeModelConfig extends BaseRealtimeModelConfig {
4797
- ttsModel?: 'native' | null;
4798
- turnDetection?: XAIServerVADTurnDetection | null;
4799
- keyterms?: XAIRealtimeModelConfig$1['keyterms'];
4800
- languageHint?: XAIRealtimeModelConfig$1['languageHint'];
4801
- reasoningEffort?: XAIRealtimeModelConfig$1['reasoningEffort'];
4802
- }
4803
- /**
4804
- * xAI Grok Voice background reasoning ("high" | "none"). Narrower than the
4805
- * chat-model `XAIReasoningEffort`.
4806
- */
4807
- type XAIRealtimeReasoningEffort = NonNullable<XAIRealtimeModelConfig$1['reasoningEffort']>;
4808
- type RealtimeModelConfig = OpenAIRealtimeModelConfig | GeminiRealtimeModelConfig | CustomRealtimeModelConfig | XAIRealtimeModelConfig;
4809
- type GeminiThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
4810
- /**
4811
- * OpenAI GPT-5 reasoning effort. The ACCEPTED SUBSET IS MODEL-DEPENDENT — sending
4812
- * an out-of-set value is a hard 400 at the API. Mirror of the per-family vocab in
4813
- * lib/ai/chat_model_config.py (see getOpenAIReasoningEfforts):
4814
- * gpt-5 (5.0): minimal / low / medium / high
4815
- * gpt-5.1: none / low / medium / high
4816
- * gpt-5.4: none / low / medium / high / xhigh
4817
- * gpt-6.1-sol: low / medium / high / xhigh
4818
- * This union is the superset; the UI filters it down per selected model.
4819
- */
4820
- type OpenAIReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
4821
- /**
4822
- * xAI (Grok) reasoning levels. Note "none" disables reasoning entirely
4823
- * (used by Grok 4.3 to switch into non-reasoning mode). Grok 4.6 and 4.7
4824
- * accept "xhigh" but not "none". xAI does NOT accept OpenAI's "minimal".
4825
- * https://docs.x.ai/developers/model-capabilities/text/reasoning#effort-levels
4826
- */
4827
- type XAIReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh';
4828
- /**
4829
- * Claude 5.5 adaptive-thinking effort. These models take effort as their only
4830
- * thinking control — they reject `thinkingEnabled` / `thinkingBudgetTokens`.
4831
- * Mirror of `ClaudeChatConfig.reasoningEffort` in lib/ai/chat_model_config.py.
4832
- */
4833
- type ClaudeReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
4834
- /**
4835
- * Base configuration for all chat models.
4836
- * Can be extended for provider-specific options.
4837
- */
4838
- interface BaseChatModelConfig {
4839
- }
4840
- interface GeminiChatModelConfig extends BaseChatModelConfig {
4841
- thinkingLevel?: GeminiThinkingLevel | null;
4842
- includeThoughts?: boolean | null;
4843
- }
4844
- interface ClaudeChatModelConfig extends BaseChatModelConfig {
4845
- thinkingEnabled?: boolean | null;
4846
- thinkingBudgetTokens?: number | null;
4847
- /** Claude 5.5 only; Claude Haiku 4.5 uses thinkingEnabled instead. */
4848
- reasoningEffort?: ClaudeReasoningEffort | null;
4849
- }
4850
- interface OpenAIChatModelConfig extends BaseChatModelConfig {
4851
- provider: 'openai';
4852
- reasoningEffort?: OpenAIReasoningEffort | null;
4853
- }
4854
- interface XAIChatModelConfig extends BaseChatModelConfig {
4855
- provider: 'xai';
4856
- reasoningEffort?: XAIReasoningEffort | null;
4857
- }
4858
- type ChatModelConfig = GeminiChatModelConfig | ClaudeChatModelConfig | OpenAIChatModelConfig | XAIChatModelConfig;
4859
- /**
4860
- * Supported TTS preview providers.
4861
- * These are the voice providers that support TTS preview in the UI.
4862
- */
4863
- declare const TTS_PREVIEW_PROVIDERS: readonly ["openai", "elevenlabs", "google", "aws", "deepgram", "xai"];
4864
- type TTSPreviewProvider = (typeof TTS_PREVIEW_PROVIDERS)[number];
4865
- /**
4866
- * Get the canonical voice model ID from a realtime model config.
4867
- *
4868
- * Voice model IDs follow the format: `{provider}:voice:{voiceName}`
4869
- * Examples:
4870
- * - `openai:voice:ash`
4871
- * - `xai:voice:lux`
4872
- * - `elevenlabs:voice:seamus`
4873
- * - `google:voice:puck`
4874
- *
4875
- * @param entity - An object with optional realtimeModelConfig
4876
- * @returns The canonical voice model ID, or null if no voice is configured
4931
+ /** Native realtime models always use the model's built-in audio. */
4932
+ ttsModel?: 'native';
4933
+ /** Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice. */
4934
+ voiceModel: XAIRealtimeModelConfigVoiceModel;
4935
+ /** Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration. */
4936
+ inactiveConfig?: XAIRealtimeModelConfigInactiveConfig;
4937
+ /** Configure how the model detects when the user has finished speaking, and whether it re-engages after silence. xAI only supports server VAD. This block replaces xAI's defaults wholesale rather than merging with them. */
4938
+ turnDetection?: XAIServerVADTurnDetection$1 | null;
4939
+ /** Domain vocabulary that biases xAI's speech recognition — drug and procedure names, clinic and department names, the call-reason words a routing menu speaks aloud. At most 100 terms of 50 characters each. NEVER patient identifiers: this list is workspace config, it is sent to the provider on every session update, and it applies to every caller on the workflow. Entries shaped like phone numbers, dates, record numbers or email addresses are rejected on save; everything else still needs human review before the list goes live. */
4940
+ keyterms?: string[] | null;
4941
+ /** BCP-47 language tag (e.g. 'en-US') telling xAI's transcriber which language to expect. Leave unset for xAI's own multilingual detection — pinning a hint on a line that takes Spanish-language calls degrades those transcripts. */
4942
+ languageHint?: string | null;
4943
+ /** Per-workflow override for xAI's background reasoning. Leave unset to use xAI's own default ('high'). 'none' trades tool-call fidelity for latency. Per-task reasoning effort is deliberately not offered. */
4944
+ reasoningEffort?: XAIRealtimeModelConfigReasoningEffort;
4945
+ }
4946
+ /**
4947
+ * Settings belonging to the voice architecture that is NOT currently selected, parked here so switching between the composable stack (custom:realtime:composable) and a native speech-to-speech model is lossless and reversible. Written and read by `reconcile_realtime_model_config`; nothing at call time reads it. Do not write this field from anywhere else, and do not hand-edit it — it is a holding area, never live configuration.
4877
4948
  */
4878
- declare function getVoiceModelId(entity: {
4879
- realtimeModelConfig?: RealtimeModelConfig | null;
4880
- }): string | null;
4949
+ type XAIRealtimeModelConfigInactiveConfig = {
4950
+ [key: string]: unknown;
4951
+ } | null;
4881
4952
  /**
4882
- * Check if an entity's voice can be previewed.
4883
- *
4884
- * @param entity - An object with optional realtimeModelConfig
4885
- * @returns True if the entity's voice supports TTS preview
4953
+ * Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none.
4886
4954
  */
4887
- declare function canPreviewVoice(entity: {
4888
- realtimeModelConfig?: RealtimeModelConfig | null;
4889
- }): boolean;
4890
-
4955
+ type XAIRealtimeModelConfigInterruptionSound = typeof XAIRealtimeModelConfigInterruptionSound[keyof typeof XAIRealtimeModelConfigInterruptionSound] | null;
4956
+ declare const XAIRealtimeModelConfigInterruptionSound: {
4957
+ readonly none: "none";
4958
+ readonly clav: "clav";
4959
+ readonly bells: "bells";
4960
+ readonly organ: "organ";
4961
+ readonly guzheng: "guzheng";
4962
+ };
4891
4963
  /**
4892
- * Unified Query Engine types — hand-written mirror of `lib/query/ir.py`
4893
- * and the `/w/{wid}/queries/*` route models.
4894
- *
4895
- * The JSON IR is the wire format AND the UI's source of truth: the
4896
- * query-builder renders from and edits exactly this tree.
4964
+ * Per-workflow override for xAI's background reasoning. Leave unset to use xAI's own default ('high'). 'none' trades tool-call fidelity for latency. Per-task reasoning effort is deliberately not offered.
4897
4965
  */
4898
-
4899
- type QueryEntityType = 'member' | 'chat' | 'data_record';
4900
- type QueryComparisonOp = 'eq' | 'neq' | 'contains' | 'notContains' | 'startsWith' | 'in' | 'notIn' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'notBetween' | 'isEmpty' | 'notEmpty' | 'exists' | 'onDay' | 'notOnDay';
4901
- type QueryAggregateOp = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
4902
- /** Operators that take no value. */
4903
- declare const QUERY_VALUELESS_OPS: ReadonlySet<QueryComparisonOp>;
4904
- interface QueryNowValue {
4905
- type: 'now';
4906
- }
4907
- interface QueryDaysAgoValue {
4908
- type: 'daysAgo';
4909
- days: number;
4910
- /** Optional hour component (legacy "36h" duration windows). */
4911
- hours?: number;
4912
- }
4913
- interface QueryDaysFromNowValue {
4914
- type: 'daysFromNow';
4915
- days: number;
4916
- }
4917
- interface QueryDayBoundaryValue {
4918
- type: 'dayBoundary';
4919
- /** 'today' | 'tomorrow' | 'yesterday' | ISO date (YYYY-MM-DD) */
4920
- day: string;
4921
- edge?: 'start' | 'end';
4922
- /** Whole-day shift relative to `day` (legacy daysAgoEqual: N). */
4923
- offsetDays?: number;
4924
- /** UTC-pinned day bounds (legacy calendar-event day operators). */
4925
- tz?: 'workspace' | 'utc';
4926
- }
4927
- type QueryTemporalValue = QueryNowValue | QueryDaysAgoValue | QueryDaysFromNowValue | QueryDayBoundaryValue;
4928
- type QueryScalar = boolean | number | string;
4929
- type QueryRangeBound = QueryScalar | QueryTemporalValue;
4930
- interface QueryRangeValue {
4931
- type: 'range';
4932
- min: QueryRangeBound;
4933
- max: QueryRangeBound;
4934
- }
4935
- type QueryValue = QueryScalar | QueryTemporalValue | QueryRangeValue | QueryScalar[];
4966
+ type XAIRealtimeModelConfigReasoningEffort = typeof XAIRealtimeModelConfigReasoningEffort[keyof typeof XAIRealtimeModelConfigReasoningEffort] | null;
4967
+ declare const XAIRealtimeModelConfigReasoningEffort: {
4968
+ readonly high: "high";
4969
+ readonly none: "none";
4970
+ };
4936
4971
  /**
4937
- * Marks where a named parameter's value goes: `{ "param": "<name>" }`.
4938
- *
4939
- * A predicate that holds one is a template ({@link QueryTemplatePredicate}).
4940
- * Replace every marker with a value before the predicate goes to
4941
- * `/queries/*`: those endpoints take values only and refuse a marker.
4972
+ * Sound to play while the assistant is processing tool calls. Set to 'none' or null to disable. Use 'speech' to speak one of `thinkingSpeechPhrases` in round-robin order.
4942
4973
  */
4943
- interface QueryParameterRef {
4944
- param: string;
4945
- }
4946
- /** A compare value in a template: a value, or a marker for a parameter. */
4947
- type QueryTemplateValue = QueryValue | QueryParameterRef;
4948
- interface QueryAnd<V = QueryValue> {
4949
- kind: 'and';
4950
- children: QueryPredicate<V>[];
4951
- }
4952
- interface QueryOr<V = QueryValue> {
4953
- kind: 'or';
4954
- children: QueryPredicate<V>[];
4955
- }
4956
- interface QueryNot<V = QueryValue> {
4957
- kind: 'not';
4958
- child: QueryPredicate<V>;
4959
- }
4974
+ type XAIRealtimeModelConfigThinkingSound = typeof XAIRealtimeModelConfigThinkingSound[keyof typeof XAIRealtimeModelConfigThinkingSound] | null;
4975
+ declare const XAIRealtimeModelConfigThinkingSound: {
4976
+ readonly none: "none";
4977
+ readonly typing: "typing";
4978
+ readonly strumming: "strumming";
4979
+ readonly speech: "speech";
4980
+ };
4981
+ /**
4982
+ * Canonical voice identifier (e.g., xai:voice:ara) that selects the specific assistant voice.
4983
+ */
4984
+ type XAIRealtimeModelConfigVoiceModel = typeof XAIRealtimeModelConfigVoiceModel[keyof typeof XAIRealtimeModelConfigVoiceModel];
4985
+ declare const XAIRealtimeModelConfigVoiceModel: {
4986
+ readonly 'openai:voice:alloy': "openai:voice:alloy";
4987
+ readonly 'openai:voice:ash': "openai:voice:ash";
4988
+ readonly 'openai:voice:ballad': "openai:voice:ballad";
4989
+ readonly 'openai:voice:coral': "openai:voice:coral";
4990
+ readonly 'openai:voice:echo': "openai:voice:echo";
4991
+ readonly 'openai:voice:sage': "openai:voice:sage";
4992
+ readonly 'openai:voice:shimmer': "openai:voice:shimmer";
4993
+ readonly 'openai:voice:verse': "openai:voice:verse";
4994
+ readonly 'openai:voice:marin': "openai:voice:marin";
4995
+ readonly 'openai:voice:cedar': "openai:voice:cedar";
4996
+ readonly 'google:voice:puck': "google:voice:puck";
4997
+ readonly 'google:voice:charon': "google:voice:charon";
4998
+ readonly 'google:voice:kore': "google:voice:kore";
4999
+ readonly 'google:voice:fenrir': "google:voice:fenrir";
5000
+ readonly 'google:voice:aoede': "google:voice:aoede";
5001
+ readonly 'aws:voice:polly-ruth': "aws:voice:polly-ruth";
5002
+ readonly 'aws:voice:polly-matthew': "aws:voice:polly-matthew";
5003
+ readonly 'aws:voice:polly-joanna': "aws:voice:polly-joanna";
5004
+ readonly 'aws:voice:polly-stephen': "aws:voice:polly-stephen";
5005
+ readonly 'aws:voice:polly-danielle': "aws:voice:polly-danielle";
5006
+ readonly 'aws:voice:polly-salli': "aws:voice:polly-salli";
5007
+ readonly 'elevenlabs:voice:dan': "elevenlabs:voice:dan";
5008
+ readonly 'elevenlabs:voice:catt': "elevenlabs:voice:catt";
5009
+ readonly 'elevenlabs:voice:river': "elevenlabs:voice:river";
5010
+ readonly 'elevenlabs:voice:will': "elevenlabs:voice:will";
5011
+ readonly 'elevenlabs:voice:eric': "elevenlabs:voice:eric";
5012
+ readonly 'elevenlabs:voice:lily': "elevenlabs:voice:lily";
5013
+ readonly 'elevenlabs:voice:patrick': "elevenlabs:voice:patrick";
5014
+ readonly 'elevenlabs:voice:roger': "elevenlabs:voice:roger";
5015
+ readonly 'elevenlabs:voice:suzanne': "elevenlabs:voice:suzanne";
5016
+ readonly 'elevenlabs:voice:seamus': "elevenlabs:voice:seamus";
5017
+ readonly 'deepgram:voice:aura-asteria-en': "deepgram:voice:aura-asteria-en";
5018
+ readonly 'deepgram:voice:aura-luna-en': "deepgram:voice:aura-luna-en";
5019
+ readonly 'deepgram:voice:aura-stella-en': "deepgram:voice:aura-stella-en";
5020
+ readonly 'deepgram:voice:aura-athena-en': "deepgram:voice:aura-athena-en";
5021
+ readonly 'deepgram:voice:aura-hera-en': "deepgram:voice:aura-hera-en";
5022
+ readonly 'deepgram:voice:aura-orion-en': "deepgram:voice:aura-orion-en";
5023
+ readonly 'deepgram:voice:aura-arcas-en': "deepgram:voice:aura-arcas-en";
5024
+ readonly 'deepgram:voice:aura-perseus-en': "deepgram:voice:aura-perseus-en";
5025
+ readonly 'deepgram:voice:aura-angus-en': "deepgram:voice:aura-angus-en";
5026
+ readonly 'deepgram:voice:aura-orpheus-en': "deepgram:voice:aura-orpheus-en";
5027
+ readonly 'deepgram:voice:aura-helios-en': "deepgram:voice:aura-helios-en";
5028
+ readonly 'deepgram:voice:aura-zeus-en': "deepgram:voice:aura-zeus-en";
5029
+ readonly 'deepgram:voice:aura-2-amalthea-en': "deepgram:voice:aura-2-amalthea-en";
5030
+ readonly 'deepgram:voice:aura-2-andromeda-en': "deepgram:voice:aura-2-andromeda-en";
5031
+ readonly 'deepgram:voice:aura-2-apollo-en': "deepgram:voice:aura-2-apollo-en";
5032
+ readonly 'deepgram:voice:aura-2-arcas-en': "deepgram:voice:aura-2-arcas-en";
5033
+ readonly 'deepgram:voice:aura-2-aries-en': "deepgram:voice:aura-2-aries-en";
5034
+ readonly 'deepgram:voice:aura-2-asteria-en': "deepgram:voice:aura-2-asteria-en";
5035
+ readonly 'deepgram:voice:aura-2-athena-en': "deepgram:voice:aura-2-athena-en";
5036
+ readonly 'deepgram:voice:aura-2-atlas-en': "deepgram:voice:aura-2-atlas-en";
5037
+ readonly 'deepgram:voice:aura-2-aurora-en': "deepgram:voice:aura-2-aurora-en";
5038
+ readonly 'deepgram:voice:aura-2-callista-en': "deepgram:voice:aura-2-callista-en";
5039
+ readonly 'deepgram:voice:aura-2-cora-en': "deepgram:voice:aura-2-cora-en";
5040
+ readonly 'deepgram:voice:aura-2-cordelia-en': "deepgram:voice:aura-2-cordelia-en";
5041
+ readonly 'deepgram:voice:aura-2-delia-en': "deepgram:voice:aura-2-delia-en";
5042
+ readonly 'deepgram:voice:aura-2-draco-en': "deepgram:voice:aura-2-draco-en";
5043
+ readonly 'deepgram:voice:aura-2-electra-en': "deepgram:voice:aura-2-electra-en";
5044
+ readonly 'deepgram:voice:aura-2-harmonia-en': "deepgram:voice:aura-2-harmonia-en";
5045
+ readonly 'deepgram:voice:aura-2-helena-en': "deepgram:voice:aura-2-helena-en";
5046
+ readonly 'deepgram:voice:aura-2-hera-en': "deepgram:voice:aura-2-hera-en";
5047
+ readonly 'deepgram:voice:aura-2-hermes-en': "deepgram:voice:aura-2-hermes-en";
5048
+ readonly 'deepgram:voice:aura-2-hyperion-en': "deepgram:voice:aura-2-hyperion-en";
5049
+ readonly 'deepgram:voice:aura-2-iris-en': "deepgram:voice:aura-2-iris-en";
5050
+ readonly 'deepgram:voice:aura-2-janus-en': "deepgram:voice:aura-2-janus-en";
5051
+ readonly 'deepgram:voice:aura-2-juno-en': "deepgram:voice:aura-2-juno-en";
5052
+ readonly 'deepgram:voice:aura-2-jupiter-en': "deepgram:voice:aura-2-jupiter-en";
5053
+ readonly 'deepgram:voice:aura-2-luna-en': "deepgram:voice:aura-2-luna-en";
5054
+ readonly 'deepgram:voice:aura-2-mars-en': "deepgram:voice:aura-2-mars-en";
5055
+ readonly 'deepgram:voice:aura-2-minerva-en': "deepgram:voice:aura-2-minerva-en";
5056
+ readonly 'deepgram:voice:aura-2-neptune-en': "deepgram:voice:aura-2-neptune-en";
5057
+ readonly 'deepgram:voice:aura-2-odysseus-en': "deepgram:voice:aura-2-odysseus-en";
5058
+ readonly 'deepgram:voice:aura-2-ophelia-en': "deepgram:voice:aura-2-ophelia-en";
5059
+ readonly 'deepgram:voice:aura-2-orion-en': "deepgram:voice:aura-2-orion-en";
5060
+ readonly 'deepgram:voice:aura-2-orpheus-en': "deepgram:voice:aura-2-orpheus-en";
5061
+ readonly 'deepgram:voice:aura-2-pandora-en': "deepgram:voice:aura-2-pandora-en";
5062
+ readonly 'deepgram:voice:aura-2-phoebe-en': "deepgram:voice:aura-2-phoebe-en";
5063
+ readonly 'deepgram:voice:aura-2-pluto-en': "deepgram:voice:aura-2-pluto-en";
5064
+ readonly 'deepgram:voice:aura-2-saturn-en': "deepgram:voice:aura-2-saturn-en";
5065
+ readonly 'deepgram:voice:aura-2-selene-en': "deepgram:voice:aura-2-selene-en";
5066
+ readonly 'deepgram:voice:aura-2-thalia-en': "deepgram:voice:aura-2-thalia-en";
5067
+ readonly 'deepgram:voice:aura-2-theia-en': "deepgram:voice:aura-2-theia-en";
5068
+ readonly 'deepgram:voice:aura-2-vesta-en': "deepgram:voice:aura-2-vesta-en";
5069
+ readonly 'deepgram:voice:aura-2-zeus-en': "deepgram:voice:aura-2-zeus-en";
5070
+ readonly 'deepgram:voice:aura-2-agustina-es': "deepgram:voice:aura-2-agustina-es";
5071
+ readonly 'deepgram:voice:aura-2-alvaro-es': "deepgram:voice:aura-2-alvaro-es";
5072
+ readonly 'deepgram:voice:aura-2-antonia-es': "deepgram:voice:aura-2-antonia-es";
5073
+ readonly 'deepgram:voice:aura-2-aquila-es': "deepgram:voice:aura-2-aquila-es";
5074
+ readonly 'deepgram:voice:aura-2-carina-es': "deepgram:voice:aura-2-carina-es";
5075
+ readonly 'deepgram:voice:aura-2-celeste-es': "deepgram:voice:aura-2-celeste-es";
5076
+ readonly 'deepgram:voice:aura-2-diana-es': "deepgram:voice:aura-2-diana-es";
5077
+ readonly 'deepgram:voice:aura-2-estrella-es': "deepgram:voice:aura-2-estrella-es";
5078
+ readonly 'deepgram:voice:aura-2-gloria-es': "deepgram:voice:aura-2-gloria-es";
5079
+ readonly 'deepgram:voice:aura-2-javier-es': "deepgram:voice:aura-2-javier-es";
5080
+ readonly 'deepgram:voice:aura-2-luciano-es': "deepgram:voice:aura-2-luciano-es";
5081
+ readonly 'deepgram:voice:aura-2-nestor-es': "deepgram:voice:aura-2-nestor-es";
5082
+ readonly 'deepgram:voice:aura-2-olivia-es': "deepgram:voice:aura-2-olivia-es";
5083
+ readonly 'deepgram:voice:aura-2-selena-es': "deepgram:voice:aura-2-selena-es";
5084
+ readonly 'deepgram:voice:aura-2-silvia-es': "deepgram:voice:aura-2-silvia-es";
5085
+ readonly 'deepgram:voice:aura-2-sirio-es': "deepgram:voice:aura-2-sirio-es";
5086
+ readonly 'deepgram:voice:aura-2-valerio-es': "deepgram:voice:aura-2-valerio-es";
5087
+ readonly 'deepgram:voice:aura-2-beatrix-nl': "deepgram:voice:aura-2-beatrix-nl";
5088
+ readonly 'deepgram:voice:aura-2-cornelia-nl': "deepgram:voice:aura-2-cornelia-nl";
5089
+ readonly 'deepgram:voice:aura-2-daphne-nl': "deepgram:voice:aura-2-daphne-nl";
5090
+ readonly 'deepgram:voice:aura-2-hestia-nl': "deepgram:voice:aura-2-hestia-nl";
5091
+ readonly 'deepgram:voice:aura-2-lars-nl': "deepgram:voice:aura-2-lars-nl";
5092
+ readonly 'deepgram:voice:aura-2-leda-nl': "deepgram:voice:aura-2-leda-nl";
5093
+ readonly 'deepgram:voice:aura-2-rhea-nl': "deepgram:voice:aura-2-rhea-nl";
5094
+ readonly 'deepgram:voice:aura-2-roman-nl': "deepgram:voice:aura-2-roman-nl";
5095
+ readonly 'deepgram:voice:aura-2-sander-nl': "deepgram:voice:aura-2-sander-nl";
5096
+ readonly 'deepgram:voice:aura-2-agathe-fr': "deepgram:voice:aura-2-agathe-fr";
5097
+ readonly 'deepgram:voice:aura-2-hector-fr': "deepgram:voice:aura-2-hector-fr";
5098
+ readonly 'deepgram:voice:aura-2-aurelia-de': "deepgram:voice:aura-2-aurelia-de";
5099
+ readonly 'deepgram:voice:aura-2-elara-de': "deepgram:voice:aura-2-elara-de";
5100
+ readonly 'deepgram:voice:aura-2-fabian-de': "deepgram:voice:aura-2-fabian-de";
5101
+ readonly 'deepgram:voice:aura-2-julius-de': "deepgram:voice:aura-2-julius-de";
5102
+ readonly 'deepgram:voice:aura-2-kara-de': "deepgram:voice:aura-2-kara-de";
5103
+ readonly 'deepgram:voice:aura-2-lara-de': "deepgram:voice:aura-2-lara-de";
5104
+ readonly 'deepgram:voice:aura-2-viktoria-de': "deepgram:voice:aura-2-viktoria-de";
5105
+ readonly 'deepgram:voice:aura-2-cesare-it': "deepgram:voice:aura-2-cesare-it";
5106
+ readonly 'deepgram:voice:aura-2-cinzia-it': "deepgram:voice:aura-2-cinzia-it";
5107
+ readonly 'deepgram:voice:aura-2-demetra-it': "deepgram:voice:aura-2-demetra-it";
5108
+ readonly 'deepgram:voice:aura-2-dionisio-it': "deepgram:voice:aura-2-dionisio-it";
5109
+ readonly 'deepgram:voice:aura-2-elio-it': "deepgram:voice:aura-2-elio-it";
5110
+ readonly 'deepgram:voice:aura-2-flavio-it': "deepgram:voice:aura-2-flavio-it";
5111
+ readonly 'deepgram:voice:aura-2-livia-it': "deepgram:voice:aura-2-livia-it";
5112
+ readonly 'deepgram:voice:aura-2-maia-it': "deepgram:voice:aura-2-maia-it";
5113
+ readonly 'deepgram:voice:aura-2-melia-it': "deepgram:voice:aura-2-melia-it";
5114
+ readonly 'deepgram:voice:aura-2-perseo-it': "deepgram:voice:aura-2-perseo-it";
5115
+ readonly 'deepgram:voice:aura-2-ama-ja': "deepgram:voice:aura-2-ama-ja";
5116
+ readonly 'deepgram:voice:aura-2-ebisu-ja': "deepgram:voice:aura-2-ebisu-ja";
5117
+ readonly 'deepgram:voice:aura-2-fujin-ja': "deepgram:voice:aura-2-fujin-ja";
5118
+ readonly 'deepgram:voice:aura-2-izanami-ja': "deepgram:voice:aura-2-izanami-ja";
5119
+ readonly 'deepgram:voice:aura-2-uzume-ja': "deepgram:voice:aura-2-uzume-ja";
5120
+ readonly 'xai:voice:eve': "xai:voice:eve";
5121
+ readonly 'xai:voice:ara': "xai:voice:ara";
5122
+ readonly 'xai:voice:rex': "xai:voice:rex";
5123
+ readonly 'xai:voice:sal': "xai:voice:sal";
5124
+ readonly 'xai:voice:leo': "xai:voice:leo";
5125
+ readonly 'xai:voice:altair': "xai:voice:altair";
5126
+ readonly 'xai:voice:atlas': "xai:voice:atlas";
5127
+ readonly 'xai:voice:carina': "xai:voice:carina";
5128
+ readonly 'xai:voice:castor': "xai:voice:castor";
5129
+ readonly 'xai:voice:celeste': "xai:voice:celeste";
5130
+ readonly 'xai:voice:cosmo': "xai:voice:cosmo";
5131
+ readonly 'xai:voice:helios': "xai:voice:helios";
5132
+ readonly 'xai:voice:helix': "xai:voice:helix";
5133
+ readonly 'xai:voice:iris': "xai:voice:iris";
5134
+ readonly 'xai:voice:kepler': "xai:voice:kepler";
5135
+ readonly 'xai:voice:lumen': "xai:voice:lumen";
5136
+ readonly 'xai:voice:luna': "xai:voice:luna";
5137
+ readonly 'xai:voice:lux': "xai:voice:lux";
5138
+ readonly 'xai:voice:naksh': "xai:voice:naksh";
5139
+ readonly 'xai:voice:orion': "xai:voice:orion";
5140
+ readonly 'xai:voice:perseus': "xai:voice:perseus";
5141
+ readonly 'xai:voice:rigel': "xai:voice:rigel";
5142
+ readonly 'xai:voice:sirius': "xai:voice:sirius";
5143
+ readonly 'xai:voice:ursa': "xai:voice:ursa";
5144
+ readonly 'xai:voice:zagan': "xai:voice:zagan";
5145
+ readonly 'xai:voice:zenith': "xai:voice:zenith";
5146
+ };
4960
5147
  /**
4961
- * Explicit "no filter" — matches every row the caller is authorized to see,
4962
- * compiling to SQL TRUE.
5148
+ * xAI's server-VAD block — OpenAI's fields plus ``idle_timeout_ms``.
4963
5149
  *
4964
- * Send this instead of omitting `where` when the filter bar is empty: an
4965
- * omitted predicate lets legacy server-side defaults (e.g. the chats list's
4966
- * implicit `archived == false`) apply invisibly. `and`/`or` need at least one
4967
- * child, so an empty group is not a legal stand-in. It references no field, so
4968
- * it needs no scope and cannot reach a scope-gated column.
5150
+ * xAI documents ``idle_timeout_ms`` as part of its ``turn_detection``
5151
+ * schema; OpenAI's has no such field, so it lives on this subclass rather
5152
+ * than on the shared one. The adapter sends ``turnDetection`` verbatim
5153
+ * (``model_dump(exclude_none=True, by_alias=True)``), so an unset value
5154
+ * never reaches the wire and this class needs no adapter change.
5155
+ *
5156
+ * READ THIS BEFORE SETTING ANY FIELD HERE. A configured ``turnDetection``
5157
+ * REPLACES xAI's default block wholesale — it is not merged with
5158
+ * ``XAIRealtimeSocketManager._build_default_turn_detection()``. Setting
5159
+ * ``idle_timeout_ms`` alone therefore also drops the provider-resolved
5160
+ * ``threshold`` (0.85 for μ-law phone legs resolved to PCM16/24 kHz;
5161
+ * 0.6 for direct G.711/A-law) and ``prefix_padding_ms`` (333) back to this
5162
+ * schema's OpenAI-shaped defaults (0.5 / 300). Carry the values you want
5163
+ * explicitly in the same block.
4969
5164
  */
4970
- interface QueryMatchAll {
4971
- kind: 'all';
4972
- }
4973
- interface QueryCompare<V = QueryValue> {
4974
- kind: 'compare';
4975
- field: string;
4976
- op: QueryComparisonOp;
4977
- value?: V | null;
5165
+ interface XAIServerVADTurnDetection$1 {
5166
+ /** Use server-side voice activity detection */
5167
+ type?: 'server_vad';
5168
+ /** Activation threshold for voice detection (0.0 to 1.0) */
5169
+ threshold?: number | null;
5170
+ /** Milliseconds of audio to include before speech starts */
5171
+ prefix_padding_ms?: number | null;
5172
+ /** Milliseconds of silence before considering speech ended */
5173
+ silence_duration_ms?: number | null;
5174
+ /** Automatically create response when user turn ends */
5175
+ create_response?: boolean | null;
5176
+ /** Allow user to interrupt the response */
5177
+ interrupt_response?: boolean | null;
5178
+ /** How long xAI waits through caller silence before speaking again unprompted. Unset — the default — leaves re-engagement off. There is deliberately NO platform default: whether an agent should break a silence, and after how long, is a per-workflow decision made from eval evidence. xAI CLAMPS THIS UP TO ITS OWN FLOOR: an acceptance spike against grok-voice-think-fast-2.0 sent 3000 and `session.updated` echoed back 5000, so read the echoed session rather than this field when the exact wait matters. A synthetic Grok Voice 3 PCM16/24 kHz probe observed idle audio responses with threshold 0.85 and an 8000 ms timeout; live caller delivery still needs call evidence. On native resume, this also enables one short platform liveness prompt at the configured interval when ordinary handoff turn recovery does not apply. Either side speaking cancels it. */
5179
+ idle_timeout_ms?: number | null;
4978
5180
  }
4979
- interface QueryRecordSelection {
4980
- field: string;
4981
- criterion: 'newest' | 'oldest' | 'highest' | 'lowest' | 'earliest' | 'latest' | 'true' | 'false';
5181
+
5182
+ type OpenAITurnDetectionType = 'semantic_vad' | 'server_vad';
5183
+ type OpenAISemanticVADEagerness = 'low' | 'medium' | 'high' | 'auto';
5184
+ interface OpenAISemanticVADTurnDetection {
5185
+ type?: 'semantic_vad';
5186
+ eagerness?: OpenAISemanticVADEagerness | null;
5187
+ create_response?: boolean | null;
5188
+ interrupt_response?: boolean | null;
4982
5189
  }
4983
- /**
4984
- * Correlated record predicate (#16104): all conditions in `where` must
4985
- * match the SAME DataRecord row.
4986
- *
4987
- * - any → EXISTS(match)
4988
- * - none → NOT EXISTS(match), members with no records DO match
4989
- * - noneWithRecord → NOT EXISTS(match) AND has at least one record
4990
- */
4991
- interface QueryRecordMatch<V = QueryValue> {
4992
- kind: 'recordMatch';
4993
- dataType: number | string;
4994
- mode?: 'any' | 'none' | 'noneWithRecord';
4995
- where?: QueryPredicate<V> | null;
4996
- selection?: QueryRecordSelection | null;
5190
+ interface OpenAIServerVADTurnDetection {
5191
+ type?: 'server_vad';
5192
+ threshold?: number | null;
5193
+ prefix_padding_ms?: number | null;
5194
+ silence_duration_ms?: number | null;
5195
+ create_response?: boolean | null;
5196
+ interrupt_response?: boolean | null;
4997
5197
  }
5198
+ type OpenAITurnDetection = OpenAISemanticVADTurnDetection | OpenAIServerVADTurnDetection;
4998
5199
  /**
4999
- * Correlated EXISTS over a named related-entity relation (the RecordMatch
5000
- * pattern generalized): all conditions in `where` apply to the SAME related
5001
- * row. Relations and their sub-fields come from `QueryFieldsResponse.relations`
5002
- * (e.g. member `workflowEntries` → entry.workflowId / entry.status /
5003
- * entry.enteredAt; `calendarEvents` → event.calendarId / event.typeId /
5004
- * event.startTime).
5200
+ * xAI's server-VAD block: OpenAI's fields plus `idle_timeout_ms`, which xAI
5201
+ * documents and OpenAI has no equivalent for. Mirrors
5202
+ * `lib/voice/realtime_config.py:XAIServerVADTurnDetection`.
5005
5203
  *
5006
- * - any → EXISTS(match)
5007
- * - none → NOT EXISTS(match), members with no related rows DO match
5204
+ * A configured `turnDetection` REPLACES xAI's default block wholesale rather
5205
+ * than merging with it, so setting `idle_timeout_ms` alone also drops the
5206
+ * phone-tuned threshold and prefix padding back to schema defaults.
5008
5207
  */
5009
- interface QueryRelationMatch<V = QueryValue> {
5010
- kind: 'relationMatch';
5011
- relation: string;
5012
- mode?: 'any' | 'none';
5013
- where?: QueryPredicate<V> | null;
5014
- }
5015
- interface QueryAggregatePredicate {
5016
- kind: 'aggregate';
5017
- source: string;
5018
- /** Narrows a parameterized source (e.g. workflowEntries → workflow ids). */
5019
- sourceIds?: number[] | null;
5020
- metric?: 'count' | 'max';
5021
- op: QueryAggregateOp;
5022
- /** metric=max also accepts an ISO datetime string. */
5023
- value: number | string | QueryNowValue | QueryDaysAgoValue | QueryDaysFromNowValue;
5024
- windowDays?: number | null;
5025
- /** Mutually exclusive with windowDays. */
5026
- windowHours?: number | null;
5027
- emptyPolicy?: 'include' | 'exclude';
5028
- }
5029
- interface QuerySubQueryRef<V = QueryValue> {
5030
- kind: 'subquery';
5031
- entity: 'member';
5032
- link: string;
5033
- negate?: boolean;
5034
- where?: QueryPredicate<V> | null;
5035
- }
5036
- interface QuerySavedFilterRef {
5037
- kind: 'savedFilterRef';
5038
- filterType?: 'member';
5039
- filterIds: number[];
5040
- combine?: 'union' | 'intersect';
5208
+ interface XAIServerVADTurnDetection extends OpenAIServerVADTurnDetection {
5209
+ /**
5210
+ * Silence (ms) before xAI speaks again unprompted. Unset means
5211
+ * re-engagement is off; there is deliberately no platform default. xAI
5212
+ * clamps the value up to its own floor, so read back the echoed session
5213
+ * when the exact wait matters.
5214
+ */
5215
+ idle_timeout_ms?: number | null;
5041
5216
  }
5217
+ type ThinkingSound = 'none' | 'typing' | 'strumming' | 'speech';
5218
+ type InterruptionSound = 'none' | 'clav' | 'bells' | 'organ' | 'guzheng';
5219
+ /** Default filler phrases suggested when the user first enables "speech" mode. */
5220
+ declare const DEFAULT_THINKING_SPEECH_PHRASES: readonly string[];
5221
+ type TTSModel = 'native' | 'xai:tts:v1' | 'elevenlabs:tts:eleven_turbo_v2' | 'elevenlabs:tts:eleven_turbo_v2_5' | 'elevenlabs:tts:eleven_multilingual_v2' | 'elevenlabs:tts:eleven_flash_v2_5' | 'elevenlabs:tts:eleven_v4_turbo' | 'openai:tts:tts-1' | 'openai:tts:tts-1-hd' | 'openai:tts:gpt-4o-mini-tts' | 'aws:tts:polly-generative' | 'aws:tts:polly-neural' | 'google:tts:chirp';
5222
+ /** Extract the provider from a TTSModel ID (e.g. "xai:tts:v1" -> "xai"). */
5223
+ declare function getTTSProvider(ttsModel: string | null | undefined): string | null;
5042
5224
  /**
5043
- * A predicate tree. `V` is the type a compare node holds as its value: a
5044
- * {@link QueryValue} for a predicate that can run, which is the default.
5225
+ * Base configuration for all realtime models.
5226
+ * Contains common fields that apply to all realtime model providers.
5045
5227
  */
5046
- type QueryPredicate<V = QueryValue> = QueryAnd<V> | QueryOr<V> | QueryNot<V> | QueryMatchAll | QueryCompare<V> | QueryRecordMatch<V> | QueryRelationMatch<V> | QueryAggregatePredicate | QuerySubQueryRef<V> | QuerySavedFilterRef;
5047
- /** A predicate whose compare values may be parameter markers. */
5048
- type QueryTemplatePredicate = QueryPredicate<QueryTemplateValue>;
5049
- interface QuerySortKey {
5050
- field: string;
5051
- dir?: 'asc' | 'desc';
5052
- }
5053
- interface QueryGroupBy {
5054
- field: string;
5055
- bucket?: 'day' | 'week' | 'month' | null;
5056
- alias?: string | null;
5057
- }
5058
- interface QueryMetric {
5059
- fn: 'count' | 'countDistinct' | 'sum' | 'avg' | 'min' | 'max';
5060
- of?: string | null;
5061
- as?: string;
5062
- }
5063
- interface QueryAggregateSpec {
5064
- groupBy?: QueryGroupBy[];
5065
- metrics: QueryMetric[];
5066
- limit?: number;
5067
- }
5068
- interface QueryIR {
5069
- entity: QueryEntityType;
5070
- dataType?: number | string | null;
5071
- where?: QueryPredicate | null;
5072
- select?: string[] | null;
5073
- sort?: QuerySortKey[] | null;
5074
- limit: number;
5075
- cursor?: string | null;
5076
- aggregate?: QueryAggregateSpec | null;
5077
- includeArchived?: boolean;
5078
- }
5079
- type QueryRunMode = 'rows' | 'count' | 'aggregate';
5080
- interface RunQueryRequest {
5081
- query: QueryIR;
5082
- mode?: QueryRunMode | null;
5083
- }
5084
- interface QueryCostInfo {
5085
- score: number;
5086
- budget: number;
5087
- }
5088
- interface ValidateQueryResponse {
5089
- valid: boolean;
5090
- cost: QueryCostInfo;
5091
- warnings: string[];
5092
- errors: string[];
5093
- }
5094
- interface RunQueryResponse {
5095
- mode: string;
5096
- items?: Record<string, unknown>[] | null;
5097
- nextCursor?: string | null;
5098
- count?: number | null;
5099
- rows?: Record<string, unknown>[] | null;
5100
- warnings: string[];
5101
- cost?: QueryCostInfo | null;
5102
- }
5103
- /** A labeled choice for a field whose raw values are ids/codes. */
5104
- interface QueryEnumOption {
5105
- value: string | number;
5106
- label: string;
5107
- /** Display color (bare 6-digit hex, as stored on MemberLabel), if any. */
5108
- color?: string | null;
5109
- }
5110
- interface QueryFieldInfo {
5111
- path: string;
5112
- type: string;
5113
- operators: string[];
5114
- sortable: boolean;
5115
- selectable: boolean;
5116
- enumValues?: unknown[] | null;
5117
- /**
5118
- * Labeled value options ({value, label}) for fields whose raw values are
5119
- * meaningless to humans (label/role ids). Value stored in the IR is
5120
- * `value`; the UI shows `label`.
5121
- */
5122
- enumOptions?: QueryEnumOption[] | null;
5123
- /** Human picker label when the path tail is misleading (e.g. "labelId"). */
5124
- displayName?: string | null;
5125
- /**
5126
- * Semantic group from the registry (profile/contact/notifications/
5127
- * communications/workflows/calendar) — drives builder palette grouping.
5128
- * Optional for older API versions; null = uncategorized.
5129
- */
5130
- category?: string | null;
5228
+ interface BaseRealtimeModelConfig {
5229
+ /** Sound to play while the agent is processing tool calls. */
5230
+ thinkingSound?: ThinkingSound | null;
5231
+ /** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
5232
+ thinkingSoundVolume?: number | null;
5233
+ /** Initial delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
5234
+ thinkingSoundInitialDelay?: number | null;
5235
+ /** When `thinkingSound` is 'speech', one of these phrases is spoken while the agent runs a tool. Phrases rotate round-robin per session. */
5236
+ thinkingSpeechPhrases?: string[] | null;
5237
+ /** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
5238
+ interruptionSound?: InterruptionSound | null;
5239
+ /** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
5240
+ interruptionSoundVolume?: number | null;
5241
+ /** TTS model ID in provider:tts:model format (e.g. 'xai:tts:v1'), or 'native'. */
5242
+ ttsModel?: TTSModel | null;
5243
+ /** Canonical voice identifier (e.g., xai:voice:lux) that selects the specific agent voice. */
5244
+ voiceModel?: string | null;
5131
5245
  /**
5132
- * `memberField.<key>` only: every owner of the key (customer Field,
5133
- * Synced field, Connection ID), for display. The option still matches
5134
- * any owner's value. Absent elsewhere and from older API versions.
5246
+ * Settings belonging to the voice architecture that is NOT currently
5247
+ * selected, parked so switching between the composable stack and a native
5248
+ * speech-to-speech model is lossless and reversible.
5249
+ *
5250
+ * Declared on the base because the native schemas set `extra="forbid"`
5251
+ * server-side: an undeclared key would be rejected on save. Written and
5252
+ * read only by the switch itself (`reconcile_realtime_model_config` on the
5253
+ * server, `parkComposableConfig` / `restoreComposableConfig` in the
5254
+ * editor). Nothing at call time reads it — it is a holding area, never
5255
+ * live configuration.
5135
5256
  */
5136
- memberFieldSources?: MemberFieldSourceResponse[] | null;
5257
+ inactiveConfig?: Record<string, unknown> | null;
5137
5258
  }
5138
- interface QueryRecordFieldInfo {
5139
- slug: string;
5140
- name: string;
5141
- /** The Query Engine's kind: `text`, `number`, `boolean`, `datetime`, `enum`. */
5142
- type: string;
5143
- /** Whether the field can split a record Metric's series; the server decides. */
5144
- groupable: boolean;
5145
- operators: string[];
5146
- enumValues?: unknown[] | null;
5259
+ /**
5260
+ * Native realtime providers always use the model's built-in audio. The
5261
+ * backend Pydantic schemas now enforce `ttsModel: "native"` and reject
5262
+ * external `sttModel`. Mirroring that contract on the client surface
5263
+ * keeps the editor in sync — see `useVoiceConfig.buildSubmitConfig`.
5264
+ */
5265
+ interface OpenAIRealtimeModelConfig extends BaseRealtimeModelConfig {
5266
+ ttsModel?: 'native' | null;
5267
+ turnDetection?: OpenAITurnDetection | null;
5147
5268
  }
5148
- interface QueryDataTypeInfo {
5149
- id: number;
5150
- slug: string;
5151
- name: string;
5152
- isCollection: boolean;
5153
- recordFields: QueryRecordFieldInfo[];
5269
+ interface CustomRealtimeModelConfig extends BaseRealtimeModelConfig {
5270
+ sttModel?: string | null;
5271
+ sttConfig?: Record<string, unknown> | null;
5272
+ inferenceModel: string;
5273
+ inferenceModelConfig?: ChatModelConfig | null;
5154
5274
  }
5155
- interface QueryFieldsResponse {
5156
- entities: Record<string, QueryFieldInfo[]>;
5157
- aggregateSources: Record<string, string[]>;
5158
- dataTypes: QueryDataTypeInfo[];
5159
- recordSystemFields: QueryFieldInfo[];
5160
- /**
5161
- * RelationMatch palette: entity → relation name → the relation's
5162
- * queryable sub-fields (e.g. member.workflowEntries → entry.workflowId,
5163
- * entry.status, entry.enteredAt). Same raw-ID hiding convention as
5164
- * `entities`. Optional for older API versions.
5165
- */
5166
- relations?: Record<string, Record<string, QueryFieldInfo[]>>;
5167
- /**
5168
- * entity → aggregate source → semantic category. Only categorized sources
5169
- * appear; uncategorized sources are internal (legacy-adapter parity) and
5170
- * should not be offered in builder palettes. Optional for older API
5171
- * versions.
5172
- */
5173
- aggregateSourceCategories?: Record<string, Record<string, string>>;
5275
+ /**
5276
+ * xAI Voice Agent realtime config. Only `server_vad` is supported, so
5277
+ * the server-side schema rejects `semantic_vad`. Mirrors
5278
+ * `lib/voice/realtime_config.py:XAIRealtimeModelConfig`.
5279
+ */
5280
+ interface XAIRealtimeModelConfig extends BaseRealtimeModelConfig {
5281
+ ttsModel?: 'native' | null;
5282
+ turnDetection?: XAIServerVADTurnDetection | null;
5283
+ keyterms?: XAIRealtimeModelConfig$1['keyterms'];
5284
+ languageHint?: XAIRealtimeModelConfig$1['languageHint'];
5285
+ reasoningEffort?: XAIRealtimeModelConfig$1['reasoningEffort'];
5286
+ }
5287
+ /**
5288
+ * xAI Grok Voice background reasoning ("high" | "none"). Narrower than the
5289
+ * chat-model `XAIReasoningEffort`.
5290
+ */
5291
+ type XAIRealtimeReasoningEffort = NonNullable<XAIRealtimeModelConfig$1['reasoningEffort']>;
5292
+ type RealtimeModelConfig = OpenAIRealtimeModelConfig | CustomRealtimeModelConfig | XAIRealtimeModelConfig;
5293
+ type GeminiThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
5294
+ /**
5295
+ * OpenAI GPT-5 reasoning effort. The ACCEPTED SUBSET IS MODEL-DEPENDENT — sending
5296
+ * an out-of-set value is a hard 400 at the API. Mirror of the per-family vocab in
5297
+ * lib/ai/chat_model_config.py (see getOpenAIReasoningEfforts):
5298
+ * gpt-5 (5.0): minimal / low / medium / high
5299
+ * gpt-5.1: none / low / medium / high
5300
+ * gpt-5.4: none / low / medium / high / xhigh
5301
+ * gpt-6.1-sol: low / medium / high / xhigh
5302
+ * This union is the superset; the UI filters it down per selected model.
5303
+ */
5304
+ type OpenAIReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
5305
+ /**
5306
+ * xAI (Grok) reasoning levels. Note "none" disables reasoning entirely
5307
+ * (used by Grok 4.3 to switch into non-reasoning mode). Grok 4.6 and 4.7
5308
+ * accept "xhigh" but not "none". xAI does NOT accept OpenAI's "minimal".
5309
+ * https://docs.x.ai/developers/model-capabilities/text/reasoning#effort-levels
5310
+ */
5311
+ type XAIReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh';
5312
+ /**
5313
+ * Claude 5.5 adaptive-thinking effort. These models take effort as their only
5314
+ * thinking control — they reject `thinkingEnabled` / `thinkingBudgetTokens`.
5315
+ * Mirror of `ClaudeChatConfig.reasoningEffort` in lib/ai/chat_model_config.py.
5316
+ */
5317
+ type ClaudeReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
5318
+ /**
5319
+ * Base configuration for all chat models.
5320
+ * Can be extended for provider-specific options.
5321
+ */
5322
+ interface BaseChatModelConfig {
5323
+ }
5324
+ interface GeminiChatModelConfig extends BaseChatModelConfig {
5325
+ thinkingLevel?: GeminiThinkingLevel | null;
5326
+ includeThoughts?: boolean | null;
5174
5327
  }
5328
+ interface ClaudeChatModelConfig extends BaseChatModelConfig {
5329
+ thinkingEnabled?: boolean | null;
5330
+ thinkingBudgetTokens?: number | null;
5331
+ /** Claude 5.5 only; Claude Haiku 4.5 uses thinkingEnabled instead. */
5332
+ reasoningEffort?: ClaudeReasoningEffort | null;
5333
+ }
5334
+ interface OpenAIChatModelConfig extends BaseChatModelConfig {
5335
+ provider: 'openai';
5336
+ reasoningEffort?: OpenAIReasoningEffort | null;
5337
+ }
5338
+ interface XAIChatModelConfig extends BaseChatModelConfig {
5339
+ provider: 'xai';
5340
+ reasoningEffort?: XAIReasoningEffort | null;
5341
+ }
5342
+ type ChatModelConfig = GeminiChatModelConfig | ClaudeChatModelConfig | OpenAIChatModelConfig | XAIChatModelConfig;
5343
+ /**
5344
+ * Supported TTS preview providers.
5345
+ * These are the voice providers that support TTS preview in the UI.
5346
+ */
5347
+ declare const TTS_PREVIEW_PROVIDERS: readonly ["openai", "elevenlabs", "google", "aws", "deepgram", "xai"];
5348
+ type TTSPreviewProvider = (typeof TTS_PREVIEW_PROVIDERS)[number];
5349
+ /**
5350
+ * Get the canonical voice model ID from a realtime model config.
5351
+ *
5352
+ * Voice model IDs follow the format: `{provider}:voice:{voiceName}`
5353
+ * Examples:
5354
+ * - `openai:voice:ash`
5355
+ * - `xai:voice:lux`
5356
+ * - `elevenlabs:voice:seamus`
5357
+ * - `google:voice:puck`
5358
+ *
5359
+ * @param entity - An object with optional realtimeModelConfig
5360
+ * @returns The canonical voice model ID, or null if no voice is configured
5361
+ */
5362
+ declare function getVoiceModelId(entity: {
5363
+ realtimeModelConfig?: RealtimeModelConfig | null;
5364
+ }): string | null;
5365
+ /**
5366
+ * Check if an entity's voice can be previewed.
5367
+ *
5368
+ * @param entity - An object with optional realtimeModelConfig
5369
+ * @returns True if the entity's voice supports TTS preview
5370
+ */
5371
+ declare function canPreviewVoice(entity: {
5372
+ realtimeModelConfig?: RealtimeModelConfig | null;
5373
+ }): boolean;
5175
5374
 
5176
5375
  declare enum MemberType {
5177
5376
  ANONYMOUS = "anonymous",
5178
5377
  TEST = "test",
5179
5378
  MEMBER = "member",
5180
- AGENT = "agent"
5379
+ AGENT = "agent",
5380
+ BUSINESS = "business"
5181
5381
  }
5182
5382
  /**
5183
5383
  * How the streaming commit import treats a row that matches an existing member
@@ -5186,15 +5386,60 @@ declare enum MemberType {
5186
5386
  * and is intended to be sent only after a preview.
5187
5387
  */
5188
5388
  type IdentityConflictPolicy = 'skip' | 'overwrite_identity_fields';
5389
+ /** An operator's answer to "is this row the same person as the earlier row with this contact?" */
5390
+ type MemberImportIdentityAnswer = 'same_person' | 'different_person';
5391
+ /**
5392
+ * Per-contact-field identity answers for one row. A field left out stays
5393
+ * conflicted: the server never reads silence as an answer.
5394
+ */
5395
+ interface MemberImportIdentityAnswers {
5396
+ readonly email?: MemberImportIdentityAnswer;
5397
+ readonly phone?: MemberImportIdentityAnswer;
5398
+ }
5399
+ /**
5400
+ * Corrected contact values for a `replace_values` decision. Set at least one;
5401
+ * the server validates and normalizes them. PHI: never log or print these.
5402
+ */
5403
+ interface MemberImportReplacementValues {
5404
+ readonly email?: string;
5405
+ readonly phone?: string;
5406
+ }
5407
+ /**
5408
+ * One operator decision about one previewed CSV row — the multipart
5409
+ * `resolutions` entry both `/members/import/preview` and the commit routes
5410
+ * accept (`MemberImportRowResolution` in the backend request models).
5411
+ *
5412
+ * `row` is the uploaded CSV's row number (the header is row 1, data starts at
5413
+ * 2). A row carries a contact decision (`resolution`), an identity answer
5414
+ * (`identity`), or both; `values` is required for `replace_values` and refused
5415
+ * otherwise. TypeScript cannot validate untrusted JSON: callers reading
5416
+ * decisions from a file still check them at runtime, and the server remains
5417
+ * authoritative.
5418
+ */
5419
+ type MemberImportRowResolution = {
5420
+ readonly row: number;
5421
+ readonly resolution: 'keep_account' | 'skip';
5422
+ readonly values?: never;
5423
+ readonly identity?: MemberImportIdentityAnswers;
5424
+ } | {
5425
+ readonly row: number;
5426
+ readonly resolution: 'replace_values';
5427
+ readonly values: MemberImportReplacementValues;
5428
+ readonly identity?: MemberImportIdentityAnswers;
5429
+ } | {
5430
+ readonly row: number;
5431
+ readonly resolution?: never;
5432
+ readonly values?: never;
5433
+ readonly identity: MemberImportIdentityAnswers;
5434
+ };
5189
5435
  /** Multipart CSV options shared by preview and commit. */
5190
5436
  interface MemberImportOptions {
5191
5437
  /** Opaque saved preview handle; commit reuses these automatic identity decisions. */
5192
5438
  previewPlanToken?: string;
5193
- /** Server-validated per-row decisions from an operator's preview review.
5194
- * The server owns the decision schema, including identity decisions on
5195
- * deployments that support them. Do not log replacement contact values.
5439
+ /** Per-row decisions from an operator's preview review. Send the same
5440
+ * decisions to preview and commit. Do not log replacement contact values.
5196
5441
  */
5197
- resolutions?: ReadonlyArray<Readonly<Record<string, unknown>>>;
5442
+ resolutions?: ReadonlyArray<MemberImportRowResolution>;
5198
5443
  /** Promote unique contacts when no primary exists (mobile first). Default true. */
5199
5444
  autoPromoteUniqueContacts?: boolean;
5200
5445
  /** Commit only: explicit approval to overwrite a phone-only match's identity. Default skip. */
@@ -5260,6 +5505,39 @@ interface MemberImportStreamEvent {
5260
5505
  changes: string[];
5261
5506
  }>;
5262
5507
  }
5508
+ /**
5509
+ * One SSE event from the durable import route. Every payload is the server's
5510
+ * PHI-free run vocabulary: counts, statuses, closed reason codes and surrogate
5511
+ * ids. `import_run` is the run's latest snapshot; `done` carries the run id
5512
+ * only — the last `import_run` is the summary.
5513
+ */
5514
+ type MemberImportRunEvent = ({
5515
+ type: 'import_run';
5516
+ } & MemberImportRunSummaryResponse) | ({
5517
+ type: 'import_item';
5518
+ runId: string;
5519
+ } & MemberImportRunItemResponse) | {
5520
+ type: 'done';
5521
+ runId: string;
5522
+ };
5523
+ /**
5524
+ * What `startMemberImportRun` observed of the progress stream — not whether
5525
+ * the import succeeded. `complete` means a `done` event for the run arrived;
5526
+ * read `latestRun.status` and its counters for the outcome. `incomplete` means
5527
+ * the stream ended, failed or carried an unreadable event first: the run, if
5528
+ * `runId` is set, keeps going server-side and the history routes are the
5529
+ * record. A `null` runId on an accepted request is an unknown outcome, not
5530
+ * proof that nothing started. Never resubmit the upload because of either.
5531
+ */
5532
+ interface MemberImportRunStartResult {
5533
+ streamStatus: 'complete' | 'incomplete';
5534
+ runId: string | null;
5535
+ latestRun: MemberImportRunSummaryResponse | null;
5536
+ }
5537
+ /** Bounded history reads; the server applies its own default and maximum. */
5538
+ interface MemberImportRunListOptions {
5539
+ limit?: number;
5540
+ }
5263
5541
  interface MemberLabelFormData {
5264
5542
  name: string;
5265
5543
  slug?: string;
@@ -5482,6 +5760,10 @@ interface CreateWorkspaceMemberRequest {
5482
5760
  accountEnabled?: boolean;
5483
5761
  isOrgOwner?: boolean;
5484
5762
  accountTosAccepted?: boolean;
5763
+ /**
5764
+ * `'business'` creates a Business: requires `name` and `phone`, accepts
5765
+ * `email`, `externalId` and `description`, and needs `members:admin`.
5766
+ */
5485
5767
  memberType?: MemberType;
5486
5768
  }
5487
5769
  interface UpdateWorkspaceMemberRequest {
@@ -5600,8 +5882,13 @@ interface UpdateAgentRequest {
5600
5882
  chatModelId?: string;
5601
5883
  /** `null` clears the stored config — see CreateAgentRequest. */
5602
5884
  chatModelConfig?: ChatModelConfig | null;
5603
- realtimeModelId?: string;
5604
- realtimeModelConfig?: Record<string, unknown>;
5885
+ /** `null` turns the Agent's voice off; an omitted key leaves the stored
5886
+ * model alone (`exclude_unset=True` server-side). */
5887
+ realtimeModelId?: string | null;
5888
+ /** `null` is reconciled back to the defaults for the current realtime
5889
+ * model, so it clears the stored config only when `realtimeModelId` is
5890
+ * also `null`; an omitted key leaves the stored config alone. */
5891
+ realtimeModelConfig?: Record<string, unknown> | null;
5605
5892
  systemPrompt?: string;
5606
5893
  maxDailyActions?: number;
5607
5894
  tools?: string[];
@@ -5638,54 +5925,6 @@ interface MemberSyncLink {
5638
5925
  createdAt: string;
5639
5926
  }
5640
5927
 
5641
- /**
5642
- * Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
5643
- * (group map from emit_openapi.py). Do not edit manually.
5644
- * Group: data_record_filter
5645
- */
5646
- /**
5647
- * Create a new data record filter (query-only, scoped to one DataType).
5648
- */
5649
- interface CreateDataRecordFilterRequest {
5650
- dataTypeId: number;
5651
- name: string;
5652
- description?: string | null;
5653
- pinned?: boolean | null;
5654
- query?: CreateDataRecordFilterRequestQuery;
5655
- }
5656
- type CreateDataRecordFilterRequestQuery = {
5657
- [key: string]: unknown;
5658
- } | null;
5659
- /**
5660
- * Response model for a data record filter.
5661
- */
5662
- interface DataRecordFilterResponse {
5663
- id: number;
5664
- uuid: string;
5665
- dataTypeId: number;
5666
- name: string;
5667
- description?: string | null;
5668
- pinned?: boolean | null;
5669
- createdAt: string;
5670
- updatedAt: string;
5671
- query?: DataRecordFilterResponseQuery;
5672
- }
5673
- type DataRecordFilterResponseQuery = {
5674
- [key: string]: unknown;
5675
- } | null;
5676
- /**
5677
- * Update a data record filter (query-only).
5678
- */
5679
- interface UpdateDataRecordFilterRequest {
5680
- name?: string | null;
5681
- description?: string | null;
5682
- pinned?: boolean | null;
5683
- query?: UpdateDataRecordFilterRequestQuery;
5684
- }
5685
- type UpdateDataRecordFilterRequestQuery = {
5686
- [key: string]: unknown;
5687
- } | null;
5688
-
5689
5928
  /** DataRecordFilter with the query-engine predicate column narrowed to IR. */
5690
5929
  type DataRecordFilterWithQuery = DataRecordFilterResponse & {
5691
5930
  query?: QueryPredicate | null;
@@ -5809,7 +6048,8 @@ interface DataTypeFormData {
5809
6048
  * explicitly by a person. Omitted means "leave the stored value alone".
5810
6049
  */
5811
6050
  webhookEventsEnabled?: boolean;
5812
- ownerId?: number | null;
6051
+ /** Reassigns the recorded creator. The API refuses `null`. */
6052
+ ownerId?: number;
5813
6053
  /**
5814
6054
  * Inline Actions. The same flat list ``DataType.eventRules`` returns, so a
5815
6055
  * form round-trips one shape. (``createRules``/``updateRules`` used to sit
@@ -6054,6 +6294,7 @@ declare const CreateInquirySchema: z.ZodObject<{
6054
6294
  demo_request: "demo_request";
6055
6295
  waitlist: "waitlist";
6056
6296
  whitepaper: "whitepaper";
6297
+ slack_teams: "slack_teams";
6057
6298
  }>;
6058
6299
  cellNumber: z.ZodOptional<z.ZodString>;
6059
6300
  businessNumber: z.ZodOptional<z.ZodString>;
@@ -6089,6 +6330,7 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6089
6330
  demo_request: "demo_request";
6090
6331
  waitlist: "waitlist";
6091
6332
  whitepaper: "whitepaper";
6333
+ slack_teams: "slack_teams";
6092
6334
  }>;
6093
6335
  cellNumber: z.ZodOptional<z.ZodString>;
6094
6336
  businessNumber: z.ZodOptional<z.ZodString>;
@@ -6115,7 +6357,13 @@ declare const AnonymousInquiryFormSchema: z.ZodObject<{
6115
6357
  declare const ListInquiriesSchema: z.ZodObject<{
6116
6358
  page: z.ZodOptional<z.ZodNumber>;
6117
6359
  pageSize: z.ZodOptional<z.ZodNumber>;
6118
- inquiryType: z.ZodOptional<z.ZodString>;
6360
+ inquiryType: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
6361
+ statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6362
+ new: "new";
6363
+ in_progress: "in_progress";
6364
+ done: "done";
6365
+ spam: "spam";
6366
+ }>>>;
6119
6367
  }, z.core.$strip>;
6120
6368
  declare const GetInquirySchema: z.ZodObject<{
6121
6369
  inquiryId: z.ZodNumber;
@@ -6134,6 +6382,7 @@ declare const UpdateInquiryRequestSchema: z.ZodObject<{
6134
6382
  new: "new";
6135
6383
  in_progress: "in_progress";
6136
6384
  done: "done";
6385
+ spam: "spam";
6137
6386
  }>>;
6138
6387
  }, z.core.$strip>;
6139
6388
  declare const UpdateInquirySchema: z.ZodObject<{
@@ -6143,6 +6392,7 @@ declare const UpdateInquirySchema: z.ZodObject<{
6143
6392
  new: "new";
6144
6393
  in_progress: "in_progress";
6145
6394
  done: "done";
6395
+ spam: "spam";
6146
6396
  }>>>;
6147
6397
  }, z.core.$strip>;
6148
6398
  declare const DeleteInquirySchema: z.ZodObject<{
@@ -6188,6 +6438,8 @@ declare const ChatTaskConfigurationPatchSchema: z.ZodObject<{
6188
6438
  fill: z.ZodOptional<z.ZodEnum<{
6189
6439
  asked: "asked";
6190
6440
  inferred: "inferred";
6441
+ ask: "ask";
6442
+ collect: "collect";
6191
6443
  }>>;
6192
6444
  required: z.ZodOptional<z.ZodBoolean>;
6193
6445
  exits: z.ZodOptional<z.ZodBoolean>;
@@ -6200,7 +6452,12 @@ declare const ChatTaskConfigurationPatchSchema: z.ZodObject<{
6200
6452
  write: z.ZodOptional<z.ZodBoolean>;
6201
6453
  validate: z.ZodOptional<z.ZodBoolean>;
6202
6454
  }, z.core.$strip>>;
6203
- fill: z.ZodOptional<z.ZodLiteral<"asked">>;
6455
+ fill: z.ZodOptional<z.ZodEnum<{
6456
+ asked: "asked";
6457
+ inferred: "inferred";
6458
+ ask: "ask";
6459
+ collect: "collect";
6460
+ }>>;
6204
6461
  required: z.ZodOptional<z.ZodBoolean>;
6205
6462
  }, z.core.$strip>], "source">>>>;
6206
6463
  readBack: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -6312,6 +6569,13 @@ declare const CreateTaskSchema: z.ZodObject<{
6312
6569
  declare const UpdateTaskSchema: z.ZodObject<{
6313
6570
  wid: z.ZodString;
6314
6571
  taskId: z.ZodNumber;
6572
+ abilities: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
6573
+ uuid: z.ZodString;
6574
+ abilityType: z.ZodString;
6575
+ config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6576
+ enabled: z.ZodOptional<z.ZodBoolean>;
6577
+ celCondition: z.ZodOptional<z.ZodString>;
6578
+ }, z.core.$strip>>>>;
6315
6579
  name: z.ZodOptional<z.ZodString>;
6316
6580
  description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
6317
6581
  taskType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
@@ -6331,13 +6595,6 @@ declare const UpdateTaskSchema: z.ZodObject<{
6331
6595
  }, z.core.$strip>>>>;
6332
6596
  workflowId: z.ZodOptional<z.ZodNumber>;
6333
6597
  celGuard: z.ZodOptional<z.ZodOptional<z.ZodString>>;
6334
- abilities: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
6335
- uuid: z.ZodString;
6336
- abilityType: z.ZodString;
6337
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
6338
- enabled: z.ZodOptional<z.ZodBoolean>;
6339
- celCondition: z.ZodOptional<z.ZodString>;
6340
- }, z.core.$strip>>>>;
6341
6598
  configurationPatch: z.ZodOptional<z.ZodObject<{
6342
6599
  data: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6343
6600
  source: z.ZodLiteral<"task">;
@@ -6371,6 +6628,8 @@ declare const UpdateTaskSchema: z.ZodObject<{
6371
6628
  fill: z.ZodOptional<z.ZodEnum<{
6372
6629
  asked: "asked";
6373
6630
  inferred: "inferred";
6631
+ ask: "ask";
6632
+ collect: "collect";
6374
6633
  }>>;
6375
6634
  required: z.ZodOptional<z.ZodBoolean>;
6376
6635
  exits: z.ZodOptional<z.ZodBoolean>;
@@ -6383,7 +6642,12 @@ declare const UpdateTaskSchema: z.ZodObject<{
6383
6642
  write: z.ZodOptional<z.ZodBoolean>;
6384
6643
  validate: z.ZodOptional<z.ZodBoolean>;
6385
6644
  }, z.core.$strip>>;
6386
- fill: z.ZodOptional<z.ZodLiteral<"asked">>;
6645
+ fill: z.ZodOptional<z.ZodEnum<{
6646
+ asked: "asked";
6647
+ inferred: "inferred";
6648
+ ask: "ask";
6649
+ collect: "collect";
6650
+ }>>;
6387
6651
  required: z.ZodOptional<z.ZodBoolean>;
6388
6652
  }, z.core.$strip>], "source">>>>;
6389
6653
  readBack: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
@@ -6412,5 +6676,5 @@ type DeleteTaskInput = z.infer<typeof DeleteTaskSchema>;
6412
6676
  type ArchiveTaskInput = z.infer<typeof ArchiveTaskSchema>;
6413
6677
  type UnarchiveTaskInput = z.infer<typeof UnarchiveTaskSchema>;
6414
6678
 
6415
- export { AccessLevel as A, AttendeeResponseStatus as C, EventRuleEventType as E, AttendeeStatus as F, BulkMemberResultStatus as X, BusinessIndustry as Z, EventRuleActionType as a, BusinessType as a1, CalendarEventStatus as a6, DEFAULT_THINKING_SPEECH_PHRASES as aQ, DataCategory as aR, CalendarPermissionType as ab, CalendarScheduleAvailabilityType as ae, CalendarScheduleRecurrence as ag, CalendarSource as ai, DataFieldType as b, DataRecordRetirementResponseReason as b0, DataSensitivity as b4, DataTypeRecordScope as b8, ImportContactConflictField as bQ, IndexStatus as bR, JobPosition as bV, EmailDnsRecordType as bf, EventRuleObjectType as bq, MASKED_SECRET_SENTINEL as c3, MemberType as cK, MemberImportIssueCode as ck, MemberImportMatchInfoMatchType as cm, MemberImportPreviewRowAction as cq, OIDCAdminConfigViewProviderType as d1, PERMISSION_ADMIN as dh, PERMISSION_CREATE as di, PERMISSION_DELETE as dj, PERMISSION_EDIT as dk, PERMISSION_GEOLOCATE as dl, PERMISSION_LIST as dm, PERMISSION_LIST_ALL as dn, PERMISSION_NONE as dp, PERMISSION_USE as dq, PERMISSION_VERIFY as dr, QUERY_VALUELESS_OPS as dz, TTS_PREVIEW_PROVIDERS as e$, Scope as eH, SiteDnsRecordType as eQ, Region as ed, RegistrationIdentifier as ee, archivedMemberConflictId as fA, asIdentifiedMemberContactConflict as fB, canPreviewVoice as fC, decodePermissions as fD, encodePermissions as fE, eventRuleActionParams as fF, getTTSProvider as fG, getVoiceModelId as fH, isAccountContactConflict as fI, isIdentifiedMemberContactConflict as fJ, isMemberContactConflict as fK, DeclaredDataUse as fL, SessionKind as g8, ChildTaskFormDataSchema as gA, CreateTaskSchema as gD, DeleteInquirySchema as gF, DeleteTaskSchema as gH, EnrichInquirySchema as gJ, GetInquirySchema as gL, GetTaskSchema as gN, ListInquiriesSchema as gP, ListTasksSchema as gR, OutcomeTaskRoutingSchema as gS, TaskFormDataSchema as gU, UnarchiveTaskSchema as gW, UpdateInquirySchema as gY, UpdateTaskSchema as g_, EventRuleEventType$1 as gh, CreateInquirySchema as gl, UpdateInquiryRequestSchema as gm, AbilityDataSchema as gu, AnonymousInquiryFormSchema as gv, ArchiveTaskSchema as gx, ChatTaskConfigurationPatchSchema as gy };
6416
- export type { BusinessProfileCancelResponse as $, AttendeeResponse as B, DataRecordResponse as D, AuthorizedRep as G, AvailabilityCheck as H, AvailabilityResponse as I, AvailableSlotsRequest as J, AvailableSlotsResponse as K, BaseChatModelConfig as L, BaseRealtimeModelConfig as M, BotSortField as N, BulkCreateDataRecordRequest as O, BulkCreateDataRecordResponse as P, QueryPredicate as Q, BulkCreateMembersRequest as R, SchemaField as S, BulkCreateMembersResponse as T, BulkMemberItem as U, BulkMemberResult as V, WorkspaceMemberResponse as W, BulkRecordResult as Y, BusinessInfo as _, DataRecordRetirementResponse as a$, BusinessProfileSubmitResponse as a0, Calendar as a2, EventResponse as a3, CalendarEventFormData as a4, CalendarEventSortField as a5, EventTypeResponse as a7, CalendarEventTypeFormData as a8, CalendarEventsQueryParams as a9, CreateCredentialChangeInviteRequest as aA, CreateDataRecordFilterRequest as aB, CreateOrganizationRequest as aC, CreateRoutineRequest as aD, CreateSignupResponse as aE, CreateWorkspaceMemberRequest as aF, CredentialChangeInviteConfirmResponse as aG, CredentialChangeInviteDetailsResponse as aH, CredentialChangeInviteResponse as aI, CredentialChangeRequestResponse as aJ, CredentialChangeVerifyResponse as aK, CredentialType as aL, CurrentMemberResponse as aM, CurrentOrgMember as aN, CursorPaginatedResponse as aO, CustomRealtimeModelConfig as aP, DataField as aS, DataIntegrityReportItem as aT, DataRecordAssociationFormData as aU, DataRecordFieldWarning as aV, DataRecordFilterResponse as aW, DataRecordFilterFormData as aX, DataRecordFilterWithQuery as aY, DataRecordFormData as aZ, DataRecordReportItem as a_, CalendarFormData as aa, CalendarResponse as ac, CalendarSchedule as ad, CalendarScheduleFormData as af, CalendarScheduleResponse as ah, CancelCredentialChangeInviteResponse as aj, CancelCredentialChangeResponse as ak, CapabilityRequirementFinding as al, CapabilityStatus as am, ChatContinueActionParams as an, ChatCreateActionParams as ao, ChatModelConfig as ap, ChatPauseActionParams as aq, ChatSortField as ar, ChatSummarizeActionParams as as, ClaudeChatModelConfig as at, ClaudeReasoningEffort as au, ConcludeAssignmentActionParams as av, CreateAccountOrgMembershipRequest as aw, CreateAccountOrgMembershipResponse as ax, CreateAgentRequest as ay, CreateAnonymousMemberRequest as az, LoginRequest as b$, DataRecordUpdateResponse as b1, DataRecordWithAccessMode as b2, DataRecordsPaginatedResponse as b3, DataTypeResponse as b5, DataTypeExportItem as b6, DataTypeFormData as b7, DataTypeSortField as b9, GeminiThinkingLevel as bA, GenerateRecoveryCodesRequest as bB, BusinessProfileResponse as bC, CalendarResponse$1 as bD, CalendarScheduleResponse$1 as bE, OrgDomainResponse as bF, OwnershipDnsRecord as bG, GoogleCalendarInfo as bH, GoogleCalendarInsufficientScopesResponse as bI, GoogleCalendarStatusResponse as bJ, ICalFeedGrantSummary as bK, ICalFeedTokenResponse as bL, ICalFeedUrlResponse as bM, IdentifiedMemberContactConflict as bN, IdentityConflictPolicy as bO, ImportContactConflict as bP, IndexStatusResponse as bS, InterruptionSound as bT, InvokeCustomToolActionParams as bU, JourneyEnrollActionParams as bW, JourneySortField as bX, LibModelsGlbResponsesOrganizationResponsesSSOConfigResponse as bY, LinkCalendarRequest as bZ, LinkCalendarResponse as b_, DeleteAccountOrgMembershipResponse as ba, DetailedAccount as bb, DuplicateAccountInfo as bc, EcwRefreshMemberEncountersActionParams as bd, EmailDisableImpactResponse as be, EmailDomainConfigResponse as bg, EmailSendActionParams as bh, EmailVerificationResponse as bi, EnumOption as bj, ErrorResponse as bk, EventActionMapping as bl, EventActionMappingsResponse as bm, EventRule as bn, EventRuleExportItem as bo, EventRuleFormData as bp, EventRuleResponse as br, EventRunSortField as bs, ExpireAnonymousMemberRequest as bt, ExternalAttendeeData as bu, FileSortField as bv, FormFieldUpdateActionParams as bw, FormFieldUpdateAssignment as bx, GeminiChatModelConfig as by, GeminiRealtimeModelConfig as bz, EventRuleInput as c, NormalizeMemberResponse as c$, LoginResponse as c0, LogoUploadRequest as c1, LogoUploadResponse as c2, McpServerSortField as c4, MemberContactConflict as c5, MemberContactField as c6, MemberCredentialResponse as c7, MemberFieldResponse as c8, MemberFieldDefinitionResponse as c9, MemberOrgView as cA, MemberReportItem as cB, MemberRoleResponse as cC, MemberRoleFileAccessResponse as cD, MemberRoleFolderAccessResponse as cE, MemberRoleFormData as cF, MemberRoleTaskAccess as cG, MemberSortField as cH, MemberSummary as cI, MemberSyncLink as cJ, MemberUpsertActionParams as cL, MemberUpsertBehavior as cM, MemberWorkspaceInfo as cN, MembersQueryParams as cO, MergeMembersRequest as cP, MergeMembersResponse as cQ, MessageValidationActionParams as cR, MissingMembershipItem as cS, MondayColumnMapping as cT, MondayLookupType as cU, MondayRefreshActionParams as cV, MondayRefreshColumnMapping as cW, MondayUpsertItemActionParams as cX, MondayUpsertMode as cY, MultiMatchBehavior as cZ, NormalizeMemberRequest as c_, MemberFieldDefinitionListResponse as ca, MemberFieldListResponse as cb, MemberFieldSourceResponse as cc, MemberFilterResponse as cd, MemberFilterFormData as ce, MemberFilterWithQuery as cf, MemberFormData as cg, MemberImportConflictInfo as ch, MemberImportIdentitySnapshot as ci, MemberImportIssue as cj, MemberImportMatchInfo as cl, MemberImportOptions as cn, MemberImportPreviewResponse as co, MemberImportPreviewRow as cp, MemberImportPreviewSummary as cr, MemberImportRunItemResponse as cs, MemberImportRunSummaryResponse as ct, MemberImportStreamConflict as cu, MemberImportStreamEvent as cv, MemberLabelResponse as cw, MemberLabelActionParams as cx, MemberLabelFormData as cy, MemberMessageActivity as cz, AccountResponse as d, QueryRecordMatch as d$, OIDCAdminConfigView as d0, ObjectPermission as d2, ObjectPermissionFlags as d3, OpenAIChatModelConfig as d4, OpenAIRealtimeModelConfig as d5, OpenAIReasoningEffort as d6, OpenAISemanticVADEagerness as d7, OpenAISemanticVADTurnDetection as d8, OpenAIServerVADTurnDetection as d9, QualificationSortField as dA, QueryAggregateOp as dB, QueryAggregatePredicate as dC, QueryAggregateSpec as dD, QueryAnd as dE, QueryCompare as dF, QueryComparisonOp as dG, QueryCostInfo as dH, QueryDataTypeInfo as dI, QueryDayBoundaryValue as dJ, QueryDaysAgoValue as dK, QueryDaysFromNowValue as dL, QueryEntityType as dM, QueryEnumOption as dN, QueryFieldInfo as dO, QueryFieldsResponse as dP, QueryGroupBy as dQ, QueryIR as dR, QueryMatchAll as dS, QueryMetric as dT, QueryNot as dU, QueryNowValue as dV, QueryOr as dW, QueryParameterRef as dX, QueryRangeBound as dY, QueryRangeValue as dZ, QueryRecordFieldInfo as d_, OpenAITurnDetection as da, OpenAITurnDetectionType as db, OrgMember as dc, OrgMemberListResponse as dd, OrgMemberRole as de, OrganizationResponse as df, OwnershipVerificationResponse as dg, PageSortField as ds, PaginatedResponse as dt, PendingAnonymousMembersResponse as du, PendingCredentialChangeResponse as dv, PendingCredentialChangeInviteResponse as dw, PhoneCallActionParams as dx, PlayAudioActionParams as dy, AccountContactConflict as e, QueryRecordSelection as e0, QueryRelationMatch as e1, QueryRunMode as e2, QuerySavedFilterRef as e3, QueryScalar as e4, QuerySortKey as e5, QuerySubQueryRef as e6, QueryTemplatePredicate as e7, QueryTemplateValue as e8, QueryTemporalValue as e9, RunQueryResponse as eA, SendLoginCodeResponse as eB, SSOConfigData as eC, SSOConfigRequest as eD, SSOProviderConfig as eE, SchedulePreviewRequest as eF, SchedulePreviewResponse as eG, SendEmailVerificationRequest as eI, SessionExchangeRequest as eJ, SessionExchangeResponse as eK, SetupTOTPRequest as eL, SetupWebAuthnRequest as eM, SignupAccountResponse as eN, SignupMemberResponse as eO, SiteDisableImpactResponse as eP, SiteDomainConfigResponse as eR, SiteSortField as eS, SiteVerificationResponse as eT, SmsSendActionParams as eU, SortOrder as eV, SwitchTaskActionParams as eW, SyncCalendarResponse as eX, TOTPSetupResponse as eY, TTSModel as eZ, TTSPreviewProvider as e_, QueryValue as ea, RealtimeModelConfig as eb, RecoveryCodeResponse as ec, RequestCredentialChangeRequest as ef, RequestMagicLinkRequest as eg, RequestMagicLinkResponse as eh, ResolveAnonymousMemberRequest as ei, Routine as ej, RoutineConfigEventResponse as ek, RoutineDestination as el, RoutineResponse as em, RoutineRunResponse as en, RoutineRunStatus as eo, RoutineRunsQueryParams as ep, RoutineScheduleMode as eq, RoutineSortField as er, RoutineVisibility as es, RoutineVoiceReadinessPreviewRequest as et, RoutineVoiceReadinessPreviewResponse as eu, RoutineVoiceReadinessWarningResponse as ev, RoutinesQueryParams as ew, RuleExecutionSortField as ex, RuleExecutionsQueryParams as ey, RunQueryRequest as ez, AccountFormData as f, DeletionCancelResponse as f$, TaskExportDataTypeRelation as f0, TaskExportEventRuleRelation as f1, TaskSortField as f2, ThinkingSound as f3, TimeSlot as f4, TwoFactorMethod as f5, TwoFactorOperationResponse as f6, TwoFactorStatus as f7, UnlinkCalendarResponse as f8, UpdateAgentRequest as f9, AccountBillingOrganizationRef as fM, AccountDataExport as fN, AccountExternalIdentityResponse as fO, AccountIdentityResolutionResponse as fP, AdminAccountResponse as fQ, AdminAccountFormData as fR, AdminAccountMembership as fS, AdminAccountMembershipResponse as fT, AdminAccountOrgMembershipResponse as fU, AdminCarrierLedgerEntryResponse as fV, AdminOrganization as fW, AdminOrganizationResponse as fX, AdminWorkspaceMemberFormData as fY, ConsentRecordExport as fZ, DataExportResponse as f_, UpdateAttendeeRequest as fa, UpdateDataRecordFilterRequest as fb, UpdateEventRuleFormData as fc, UpdateOrgMemberRequest as fd, UpdateOrganizationRequest as fe, UpdateRoutineRequest as ff, UpdateTwoFactorMethodRequest as fg, UpdateWorkspaceMemberRequest as fh, ValidateMagicLinkRequest as fi, ValidateMagicLinkResponse as fj, ValidateQueryResponse as fk, VerifyCodeRequest as fl, VerifyCodeResponse as fm, VerifyCredentialChangeRequest as fn, VerifyEmailRequest as fo, VerifyTOTPSetupRequest as fp, VerifyWebAuthnSetupRequest as fq, WorkflowSortField as fr, WorkspaceMemberCountResponse as fs, WorkspaceMemberCountResponseActiveByType as ft, WorkspaceSortField as fu, XAIChatModelConfig as fv, XAIRealtimeModelConfig as fw, XAIRealtimeReasoningEffort as fx, XAIReasoningEffort as fy, XAIServerVADTurnDetection as fz, AccountLookupResponse as g, DeletionRequestResponse as g0, TwoFactorMethodResponse$1 as g1, TwoFactorStatusResponse$1 as g2, MintedSessionFields as g3, OIDCAdminConfigInput as g4, OrgMembershipExport as g5, OrgScopedIdentityResponse as g6, SessionDescription as g7, TwoFactorMethodResponse as g9, CreateInquiryInput as gB, CreateTaskInput as gC, DeleteInquiryInput as gE, DeleteTaskInput as gG, EnrichInquiryInput as gI, GetInquiryInput as gK, GetTaskInput as gM, ListInquiriesInput as gO, ListTasksInput as gQ, TaskFormData as gT, UnarchiveTaskInput as gV, UpdateInquiryInput as gX, UpdateTaskInput as gZ, TwoFactorMethodType as ga, TwoFactorStatusResponse as gb, WebAuthnRegistrationResponse as gc, WorkspaceMembershipExport as gd, EnumOption$1 as ge, EventRuleResponse$1 as gf, EventRuleData as gg, OpenAIRealtimeModelConfig$1 as gi, GeminiRealtimeModelConfig$1 as gj, XAIRealtimeModelConfig$1 as gk, SiteDnsRecord as gn, OrgDomainListResponse as go, EmailDnsRecord as gp, EmailDomainConfigGetResponse as gq, SiteDomainConfigGetResponse as gr, OrgBillingAccessResponse as gs, AbilityData as gt, ArchiveTaskInput as gw, ChildTaskFormData as gz, AccountReportItem as h, AccountSortField as i, AccountState as j, Address as k, AdminWorkspaceSortField as l, AgentResponse as m, AgentConfigResponse as n, AgentConfigFormData as o, AgentSortField as p, AnonymousInteractionResponse as q, AnonymousMemberResolutionResponse as r, AnonymousMemberResolutionStatus as s, ApiKeyResponse as t, ApiKeyCreatedResponse as u, ApiKeyFormData as v, ApiKeyScope as w, ApiKeyScopesResponse as x, AssignmentSortField as y, AssistantMessageActionParams as z };
6679
+ export { AccessLevel as A, EventRuleEventType as E, BulkMemberResultStatus as T, BusinessIndustry as V, BusinessType as _, EventRuleActionType as a, CalendarEventStatus as a3, CalendarPermissionType as a8, DEFAULT_THINKING_SPEECH_PHRASES as aG, DataCategory as aH, DataRecordRetirementResponseReason as aS, DataSensitivity as aW, DataTypeRecordScope as a_, CalendarScheduleAvailabilityType as ab, CalendarScheduleRecurrence as ad, CalendarSource as af, DataFieldType as b, EmailDnsRecordType as b5, ImportContactConflictField as bH, IndexStatus as bI, JobPosition as bM, MASKED_SECRET_SENTINEL as bV, EventRuleObjectType as bh, MemberType as cH, MenuItemResponseItemType as cN, OIDCAdminConfigViewProviderType as cW, MemberImportIssueCode as cc, MemberImportMatchInfoMatchType as ce, MemberImportPreviewRowAction as ci, PERMISSION_ADMIN as dc, PERMISSION_CREATE as dd, PERMISSION_DELETE as de, PERMISSION_EDIT as df, PERMISSION_GEOLOCATE as dg, PERMISSION_LIST as dh, PERMISSION_LIST_ALL as di, PERMISSION_NONE as dj, PERMISSION_USE as dk, PERMISSION_VERIFY as dl, QUERY_VALUELESS_OPS as dt, Scope as eE, SiteDnsRecordType as eO, TTS_PREVIEW_PROVIDERS as eZ, Region as ea, RegistrationIdentifier as eb, ThemeFeaturesDarkMode as f3, ThemeSettingFieldType as f5, WorkspaceScopeMode as fD, archivedMemberConflictId as fK, asIdentifiedMemberContactConflict as fL, canPreviewVoice as fM, decodePermissions as fN, encodePermissions as fO, eventRuleActionParams as fP, getTTSProvider as fQ, getVoiceModelId as fR, isAccountContactConflict as fS, isIdentifiedMemberContactConflict as fT, isMemberContactConflict as fU, DeclaredDataUse as fV, ArchiveTaskSchema as gB, ChatTaskConfigurationPatchSchema as gC, ChildTaskFormDataSchema as gE, CreateTaskSchema as gH, DeleteInquirySchema as gJ, DeleteTaskSchema as gL, EnrichInquirySchema as gN, GetInquirySchema as gP, GetTaskSchema as gR, ListInquiriesSchema as gT, ListTasksSchema as gV, OutcomeTaskRoutingSchema as gW, TaskFormDataSchema as gY, UnarchiveTaskSchema as g_, EventRuleEventType$1 as gj, CreateInquirySchema as gp, UpdateInquiryRequestSchema as gq, AbilityDataSchema as gy, AnonymousInquiryFormSchema as gz, UpdateInquirySchema as h0, UpdateTaskSchema as h2, AttendeeResponseStatus as y, AttendeeStatus as z };
6680
+ export type { Calendar as $, AuthorizedRep as B, AvailabilityCheck as C, DataRecordResponse as D, AvailabilityResponse as F, AvailableSlotsRequest as G, AvailableSlotsResponse as H, BaseChatModelConfig as I, BaseRealtimeModelConfig as J, BotSortField as K, BulkCreateDataRecordRequest as L, BulkCreateDataRecordResponse as M, BulkCreateMembersRequest as N, BulkCreateMembersResponse as O, BulkMemberItem as P, QueryPredicate as Q, BulkMemberResult as R, SchemaField as S, BulkRecordResult as U, WorkspaceMemberResponse as W, BusinessInfo as X, BusinessProfileCancelResponse as Y, BusinessProfileSubmitResponse as Z, DataTypeSortField as a$, EventResponse as a0, CalendarEventFormData as a1, CalendarEventSortField as a2, EventTypeResponse as a4, CalendarEventTypeFormData as a5, CalendarEventsQueryParams as a6, CalendarFormData as a7, CalendarResponse as a9, CreateWorkspaceMemberRequest as aA, CredentialType as aB, CurrentMemberResponse as aC, CurrentOrgMember as aD, CursorPaginatedResponse as aE, CustomRealtimeModelConfig as aF, DataField as aI, DataIntegrityReportItem as aJ, DataRecordAssociationFormData as aK, DataRecordFieldWarning as aL, DataRecordFilterResponse as aM, DataRecordFilterFormData as aN, DataRecordFilterWithQuery as aO, DataRecordFormData as aP, DataRecordReportItem as aQ, DataRecordRetirementResponse as aR, DataRecordUpdateResponse as aT, DataRecordWithAccessMode as aU, DataRecordsPaginatedResponse as aV, DataTypeResponse as aX, DataTypeExportItem as aY, DataTypeFormData as aZ, CalendarSchedule as aa, CalendarScheduleFormData as ac, CalendarScheduleResponse as ae, CapabilityRequirementFinding as ag, CapabilityStatus as ah, ChatContinueActionParams as ai, ChatCreateActionParams as aj, ChatModelConfig as ak, ChatPauseActionParams as al, ChatSortField as am, ChatSummarizeActionParams as an, ClaudeChatModelConfig as ao, ClaudeReasoningEffort as ap, ConcludeAssignmentActionParams as aq, CreateAccountOrgMembershipRequest as ar, CreateAccountOrgMembershipResponse as as, CreateAgentRequest as at, CreateAnonymousMemberRequest as au, CreateCredentialChangeInviteRequest as av, CreateDataRecordFilterRequest as aw, CreateOrganizationRequest as ax, CreateRoutineRequest as ay, CreateSignupResponse as az, MemberFieldDefinitionResponse as b$, DeleteAccountOrgMembershipResponse as b0, DetailedAccount as b1, DuplicateAccountInfo as b2, EcwRefreshMemberEncountersActionParams as b3, EmailDisableImpactResponse as b4, EmailDomainConfigResponse as b6, EmailSendActionParams as b7, EmailVerificationResponse as b8, EnumOption as b9, GoogleCalendarStatusResponse as bA, ICalFeedGrantSummary as bB, ICalFeedTokenResponse as bC, ICalFeedUrlResponse as bD, IdentifiedMemberContactConflict as bE, IdentityConflictPolicy as bF, ImportContactConflict as bG, IndexStatusResponse as bJ, InterruptionSound as bK, InvokeCustomToolActionParams as bL, JourneyEnrollActionParams as bN, JourneySortField as bO, LibModelsGlbResponsesOrganizationResponsesSSOConfigResponse as bP, LinkCalendarRequest as bQ, LinkCalendarResponse as bR, LoginRequest as bS, LogoUploadRequest as bT, LogoUploadResponse as bU, McpServerSortField as bW, MemberContactConflict as bX, MemberContactField as bY, MemberCredentialResponse as bZ, MemberFieldResponse as b_, ErrorResponse as ba, EventActionMapping as bb, EventActionMappingsResponse as bc, EventDeletionResponse as bd, EventRule as be, EventRuleExportItem as bf, EventRuleFormData as bg, EventRuleResponse as bi, EventRunSortField as bj, ExpireAnonymousMemberRequest as bk, ExternalAttendeeData as bl, FileSortField as bm, FormFieldUpdateActionParams as bn, FormFieldUpdateAssignment as bo, GeminiChatModelConfig as bp, GeminiThinkingLevel as bq, GenerateRecoveryCodesRequest as br, BusinessProfileResponse as bs, CalendarResponse$1 as bt, CalendarScheduleResponse$1 as bu, OrgDomainResponse as bv, OwnershipDnsRecord as bw, SiteResponse as bx, GoogleCalendarInfo as by, GoogleCalendarInsufficientScopesResponse as bz, EventRuleInput as c, OpenAIReasoningEffort as c$, MemberFieldDefinitionListResponse as c0, MemberFieldListResponse as c1, MemberFieldSourceResponse as c2, MemberFilterResponse as c3, MemberFilterFormData as c4, MemberFilterWithQuery as c5, MemberFormData as c6, MemberImportConflictInfo as c7, MemberImportIdentityAnswer as c8, MemberImportIdentityAnswers as c9, MemberRoleFileAccessResponse as cA, MemberRoleFolderAccessResponse as cB, MemberRoleFormData as cC, MemberRoleTaskAccess as cD, MemberSortField as cE, MemberSummary as cF, MemberSyncLink as cG, MemberUpsertActionParams as cI, MemberUpsertBehavior as cJ, MemberWorkspaceInfo as cK, MembersQueryParams as cL, MenuItemResponse as cM, MenuTreeResponse as cO, MergeMembersRequest as cP, MergeMembersResponse as cQ, MessageValidationActionParams as cR, MissingMembershipItem as cS, NormalizeMemberRequest as cT, NormalizeMemberResponse as cU, OIDCAdminConfigView as cV, ObjectPermission as cX, ObjectPermissionFlags as cY, OpenAIChatModelConfig as cZ, OpenAIRealtimeModelConfig as c_, MemberImportIdentitySnapshot as ca, MemberImportIssue as cb, MemberImportMatchInfo as cd, MemberImportOptions as cf, MemberImportPreviewResponse as cg, MemberImportPreviewRow as ch, MemberImportPreviewSummary as cj, MemberImportReplacementValues as ck, MemberImportRowResolution as cl, MemberImportRunEvent as cm, MemberImportRunItemResponse as cn, MemberImportRunListOptions as co, MemberImportRunStartResult as cp, MemberImportRunSummaryResponse as cq, MemberImportStreamConflict as cr, MemberImportStreamEvent as cs, MemberLabelResponse as ct, MemberLabelActionParams as cu, MemberLabelFormData as cv, MemberMessageActivity as cw, MemberOrgView as cx, MemberReportItem as cy, MemberRoleResponse as cz, AccountContactConflict as d, QueryRelationMatch as d$, OpenAISemanticVADEagerness as d0, OpenAISemanticVADTurnDetection as d1, OpenAIServerVADTurnDetection as d2, OpenAITurnDetection as d3, OpenAITurnDetectionType as d4, OrgApiKeyFormData as d5, OrgMember as d6, OrgMemberListResponse as d7, OrgMemberRole as d8, OrgWorkspaceScopeRequest as d9, QueryCompare as dA, QueryComparisonOp as dB, QueryComputedAggregate as dC, QueryCostInfo as dD, QueryCurrentMonthPeriod as dE, QueryDataTypeInfo as dF, QueryDayBoundaryValue as dG, QueryDaysAgoValue as dH, QueryDaysFromNowValue as dI, QueryEntityType as dJ, QueryEnumOption as dK, QueryFieldInfo as dL, QueryFieldsResponse as dM, QueryGroupBy as dN, QueryIR as dO, QueryMatchAll as dP, QueryMetric as dQ, QueryNamedMonthPeriod as dR, QueryNot as dS, QueryNowValue as dT, QueryOr as dU, QueryParameterRef as dV, QueryRangeBound as dW, QueryRangeValue as dX, QueryRecordFieldInfo as dY, QueryRecordMatch as dZ, QueryRecordSelection as d_, OrganizationResponse as da, OwnershipVerificationResponse as db, PageResponse as dm, PageSortField as dn, PaginatedResponse as dp, PendingAnonymousMembersResponse as dq, PhoneCallActionParams as dr, PlayAudioActionParams as ds, QualificationSortField as du, QueryAggregateOp as dv, QueryAggregatePeriod as dw, QueryAggregatePredicate as dx, QueryAggregateSpec as dy, QueryAnd as dz, AccountFormData as e, TaskExportEventRuleRelation as e$, QueryRunMode as e0, QuerySavedFilterRef as e1, QueryScalar as e2, QuerySortKey as e3, QuerySubQueryRef as e4, QueryTemplatePredicate as e5, QueryTemplateValue as e6, QueryTemporalValue as e7, QueryValue as e8, RealtimeModelConfig as e9, SSOConfigRequest as eA, SSOProviderConfig as eB, SchedulePreviewRequest as eC, SchedulePreviewResponse as eD, SendEmailVerificationRequest as eF, SessionExchangeRequest as eG, SessionExchangeResponse as eH, SetupTOTPRequest as eI, SetupWebAuthnRequest as eJ, SignupAccountResponse as eK, SignupMemberResponse as eL, SiteCountsResponse as eM, SiteDisableImpactResponse as eN, SiteDomainConfigResponse as eP, SiteSignupResponse as eQ, SiteSortField as eR, SiteVerificationResponse as eS, SmsSendActionParams as eT, SortOrder as eU, SwitchTaskActionParams as eV, SyncCalendarResponse as eW, TTSModel as eX, TTSPreviewProvider as eY, TaskExportDataTypeRelation as e_, RenderedPageResponse as ec, RequestCredentialChangeRequest as ed, RequestMagicLinkRequest as ee, RequestMagicLinkResponse as ef, ResolveAnonymousMemberRequest as eg, Routine as eh, RoutineConfigEventResponse as ei, RoutineDestination as ej, RoutineResponse as ek, RoutineRunResponse as el, RoutineRunStatus as em, RoutineRunsQueryParams as en, RoutineScheduleMode as eo, RoutineSortField as ep, RoutineVisibility as eq, RoutineVoiceReadinessPreviewRequest as er, RoutineVoiceReadinessPreviewResponse as es, RoutineVoiceReadinessWarningResponse as et, RoutinesQueryParams as eu, RuleExecutionSortField as ev, RuleExecutionsQueryParams as ew, RunQueryRequest as ex, RunQueryResponse as ey, SSOConfigData as ez, AccountLookupResponse as f, AdminAccountMembershipResponse as f$, TaskSortField as f0, ThemeResponse as f1, ThemeFeatures as f2, ThemeSettingField as f4, ThemeSettingInstallField as f6, ThemeSettingsResponse as f7, ThemesListResponse as f8, ThinkingSound as f9, WorkflowSortField as fA, WorkspaceMemberCountResponse as fB, WorkspaceMemberCountResponseActiveByType as fC, WorkspaceSortField as fE, XAIChatModelConfig as fF, XAIRealtimeModelConfig as fG, XAIRealtimeReasoningEffort as fH, XAIReasoningEffort as fI, XAIServerVADTurnDetection as fJ, AccountDataExport as fW, AccountExternalIdentityResponse as fX, AccountIdentityResolutionResponse as fY, AdminAccountFormData as fZ, AdminAccountMembership as f_, TimeSlot as fa, TipTapDocumentOutput as fb, TwoFactorMethod as fc, TwoFactorStatus as fd, UnauthorizedSiteResponse as fe, UnlinkCalendarResponse as ff, UpdateAgentRequest as fg, UpdateAttendeeRequest as fh, UpdateCurrentWorkspaceMemberRequest as fi, UpdateDataRecordFilterRequest as fj, UpdateEventRuleFormData as fk, UpdateOrgMemberRequest as fl, UpdateOrganizationRequest as fm, UpdateRoutineRequest as fn, UpdateThemeSettingsRequest as fo, UpdateTwoFactorMethodRequest as fp, UpdateWorkspaceMemberRequest as fq, ValidateMagicLinkRequest as fr, ValidateMagicLinkResponse as fs, ValidateQueryResponse as ft, VerifyCodeRequest as fu, VerifyCodeResponse as fv, VerifyCredentialChangeRequest as fw, VerifyEmailRequest as fx, VerifyTOTPSetupRequest as fy, VerifyWebAuthnSetupRequest as fz, AccountReportItem as g, UpdateInquiryInput as g$, AdminCarrierLedgerEntryResponse as g0, AdminOrganization as g1, AdminOrganizationResponse as g2, AdminWorkspaceMemberFormData as g3, ConsentRecordExport as g4, DataExportResponse as g5, DeletionCancelResponse as g6, DeletionRequestResponse as g7, OIDCAdminConfigInput as g8, OrgMembershipExport as g9, ArchiveTaskInput as gA, ChildTaskFormData as gD, CreateInquiryInput as gF, CreateTaskInput as gG, DeleteInquiryInput as gI, DeleteTaskInput as gK, EnrichInquiryInput as gM, GetInquiryInput as gO, GetTaskInput as gQ, ListInquiriesInput as gS, ListTasksInput as gU, TaskFormData as gX, UnarchiveTaskInput as gZ, OrgScopedIdentityResponse as ga, SuperuserOrganization as gb, TwoFactorMethodResponse as gc, TwoFactorMethodType as gd, TwoFactorStatusResponse as ge, WorkspaceMembershipExport as gf, RequirementSchemaField as gg, EventRuleResponse$1 as gh, EventRuleData as gi, TipTapDocumentInput as gk, EnumOption$1 as gl, DataTypeRequirement as gm, OpenAIRealtimeModelConfig$1 as gn, XAIRealtimeModelConfig$1 as go, SiteDnsRecord as gr, OrgDomainListResponse as gs, EmailDnsRecord as gt, EmailDomainConfigGetResponse as gu, SiteDomainConfigGetResponse as gv, OrgBillingAccessResponse as gw, AbilityData as gx, AccountSortField as h, UpdateTaskInput as h1, AccountState as i, Address as j, AdminWorkspaceSortField as k, AgentResponse as l, AgentConfigResponse as m, AgentConfigFormData as n, AgentSortField as o, AnonymousInteractionResponse as p, AnonymousMemberResolutionResponse as q, AnonymousMemberResolutionStatus as r, ApiKeyFormData as s, ApiKeyScope as t, ApiKeyScopesResponse as u, AssignmentSortField as v, AssistantMessageActionParams as w, AttendeeResponse as x };