import type { OAuth2Request, OAuth2Response } from "../customer"; import type { GraphQLOpts } from "../../request"; import type { CustomerOAuthProviderFragment } from "../../graphql/types"; import type Postmate from "postmate"; export declare type PopupConnectResult = { kind: "success"; code: string; } | { kind: "success_oauth1"; token: string; verifier: string; } | { kind: "failure"; }; export interface GetOAuth2HookArgs { remote: Postmate; oauth2Providers: CustomerOAuthProviderFragment[]; shopDomain: string; shopID: string; opts: GraphQLOpts; } export declare function getOAuth2Hook(args: GetOAuth2HookArgs): (req: OAuth2Request) => [Promise, () => void];