@proteos/sdk 0.50.1 → 0.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef, d as PrincipalRef, e as PublicAccessOperation } from './types-COxVBT4w.js';
2
- export { f as App, g as AppSchema, h as AppService, i as ArrayAttributeMeta, j as AttributeAccessRule, k as AttributeRestrictions, l as AttributeSchema, m as AttributeType, n as AuditFieldsSchema, C as CURRENT_USER_DEFAULT, o as ClientOptions, p as Column, q as ColumnSchema, r as ComparisonOperator, s as Component, t as ComponentSchema, u as ComponentService, v as CreateAppRequest, w as CreateComponentRequest, x as CreateDesignReferenceRequest, y as CreateEntityRequest, z as CreateListRequest, B as CreateListViewRequest, D as CreateMenuConfigurationRequest, E as CreatePageRequest, G as CreateVariableRequest, H as CurrencyAttributeMeta, I as CurrencyAttributeMetaSchema, J as CurrencySymbolSide, K as CurrencyValue, M as CurrentUserDefault, N as DEFAULT_OPTIONS, O as DEFAULT_PAGE_SIZE, Q as DONE, R as DeployModuleRequest, S as DesignReference, T as DesignReferenceContent, V as DesignReferenceSchema, W as DesignReferenceService, X as Done, Y as Entity, Z as EntitySchema, _ as EntityService, $ as EntityWithSchema, a0 as EntityWithSchemaSchema, a1 as EnumAttributeMeta, a2 as EnumValue, a3 as FileAttributeMeta, a4 as FileRefSchema, a5 as FilterElement, a6 as FilterElementSchema, a7 as FilterGroup, a8 as FilterGroupSchema, a9 as List, aa as ListAppsOptions, ab as ListComponentsOptions, ac as ListDesignReferencesOptions, ad as ListEntitiesOptions, ae as ListFn, af as ListListViewsOptions, ag as ListListsOptions, ah as ListMenuConfigurationsOptions, ai as ListModulesOptions, aj as ListPagesOptions, ak as ListSchema, al as ListService, am as ListVariablesOptions, an as ListView, ao as ListViewSchema, ap as ListViewService, aq as LogicalOperator, ar as MenuConfiguration, as as MenuConfigurationSchema, at as MenuConfigurationService, au as MenuItem, av as MenuItemSchema, aw as MenuItemType, ax as MetaClient, ay as MetaListOptions, az as Module, aA as ModuleSchema, aB as ModuleService, aC as ModuleStatus, aD as OnDeleteAction, aE as OnDeleteActionSchema, aF as PLATFORM_ATTRIBUTE_NAMES, aG as PLATFORM_USER_ID, aH as Page, aI as PageAction, aJ as PageActionKind, aK as PageActionSchema, aL as PageLayout, aM as PageLayoutSchema, aN as PageSchema, aO as PageService, aP as PageType, aQ as PublicPageComponent, aR as PublicPageResponse, aS as RelationAttributeMeta, aT as RelationAttributeMetaSchema, aU as RequestOptions, aV as ResolvedClientOptions, aW as ResponseMeta, aX as ResponseMetaSchema, aY as SortConfig, aZ as SortConfigSchema, a_ as SortDirection, a$ as Timestamps, b0 as TokenProvider, b1 as UpdateAppRequest, b2 as UpdateComponentRequest, b3 as UpdateDesignReferenceRequest, b4 as UpdateEntityRequest, b5 as UpdateListRequest, b6 as UpdateListViewRequest, b7 as UpdateMenuConfigurationRequest, b8 as UpdatePageRequest, b9 as UpdateVariableRequest, ba as UserRefSchema, bb as UserType, bc as Variable, bd as VariableSchema, be as VariableService, bf as acceptsCurrentUserDefault, bg as allCurrencyCodes, bh as createIterator, bi as createListResultSchema, bj as currencyLabel, bk as currencySymbol, bl as currencySymbolSide, bm as formatAmount, bn as formatMoney, bo as isCurrentUserDefault, bp as isPlatformAttributeName, bq as localeNumberSeparators, br as parseAmount, bs as parseCurrencyMeta, bt as parseFileMeta, bu as parseRelationMeta, bv as platformAttributes, bw as resolveOptions } from './types-COxVBT4w.js';
1
+ import { A as AuditFields, L as ListOptions, a as Attribute, U as UserRef$2, P as PageIterator, b as ListResult, c as ProteosClient, F as FileRef, d as PrincipalRef, e as PublicAccessOperation } from './types-C9flkAj-.js';
2
+ export { f as App, g as AppConfiguration, h as AppConfigurationSchema, i as AppConfigurationService, j as AppHome, k as AppHomeSchema, l as AppHomeType, m as AppSchema, n as AppService, o as ArrayAttributeMeta, p as AttributeAccessRule, q as AttributeRestrictions, r as AttributeSchema, s as AttributeType, t as AuditFieldsSchema, C as CURRENT_USER_DEFAULT, u as ClientOptions, v as Column, w as ColumnSchema, x as ComparisonOperator, y as Component, z as ComponentSchema, B as ComponentService, D as CreateAppConfigurationRequest, E as CreateAppRequest, G as CreateComponentRequest, H as CreateDesignReferenceRequest, I as CreateEntityRequest, J as CreateListRequest, K as CreateListViewRequest, M as CreateMenuConfigurationRequest, N as CreatePageRequest, O as CreateVariableRequest, Q as CurrencyAttributeMeta, R as CurrencyAttributeMetaSchema, S as CurrencySymbolSide, T as CurrencyValue, V as CurrentUserDefault, W as DEFAULT_OPTIONS, X as DEFAULT_PAGE_SIZE, Y as DONE, Z as DeployModuleRequest, _ as DesignReference, $ as DesignReferenceContent, a0 as DesignReferenceSchema, a1 as DesignReferenceService, a2 as Done, a3 as Entity, a4 as EntitySchema, a5 as EntityService, a6 as EntityWithSchema, a7 as EntityWithSchemaSchema, a8 as EnumAttributeMeta, a9 as EnumValue, aa as FileAttributeMeta, ab as FileRefSchema, ac as FilterElement, ad as FilterElementSchema, ae as FilterGroup, af as FilterGroupSchema, ag as List, ah as ListAppConfigurationsOptions, ai as ListAppsOptions, aj as ListComponentsOptions, ak as ListDesignReferencesOptions, al as ListEntitiesOptions, am as ListFn, an as ListListViewsOptions, ao as ListListsOptions, ap as ListMenuConfigurationsOptions, aq as ListModulesOptions, ar as ListPagesOptions, as as ListSchema, at as ListService, au as ListVariablesOptions, av as ListView, aw as ListViewSchema, ax as ListViewService, ay as LogicalOperator, az as MenuConfiguration, aA as MenuConfigurationSchema, aB as MenuConfigurationService, aC as MenuItem, aD as MenuItemSchema, aE as MenuItemType, aF as MetaClient, aG as MetaListOptions, aH as Module, aI as ModuleSchema, aJ as ModuleService, aK as ModuleStatus, aL as OnDeleteAction, aM as OnDeleteActionSchema, aN as PLATFORM_ATTRIBUTE_NAMES, aO as PLATFORM_USER_ID, aP as Page, aQ as PageAction, aR as PageActionKind, aS as PageActionSchema, aT as PageLayout, aU as PageLayoutSchema, aV as PageSchema, aW as PageService, aX as PageType, aY as PublicPageComponent, aZ as PublicPageResponse, a_ as RelationAttributeMeta, a$ as RelationAttributeMetaSchema, b0 as RequestOptions, b1 as ResolvedClientOptions, b2 as ResponseMeta, b3 as ResponseMetaSchema, b4 as SortConfig, b5 as SortConfigSchema, b6 as SortDirection, b7 as Timestamps, b8 as TokenProvider, b9 as UpdateAppConfigurationRequest, ba as UpdateAppRequest, bb as UpdateComponentRequest, bc as UpdateDesignReferenceRequest, bd as UpdateEntityRequest, be as UpdateListRequest, bf as UpdateListViewRequest, bg as UpdateMenuConfigurationRequest, bh as UpdatePageRequest, bi as UpdateVariableRequest, bj as UserRefSchema, bk as UserType, bl as Variable, bm as VariableSchema, bn as VariableService, bo as acceptsCurrentUserDefault, bp as allCurrencyCodes, bq as createIterator, br as createListResultSchema, bs as currencyLabel, bt as currencySymbol, bu as currencySymbolSide, bv as formatAmount, bw as formatMoney, bx as isCurrentUserDefault, by as isPlatformAttributeName, bz as localeNumberSeparators, bA as parseAmount, bB as parseCurrencyMeta, bC as parseFileMeta, bD as parseRelationMeta, bE as platformAttributes, bF as resolveOptions } from './types-C9flkAj-.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -1409,6 +1409,192 @@ interface CreateApiKeyRequest {
1409
1409
  org_id?: string;
