import type { ActivityStore } from "./activity-log.js"; import { type ChannelCreationKind } from "./constants.js"; import { type DiscordClient } from "./discord-client.js"; import { type GuildScaffoldAuthority } from "./guild-scaffold-authority.js"; import { type OperationStore } from "./operation-store.js"; import type { ScopePolicy } from "./policy.js"; import type { DiscordChannel, RequestOptions } from "./types.js"; export interface ChannelCreationRequest { auditReason: string; defaultAutoArchiveDuration?: number; guildId: string; kind: ChannelCreationKind; name: string; nsfw?: boolean; operationKey: string; parentId?: string; rateLimitPerUser?: number; topic?: string; } export interface NormalizedChannelCreationRequest { auditReason: string; defaultAutoArchiveDuration: number | null; guildId: string; kind: ChannelCreationKind; name: string; nsfw: boolean | null; operationKey: string; operationKeyHash: string; parentId: string | null; rateLimitPerUser: number | null; topic: string | null; } export interface ObservedCreatedChannel { defaultAutoArchiveDuration: number | null; id: string; name: string; nsfw: boolean | null; parentId: string | null; rateLimitPerUser: number | null; topic: string | null; type: number; } export interface ChannelCreationPlan { action: "create" | "none"; auditReason: string; createdAt: string; digest: string; existingChannel: ObservedCreatedChannel | null; guild: { id: string; name: string; ownerId: string; }; operationKeyHash: string; parent: { id: string; name: string; visibleChildren: number; } | null; permission: { botAdministrator: boolean; guildManageChannels: boolean; guildViewChannel: boolean; parentManageChannels: boolean | null; parentViewChannel: boolean | null; }; schemaVersion: number; status: "already-current" | "planned"; target: { defaultAutoArchiveDuration: number | null; kind: ChannelCreationKind; name: string; nsfw: boolean | null; parentId: string | null; rateLimitPerUser: number | null; topic: string | null; type: number; }; visibleInventory: { guildChannels: number; guildLimit: number; parentChildren: number | null; parentLimit: number | null; }; warnings: string[]; } export interface ChannelCreationResult { activityId: string | null; channelId: string; guildId: string; observed: ObservedCreatedChannel; operationKeyHash: string; planDigest: string; schemaVersion: number; status: "already-current" | "completed" | "completed-with-drift"; } export interface ChannelAdministrationServiceOptions { activityStore: ActivityStore; client: Pick; clock?: () => Date; operationStore: OperationStore; planKey?: Uint8Array; policy: ScopePolicy; randomId?: () => string; } export declare function normalizeChannelCreationRequest(request: ChannelCreationRequest): NormalizedChannelCreationRequest; export declare function logicalChannelNameKey(value: string): string; export declare function assertGuildChannelInventory(channels: readonly DiscordChannel[], guildId: string): void; export declare function channelMatchesRequest(channel: DiscordChannel, request: NormalizedChannelCreationRequest): boolean; export declare class ChannelAdministrationService { #private; constructor(options: ChannelAdministrationServiceOptions); plan(botId: string, request: ChannelCreationRequest, options?: RequestOptions): Promise; planForGuildScaffold(authority: GuildScaffoldAuthority, botId: string, request: ChannelCreationRequest, options?: RequestOptions): Promise; execute(botId: string, request: ChannelCreationRequest, expectedDigest: string, options?: RequestOptions): Promise; executeForGuildScaffold(authority: GuildScaffoldAuthority, botId: string, request: ChannelCreationRequest, expectedDigest: string, options?: RequestOptions): Promise; } //# sourceMappingURL=channel-administration-service.d.ts.map