2024-04-21 22:41:38 +00:00
|
|
|
import {OAuth2Namespace} from "@fastify/oauth2";
|
2023-12-13 19:35:55 +00:00
|
|
|
import type { db } from "./db";
|
|
|
|
import type { Redis } from "./utils";
|
|
|
|
|
|
|
|
declare module "fastify" {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
|
|
|
|
interface FastifyRequest {
|
2024-04-21 22:41:38 +00:00
|
|
|
// db: typeof db;
|
|
|
|
// redis: typeof Redis;
|
|
|
|
session?: {
|
|
|
|
id: string,
|
|
|
|
user_id: string,
|
|
|
|
google_access_token: string,
|
|
|
|
google_refresh_token: string,
|
|
|
|
expires_at: Date
|
|
|
|
}
|
|
|
|
}
|
|
|
|
interface FastifyInstance {
|
|
|
|
googleOAuth2: OAuth2Namespace
|
2023-12-13 19:35:55 +00:00
|
|
|
}
|
|
|
|
}
|