import type { ApiScope } from '@memento/core'; import type { NextFunction, Request, Response } from 'express'; import { type ApiTokenRegistry } from '../auth/api-token-registry.js'; declare global { namespace Express { interface Request { programmaticAuth?: { keyId: string; scopes: ApiScope[]; }; } } } export type ProgrammaticAuthMiddlewareConfig = { registry: ApiTokenRegistry; requiredScope: ApiScope | ApiScope[]; errorFormat?: 'legacy' | 'agent'; }; export declare function createProgrammaticAuthMiddleware(config: ProgrammaticAuthMiddlewareConfig): (req: Request, res: Response, next: NextFunction) => void; //# sourceMappingURL=programmatic-auth.middleware.d.ts.map