import { IHttpClient } from "./IHttpClient"; /** * A permission provides information about {@link File | file} sharing granted to a specific * {@link User | users}, group, or project {@link Member | member}. */ export declare class Permission { private _data; protected fileId: string; protected httpClient: IHttpClient; /** * @param data - An object that implements permission data storage. * @param fileId - Owner file ID. * @param httpClient - Http client. */ constructor(data: any, fileId: string, httpClient: IHttpClient); private internalGet; private internalPut; private internalDelete; /** * Defines what actions are allowed to be performed on a file with this permission: * * - `read` - The ability to read file description, geometry data and properties * - `readSourceFile` - The ability to read source file * - `write` - The ability to modify file name, description and references * - `readViewpoint` - The ability to read file viewpoints * - `createViewpoint` - The ability to create file viewpoints */ get actions(): string[]; set actions(value: string[]); /** * Raw permission data received from the server. * * @readonly */ get data(): any; private set data(value); /** * Unique permission ID. * * @readonly */ get id(): string; /** * Principials are any entity that can be authenticated by the server, such as a any user or * project that will get access to the file. * * @typedef {any} Principial * @property {any} user - The user entry that get access to the file. * @property {string} user.id - User ID. * @property {string} user.name - User name. * @property {any} project - The project entry that get access to the file. * @property {string} project.id - Project ID. * @property {string} project.name - Project name. */ /** * A collection of principials that will get access to the file. */ get grantedTo(): any[]; set grantedTo(value: any[]); /** * Specifies whether all users have access to the file or not. */ get public(): boolean; set public(value: boolean); /** * Refresh permission data. * * @async */ checkout(): Promise; /** * Update permission data on the server. * * @async * @param data - Raw permission data. */ update(data: any): Promise; /** * Remove a permission from a file. * * @async * @returns Returns the raw data of a deleted permission. */ delete(): Promise; /** * Save permission data changes to the server. Call this method to update permission data on * the server after any changes. * * @async */ save(): Promise; } //# sourceMappingURL=Permission.d.ts.map