client.filesOperation methods
Parameter declarations below are taken from the pinned TypeScript source. Request fields and responses are summarized from the matching OpenAPI operation; follow the API link for every field, constraint, example, and error description.
/filesfiles.list
Lists metadata for files in TeamGrid task, project, contact, and workspace spaces. Object keys, buckets, providers, private spaces, user links, and signed URLs are never returned.
client.files.list(options: FileListOptions = {})- Return form
Promise- Operation ID
listFiles- Required scopes
files:read- SDK parameters
options: FileListOptions- Query request fields
cursor?: stringlimit?: integerarchived?: booleanentityType?: stringentityId?: string- Success
200 Array<File> envelope
/files/{id}files.get
Use this operation to get file metadata. It returns the resource only when it belongs to the authenticated workspace and is visible to the credential. Required scopes, product permissions, sharing rules, workspace locks, and regional cell ownership are enforced for every request. Private content, destination secrets, and internal storage details are not exposed by this operation.
client.files.get(id: string, options: FileGetOptions = {})- Return form
Promise- Operation ID
getFile- Required scopes
files:read- SDK parameters
id: stringoptions: FileGetOptions- Path request fields
id: string- Query request fields
archived?: boolean- Success
200 File envelope
/files/{id}files.rename
Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.
client.files.rename(id: string, data: FileRename, options: FileMutationOptions)- Return form
Promise- Operation ID
renameFile- Required scopes
files:write- SDK parameters
id: stringdata: FileRenameoptions: FileMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Request body
FileRenameapplication/json- Success
200 File envelope
/files/{id}files.archive
Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.
client.files.archive(id: string, options: FileMutationOptions)- Return form
Promise- Operation ID
archiveFile- Required scopes
files:write- SDK parameters
id: stringoptions: FileMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 File envelope
/files/{id}/restorefiles.restore
Requires the latest strong resource ETag. The cell-local App re-authenticates and atomically applies the tenant-bound revision before returning a fresh ETag.
client.files.restore(id: string, options: FileMutationOptions)- Return form
Promise- Operation ID
restoreFile- Required scopes
files:write- SDK parameters
id: stringoptions: FileMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 File envelope
/files/{id}/download-intentfiles.createDownloadIntent
Creates a short-lived credential-authorized HTTPS download target after checking file visibility, malware state, and private storage configuration. Provider coordinates remain encapsulated by the intent.
client.files.createDownloadIntent(id: string, options: RequestOptions = {})- Return form
Promise- Operation ID
createFileDownloadIntent- Required scopes
files:read- SDK parameters
id: stringoptions: RequestOptions- Path request fields
id: string- Success
201 FileDownloadIntent envelope
Convenience helpers
These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.
files.pages
Iterate cursor pages with a bounded PaginationOptions policy.
client.files.pages(options: FileListOptions = {}, pagination?: PaginationOptions)Returns AsyncGeneratorErrors and transport metadata
HTTP failures reject with TeamGridApiError, including the status, stable error documents, request ID, optional retry delay, and transport metadata. Local validation, routing, timeout, response-size, and pagination failures reject withTeamGridClientError and a stable client error code. Successful envelopes expose non-enumerable transport metadata.
See pagination and errors andclient configuration for handling guidance.