# Reference ## Deployment
client.deployment.licenseStatus() -> CloudPDF.DeploymentLicenseStatusResponse
#### 🔌 Usage
```typescript await client.deployment.licenseStatus(); ```
#### ⚙️ Parameters
**requestOptions:** `DeploymentClient.RequestOptions`
client.deployment.modules() -> CloudPDF.DeploymentModulesResponse
#### 📝 Description
What each module declares, for a dashboard or a script that lists modules, offers their permissions in its dialogs and shows their meters. Which tenants may use one is in their `features` (`tenants.get`); what it costs, if anything, is the operator's.
#### 🔌 Usage
```typescript await client.deployment.modules(); ```
#### ⚙️ Parameters
**requestOptions:** `DeploymentClient.RequestOptions`
## Doc
client.doc.head({ ...params }) -> CloudPDF.DocHeadResponse
#### 🔌 Usage
```typescript await client.doc.head({ docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.HeadDocRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.changes({ ...params }) -> CloudPDF.DocChangesResponse
#### 📝 Description
Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`, outline `doc.outline.modify`, pages `doc.pages.assemble`, embedded files `doc.attachments.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { : '' }`, and each file as the part `resource:`. At most 64 changes per request and 512 ops per change.
#### 🔌 Usage
```typescript await client.doc.changes({ docId: "docId", layerName: "layerName", changes: [{ opId: "opId" }] }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocChangesRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.download({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.doc.download({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DownloadDocRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.downloadLink({ ...params }) -> CloudPDF.DocDownloadLinkResponse
#### 📝 Description
The link opens the layer as it is when created: once the layer changes, it answers 404, so create it right before handing it over. It downloads that one file and nothing else, and a password-protected document is checked when the link is created. Deployments that verify tokens with their own keys (JWKS) mint links on their backend: a doc token with `layer_name`, a `download: { docVersion, mode: "incremental" }` claim and a short `exp`, passed as `link` on the versioned download URL.
#### 🔌 Usage
```typescript await client.doc.downloadLink({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocDownloadLinkRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.manifest({ ...params }) -> CloudPDF.DocManifestResponse
#### 🔌 Usage
```typescript await client.doc.manifest({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ManifestDocRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.render({ ...params }) -> core.BinaryResponse
#### 📝 Description
Render parameters (viewport, format) pass as flat dotted query keys, e.g. `?viewport.kind=width&viewport.width=800`; the full grammar is documented with the viewer.
#### 🔌 Usage
```typescript await client.doc.render({ docId: "docId", layerName: "layerName", pageKey: "pageKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.RenderDocRequest`
**requestOptions:** `DocClient.RequestOptions`
client.doc.text({ ...params }) -> CloudPDF.DocTextResponse
#### 🔌 Usage
```typescript await client.doc.text({ docId: "docId", layerName: "layerName", pageKey: "pageKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.TextDocRequest`
**requestOptions:** `DocClient.RequestOptions`
## Grants
client.grants.exchange({ ...params }) -> CloudPDF.GrantsExchangeResponse
#### 📝 Description
Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, deleted, paused and archived grants are indistinguishable (404). Passphrase-protected grants return 422 GrantPassphraseRequired until `passphrase` is supplied. A grant that asks its visitors who they are on open returns 422 VisitorIdentityRequired until the required answers are given; `error.details` carries `fields` (what the grant asks), `missing`, `invalid`, `purpose` and `privacyUrl`. A grant that asks before the first change issues the session at once with `visitor.identityRequest`, and writes answer 403 VisitorIdentityRequired with the same details until the visitor exchanges again with their answers. Answers that can not be taken answer 422 on any grant. Mounted only when the deployment can sign (HS256 mode).
#### 🔌 Usage
```typescript await client.grants.exchange({ grant: "grant" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GrantsExchangeRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.list({ ...params }) -> CloudPDF.GrantsListResponse
#### 🔌 Usage
```typescript await client.grants.list({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ListGrantsRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.create({ ...params }) -> CloudPDF.GrantsCreateResponse
#### 📝 Description
The returned id is what a link page or an embed opens. Its scope gives only document permissions the caller holds itself, as tokens.issue does. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.
#### 🔌 Usage
```typescript await client.grants.create({ tenantId: "tenantId", docId: "docId", scope: ["scope"] }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GrantsCreateRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.get({ ...params }) -> CloudPDF.GrantsGetResponse
#### 🔌 Usage
```typescript await client.grants.get({ tenantId: "tenantId", grantId: "grantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GetGrantsRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.delete({ ...params }) -> void
#### 🔌 Usage
```typescript await client.grants.delete({ tenantId: "tenantId", grantId: "grantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DeleteGrantsRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.update({ ...params }) -> CloudPDF.GrantsUpdateResponse
#### 🔌 Usage
```typescript await client.grants.update({ tenantId: "tenantId", grantId: "grantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GrantsUpdateRequest`
**requestOptions:** `GrantsClient.RequestOptions`
client.grants.archive({ ...params }) -> CloudPDF.GrantsArchiveResponse
#### 📝 Description
Archiving is final: an archived grant never exchanges again, and to give access again you create a new grant. Pausing (`disabled`) is the reversible stop. An archived grant no longer counts as using its shared layer, so that layer can be deleted.
#### 🔌 Usage
```typescript await client.grants.archive({ tenantId: "tenantId", grantId: "grantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ArchiveGrantsRequest`
**requestOptions:** `GrantsClient.RequestOptions`
## Tenants
client.tenants.list({ ...params }) -> CloudPDF.TenantsListResponse
#### 🔌 Usage
```typescript await client.tenants.list(); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ListTenantsRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.create({ ...params }) -> CloudPDF.TenantsCreateResponse
#### 🔌 Usage
```typescript await client.tenants.create({ id: "id" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.TenantsCreateRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.get({ ...params }) -> CloudPDF.TenantsGetResponse
#### 🔌 Usage
```typescript await client.tenants.get({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GetTenantsRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.delete({ ...params }) -> void
#### 📝 Description
Destroys the tenant and everything in its namespace — documents, layers, stored bytes, audit history. Irreversible.
#### 🔌 Usage
```typescript await client.tenants.delete({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DeleteTenantsRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.update({ ...params }) -> CloudPDF.TenantsUpdateResponse
#### 📝 Description
A feature names an installed module; any other id is a 400. A module route answers a tenant without its feature 403 FeatureNotEnabled, and one whose feature is stopped 402 FeatureStopped (details.feature, details.stopped). Other replicas apply a change within 30 seconds.
#### 🔌 Usage
```typescript await client.tenants.update({ tenantId: "tenantId", features: [{ id: "id" }] }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.TenantsUpdateRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.resume({ ...params }) -> void
#### 🔌 Usage
```typescript await client.tenants.resume({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ResumeTenantsRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.suspend({ ...params }) -> void
#### 📝 Description
Instantly reversible with resume. The API token is exempt, so a suspended tenant can still be inspected, exported, resumed, or deleted.
#### 🔌 Usage
```typescript await client.tenants.suspend({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.TenantsSuspendRequest`
**requestOptions:** `TenantsClient.RequestOptions`
client.tenants.usage({ ...params }) -> CloudPDF.TenantsUsageResponse
#### 📝 Description
Facts only — no limits or billing state. Views count grant exchanges plus authorized /v1/access requests, deduplicated across the two.
#### 🔌 Usage
```typescript await client.tenants.usage({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.UsageTenantsRequest`
**requestOptions:** `TenantsClient.RequestOptions`
## Documents
client.documents.list({ ...params }) -> CloudPDF.DocumentsListResponse
#### 🔌 Usage
```typescript await client.documents.list({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ListDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.get({ ...params }) -> CloudPDF.DocumentsGetResponse
#### 🔌 Usage
```typescript await client.documents.get({ tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GetDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.delete({ ...params }) -> void
#### 🔌 Usage
```typescript await client.documents.delete({ tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DeleteDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.update({ ...params }) -> CloudPDF.DocumentsUpdateResponse
#### 📝 Description
A document that is being deleted answers 404.
#### 🔌 Usage
```typescript await client.documents.update({ tenantId: "tenantId", docId: "docId", name: "name" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocumentsUpdateRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.commit({ ...params }) -> CloudPDF.DocumentsCommitResponse
#### 📝 Description
An upload token commits only the documents it started; any other document answers 404.
#### 🔌 Usage
```typescript await client.documents.commit({ tenantId: "tenantId", docId: "docId", sha256: "sha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocumentsCommitRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.download({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.documents.download({ tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DownloadDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.thumbnail({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.documents.thumbnail({ tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ThumbnailDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.uploadProxy({ ...params }) -> CloudPDF.DocumentsUploadProxyResponse
#### 📝 Description
This bounded origin-mediated fallback must only be used after documents.init returns upload.kind=proxy. Auto mode prefers a presigned object-store PUT whenever available. An upload token sends files only to the documents it started.
#### 🔌 Usage
```typescript await client.documents.uploadProxy({ file: fs.createReadStream("/path/to/your/file"), tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.UploadProxyDocumentsRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.importFrom({ ...params }) -> CloudPDF.DocumentsImportFrom200Response
#### 📝 Description
Default mode is synchronous and bounded: the response returns only after the transfer verified and committed (or failed). mode=async (connection sources only) answers 202 immediately and an in-process worker performs the transfer with leased, fenced retries; poll the document until ready/failed. The deployment import policy gates scheme, network range, and size; sources must declare a length. CloudPDF copies and owns the bytes — the source is never referenced in place. A 502 marks a retryable upstream failure: retry with the same idempotencyKey to resume the same document. URL sources are capabilities and never echoed back. Connection sources name operator-registered storage (bucket/prefix scope, allowed credential classes, and tenant bindings are deployment configuration); `revision` is provider-interpreted (S3 VersionId, GCS generation, Azure version id).
#### 🔌 Usage
```typescript await client.documents.importFrom({ tenantId: "tenantId", source: { kind: "url", url: "url" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocumentsImportFromRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
client.documents.init({ ...params }) -> CloudPDF.DocumentsInitResponse
#### 📝 Description
With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; sizeBytes must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make.
#### 🔌 Usage
```typescript await client.documents.init({ tenantId: "tenantId", sizeBytes: 1, contentSha256: "contentSha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DocumentsInitRequest`
**requestOptions:** `DocumentsClient.RequestOptions`
## Folders
client.folders.list({ ...params }) -> CloudPDF.FoldersListResponse
#### 🔌 Usage
```typescript await client.folders.list({ tenantId: "tenantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.ListFoldersRequest`
**requestOptions:** `FoldersClient.RequestOptions`
client.folders.create({ ...params }) -> CloudPDF.FoldersCreateResponse
#### 📝 Description
409 Conflict carries `details.reason`: `name-taken` (a sibling has the name, ignoring case; `details.name`) or `too-deep` (folders nest at most 100 levels; `details.maxDepth`). 404 when the parent folder does not exist.
#### 🔌 Usage
```typescript await client.folders.create({ tenantId: "tenantId", name: "name" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.FoldersCreateRequest`
**requestOptions:** `FoldersClient.RequestOptions`
client.folders.get({ ...params }) -> CloudPDF.FoldersGetResponse
#### 🔌 Usage
```typescript await client.folders.get({ tenantId: "tenantId", folderId: "folderId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.GetFoldersRequest`
**requestOptions:** `FoldersClient.RequestOptions`
client.folders.delete({ ...params }) -> void
#### 📝 Description
Without recursive, a folder with anything inside is refused: 409 Conflict with `details.reason` `not-empty` and what it holds, counted over every level below, in `details.folders` and `details.documents`. With recursive=true, the folder and every folder under it go at once, and every document in them stops opening, leaves every list and stops answering its grants at once; their stored files and grants are removed in the background. Uploads into those folders that have not committed cannot commit.
#### 🔌 Usage
```typescript await client.folders.delete({ tenantId: "tenantId", folderId: "folderId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.DeleteFoldersRequest`
**requestOptions:** `FoldersClient.RequestOptions`
client.folders.update({ ...params }) -> CloudPDF.FoldersUpdateResponse
#### 📝 Description
409 Conflict with `details.reason` `name-taken` when a sibling has the name, ignoring case.
#### 🔌 Usage
```typescript await client.folders.update({ tenantId: "tenantId", folderId: "folderId", name: "name" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.FoldersUpdateRequest`
**requestOptions:** `FoldersClient.RequestOptions`
client.folders.moveInto({ ...params }) -> void
#### 📝 Description
Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or are being deleted in `details.docIds` and `details.folderIds`. 409 Conflict carries `details.reason`: `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the destination, ignoring case; `details.name`).
#### 🔌 Usage
```typescript await client.folders.moveInto({ tenantId: "tenantId", folderId: "folderId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.FoldersMoveIntoRequest`
**requestOptions:** `FoldersClient.RequestOptions`
## Tokens
client.tokens.issue({ ...params }) -> CloudPDF.TokensIssueResponse
#### 📝 Description
Authority mints only downward: kind "doc" gives only document permissions the caller holds itself, kind "tenant" requires the API token, and kind "upload" requires docs.create instead of tokens.issue-doc, since an upload token can do only what docs.create allows. Mounted only when the deployment can sign (HS256 mode); asymmetric deployments mint with their own private key.
#### 🔌 Usage
```typescript await client.tokens.issue({ tenantId: "tenantId", body: { kind: "doc", sub: "sub", docId: "docId", scope: ["scope"], expiresInSeconds: 1 } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.IssueTokensRequest`
**requestOptions:** `TokensClient.RequestOptions`
client.tokens.revoke({ ...params }) -> void
#### 📝 Description
Mounted only when the deployment enables token revocation.
#### 🔌 Usage
```typescript await client.tokens.revoke({ tenantId: "tenantId", jti: "jti" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.TokensRevokeRequest`
**requestOptions:** `TokensClient.RequestOptions`
## Doc Annotations
client.doc.annotations.listAll({ ...params }) -> CloudPDF.DocAnnotationsListAllResponse
#### 📝 Description
Returns one entry per page plus the audit-log cursor for reconciling subsequent document events. Page order is unspecified; join by `page` (a `PageRef`) when display order matters.
#### 🔌 Usage
```typescript await client.doc.annotations.listAll({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListAllAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.list({ ...params }) -> CloudPDF.DocAnnotationsListResponse
#### 🔌 Usage
```typescript await client.doc.annotations.list({ docId: "docId", layerName: "layerName", pageKey: "pageKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.create({ ...params }) -> CloudPDF.DocAnnotationsCreateResponse
#### 📝 Description
Doc JWTs may instead carry collab scopes (annotations:create:self, …) that refine per-annotation authorship rules; the API token is exempt from both.
#### 🔌 Usage
```typescript await client.doc.annotations.create({ docId: "docId", layerName: "layerName", pageKey: "pageKey", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.CreateAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.delete({ ...params }) -> CloudPDF.DocAnnotationsDeleteResponse
#### 🔌 Usage
```typescript await client.doc.annotations.delete({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DeleteAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.update({ ...params }) -> CloudPDF.DocAnnotationsUpdateResponse
#### 🔌 Usage
```typescript await client.doc.annotations.update({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.UpdateAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.readAppearance({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.doc.annotations.readAppearance({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ReadAppearanceAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.readFile({ ...params }) -> core.BinaryResponse
#### 📝 Description
A file that decodes past the server's limit is refused (PayloadTooLarge).
#### 🔌 Usage
```typescript await client.doc.annotations.readFile({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ReadFileAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.exportAppearance({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.doc.annotations.exportAppearance({ docId: "docId", layerName: "layerName", pageKey: "pageKey", body: { "string": { "key": "value" } } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ExportAppearanceAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.flatten({ ...params }) -> CloudPDF.DocAnnotationsFlattenResponse
#### 🔌 Usage
```typescript await client.doc.annotations.flatten({ docId: "docId", layerName: "layerName", pageKey: "pageKey", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.FlattenAnnotationsRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
client.doc.annotations.reorder({ ...params }) -> CloudPDF.DocAnnotationsReorderResponse
#### 🔌 Usage
```typescript await client.doc.annotations.reorder({ docId: "docId", layerName: "layerName", pageKey: "pageKey", refs: [{ kind: "objectNumber", page: { kind: "objectNumber", objectNumber: 1 }, objectNumber: 1 }], position: "start" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocAnnotationsReorderRequest`
**requestOptions:** `AnnotationsClient.RequestOptions`
## Doc Attachments
client.doc.attachments.download({ ...params }) -> core.BinaryResponse
#### 📝 Description
A file that decodes past the server's limit is refused (PayloadTooLarge).
#### 🔌 Usage
```typescript await client.doc.attachments.download({ docId: "docId", layerName: "layerName", fileKey: "fileKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DownloadAttachmentsRequest`
**requestOptions:** `AttachmentsClient.RequestOptions`
client.doc.attachments.list({ ...params }) -> CloudPDF.DocAttachmentsListResponse
#### 📝 Description
A file-attachment annotation's file is listed with the annotation; read its bytes with `doc.annotations.readFile`.
#### 🔌 Usage
```typescript await client.doc.attachments.list({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListAttachmentsRequest`
**requestOptions:** `AttachmentsClient.RequestOptions`
## Doc Fonts
client.doc.fonts.list({ ...params }) -> CloudPDF.DocFontsListResponse
#### 🔌 Usage
```typescript await client.doc.fonts.list({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListFontsRequest`
**requestOptions:** `FontsClient.RequestOptions`
client.doc.fonts.resolve({ ...params }) -> CloudPDF.DocFontsResolveResponse
#### 🔌 Usage
```typescript await client.doc.fonts.resolve({ docId: "docId", layerName: "layerName", body: { runs: [{ text: "text" }] } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ResolveFontsRequest`
**requestOptions:** `FontsClient.RequestOptions`
## Doc Forms
client.doc.forms.list({ ...params }) -> CloudPDF.DocFormsListResponse
#### 🔌 Usage
```typescript await client.doc.forms.list({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListFormsRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.reorderCalculations({ ...params }) -> CloudPDF.DocFormsReorderCalculationsResponse
#### 🔌 Usage
```typescript await client.doc.forms.reorderCalculations({ docId: "docId", layerName: "layerName", fields: [{ kind: "objectNumber", objectNumber: 1 }], position: "start" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocFormsReorderCalculationsRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.setValue({ ...params }) -> CloudPDF.DocFormsSetValueResponse
#### 🔌 Usage
```typescript await client.doc.forms.setValue({ docId: "docId", layerName: "layerName", fieldKey: "fieldKey", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.SetValueFormsRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.reset({ ...params }) -> CloudPDF.DocFormsResetResponse
#### 🔌 Usage
```typescript await client.doc.forms.reset({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocFormsResetRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.deleteWidget({ ...params }) -> CloudPDF.DocFormsDeleteWidgetResponse
#### 🔌 Usage
```typescript await client.doc.forms.deleteWidget({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DeleteWidgetFormsRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.updateWidget({ ...params }) -> CloudPDF.DocFormsUpdateWidgetResponse
#### 🔌 Usage
```typescript await client.doc.forms.updateWidget({ docId: "docId", layerName: "layerName", pageKey: "pageKey", annotationKey: "annotationKey", patch: {} }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocFormsUpdateWidgetRequest`
**requestOptions:** `FormsClient.RequestOptions`
client.doc.forms.reorderWidgets({ ...params }) -> CloudPDF.DocFormsReorderWidgetsResponse
#### 🔌 Usage
```typescript await client.doc.forms.reorderWidgets({ docId: "docId", layerName: "layerName", pageKey: "pageKey", widgets: [{ kind: "objectNumber", page: { kind: "objectNumber", objectNumber: 1 }, objectNumber: 1 }], position: "start" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocFormsReorderWidgetsRequest`
**requestOptions:** `FormsClient.RequestOptions`
## Doc Metadata
client.doc.metadata.get({ ...params }) -> CloudPDF.DocMetadataGetResponse
#### 🔌 Usage
```typescript await client.doc.metadata.get({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.GetMetadataRequest`
**requestOptions:** `MetadataClient.RequestOptions`
## Doc Outline
client.doc.outline.get({ ...params }) -> CloudPDF.DocOutlineGetResponse
#### 🔌 Usage
```typescript await client.doc.outline.get({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.GetOutlineRequest`
**requestOptions:** `OutlineClient.RequestOptions`
## Doc Pages
client.doc.pages.setScale({ ...params }) -> CloudPDF.DocPagesSetScaleResponse
#### 🔌 Usage
```typescript await client.doc.pages.setScale({ docId: "docId", layerName: "layerName", pageKey: "pageKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocPagesSetScaleRequest`
**requestOptions:** `PagesClient.RequestOptions`
client.doc.pages.viewports({ ...params }) -> CloudPDF.DocPagesViewportsResponse
#### 🔌 Usage
```typescript await client.doc.pages.viewports({ docId: "docId", layerName: "layerName", pageKey: "pageKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ViewportsPagesRequest`
**requestOptions:** `PagesClient.RequestOptions`
client.doc.pages.extract({ ...params }) -> core.BinaryResponse
#### 📝 Description
A read, not a mutation: the source document is untouched and no event is published. Body is `{"pages": PageRef[], "flatten"?: {"usage"?: "display" | "print"}, "includeAnnotations"?: boolean, "includeFormFields"?: boolean}`; the response body is the new PDF. With `flatten` the copy is the pages as they draw for `usage` (`"print"`: a print copy): the annotations and form fields painted in, nothing interactive left, layers in their state for the usage. A flattened copy takes `doc.download` or `doc.download.flattened`, and paints only what the caller may read; `includeAnnotations` and `includeFormFields` choose what it paints, and are refused without `flatten`.
#### 🔌 Usage
```typescript await client.doc.pages.extract({ docId: "docId", layerName: "layerName", body: { "string": { "key": "value" } } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ExtractPagesRequest`
**requestOptions:** `PagesClient.RequestOptions`
client.doc.pages.flatten({ ...params }) -> CloudPDF.DocPagesFlattenResponse
#### 🔌 Usage
```typescript await client.doc.pages.flatten({ docId: "docId", layerName: "layerName", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.FlattenPagesRequest`
**requestOptions:** `PagesClient.RequestOptions`
client.doc.pages.setName({ ...params }) -> CloudPDF.DocPagesSetNameResponse
#### 🔌 Usage
```typescript await client.doc.pages.setName({ docId: "docId", layerName: "layerName", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.SetNamePagesRequest`
**requestOptions:** `PagesClient.RequestOptions`
client.doc.pages.removeName({ ...params }) -> CloudPDF.DocPagesRemoveNameResponse
#### 🔌 Usage
```typescript await client.doc.pages.removeName({ docId: "docId", layerName: "layerName", body: { "key": "value" } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.RemoveNamePagesRequest`
**requestOptions:** `PagesClient.RequestOptions`
## Doc Redactions
client.doc.redactions.apply({ ...params }) -> CloudPDF.DocRedactionsApplyResponse
#### 🔌 Usage
```typescript await client.doc.redactions.apply({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocRedactionsApplyRequest`
**requestOptions:** `RedactionsClient.RequestOptions`
## Doc Signatures
client.doc.signatures.list({ ...params }) -> CloudPDF.DocSignaturesListResponse
#### 📝 Description
Describes the bytes the layer is over: the base version's signatures plus the layer's own edits as the last revision. Signed bytes (contents, digests, revision prefixes) are served per base version under /versions.
#### 🔌 Usage
```typescript await client.doc.signatures.list({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListSignaturesRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.cancel({ ...params }) -> CloudPDF.DocSignaturesCancelResponse
#### 🔌 Usage
```typescript await client.doc.signatures.cancel({ docId: "docId", layerName: "layerName", signingId: "signingId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.CancelSignaturesRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.complete({ ...params }) -> CloudPDF.DocSignaturesCompleteResponse
#### 📝 Description
`cms` is the detached CMS over the prepared digest, base64. `expectedVersion` must be what prepare returned. Idempotent by signing id: the same CMS again answers `already-completed`. The new version is the layer's own: only this layer moves to it, and the document and every other layer stay as they were. Refetch the manifest after a completion.
#### 🔌 Usage
```typescript await client.doc.signatures.complete({ docId: "docId", layerName: "layerName", signingId: "signingId", cms: "cms", expectedVersion: { baseSha256: "baseSha256", editsVersion: 1 } }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocSignaturesCompleteRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.analysis({ ...params }) -> CloudPDF.DocSignaturesAnalysisResponse
#### 📝 Description
Exactly one of `since.signature=` or `since.revision=`; the layer's pending edits are the end. `level=fill|annotate|lta|none` evaluates exploratorily and never becomes a verdict. For history between two base revisions use the version analysis.
#### 🔌 Usage
```typescript await client.doc.signatures.analysis({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.AnalysisSignaturesRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.prepare({ ...params }) -> CloudPDF.DocSignaturesPrepareResponse
#### 📝 Description
Multipart: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock), naming the appearance PDF it may carry as `resources: { appearance: '' }`, and that PDF as the part `resource:`. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer is read-only until the signing completes, is cancelled, or expires (15 minutes). A document timestamp (`kind: 'timestamp'`) may leave `field` out, since 3.3: the engine then makes a field of no size for it, under a name no other field has, and the answer names it in `field`. That needs `doc.sign` for the document. The signature is made over the layer's own base: the upload, or the version its last signature made.
#### 🔌 Usage
```typescript await client.doc.signatures.prepare({ file: fs.createReadStream("/path/to/your/file"), docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.PrepareSignaturesRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.validationInfo({ ...params }) -> CloudPDF.DocSignaturesValidationInfoResponse
#### 📝 Description
Each entry is one DER object, base64. It reads the layer as it is now, so entries stored and not yet sealed by a signature are among them. Arrived in 3.3.
#### 🔌 Usage
```typescript await client.doc.signatures.validationInfo({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ValidationInfoSignaturesRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
client.doc.signatures.addValidationInfo({ ...params }) -> CloudPDF.DocSignaturesAddValidationInfoResponse
#### 📝 Description
Each entry is one DER object of at most 16 MiB, base64. An entry the file already holds, byte for byte, is not stored again: `added` counts the new ones. An entry that is not one DER object fails the request and nothing is stored; the error names it, as in `certificates[1]`. The server stores what it is given and asks no certificate authority: collect the answers first. It needs `doc.sign` for the document, not for a group of fields, and is refused after a certification that allows no changes. It cannot be undone, and it leaves undo for earlier changes as it was. Arrived in 3.3.
#### 🔌 Usage
```typescript await client.doc.signatures.addValidationInfo({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DocSignaturesAddValidationInfoRequest`
**requestOptions:** `SignaturesClient.RequestOptions`
## Doc Versions
client.doc.versions.list({ ...params }) -> CloudPDF.DocVersionsListResponse
#### 📝 Description
Every completed signature makes a new version of its layer; another layer's versions are never listed. Never cached: the list grows.
#### 🔌 Usage
```typescript await client.doc.versions.list({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.ListVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.analysis({ ...params }) -> CloudPDF.DocVersionsAnalysisResponse
#### 📝 Description
Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every caller. A version never changes, but the rules that judge it can: with `engine`, the `analysis` value of the layer's head, a settled answer is `immutable`. Without it, or with another value, the answer is this server's own, with `no-store` and the current value in `EmbedPDF-Engine`.
#### 🔌 Usage
```typescript await client.doc.versions.analysis({ docId: "docId", layerName: "layerName", sha256: "sha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.AnalysisVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.download({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.doc.versions.download({ docId: "docId", layerName: "layerName", sha256: "sha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.DownloadVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.revision({ ...params }) -> core.BinaryResponse
#### 🔌 Usage
```typescript await client.doc.versions.revision({ docId: "docId", layerName: "layerName", sha256: "sha256", index: 1 }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.RevisionVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.signatures({ ...params }) -> CloudPDF.DocVersionsSignaturesResponse
#### 📝 Description
A version never changes, but what the server reads from it can: with `engine`, the `signatures` value of the layer's head, the answer is `immutable`. Without it, or with another value, the answer is this server's own, with `no-store` and the current value in `EmbedPDF-Engine`.
#### 🔌 Usage
```typescript await client.doc.versions.signatures({ docId: "docId", layerName: "layerName", sha256: "sha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.SignaturesVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.signatureContents({ ...params }) -> core.BinaryResponse
#### 📝 Description
`fieldKey` is the field's fully qualified name, token-text encoded (the same encoding attachment keys use).
#### 🔌 Usage
```typescript await client.doc.versions.signatureContents({ docId: "docId", layerName: "layerName", sha256: "sha256", fieldKey: "fieldKey" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.SignatureContentsVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
client.doc.versions.signatureDigest({ ...params }) -> core.BinaryResponse
#### 📝 Description
What a CMS verifier compares its message digest to.
#### 🔌 Usage
```typescript await client.doc.versions.signatureDigest({ docId: "docId", layerName: "layerName", sha256: "sha256", fieldKey: "fieldKey", algorithm: "sha1" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.SignatureDigestVersionsRequest`
**requestOptions:** `VersionsClient.RequestOptions`
## Doc Fonts Programs
client.doc.fonts.programs.download({ ...params }) -> core.BinaryResponse
#### 📝 Description
A document token needs any one of the listed capabilities: one that may write text in the document. A file the list says can't be downloaded (`canDownload: false`) is not found.
#### 🔌 Usage
```typescript await client.doc.fonts.programs.download({ docId: "docId", layerName: "layerName", displaySha256: "displaySha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.fonts.DownloadProgramsRequest`
**requestOptions:** `ProgramsClient.RequestOptions`
client.doc.fonts.programs.get({ ...params }) -> CloudPDF.DocFontsProgramsGetResponse
#### 🔌 Usage
```typescript await client.doc.fonts.programs.get({ docId: "docId", layerName: "layerName", displaySha256: "displaySha256" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.fonts.GetProgramsRequest`
**requestOptions:** `ProgramsClient.RequestOptions`
## Doc Metadata Custom
client.doc.metadata.custom.get({ ...params }) -> CloudPDF.DocMetadataCustomGetResponse
#### 🔌 Usage
```typescript await client.doc.metadata.custom.get({ docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.doc.metadata.GetCustomRequest`
**requestOptions:** `CustomClient.RequestOptions`
## Documents Layers
client.documents.layers.list({ ...params }) -> CloudPDF.DocumentsLayersListResponse
#### 🔌 Usage
```typescript await client.documents.layers.list({ tenantId: "tenantId", docId: "docId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.documents.ListLayersRequest`
**requestOptions:** `LayersClient.RequestOptions`
client.documents.layers.delete({ ...params }) -> void
#### 🔌 Usage
```typescript await client.documents.layers.delete({ tenantId: "tenantId", docId: "docId", layerName: "layerName" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.documents.DeleteLayersRequest`
**requestOptions:** `LayersClient.RequestOptions`
## Grants Visitors
client.grants.visitors.list({ ...params }) -> CloudPDF.GrantsVisitorsListResponse
#### 📝 Description
An archived grant's visitors are listed too.
#### 🔌 Usage
```typescript await client.grants.visitors.list({ tenantId: "tenantId", grantId: "grantId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.grants.ListVisitorsRequest`
**requestOptions:** `VisitorsClient.RequestOptions`
client.grants.visitors.delete({ ...params }) -> void
#### 📝 Description
Their handle brings them back as a new visitor, who is asked again. Deleting a visitor already deleted changes nothing.
#### 🔌 Usage
```typescript await client.grants.visitors.delete({ tenantId: "tenantId", grantId: "grantId", visitorId: "visitorId" }); ```
#### ⚙️ Parameters
**request:** `CloudPDF.grants.DeleteVisitorsRequest`
**requestOptions:** `VisitorsClient.RequestOptions`