mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-08-03 11:07:00 -04:00
37 lines
947 B
TypeScript
37 lines
947 B
TypeScript
import type { LocaleDescription } from '../locale/locales.ts';
|
|
import type { User } from '../src/user.ts';
|
|
|
|
import type { Database } from './db.ts';
|
|
|
|
import type { PermissionArea } from '~/src/helpers.ts';
|
|
|
|
declare global {
|
|
type GeneratorFunc<R, Args extends unknown[]> = (...args: Args) => Generator<R>;
|
|
|
|
namespace Express {
|
|
export interface Request {
|
|
rawUser: User | undefined;
|
|
user: User | null;
|
|
isGranted: (area?: PermissionArea, locale?: string) => boolean;
|
|
locales: Record<string, LocaleDescription>;
|
|
db: Database;
|
|
}
|
|
|
|
export interface Response {
|
|
spa?: boolean;
|
|
}
|
|
}
|
|
}
|
|
|
|
declare module 'express-session' {
|
|
interface SessionData {
|
|
socialRedirect: string;
|
|
grant: {
|
|
instance: string;
|
|
client_id?: string;
|
|
client_secret?: string;
|
|
response?: any;
|
|
};
|
|
}
|
|
}
|