/** * Representation of the company. */ export interface Company { /** The Company's unique ID */ id: string; /** The name of the company */ name: string; /** Indicates the status of the Company. */ status?: "active" | "cancelled" | "deleted"; /** The address of the company */ address?: Address; /** A list of images for the different variants of the logo */ logo?: Array; } /** * Fields accepted by the API when updating a user. * Mirrors the mutable subset of the User schema. */ interface UserMutable { first_name?: string; last_name?: string; email_address?: string; } /** * Additional attributes permitted during user update requests. */ export interface UserUpdatePayload extends UserMutable { password?: string; phone_number?: string; } /** * Additional attributes permitted during user creation requests. */ export interface UserCreatePayload extends UserUpdatePayload { /** Role for the user. Allowed values: standard (default), restricted */ user_role?: "standard" | "restricted"; } /** * Representation of the user. */ export interface User extends UserMutable { id: string; company_id?: string; /** Indicates the status of the Company. */ status?: "active" | "deleted"; /** A list of images for the different variants of the user profile image */ profile_image?: Array; phone_number?: string | null; created_at?: number; updated_at?: number; user_url?: string; } /** * Common fields shared accepted when creating or updating a project. */ interface ProjectMutable { address?: Address; coordinates?: Coordinate; /** The Geofence latitude and longitude */ geofence?: Array; } /** * Fields accepted when creating or updating a project. */ export interface ProjectUpdatePayload extends ProjectMutable { /** The name of the project. Defaults to "Joe Smith" when creating a project. */ name?: string; } /** * Additional attributes allowed when creating a project. */ export interface ProjectCreatePayload extends ProjectUpdatePayload { primary_contact?: ProjectContactRequest; } /** * Representation of the project. */ export interface Project extends ProjectMutable { /** A unique identifier for the Project. */ id: string; /** The title of the Project */ name?: string | null; /** A unique identifier for the Company the Project belongs to */ company_id?: string; /** The id of the entity that created the Project */ creator_id?: string; /** The type of the entity that created the Project */ creator_type?: string; /** The display name of the entity that created the Project */ creator_name?: string; /** Indicates the status of the Project. */ status?: "active" | "deleted"; /** Indicates whether the Project is archived */ archived?: boolean; /** A list of images for the different variants of the Project's feature image. */ featured_image?: Array; /** The URL to the Project in the web app */ project_url?: string; /** The URL to an embeddable photo feed for the Project */ embedded_project_url?: string; /** A list of integrations associated with the Project */ integrations?: Array; /** A unique identifier for the Project that is used to construct some public URLs */ slug?: string; /** Indicates whether the Project's timeline and other public features are enabled */ public?: boolean; primary_contact?: ProjectContactResponse; /** Notes or description of the project */ notepad?: string; /** Timestamp when the Project was created */ created_at?: number; /** Timestamp when the Project was updated */ updated_at?: number; } /** * Common fields for project contacts. */ interface ProjectContactMutable { /** The email of the contact */ email?: string; /** The phone of the contact */ phone_number?: string; } /** * Representation of the project contact request. */ export interface ProjectContactRequest extends ProjectContactMutable { /** The name of the contact */ name: string; } /** * Representation of the project contact response. */ export interface ProjectContactResponse extends ProjectContactMutable { /** The unique ID of the project contact */ id?: string; /** The unique ID of the project the contact is attached to */ project_id?: string; /** The name of the contact */ name?: string; /** Timestamp when the Project Contact was created on the server */ created_at?: number; /** Timestamp when the Project Contact was last updated */ updated_at?: number; } /** * Fields accepted when creating a photo. */ export interface PhotoMutable { coordinates?: Coordinate; uri: string; /** Unix timestamp when the Photo was captured */ captured_at: number; /** A description of the photo */ description?: string; tags?: string[]; } /** * Representation of the photo. */ export interface Photo { /** The unique ID for the photo */ id: string; /** A unique identifier for the Company the Photo belongs to */ company_id?: string; /** The id of the entity that created the Photo */ creator_id?: string; /** The type of the entity that created the Photo */ creator_type?: string; /** The display name of the entity that created the Photo */ creator_name?: string; /** The unique ID of the project the Photo was captured at */ project_id?: string; /** Indicates the Photo's processing status. */ processing_status?: "pending" | "processing" | "processed" | "processing_error" | "duplicate"; /** The coordinates where the Photo was captured */ coordinates?: Array; /** A list of URIs for the different size variants of the photo. */ uris?: Array; /** The MD5 hash of the photo */ hash?: string; /** A description of the photo */ description?: string; /** Indicates whether the photo is for internal use only and should not be used in marketing or other public materials */ internal?: boolean; /** The link to the photo in the web app */ photo_url?: string; /** Timestamp when the Photo was captured */ captured_at?: number; /** Timestamp when the photo was created on the server. This may differ from the captured_at field */ created_at?: number; /** Timestamp when the photo was last updated */ updated_at?: number; } /** * Fields accepted when creating or updating a tag. */ export interface TagMutable { /** The display value of the Tag. Used to display to the user */ display_value?: string; } /** * Representation of the tag. */ export interface Tag extends TagMutable { /** A unique ID for the Tag. */ id: string; /** A unique ID for the Company the Tag belongs to */ company_id?: string; /** The lowercase version of the display_value. This is useful for searching and sorting */ value?: string; /** Timestamp when the Tag was created on the server */ created_at?: number; /** Timestamp when the Tag was last updated */ updated_at?: number; } /** * Representation of the checklist template. */ export interface ChecklistTemplate { /** The unique ID for the ChecklistTemplate */ id?: string; /** A unique identifier for the Company the ChecklistTemplate belongs to */ company_id?: string; /** The name for the ChecklistTemplate */ name?: string; /** The description for the ChecklistTemplate */ description?: string; /** Timestamp when the ChecklistTemplate was created on the server. */ created_at?: number; /** Timestamp when the ChecklistTemplate was last updated */ updated_at?: number; } /** * Fields accepted when creating or updating a group. */ export interface GroupMutable { /** The title of the Group */ name?: string; /** A list of the group's users */ users?: Array; } /** * Representation of the group. */ export interface Group extends Omit { /** A unique ID for the Group. */ id: string; /** A unique ID for the Company the Group belongs to */ company_id?: string; /** A list of the group's users */ users?: Array; /** Indicates the status of the Group */ status?: "active" | "deleted"; /** The link to the group in the web app */ group_url?: string; /** Timestamp when the Group was created on the server */ created_at?: number; /** Timestamp when the Group was last updated */ updated_at?: number; } /** * Fields accepted when creating or updating a webhook. */ export interface WebhookMutable { /** The URL of the webhook, which will receive requests with data for any events fired that fall within the scopes of the Webhook. */ url?: string; /** A list of scopes covering events the Webhook is subscribed to. */ scopes?: Array; /** Whether or not the Webhook is enabled/active. */ enabled?: boolean; /** A string used to hash the webhook body for verification. */ token?: string; } /** * Representation of the webhook. */ export interface Webhook extends WebhookMutable { /** A unique ID for the Webhook. */ id: string; /** A unique ID for the Company the Webhook belongs to */ company_id?: string; /** Timestamp when the Webhook was created on the server */ created_at?: number; /** Timestamp when the Webhook was last updated */ updated_at?: number; } /** * Representation of the image uri. */ export interface ImageURI { type: string; uri: string; url?: string; } /** * Representation of the address. */ export interface Address { street_address_1?: string | null; street_address_2?: string | null; city?: string | null; state?: string | null; postal_code?: string | null; country?: string | null; } /** * Standard pagination parameters used across list endpoints. */ export interface PaginationQueryParams { page?: number; per_page?: number; } /** * Optional header for impersonating a specific CompanyCam user when performing requests. */ export interface UserContextHeaderParams { /** * Email of CompanyCam user to be designated as the actor for the request. */ "X-CompanyCam-User"?: string; } /** * Representation of the checklist. */ export interface Checklist { /** The unique ID for the Checklist */ id?: string; /** A unique identifier for the Company the Checklist belongs to */ company_id?: string; /** A unique identifier for the Project the Checklist belongs to */ project_id?: string; /** The name for the Checklist */ name?: string; /** Timestamp when the Checklist was created on the server. */ created_at?: number; /** Timestamp when the Checklist was last updated */ updated_at?: number; /** Timestamp when the Checklist was completed */ completed_at?: number | null; /** A unique identifier for the creator of the Checklist */ creator_id?: string; /** A unique identifier for the template used to create the Checklist */ checklist_template_id?: string | null; /** Flag indicating whether the Checklist is still being created or not */ is_populating?: boolean; /** A collection of tasks that are not associated with a section */ sectionless_tasks?: Array; /** A collection of sections */ sections?: Array; } /** * Representation of the checklist section. */ export interface ChecklistSection { /** The unique ID for the ChecklistSection */ id?: string; /** A unique identifier for the Checklist the ChecklistSection belongs to */ todo_list_id?: string; /** A unique identifier of the creator of the ChecklistSection */ creator_id?: string; /** The type of the creator of the ChecklistSection */ creator_type?: string; /** The name of the creator of the ChecklistSection */ creator_name?: string; /** The title of the ChecklistSection */ title?: string; /** The position for the ChecklistSection within the Checklist */ position?: number; /** A collection of tasks associated to a ChecklistSection */ tasks?: Array; } /** * Representation of the task. */ export interface Task { /** The unique ID for the Task */ id?: string; /** Timestamp when the Task was marked completed. */ completed_at?: number; /** The unique ID for entity that completed the Task */ completed_by_id?: string; /** The type of the entity that marked the Task as completed */ completed_by_type?: string; /** Timestamp when the Task was created on the server. */ created_at?: number; /** A unique identifier of the creator of the Task */ creator_id?: string; /** The type of the creator of the Task */ creator_type?: string; /** The details of a Task */ details?: string; /** Flag indicating whether a photo is required to complete the Task */ photo_capture_required?: boolean; /** The position for the Task within its ChecklistSection or Checklist */ position?: number; /** A unique identifier for the Checklist the Task belongs to */ todo_list_id?: string; /** A unique identifier for the ChecklistSection the Task belongs to */ todo_list_section_id?: string | null; /** The title of the Task */ title?: string; /** Timestamp when the Checklist was last updated on the server. */ updated_at?: number; /** A collection of sub-tasks associated to a Task */ sub_tasks?: Array; /** A collection of photos associated to a Task */ photos?: Array; } /** * Representation of the sub task. */ export interface SubTask { /** The unique ID for the Task */ id?: string; /** The title of the Task */ label?: string; /** The type of answer expected for the SubTask */ answer_type?: "open_text" | "multiple_choice" | "yes_no"; /** The index from the answer_options array that were selected as answers */ answer_choices?: Array; /** A collection of answer options for the SubTask */ answer_options?: Array; /** The position for the SubTask within its Task */ position?: number; /** A unique identifier for the Task the SubTask belongs to */ task_id?: string; /** The answer text for the SubTask when the type is open_text */ answer_text?: string; } /** * Representation of the coordinate. */ export interface Coordinate { lat: number; lon: number; } /** * Representation of the project integration. */ export interface ProjectIntegration { type: string; relation_id: string; } /** * Representation of the comment. */ export interface Comment { /** The unique ID of the comment */ id: string; /** The id of the entity that created the Comment */ creator_id?: string; /** The type of the entity that created the Comment */ creator_type?: string; /** The display name of the entity that created the Comment */ creator_name?: string; /** The unique ID of the entity that the comment was applied to */ commentable_id?: string; /** The type of the entity that the comment was applied to. */ commentable_type?: string; /** This should always be active */ status?: string; /** The contents of the comment. This may contain whitespace characters such as newlines. */ content?: string; /** Timestamp when the Comment was created on the server */ created_at?: number; /** Timestamp when the Comment was last updated */ updated_at?: number; } /** * Representation of the document. */ export interface Document { /** The unique ID of the document */ id: string; /** The unique ID of the entity that created the document */ creator_id?: string; /** The type of the entity that created the document */ creator_type?: string; /** The unique ID of the company that owns the document */ creator_name?: string; /** The unique ID of the project the document is attached to */ project_id?: string; /** the filename of the document */ name?: string; /** The URL where the document can be downloaded/viewed from */ url?: string; /** The content type of the document. (e.g. application/pdf) */ content_type?: string; /** The size of the document in bytes. */ byte_size?: number; /** Timestamp when the Document was created on the server */ created_at?: number; /** Timestamp when the Document was last updated */ updated_at?: number; } /** * Representation of the error. */ export interface Error { errors?: Array; } /** * Fields accepted when updating the project notepad. */ export interface ProjectNotepadMutable { notepad: string; } /** * Representation of the project notepad. */ export interface ProjectNotepad extends ProjectNotepadMutable { } /** * Representation of the project collaborator. */ export interface ProjectCollaborator { /** The unique ID of the collaborator */ id?: string; /** The unique ID of the collaborating company */ company_id?: string; /** The unique ID of the project the collaborator is a part of */ project_id?: string; /** The unique ID of the invitation for the collaboration */ project_invitation_id?: string; /** Timestamp when the project collaboration was accepted */ accepted_at?: number; /** Timestamp when the project collaboration was created on the server */ created_at?: number; /** Timestamp when the project collaboration was last updated */ updated_at?: number; } /** * Representation of the project invitation. */ export interface ProjectInvitation { /** The unique ID of invitation */ id?: string; /** The unique ID of the project */ project_id?: string; /** The invite url to accept the invitation */ invite_url?: string; /** The status of the invitation. It will be one of `accepted`, `expired`, or `pending` */ status?: "accepted" | "expired" | "pending"; /** Timestamp when the project invitation was accepted */ accepted_at?: number; /** The unique ID of the company who accepted the invitation */ accepted_by_id?: string; /** Timestamp when the project invitation expires */ expires_at?: number; /** The unique ID of the user who created the invitation */ creator_id?: string; /** Timestamp when the project invitation was created on the server */ created_at?: number; /** Timestamp when the project invitation was last updated */ updated_at?: number; } /** * Query parameters accepted by the list checklists q operation. */ export interface ListChecklistsQueryParams extends PaginationQueryParams { completed?: boolean; } /** * Query parameters accepted by the list projects q operation. */ export interface ListProjectsQueryParams extends PaginationQueryParams { /** An optional value to filter the projects by name or address line 1 */ query?: string; /** An ISO8601 formatted date and time to return projects modified on or after the provided value */ modified_since?: string; } /** * Query parameters accepted by the list project photos q operation. */ export interface ListProjectPhotosQueryParams extends PaginationQueryParams { /** A unix timestamp to return photos modified on or after the provided value */ start_date?: string; /** A unix timestamp to return photos modified on or before the provided value */ end_date?: string; /** Filter results to include photos captured by one of these user IDs */ user_ids?: Array; /** Filter results to include photos captured by one of these group IDs */ group_ids?: Array; /** Filter results to include photos captured by one of these tag IDs */ tag_ids?: Array; } /** * Query parameters accepted by the list photos q operation. */ export interface ListPhotosQueryParams extends PaginationQueryParams { /** A unix timestamp to return photos modified on or after the provided value */ start_date?: string; /** A unix timestamp to return photos modified on or before the provided value */ end_date?: string; /** Filter results to include photos captured by one of these user IDs */ user_ids?: Array; /** Filter results to include photos captured by one of these group IDs */ group_ids?: Array; /** Filter results to include photos captured by one of these tag IDs */ tag_ids?: Array; } /** * Shape of the payload returned by the OAuth token endpoint. These fields follow the * standard OAuth 2.0 token response, which the CompanyCam OAuth server mirrors. */ export interface OAuthTokenResponse { /** Bearer token used to authenticate subsequent CompanyCam API requests. */ access_token: string; /** Token classification as reported by the OAuth server, typically "bearer". */ token_type: string; /** Lifetime of the access token in seconds when supplied by the OAuth server. */ expires_in?: number; /** Refresh token that can be exchanged for a fresh access token. */ refresh_token?: string; /** Granted scopes represented as a space-delimited string, when returned. */ scope?: string; } export {}; //# sourceMappingURL=interfaces.d.ts.map