-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal.d.ts
More file actions
22 lines (20 loc) · 913 Bytes
/
global.d.ts
File metadata and controls
22 lines (20 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { LogToFastifyInstance } from '@albirex/fastify-logto';
import type { Entities } from '@platformatic/db'
import { SQLMapperPluginInterface } from '@platformatic/sql-mapper';
import { AddAuthStrategyDecorator, CreateJWTSessionDecorator, CreateSessionDecorator, CreateWebhookSessionDecorator, ExtractUserDecorator } from 'fastify-user';
declare module 'fastify' {
interface FastifyInstance {
platformatic: SQLMapperPluginInterface<Entities>;
logto: LogToFastifyInstance;
addAuthStrategy: AddAuthStrategyDecorator
}
interface FastifyRequest {
extractUser: ExtractUserDecorator
createSession: CreateSessionDecorator
createJWTSession: CreateJWTSessionDecorator
createWebhookSession: CreateWebhookSessionDecorator
}
}
declare module '@platformatic/sql-mapper' {
type EntityHook<T extends (...args: any) => any> = (original: T, ...options: Parameters<T>) => ReturnType<T>
}