-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplugin.d.ts
35 lines (28 loc) · 974 Bytes
/
plugin.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { SupabaseClient, SupabaseClientOptions } from "@supabase/supabase-js";
import { FastifyPluginCallback } from "fastify";
export interface FastifySupabasePluginOptions {
/**
* fastify-supabase name of the instance
*/
namespace?: string;
supabaseClientOptions?: SupabaseClientOptions;
/**
* The unique Supabase Key which is supplied when you create a new project in your project dashboard
*/
supabaseKey: string;
/**
* The unique Supabase URL which is supplied when you create a new project in your project dashboard
*/
supabaseUrl: string;
}
export interface FastifySupabaseNamedInstance {
[namespace: string]: SupabaseClient;
}
export type FastifySupabase = FastifySupabaseNamedInstance & SupabaseClient;
declare module "fastify" {
interface FastifyInstance {
supabase: FastifySupabase;
}
}
export const FastifySupabasePlugin: FastifyPluginCallback<FastifySupabasePluginOptions>;
export default FastifySupabasePlugin;