client.documentsOperation 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.
/documentsdocuments.list
Lists document metadata only. Content, edit locks, subscriptions, and storage internals are not selected.
client.documents.list(options: DocumentListOptions = {})- Return form
Promise- Operation ID
listDocuments- Required scopes
documents:read- SDK parameters
options: DocumentListOptions- Query request fields
cursor?: stringlimit?: integerarchived?: boolean- Success
200 Array<Document> envelope
/documentsdocuments.create
Creates a bounded plain document through the product document model with credential-bound idempotency.
client.documents.create(data: DocumentCreate, options: MutationOptions = {})- Return form
Promise- Operation ID
createDocument- Required scopes
documents:write- SDK parameters
data: DocumentCreateoptions: MutationOptions- Header request fields
Idempotency-Key: string- Request body
DocumentCreateapplication/json- Success
201 Document envelope
/documents/{id}documents.get
Use this operation to get a document. 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.
client.documents.get(id: string, options?: RequestOptions)- Return form
Promise- Operation ID
getDocument- Required scopes
documents:read- SDK parameters
id: stringoptions: RequestOptions- Path request fields
id: string- Success
200 Document envelope
/documents/{id}documents.update
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.documents.update(id: string, data: DocumentUpdate, options: DocumentMutationOptions)- Return form
Promise- Operation ID
updateDocument- Required scopes
documents:write- SDK parameters
id: stringdata: DocumentUpdateoptions: DocumentMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Request body
DocumentUpdateapplication/json- Success
200 Document envelope
/documents/{id}documents.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.documents.archive(id: string, options: DocumentMutationOptions)- Return form
Promise- Operation ID
archiveDocument- Required scopes
documents:write- SDK parameters
id: stringoptions: DocumentMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 Document envelope
/documents/{id}/restoredocuments.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.documents.restore(id: string, options: DocumentMutationOptions)- Return form
Promise- Operation ID
restoreDocument- Required scopes
documents:write- SDK parameters
id: stringoptions: DocumentMutationOptions- Path request fields
id: string- Header request fields
If-Match: string- Success
200 Document envelope
Convenience helpers
These typed helpers compose mapped operations. They do not grant scopes or bypass API limits.
documents.pages
Iterate cursor pages with a bounded PaginationOptions policy.
client.documents.pages(options: DocumentListOptions = {}, 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.