import { IHttpClient } from "./IHttpClient"; import { IShortUserDescription } from "./IUser"; import { Role } from "./Role"; import { Member } from "./Member"; /** * Projects are used to collaborate on models and track issues. */ export declare class Project { private _data; protected httpClient: IHttpClient; /** * @param data - An object that implements project data storage. * @param httpClient - Http client. */ constructor(data: any, httpClient: IHttpClient); protected internalGet(relativePath: string): Promise; protected internalPost(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise; protected internalPut(relativePath: string, body?: ArrayBuffer | Blob | globalThis.File | FormData | object | string | null): Promise; protected internalDelete(relativePath: string): Promise; /** * Project features the user has access to. * * @property {string[]} project_actions - Actions are allowed to be performed: `update`, * `createTopic`, `createDocument`. * @readonly */ get authorization(): any; /** * Project creation time (UTC) in the format specified in ISO 8601. * * @readonly */ get createdAt(): string; /** * Project custom fields object, to store custom data. */ get customFields(): any; set customFields(value: any); /** * Raw project data received from the server. * * @readonly */ get data(): any; private set data(value); /** * Project description. */ get description(): string; set description(value: string); /** * Project end date in the format specified in ISO 8601. */ get endDate(): string; set endDate(value: string | Date); /** * Unique project ID. * * @readonly */ get id(): string; /** * The number of members in the project. * * @readonly */ get memberCount(): number; /** * The number of models in the project. * * @readonly */ get modelCount(): number; /** * Project name. */ get name(): string; set name(value: string); /** * Project owner information. * * @property {string} userId - User ID. * @property {string} userName - User name. * @property {string} name - First name. * @property {string} lastName - Last name. * @property {string} fullName - Full name. * @property {string} initials - Initials. * @property {string} email - User email. * @property {string} avatarUrl - User avatar image URL. * @readonly */ get owner(): IShortUserDescription; /** * Project preview image URL. Use [setPreview()]{@link Project#setPreview} to change preview image. * * @readonly */ get previewUrl(): string; /** * `true` if project is public (shared) project. */ get public(): boolean; set public(value: boolean); /** * Project start date in the format specified in ISO 8601. */ get startDate(): string; set startDate(value: string | Date); /** * The number of topics in the project. * * @readonly */ get topicCount(): number; /** * Project last update time (UTC) in the format specified in ISO 8601. * * @readonly */ get updatedAt(): string; /** * Refresh project data. * * @async */ checkout(): Promise; /** * Update project data on the server. * * @async * @param data - Raw project data. */ update(data: any): Promise; /** * Delete the project from the server. * * @async * @returns Returns the raw data of a deleted project. */ delete(): Promise; /** * Save project data changes to the server. Call this method to update project data on the * server after any changes. * * @async */ save(): Promise; /** * Set or remove the project preview. * * @async * @param image - Preview image. Can be a Data URL string, ArrayBuffer, Blob or * Web API File object. Setting the `image` to `null` will remove the preview. */ setPreview(image?: ArrayBuffer | Blob | globalThis.File | FormData | string | null): Promise; /** * Returns a list of project roles. Project {@link Member | members} have different abilities * depending on the role they have in a project. * * @async */ getRoles(): Promise; /** * Returns the role information. * * @async * @param name - Role name. */ getRole(name: string): Promise; /** * Create a new project role. * * @async * @param name - Role name. * @param description - Role description. * @param permissions - Actions are allowed to be performed. See * {@link Role#permissions | Role.permissions} for more details. */ createRole(name: string, description: string, permissions: any): Promise; /** * Delete project role. * * @async * @param name - Role name. * @returns Returns the raw data of a deleted role. */ deleteRole(name: string): Promise; /** * Returns a list of project members. * * @async */ getMembers(): Promise; /** * Returns the member information. * * @async * @param memberId - Member ID. */ getMember(memberId: string): Promise; /** * Add a user to the project to become a member and have permission to perform actions. * * @async * @param userId - User ID. * @param role - User role from the list of project roles. */ addMember(userId: string, role: string): Promise; /** * Remove a member from a project. * * @async * @param memberId - Member ID. * @returns Returns the raw data of a deleted member. */ removeMember(memberId: string): Promise; /** * Information about the file (model) that can be reference in the project topics. * * @typedef {any} FileInformation * @property {any[]} display_information - The list of fields to allow users to associate the * file with a server model. * @property {string} display_information.field_display_name - Field display name. * @property {string} display_information.field_value - Field value. * @property {any} file - The file reference object. * @property {string} file.file_name - File name. * @property {string} file.reference - File ID. */ /** * Returns a list of project files. To add a file to this list, create a `project` permission * on the file using {@link File#createPermission | File.createPermission()}. * * @async */ getFilesInformation(): Promise; } //# sourceMappingURL=Project.d.ts.map