-
-
Notifications
You must be signed in to change notification settings - Fork 595
/
Copy pathRESTController.d.ts
35 lines (35 loc) · 1.02 KB
/
RESTController.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
export interface RequestOptions {
useMasterKey?: boolean;
useMaintenanceKey?: boolean;
sessionToken?: string;
installationId?: string;
returnStatus?: boolean;
batchSize?: number;
include?: any;
progress?: any;
context?: any;
usePost?: boolean;
ignoreEmailVerification?: boolean;
transaction?: boolean;
}
export interface FullOptions {
success?: any;
error?: any;
useMasterKey?: boolean;
useMaintenanceKey?: boolean;
sessionToken?: string;
installationId?: string;
progress?: any;
usePost?: boolean;
}
declare const RESTController: {
ajax(method: string, url: string, data: any, headers?: any, options?: FullOptions): (Promise<any> & {
resolve: (res: any) => void;
reject: (err: any) => void;
}) | Promise<unknown>;
request(method: string, path: string, data: any, options?: RequestOptions): Promise<any>;
handleError(response: any): Promise<never>;
_setXHR(xhr: any): void;
_getXHR(): any;
};
export default RESTController;