UNPKG

@openapi-qraft/react

Version:

OpenAPI client for React, providing type-safe requests and dynamic TanStack Query React Hooks via a modular, Proxy-based architecture.

29 lines 786 B
export interface JwtDecodeOptions { header?: boolean; } export interface JwtHeader { typ?: string; alg?: string; kid?: string; } export interface JwtPayload { iss?: string; sub?: string; aud?: string[] | string; exp?: number; nbf?: number; iat?: number; jti?: string; } export declare class InvalidTokenError extends Error { } /** * Decode a base64 string to a UTF-8 string. * Could be used in Node.js or in the browser. */ export declare function b64DecodeUnicode(data: string): string; export declare function jwtDecode<T = JwtHeader>(token: string, options: JwtDecodeOptions & { header: true; }): T; export declare function jwtDecode<T = JwtPayload>(token: string, options?: JwtDecodeOptions): T; //# sourceMappingURL=index.d.ts.map