import { z } from "zod"; import { type McpToolsetName, type McpToolSurface } from "./constants.js"; export declare const CONFIG_DOCUMENT_SCHEMA_VERSION = 2; export declare const CONFIG_DOCUMENT_SCHEMA_ID = "https://raw.githubusercontent.com/j-256/guildcontrol/main/guildcontrol.config.schema.json"; export interface EnvironmentSecretReference { provider: "environment"; variable: string; } export interface FileSecretReference { path: string; provider: "file"; } export type ConnectorCredentialReference = EnvironmentSecretReference | FileSecretReference; export interface ConnectorConfigDocumentObservabilitySignal { compression?: string; endpoint?: string; headers?: EnvironmentSecretReference; protocol?: string; timeoutMs?: number; } export interface ConnectorConfigDocumentObservability { compression?: string; endpoint?: string; exportEnabled?: boolean; headers?: EnvironmentSecretReference; jsonLogsEnabled?: boolean; metrics?: ConnectorConfigDocumentObservabilitySignal; protocol?: string; serviceName?: string; timeoutMs?: number; traceSampleRatio?: number; traceSampler?: string; traces?: ConnectorConfigDocumentObservabilitySignal; } export interface ConnectorConfigDocument { $schema?: typeof CONFIG_DOCUMENT_SCHEMA_ID; capabilities: Readonly>>; credential: ConnectorCredentialReference; gateway: { enabled: boolean; eventBufferSize: number; }; identity: { applicationId: string; botId: string; }; limits: Readonly>>; name: string; observability: ConnectorConfigDocumentObservability; readScope: { channelIds: readonly string[]; guildIds: readonly string[]; }; runtime: Readonly>>; schemaVersion: 2; scopes: Readonly>>; storage: ConnectorConfigDocumentStorage; tools: { surface: McpToolSurface; toolsets: readonly McpToolsetName[]; }; } export interface ConfigDocumentField { defaultValue: boolean | number | string | readonly string[] | undefined; description: string; kind: "boolean" | "integer" | "number" | "path" | "paths" | "secret-reference" | "snowflake" | "snowflakes" | "string" | "strings"; path: string; required: boolean; } export declare const CONFIG_CAPABILITY_NAMES: readonly ["administration", "applicationCommandChanges", "globalApplicationCommandChanges", "applicationEmojiAudit", "applicationEmojiChanges", "applicationEntitlementConsumption", "applicationMonetizationAudit", "applicationTestEntitlementChanges", "applicationIntentChanges", "applicationRoleConnectionMetadataChanges", "botProfileAudit", "botProfileChanges", "announcementCrossposts", "announcementSubscriptionAudit", "announcementSubscriptionChanges", "attachments", "automodAudit", "automodChanges", "banAudit", "bulkBanAudit", "bulkBans", "bulkMemberRoleChanges", "channelCreation", "channelDeletionAudit", "channelDeletions", "channelCloneAudit", "channelCloning", "channelMetadataChanges", "channelOrderingAudit", "channelOrderingChanges", "deletions", "directMessageAudit", "directMessageAttachments", "directMessageDeletion", "directMessageDelivery", "directMessageEditing", "embedMessages", "forumPosts", "forumTagAudit", "forumTagChanges", "guildExpressionAudit", "guildExpressionChanges", "guildCommunityAudit", "guildCommunityChanges", "guildDepartures", "guildIncidentAudit", "guildIncidentChanges", "guildProfileAudit", "guildProfileChanges", "guildPruneAudit", "guildPrunes", "guildScaffolds", "guildSettingsAudit", "guildSettingsChanges", "guildTemplateAudit", "guildTemplateChanges", "integrationAudit", "integrationDeletions", "interactions", "inviteAudit", "inviteCreation", "inviteRoleAssignment", "inviteDeletions", "memberDirectory", "nicknameChanges", "otherMemberNicknameChanges", "memberRoleChanges", "memberVerificationChanges", "memberVoiceAudit", "memberVoiceChanges", "messageForwarding", "crossGuildMessageForwarding", "nativeCommandChanges", "nativeInteractions", "onboardingAudit", "onboardingChanges", "pinManagement", "permissionOverwrites", "permissionSyncs", "pollAudit", "pollCreation", "pollEnding", "pollVoterAudit", "reactionModeration", "reactionUserAudit", "roleCreation", "roleConfiguration", "roleDeletionAudit", "roleDeletions", "roleOrderingAudit", "roleOrderingChanges", "scheduledEventAudit", "scheduledEventUserAudit", "scheduledEventChanges", "soundboardAudit", "soundboardChanges", "soundboardPlayback", "stageInstanceAudit", "stageInstanceChanges", "stageStartNotifications", "threadCreation", "threadAudit", "threadChanges", "welcomeScreenAudit", "welcomeScreenChanges", "webhookAudit", "webhookChanges", "webhookCreation", "webhookDeletions", "webhookMessageAudit", "webhookMessageChanges", "webhookMessageDeletions", "webhookMessageDelivery", "widgetPublicExposure", "widgetSettingsAudit", "widgetSettingsChanges"]; export declare const CONFIG_SCOPE_NAMES: readonly ["adminGuildIds", "applicationCommandGuildIds", "applicationConsumableEntitlementSkuIds", "applicationConsumableEntitlementUserIds", "applicationEntitlementGuildIds", "applicationEntitlementUserIds", "applicationMonetizationSkuIds", "applicationSubscriptionUserIds", "applicationTestEntitlementGuildIds", "applicationTestEntitlementSkuIds", "applicationTestEntitlementUserIds", "announcementCrosspostChannelIds", "announcementSubscriptionSourceChannelIds", "announcementSubscriptionTargetChannelIds", "attachmentChannelIds", "automodAlertChannelIds", "automodGuildIds", "banAuditGuildIds", "bulkBanGuildIds", "bulkMemberRoleGuildIds", "bulkMemberRoleIds", "channelCreationGuildIds", "channelDeletionIds", "channelCloneGuildIds", "channelCloneSourceIds", "channelMetadataIds", "channelOrderingGuildIds", "componentLinkOrigins", "deleteChannelIds", "directMessageUserIds", "embedMessageChannelIds", "forumPostChannelIds", "forumTagChannelIds", "guildScaffoldGuildIds", "guildCommunityGuildIds", "guildDepartureGuildIds", "guildExpressionGuildIds", "guildIncidentGuildIds", "guildProfileGuildIds", "guildPruneGuildIds", "guildPruneIncludeRoleIds", "guildSettingsGuildIds", "guildTemplateGuildIds", "integrationGuildIds", "integrationIds", "interactionChannelIds", "inviteCreationChannelIds", "inviteRoleIds", "inviteGuildIds", "mentionUserIds", "memberDirectoryGuildIds", "nicknameGuildIds", "memberRoleGuildIds", "memberRoleIds", "memberVerificationGuildIds", "memberVoiceChannelIds", "memberVoiceGuildIds", "messageForwardSourceChannelIds", "messageForwardTargetChannelIds", "nativeInteractionChannelIds", "nativeInteractionGuildIds", "nativeInteractionUserIds", "onboardingGuildIds", "protectedUserIds", "pinChannelIds", "pollChannelIds", "reactionChannelIds", "permissionOverwriteChannelIds", "permissionSyncChannelIds", "roleCreationGuildIds", "roleConfigurationIds", "roleDeletionIds", "roleOrderingGuildIds", "scheduledEventGuildIds", "soundboardGuildIds", "soundboardPlaybackChannelIds", "soundboardPlaybackSourceGuildIds", "stageChannelIds", "threadParentIds", "threadGuildIds", "threadIds", "threadMemberUserIds", "welcomeScreenGuildIds", "webhookChannelIds", "webhookGuildIds", "webhookMessageChannelIds", "widgetSettingsGuildIds"]; export declare const CONFIG_LIMIT_NAMES: readonly ["attachmentMaxBytes", "guildPruneMaxMembers", "interactionMaxWritesPerMinute", "interactionMinWriteIntervalMs", "mcpReadResponseMaxBytes", "nativeInteractionMaxPending", "nativeInteractionTtlSeconds"]; export declare const CONFIG_STORAGE_NAMES: readonly ["applicationEmojiRoots", "attachmentRoots", "auditFile", "botProfileRoots", "guildExpressionRoots", "inviteCapabilityRoots", "scheduledEventRoots", "soundboardRoots", "webhookCredentialRoot"]; export declare const CONFIG_RUNTIME_NAMES: readonly ["nativeCommandName"]; export type ConnectorConfigCapabilityName = (typeof CONFIG_CAPABILITY_NAMES)[number]; export type ConnectorConfigLimitName = (typeof CONFIG_LIMIT_NAMES)[number]; export type ConnectorConfigRuntimeName = (typeof CONFIG_RUNTIME_NAMES)[number]; export type ConnectorConfigScopeName = (typeof CONFIG_SCOPE_NAMES)[number]; export interface ConnectorConfigDocumentStorage { applicationEmojiRoots?: readonly string[]; attachmentRoots?: readonly string[]; auditFile?: string; botProfileRoots?: readonly string[]; guildExpressionRoots?: readonly string[]; inviteCapabilityRoots?: readonly string[]; scheduledEventRoots?: readonly string[]; soundboardRoots?: readonly string[]; webhookCredentialRoot?: string; } export declare const CONNECTOR_CONFIG_DOCUMENT_SCHEMA: z.ZodObject<{ $schema: z.ZodOptional>; capabilities: z.ZodDefault; }, z.core.$strict>>; credential: z.ZodDiscriminatedUnion<[z.ZodObject<{ provider: z.ZodLiteral<"environment">; variable: z.ZodString; }, z.core.$strict>, z.ZodObject<{ path: z.ZodString; provider: z.ZodLiteral<"file">; }, z.core.$strict>], "provider">; gateway: z.ZodObject<{ enabled: z.ZodBoolean; eventBufferSize: z.ZodNumber; }, z.core.$strict>; identity: z.ZodObject<{ applicationId: z.ZodString; botId: z.ZodString; }, z.core.$strict>; limits: z.ZodDefault; }, z.core.$strict>>; name: z.ZodString; observability: z.ZodDefault; endpoint: z.ZodOptional; exportEnabled: z.ZodOptional; headers: z.ZodOptional; variable: z.ZodString; }, z.core.$strict>>; jsonLogsEnabled: z.ZodOptional; metrics: z.ZodOptional; endpoint: z.ZodOptional; headers: z.ZodOptional; variable: z.ZodString; }, z.core.$strict>>; protocol: z.ZodOptional; timeoutMs: z.ZodOptional; }, z.core.$strict>>; protocol: z.ZodOptional; serviceName: z.ZodOptional; timeoutMs: z.ZodOptional; traceSampleRatio: z.ZodOptional; traceSampler: z.ZodOptional; traces: z.ZodOptional; endpoint: z.ZodOptional; headers: z.ZodOptional; variable: z.ZodString; }, z.core.$strict>>; protocol: z.ZodOptional; timeoutMs: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>; readScope: z.ZodObject<{ channelIds: z.ZodType>; guildIds: z.ZodType>; }, z.core.$strict>; runtime: z.ZodDefault; }, z.core.$strict>>; schemaVersion: z.ZodLiteral<2>; scopes: z.ZodDefault>>; }, z.core.$strict>>; storage: z.ZodDefault>; }, z.core.$strict>>; tools: z.ZodObject<{ surface: z.ZodEnum<{ full: "full"; progressive: "progressive"; }>; toolsets: z.ZodArray>; }, z.core.$strict>; }, z.core.$strict>; export declare function normalizeConfigName(value: string): string; export declare function connectorConfigSecretEnvironmentNames(document: ConnectorConfigDocument): readonly string[]; export declare function connectorConfigSecretFilePaths(document: ConnectorConfigDocument): readonly string[]; export declare function parseConnectorConfigDocument(value: unknown, expectedName?: string): ConnectorConfigDocument; export declare function createConnectorConfigDocument(options: { applicationId: string; botId: string; capabilities?: ConnectorConfigDocument["capabilities"]; channelIds?: readonly string[]; credentialFile?: string; credentialVariable?: string; gatewayEnabled?: boolean; gatewayEventBufferSize?: number; guildIds: readonly string[]; limits?: ConnectorConfigDocument["limits"]; name: string; observability?: ConnectorConfigDocumentObservability; runtime?: ConnectorConfigDocument["runtime"]; scopes?: ConnectorConfigDocument["scopes"]; storage?: ConnectorConfigDocumentStorage; toolsets: readonly McpToolsetName[]; toolSurface: McpToolSurface; }): ConnectorConfigDocument; export declare function parseStrictConfigJson(text: string): unknown; export declare function parseConnectorConfigJson(text: string): ConnectorConfigDocument; export declare function loadConnectorConfigDocumentFile(file: string, options?: { platform?: NodeJS.Platform; processUserId?: number; }): ConnectorConfigDocument; export declare function loadConnectorCredentialFile(file: string, options?: { platform?: NodeJS.Platform; processUserId?: number; }): string; export declare function resolveConnectorCredential(referenceValue: ConnectorCredentialReference, source: NodeJS.ProcessEnv): string; export declare function connectorConfigJsonSchema(): Record; export declare function connectorConfigFields(): readonly ConfigDocumentField[]; //# sourceMappingURL=config-document.d.ts.map