import * as h3 from 'h3'; import { UserStore, SshKeyStore, KeyStore, CodeStore, GrantChallengeStore, JtiStore, RefreshTokenStore } from '@openape/auth'; import { GrantStore } from '@openape/grants'; interface RateLimitConfig { /** Max requests per window (default: 10) */ maxRequests?: number; /** Window duration in ms (default: 60000 = 1 minute) */ windowMs?: number; /** Paths to rate-limit (default: auth endpoints) */ paths?: string[]; } interface IdPConfig { issuer: string; adminEmails?: string[]; managementToken?: string; /** Secret for cookie session encryption (min 32 chars). */ sessionSecret?: string; /** Rate limiting configuration. When provided, rate limiting is enabled. */ rateLimitConfig?: RateLimitConfig; } interface IdPStores { userStore: UserStore; sshKeyStore: SshKeyStore; keyStore: KeyStore; codeStore: CodeStore; challengeStore: GrantChallengeStore; grantStore: GrantStore; jtiStore: JtiStore; refreshTokenStore: RefreshTokenStore; } interface IdPInstance { app: h3.App; stores: IdPStores; } export type { IdPStores as I, IdPConfig as a, IdPInstance as b };