import type { Request } from 'express'; import type { CommonRequest } from '../common'; import type { AdminUser, JwtPayload, Role, UserProfile } from '../core/auth'; import type { Tenant } from '../tenant'; import type { WXJwtPayload } from '../wechat'; import type { ApiKeyRequest } from '../core/auth/strategy'; export declare type PayloadType = JwtPayload | WXJwtPayload | ApiKeyPayload; export declare type AuthInfo = Partial<{ payload?: Payload; user?: User; profile?: Profile; identifier?: string; tenant?: Tenant; roles?: Role[]; }>; export declare type RequestInfo = Request & CommonRequest & ApiKeyRequest & { isOrgUser?: boolean; }; export declare type AnyAuthRequest = RequestInfo & AuthInfo & { clientIp: string; }; export interface ApiKeyPayload { apiKey: string; } export interface AuthResult

{ err: string | Error; payload: P; info: any; }