1410
1410
  expires_at?: string;
1411
1411
  }
1412
+ /**
1413
+ * Profile — the org's user-type. ONE per user per org (unlike roles, which
1414
+ * are many and only decide access). Owns the defaults keyed by subject alone:
1415
+ * the app opened after login and the app-switcher allowlist. Metadata app
1416
+ * configurations bind per-app defaults (home, menu, agents, record pages) to a
1417
+ * profile by slug.
1418
+ */
1419
+ interface Profile extends AuditFields {
1420
+ slug: string;
1421
+ name: string;
1422
+ org_id: string;
1423
+ description: string;
1424
+ /** Module that shipped the profile; '' when authored in the org. */
1425
+ module_slug: string;
1426
+ /** App opened after login; clients fail open to the first visible app. */
1427
+ default_app_slug: string;
1428
+ /** App-switcher allowlist; empty = every app in the org. */
1429
+ app_slugs: string[];
1430
+ }
1431
+ declare const ProfileSchema: z.ZodObject<{
1432
+ created_at: z.ZodString;
1433
+ updated_at: z.ZodString;
1434
+ created_by: z.ZodObject<{
1435
+ type: z.ZodEnum<["person", "agent", "api"]>;
1436
+ id: z.ZodString;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ type: "person" | "agent" | "api";
1439
+ id: string;
1440
+ }, {
1441
+ type: "person" | "agent" | "api";
1442
+ id: string;
1443
+ }>;
1444
+ updated_by: z.ZodObject<{
1445
+ type: z.ZodEnum<["person", "agent", "api"]>;
1446
+ id: z.ZodString;
1447
+ }, "strip", z.ZodTypeAny, {
1448
+ type: "person" | "agent" | "api";
1449
+ id: string;
1450
+ }, {
1451
+ type: "person" | "agent" | "api";
1452
+ id: string;
1453
+ }>;
1454
+ } & {
1455
+ slug: z.ZodString;
1456
+ name: z.ZodString;
1457
+ org_id: z.ZodString;
1458
+ description: z.ZodString;
1459
+ module_slug: z.ZodString;
1460
+ default_app_slug: z.ZodString;
1461
+ app_slugs: z.ZodArray<z.ZodString, "many">;
1462
+ }, "strip", z.ZodTypeAny, {
1463
+ name: string;
1464
+ created_at: string;
1465
+ updated_at: string;
1466
+ created_by: {
1467
+ type: "person" | "agent" | "api";
1468
+ id: string;
1469
+ };
1470
+ updated_by: {
1471
+ type: "person" | "agent" | "api";
1472
+ id: string;
1473
+ };
1474
+ description: string;
1475
+ slug: string;
1476
+ module_slug: string;
1477
+ org_id: string;
1478
+ default_app_slug: string;
1479
+ app_slugs: string[];
1480
+ }, {
1481
+ name: string;
1482
+ created_at: string;
1483
+ updated_at: string;
1484
+ created_by: {
1485
+ type: "person" | "agent" | "api";
1486
+ id: string;
1487
+ };
1488
+ updated_by: {
1489
+ type: "person" | "agent" | "api";
1490
+ id: string;
1491
+ };
1492
+ description: string;
1493
+ slug: string;
1494
+ module_slug: string;
1495
+ org_id: string;
1496
+ default_app_slug: string;
1497
+ app_slugs: string[];
1498
+ }>;
1499
+ interface CreateProfileRequest {
1500
+ slug: string;
1501
+ name: string;
1502
+ description?: string;
1503
+ module_slug?: string;
1504
+ default_app_slug?: string;
1505
+ app_slugs?: string[];
1506
+ }
1507
+ interface UpdateProfileRequest {
1508
+ name?: string;
1509
+ description?: string;
1510
+ module_slug?: string;
1511
+ default_app_slug?: string;
1512
+ app_slugs?: string[];
1513
+ }
1514
+ interface ListProfilesOptions extends AuthListOptions {
1515
+ slug?: string;
1516
+ name?: string;
1517
+ module_slug?: string;
1518
+ default_app_slug?: string;
1519
+ }
1520
+ /**
1521
+ * User profile assignment — a user's ONE profile in an org.
1522
+ */
1523
+ interface UserProfileAssignment extends AuditFields {
1524
+ id: string;
1525
+ user_id: string;
1526
+ profile_slug: string;
1527
+ org_id: string;
1528
+ }
1529
+ declare const UserProfileAssignmentSchema: z.ZodObject<{
1530
+ created_at: z.ZodString;
1531
+ updated_at: z.ZodString;
1532
+ created_by: z.ZodObject<{
1533
+ type: z.ZodEnum<["person", "agent", "api"]>;
1534
+ id: z.ZodString;
1535
+ }, "strip", z.ZodTypeAny, {
1536
+ type: "person" | "agent" | "api";
1537
+ id: string;
1538
+ }, {
1539
+ type: "person" | "agent" | "api";
1540
+ id: string;
1541
+ }>;
1542
+ updated_by: z.ZodObject<{
1543
+ type: z.ZodEnum<["person", "agent", "api"]>;
1544
+ id: z.ZodString;
1545
+ }, "strip", z.ZodTypeAny, {
1546
+ type: "person" | "agent" | "api";
1547
+ id: string;
1548
+ }, {
1549
+ type: "person" | "agent" | "api";
1550
+ id: string;
1551
+ }>;
1552
+ } & {
1553
+ id: z.ZodString;
1554
+ user_id: z.ZodString;
1555
+ profile_slug: z.ZodString;
1556
+ org_id: z.ZodString;
1557
+ }, "strip", z.ZodTypeAny, {
1558
+ id: string;
1559
+ created_at: string;
1560
+ updated_at: string;
1561
+ created_by: {
1562
+ type: "person" | "agent" | "api";
1563
+ id: string;
1564
+ };
1565
+ updated_by: {
1566
+ type: "person" | "agent" | "api";
1567
+ id: string;
1568
+ };
1569
+ org_id: string;
1570
+ profile_slug: string;
1571
+ user_id: string;
1572
+ }, {
1573
+ id: string;
1574
+ created_at: string;
1575
+ updated_at: string;
1576
+ created_by: {
1577
+ type: "person" | "agent" | "api";
1578
+ id: string;
1579
+ };
1580
+ updated_by: {
1581
+ type: "person" | "agent" | "api";
1582
+ id: string;
1583
+ };
1584
+ org_id: string;
1585
+ profile_slug: string;
1586
+ user_id: string;
1587
+ }>;
1588
+ /** Body of `PUT /users/:id/profile` — replaces the user's profile. */
1589
+ interface SetProfileRequest {
1590
+ profile_slug: string;
1591
+ }
1592
+ /** Filters for the org-wide `GET /user-profile-assignments` listing. */
1593
+ interface ListUserProfileAssignmentsOptions extends AuthListOptions {
1594
+ id?: string;
1595
+ user_id?: string;
1596
+ profile_slug?: string;
1597
+ }
1412
1598
  /**
1413
1599
  * Role in the system.
1414
1600
  */
@@ -1711,6 +1897,13 @@ interface MeService {
1711
1897
  * @returns The caller's organizations
1712
1898
  */
1713
1899
  organizations(): Promise<Organization[]>;
1900
+ /**
1901
+ * Gets the caller's profile in the token org — the subject app
1902
+ * configurations are resolved against.
1903
+ *
1904
+ * @throws {ProteosError} 404 when the caller has no profile
1905
+ */
1906
+ profile(): Promise<Profile>;
1714
1907
  }
