jccp_a/vuepress/node_modules/@vercel/oidc/dist/token-util.d.ts
hellcat ac91e1fbe4 1
2025-11-12 17:57:30 +08:00

22 lines
899 B
TypeScript

export declare function getVercelDataDir(): string | null;
export declare function getVercelCliToken(): string | null;
interface VercelTokenResponse {
token: string;
}
export declare function getVercelOidcToken(authToken: string, projectId: string, teamId?: string): Promise<VercelTokenResponse | null>;
export declare function assertVercelOidcTokenResponse(res: unknown): asserts res is VercelTokenResponse;
export declare function findProjectInfo(): {
projectId: string;
teamId: string;
};
export declare function saveToken(token: VercelTokenResponse, projectId: string): void;
export declare function loadToken(projectId: string): VercelTokenResponse | null;
interface TokenPayload {
sub: string;
name: string;
exp: number;
}
export declare function getTokenPayload(token: string): TokenPayload;
export declare function isExpired(token: TokenPayload): boolean;
export {};