import type { ActivityStore } from "./activity-log.js"; import { type DiscordClient } from "./discord-client.js"; import { deletionPreview } from "./normalize.js"; import { type OperationStore } from "./operation-store.js"; import type { ScopePolicy } from "./policy.js"; import type { DiscordMessage, RequestOptions } from "./types.js"; export interface DeletionRequest { auditReason: string; channelId: string; messageIds: readonly string[]; operationKey: string; } export type DeletionMessageContentIntent = "disabled" | "enabled" | "unknown"; export interface NormalizedDeletionRequest { auditReason: string; channelId: string; messageIds: string[]; operationKeyHash: string; } export interface DeletionOperation { kind: "bulk" | "individual"; messageIds: string[]; } export interface DeletionPermissionEvidence { administrator: boolean; canReadMessages: true; confidence: "complete"; connect: boolean | null; effectivePermissions: string; manageMessages: boolean; permissionSourceChannelId: string; privateThreadAccess: "lookup-succeeded" | "not-applicable"; readMessageHistory: true; requiredPermissionNames: Array<"CONNECT" | "MANAGE_MESSAGES" | "READ_MESSAGE_HISTORY" | "VIEW_CHANNEL">; viewChannel: true; } export interface DeletionPlan { application: { id: string; messageContentIntent: DeletionMessageContentIntent; }; auditReason: string; bot: { id: string; }; channel: { id: string; name: string | null; parentId: string | null; type: number; }; createdAt: string; digest: string; guild: { id: string; name: string; }; messageIds: string[]; messages: Array & { type: number; url: string; }>; operationKeyHash: string; operations: DeletionOperation[]; permission: DeletionPermissionEvidence; privacy: { persistence: "content-free"; previews: "transient-untrusted"; }; schemaVersion: number; status: "planned"; warnings: string[]; } export interface DeletionResult { activityId: string; channelId: string; deletedMessageIds: string[]; guildId: string; observedAbsentMessageIds: string[]; operationKeyHash: string; planDigest: string; remainingMessageIds: []; schemaVersion: number; status: "completed" | "completed-with-drift"; verifiedAbsent: true; } export interface DeletionServiceClient extends Pick { } export interface DeletionServiceOptions { activityStore: ActivityStore; client: DeletionServiceClient; clock?: () => Date; operationStore: OperationStore; planKey?: Uint8Array; policy: ScopePolicy; randomId?: () => string; } export declare function normalizeMessageIds(messageIds: readonly string[]): string[]; export declare function normalizeDeletionRequest(request: DeletionRequest): NormalizedDeletionRequest; export declare function deletionOperations(messages: readonly DiscordMessage[], now: Date, bulkAllowed?: boolean): DeletionOperation[]; export declare class DeletionService { #private; constructor(options: DeletionServiceOptions); plan(applicationId: string, botId: string, messageContentIntent: DeletionMessageContentIntent, request: DeletionRequest, options?: RequestOptions): Promise; execute(applicationId: string, botId: string, messageContentIntent: DeletionMessageContentIntent, requestValue: DeletionRequest, expectedDigest: string, options?: RequestOptions): Promise; } //# sourceMappingURL=deletion-service.d.ts.map