///
import { gapiObject } from './gapi';
export interface userProps {
id?: string;
email?: string;
name?: string;
givenName?: string;
familyName?: string;
imageUrl?: string;
}
export interface user {
isSignedIn: (scopes: string[], userProps: userProps) => void;
isNotSignedIn: (scopes: string[], userProps: userProps) => void;
nextInteraction: () => Promise;
grantsScopes?: (scopes?: string[] | true, userProps?: userProps) => void;
deniesAccess?: () => void;
closesPopup?: () => void;
}
export interface userInternal {
isSignedIn: boolean;
scopes: string[];
props: userProps;
resolveNextInteraction: () => void;
promise?: Promise;
}
export interface registry {
[k: string]: T;
}
export interface discoveryDocsMock {
(gapi: gapiObject): void;
}
export interface moduleMock {
(a: {
gapi: gapiObject;
user: user;
_user: userInternal;
_discoveryDocs: registry;
}): void;
}
interface registerDiscoveryDocs {
(o: registry): void;
}
interface registerModuleMocks {
(o: registry): void;
}
export declare function createGapiMock(setWindowProp?: string | null): {
gapi: gapiObject;
user: user;
registerModuleMocks: registerModuleMocks;
registerDiscoveryDocs: registerDiscoveryDocs;
};
export {};