22 lines
520 B
TypeScript
22 lines
520 B
TypeScript
import {OAuth2Namespace} from "@fastify/oauth2";
|
|
import type { db } from "./db";
|
|
import type { Redis } from "./utils";
|
|
|
|
declare module "fastify" {
|
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
interface FastifyRequest {
|
|
// db: typeof db;
|
|
// redis: typeof Redis;
|
|
session?: {
|
|
id: string,
|
|
user_id: string,
|
|
access_token: string,
|
|
refresh_token: string,
|
|
expires_at: Date
|
|
}
|
|
}
|
|
interface FastifyInstance {
|
|
googleOAuth2: OAuth2Namespace
|
|
}
|
|
}
|