UNPKG

skynet-mysky-utils

Version:
44 lines 1.39 kB
export declare class Permission { requestor: string; path: string; category: PermCategory; permType: PermType; constructor(requestor: string, path: string, category: PermCategory, permType: PermType); } export declare const PermDiscoverable = 1; export declare const PermHidden = 2; export declare const PermLegacySkyID = 3; /** * Defines what type of file is being requested. Discoverable files are visible * to the entire world, hidden files are only visible to the user (unless * shared), and LegacySkyID files are supported files from the legacy SkyID * login system. */ export declare enum PermCategory { Discoverable, Hidden, LegacySkyID } export declare const PermRead = 4; export declare const PermWrite = 5; export declare enum PermType { Read, Write } /** * Converts the given permission category to a human-readable string. * * @param category - The given category. * @returns - The string. * @throws - Will throw if the category is not valid. */ export declare function permCategoryToString(category: PermCategory): string; /** * Converts the given permission type to a human-readable string. * * @param permType - The given type. * @returns - The string. * @throws - Will throw if the type is not valid. */ export declare function permTypeToString(permType: PermType): string; //# sourceMappingURL=permissions.d.ts.map