import type { Checklist, Comment, Document, ListProjectPhotosQueryParams, ListProjectsQueryParams, PaginationQueryParams, Photo, Project, ProjectCollaborator, ProjectCreatePayload, ProjectUpdatePayload, ProjectInvitation, ProjectNotepad, ProjectNotepadMutable, Tag, User, PhotoMutable } from "../interfaces.js"; import type { HttpClient } from "../http/HttpClient.js"; import { RequestOptions, UserScopedRequestOptions } from "./utils.js"; /** * Resource handling operations on projects and their associated sub-resources. * Exposes nested helpers for photos, assignees, collaborators, invitations, labels, * documents, comments, and checklists. All requests propagate APIError on failure. */ export declare class ProjectsResource { private readonly http; readonly photos: ProjectPhotosResource; readonly assignees: ProjectAssigneesResource; readonly notepad: ProjectNotepadResource; readonly collaborators: ProjectCollaboratorsResource; readonly invitations: ProjectInvitationsResource; readonly labels: ProjectLabelsResource; readonly documents: ProjectDocumentsResource; readonly comments: ProjectCommentsResource; readonly checklists: ProjectChecklistsResource; constructor(http: HttpClient); /** * Retrieve a paginated list of projects for the company. * * @param query Optional filters and pagination controls declared in the spec. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Project} records. * @throws {APIError} When the API responds with an error status. */ list(query?: ListProjectsQueryParams, options?: RequestOptions): Promise; /** * Create a new project. * * @param project Mutable attributes comprising the project creation payload. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The newly created {@link Project}. * @throws {APIError} When the API responds with an error status. */ create(project: ProjectCreatePayload, options?: UserScopedRequestOptions): Promise; /** * Retrieve a single project by identifier. * * @param projectId Identifier of the project to fetch. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The requested {@link Project}. * @throws {APIError} When the API responds with an error status. */ retrieve(projectId: string, options?: RequestOptions): Promise; /** * Update the core attributes of a project. * * @param projectId Identifier of the project to update. * @param updates Attributes describing the replacement project state. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The updated {@link Project}. * @throws {APIError} When the API responds with an error status. */ update(projectId: string, updates: ProjectUpdatePayload, options?: RequestOptions): Promise; /** * Permanently delete a project. * * @param projectId Identifier of the project to delete. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Resolves to void when deletion succeeds. * @throws {APIError} When the API responds with an error status. */ delete(projectId: string, options?: RequestOptions): Promise; /** * Archive a project to remove it from active listings. * * @param projectId Identifier of the project to archive. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The archived {@link Project}. * @throws {APIError} When the API responds with an error status. */ archive(projectId: string, options?: RequestOptions): Promise; /** * Restore an archived project back to active status. * * @param projectId Identifier of the project to restore. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The restored {@link Project}. * @throws {APIError} When the API responds with an error status. */ restore(projectId: string, options?: RequestOptions): Promise; } /** * Manage photos attached to a project. Methods mirror the project photo endpoints and * propagate APIError on failure. */ export declare class ProjectPhotosResource { private readonly http; constructor(http: HttpClient); /** * List photos associated with a project with optional filtering. * * @param projectId Identifier of the project whose photos are requested. * @param query Pagination and filtering parameters declared in the spec. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Photo} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: ListProjectPhotosQueryParams, options?: RequestOptions): Promise; /** * Upload a new project photo via URI payload. * * @param projectId Identifier of the project that owns the photo. * @param photo Photo metadata matching the spec-defined payload. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The created {@link Photo}. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, photo: PhotoMutable, options?: UserScopedRequestOptions): Promise; } /** * Manage project assignees. */ export declare class ProjectAssigneesResource { private readonly http; constructor(http: HttpClient); /** * List users assigned to a project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link User} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; /** * Assign a user to the project. * * @param projectId Identifier of the project to update. * @param userId Identifier of the user to assign. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The updated {@link User} assignment payload. * @throws {APIError} When the API responds with an error status. */ assign(projectId: string, userId: string, options?: UserScopedRequestOptions): Promise; /** * Remove a user assignment from the project. * * @param projectId Identifier of the project to update. * @param userId Identifier of the user assignment to remove. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns Resolves to void when removal succeeds. * @throws {APIError} When the API responds with an error status. */ remove(projectId: string, userId: string, options?: UserScopedRequestOptions): Promise; } /** * Manage the free-form project notepad content associated with a project. */ export declare class ProjectNotepadResource { private readonly http; constructor(http: HttpClient); /** * Update the notepad content for a project. * * @param projectId Identifier of the project whose notepad should be updated. * @param payload New notepad content pulled directly from the spec. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The updated {@link ProjectNotepad}. * @throws {APIError} When the API responds with an error status. */ update(projectId: string, payload: ProjectNotepadMutable, options?: RequestOptions): Promise; } /** * Access the external collaborators associated with a project. */ export declare class ProjectCollaboratorsResource { private readonly http; constructor(http: HttpClient); /** * List collaborators invited to the project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link ProjectCollaborator} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; } /** * Manage project invitations for external collaborators. */ export declare class ProjectInvitationsResource { private readonly http; constructor(http: HttpClient); /** * List all invitations issued for the project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link ProjectInvitation} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; /** * Issue a new project invitation. * * @param projectId Identifier of the project sending the invitation. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The created {@link ProjectInvitation}. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, options?: UserScopedRequestOptions): Promise; } /** * Manage project labels. */ export declare class ProjectLabelsResource { private readonly http; constructor(http: HttpClient); /** * List labels that have been applied to the project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Tag} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; /** * Apply new labels to the project. * * @param projectId Identifier of the project to update. * @param labels Labels to associate with the project, matching the spec schema. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The {@link Tag} response returned by the API. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, labels: string[], options?: RequestOptions): Promise; /** * Remove a label from the project. * * @param projectId Identifier of the project to update. * @param labelId Identifier of the label to remove. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Resolves to void when deletion succeeds. * @throws {APIError} When the API responds with an error status. */ delete(projectId: string, labelId: string, options?: RequestOptions): Promise; } /** * Manage documents stored on a project. */ export declare class ProjectDocumentsResource { private readonly http; constructor(http: HttpClient); /** * List documents uploaded to the project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Document} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; /** * Upload a new document to the project. * * @param projectId Identifier of the project that owns the document. * @param document Document payload providing metadata and attachment. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The created {@link Document}. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, document: { name?: Document["name"]; attachment?: string; }, options?: UserScopedRequestOptions): Promise; } /** * Manage threaded comments on a project. */ export declare class ProjectCommentsResource { private readonly http; constructor(http: HttpClient); /** * List comments recorded on the project. * * @param projectId Identifier of the project to inspect. * @param query Optional pagination controls (`page`, `per_page`). * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Comment} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, query?: PaginationQueryParams, options?: RequestOptions): Promise; /** * Add a comment to the project discussion. * * @param projectId Identifier of the project to update. * @param content Comment body text to submit. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The created {@link Comment}. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, content: string, options?: UserScopedRequestOptions): Promise; } /** * Manage checklists attached to a project. */ export declare class ProjectChecklistsResource { private readonly http; constructor(http: HttpClient); /** * List checklists belonging to the project. * * @param projectId Identifier of the project to inspect. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns Array of {@link Checklist} records. * @throws {APIError} When the API responds with an error status. */ list(projectId: string, options?: RequestOptions): Promise; /** * Create a checklist on the project, optionally from a template. * * @param projectId Identifier of the project to update. * @param checklistTemplateId Optional template identifier drawn from the spec. * @param options Optional request overrides; supply `X-CompanyCam-User` to attribute the action. * @returns The created {@link Checklist}. * @throws {APIError} When the API responds with an error status. */ create(projectId: string, checklistTemplateId?: string, options?: UserScopedRequestOptions): Promise; /** * Retrieve a single checklist associated with the project. * * @param projectId Identifier of the project owning the checklist. * @param checklistId Identifier of the checklist to fetch. * @param options Optional request overrides such as alternate auth token or abort signal. * @returns The requested {@link Checklist}. * @throws {APIError} When the API responds with an error status. */ retrieve(projectId: string, checklistId: string, options?: RequestOptions): Promise; } //# sourceMappingURL=Projects.d.ts.map