import { type ConnectionProvider, type ProviderRegistry } from '@hookfish/provider'; import { z } from 'zod'; /** * Conventional Hookfish environment fields. Runtime bindings may add * provider-specific values and platform services. */ export type BrokerEnv = { NODE_ENV?: string; OAUTH_ENCRYPTION_KEY?: string; HOOKFISH_API_KEY?: string; OAUTH_REDIRECT_BASE_URL?: string; [key: string]: unknown; }; declare const brokerConfigSchema: z.ZodObject<{ NODE_ENV: z.ZodPreprocess>; OAUTH_ENCRYPTION_KEY: z.ZodPreprocess>; HOOKFISH_API_KEY: z.ZodPreprocess>; OAUTH_REDIRECT_BASE_URL: z.ZodPreprocess>; }, z.core.$strip>; export type BrokerConfig = z.infer; /** * Hookfish owns validation for its broker settings. Request bindings win over * the ambient Node environment so Workers can rotate secrets without reloading * an isolate. */ export declare function resolveBrokerConfig(bindings: object): BrokerConfig; export declare function readEnvString(env: object, key: string): string | undefined; export type ProviderConfig = { provider: ConnectionProvider; scopes: string[]; }; export declare function resolveProviderConfig(providerId: string, providerOrRegistry: ConnectionProvider | ProviderRegistry): ProviderConfig; /** * The callback URL registered with the provider. Falls back to the origin of * the incoming request, which keeps local dev working without extra config. */ export declare function resolveRedirectUri(env: object, requestUrl: string, providerId: string): string; export declare function resolveConnectionCallbackUri(env: object, requestUrl: string, providerId: string): string; export declare function resolveClientMetadataUri(env: object, requestUrl: string): string; export declare function validateReturnTo(returnTo: string | undefined, trustedOrigins: readonly string[]): string | undefined; export declare function requireBrokerApiKey(env: object): string; export {}; //# sourceMappingURL=config.d.ts.map