export declare class OpacityError extends Error { code: string; constructor(code: string, message: string); toString(): string; toJSON(): { name: string; code: string; message: string; }; } type WorkflowResponse = { payload: any; message: string; signature: string; hash: string; }; export declare enum OpacityEnvironment { Test = 0, Local = 1, Sandbox = 2, Staging = 3, Production = 4 } export declare function init({ apiKey, dryRun, environment, shouldShowErrorsInWebView, }: { apiKey: string; dryRun?: boolean; environment: OpacityEnvironment; shouldShowErrorsInWebView?: boolean; }): Promise; /** * Main function to get a flow response from Opacity. * * Each flow might define its own parameters, so check the flow documentation for available parameters. * * **WARNING** The response is dynamic and the return type is not strictly defined, it's mostly there as a convenience. * * Therefore, be sure to check for the existence of the properties you expect in the response. * * @param name name of the flow to execute e.g. "github:profile" * @param params optional parameters to pass to the flow, check the flow documentation for available parameters * @returns WorkflowResponse containing the JSON response from the flow, and optionally a signature and hash */ export declare function get(name: string, params?: Record): Promise<{ response?: WorkflowResponse; error?: OpacityError; }>; export {}; //# sourceMappingURL=index.d.ts.map