import { ParsedScopes } from './getInfoFromJwt'; import { Mode, TokenProviderAuthUser, TokenProviderClAppSlug, TokenProviderRole, TokenProviderRolePermissions, TokenProviderTokenApplicationKind } from './types'; export declare function isTokenExpired({ accessToken, compareTo, }: { accessToken: string; compareTo: Date; }): boolean; interface ValidToken { isValidToken: true; accessToken: string; mode: Mode; organizationSlug: string; permissions?: TokenProviderRolePermissions; accessibleApps?: (TokenProviderClAppSlug | "metrics")[]; user: TokenProviderAuthUser | null; scopes?: ParsedScopes; role: TokenProviderRole | null; } interface InvalidToken { isValidToken: false; } export declare function isValidTokenForCurrentApp({ accessToken, kind, isProduction, currentMode, organizationSlug, }: { accessToken: string; kind: TokenProviderTokenApplicationKind; isProduction: boolean; currentMode: Mode; /** * only required when app is self-hosted, to check if the token is valid for the current organization. * When app is hosted by Commerce Layer, the organization slug is retrieved from the url subdomain. */ organizationSlug?: string; }): Promise; export {};