1715
1908
 
1716
1909
  /**
@@ -1788,6 +1981,36 @@ interface OrganizationService {
1788
1981
  delete(id: string): Promise<void>;
1789
1982
  }
1790
1983
 
1984
+ /**
1985
+ * Service for managing profiles — the org's user-types (ONE per user per
1986
+ * org). Per-user assignment lives on {@link UserService} (`getProfile` /
1987
+ * `setProfile` / `clearProfile`); the org-wide roster on
1988
+ * {@link UserProfileAssignmentService}.
1989
+ */
1990
+ interface ProfileService {
1991
+ /** Lists profiles (auto-paginating iterator). */
1992
+ list(options?: ListProfilesOptions): PageIterator<Profile, ListProfilesOptions>;
1993
+ /** Fetches a single page of profiles. */
1994
+ listPage(options?: ListProfilesOptions): Promise<ListResult<Profile>>;
1995
+ /** Gets a profile by slug (404 when unknown). */
1996
+ get(slug: string): Promise<Profile>;
1997
+ /** Creates a profile. The org is taken from the caller's token. */
1998
+ create(request: CreateProfileRequest): Promise<Profile>;
1999
+ /**
2000
+ * Creates or updates a profile idempotently by slug
2001
+ * (`PUT /accounts/v1/profiles/:slug`). The URL slug wins on mismatch.
2002
+ */
2003
+ upsert(slug: string, request: CreateProfileRequest): Promise<Profile>;
2004
+ /** Partially updates a profile. */
2005
+ update(slug: string, request: UpdateProfileRequest): Promise<Profile>;
2006
+ /**
2007
+ * Deletes a profile.
2008
+ * @throws {ProteosError} 409 `profile_in_use` while users still hold it —
2009
+ * move them first.
2010
+ */
2011
+ delete(slug: string): Promise<void>;
2012
+ }
2013
+
1791
2014
  /**
1792
2015
  * Service for managing roles.
1793
2016
  * Handles role CRUD operations and permission assignments.
@@ -2021,6 +2244,18 @@ interface TeamService {
2021
2244
  removeMember(slug: string, userId: string): Promise<void>;
2022
2245
  }
2023
2246
 
2247
+ /**
2248
+ * Service for the org-wide user-profile-assignment listing: "who holds which
2249
+ * profile" in one request (a profile's member roster, profile badges on a
2250
+ * user list). Per-user reads and writes stay on {@link UserService}.
2251
+ */
2252
+ interface UserProfileAssignmentService {
2253
+ /** Lists profile assignments across all users of the caller's org. */
2254
+ list(options?: ListUserProfileAssignmentsOptions): PageIterator<UserProfileAssignment, ListUserProfileAssignmentsOptions>;
2255
+ /** Fetches a single page of profile assignments. */
2256
+ listPage(options?: ListUserProfileAssignmentsOptions): Promise<ListResult<UserProfileAssignment>>;
2257
+ }
2258
+
2024
2259
  /**
2025
2260
  * Service for the org-wide user-role-assignment listing.
2026
2261
  *
@@ -2147,6 +2382,22 @@ interface UserService {
2147
2382
  * @throws {ProteosError} If assignment not found (404)
2148
2383
  */
2149
2384
  unassignRole(userId: string, roleSlug: string): Promise<void>;
2385
+ /**
2386
+ * Gets the user's profile assignment in the caller's org.
2387
+ *
2388
+ * @throws {ProteosError} 404 when the user has no profile
2389
+ */
2390
+ getProfile(userId: string): Promise<UserProfileAssignment>;
2391
+ /**
2392
+ * Sets (replaces) the user's profile in the caller's org — one profile per
2393
+ * user per org.
2394
+ *
2395
+ * @throws {ProteosError} 404 when the user or the profile slug is unknown;
2396
+ * 400 `user_not_in_org` when the user holds no role in the org
2397
+ */
2398
+ setProfile(userId: string, request: SetProfileRequest): Promise<UserProfileAssignment>;
2399
+ /** Clears the user's profile (back to every app's default configuration). */
2400
+ clearProfile(userId: string): Promise<void>;
2150
2401
  /**
2151
2402
  * Lists a user's API keys (display hints only — never tokens).
2152
2403
  *
@@ -2242,6 +2493,14 @@ declare class AccountClient {
2242
2493
  * role" in one request).
2243
2494
  */
2244
2495
  readonly userRoleAssignments: UserRoleAssignmentService;
2496
+ /**
2497
+ * Service for managing profiles (the org's user-types, one per user).
2498
+ */
2499
+ readonly profiles: ProfileService;
2500
+ /**
2501
+ * Service for the org-wide user-profile-assignment listing.
2502
+ */
2503
+ readonly userProfileAssignments: UserProfileAssignmentService;
2245
2504
  /**
2246
2505
  * Service for managing organizations.
2247
2506
  */
@@ -2481,7 +2740,7 @@ type Channel = 'slack' | 'email' | 'linkedin' | 'sms' | 'teams-chat' | 'telegram
2481
2740
  * meeting-bot family: adhoc-meeting dispatches by meeting URL; the calendar
2482
2741
  * keys auto-join through a user's connected calendar.
2483
2742
  */
2484
- type ConnectorKey = 'slack' | 'gmail' | 'outlook' | 'echo' | 'unipile-whatsapp' | 'unipile-linkedin' | 'unipile-telegram' | 'unipile-instagram' | 'unipile-messenger' | 'unipile-x' | 'adhoc-meeting' | 'google-calendar-meeting' | 'microsoft-calendar-meeting' | 'twilio-phone' | 'aircall' | 'webhook-cti';
2743
+ type ConnectorKey = 'slack' | 'gmail' | 'outlook' | 'echo' | 'unipile-whatsapp' | 'unipile-linkedin' | 'unipile-telegram' | 'unipile-instagram' | 'unipile-messenger' | 'unipile-x' | 'adhoc-meeting' | 'google-calendar-meeting' | 'microsoft-calendar-meeting' | 'twilio-phone' | 'aircall' | 'webhook-cti' | 'sendgrid';
2485
2744
  /**
2486
2745
  * Telephony lifecycle of one phone call, carried in the call conversation's
2487
2746
  * `metadata.call_status` (a call is a conversation plus call facts — no
@@ -2853,6 +3112,12 @@ interface Message {
2853
3112
  */
2854
3113
  child_conversation_id?: string;
2855
3114
  child_messages_total?: number;
3115
+ /**
3116
+ * Provider-side outcome + engagement projection of an OUTBOUND message on
3117
+ * a sending platform (folded from the channel_event ledger); absent on
3118
+ * channels that report nothing and on inbound rows.
3119
+ */
3120
+ delivery?: MessageDelivery;
2856
3121
  metadata: Record<string, unknown>;
2857
3122
  error: string;
2858
3123
  created_at: string;
@@ -2860,6 +3125,29 @@ interface Message {
2860
3125
  updated_at: string;
2861
3126
  updated_by: UserRef;
2862
3127
  }
3128
+ /**
3129
+ * Provider-side outcome of an outbound message — a separate axis from
3130
+ * MessageStatus (the message stays `sent` at the platform level once the
3131
+ * provider accepted it): sent → delivered | deferred | bounced | dropped.
3132
+ */
3133
+ type MessageDeliveryStatus = 'sent' | 'delivered' | 'deferred' | 'bounced' | 'dropped';
3134
+ /** The read-side fold of a message's channel events. */
3135
+ interface MessageDelivery {
3136
+ status: MessageDeliveryStatus;
3137
+ delivered_at?: string;
3138
+ bounced_at?: string;
3139
+ dropped_at?: string;
3140
+ /** First HUMAN open / click; totals count every event (machine opens excluded). */
3141
+ opened_at?: string;
3142
+ opens_total?: number;
3143
+ clicked_at?: string;
3144
+ clicks_total?: number;
3145
+ spam_reported_at?: string;
3146
+ unsubscribed_at?: string;
3147
+ /** Latest bounce / drop / deferral text. */
3148
+ reason?: string;
3149
+ last_event_at?: string;
3150
+ }
2863
3151
  /**
2864
3152
  * Per-trigger configuration, discriminated by the sibling trigger_type: channel
2865
3153
  * carries external_channel_id, keyword carries phrases, always/mention carry
@@ -3009,6 +3297,15 @@ interface SendMessageRequest {
3009
3297
  * `unsupported_content`.
3010
3298
  */
