export declare enum CacheRole {
    ReadWrite = "readwrite",
    ReadOnly = "readonly",
    WriteOnly = "writeonly"
}
export declare const AllCaches: unique symbol;
export declare const AllTopics: unique symbol;
export declare const AllCacheItems: unique symbol;
export declare const AllFunctions: unique symbol;
export interface CacheName {
    name: string;
}
export declare function isCacheName(cache: CacheName | typeof AllCaches): cache is CacheName;
export type CacheSelector = typeof AllCaches | CacheName | string;
export interface CachePermission {
    role: CacheRole;
    /**
     * Scope the token permissions to select caches
     */
    cache: CacheSelector;
}
export declare function isCachePermission(p: Permission): boolean;
export declare function asCachePermission(p: Permission): CachePermission;
export declare enum TopicRole {
    PublishSubscribe = "publishsubscribe",
    SubscribeOnly = "subscribeonly",
    PublishOnly = "publishonly"
}
export interface TopicName {
    name: string;
}
export declare function isTopicName(topic: TopicName | typeof AllTopics): topic is TopicName;
export type TopicSelector = typeof AllTopics | TopicName | string;
export interface TopicPermission {
    role: TopicRole;
    /**
     * Scope the token permissions to select caches
     */
    cache: CacheSelector;
    /**
     * Scope the token permissions to select topics
     */
    topic: TopicSelector;
}
export declare function isTopicPermission(p: Permission): boolean;
export declare function asTopicPermission(p: Permission): TopicPermission;
export declare enum FunctionRole {
    FunctionPermitNone = "functionpermitnone",
    FunctionInvoke = "functioninvoke"
}
export interface FunctionName {
    name: string;
}
export declare function isFunction(func: FunctionName | typeof AllFunctions): func is FunctionName;
export interface FunctionNamePrefix {
    namePrefix: string;
}
export declare function isFunctionNamePrefix(functionNamePrefix: FunctionSelector): functionNamePrefix is FunctionNamePrefix;
export type FunctionSelector = typeof AllFunctions | FunctionName | FunctionNamePrefix | string;
export interface FunctionPermission {
    role: FunctionRole;
    /**
     * Scope the token permissions to select caches
     */
    cache: CacheSelector;
    /**
     * Scope the token permissions to select functions
     */
    func: FunctionSelector;
}
export declare function isFunctionPermission(p: Permission): boolean;
export declare function asFunctionPermission(p: Permission): FunctionPermission;
export type Permission = CachePermission | TopicPermission | FunctionPermission;
export interface Permissions {
    permissions: Array<Permission>;
}
export declare const AllDataReadWrite: Permissions;
export declare function isPermissionsObject(scope: PermissionScope): boolean;
export declare function asPermissionsObject(scope: PermissionScope): Permissions;
export declare abstract class PredefinedScope {
}
export type PermissionScope = typeof AllDataReadWrite | Permissions | PredefinedScope;
/**
 * @deprecated please use PermissionScope instead
 */
export type TokenScope = PermissionScope;
