/** * Template Registry * * Central registry for consent page templates. * Provides factory methods for creating templates by auth mode. * * @module @kya-os/consent/templates/registry */ import { BaseConsentTemplate } from "./base/base-template.js"; import type { AuthMode } from "../types/modes.types.js"; import type { ExtendedConsentPageConfig } from "../types/page.types.js"; import type { ConsentConfigWithMeta } from "../types/config.types.js"; /** * Get a template instance for the specified auth mode. * * @param authMode - The authentication mode * @param config - Extended page config with mode-specific settings * @param remoteConfig - Remote consent configuration from AgentShield * @returns Template instance ready to render */ export declare function getTemplateForMode(authMode: AuthMode, config: ExtendedConsentPageConfig, remoteConfig?: ConsentConfigWithMeta): BaseConsentTemplate; /** * Determine the auth mode from config. * * This function is ONLY for template selection in the consent/clickwrap flow. * The credential vs OAuth decision happens BEFORE template rendering, in ConsentService. * * NOTE: String-based provider detection has been removed intentionally. * Credential rendering uses renderCredentialPage() directly, not this function. * * @param config - Page config with optional OAuth settings * @returns Detected auth mode */ export declare function detectAuthMode(config: ExtendedConsentPageConfig): AuthMode; /** * Check if an auth mode is valid. * * @param mode - Mode string to check * @returns True if valid auth mode */ export declare function isValidAuthMode(mode: string): mode is AuthMode; /** * Get all registered auth modes. * * @returns Array of auth mode identifiers */ export declare function getRegisteredModes(): AuthMode[]; /** * Render a consent page for the given config. * * This is the main entry point for rendering consent pages. * * @param config - Extended page config * @param remoteConfig - Remote consent configuration from AgentShield * @param authMode - Optional explicit auth mode (auto-detected if not provided) * @returns Rendered HTML string */ export declare function renderConsentPage(config: ExtendedConsentPageConfig, remoteConfig?: ConsentConfigWithMeta, authMode?: AuthMode): string; /** * Render an OAuth consent page with pre-configured OAuth URL. * * @param config - Extended page config * @param oauthUrl - OAuth authorization URL * @param remoteConfig - Remote consent configuration from AgentShield * @returns Rendered HTML string */ export declare function renderOAuthConsentPage(config: ExtendedConsentPageConfig, oauthUrl: string, remoteConfig?: ConsentConfigWithMeta): string; //# sourceMappingURL=registry.d.ts.map