UNPKG

@intuitionrobotics/google-services

Version:
23 lines (22 loc) 1.02 kB
import { Module } from "@intuitionrobotics/ts-common"; import { GoogleAuth, JWTInput } from "google-auth-library"; import { JWTOptions } from "google-auth-library/build/src/auth/jwtclient"; import { OAuth2ClientOptions } from "google-auth-library/build/src/auth/oauth2client"; import { UserRefreshClientOptions } from "google-auth-library/build/src/auth/refreshclient"; type AuthModuleConfig = { auth: { [k: string]: JWTInput | string; }; }; type Version = 'v1' | 'v2'; export declare class AuthModule_Class extends Module<AuthModuleConfig> { constructor(); getAuth<T extends Version = "v2">(authKey: string, scopes: string[], version?: T, clientOptions?: JWTOptions | OAuth2ClientOptions | UserRefreshClientOptions): { version: string; auth: GoogleAuth; }; getAuthConfig(authKey: string): string | JWTInput; getJWT(authKey: string, scopes: string[]): Promise<import("google-auth-library").Credentials>; } export declare const AuthModule: AuthModule_Class; export {};