import type { ActivityStore } from "./activity-log.js"; import { type ThreadCreationMode } from "./constants.js"; import { type DiscordClient } from "./discord-client.js"; import { InteractionLimiter } from "./interaction-limiter.js"; import { deletionPreview } from "./normalize.js"; import { type OperationStore } from "./operation-store.js"; import { type DiscordPermissionName } from "./permissions.js"; import type { ScopePolicy } from "./policy.js"; import type { RequestOptions } from "./types.js"; export interface ThreadCreationRequest { auditReason: string; autoArchiveDuration?: number; invitable?: boolean; mode: ThreadCreationMode; name: string; operationKey: string; parentChannelId: string; rateLimitPerUser?: number; sourceMessageId?: string; } export interface NormalizedThreadCreationRequest { auditReason: string; autoArchiveDuration: number | null; invitable: boolean | null; mode: ThreadCreationMode; name: string; operationKey: string; operationKeyHash: string; parentChannelId: string; rateLimitPerUser: number | null; sourceMessageId: string | null; } export interface ThreadPermissionEvidence { administrator: boolean; confidence: "complete"; effectivePermissionNames: DiscordPermissionName[]; effectivePermissions: string; requiredPermissionNames: DiscordPermissionName[]; } export interface ThreadCreationPlan { applicationId: string; botId: string; createdAt: string; digest: string; existingThread: { archived: boolean; autoArchiveDuration: number; id: string; invitable: boolean | null; locked: boolean; name: string; ownerId: string; rateLimitPerUser: number; type: number; url: string; } | null; guild: { id: string; name: string; ownerId: string; }; operationKeyHash: string; parent: { defaultAutoArchiveDuration: number | null; defaultThreadRateLimitPerUser: number | null; guildId: string; id: string; name: string; type: number; }; permission: ThreadPermissionEvidence; privacy: { durableRecords: "content-free-only"; sourceMessage: "transient-review-only" | "not-fetched"; }; risks: string[]; schemaVersion: number; sourceMessage: ReturnType | null; status: "planned" | "source-already-threaded"; target: { auditReason: string; autoArchiveDuration: number; invitable: boolean | null; mode: ThreadCreationMode; name: string; parentChannelId: string; rateLimitPerUser: number; sourceMessageId: string | null; threadType: number; }; warnings: string[]; writeRequired: boolean; } export type ThreadCreationDriftField = "active-state" | "auto-archive-duration" | "invitable" | "name" | "rate-limit-per-user" | "thread-type"; export interface ThreadCreationResult { activityId: string | null; driftFields: ThreadCreationDriftField[]; guildId: string; mode: ThreadCreationMode; operationKeyHash: string; parentChannelId: string; planDigest: string; readbackMatched: boolean; recoveredFromAmbiguousResponse: boolean; responseMatched: boolean | null; schemaVersion: number; sourceMessageId: string | null; status: "completed" | "completed-with-drift" | "source-already-threaded"; threadId: string; url: string; verification: "drift" | "match" | "not-required"; writeRequired: boolean; } export interface ThreadCreationServiceOptions { activityStore: ActivityStore; client: Pick; clock?: () => Date; limiter: InteractionLimiter; operationStore: OperationStore; planKey?: Uint8Array; policy: Pick; randomId?: () => string; } export declare function normalizeThreadCreationRequest(request: ThreadCreationRequest): NormalizedThreadCreationRequest; export declare class ThreadCreationService { #private; constructor(options: ThreadCreationServiceOptions); plan(applicationId: string, botId: string, request: ThreadCreationRequest, options?: RequestOptions): Promise; execute(applicationId: string, botId: string, request: ThreadCreationRequest, expectedDigest: string, options?: RequestOptions): Promise; } //# sourceMappingURL=thread-creation-service.d.ts.map