@proteos/sdk 0.27.0 → 0.29.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.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 PublicAccessOperation } from './types-BGHMMBHF.js';
2
- export { e as App, f as AppSchema, g as AppService, h as AttributeSchema, i as AttributeType, j as AuditFieldsSchema, C as ClientOptions, k as Column, l as ColumnSchema, m as ComparisonOperator, n as Component, o as ComponentSchema, p as ComponentService, q as CreateAppRequest, r as CreateComponentRequest, s as CreateDesignReferenceRequest, t as CreateEntityRequest, u as CreateListRequest, v as CreateListViewRequest, w as CreateMenuConfigurationRequest, x as CreatePageRequest, y as CreateVariableRequest, z as CurrencyAttributeMeta, B as CurrencyAttributeMetaSchema, D as CurrencySymbolSide, E as CurrencyValue, G as DEFAULT_OPTIONS, H as DEFAULT_PAGE_SIZE, I as DONE, J as DeployModuleRequest, K as DesignReference, M as DesignReferenceContent, N as DesignReferenceSchema, O as DesignReferenceService, Q as Done, R as Entity, S as EntitySchema, T as EntityService, V as EntityWithSchema, W as EntityWithSchemaSchema, X as FileAttributeMeta, Y as FileRefSchema, Z as FilterElement, _ as FilterElementSchema, $ as FilterGroup, a0 as FilterGroupSchema, a1 as List, a2 as ListAppsOptions, a3 as ListComponentsOptions, a4 as ListDesignReferencesOptions, a5 as ListEntitiesOptions, a6 as ListFn, a7 as ListListViewsOptions, a8 as ListListsOptions, a9 as ListMenuConfigurationsOptions, aa as ListModulesOptions, ab as ListPagesOptions, ac as ListSchema, ad as ListService, ae as ListVariablesOptions, af as ListView, ag as ListViewSchema, ah as ListViewService, ai as LogicalOperator, aj as MenuConfiguration, ak as MenuConfigurationSchema, al as MenuConfigurationService, am as MenuItem, an as MenuItemSchema, ao as MenuItemType, ap as MetaClient, aq as MetaListOptions, ar as Module, as as ModuleSchema, at as ModuleService, au as ModuleStatus, av as OnDeleteAction, aw as OnDeleteActionSchema, ax as PLATFORM_ATTRIBUTE_NAMES, ay as PLATFORM_USER_ID, az as Page, aA as PageAction, aB as PageActionSchema, aC as PageLayout, aD as PageLayoutSchema, aE as PageSchema, aF as PageService, aG as PageType, aH as PublicPageComponent, aI as PublicPageResponse, aJ as RelationAttributeMeta, aK as RelationAttributeMetaSchema, aL as RequestOptions, aM as ResolvedClientOptions, aN as ResponseMeta, aO as ResponseMetaSchema, aP as SortConfig, aQ as SortConfigSchema, aR as SortDirection, aS as Timestamps, aT as TokenProvider, aU as UpdateAppRequest, aV as UpdateComponentRequest, aW as UpdateDesignReferenceRequest, aX as UpdateEntityRequest, aY as UpdateListRequest, aZ as UpdateListViewRequest, a_ as UpdateMenuConfigurationRequest, a$ as UpdatePageRequest, b0 as UpdateVariableRequest, b1 as UserRefSchema, b2 as UserType, b3 as Variable, b4 as VariableSchema, b5 as VariableService, b6 as allCurrencyCodes, b7 as createIterator, b8 as createListResultSchema, b9 as currencyLabel, ba as currencySymbol, bb as currencySymbolSide, bc as formatAmount, bd as formatMoney, be as isPlatformAttributeName, bf as localeNumberSeparators, bg as parseAmount, bh as parseCurrencyMeta, bi as parseFileMeta, bj as parseRelationMeta, bk as platformAttributes, bl as resolveOptions } from './types-BGHMMBHF.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 PublicAccessOperation } from './types-BguERkVI.js';
2
+ export { e as App, f as AppSchema, g as AppService, h as AttributeSchema, i as AttributeType, j as AuditFieldsSchema, C as ClientOptions, k as Column, l as ColumnSchema, m as ComparisonOperator, n as Component, o as ComponentSchema, p as ComponentService, q as CreateAppRequest, r as CreateComponentRequest, s as CreateDesignReferenceRequest, t as CreateEntityRequest, u as CreateListRequest, v as CreateListViewRequest, w as CreateMenuConfigurationRequest, x as CreatePageRequest, y as CreateVariableRequest, z as CurrencyAttributeMeta, B as CurrencyAttributeMetaSchema, D as CurrencySymbolSide, E as CurrencyValue, G as DEFAULT_OPTIONS, H as DEFAULT_PAGE_SIZE, I as DONE, J as DeployModuleRequest, K as DesignReference, M as DesignReferenceContent, N as DesignReferenceSchema, O as DesignReferenceService, Q as Done, R as Entity, S as EntitySchema, T as EntityService, V as EntityWithSchema, W as EntityWithSchemaSchema, X as FileAttributeMeta, Y as FileRefSchema, Z as FilterElement, _ as FilterElementSchema, $ as FilterGroup, a0 as FilterGroupSchema, a1 as List, a2 as ListAppsOptions, a3 as ListComponentsOptions, a4 as ListDesignReferencesOptions, a5 as ListEntitiesOptions, a6 as ListFn, a7 as ListListViewsOptions, a8 as ListListsOptions, a9 as ListMenuConfigurationsOptions, aa as ListModulesOptions, ab as ListPagesOptions, ac as ListSchema, ad as ListService, ae as ListVariablesOptions, af as ListView, ag as ListViewSchema, ah as ListViewService, ai as LogicalOperator, aj as MenuConfiguration, ak as MenuConfigurationSchema, al as MenuConfigurationService, am as MenuItem, an as MenuItemSchema, ao as MenuItemType, ap as MetaClient, aq as MetaListOptions, ar as Module, as as ModuleSchema, at as ModuleService, au as ModuleStatus, av as OnDeleteAction, aw as OnDeleteActionSchema, ax as PLATFORM_ATTRIBUTE_NAMES, ay as PLATFORM_USER_ID, az as Page, aA as PageAction, aB as PageActionSchema, aC as PageLayout, aD as PageLayoutSchema, aE as PageSchema, aF as PageService, aG as PageType, aH as PublicPageComponent, aI as PublicPageResponse, aJ as RelationAttributeMeta, aK as RelationAttributeMetaSchema, aL as RequestOptions, aM as ResolvedClientOptions, aN as ResponseMeta, aO as ResponseMetaSchema, aP as SortConfig, aQ as SortConfigSchema, aR as SortDirection, aS as Timestamps, aT as TokenProvider, aU as UpdateAppRequest, aV as UpdateComponentRequest, aW as UpdateDesignReferenceRequest, aX as UpdateEntityRequest, aY as UpdateListRequest, aZ as UpdateListViewRequest, a_ as UpdateMenuConfigurationRequest, a$ as UpdatePageRequest, b0 as UpdateVariableRequest, b1 as UserRefSchema, b2 as UserType, b3 as Variable, b4 as VariableSchema, b5 as VariableService, b6 as allCurrencyCodes, b7 as createIterator, b8 as createListResultSchema, b9 as currencyLabel, ba as currencySymbol, bb as currencySymbolSide, bc as formatAmount, bd as formatMoney, be as isPlatformAttributeName, bf as localeNumberSeparators, bg as parseAmount, bh as parseCurrencyMeta, bi as parseFileMeta, bj as parseRelationMeta, bk as platformAttributes, bl as resolveOptions } from './types-BguERkVI.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  /**
@@ -2045,12 +2045,15 @@ interface UserRef {
2045
2045
  }
