skapi-js 0.1.124 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ import { Form, FormSubmitCallback, FetchOptions, Connection } from '../Types';
2
+ export declare function getConnection(): Promise<Connection | null>;
3
+ export declare function listHostDirectory(params: {
4
+ service: string;
5
+ dir: string;
6
+ }, fetchOptions: FetchOptions): Promise<any>;
7
+ export declare function request(url: string, data?: Form<any> | null, options?: {
8
+ fetchOptions?: FetchOptions & FormSubmitCallback;
9
+ auth?: boolean;
10
+ method?: string;
11
+ meta?: Record<string, any>;
12
+ bypassAwaitConnection?: boolean;
13
+ responseType?: string;
14
+ contentType?: string;
15
+ }): Promise<any>;
16
+ export declare function secureRequest<RequestParams = {
17
+ url: string;
18
+ data?: any;
19
+ sync?: boolean;
20
+ }>(params: RequestParams | RequestParams[]): Promise<any>;
21
+ export declare function mock(data: Form<any | {
22
+ raise?: 'ERR_INVALID_REQUEST' | 'ERR_INVALID_PARAMETER' | 'SOMETHING_WENT_WRONG' | 'ERR_EXISTS' | 'ERR_NOT_EXISTS';
23
+ }>, formCallback?: FormSubmitCallback, options?: {
24
+ auth?: boolean;
25
+ method?: string;
26
+ meta?: Record<string, any>;
27
+ bypassAwaitConnection?: boolean;
28
+ responseType?: string;
29
+ contentType?: string;
30
+ }): Promise<{
31
+ mockResponse: Record<string, any>;
32
+ }>;
33
+ export declare function getFormResponse(): Promise<any>;
34
+ export declare function formHandler(options?: {
35
+ preventMultipleCalls: boolean;
36
+ }): (target: object, propertyKey: string, descriptor: any) => void;