@pubby.club/sdk
Version:
Pubby Development Kit
29 lines (28 loc) • 696 B
TypeScript
import { PubbyModule } from "../../module";
import { Token } from "../../lib/oauth";
import { User } from "../../models/user";
import { Pubby } from "../../client";
declare module "../../client" {
interface Pubby {
auth: AuthModule;
}
}
export interface PbAuthOptions {
clientId: string;
secret: string;
}
/**
* Auth module
*/
export declare class AuthModule extends PubbyModule<PbAuthOptions> {
user: User;
private oauth;
constructor(client: Pubby, options: PbAuthOptions);
/**
* Login with bot account
*/
login(scopes?: string[]): Promise<void>;
getToken(): Promise<any>;
getTicket(): Promise<Token>;
init(): Promise<void>;
}