@intuitionrobotics/google-services
Version:
23 lines • 1.09 kB
TypeScript
import { Module } from "@intuitionrobotics/ts-common";
import { GoogleAuth, type JWTInput } from "google-auth-library";
import type { JWTOptions } from "google-auth-library/build/src/auth/jwtclient.js";
import type { OAuth2ClientOptions } from "google-auth-library/build/src/auth/oauth2client.js";
import type { UserRefreshClientOptions } from "google-auth-library/build/src/auth/refreshclient.js";
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 {};
//# sourceMappingURL=AuthModule.d.ts.map