UNPKG

@withkeystone/cli

Version:

Keystone CLI - Test automation for modern web apps

20 lines 901 B
interface RequestOptions extends RequestInit { skipAuth?: boolean; } export declare class AuthenticatedClient { private apiUrl; private storage; constructor(apiUrl: string); request(endpoint: string, options?: RequestOptions): Promise<Response>; get(endpoint: string, options?: RequestOptions): Promise<Response>; post(endpoint: string, body?: any, options?: RequestOptions): Promise<Response>; put(endpoint: string, body?: any, options?: RequestOptions): Promise<Response>; patch(endpoint: string, body?: any, options?: RequestOptions): Promise<Response>; delete(endpoint: string, options?: RequestOptions): Promise<Response>; json<T>(endpoint: string, options?: RequestOptions): Promise<T>; isAuthenticated(): Promise<boolean>; getSession(): Promise<any>; logout(): Promise<void>; } export {}; //# sourceMappingURL=AuthenticatedClient.d.ts.map