File size: 837 Bytes
5c05829
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Fetch, FunctionsResponse, FunctionInvokeOptions } from './types';
export declare class FunctionsClient {
    protected url: string;
    protected headers: Record<string, string>;
    protected fetch: Fetch;
    constructor(url: string, { headers, customFetch, }?: {
        headers?: Record<string, string>;
        customFetch?: Fetch;
    });
    /**
     * Updates the authorization header
     * @param token - the new jwt token sent in the authorisation header
     */
    setAuth(token: string): void;
    /**
     * Invokes a function
     * @param functionName - The name of the Function to invoke.
     * @param options - Options for invoking the Function.
     */
    invoke<T = any>(functionName: string, options?: FunctionInvokeOptions): Promise<FunctionsResponse<T>>;
}
//# sourceMappingURL=FunctionsClient.d.ts.map