/** A role-only, read-only entry-channel inspection. No member assignment is implied. */ export type ChannelAuditModuleId = "helyx.account-gate" | "helyx.verification"; export interface ChannelAuditInput { entryChannelId: string; beforeRoleIds: string[]; afterRoleId: string; entrance: "public" | "restricted"; allowedChannelIds: string[]; reviewChannelId?: string | undefined; } export type ChannelAuditCategory = "blocked" | "review" | "working" | "unknown"; export interface ChannelAuditFinding { code: string; category: ChannelAuditCategory; title: string; detail: string; channelId?: string | undefined; roleId?: string | undefined; } export interface ChannelAuditChannel { id: string; name: string; type: string; beforeActions: string[]; afterActions: string[]; retainedActions: string[]; limitations: string[]; } export interface ChannelAuditReport { guildId: string; moduleId: ChannelAuditModuleId; observedAt: string; assumptions: ChannelAuditInput; simulation: boolean; findings: ChannelAuditFinding[]; channels: ChannelAuditChannel[]; rolePaths: Array<{ roleId: string; entranceUsable: boolean | null; visibleChannels: number; }>; coverage: { fetchedChannels: number; totalChannelsKnown: boolean; inspectedChannels: number; returnedChannels: number; unknownChannels: number; unsupportedChannels: number; channelsTruncated: boolean; findingsTruncated: boolean; roleOnly: true; limitations: string[]; }; } export interface ChannelAuditConfiguration { moduleId: ChannelAuditModuleId; version: number | null; entryChannelId: string | null; beforeRoleIds: string[]; afterRoleId: string | null; reviewChannelId: string | null; mappedFields: string[]; truncated: boolean; } export interface ChannelAuditControlContext { guildId: string; moduleId: ChannelAuditModuleId; actorUserId: string; correlationId: string; } /** Optional additive operations; unsupported runtimes must reject explicitly. */ export interface ChannelAuditControl { readChannelAuditConfiguration?(input: ChannelAuditControlContext): Promise; checkChannelAudit?(input: ChannelAuditControlContext & { assumptions: ChannelAuditInput; }): Promise; }