3011
3299
  attachments?: FileRef[];
3300
+ /**
3301
+ * Overrides the sending identity on a sending-platform email connection: a
3302
+ * contact address id on the connection's sender domain
3303
+ * (`connections.listSenders`). Without it: the conversation's pinned sender
3304
+ * → the acting user's own address on the domain → the connection's default.
3305
+ * Off-domain ids fail with `sender_not_found`; connections without a sender
3306
+ * domain refuse it with `sender_domain_not_available`.
3307
+ */
3308
+ sender_address_id?: string;
3012
3309
  }
3013
3310
  /**
3014
3311
  * Edits a status=draft message — full replacement of the editable surface
@@ -3348,6 +3645,8 @@ interface ListConversationsQuery extends PaginationQuery {
3348
3645
  /** Threads whose roster contains this external party — the person stream. */
3349
3646
  /** Contact stream: threads whose roster contains the resolved person. */
3350
3647
  contact_id?: string;
3648
+ /** "Sent as" stream: threads pinned to one sending identity (a contact address id). */
3649
+ sender_address_id?: string;
3351
3650
  /** Opt into the root/latest message projection on each row. */
3352
3651
  include?: 'messages_summary';
3353
3652
  }
@@ -3501,7 +3800,12 @@ type ContactSource = 'sync' | 'ingest' | 'manual' | 'merge';
3501
3800
  type ContactStatus = 'active' | 'merged' | 'archived' | 'erased';
3502
3801
  type ConsentStatus = 'unknown' | 'opted_in' | 'opted_out';
3503
3802
  type PermissionEventType = 'opt_in' | 'opt_out' | 'block' | 'unblock';
3504
- type PermissionEventSource = 'manual' | 'import' | 'link_click' | 'reply' | 'api' | 'system';
3803
+ /**
3804
+ * Where a permission event came from. `provider` = the sending platform
3805
+ * observed it (its unsubscribe link, a spam complaint relayed by the mailbox
3806
+ * provider, a hard bounce); `link_click` stays for OUR unsubscribe links.
3807
+ */
3808
+ type PermissionEventSource = 'manual' | 'import' | 'link_click' | 'reply' | 'api' | 'system' | 'provider';
3505
3809
  type MergeProposalStatus = 'proposed' | 'approved' | 'rejected' | 'superseded';
3506
3810
  type ErasureRequestStatus = 'requested' | 'completed';
3507
3811
  type RoomSource = 'sync' | 'ingest';
@@ -3639,6 +3943,12 @@ interface ListContactsQuery extends PaginationQuery {
3639
3943
  status?: ContactStatus;
3640
3944
  /** Members of one contact group (drives group-member lists). */
3641
3945
  group_key?: string;
3946
+ /**
3947
+ * The contact bound to one platform user (at most one active contact per
3948
+ * user per org); `'me'` resolves to the caller — a client's way to its own
3949
+ * contact.
3950
+ */
3951
+ platform_user_id?: string;
3642
3952
  }
