@proteos/sdk 0.49.0 → 0.51.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.
package/dist/index.d.cts 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.cjs';
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.cjs';
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-.cjs';
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-.cjs';
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
@@ -2684,6 +2943,14 @@ interface Connection {
2684
2943
  supports_reactions: boolean;
2685
2944
  /** The capability descriptor; absent when unsupported. */
2686
2945
  reactions?: ReactionCapability;
2946
+ /**
2947
+ * Computed on read like reactions: the channel actions the connector
2948
+ * performs through this connection (invitation, profile_visit, inmail, …).
2949
+ * A separate list from reactions — a reaction toggles an edge on a
2950
+ * message, an action is a performed act with its own lifecycle. Absent
2951
+ * when the connector performs none.
2952
+ */
2953
+ actions?: ChannelActionCapability[];
2687
2954
  /**
2688
2955
  * Computed on read like supports_reactions: who operates the integration
2689
2956
  * (native | unipile). Absent when the connector is not registered in this
@@ -2845,6 +3112,12 @@ interface Message {
2845
3112
  */
2846
3113
  child_conversation_id?: string;
2847
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;
2848
3121
  metadata: Record<string, unknown>;
2849
3122
  error: string;
2850
3123
  created_at: string;
@@ -2852,6 +3125,29 @@ interface Message {
2852
3125
  updated_at: string;
2853
3126
  updated_by: UserRef;
2854
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
+ }
2855
3151
  /**
2856
3152
  * Per-trigger configuration, discriminated by the sibling trigger_type: channel
2857
3153
  * carries external_channel_id, keyword carries phrases, always/mention carry
@@ -3001,6 +3297,15 @@ interface SendMessageRequest {
3001
3297
  * `unsupported_content`.
3002
3298
  */
3003
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;
3004
3309
  }
3005
3310
  /**
3006
3311
  * Edits a status=draft message — full replacement of the editable surface
@@ -3340,6 +3645,8 @@ interface ListConversationsQuery extends PaginationQuery {
3340
3645
  /** Threads whose roster contains this external party — the person stream. */
3341
3646
  /** Contact stream: threads whose roster contains the resolved person. */
3342
3647
  contact_id?: string;
3648
+ /** "Sent as" stream: threads pinned to one sending identity (a contact address id). */
3649
+ sender_address_id?: string;
3343
3650
  /** Opt into the root/latest message projection on each row. */
3344
3651
  include?: 'messages_summary';
3345
3652
  }
@@ -3493,7 +3800,12 @@ type ContactSource = 'sync' | 'ingest' | 'manual' | 'merge';
3493
3800
  type ContactStatus = 'active' | 'merged' | 'archived' | 'erased';
3494
3801
  type ConsentStatus = 'unknown' | 'opted_in' | 'opted_out';
3495
3802
  type PermissionEventType = 'opt_in' | 'opt_out' | 'block' | 'unblock';
3496
- 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';
3497
3809
  type MergeProposalStatus = 'proposed' | 'approved' | 'rejected' | 'superseded';
3498
3810
  type ErasureRequestStatus = 'requested' | 'completed';
3499
3811
  type RoomSource = 'sync' | 'ingest';
@@ -3522,6 +3834,14 @@ interface Contact {
3522
3834
  /** Merge tombstone redirect (set when status is 'merged'). */
3523
3835
  merged_into_contact_id?: string;
3524
3836
  source: ContactSource;
3837
+ /** IANA zone name (Europe/Berlin); absent = unknown. Filled from directory sweeps while empty. */
3838
+ timezone?: string;
3839
+ /**
3840
+ * BCP-47 language tag with optional region (de, de-CH, pt-BR); absent =
3841
+ * unknown. Named locale, not language: the region carries formatting
3842
+ * conventions on top of the language.
3843
+ */
3844
+ locale?: string;
3525
3845
  /** ContactGroup membership (one group per contact); absent = unassigned. */
3526
3846
  group_key?: string;
3527
3847
  /**
@@ -3623,11 +3943,21 @@ interface ListContactsQuery extends PaginationQuery {
3623
3943
  status?: ContactStatus;
3624
3944
  /** Members of one contact group (drives group-member lists). */
3625
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;
3626
3952
  }
