-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.d.ts
34 lines (30 loc) · 937 Bytes
/
types.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
import { AxiosInstance, AxiosError } from 'axios';
interface FilterOptions {
path?: string;
appId?: string;
[key: string]: any;
}
export interface PerimeterXInterceptorConfig {
filter?: (options: FilterOptions) => boolean;
onintercept?: (request: Request) => void;
onignore?: (request: Request) => void;
onsuccess?: (request: Request) => void;
onfailure?: (request: Request, error: AxiosError) => void;
onerror?: (error: AxiosError) => void;
simulate?: boolean;
modalConfig?: {
className?: string;
title?: string;
subtitle?: string;
quickfixes?: string[];
suffix?: string;
timeout?: number;
allowClose?: boolean;
compact?: boolean;
}
}
export declare const attach: (
axiosInstance: AxiosInstance,
config: PerimeterXInterceptorConfig
) => void;
export declare const detach: (axiosInstance: AxiosInstance) => void;