3643
3953
  interface UpdateContactRequest {
3644
3954
  name?: string;
@@ -3660,8 +3970,18 @@ interface UpdateContactRequest {
3660
3970
  * rejects the create with 409 contact_address_taken.
3661
3971
  */
3662
3972
  interface CreateContactRequest {
3663
- name: string;
3664
- addresses: AttachContactAddressRequest[];
3973
+ /** Required without platform_user_id; with it, fills an empty name only. */
3974
+ name?: string;
3975
+ /** Required (≥1) without platform_user_id; with it, attached to the colleague's contact. */
3976
+ addresses?: AttachContactAddressRequest[];
3977
+ /**
3978
+ * Colleague mode: ensure the contact bound to this platform user (created
3979
+ * from the account directory, or the existing one — every colleague has
3980
+ * exactly one) and attach the addresses to it. 200 when it already
3981
+ * existed, 201 when created; 404 `platform_user_not_found`, 409
3982
+ * `contact_platform_user_conflict`.
3983
+ */
3984
+ platform_user_id?: string;
3665
3985
  /** IANA zone name; optional, validated as on update. */
3666
3986
  timezone?: string;
3667
3987
  /** BCP-47 language tag; optional, validated as on update. */
@@ -3881,7 +4201,7 @@ interface DispatchMeetingBotRequest {
3881
4201
  * period), frequency_cap (HOW OFTEN one contact may be contacted per rolling
3882
4202
  * period).
3883
4203
  */
3884
- type SendingRuleType = 'window' | 'limit' | 'frequency_cap';
4204
+ type SendingRuleType = 'window' | 'limit' | 'frequency_cap' | 'warmup';
3885
4205
  /** Rolling lookback ("last 24 hours from now") — never a calendar day. */
3886
4206
  type SendingPeriod = 'rolling_24h' | 'rolling_7d' | 'rolling_30d';
3887
4207
  /**
@@ -3914,13 +4234,100 @@ interface FrequencyCapRuleConfig {
3914
4234
  max_count: number;
3915
4235
  period: SendingPeriod;
3916
4236
  }
3917
- type SendingRuleConfig = WindowRuleConfig | LimitRuleConfig | FrequencyCapRuleConfig;
4237
+ /**
4238
+ * A limit that RAMPS: `start_count` acts of `action` per rolling `period` on
4239
+ * the day the warmup started, growing by `daily_increase` (a count, or a
4240
+ * percent of the previous day's allowance when `is_increase_percent`) every
4241
+ * UTC calendar day until `max_count`, after which it behaves as a plain
4242
+ * limit. `started_at` may be omitted on create — the server stamps now.
4243
+ */
4244
+ interface WarmupRuleConfig {
4245
+ action: ChannelActionType;
4246
+ start_count: number;
4247
+ daily_increase: number;
4248
+ is_increase_percent?: boolean;
4249
+ max_count: number;
4250
+ period: SendingPeriod;
4251
+ started_at: string;
4252
+ }
4253
+ type SendingRuleConfig = WindowRuleConfig | LimitRuleConfig | FrequencyCapRuleConfig | WarmupRuleConfig;
3918
4254
  /**
3919
4255
  * One outbound send constraint, defined once and LINKED to any number of
3920
4256
  * connections and/or channels (both empty = org-wide). Per rule type the most
3921
4257
  * specific tier wins at send time: names the connection > names the channel >
3922
4258
  * org-wide. Replies skip the rule when `is_reply_exempt`.
3923
4259
  */
4260
+ /**
4261
+ * Lifecycle of a conversation brief: `prepared` (open — editable, waiting for its
4262
+ * call), `used` (attached to a call conversation; terminal), `discarded`
4263
+ * (declined without a call; terminal).
4264
+ */
4265
+ type ConversationBriefStatus = 'prepared' | 'used' | 'discarded';
4266
+ /**
4267
+ * Guidance prepared AHEAD of a conversation — "talk to these people about
4268
+ * this" — the conversation sibling of a draft message. Binding to a
4269
+ * conversation is always explicit: the softphone carries the brief id into
4270
+ * the call (attached at call start), or `attach` names the conversation.
4271
+ * Nothing matches by contact or number, and any number of briefs may be open
4272
+ * for the same people at once. Records that want a brief (an activity) store
4273
+ * its id; every UI surface renders from the id.
4274
+ */
4275
+ interface ConversationBrief {
4276
+ id: string;
4277
+ org_id: string;
4278
+ /** Human label ("Renewal call with Dana"); may be empty. */
4279
+ subject: string;
4280
+ /** The people the conversation is with (≥ 1, deduplicated, sorted). */
4281
+ contact_ids: string[];
4282
+ /** How the conversation should happen (phone opens the softphone); absent = unspecified. */
4283
+ channel?: Channel;
4284
+ /** ConversationType key the conversation is meant to be; stamped on attach. */
4285
+ type_key?: string;
4286
+ /** The conversation the brief was used on; absent until used. */
4287
+ conversation_id?: string;
4288
+ status: ConversationBriefStatus;
4289
+ /** Guidance text (markdown allowed). */
4290
+ content: string;
4291
+ used_at?: string;
4292
+ created_at: string;
4293
+ created_by: UserRef;
4294
+ updated_at: string;
4295
+ updated_by: UserRef;
4296
+ }
4297
+ interface CreateConversationBriefRequest {
4298
+ subject?: string;
4299
+ /** The people the conversation is with (≥ 1). */
4300
+ contact_ids: string[];
4301
+ /** Must be a known channel when set. */
4302
+ channel?: Channel;
4303
+ /** Must name an existing conversation type when set. */
4304
+ type_key?: string;
4305
+ content: string;
4306
+ }
4307
+ /** PATCH semantics — absent fields keep their value. Only open briefs. */
4308
+ interface UpdateConversationBriefRequest {
4309
+ subject?: string;
4310
+ /** Replaces the set wholesale. */
4311
+ contact_ids?: string[];
4312
+ /** Empty string clears the channel. */
4313
+ channel?: Channel | '';
4314
+ content?: string;
4315
+ type_key?: string;
4316
+ }
4317
+ /** Binds an open brief to a conversation explicitly. */
4318
+ interface AttachConversationBriefRequest {
4319
+ conversation_id: string;
4320
+ }
4321
+ interface ListConversationBriefsQuery extends PaginationQuery {
4322
+ /** Briefs naming this person. */
4323
+ contact_id?: string;
4324
+ conversation_id?: string;
4325
+ channel?: Channel;
4326
+ type_key?: string;
4327
+ status?: ConversationBriefStatus;
4328
+ sort_by?: string;
4329
+ sort?: 'asc' | 'desc';
4330
+ }
3924
4331
  interface SendingRule {
3925
4332
  id: string;
3926
4333
  org_id: string;
@@ -3972,10 +4379,13 @@ interface SendingLimitPreset {
3972
4379
  description: string;
3973
4380
  connector_keys: ConnectorKey[];
3974
4381
  is_recommended: boolean;
3975
- rules: {
4382
+ rules: ({
3976
4383
  rule_type: 'limit';
3977
4384
  rule_config: LimitRuleConfig;
3978
- }[];
4385
+ } | {
4386
+ rule_type: 'warmup';
4387
+ rule_config: WarmupRuleConfig;
4388
+ })[];
3979
4389
  }
3980
4390
  interface ListSendingLimitPresetsQuery {
3981
4391
  connector_key?: ConnectorKey;
@@ -4014,6 +4424,222 @@ interface SendEligibility {
4014
4424
  contact_id?: string;
4015
4425
  contact_address_id?: string;
4016
4426
  }
4427
+ /**
4428
+ * One connector WIRED in this deployment (registry membership decides
4429
+ * availability). `install_modes` lists the install variants the environment
4430
+ * supports for a direct-install connector (a sending platform's own_account /
4431
+ * managed); empty for OAuth / install-free connectors.
4432
+ */
4433
+ /**
4434
+ * ONE sending identity of a domain-authenticated email connection: an email
4435
+ * contact address on the connection's sender domain. A personal sender belongs
4436
+ * to a colleague's contact (`platform_user` set); a shared mailbox (sales@) to
4437
+ * a role contact without one. Computed from the contact directory on read.
4438
+ */
4439
+ interface EmailSender {
4440
+ contact_address_id: string;
4441
+ contact_id: string;
4442
+ from_email: string;
4443
+ from_name: string;
4444
+ platform_user?: UserRef;
4445
+ /** The connection's fallback sender when neither the thread nor the user pins one. */
4446
+ is_default: boolean;
4447
+ }
4448
+ /** Pins a connection's default sender (an address on its sender domain). */
4449
+ interface SetDefaultSenderRequest {
4450
+ contact_address_id: string;
4451
+ }
4452
+ interface ConnectorCatalogEntry {
4453
+ key: ConnectorKey;
4454
+ channel: Channel;
4455
+ provider: ConnectorProvider;
4456
+ install_modes: string[];
4457
+ }
4458
+ /** One of a sending platform's suppression lists. */
4459
+ type EmailSuppressionKind = 'bounces' | 'blocks' | 'spam_reports' | 'invalid_emails' | 'unsubscribes';
4460
+ /**
4461
+ * Ledger rollup over the last `days` days: DISTINCT messages per event type
4462
+ * (machine opens excluded). Rates are fractions (0–1): delivery / bounce /
4463
+ * hard-bounce over sent, open / click / spam / unsubscribe over delivered.
4464
+ */
4465
+ interface EmailHealthWindow {
4466
+ days: number;
4467
+ sent: number;
4468
+ delivered: number;
4469
+ deferred: number;
4470
+ bounced: number;
4471
+ hard_bounced: number;
4472
+ dropped: number;
4473
+ opened: number;
4474
+ clicked: number;
4475
+ spam_reported: number;
4476
+ unsubscribed: number;
4477
+ delivery_rate: number;
4478
+ bounce_rate: number;
4479
+ hard_bounce_rate: number;
4480
+ open_rate: number;
4481
+ click_rate: number;
4482
+ spam_rate: number;
4483
+ unsubscribe_rate: number;
4484
+ }
4485
+ /** The provider's composite sender-quality score (1–5, computed daily). */
4486
+ interface EmailEngagementQuality {
4487
+ date: string;
4488
+ score: number;
4489
+ bounce_classification: number;
4490
+ bounce_rate: number;
4491
+ engagement_recency: number;
4492
+ open_rate: number;
4493
+ spam_rate: number;
4494
+ }
4495
+ /** The provider's own counters for this connection's traffic (its category). */
4496
+ interface EmailProviderStats {
4497
+ days: number;
4498
+ requests: number;
4499
+ processed: number;
4500
+ delivered: number;
4501
+ deferred: number;
4502
+ bounces: number;
4503
+ blocks: number;
4504
+ bounce_drops: number;
4505
+ invalid_emails: number;
4506
+ opens: number;
4507
+ unique_opens: number;
4508
+ clicks: number;
4509
+ unique_clicks: number;
4510
+ spam_reports: number;
4511
+ spam_report_drops: number;
4512
+ unsubscribes: number;
4513
+ unsubscribe_drops: number;
4514
+ }
4515
+ interface EmailSuppressionCounts {
4516
+ bounces: number;
4517
+ blocks: number;
4518
+ spam_reports: number;
4519
+ invalid_emails: number;
4520
+ unsubscribes: number;
4521
+ /** A list hit the page cap — the count is a floor. */
4522
+ is_approximate?: boolean;
4523
+ }
4524
+ interface EmailDnsRecord {
4525
+ host: string;
4526
+ type: string;
4527
+ data: string;
4528
+ is_valid: boolean;
4529
+ reason?: string;
4530
+ }
4531
+ interface EmailDomainStatus {
4532
+ domain: string;
4533
+ is_valid: boolean;
4534
+ dns: EmailDnsRecord[];
4535
+ }
4536
+ interface EmailSenderStatus {
4537
+ from_email: string;
4538
+ /** authenticated_domain | single_sender */
4539
+ mode: string;
4540
+ is_verified: boolean;
4541
+ }
4542
+ /** One dedicated IP of the account with its warmup state. */
4543
+ interface EmailIp {
4544
+ ip: string;
4545
+ is_warming_up: boolean;
4546
+ warmup_started_at?: string;
4547
+ pools: string[];
4548
+ }
4549
+ /**
4550
+ * The provider's account-level snapshot (refreshed daily by the connector's
4551
+ * sweep, or on demand with `refresh`). Every section is optional — a plan
4552
+ * without the feature or a failed pull leaves it absent and adds a warning.
4553
+ */
4554
+ interface EmailProviderHealth {
4555
+ engagement_quality?: EmailEngagementQuality;
4556
+ stats?: EmailProviderStats;
4557
+ suppressions?: EmailSuppressionCounts;
4558
+ domain?: EmailDomainStatus;
4559
+ sender?: EmailSenderStatus;
4560
+ ips: EmailIp[];
4561
+ warnings?: string[];
4562
+ refreshed_at: string;
4563
+ }
4564
+ /** GET /connections/:id/health — ledger windows + the provider snapshot. */
4565
+ interface EmailHealth {
4566
+ connection_id: string;
4567
+ windows: EmailHealthWindow[];
4568
+ provider?: EmailProviderHealth;
4569
+ }
4570
+ interface GetConnectionHealthQuery {
4571
+ /** Force a live provider pull (slow — several provider calls). */
4572
+ refresh?: boolean;
4573
+ }
4574
+ /** One address on a provider suppression list. */
4575
+ interface EmailSuppression {
4576
+ kind: EmailSuppressionKind;
4577
+ email: string;
4578
+ reason?: string;
4579
+ status?: string;
4580
+ created_at: string;
4581
+ }
4582
+ /**
4583
+ * ONE provider-observed occurrence about an outbound message on a sending
4584
+ * platform: the delivery lifecycle (processed → delivered | deferred |
4585
+ * bounced | dropped) and engagement (opened, clicked, spam_reported,
4586
+ * unsubscribed, resubscribed). Provider vocabularies map onto these inside
4587
+ * the connector.
4588
+ */
4589
+ type ChannelEventType = 'processed' | 'delivered' | 'deferred' | 'bounced' | 'dropped' | 'opened' | 'clicked' | 'spam_reported' | 'unsubscribed' | 'resubscribed';
4590
+ /** hard = the address is gone (suppressed); soft = this attempt was refused. */
4591
+ type BounceKind = 'hard' | 'soft';
4592
+ /** The provider's category of a bounce / block. */
4593
+ type BounceClassification = 'invalid_address' | 'technical_failure' | 'content' | 'reputation' | 'volume' | 'mailbox_unavailable' | 'unclassified';
4594
+ /**
4595
+ * One row of the channel_event ledger — the sibling of channel actions (acts
4596
+ * WE perform) and reactions (edges): something the provider or the recipient
4597
+ * did that we record. Append-only, deduped on the provider's event id.
4598
+ * Message.delivery and provider-sourced contact permission events derive
4599
+ * from it.
4600
+ */
4601
+ interface ChannelEvent {
4602
+ id: string;
4603
+ org_id: string;
4604
+ connection_id: string;
4605
+ connector_key: ConnectorKey;
4606
+ channel: Channel;
4607
+ /** The message the event is about; absent when unresolvable. */
4608
+ message_id?: string;
4609
+ conversation_id?: string;
4610
+ contact_id?: string;
4611
+ contact_address_id?: string;
4612
+ /** The provider's recipient (lowercased email). */
4613
+ recipient_address: string;
4614
+ event_type: ChannelEventType;
4615
+ external_event_id: string;
4616
+ external_message_id?: string;
4617
+ occurred_at: string;
4618
+ /** Bounce / deferral / drop text (the SMTP response, the drop reason). */
4619
+ reason?: string;
4620
+ response?: string;
4621
+ bounce_kind?: BounceKind;
4622
+ bounce_classification?: BounceClassification;
4623
+ /** The clicked link (clicked events). */
4624
+ url?: string;
4625
+ /** An opened event a mail client's privacy proxy generated, not the person. */
4626
+ is_machine_open?: boolean;
4627
+ metadata: Record<string, unknown>;
4628
+ created_at: string;
4629
+ created_by: UserRef;
4630
+ }
4631
+ interface ListChannelEventsQuery extends PaginationQuery {
4632
+ connection_id?: string;
4633
+ message_id?: string;
4634
+ conversation_id?: string;
4635
+ contact_id?: string;
4636
+ event_type?: ChannelEventType;
4637
+ /** ISO instants bounding occurred_at (from inclusive, until exclusive). */
4638
+ from?: string;
4639
+ until?: string;
4640
+ sort_by?: string;
4641
+ sort?: 'asc' | 'desc';
4642
+ }
4017
4643
  /**
4018
4644
  * Lifecycle of a channel action. Execution: pending → performed | failed.
4019
4645
  * Outcome (invitations): performed → accepted | declined | withdrawn |
@@ -4205,6 +4831,7 @@ declare class ConversationClient {
4205
4831
  * message nor a reaction — LinkedIn invitations, profile visits, InMail.
4206
4832
  */
4207
4833
  readonly channelActions: ChannelActionService;
4834
+ readonly channelEvents: ChannelEventService;
4208
4835
  /** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
4209
4836
  readonly glossaryTerms: GlossaryTermService;
4210
4837
  /** Conversation taxonomy: the types the pre-summary classifier assigns. */
@@ -4221,6 +4848,8 @@ declare class ConversationClient {
4221
4848
  /** Realtime speech-to-text (dictation) — moved here from agent-service. */
4222
4849
  readonly voice: VoiceService;
4223
4850
  readonly calls: CallService;
4851
+ /** Conversation briefs: guidance prepared ahead of a conversation (call, meeting) with a contact. */
4852
+ readonly conversationBriefs: ConversationBriefService;
4224
4853
  constructor(client: ProteosClient);
4225
4854
  }
4226
4855
  /** Meeting bots (Ava) — dispatch by meeting URL and removal. */
@@ -4282,12 +4911,43 @@ interface ConnectionService {
4282
4911
  listContactAddresses(connectionId: string, query?: ListContactAddressesQuery): Promise<ListResponse<ContactAddress>>;
4283
4912
  /** Search a connection's addressable VENUES (Slack channels) for the compose picker. */
4284
4913
  listRooms(connectionId: string, query?: ListRoomsQuery): Promise<ListResponse<Room>>;
4914
+ /**
4915
+ * Deliverability of a sending-platform connection (SendGrid): rates from
4916
+ * the channel_event ledger + the provider's snapshot (engagement quality,
4917
+ * counters, suppression counts, domain/sender state, dedicated IPs).
4918
+ * `email_provider_not_supported` on mailbox connectors.
4919
+ */
4920
+ getHealth(connectionId: string, query?: GetConnectionHealthQuery): Promise<EmailHealth>;
4921
+ /** Ask the provider to re-check the sending domain's DNS. */
4922
+ validateDomain(connectionId: string): Promise<EmailDomainStatus>;
4923
+ /** Re-send the single-sender verification mail (no-op on an authenticated domain). */
4924
+ resendSenderVerification(connectionId: string): Promise<void>;
4925
+ /** Read one provider suppression list live. */
4926
+ listSuppressions(connectionId: string, kind: EmailSuppressionKind): Promise<EmailSuppression[]>;
4927
+ /** Take an address off one provider suppression list (a false positive). */
4928
+ removeSuppression(connectionId: string, kind: EmailSuppressionKind, email: string): Promise<void>;
4929
+ /** Start / stop the provider's automated warmup on a dedicated IP. */
4930
+ setIpWarmup(connectionId: string, ip: string, isEnabled: boolean): Promise<void>;
4931
+ /** The runtime connector catalog: what is wired in this environment + install modes. */
4932
+ listConnectors(): Promise<ConnectorCatalogEntry[]>;
4933
+ /**
4934
+ * The sender directory of a domain-authenticated email connection: every
4935
+ * email contact address on its domain (colleagues + shared mailboxes), the
4936
+ * default flagged. Empty on connections without a sender domain.
4937
+ */
4938
+ listSenders(connectionId: string): Promise<EmailSender[]>;
4939
+ /** Pin the connection's fallback sender; returns the refreshed directory. */
4940
+ setDefaultSender(connectionId: string, request: SetDefaultSenderRequest): Promise<EmailSender[]>;
4285
4941
  }
4286
4942
  /** The person-level identity layer: contacts, addresses, merges, permissions, erasure. */
4287
4943
  interface ContactService {
4288
4944
  list(query?: ListContactsQuery): Promise<ListResponse<Contact>>;
4289
4945
  get(id: string): Promise<Contact>;
4290
- /** Manually mint a contact (sync dedup — 409 contact_address_taken on any owned address). */
4946
+ /**
4947
+ * Manually mint a contact (sync dedup — 409 contact_address_taken on any
4948
+ * owned address), or with `platform_user_id` ensure a colleague's bound
4949
+ * contact and attach the addresses to it.
4950
+ */
4291
4951
  create(request: CreateContactRequest): Promise<Contact>;
4292
4952
  update(id: string, request: UpdateContactRequest): Promise<Contact>;
4293
4953
  attachAddress(contactId: string, request: AttachContactAddressRequest): Promise<Contact>;
@@ -4515,6 +5175,26 @@ interface CallService {
4515
5175
  }>;
4516
5176
  }
4517
5177
 
5178
+ /**
5179
+ * Conversation briefs — guidance prepared ahead of a conversation ("talk to
5180
+ * these people about this"; the conversation sibling of message drafts).
5181
+ * Binding is explicit: the softphone carries the brief id into the call, or
5182
+ * `attach` names the conversation. Any number of briefs may be open for the
5183
+ * same people. Edits/attach on a non-open brief fail 409
5184
+ * `conversation_brief_not_editable`; a conversation already carrying a brief
5185
+ * refuses another (409 `conversation_brief_already_attached`).
5186
+ */
5187
+ interface ConversationBriefService {
5188
+ list(query?: ListConversationBriefsQuery): Promise<ListResponse<ConversationBrief>>;
5189
+ get(id: string): Promise<ConversationBrief>;
5190
+ create(request: CreateConversationBriefRequest): Promise<ConversationBrief>;
5191
+ update(id: string, request: UpdateConversationBriefRequest): Promise<ConversationBrief>;
5192
+ /** Decline an open brief (prepared → discarded, terminal). */
5193
+ discard(id: string): Promise<ConversationBrief>;
5194
+ /** Bind an open brief to a conversation explicitly (prepared → used). */
5195
+ attach(id: string, request: AttachConversationBriefRequest): Promise<ConversationBrief>;
5196
+ delete(id: string): Promise<void>;
5197
+ }
4518
5198
  /**
4519
5199
  * Sending rules — outbound send constraints (windows, connection limits,
4520
5200
  * frequency caps), the static limit-preset catalog and its apply expansion.
@@ -4560,6 +5240,17 @@ interface ChannelActionService {
4560
5240
  /** Answers an inbound act (a received invitation). */
4561
5241
  respond(id: string, request: RespondChannelActionRequest): Promise<ChannelAction>;
4562
5242
  }
5243
+ /**
5244
+ * The channel_event ledger — provider-observed delivery / engagement events
5245
+ * about outbound messages (delivered, bounced, opened, clicked,
5246
+ * spam_reported, unsubscribed, …). Read-only: rows are appended by webhook
5247
+ * ingest. `listByMessage` is the per-message history, oldest first.
5248
+ */
5249
+ interface ChannelEventService {
5250
+ list(query?: ListChannelEventsQuery): Promise<ListResponse<ChannelEvent>>;
5251
+ get(id: string): Promise<ChannelEvent>;
5252
+ listByMessage(messageId: string): Promise<ListResponse<ChannelEvent>>;
5253
+ }
4563
5254
 
4564
5255
  /**
4565
5256
  * A single row from a query result. Keys match the result-set columns
@@ -7284,6 +7975,8 @@ interface Workflow extends AuditFields {
7284
7975
  key: string;
7285
7976
  name: string;
7286
7977
  description: string;
7978
+ /** Slug of the module that deployed this workflow; empty when it is org-owned. */
7979
+ module_slug: string;
7287
7980
  status: WorkflowStatus;
7288
7981
  graph: WorkflowGraph;
7289
7982
  version: number;
@@ -7353,6 +8046,15 @@ interface ListWorkflowsOptions extends ListOptions {
7353
8046
  name?: string;
7354
8047
  'name[contains]'?: string;
7355
8048
  status?: WorkflowStatus;
8049
+ /**
8050
+ * Restrict to one module's workflows. The empty string is meaningful: it
8051
+ * matches only the org-owned workflows no module deployed.
8052
+ *
8053
+ * `sort_by` additionally accepts a comma-separated list of sortable fields
8054
+ * (`module_slug,name`) so a grouped list can order by its grouping column
8055
+ * first; `sort_direction` applies to all of them.
8056
+ */
8057
+ module_slug?: string;
7356
8058
  }
7357
8059
  /**
7358
8060
  * The author of a workflow version — a common {@link UserRef} that the
@@ -7616,4 +8318,4 @@ declare class WorkflowClient {
7616
8318
  constructor(client: ProteosClient);
7617
8319
  }
7618
8320
 
7619
- export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddTeamMemberRequest, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type ApiKey, type AppendEventRequest, type ApplySendingLimitPresetRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type CallStatus, type CallTokenResponse, type Channel, type ChannelAction, type ChannelActionCapability, type ChannelActionParams, type ChannelActionResponse, type ChannelActionService, type ChannelActionStatus, type ChannelActionTargetKind, type ChannelActionType, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateApiKeyRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSendingRuleRequest, type CreateSessionRequest, type CreateSpaceRequest, type CreateTeamRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CreatedApiKey, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, type FrequencyCapRuleConfig, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InmailParams, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvitationParams, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type KnowledgeSpace, type LabelService, type LimitRuleConfig, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListChannelActionsQuery, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrgUserRoleAssignmentsOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSendingLimitPresetsQuery, type ListSendingRulesQuery, type ListSessionsOptions, type ListSkillsOptions, type ListSpacesOptions, type ListTeamMembersOptions, type ListTeamsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MintCallTokenRequest, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type PerformChannelActionRequest, type Permission, type PermissionEventSource, type PermissionEventType, type PhoneNumber, type PhoneNumberRouting, type PhoneNumberStatus, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type ProfileVisitParams, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type RespondChannelActionRequest, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RoutingTarget, type RunWorkflowRequest, SCOPED_PLATFORM_ENTITY_SLUGS, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendEligibility, type SendEligibilityRequest, type SendMessageRequest, type SendRecipient, type SendingLimitPreset, type SendingPeriod, type SendingRule, type SendingRuleConfig, type SendingRuleService, type SendingRuleType, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type SharePermission, type ShareRow, type ShareService, type Skill, type SkillBundle, type SkillService, type SkillVersion, type SpaceService, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type Team, type TeamMember, type TeamService, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, UNASSIGNED_SPACE_SLUG, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateMeRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePhoneNumberRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateSendingRuleRequest, type UpdateSpaceRequest, type UpdateTeamRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, type UserRoleAssignmentService, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Weekday, type WindowDay, type WindowRuleConfig, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, shareRouteFor, toQueryParams, toQueryString };
8321
+ export { type AcceptMistranscribedTermRequest, AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddTeamMemberRequest, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentListener, type AgentListenerAcknowledgementConfig, type AgentListenerAcknowledgementType, type AgentListenerActingUserMode, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, type ApiKey, type AppendEventRequest, type ApplySendingLimitPresetRequest, type AssignPermissionRequest, type AssignRoleRequest, type AttachContactAddressRequest, type AttachConversationBriefRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type AutomatedFilterConfig, type AutomatedSignal, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type BlockContactRequest, type BounceClassification, type BounceKind, type CallStatus, type CallTokenResponse, type Channel, type ChannelAction, type ChannelActionCapability, type ChannelActionParams, type ChannelActionResponse, type ChannelActionService, type ChannelActionStatus, type ChannelActionTargetKind, type ChannelActionType, type ChannelEvent, type ChannelEventService, type ChannelEventType, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, type ConnectionSyncRange, type ConnectionSyncStatus, type Connector, type ConnectorCatalogEntry, ConnectorClient, type ConnectorConnection, type ConnectionScope$1 as ConnectorConnectionScope, type ConnectionStatus$1 as ConnectorConnectionStatus, type ConnectionTokenResponse as ConnectorConnectionTokenResponse, type CredentialKind as ConnectorCredentialKind, type ConnectorKey, type ConnectorMethod, type ConnectorProvider, type ConsentStatus, type ConsumerGroup, type Contact, type ContactAddress, type ContactAddressKind, type ContactAddressSource, type ContactErasureRequest, type ContactGroup, type ContactGroupService, type ContactGroupSource, type ContactMergeProposal, type ContactRef, type ContactService, type ContactSource, type ContactStatus, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, type ConversationBrief, type ConversationBriefService, type ConversationBriefStatus, ConversationClient, type ConversationFilter, type ConversationFilterAction, type ConversationFilterConfig, type ConversationFilterEvent, type ConversationFilterService, type ConversationFilterType, type ConversationParticipant, type ConversationService, type ConversationStatus, type ConversationSummaryStatus, type ConversationType, type ConversationTypeConfig, type ConversationTypeService, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateApiKeyRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateContactGroupRequest, type CreateContactRequest, type CreateConversationBriefRequest, type CreateConversationFilterRequest, type CreateConversationTypeRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreateProfileRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSendingRuleRequest, type CreateSessionRequest, type CreateSpaceRequest, type CreateTeamRequest, type CreateToneProfileSetupRequest, type CreateToolRequest, type CreateToolsetRequest, type CreateUserRequest, type CreateWorkflowRequest, type CreatedApiKey, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DependentAgent, type DependentSyncResult, type DispatchMeetingBotRequest, type DisplayOptions, type DomainFilterConfig, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmailDnsRecord, type EmailDomainStatus, type EmailEngagementQuality, type EmailHealth, type EmailHealthWindow, type EmailIp, type EmailProviderHealth, type EmailProviderStats, type EmailSender, type EmailSenderStatus, type EmailSuppression, type EmailSuppressionCounts, type EmailSuppressionKind, type EmptyPayload, type ErasureRequestStatus, ErrorCode, type ErrorCodeType, type ErrorPayload, type EventTriggerParams, type EventType, type EventVerb, EventsClient, type ExecutionError, type ExecutionStatus, type ExecutionTriggerContext, type FileBlock, FileRef, type FileService, type FileVersionContent, type FilterMatchOn, type FrequencyCapRuleConfig, FunctionsClient, type GetConnectionHealthQuery, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InmailParams, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, type InvitationParams, type InvokeActionResponse, type InvokeNodeMethodRequest, type InvokeNodeMethodResponse, type Item, type KickoffSource, type KickoffType, KnowledgeClient, type KnowledgeGraph, type KnowledgeGraphLink, type KnowledgeGraphNode, type KnowledgeLabel, KnowledgeLabelSchema, type KnowledgeLink, KnowledgeLinkSchema, type KnowledgeNode, type KnowledgeNodeLabel, KnowledgeNodeLabelSchema, type KnowledgeNodeMetadata, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, type KnowledgeNodeSearchResult, KnowledgeNodeSearchResultSchema, type KnowledgeRecordLink, KnowledgeRecordLinkSchema, type KnowledgeSpace, type LabelService, type LimitRuleConfig, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListChannelActionsQuery, type ListChannelEventsQuery, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactGroupsQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationBriefsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationTypesQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListMistranscribedTermsQuery, type ListNodesOptions, ListOptions, type ListOrgUserRoleAssignmentsOptions, type ListOrganizationsOptions, type ListProfilesOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSendingLimitPresetsQuery, type ListSendingRulesQuery, type ListSessionsOptions, type ListSkillsOptions, type ListSpacesOptions, type ListTeamMembersOptions, type ListTeamsOptions, type ListToneProfileSetupsQuery, type ListToneProfilesQuery, type ListToolsOptions, type ListToolsetsOptions, type ListUserProfileAssignmentsOptions, type ListUserRoleAssignmentsOptions, type ListUsersOptions, type ListWorkflowsOptions, type ManualTriggerParams, type MatchMode, type McpBinding, type McpConnectionState, type McpConnectionStatus, type McpServer, type McpServerAuth, type McpServerOAuth, type McpServerService, type McpToolSummary, type MeService, type MeetingService, type MergeContactsRequest, type MergeProposalStatus, type Message, type ContentBlock as MessageContentBlock, type MessageDelivery, type MessageDeliveryStatus, type MessageDirection, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, type MintCallTokenRequest, type MistranscribedTerm, type MistranscribedTermService, type MistranscribedTermStatus, type MistranscriptionSuggestionSource, type ModelCallParams, type ModelConfig, type ModelRequestEndPayload, type ModelRequestStartPayload, type ModelUsage, type NeighborDirection, type NeighborEdge, type NeighborNode, type NeighborsOptions, type NodeContentMatches, type NodeDescriptor, type NodeExecution, type NodeGroup, type NodeMethodOption, type NodeNeighborhood, NodeNeighborhoodSchema, type NodeOutline, type NodePosition, type NodeProperty, type NodeRetryPolicy, type NodeRuntime, type NodeService, type NodeStatus, type NodeType, type NodeTypeKey, type NodeTypeService, type NodeTypeStatus, type OnErrorPolicy, type Organization, OrganizationSchema, type OrganizationService, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type PerformChannelActionRequest, type Permission, type PermissionEventSource, type PermissionEventType, type PhoneNumber, type PhoneNumberRouting, type PhoneNumberStatus, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, type Profile, ProfileSchema, type ProfileService, type ProfileVisitParams, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, type QueryBinding, type QueryExecuteMeta, type QueryExecuteResponse, type QueryObject, type QueryRow, type QueryService, type QueryValidateMeta, type QueryValidateResponse, type QueryValue, type Reaction, type ReactionCapability, type ReactionOption, type ReactionSetKind, type ReasoningPayload, type RecipientKind, type RecipientRole, type RecordData, type RecordLinkService, type RecordPermissionEventRequest, type RecordService, type RedriveResult, type ResolveToneProfileQuery, type RespondChannelActionRequest, type ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RoutingTarget, type RunWorkflowRequest, SCOPED_PLATFORM_ENTITY_SLUGS, type SearchContentRequest, type SearchContentResponse, type SearchNodesRequest, type SendEligibility, type SendEligibilityRequest, type SendMessageRequest, type SendRecipient, type SendingLimitPreset, type SendingPeriod, type SendingRule, type SendingRuleConfig, type SendingRuleService, type SendingRuleType, type Session, type SessionEvent, type SessionEventEnvelope, type SessionEventsOptions, type SessionIdlePayload, type SessionService, type SessionStatus, type SessionStreamOptions, type SessionUpdatedPayload, type SetDefaultSenderRequest, type SetProfileRequest, type SharePermission, type ShareRow, type ShareService, type Skill, type SkillBundle, type SkillService, type SkillVersion, type SpaceService, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type SyncConnectionRequest, type SystemSource, type TailOptions, type Team, type TeamMember, type TeamService, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type ToneProfile, type ToneProfileScope, type ToneProfileService, type ToneProfileSetup, type ToneProfileSetupStatus, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Toolset, type ToolsetKind, type ToolsetService, type ToolsetToolSummary, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TranscriptTurn, type Transcription, type TranscriptionReviewStatus, type TranscriptionStatus, type TriggerKind, type Turn, UNASSIGNED_SPACE_SLUG, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactGroupRequest, type UpdateContactRequest, type UpdateConversationBriefRequest, type UpdateConversationFilterRequest, type UpdateConversationTypeRequest, type UpdateDraftRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateMeRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePhoneNumberRequest, type UpdateProfileRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateSendingRuleRequest, type UpdateSpaceRequest, type UpdateTeamRequest, type UpdateToolRequest, type UpdateToolsetRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, type UserProfileAssignment, UserProfileAssignmentSchema, type UserProfileAssignmentService, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, type UserRoleAssignmentService, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WarmupRuleConfig, type WebhookTriggerParams, type Weekday, type WindowDay, type WindowRuleConfig, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowExecution, type WorkflowGraph, type WorkflowNode, type WorkflowNodeType, type WorkflowStatus, type WorkflowVersion, type WorkflowVersionAuthor, type WorkflowVersionSummary, type WriteContentResponse, type WriteCredentialsRequest, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, shareRouteFor, toQueryParams, toQueryString };