3627
3953
  interface UpdateContactRequest {
3628
3954
  name?: string;
3629
3955
  status?: 'active' | 'archived';
3630
3956
  has_legal_hold?: boolean;
3957
+ /** IANA zone name; normalized server-side, 400 contact_timezone_invalid when unparseable; '' clears. */
3958
+ timezone?: string;
3959
+ /** BCP-47 language tag; normalized server-side, 400 contact_locale_invalid when unparseable; '' clears. */
3960
+ locale?: string;
3631
3961
  /**
3632
3962
  * Assigns the contact to a contact group ('' clears). A PATCH assignment is
3633
3963
  * stamped group_source='manual' — tone synthesis never overrides it.
@@ -3640,8 +3970,22 @@ interface UpdateContactRequest {
3640
3970
  * rejects the create with 409 contact_address_taken.
3641
3971
  */
3642
3972
  interface CreateContactRequest {
3643
- name: string;
3644
- 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;
3985
+ /** IANA zone name; optional, validated as on update. */
3986
+ timezone?: string;
3987
+ /** BCP-47 language tag; optional, validated as on update. */
3988
+ locale?: string;
3645
3989
  }
3646
3990
  interface AttachContactAddressRequest {
3647
3991
  kind: ContactAddressKind;
@@ -3851,6 +4195,545 @@ interface DispatchMeetingBotRequest {
3851
4195
  */
3852
4196
  language?: string;
3853
4197
  }
4198
+ /**
4199
+ * Discriminates a sending rule: window (WHEN sending is allowed, recipient-
4200
+ * local weekday ranges), limit (HOW MUCH one connection may send per rolling
4201
+ * period), frequency_cap (HOW OFTEN one contact may be contacted per rolling
4202
+ * period).
4203
+ */
4204
+ type SendingRuleType = 'window' | 'limit' | 'frequency_cap' | 'warmup';
4205
+ /** Rolling lookback ("last 24 hours from now") — never a calendar day. */
4206
+ type SendingPeriod = 'rolling_24h' | 'rolling_7d' | 'rolling_30d';
4207
+ /**
4208
+ * ONE kind of act performed through a channel connection — shared by a
4209
+ * limit's `action` (what it counts), a channel action's `action_type` (what
4210
+ * was performed) and the eligibility check. `message` is the plain send
4211
+ * (valid on a limit, never on a channel action row).
4212
+ */
4213
+ type ChannelActionType = 'message' | 'invitation' | 'inmail' | 'profile_visit';
4214
+ type Weekday = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
4215
+ /** One open range on one weekday, "HH:MM" wall-clock, from < until, same day. */
4216
+ interface WindowDay {
4217
+ day: Weekday;
4218
+ from: string;
4219
+ until: string;
4220
+ }
4221
+ interface WindowRuleConfig {
4222
+ days: WindowDay[];
4223
+ /** IANA zone used for contacts without a timezone. */
4224
+ fallback_timezone: string;
4225
+ }
4226
+ interface LimitRuleConfig {
4227
+ action: ChannelActionType;
4228
+ max_count: number;
4229
+ period: SendingPeriod;
4230
+ /** Minimum spacing between consecutive sends; 0/absent = none. */
4231
+ min_gap_seconds?: number;
4232
+ }
4233
+ interface FrequencyCapRuleConfig {
4234
+ max_count: number;
4235
+ period: SendingPeriod;
4236
+ }
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;
4254
+ /**
4255
+ * One outbound send constraint, defined once and LINKED to any number of
4256
+ * connections and/or channels (both empty = org-wide). Per rule type the most
4257
+ * specific tier wins at send time: names the connection > names the channel >
4258
+ * org-wide. Replies skip the rule when `is_reply_exempt`.
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
+ }
4331
+ interface SendingRule {
4332
+ id: string;
4333
+ org_id: string;
4334
+ name: string;
4335
+ connection_ids: string[];
4336
+ channels: Channel[];
4337
+ rule_type: SendingRuleType;
4338
+ rule_config?: SendingRuleConfig;
4339
+ is_enabled: boolean;
4340
+ is_reply_exempt: boolean;
4341
+ created_at: string;
4342
+ created_by: UserRef;
4343
+ updated_at: string;
4344
+ updated_by: UserRef;
4345
+ }
4346
+ interface CreateSendingRuleRequest {
4347
+ name?: string;
4348
+ connection_ids?: string[];
4349
+ channels?: Channel[];
4350
+ rule_type: SendingRuleType;
4351
+ rule_config: Record<string, unknown>;
4352
+ /** Defaults to true. */
4353
+ is_enabled?: boolean;
4354
+ /** Defaults per type: window + frequency_cap true, limit false. */
4355
+ is_reply_exempt?: boolean;
4356
+ }
4357
+ interface UpdateSendingRuleRequest {
4358
+ name?: string;
4359
+ /** Replaces the stored links wholesale when present. */
4360
+ connection_ids?: string[];
4361
+ channels?: Channel[];
4362
+ /** rule_type and rule_config must be sent together. */
4363
+ rule_type?: SendingRuleType;
4364
+ rule_config?: Record<string, unknown>;
4365
+ is_enabled?: boolean;
4366
+ is_reply_exempt?: boolean;
4367
+ }
4368
+ interface ListSendingRulesQuery extends PaginationQuery {
4369
+ /** Rules LINKED to this connection. */
4370
+ connection_id?: string;
4371
+ channel?: Channel;
4372
+ rule_type?: SendingRuleType;
4373
+ is_enabled?: boolean;
4374
+ }
4375
+ /** A recommended limit bundle for one class of sender account (static catalog). */
4376
+ interface SendingLimitPreset {
4377
+ key: string;
4378
+ name: string;
4379
+ description: string;
4380
+ connector_keys: ConnectorKey[];
4381
+ is_recommended: boolean;
4382
+ rules: ({
4383
+ rule_type: 'limit';
4384
+ rule_config: LimitRuleConfig;
4385
+ } | {
4386
+ rule_type: 'warmup';
4387
+ rule_config: WarmupRuleConfig;
4388
+ })[];
4389
+ }
4390
+ interface ListSendingLimitPresetsQuery {
4391
+ connector_key?: ConnectorKey;
4392
+ }
4393
+ interface ApplySendingLimitPresetRequest {
4394
+ connection_ids: string[];
4395
+ preset_key: string;
4396
+ }
4397
+ /** Dry-run twin of SendMessageRequest: addressing only, nothing minted. */
4398
+ interface SendEligibilityRequest {
4399
+ conversation_id?: string;
4400
+ reply_to_message_id?: string;
4401
+ connection_id?: string;
4402
+ to?: SendRecipient[];
4403
+ cc?: SendRecipient[];
4404
+ bcc?: SendRecipient[];
4405
+ /**
4406
+ * Widens the check to a channel action (invitation, profile_visit, inmail):
4407
+ * originate mode only, the first `to` recipient is the target. Absent =
4408
+ * message.
4409
+ */
4410
+ action_type?: ChannelActionType;
4411
+ }
4412
+ /**
4413
+ * "May this send go out now?" — `reason` is the error code a real send would
4414
+ * fail with (sending_window_closed | sending_limit_reached |
4415
+ * frequency_cap_reached | contact_blocked | contact_opted_out);
4416
+ * `earliest_allowed_at` is set for the temporal three.
4417
+ */
4418
+ interface SendEligibility {
4419
+ is_allowed: boolean;
4420
+ reason?: string;
4421
+ rule_id?: string;
4422
+ rule_type?: SendingRuleType;
4423
+ earliest_allowed_at?: string;
4424
+ contact_id?: string;
4425
+ contact_address_id?: string;
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
+ }
4643
+ /**
4644
+ * Lifecycle of a channel action. Execution: pending → performed | failed.
4645
+ * Outcome (invitations): performed → accepted | declined | withdrawn |
4646
+ * expired; an inbound received invitation starts pending and ends
4647
+ * accepted | declined | expired.
4648
+ */
4649
+ type ChannelActionStatus = 'pending' | 'performed' | 'failed' | 'accepted' | 'declined' | 'withdrawn' | 'expired';
4650
+ /** Our answer to an inbound channel action (a received invitation). */
4651
+ type ChannelActionResponse = 'accept' | 'decline';
4652
+ /** What an action type acts on: a person on the channel, or an external object. */
4653
+ type ChannelActionTargetKind = 'contact-address' | 'external';
4654
+ /**
4655
+ * One action type a connector performs, projected onto `connection.actions`.
4656
+ */
4657
+ interface ChannelActionCapability {
4658
+ action_type: ChannelActionType;
4659
+ target_kind: ChannelActionTargetKind;
4660
+ /** The act can be withdrawn after performing (an invitation). */
4661
+ is_cancelable: boolean;
4662
+ /** An inbound act of this type can be answered (accept / decline). */
4663
+ is_respondable: boolean;
4664
+ /** Performing also sends a message that lands as a Message + Conversation (InMail). */
4665
+ is_message_minting: boolean;
4666
+ /** Bound of the free-text note the act carries (LinkedIn invitation: 300). */
4667
+ max_note_length?: number;
4668
+ }
4669
+ interface InvitationParams {
4670
+ note?: string;
4671
+ email?: string;
4672
+ }
4673
+ type ProfileVisitParams = Record<string, never>;
4674
+ interface InmailParams {
4675
+ subject?: string;
4676
+ content: ContentBlock[];
4677
+ }
4678
+ type ChannelActionParams = InvitationParams | ProfileVisitParams | InmailParams;
4679
+ /**
4680
+ * One act performed through a channel connection that is neither a message
4681
+ * nor a reaction — a LinkedIn invitation, a profile visit, an InMail (which
4682
+ * ALSO mints a message, see message_id). A LEDGER row: appended, transitioned
4683
+ * along its lifecycle, never toggled. `direction` outbound = we acted;
4684
+ * inbound = someone acted on us (a received invitation you may answer).
4685
+ * `created_by` is the performer on outbound rows (user or agent), the system
4686
+ * on ingested inbound rows; `updated_by` who accepted / declined / withdrew.
4687
+ */
4688
+ interface ChannelAction {
4689
+ id: string;
4690
+ org_id: string;
4691
+ connection_id: string;
4692
+ connector_key: ConnectorKey;
4693
+ channel: Channel;
4694
+ action_type: ChannelActionType;
4695
+ direction: MessageDirection;
4696
+ status: ChannelActionStatus;
4697
+ contact_id?: string;
4698
+ contact_address_id?: string;
4699
+ /** The provider-side identity acted on (a LinkedIn member id). */
4700
+ target_external_id: string;
4701
+ contact: ContactRef;
4702
+ /** An InMail's minted message; an invitation's note-chat once accepted. */
4703
+ message_id?: string;
4704
+ conversation_id?: string;
4705
+ params?: ChannelActionParams;
4706
+ /** The provider handle (Unipile invitation id) — cancel / respond key. */
4707
+ external_action_id?: string;
4708
+ error?: string;
4709
+ occurred_at: string;
4710
+ resolved_at?: string;
4711
+ /** Provider enrichment: invitation usage %, network_distance, … */
4712
+ metadata: Record<string, unknown>;
4713
+ created_at: string;
4714
+ created_by: UserRef;
4715
+ updated_at: string;
4716
+ updated_by: UserRef;
4717
+ }
4718
+ /** Performs one act. `target` is the person acted on (kind contact-address + the connector-side external id). */
4719
+ interface PerformChannelActionRequest {
4720
+ connection_id: string;
4721
+ action_type: ChannelActionType;
4722
+ target: SendRecipient;
4723
+ /** Per-type input: invitation {note?, email?}; profile_visit {}; inmail {subject?, content}. */
4724
+ params?: Record<string, unknown>;
4725
+ }
4726
+ interface RespondChannelActionRequest {
4727
+ response: ChannelActionResponse;
4728
+ }
4729
+ interface ListChannelActionsQuery extends PaginationQuery {
4730
+ channel?: Channel;
4731
+ connection_id?: string;
4732
+ action_type?: ChannelActionType;
4733
+ direction?: MessageDirection;
4734
+ status?: ChannelActionStatus;
4735
+ contact_id?: string;
4736
+ }
3854
4737
 
3855
4738
  /** One normalized transcription update streamed back from the server. */
3856
4739
  interface TranscriptResult {
@@ -3941,6 +4824,14 @@ declare class ConversationClient {
3941
4824
  readonly agentListeners: AgentListenerService;
3942
4825
  /** Ingest-time filter rules (drop-with-audit) + their event trail. */
3943
4826
  readonly conversationFilters: ConversationFilterService;
4827
+ /** Outbound send constraints: windows, connection limits, frequency caps + presets. */
4828
+ readonly sendingRules: SendingRuleService;
4829
+ /**
4830
+ * Channel actions: acts performed through a connection that are neither a
4831
+ * message nor a reaction — LinkedIn invitations, profile visits, InMail.
4832
+ */
4833
+ readonly channelActions: ChannelActionService;
4834
+ readonly channelEvents: ChannelEventService;
3944
4835
  /** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
3945
4836
  readonly glossaryTerms: GlossaryTermService;
3946
4837
  /** Conversation taxonomy: the types the pre-summary classifier assigns. */
@@ -3957,6 +4848,8 @@ declare class ConversationClient {
3957
4848
  /** Realtime speech-to-text (dictation) — moved here from agent-service. */
3958
4849
  readonly voice: VoiceService;
3959
4850
  readonly calls: CallService;
4851
+ /** Conversation briefs: guidance prepared ahead of a conversation (call, meeting) with a contact. */
4852
+ readonly conversationBriefs: ConversationBriefService;
3960
4853
  constructor(client: ProteosClient);
3961
4854
  }
3962
4855
  /** Meeting bots (Ava) — dispatch by meeting URL and removal. */
@@ -4018,12 +4911,43 @@ interface ConnectionService {
4018
4911
  listContactAddresses(connectionId: string, query?: ListContactAddressesQuery): Promise<ListResponse<ContactAddress>>;
4019
4912
  /** Search a connection's addressable VENUES (Slack channels) for the compose picker. */
4020
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[]>;
4021
4941
  }
4022
4942
  /** The person-level identity layer: contacts, addresses, merges, permissions, erasure. */
4023
4943
  interface ContactService {
4024
4944
  list(query?: ListContactsQuery): Promise<ListResponse<Contact>>;
4025
4945
  get(id: string): Promise<Contact>;
4026
- /** 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
+ */
4027
4951
  create(request: CreateContactRequest): Promise<Contact>;
4028
4952
  update(id: string, request: UpdateContactRequest): Promise<Contact>;
4029
4953
  attachAddress(contactId: string, request: AttachContactAddressRequest): Promise<Contact>;
@@ -4070,6 +4994,12 @@ interface MessageService {
4070
4994
  /** One message with its read-time projections (reactions, attachments). */
4071
4995
  get(messageId: string): Promise<Message>;
4072
4996
  send(request: SendMessageRequest): Promise<Message>;
4997
+ /**
4998
+ * Dry-run of the sending gate: same addressing as send, no content, nothing
4999
+ * minted. Answers whether the send may go out now and, when held, the
5000
+ * earliest instant it may (`earliest_allowed_at`).
5001
+ */
5002
+ checkSendEligibility(request: SendEligibilityRequest): Promise<SendEligibility>;
4073
5003
  /**
4074
5004
  * Store an outbound message for human review (status=draft) — same request
4075
5005
  * shape as send, nothing reaches the connector until sendDraft. Originate
@@ -4245,6 +5175,83 @@ interface CallService {
4245
5175
  }>;
4246
5176
  }
4247
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
+ }
5198
+ /**
5199
+ * Sending rules — outbound send constraints (windows, connection limits,
5200
+ * frequency caps), the static limit-preset catalog and its apply expansion.
5201
+ * A denied send/reply/sendDraft fails with a ProteosError whose `details`
5202
+ * carry `earliest_allowed_at` (429) or the blocked contact (403).
5203
+ */
5204
+ interface SendingRuleService {
5205
+ list(query?: ListSendingRulesQuery): Promise<ListResponse<SendingRule>>;
5206
+ get(id: string): Promise<SendingRule>;
5207
+ create(request: CreateSendingRuleRequest): Promise<SendingRule>;
5208
+ update(id: string, request: UpdateSendingRuleRequest): Promise<SendingRule>;
5209
+ delete(id: string): Promise<void>;
5210
+ /** The static preset catalog, optionally narrowed to one connector. */
5211
+ listPresets(query?: ListSendingLimitPresetsQuery): Promise<{
5212
+ data: SendingLimitPreset[];
5213
+ }>;
5214
+ /**
5215
+ * Expand a preset into limit rules linked to the given connections,
5216
+ * replacing the limit rules they were linked to before.
5217
+ */
5218
+ applyPreset(request: ApplySendingLimitPresetRequest): Promise<{
5219
+ data: SendingRule[];
5220
+ }>;
5221
+ }
5222
+ /**
5223
+ * Channel actions — the ledger of acts performed through a connection that
5224
+ * are neither a message nor a reaction (LinkedIn invitations, profile visits,
5225
+ * InMail). A denied perform fails like a denied send (ProteosError with
5226
+ * `details.earliest_allowed_at`); a provider refusal carries its own code
5227
+ * (already_connected, already_invited_recently, invitation_already_received,
5228
+ * connection_limit_reached, insufficient_inmail_credits, inmail_not_allowed,
5229
+ * not_connected_with_recipient). An invitation is pre-flighted with one silent
5230
+ * profile read before anything is sent, so those refusals never mint a
5231
+ * phantom act.
5232
+ */
5233
+ interface ChannelActionService {
5234
+ list(query?: ListChannelActionsQuery): Promise<ListResponse<ChannelAction>>;
5235
+ get(id: string): Promise<ChannelAction>;
5236
+ /** Performs one act; resolves to the row in its post-perform status. */
5237
+ perform(request: PerformChannelActionRequest): Promise<ChannelAction>;
5238
+ /** Withdraws a performed outbound act (an invitation). */
5239
+ cancel(id: string): Promise<ChannelAction>;
5240
+ /** Answers an inbound act (a received invitation). */
5241
+ respond(id: string, request: RespondChannelActionRequest): Promise<ChannelAction>;
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
+ }
5254
+
4248
5255
  /**
4249
5256
  * A single row from a query result. Keys match the result-set columns
4250
5257
  * (camelCase, with `id`/`created_at`/`updated_at` reserved). The data-service
@@ -4556,7 +5563,13 @@ declare class ProteosError extends Error {
4556
5563
  readonly httpStatus: number;
4557
5564
  /** API error code (e.g., 'not_found', 'unauthorized') */
4558
5565
  readonly code: ErrorCodeType | string;
4559
- constructor(message: string, httpStatus: number, code: ErrorCodeType | string);
5566
+ /**
5567
+ * Optional machine-readable payload beside the message — e.g. a denied send's
5568
+ * `earliest_allowed_at` / `rule_id`, the offending `contact_id`. Absent on
5569
+ * most errors.
5570
+ */
5571
+ readonly details: Record<string, unknown> | undefined;
5572
+ constructor(message: string, httpStatus: number, code: ErrorCodeType | string, details?: Record<string, unknown>);
4560
5573
  /**
4561
5574
  * Returns a formatted string representation of the error.
4562
5575
  */
@@ -4596,6 +5609,7 @@ declare function getDefaultErrorCode(httpStatus: number): ErrorCodeType | string
4596
5609
  interface ApiErrorResponse {
4597
5610
  code?: string;
4598
5611
  message?: string;
5612
+ details?: Record<string, unknown>;
4599
5613
  }
4600
5614
  /**
4601
5615
  * Parses an error response from the API and creates a ProteosError.
@@ -6961,6 +7975,8 @@ interface Workflow extends AuditFields {
6961
7975
  key: string;
6962
7976
  name: string;
6963
7977
  description: string;
7978
+ /** Slug of the module that deployed this workflow; empty when it is org-owned. */
7979
+ module_slug: string;
6964
7980
  status: WorkflowStatus;
6965
7981
  graph: WorkflowGraph;
6966
7982
  version: number;
@@ -7030,6 +8046,15 @@ interface ListWorkflowsOptions extends ListOptions {
7030
8046
  name?: string;
7031
8047
  'name[contains]'?: string;
7032
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;
7033
8058
  }
7034
8059
  /**
7035
8060
  * The author of a workflow version — a common {@link UserRef} that the
@@ -7091,6 +8116,8 @@ interface ExecutionTriggerContext {
7091
8116
  interface ExecutionError {
7092
8117
  code: string;
7093
8118
  message: string;
8119
+ /** Machine-readable payload of the node error (a held send's earliest_allowed_at / rule_id, http_status …). */
8120
+ details?: Record<string, unknown>;
7094
8121
  /** Marks business failures the user can fix, vs infrastructure faults. */
7095
8122
  is_user_error?: boolean;
7096
8123
  }
@@ -7291,4 +8318,4 @@ declare class WorkflowClient {
7291
8318
  constructor(client: ProteosClient);
7292
8319
  }
7293
8320
 
7294
- 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 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 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 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, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InstallConnectionResponse, type InstallConnectorConnectionResponse, type InternalConversationsFilterConfig, 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 LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, 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 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 Permission, type PermissionEventSource, type PermissionEventType, type PhoneNumber, type PhoneNumberRouting, type PhoneNumberStatus, type PlatformBinding, type PlatformEntity, type PlatformEvent, type PortSpec, 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 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 SendMessageRequest, type SendRecipient, 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 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 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 };