2046
2046
  /**
2047
2047
  * Inline snapshot of a person on a message/reaction — the integration-side
2048
- * identity plus, when resolved via email match, the platform user.
2048
+ * identity plus, when resolved, the platform user and the contact id.
2049
+ * (Renamed from ParticipantRef in the contacts model; wire keys unchanged.)
2049
2050
  */
2050
- interface ParticipantRef {
2051
+ interface ContactRef {
2051
2052
  external_id?: string;
2052
2053
  name: string;
2053
2054
  email?: string;
2055
+ /** The resolved person; absent on pre-contacts snapshots and wire fallbacks. */
2056
+ contact_id?: string;
2054
2057
  /** Resolved platform identity (email match); absent when unresolved. */
2055
2058
  platform_user?: UserRef;
2056
2059
  }
@@ -2060,7 +2063,7 @@ interface ParticipantRef {
2060
2063
  * renders "who it's with" as the non-self subset (1 → single avatar, ≥2 →
2061
2064
  * stacked).
2062
2065
  */
2063
- interface ConversationParticipant extends ParticipantRef {
2066
+ interface ConversationParticipant extends ContactRef {
2064
2067
  is_self: boolean;
2065
2068
  }
2066
2069
  /** How a MessageRecipient was addressed: primary, carbon copy, blind copy. */
@@ -2069,7 +2072,7 @@ type RecipientRole = 'to' | 'cc' | 'bcc';
2069
2072
  * One addressee of a message with the role it was addressed under. Bcc is only
2070
2073
  * present on messages the platform itself sent (inbound bcc is SMTP-stripped).
2071
2074
  */
2072
- interface MessageRecipient extends ParticipantRef {
2075
+ interface MessageRecipient extends ContactRef {
2073
2076
  role: RecipientRole;
2074
2077
  }
2075
2078
  /**
@@ -2126,7 +2129,7 @@ interface Connection {
2126
2129
  scope: ConnectionScope;
2127
2130
  /** Set only when scope=user (the connecting user); absent for org-wide. */
2128
2131
  owner?: UserRef;
2129
- external_workspace_id: string;
2132
+ external_account_id: string;
2130
2133
  credentials: ConnectionCredentials;
2131
2134
  settings: Record<string, unknown>;
2132
2135
  status: ConnectionStatus;
@@ -2193,7 +2196,7 @@ interface Conversation {
2193
2196
  latest_message?: MessagePreview;
2194
2197
  messages_total?: number;
2195
2198
  /** Up to 3 most recent distinct senders excluding the root sender. */
2196
- last_repliers?: ParticipantRef[];
2199
+ last_repliers?: ContactRef[];
2197
2200
  /** Requesting user's read marker; absent = never opened. */
2198
2201
  last_read_at?: string;
2199
2202
  /**
@@ -2212,7 +2215,7 @@ interface Conversation {
2212
2215
  * ~500 chars of text, direction/status for outbound identity.
2213
2216
  */
2214
2217
  interface MessagePreview {
2215
- sender: ParticipantRef;
2218
+ sender: ContactRef;
2216
2219
  text: string;
2217
2220
  direction: MessageDirection;
2218
2221
  status: MessageStatus;
@@ -2247,7 +2250,7 @@ interface Attachment {
2247
2250
  interface Reaction {
2248
2251
  emoji: string;
2249
2252
  count: number;
2250
- participants: ParticipantRef[];
2253
+ participants: ContactRef[];
2251
2254
  }
2252
2255
  interface Message {
2253
2256
  id: string;
@@ -2257,7 +2260,7 @@ interface Message {
2257
2260
  channel: Channel;
2258
2261
  direction: MessageDirection;
2259
2262
  external_message_id: string;
2260
- sender: ParticipantRef;
2263
+ sender: ContactRef;
2261
2264
  /** Who the message was addressed to (To/Cc/Bcc), each tagged with its role. */
2262
2265
  recipients?: MessageRecipient[];
2263
2266
  content: ContentBlock[];
@@ -2474,7 +2477,8 @@ interface ListConversationsQuery extends PaginationQuery {
2474
2477
  */
2475
2478
  parent_conversation_id?: string;
2476
2479
  /** Threads whose roster contains this external party — the person stream. */
2477
- participant_external_id?: string;
2480
+ /** Contact stream: threads whose roster contains the resolved person. */
2481
+ contact_id?: string;
2478
2482
  /** Opt into the root/latest message projection on each row. */
2479
2483
  include?: 'messages_summary';
2480
2484
  }
@@ -2499,38 +2503,206 @@ interface ListAgentListenersQuery extends PaginationQuery {
2499
2503
  agent_key?: string;
2500
2504
  is_enabled?: boolean;
2501
2505
  }
2502
- /** Discriminates a send target: a person or a venue. */
2503
- type RecipientKind = 'participant' | 'room';
2504
- type ParticipantSource = 'sync' | 'ingest';
2506
+ /**
2507
+ * Conversation filters: ingest-time rules that drop matching inbound messages
2508
+ * BEFORE persistence (no message, no contact — only a content-free audit
2509
+ * event). Scope-first evaluation: connection-scoped rules are final when one
2510
+ * matches; global rules apply otherwise. Specificity within a scope:
2511
+ * address > domain > role_based > automated > internal_conversations > all,
2512
+ * allow beats block within a class.
2513
+ */
2514
+ type ConversationFilterType = 'address' | 'domain' | 'role_based' | 'automated' | 'internal_conversations' | 'all';
2515
+ type ConversationFilterAction = 'block' | 'allow';
2516
+ /** Which side of the message address/domain rules test (default: sender). */
2517
+ type FilterMatchOn = 'sender' | 'any_participant';
2518
+ /** Deterministic machine-mail header signals the automated filter matches. */
2519
+ type AutomatedSignal = 'auto_submitted' | 'bulk' | 'mailing_list' | 'bounce' | 'auto_response_suppress';
2520
+ /** Exact canonical address (lowercased email / E.164 phone / provider id), any channel kind. */
2521
+ interface AddressFilterConfig {
2522
+ kind: ContactAddressKind;
2523
+ value: string;
2524
+ match_on?: FilterMatchOn;
2525
+ }
2526
+ /** Equals on the parsed email domain (lowercase, no leading '@'). */
2527
+ interface DomainFilterConfig {
2528
+ domain: string;
2529
+ match_on?: FilterMatchOn;
2530
+ }
2531
+ /** Sender local-part is a role mailbox; empty prefixes = the built-in set. Email-only. */
2532
+ interface RoleBasedFilterConfig {
2533
+ prefixes?: string[];
2534
+ }
2535
+ /** Header-signal machine-mail detection; empty signals = all. Email-only. */
2536
+ interface AutomatedFilterConfig {
2537
+ signals?: AutomatedSignal[];
2538
+ }
2539
+ /** Drops only when sender AND every recipient are on these domains. Always block. */
2540
+ interface InternalConversationsFilterConfig {
2541
+ domains: string[];
2542
+ }
2543
+ /** Matches every message (empty config) — the scope-control primitive. */
2544
+ type AllFilterConfig = Record<string, never>;
2545
+ type ConversationFilterConfig = AddressFilterConfig | DomainFilterConfig | RoleBasedFilterConfig | AutomatedFilterConfig | InternalConversationsFilterConfig | AllFilterConfig;
2546
+ interface ConversationFilter {
2547
+ id: string;
2548
+ org_id: string;
2549
+ /** Empty = global (org-wide); set = scoped to that connection. */
2550
+ connection_id: string;
2551
+ filter_type: ConversationFilterType;
2552
+ action: ConversationFilterAction;
2553
+ filter_config?: ConversationFilterConfig;
2554
+ is_enabled: boolean;
2555
+ /** Read-only rollup: messages this rule dropped in the last 30 days. */
2556
+ recent_event_count?: number;
2557
+ created_at: string;
2558
+ created_by: UserRef;
2559
+ updated_at: string;
2560
+ updated_by: UserRef;
2561
+ }
2562
+ /** One drop-audit entry (content-free: routing/identity facts only). */
2563
+ interface ConversationFilterEvent {
2564
+ id: string;
2565
+ org_id: string;
2566
+ connection_id: string;
2567
+ conversation_filter_id: string;
2568
+ filter_type: ConversationFilterType;
2569
+ reason: string;
2570
+ sender_kind?: ContactAddressKind;
2571
+ sender_value?: string;
2572
+ external_message_id?: string;
2573
+ occurred_at: string;
2574
+ }
2575
+ interface CreateConversationFilterRequest {
2576
+ connection_id?: string;
2577
+ filter_type: ConversationFilterType;
2578
+ action: ConversationFilterAction;
2579
+ filter_config?: Record<string, unknown>;
2580
+ is_enabled?: boolean;
2581
+ /** Opts past the own-domain guard (self_domain_block). */
2582
+ is_self_domain_acknowledged?: boolean;
2583
+ }
2584
+ interface UpdateConversationFilterRequest {
2585
+ /** filter_type and filter_config must be sent together. */
2586
+ filter_type?: ConversationFilterType;
2587
+ action?: ConversationFilterAction;
2588
+ filter_config?: Record<string, unknown>;
2589
+ is_enabled?: boolean;
2590
+ is_self_domain_acknowledged?: boolean;
2591
+ }
2592
+ interface ListConversationFiltersQuery extends PaginationQuery {
2593
+ /** Omit = all; '' = global-only; an id = that connection's rules. */
2594
+ connection_id?: string;
2595
+ filter_type?: ConversationFilterType;
2596
+ action?: ConversationFilterAction;
2597
+ is_enabled?: boolean;
2598
+ }
2599
+ type ListConversationFilterEventsQuery = PaginationQuery;
2600
+ /**
2601
+ * Discriminates a send target: a person's contact address or a venue. The
2602
+ * server also accepts the legacy 'participant' value as an alias for
2603
+ * 'contact-address'.
2604
+ */
2605
+ type RecipientKind = 'contact-address' | 'room';
2606
+ type ContactAddressKind = 'email' | 'phone' | 'slack' | 'linkedin' | 'telegram' | 'instagram' | 'messenger' | 'x' | 'whatsapp';
2607
+ type ContactAddressSource = 'sync' | 'ingest' | 'manual' | 'merge';
2608
+ type ContactSource = 'sync' | 'ingest' | 'manual' | 'merge';
2609
+ type ContactStatus = 'active' | 'merged' | 'archived' | 'erased';
2610
+ type ConsentStatus = 'unknown' | 'opted_in' | 'opted_out';
2611
+ type PermissionEventType = 'opt_in' | 'opt_out' | 'block' | 'unblock';
2612
+ type PermissionEventSource = 'manual' | 'import' | 'link_click' | 'reply' | 'api' | 'system';
2613
+ type MergeProposalStatus = 'proposed' | 'approved' | 'rejected' | 'superseded';
2614
+ type ErasureRequestStatus = 'requested' | 'completed';
2505
2615
  type RoomSource = 'sync' | 'ingest';
2506
2616
  /**
2507
2617
  * Send-time addressing VO: who/where an originated message goes. Points at a
2508
- * Participant or a Room by kind + external id (never a stored entity itself).
2618
+ * ContactAddress or a Room by kind + external id (never a stored entity itself).
2509
2619
  */
2510
2620
  interface SendRecipient {
2511
2621
  kind: RecipientKind;
2512
- /** The connector-side id: a room's (Slack channel id) or a participant's (Slack user id, email address). */
2622
+ /** The connector-side id: a room's (Slack channel id) or a contact address's wire identifier (Slack user id, email address). */
2513
2623
  external_id: string;
2514
2624
  }
2515
- /** A PERSON known on a connection (directory row; resolvable to a platform user). */
2516
- interface Participant {
2625
+ /** The actual PERSON an org communicates with org-scoped, channel-agnostic. */
2626
+ interface Contact {
2517
2627
  id: string;
2518
2628
  org_id: string;
2519
- connection_id: string;
2520
- /** Slack user id / email address — the id to DM or email. */
2521
- external_id: string;
2522
2629
  name: string;
2523
- email?: string;
2524
- /** Resolved platform identity (email match); absent when unresolved. */
2630
+ status: ContactStatus;
2631
+ /** Person-level suppression only block/unblock events move it. */
2632
+ is_blocked: boolean;
2633
+ has_legal_hold: boolean;
2634
+ consent_status: ConsentStatus;
2635
+ consent_updated_at?: string;
2636
+ /** Resolved platform identity when the person is a colleague. */
2525
2637
  platform_user?: UserRef;
2638
+ /** Merge tombstone redirect (set when status is 'merged'). */
2639
+ merged_into_contact_id?: string;
2640
+ source: ContactSource;
2641
+ has_manual_edits: boolean;
2642
+ /** The contact's reachable endpoints, embedded on reads. */
2643
+ addresses?: ContactAddress[];
2644
+ created_at: string;
2645
+ created_by: UserRef;
2646
+ updated_at: string;
2647
+ updated_by: UserRef;
2648
+ }
2649
+ /** ONE canonical digital endpoint to reach a contact — the dedup backbone. */
2650
+ interface ContactAddress {
2651
+ id: string;
2652
+ org_id: string;
2653
+ contact_id: string;
2654
+ kind: ContactAddressKind;
2655
+ /** Provider-tenant qualifier (Slack workspace id); empty for global kinds. */
2656
+ scope?: string;
2657
+ /** Canonical scalar (lowercased email, E.164 phone) — the lookup key. */
2658
+ value: string;
2659
+ /** The identifier as observed on the wire (WhatsApp JID, original casing). */
2660
+ raw_value?: string;
2661
+ /** Per-channel display name. */
2662
+ name: string;
2663
+ consent_status: ConsentStatus;
2664
+ consent_updated_at?: string;
2665
+ is_blocked: boolean;
2666
+ source: ContactAddressSource;
2526
2667
  metadata: Record<string, unknown>;
2527
- source: ParticipantSource;
2528
- last_seen_at: string;
2529
2668
  created_at: string;
2530
2669
  created_by: UserRef;
2531
2670
  updated_at: string;
2532
2671
  updated_by: UserRef;
2533
2672
  }
2673
+ /** One candidate duplicate pair awaiting review. */
2674
+ interface ContactMergeProposal {
2675
+ id: string;
2676
+ org_id: string;
2677
+ contact_a_id: string;
2678
+ contact_b_id: string;
2679
+ suggested_winner_id?: string;
2680
+ confidence?: number;
2681
+ evidence?: Record<string, unknown>;
2682
+ verdict?: Record<string, unknown>;
2683
+ status: MergeProposalStatus;
2684
+ resolved_by?: UserRef;
2685
+ resolved_at?: string;
2686
+ created_at: string;
2687
+ created_by: UserRef;
2688
+ updated_at: string;
2689
+ updated_by: UserRef;
2690
+ }
2691
+ /** A GDPR Art. 17 erasure request (requested → completed). */
2692
+ interface ContactErasureRequest {
2693
+ id: string;
2694
+ org_id: string;
2695
+ contact_id: string;
2696
+ identifier_hashes: Array<{
2697
+ kind: ContactAddressKind;
2698
+ hmac: string;
2699
+ }>;
2700
+ status: ErasureRequestStatus;
2701
+ completed_at?: string;
2702
+ stats?: Record<string, unknown>;
2703
+ created_at: string;
2704
+ created_by: UserRef;
2705
+ }
2534
2706
  /** An addressable VENUE on a connection (Slack channel; later meeting rooms). */
2535
2707
  interface Room {
2536
2708
  id: string;
@@ -2548,9 +2720,46 @@ interface Room {
2548
2720
  updated_at: string;
2549
2721
  updated_by: UserRef;
2550
2722
  }
2551
- interface ListParticipantsQuery extends PaginationQuery {
2552
- /** Free-text needle matched against display name + external id. */
2723
+ interface ListContactAddressesQuery extends PaginationQuery {
2724
+ /** Free-text needle matched against display name + canonical value. */
2553
2725
  q?: string;
2726
+ kinds?: ContactAddressKind[];
2727
+ scope?: string;
2728
+ }
2729
+ interface ListContactsQuery extends PaginationQuery {
2730
+ /** Free-text needle matched against contact name + address values. */
2731
+ q?: string;
2732
+ status?: ContactStatus;
2733
+ }
2734
+ interface UpdateContactRequest {
2735
+ name?: string;
2736
+ status?: 'active' | 'archived';
2737
+ has_legal_hold?: boolean;
2738
+ }
2739
+ interface AttachContactAddressRequest {
2740
+ kind: ContactAddressKind;
2741
+ scope?: string;
2742
+ value: string;
2743
+ name?: string;
2744
+ }
2745
+ interface MergeContactsRequest {
2746
+ source_contact_id: string;
2747
+ }
2748
+ interface RecordPermissionEventRequest {
2749
+ contact_address_id?: string;
2750
+ event: PermissionEventType;
2751
+ basis?: string;
2752
+ source?: PermissionEventSource;
2753
+ occurred_at?: string;
2754
+ note?: string;
2755
+ evidence?: Record<string, unknown>;
2756
+ }
2757
+ interface BlockContactRequest {
2758
+ contact_address_id?: string;
2759
+ note?: string;
2760
+ }
2761
+ interface ListContactMergeProposalsQuery extends PaginationQuery {
2762
+ status?: MergeProposalStatus;
2554
2763
  }
2555
2764
  interface ListRoomsQuery extends PaginationQuery {
2556
2765
  /** Free-text needle matched against name + external id. */
@@ -2648,8 +2857,12 @@ interface DispatchMeetingBotRequest {
2648
2857
  declare class ConversationClient {
2649
2858
  readonly connections: ConnectionService;
2650
2859
  readonly conversations: ConversationService;
2860
+ /** The person-level identity layer: contacts, addresses, merges, permissions. */
2861
+ readonly contacts: ContactService;
2651
2862
  readonly messages: MessageService;
2652
2863
  readonly agentListeners: AgentListenerService;
2864
+ /** Ingest-time filter rules (drop-with-audit) + their event trail. */
2865
+ readonly conversationFilters: ConversationFilterService;
2653
2866
  /** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
2654
2867
  readonly glossaryTerms: GlossaryTermService;
2655
2868
  readonly transcriptions: TranscriptionService;
@@ -2686,11 +2899,29 @@ interface ConnectionService {
2686
2899
  delete(id: string): Promise<void>;
2687
2900
  /** Begin the connector's install flow; open the returned URL in a popup. */
2688
2901
  install(id: string): Promise<InstallConnectionResponse>;
2689
- /** Search a connection's known PEOPLE (workspace members, correspondents) for the compose picker. */
2690
- listParticipants(connectionId: string, query?: ListParticipantsQuery): Promise<ListResponse<Participant>>;
2902
+ /** Search the contact addresses this connection can reach (org-deduped) for the compose picker. */
2903
+ listContactAddresses(connectionId: string, query?: ListContactAddressesQuery): Promise<ListResponse<ContactAddress>>;
2691
2904
  /** Search a connection's addressable VENUES (Slack channels) for the compose picker. */
2692
2905
  listRooms(connectionId: string, query?: ListRoomsQuery): Promise<ListResponse<Room>>;
2693
2906
  }
2907
+ /** The person-level identity layer: contacts, addresses, merges, permissions, erasure. */
2908
+ interface ContactService {
2909
+ list(query?: ListContactsQuery): Promise<ListResponse<Contact>>;
2910
+ get(id: string): Promise<Contact>;
2911
+ update(id: string, request: UpdateContactRequest): Promise<Contact>;
2912
+ attachAddress(contactId: string, request: AttachContactAddressRequest): Promise<Contact>;
2913
+ detachAddress(contactId: string, addressId: string): Promise<Contact>;
2914
+ /** Fold source_contact_id into contactId (contactId wins). */
2915
+ merge(contactId: string, request: MergeContactsRequest): Promise<Contact>;
2916
+ recordPermissionEvent(contactId: string, request: RecordPermissionEventRequest): Promise<Contact>;
2917
+ block(contactId: string, request?: BlockContactRequest): Promise<Contact>;
2918
+ unblock(contactId: string, request?: BlockContactRequest): Promise<Contact>;
2919
+ requestErasure(contactId: string): Promise<ContactErasureRequest>;
2920
+ listErasureRequests(contactId: string): Promise<ContactErasureRequest[]>;
2921
+ listMergeProposals(query?: ListContactMergeProposalsQuery): Promise<ListResponse<ContactMergeProposal>>;
2922
+ approveMergeProposal(proposalId: string): Promise<ContactMergeProposal>;
2923
+ rejectMergeProposal(proposalId: string): Promise<ContactMergeProposal>;
2924
+ }
2694
2925
  /** Conversation threads across every channel (inbox order: last_message_at). */
2695
2926
  interface ConversationService {
2696
2927
  list(query?: ListConversationsQuery): Promise<ListResponse<Conversation>>;
@@ -2727,6 +2958,19 @@ interface AgentListenerService {
2727
2958
  update(id: string, request: UpdateAgentListenerRequest): Promise<AgentListener>;
2728
2959
  delete(id: string): Promise<void>;
2729
2960
  }
2961
+ /**
2962
+ * Ingest-time conversation filters: block/allow rules that drop matching
2963
+ * inbound messages before persistence, scoped globally or per connection.
2964
+ * listEvents pages a rule's drop-audit trail (who got dropped, when, why).
2965
+ */
2966
+ interface ConversationFilterService {
2967
+ list(query?: ListConversationFiltersQuery): Promise<ListResponse<ConversationFilter>>;
2968
+ get(id: string): Promise<ConversationFilter>;
2969
+ create(request: CreateConversationFilterRequest): Promise<ConversationFilter>;
2970
+ update(id: string, request: UpdateConversationFilterRequest): Promise<ConversationFilter>;
2971
+ delete(id: string): Promise<void>;
2972
+ listEvents(id: string, query?: ListConversationFilterEventsQuery): Promise<ListResponse<ConversationFilterEvent>>;
2973
+ }
2730
2974
  /**
2731
2975
  * Per-org glossary: custom-vocabulary terms that boost transcription accuracy.
2732
2976
  * A term feeds the transcription provider's keyterm prompting; `priority` ranks
@@ -5449,4 +5693,4 @@ declare class WorkflowClient {
5449
5693
  constructor(client: ProteosClient);
5450
5694
  }
5451
5695
 
5452
- export { AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentKickoff, type AgentListener, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type ApiErrorResponse, type AppendEventRequest, type AssignPermissionRequest, type AssignRoleRequest, type Attachment, Attribute, AuditFields, type AuthListOptions, type BatchTransactionError, BatchTransactionErrorSchema, type BatchTransactionStatus, type BatchUpsertRecordsResponse, BatchUpsertRecordsResponseSchema, type BatchUpsertTransaction, type BatchUpsertTransactionResult, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, type BinaryRef, type Channel, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, 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 ConsumerGroup, type ContentBlock$1 as ContentBlock, type ContentMatch, type ContentResponse, type ContextCompactedPayload, type Conversation, ConversationClient, type ConversationParticipant, type ConversationService, type ConversationStatus, type CreateAgentListenerRequest, type CreateAgentRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSessionRequest, type CreateToolRequest, type CreateUserRequest, type CreateWorkflowRequest, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, type DispatchMeetingBotRequest, type DisplayOptions, ERROR_PORT, type EditContentRequest, type EditContentResponse, type EmptyPayload, 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, FunctionsClient, type GetExecutionDetailResponse, type GetGraphOptions, type GetNodeExecutionItemsOptions, type GetNodeExecutionItemsResponse, type GetNodeTypesResponse, type GlossaryTerm, type GlossaryTermService, type GraphService, type InlineLinkRequest, type InstallConnectionResponse, type InstallConnectorConnectionResponse, 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 LabelService, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListNodesOptions, ListOptions, type ListOrganizationsOptions, type ListParticipantsQuery, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSessionsOptions, type ListSkillsOptions, type ListToolsOptions, 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 Message, type ContentBlock as MessageContentBlock, type MessageDirection, type MessageKickoff, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, 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 OutcomeKickoff, type OutcomeRubric, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type Participant, type ParticipantRef, type ParticipantSource, type Permission, type PlatformEntity, type PlatformEvent, type PortSpec, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, 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 RecordService, type RedriveResult, type ResultBlock, type Role, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RunWorkflowRequest, 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 Skill, type SkillBundle, type SkillService, type SkillVersion, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type TailOptions, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TriggerKind, type Turn, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateToolRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowContentBlock, 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, isUnauthorized, parseErrorResponse, toQueryParams, toQueryString };
5696
+ export { AccountClient, type Action, type ActionBinding, ActionSchema, type ActionScope, ActionScopeSchema, type ActionService, type AddressFilterConfig, type Agent, type AgentActionParams, type AgentArtifactsPayload, AgentClient, type AgentKickoff, type AgentListener, type AgentListenerService, type AgentListenerTriggerType, type AgentMessagePayload, type AgentResourceListOptions, type AgentService, type AllFilterConfig, type ApiErrorResponse, 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 Channel, type ClientEventType, type ClientToolSchema, type Connection, type ConnectionCredentials, type ConnectionEndpoint, type ConnectionScope, type ConnectionService, type ConnectionStatus, 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 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 CreateAgentListenerRequest, type CreateAgentRequest, type CreateConnectionRequest, type CreateConnectorConnectionRequest, type CreateConversationFilterRequest, type CreateFileMetadata, type CreateGlossaryTermRequest, type CreateLabelRequest, type CreateLinkRequest, type CreateMcpServerRequest, type CreateNodeRequest, type CreateOrganizationRequest, type CreatePromptRequest, type CreateRecordLinkRequest, type CreateRoleRequest, type CreateSessionRequest, type CreateToolRequest, type CreateUserRequest, type CreateWorkflowRequest, type CredentialSpec, type CronTriggerParams, DEFAULT_PORT, DataClient, 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 LabelService, type LinkService, type LinkType, type ListActionsOptions, type ListAgentListenersQuery, type ListAgentsOptions, type ListConnectionsQuery, type ListConnectorConnectionsQuery, type ListConnectorsQuery, type ListContactAddressesQuery, type ListContactMergeProposalsQuery, type ListContactsQuery, type ListConversationFilterEventsQuery, type ListConversationFiltersQuery, type ListConversationsQuery, type ListEventsOptions, type ListExecutionsOptions, type ListGlossaryTermsQuery, type ListLabelsOptions, type ListLinksOptions, type ListMcpServersOptions, type ListMessagesQuery, type ListNodesOptions, ListOptions, type ListOrganizationsOptions, type ListPromptsOptions, type ListRecordLinksOptions, type ListRecordsOptions, type ListResponse, ListResult, type ListRolePermissionsOptions, type ListRolesOptions, type ListRoomsQuery, type ListSessionsOptions, type ListSkillsOptions, type ListToolsOptions, 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 MessageKickoff, type MessagePreview, type MessageRecipient, type MessageService, type MessageStatus, type MessageTriggerParams, 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 OutcomeKickoff, type OutcomeRubric, type OutlineHeading, type OutlineRequest, type OutlineResponse, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, PageIterator, type PairedItem, type ParseStatus, type Permission, type PermissionEventSource, type PermissionEventType, type PlatformEntity, type PlatformEvent, type PortSpec, type Prompt, type PromptService, type PromptVersion, type PropertyOption, type PropertyType, ProteosClient, ProteosError, PublicAccessOperation, type PublishEventRequest, 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 ResultBlock, type Role, type RoleBasedFilterConfig, type RoleEntityPermission, RoleEntityPermissionSchema, RoleSchema, type RoleService, type Room, type RunWorkflowRequest, 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 Skill, type SkillBundle, type SkillService, type SkillVersion, type StartMcpOAuthResponse, type StopReason, StorageClient, type StorageFile, type StorageFileVersion, type TailOptions, type TestNodeCandidate, type TestNodeInputSource, type TestNodeRequest, type TestNodeResponse, type TextBlock, type Tool, type ToolBinding, type ToolConfirmationPayload, type ToolKind, type ToolResultPayload, type ToolService, type ToolUsePayload, type Topic, type TopicKind, type TopicService, type TranscribeStreamOptions, type TranscriptResult, type TriggerKind, type Turn, type UnreadCounts, type UpdateAgentListenerRequest, type UpdateAgentRequest, type UpdateConnectionRequest, type UpdateConnectorConnectionRequest, type UpdateContactRequest, type UpdateConversationFilterRequest, type UpdateFileMetadata, type UpdateGlossaryTermRequest, type UpdateLabelRequest, type UpdateLinkRequest, type UpdateMcpServerRequest, type UpdateNodeRequest, type UpdateOrganizationRequest, type UpdatePromptRequest, type UpdateRoleRequest, type UpdateToolRequest, type UpdateUserRequest, type UpdateWorkflowRequest, type User, type UserMessagePayload, UserRef$2 as UserRef, type UserRoleAssignment, UserRoleAssignmentSchema, UserSchema, type UserService, type VoiceService, type VoiceTranscriptionStream, type WebhookTriggerParams, type Workflow, WorkflowClient, type WorkflowConnection, type WorkflowContentBlock, 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, isUnauthorized, parseErrorResponse, toQueryParams, toQueryString };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { AuditFieldsSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-WK6KEEKM.js';
2
- export { AppSchema, AttributeSchema, AuditFieldsSchema, ColumnSchema, ComponentSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntitySchema, EntityWithSchemaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListSchema, ListViewSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-WK6KEEKM.js';
1
+ import { AuditFieldsSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-Y5RY27JB.js';
2
+ export { AppSchema, AttributeSchema, AuditFieldsSchema, ColumnSchema, ComponentSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntitySchema, EntityWithSchemaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListSchema, ListViewSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-Y5RY27JB.js';
3
3
  import { z } from 'zod';
4
4
  import { fetchEventSource } from '@microsoft/fetch-event-source';
5
5
 
@@ -1205,8 +1205,12 @@ var CONVERSATION_BASE_PATH = "/conversations/v1";
1205
1205
  var ConversationClient = class {
1206
1206
  connections;
1207
1207
  conversations;
1208
+ /** The person-level identity layer: contacts, addresses, merges, permissions. */
1209
+ contacts;
1208
1210
  messages;
1209
1211
  agentListeners;
1212
+ /** Ingest-time filter rules (drop-with-audit) + their event trail. */
1213
+ conversationFilters;
1210
1214
  /** Per-org glossary: custom vocabulary that boosts transcription accuracy. */
1211
1215
  glossaryTerms;
1212
1216
  transcriptions;
@@ -1217,8 +1221,10 @@ var ConversationClient = class {
1217
1221
  constructor(client) {
1218
1222
  this.connections = new ConnectionServiceImpl(client);
1219
1223
  this.conversations = new ConversationServiceImpl(client);
1224
+ this.contacts = new ContactServiceImpl(client);
1220
1225
  this.messages = new MessageServiceImpl(client);
1221
1226
  this.agentListeners = new AgentListenerServiceImpl(client);
1227
+ this.conversationFilters = new ConversationFilterServiceImpl(client);
1222
1228
  this.glossaryTerms = new GlossaryTermServiceImpl(client);
1223
1229
  this.transcriptions = new TranscriptionServiceImpl(client);
1224
1230
  this.meetings = new MeetingServiceImpl(client);
@@ -1263,10 +1269,10 @@ var ConnectionServiceImpl = class {
1263
1269
  install(id) {
1264
1270
  return this.client.request("POST", `${CONVERSATION_BASE_PATH}/connections/${encodeURIComponent(id)}/install`);
1265
1271
  }
1266
- listParticipants(connectionId, query = {}) {
1272
+ listContactAddresses(connectionId, query = {}) {
1267
1273
  return this.client.requestWithQuery(
1268
1274
  "GET",
1269
- `${CONVERSATION_BASE_PATH}/connections/${encodeURIComponent(connectionId)}/participants`,
1275
+ `${CONVERSATION_BASE_PATH}/connections/${encodeURIComponent(connectionId)}/contact-addresses`,
1270
1276
  query
1271
1277
  );
1272
1278
  }
@@ -1278,6 +1284,89 @@ var ConnectionServiceImpl = class {
1278
1284
  );
1279
1285
  }
1280
1286
  };
1287
+ var ContactServiceImpl = class {
1288
+ constructor(client) {
1289
+ this.client = client;
1290
+ }
1291
+ client;
1292
+ list(query = {}) {
1293
+ return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/contacts`, query);
1294
+ }
1295
+ get(id) {
1296
+ return this.client.request("GET", `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(id)}`);
1297
+ }
1298
+ update(id, request) {
1299
+ return this.client.request("PATCH", `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(id)}`, request);
1300
+ }
1301
+ attachAddress(contactId, request) {
1302
+ return this.client.request(
1303
+ "POST",
1304
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/addresses`,
1305
+ request
1306
+ );
1307
+ }
1308
+ detachAddress(contactId, addressId) {
1309
+ return this.client.request(
1310
+ "DELETE",
1311
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/addresses/${encodeURIComponent(addressId)}`
1312
+ );
1313
+ }
1314
+ merge(contactId, request) {
1315
+ return this.client.request(
1316
+ "POST",
1317
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/merge`,
1318
+ request
1319
+ );
1320
+ }
1321
+ recordPermissionEvent(contactId, request) {
1322
+ return this.client.request(
1323
+ "POST",
1324
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/permission-events`,
1325
+ request
1326
+ );
1327
+ }
1328
+ block(contactId, request = {}) {
1329
+ return this.client.request(
1330
+ "POST",
1331
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/block`,
1332
+ request
1333
+ );
1334
+ }
1335
+ unblock(contactId, request = {}) {
1336
+ return this.client.request(
1337
+ "POST",
1338
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/unblock`,
1339
+ request
1340
+ );
1341
+ }
1342
+ requestErasure(contactId) {
1343
+ return this.client.request(
1344
+ "POST",
1345
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/erasure-requests`
1346
+ );
1347
+ }
1348
+ listErasureRequests(contactId) {
1349
+ return this.client.request(
1350
+ "GET",
1351
+ `${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/erasure-requests`
1352
+ );
1353
+ }
1354
+ listMergeProposals(query = {}) {
1355
+ return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/contact-merge-proposals`, query);
1356
+ }
1357
+ approveMergeProposal(proposalId) {
1358
+ return this.client.request(
1359
+ "POST",
1360
+ `${CONVERSATION_BASE_PATH}/contact-merge-proposals/${encodeURIComponent(proposalId)}/approve`
1361
+ );
1362
+ }
1363
+ rejectMergeProposal(proposalId) {
1364
+ return this.client.request(
1365
+ "POST",
1366
+ `${CONVERSATION_BASE_PATH}/contact-merge-proposals/${encodeURIComponent(proposalId)}/reject`
1367
+ );
1368
+ }
1369
+ };
1281
1370
  var ConversationServiceImpl = class {
1282
1371
  constructor(client) {
1283
1372
  this.client = client;
@@ -1364,6 +1453,34 @@ var AgentListenerServiceImpl = class {
1364
1453
  await this.client.request("DELETE", `${CONVERSATION_BASE_PATH}/agent-listeners/${encodeURIComponent(id)}`);
1365
1454
  }
1366
1455
  };
1456
+ var ConversationFilterServiceImpl = class {
1457
+ constructor(client) {
1458
+ this.client = client;
1459
+ }
1460
+ client;
1461
+ list(query = {}) {
1462
+ return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/conversation-filters`, query);
1463
+ }
1464
+ get(id) {
1465
+ return this.client.request("GET", `${CONVERSATION_BASE_PATH}/conversation-filters/${encodeURIComponent(id)}`);
1466
+ }
1467
+ create(request) {
1468
+ return this.client.request("POST", `${CONVERSATION_BASE_PATH}/conversation-filters`, request);
1469
+ }
1470
+ update(id, request) {
1471
+ return this.client.request("PATCH", `${CONVERSATION_BASE_PATH}/conversation-filters/${encodeURIComponent(id)}`, request);
1472
+ }
1473
+ async delete(id) {
1474
+ await this.client.request("DELETE", `${CONVERSATION_BASE_PATH}/conversation-filters/${encodeURIComponent(id)}`);
1475
+ }
1476
+ listEvents(id, query = {}) {
1477
+ return this.client.requestWithQuery(
1478
+ "GET",
1479
+ `${CONVERSATION_BASE_PATH}/conversation-filters/${encodeURIComponent(id)}/events`,
1480
+ query
1481
+ );
1482
+ }
1483
+ };
1367
1484
  var GlossaryTermServiceImpl = class {
1368
1485
  constructor(client) {
1369
1486
  this.client = client;