UNPKG

1.62 kBTypeScriptView Raw
1import * as React from 'react';
2import { IConnectProps } from './Connect';
3declare const Factory: (integrationId: string) => {
4 withInvoke: <TReturnedData = any>(functionName: string) => (WrappedComponent: React.ComponentType<import("./withInvoke").WithFetchProps<TReturnedData>>) => {
5 new (props: {}): {
6 context: import("./bearer-provider").IBearerContextValue;
7 invoke: (params?: any) => Promise<void>;
8 render(): JSX.Element;
9 setState<K extends "error" | "loading" | "data">(state: import("./withInvoke").IState<TReturnedData> | ((prevState: Readonly<import("./withInvoke").IState<TReturnedData>>, props: Readonly<import("./withInvoke").IWrapperProps<TReturnedData>>) => import("./withInvoke").IState<TReturnedData> | Pick<import("./withInvoke").IState<TReturnedData>, K> | null) | Pick<import("./withInvoke").IState<TReturnedData>, K> | null, callback?: (() => void) | undefined): void;
10 forceUpdate(callBack?: (() => void) | undefined): void;
11 readonly props: Readonly<{
12 children?: React.ReactNode;
13 }> & Readonly<import("./withInvoke").IWrapperProps<TReturnedData>>;
14 state: Readonly<import("./withInvoke").IState<TReturnedData>>;
15 refs: {
16 [key: string]: React.ReactInstance;
17 };
18 };
19 displayName: string;
20 contextType: React.Context<import("./bearer-provider").IBearerContextValue>;
21 };
22 Connect: (props: Pick<IConnectProps, "authId" | "setupId" | "onSuccess" | "onError" | "render">) => JSX.Element;
23};
24export default Factory;