export type IntegrationConversationType = "channel" | "direct_message" | "group_direct_message"; export type IntegrationConversationTrust = "trusted" | "guest" | "external_shared" | "unknown"; export interface IntegrationScopeAccess { ownerEmail: string; orgId?: string | null; } export interface IntegrationScopeKey { platform: string; tenantId: string; conversationId: string; } export interface IntegrationScopePolicy { requireMention: boolean; allowDirectMessages: boolean; allowGuests: boolean; allowExternalShared: boolean; allowUnknownTrust: boolean; } export declare const DEFAULT_INTEGRATION_SCOPE_POLICY: Readonly; export interface IntegrationScope extends IntegrationScopeKey { id: string; conversationType: IntegrationConversationType; trust: IntegrationConversationTrust; ownerEmail: string; orgId: string | null; installationId: string | null; serviceOwnerEmail: string; defaultModel: string | null; policy: IntegrationScopePolicy; createdAt: number; updatedAt: number; } export interface SaveIntegrationScopeInput extends IntegrationScopeKey { conversationType: IntegrationConversationType; trust?: IntegrationConversationTrust; /** * Omit to use the caller's active org, or pass null for a personal scope. * Passing an org other than the caller's active org is always rejected. */ orgId?: string | null; installationId?: string | null; defaultModel?: string | null; policy?: Partial; } /** A stable, non-secret subject key suitable for a scope budget. */ export declare function integrationScopeSubjectKey(key: IntegrationScopeKey): string; export declare function getIntegrationScope(keyInput: IntegrationScopeKey, accessInput: IntegrationScopeAccess): Promise; export declare function listIntegrationScopes(accessInput: IntegrationScopeAccess, filter?: { platform?: string; tenantId?: string; }): Promise; export declare function saveIntegrationScope(input: SaveIntegrationScopeInput, accessInput: IntegrationScopeAccess): Promise; export declare function deleteIntegrationScope(keyInput: IntegrationScopeKey, accessInput: IntegrationScopeAccess): Promise; export type IntegrationScopePolicyDenial = "mention_required" | "direct_messages_disabled" | "guests_disabled" | "external_shared_disabled" | "unverified_conversation_disabled"; export declare function evaluateIntegrationScopePolicy(scope: Pick, context: { mentioned: boolean; }): { allowed: true; } | { allowed: false; reason: IntegrationScopePolicyDenial; }; /** Test-only reset for suites that swap the injected database. */ export declare function _resetIntegrationScopeStoreForTests(): void; //# sourceMappingURL=scope-store.d.ts.map