-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.d.ts
More file actions
45 lines (35 loc) · 1.16 KB
/
index.d.ts
File metadata and controls
45 lines (35 loc) · 1.16 KB
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
36
37
38
39
40
41
42
43
44
45
declare module "treblle" {
type OptionsBase = {
sdkToken: string;
apiKey: string;
additionalFieldsToMask?: string[];
debug?: boolean;
blocklistPaths?: string[] | RegExp;
};
type StrapiOptionsBase = {
sdkToken: string;
apiKey: string;
additionalFieldsToMask?: string[];
debug?: boolean;
blocklistPaths?: string[] | RegExp;
ignoreAdminRoutes?: string[];
};
type FetchEvent = any;
type Request = any;
type Response = any;
// Augment Request interface for Cloudflare Workers route_path support
interface CloudflareRequest extends Request {
route_path?: string;
}
export function useTreblle(app: any, options: any): void;
export function koaTreblle(options: OptionsBase): Function;
export function strapiTreblle(options: StrapiOptionsBase): Function;
export function serviceWorkerTreblle(
options: OptionsBase
): (event: FetchEvent) => void;
export function moduleWorkerTreblle(
options: OptionsBase
): (request: Request) => Promise<Response> | Response;
export function useNestTreblle(app: any, options: OptionsBase): void;
export function honoTreblle(options: OptionsBase): Function;
}