diff --git a/.fern/metadata.json b/.fern/metadata.json
index f8841114..527cfb7b 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -11,10 +11,10 @@
"homepage": "https://www.cloudpdf.com"
}
},
- "originGitCommit": "07aa3f26c82243b36a5ec94f7072130c7298d977",
+ "originGitCommit": "3a88df90980e5c0546a5ebbfd1252d8fca77ff9b",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
- "requestedVersion": "3.0.0-alpha.17",
+ "requestedVersion": "3.0.0-alpha.18",
"ciProvider": "github",
- "sdkVersion": "3.0.0-alpha.17"
+ "sdkVersion": "3.0.0-alpha.18"
}
\ No newline at end of file
diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json
index 856a4205..1e4a1c70 100644
--- a/cloudpdf-generation.json
+++ b/cloudpdf-generation.json
@@ -1,12 +1,12 @@
{
"language": "php",
- "canonicalVersion": "3.0.0-next.17",
- "sdkVersion": "3.0.0-alpha.17",
+ "canonicalVersion": "3.0.0-next.18",
+ "sdkVersion": "3.0.0-alpha.18",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
- "openapiSha256": "8fa53cef2776eb0de9ec50c263aa547b309a04d1a2ecb6ee54b6338d6698dc00",
- "gitCommit": "07aa3f26c82243b36a5ec94f7072130c7298d977",
+ "openapiSha256": "ad2a3baa628061e7b3e8b597cfd15bcda7f103d0f829cb01388a0fed6c4f5873",
+ "gitCommit": "3a88df90980e5c0546a5ebbfd1252d8fca77ff9b",
"gitCommitIsDirty": false
},
"fern": {
diff --git a/reference.md b/reference.md
index f08927f4..4c9ed2b2 100644
--- a/reference.md
+++ b/reference.md
@@ -791,6 +791,14 @@ $client->shares->create(
-
+**$identity:** `?Identity`
+
+
+
+
+
+-
+
**$scope:** `array`
@@ -1025,6 +1033,14 @@ $client->shares->update(
-
+**$identity:** `?Identity`
+
+
+
+
+
+-
+
**$scope:** `?array`
@@ -1571,7 +1587,39 @@ $client->documents->list(
-
-**$state:** `?string`
+**$state:** `?string` — Only documents in this state. Without it, every state except deleting.
+
+
+
+
+
+-
+
+**$q:** `?string` — Only documents whose name contains this text, ignoring case.
+
+
+
+
+
+-
+
+**$folderId:** `?string` — Only documents directly in this folder (root: the top level). Without it, documents in every folder.
+
+
+
+
+
+-
+
+**$sort:** `?string` — createdAt (default), name (ignoring case), or size (stored bytes; 0 while pending).
+
+
+
+
+
+-
+
+**$order:** `?string` — Defaults to the reading order of the sort: A to Z for name, newest and largest first otherwise.
@@ -1614,7 +1662,569 @@ $client->documents->get(
-
-**$tenantId:** `string`
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->delete($tenantId, $id)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->delete(
+ 'tenantId',
+ 'id',
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->update($tenantId, $id, $request) -> ?DocumentsUpdate200Response
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+A document that is being deleted answers 404.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->update(
+ 'tenantId',
+ 'id',
+ new DocumentsUpdateRequest([
+ 'name' => 'name',
+ ]),
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+-
+
+**$name:** `string` — What people call the document: shown in dashboards, searched and sorted by. 1 to 255 characters, no control characters, no leading or trailing whitespace. Names need not be unique.
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->commit($tenantId, $id, $request) -> ?DocumentsCommit200Response
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->commit(
+ 'tenantId',
+ 'id',
+ new DocumentsCommitRequest([
+ 'sha256' => 'sha256',
+ ]),
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+-
+
+**$sha256:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->download($tenantId, $id) -> string
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->download(
+ 'tenantId',
+ 'id',
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->thumbnail($tenantId, $id) -> string
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->thumbnail(
+ 'tenantId',
+ 'id',
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->uploadProxy($tenantId, $id, $request) -> ?DocumentsUploadProxy200Response
+
+-
+
+#### 📝 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.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->uploadProxy(
+ 'tenantId',
+ 'id',
+ new UploadProxyDocumentsRequest([
+ 'file' => File::createFromString("example_file", "example_file"),
+ ]),
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$id:** `string`
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->importFrom($tenantId, $request) -> ?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
+
+
+-
+
+
+-
+
+```php
+$client->documents->importFrom(
+ 'tenantId',
+ new DocumentsImportFromRequest([
+ 'source' => DocumentsImportFromRequestSource::url(new DocumentsImportFromRequestSourceUrl([
+ 'url' => 'url',
+ ])),
+ ]),
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$source:** `DocumentsImportFromRequestSource` — Where CloudPDF pulls the bytes from. The two shapes differ in who supplies the authority to read, not in which storage vendor holds the file.
+
+
+
+
+
+-
+
+**$expected:** `?DocumentsImportFromRequestExpected` — Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
+
+
+
+
+
+-
+
+**$name:** `?string` — What people call the document: shown in dashboards, searched and sorted by. 1 to 255 characters, no control characters, no leading or trailing whitespace. Names need not be unique.
+
+
+
+
+
+-
+
+**$folderId:** `?string` — A folder id, or root for the top level.
+
+
+
+
+
+-
+
+**$metadata:** `?array`
+
+
+
+
+
+-
+
+**$idempotencyKey:** `?string` — Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.
+
+
+
+
+
+-
+
+**$dedupMode:** `?string` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
+
+
+
+
+
+-
+
+**$docId:** `?string`
+
+
+
+
+
+-
+
+**$mode:** `?string` — sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.
+
+
+
+
+
+
+
+
+
+
+
+$client->documents->init($tenantId, $request) -> ?DocumentsInit200Response
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```php
+$client->documents->init(
+ 'tenantId',
+ new DocumentsInitRequest([
+ 'contentLength' => 1.1,
+ 'contentSha256' => 'contentSha256',
+ ]),
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**$tenantId:** `string`
+
+
+
+
+
+-
+
+**$contentLength:** `float`
+
+
+
+
+
+-
+
+**$contentSha256:** `string`
@@ -1622,50 +2232,55 @@ $client->documents->get(
-
-**$id:** `string`
+**$name:** `?string` — What people call the document: shown in dashboards, searched and sorted by. 1 to 255 characters, no control characters, no leading or trailing whitespace. Names need not be unique.
-
-
+
+-
+**$folderId:** `?string` — A folder id, or root for the top level.
+
-
-$client->documents->delete($tenantId, $id)
-
-#### 🔌 Usage
+**$metadata:** `?array`
+
+
+
-
+**$idempotencyKey:** `?string`
+
+
+
+
-
-```php
-$client->documents->delete(
- 'tenantId',
- 'id',
-);
-```
-
-
+**$dedupMode:** `?string` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
+
-#### ⚙️ Parameters
-
-
+**$docId:** `?string`
+
+
+
+
-
-**$tenantId:** `string`
+**$uploadTtlSec:** `?float`
@@ -1673,7 +2288,7 @@ $client->documents->delete(
-
-**$id:** `string`
+**$uploadPreference:** `?string`
@@ -1685,7 +2300,8 @@ $client->documents->delete(
-$client->documents->commit($tenantId, $id, $request) -> ?DocumentsCommit200Response
+## Folders
+$client->folders->list($tenantId, $request) -> ?FoldersList200Response
-
@@ -1698,12 +2314,9 @@ $client->documents->delete(
-
```php
-$client->documents->commit(
+$client->folders->list(
'tenantId',
- 'id',
- new DocumentsCommitRequest([
- 'sha256' => 'sha256',
- ]),
+ new ListFoldersRequest([]),
);
```
@@ -1727,7 +2340,7 @@ $client->documents->commit(
-
-**$id:** `string`
+**$limit:** `?int`
@@ -1735,7 +2348,15 @@ $client->documents->commit(
-
-**$sha256:** `string`
+**$cursor:** `?string`
+
+
+
+
+
+-
+
+**$parentId:** `?string` — Only the folders directly in this folder (root: the top level). Without it, every folder.
@@ -1747,10 +2368,24 @@ $client->documents->commit(
-$client->documents->download($tenantId, $id) -> string
+$client->folders->create($tenantId, $request) -> ?FoldersCreate200Response
+
+-
+
+#### 📝 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
@@ -1760,9 +2395,11 @@ $client->documents->commit(
-
```php
-$client->documents->download(
+$client->folders->create(
'tenantId',
- 'id',
+ new FoldersCreateRequest([
+ 'name' => 'name',
+ ]),
);
```
@@ -1786,7 +2423,15 @@ $client->documents->download(
-
-**$id:** `string`
+**$name:** `string` — What people call the folder: 1 to 255 characters, no control characters, no leading or trailing whitespace, and unique among the folder's siblings, ignoring case.
+
+
+
+
+
+-
+
+**$parentId:** `?string` — A folder id, or root for the top level.
@@ -1798,7 +2443,7 @@ $client->documents->download(
-$client->documents->thumbnail($tenantId, $id) -> string
+$client->folders->get($tenantId, $folderId) -> ?FoldersGet200Response
-
@@ -1811,9 +2456,9 @@ $client->documents->download(
-
```php
-$client->documents->thumbnail(
+$client->folders->get(
'tenantId',
- 'id',
+ 'folderId',
);
```
@@ -1837,7 +2482,7 @@ $client->documents->thumbnail(
-
-**$id:** `string`
+**$folderId:** `string`
@@ -1849,7 +2494,7 @@ $client->documents->thumbnail(
-$client->documents->uploadProxy($tenantId, $id, $request) -> ?DocumentsUploadProxy200Response
+$client->folders->delete($tenantId, $folderId, $request)
-
@@ -1861,7 +2506,7 @@ $client->documents->thumbnail(
-
-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.
+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 share links at once; their stored files and links are removed in the background. Uploads into those folders that have not committed cannot commit.
@@ -1876,12 +2521,10 @@ This bounded origin-mediated fallback must only be used after documents.init ret
-
```php
-$client->documents->uploadProxy(
+$client->folders->delete(
'tenantId',
- 'id',
- new UploadProxyDocumentsRequest([
- 'file' => File::createFromString("example_file", "example_file"),
- ]),
+ 'folderId',
+ new DeleteFoldersRequest([]),
);
```
@@ -1905,7 +2548,15 @@ $client->documents->uploadProxy(
-
-**$id:** `string`
+**$folderId:** `string`
+
+
+
+
+
+-
+
+**$recursive:** `?bool` — true deletes everything in the folder too. Never the default.
@@ -1917,7 +2568,7 @@ $client->documents->uploadProxy(
-$client->documents->importFrom($tenantId, $request) -> ?DocumentsImportFrom200Response
+$client->folders->update($tenantId, $folderId, $request) -> ?FoldersUpdate200Response
-
@@ -1929,7 +2580,7 @@ $client->documents->uploadProxy(
-
-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).
+409 Conflict with `details.reason` `name-taken` when a sibling has the name, ignoring case.
@@ -1944,12 +2595,11 @@ Default mode is synchronous and bounded: the response returns only after the tra
-
```php
-$client->documents->importFrom(
+$client->folders->update(
'tenantId',
- new DocumentsImportFromRequest([
- 'source' => DocumentsImportFromRequestSource::url(new DocumentsImportFromRequestSourceUrl([
- 'url' => 'url',
- ])),
+ 'folderId',
+ new FoldersUpdateRequest([
+ 'name' => 'name',
]),
);
```
@@ -1974,7 +2624,7 @@ $client->documents->importFrom(
-
-**$source:** `DocumentsImportFromRequestSource` — Where CloudPDF pulls the bytes from. The two shapes differ in who supplies the authority to read, not in which storage vendor holds the file.
+**$folderId:** `string`
@@ -1982,62 +2632,36 @@ $client->documents->importFrom(
-
-**$expected:** `?DocumentsImportFromRequestExpected` — Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
+**$name:** `string` — What people call the folder: 1 to 255 characters, no control characters, no leading or trailing whitespace, and unique among the folder's siblings, ignoring case.
-
-
--
-
-**$metadata:** `?array`
-
-
--
-**$idempotencyKey:** `?string` — Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.
-
+
+$client->folders->moveInto($tenantId, $folderId, $request)
-
-**$dedupMode:** `?string` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
-
-
-
+#### 📝 Description
-
-**$docId:** `?string`
-
-
-
-
-
-**$mode:** `?string` — sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.
-
+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.documentIds` 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`).
-
-
-
-
-
-$client->documents->init($tenantId, $request) -> ?DocumentsInit200Response
-
--
-
#### 🔌 Usage
@@ -2047,12 +2671,10 @@ $client->documents->importFrom(
-
```php
-$client->documents->init(
+$client->folders->moveInto(
'tenantId',
- new DocumentsInitRequest([
- 'contentLength' => 1.1,
- 'contentSha256' => 'contentSha256',
- ]),
+ 'folderId',
+ new FoldersMoveIntoRequest([]),
);
```
@@ -2076,47 +2698,7 @@ $client->documents->init(
-
-**$contentLength:** `float`
-
-
-
-
-
--
-
-**$contentSha256:** `string`
-
-
-
-
-
--
-
-**$metadata:** `?array`
-
-
-
-
-
--
-
-**$idempotencyKey:** `?string`
-
-
-
-
-
--
-
-**$dedupMode:** `?string` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
-
-
-
-
-
--
-
-**$docId:** `?string`
+**$folderId:** `string` — A folder id, or root for the top level.
@@ -2124,7 +2706,7 @@ $client->documents->init(
-
-**$uploadTtlSec:** `?float`
+**$documentIds:** `?array`
@@ -2132,7 +2714,7 @@ $client->documents->init(
-
-**$uploadPreference:** `?string`
+**$folderIds:** `?array`
@@ -4785,7 +5367,7 @@ $client->doc->signatures->cancel(
-
-`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`. Every layer of the document then sits over the new version; refetch the manifest after a completion.
+`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.
@@ -4988,7 +5570,7 @@ $client->doc->signatures->analysis(
-
-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 layer behind the document head cannot sign (StaleBase).
+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). The signature is made over the layer's own base: the upload, or the version its last signature made.
@@ -5053,7 +5635,7 @@ $client->doc->signatures->prepare(
## Doc Versions
-$client->doc->versions->list($docId, $request) -> ?DocVersionsList200Response
+$client->doc->versions->list($docId, $layerName, $request) -> ?DocVersionsList200Response
-
@@ -5065,7 +5647,7 @@ $client->doc->signatures->prepare(
-
-Every completed signature publishes a new version. Never cached: the list grows.
+Every completed signature makes a new version of its layer; another layer's versions are never listed. Never cached: the list grows.
@@ -5082,6 +5664,7 @@ Every completed signature publishes a new version. Never cached: the list grows.
```php
$client->doc->versions->list(
'docId',
+ 'layerName',
new ListVersionsRequest([]),
);
```
@@ -5106,6 +5689,14 @@ $client->doc->versions->list(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$documentPassword:** `?string` — Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
@@ -5118,7 +5709,7 @@ $client->doc->versions->list(
-$client->doc->versions->analysis($docId, $sha, $request) -> ?DocVersionsAnalysis200Response
+$client->doc->versions->analysis($docId, $layerName, $sha, $request) -> ?DocVersionsAnalysis200Response
-
@@ -5130,7 +5721,7 @@ $client->doc->versions->list(
-
-Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every layer and every caller.
+Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every caller.
@@ -5147,6 +5738,7 @@ Exactly one of `since.signature` / `since.revision`; `until=` defaults
```php
$client->doc->versions->analysis(
'docId',
+ 'layerName',
'sha',
new AnalysisVersionsRequest([]),
);
@@ -5172,6 +5764,14 @@ $client->doc->versions->analysis(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
@@ -5232,7 +5832,7 @@ $client->doc->versions->analysis(
-$client->doc->versions->download($docId, $sha, $request) -> string
+$client->doc->versions->download($docId, $layerName, $sha, $request) -> string
-
@@ -5247,6 +5847,7 @@ $client->doc->versions->analysis(
```php
$client->doc->versions->download(
'docId',
+ 'layerName',
'sha',
new DownloadVersionsRequest([]),
);
@@ -5272,6 +5873,14 @@ $client->doc->versions->download(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
@@ -5292,7 +5901,7 @@ $client->doc->versions->download(
-$client->doc->versions->revision($docId, $sha, $index, $request) -> string
+$client->doc->versions->revision($docId, $layerName, $sha, $index, $request) -> string
-
@@ -5307,6 +5916,7 @@ $client->doc->versions->download(
```php
$client->doc->versions->revision(
'docId',
+ 'layerName',
'sha',
1,
new RevisionVersionsRequest([]),
@@ -5333,6 +5943,14 @@ $client->doc->versions->revision(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
@@ -5361,7 +5979,7 @@ $client->doc->versions->revision(
-$client->doc->versions->signatures($docId, $sha, $request) -> ?DocVersionsSignatures200Response
+$client->doc->versions->signatures($docId, $layerName, $sha, $request) -> ?DocVersionsSignatures200Response
-
@@ -5376,6 +5994,7 @@ $client->doc->versions->revision(
```php
$client->doc->versions->signatures(
'docId',
+ 'layerName',
'sha',
new SignaturesVersionsRequest([]),
);
@@ -5401,6 +6020,14 @@ $client->doc->versions->signatures(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
@@ -5421,7 +6048,7 @@ $client->doc->versions->signatures(
-$client->doc->versions->signatureContents($docId, $sha, $fieldKey, $request) -> string
+$client->doc->versions->signatureContents($docId, $layerName, $sha, $fieldKey, $request) -> string
-
@@ -5450,6 +6077,7 @@ $client->doc->versions->signatures(
```php
$client->doc->versions->signatureContents(
'docId',
+ 'layerName',
'sha',
'fieldKey',
new SignatureContentsVersionsRequest([]),
@@ -5476,6 +6104,14 @@ $client->doc->versions->signatureContents(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
@@ -5504,7 +6140,7 @@ $client->doc->versions->signatureContents(
-$client->doc->versions->signatureDigest($docId, $sha, $fieldKey, $algorithm, $request) -> string
+$client->doc->versions->signatureDigest($docId, $layerName, $sha, $fieldKey, $algorithm, $request) -> string
-
@@ -5533,6 +6169,7 @@ What a CMS verifier compares its message digest to.
```php
$client->doc->versions->signatureDigest(
'docId',
+ 'layerName',
'sha',
'fieldKey',
SignatureDigestVersionsRequestAlgorithm::Sha1->value,
@@ -5560,6 +6197,14 @@ $client->doc->versions->signatureDigest(
-
+**$layerName:** `string`
+
+
+
+
+
+-
+
**$sha:** `string`
diff --git a/src/CloudPDFClient.php b/src/CloudPDFClient.php
index 356ea0c5..5d6c1a20 100644
--- a/src/CloudPDFClient.php
+++ b/src/CloudPDFClient.php
@@ -7,6 +7,7 @@
use CloudPDF\Shares\SharesClient;
use CloudPDF\Tenants\TenantsClient;
use CloudPDF\Documents\DocumentsClient;
+use CloudPDF\Folders\FoldersClient;
use CloudPDF\Tokens\TokensClient;
use Psr\Http\Client\ClientInterface;
use CloudPDF\Core\Client\RawClient;
@@ -38,6 +39,11 @@ class CloudPDFClient
*/
public DocumentsClient $documents;
+ /**
+ * @var FoldersClient $folders
+ */
+ public FoldersClient $folders;
+
/**
* @var TokensClient $tokens
*/
@@ -76,8 +82,8 @@ public function __construct(
$defaultHeaders = [
'X-Fern-Language' => 'PHP',
'X-Fern-SDK-Name' => 'CloudPDF',
- 'X-Fern-SDK-Version' => '3.0.0-alpha.17',
- 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.17',
+ 'X-Fern-SDK-Version' => '3.0.0-alpha.18',
+ 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.18',
];
if ($token != null) {
$defaultHeaders['Authorization'] = "Bearer $token";
@@ -99,6 +105,7 @@ public function __construct(
$this->shares = new SharesClient($this->client, $this->options);
$this->tenants = new TenantsClient($this->client, $this->options);
$this->documents = new DocumentsClient($this->client, $this->options);
+ $this->folders = new FoldersClient($this->client, $this->options);
$this->tokens = new TokensClient($this->client, $this->options);
}
}
diff --git a/src/Doc/Signatures/SignaturesClient.php b/src/Doc/Signatures/SignaturesClient.php
index 9caf5ba2..f30be4f0 100644
--- a/src/Doc/Signatures/SignaturesClient.php
+++ b/src/Doc/Signatures/SignaturesClient.php
@@ -188,7 +188,7 @@ public function cancel(string $docId, string $layerName, string $signingId, Canc
}
/**
- * `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`. Every layer of the document then sits over the new version; refetch the manifest after a completion.
+ * `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.
*
* Example:
* ```php
@@ -336,7 +336,7 @@ public function analysis(string $docId, string $layerName, AnalysisSignaturesReq
}
/**
- * 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 layer behind the document head cannot sign (StaleBase).
+ * 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). The signature is made over the layer's own base: the upload, or the version its last signature made.
*
* Example:
* ```php
diff --git a/src/Doc/Versions/VersionsClient.php b/src/Doc/Versions/VersionsClient.php
index 961b506b..f8383655 100644
--- a/src/Doc/Versions/VersionsClient.php
+++ b/src/Doc/Versions/VersionsClient.php
@@ -59,17 +59,19 @@ public function __construct(
}
/**
- * Every completed signature publishes a new version. Never cached: the list grows.
+ * Every completed signature makes a new version of its layer; another layer's versions are never listed. Never cached: the list grows.
*
* Example:
* ```php
* $client->doc->versions->list(
* 'docId',
+ * 'layerName',
* new ListVersionsRequest([]),
* );
* ```
*
* @param string $docId
+ * @param string $layerName
* @param ListVersionsRequest $request
* @param ?array{
* baseUrl?: string,
@@ -83,7 +85,7 @@ public function __construct(
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function list(string $docId, ListVersionsRequest $request = new ListVersionsRequest(), ?array $options = null): ?DocVersionsList200Response
+ public function list(string $docId, string $layerName, ListVersionsRequest $request = new ListVersionsRequest(), ?array $options = null): ?DocVersionsList200Response
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -94,7 +96,7 @@ public function list(string $docId, ListVersionsRequest $request = new ListVersi
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions",
method: HttpMethod::GET,
headers: $headers,
),
@@ -121,18 +123,20 @@ public function list(string $docId, ListVersionsRequest $request = new ListVersi
}
/**
- * Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every layer and every caller.
+ * Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every caller.
*
* Example:
* ```php
* $client->doc->versions->analysis(
* 'docId',
+ * 'layerName',
* 'sha',
* new AnalysisVersionsRequest([]),
* );
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param AnalysisVersionsRequest $request
* @param ?array{
@@ -147,7 +151,7 @@ public function list(string $docId, ListVersionsRequest $request = new ListVersi
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function analysis(string $docId, string $sha, AnalysisVersionsRequest $request = new AnalysisVersionsRequest(), ?array $options = null): ?DocVersionsAnalysis200Response
+ public function analysis(string $docId, string $layerName, string $sha, AnalysisVersionsRequest $request = new AnalysisVersionsRequest(), ?array $options = null): ?DocVersionsAnalysis200Response
{
$options = array_merge($this->options, $options ?? []);
$query = [];
@@ -174,7 +178,7 @@ public function analysis(string $docId, string $sha, AnalysisVersionsRequest $re
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/analysis/{$sha}",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/analysis/{$sha}",
method: HttpMethod::GET,
headers: $headers,
query: $query,
@@ -206,12 +210,14 @@ public function analysis(string $docId, string $sha, AnalysisVersionsRequest $re
* ```php
* $client->doc->versions->download(
* 'docId',
+ * 'layerName',
* 'sha',
* new DownloadVersionsRequest([]),
* );
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param DownloadVersionsRequest $request
* @param ?array{
@@ -226,7 +232,7 @@ public function analysis(string $docId, string $sha, AnalysisVersionsRequest $re
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function download(string $docId, string $sha, DownloadVersionsRequest $request = new DownloadVersionsRequest(), ?array $options = null): string
+ public function download(string $docId, string $layerName, string $sha, DownloadVersionsRequest $request = new DownloadVersionsRequest(), ?array $options = null): string
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -237,7 +243,7 @@ public function download(string $docId, string $sha, DownloadVersionsRequest $re
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/download/{$sha}",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/download/{$sha}",
method: HttpMethod::GET,
headers: $headers,
),
@@ -262,6 +268,7 @@ public function download(string $docId, string $sha, DownloadVersionsRequest $re
* ```php
* $client->doc->versions->revision(
* 'docId',
+ * 'layerName',
* 'sha',
* 1,
* new RevisionVersionsRequest([]),
@@ -269,6 +276,7 @@ public function download(string $docId, string $sha, DownloadVersionsRequest $re
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param int $index
* @param RevisionVersionsRequest $request
@@ -284,7 +292,7 @@ public function download(string $docId, string $sha, DownloadVersionsRequest $re
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function revision(string $docId, string $sha, int $index, RevisionVersionsRequest $request = new RevisionVersionsRequest(), ?array $options = null): string
+ public function revision(string $docId, string $layerName, string $sha, int $index, RevisionVersionsRequest $request = new RevisionVersionsRequest(), ?array $options = null): string
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -295,7 +303,7 @@ public function revision(string $docId, string $sha, int $index, RevisionVersion
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/revisions/{$sha}/{$index}",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/revisions/{$sha}/{$index}",
method: HttpMethod::GET,
headers: $headers,
),
@@ -320,12 +328,14 @@ public function revision(string $docId, string $sha, int $index, RevisionVersion
* ```php
* $client->doc->versions->signatures(
* 'docId',
+ * 'layerName',
* 'sha',
* new SignaturesVersionsRequest([]),
* );
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param SignaturesVersionsRequest $request
* @param ?array{
@@ -340,7 +350,7 @@ public function revision(string $docId, string $sha, int $index, RevisionVersion
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function signatures(string $docId, string $sha, SignaturesVersionsRequest $request = new SignaturesVersionsRequest(), ?array $options = null): ?DocVersionsSignatures200Response
+ public function signatures(string $docId, string $layerName, string $sha, SignaturesVersionsRequest $request = new SignaturesVersionsRequest(), ?array $options = null): ?DocVersionsSignatures200Response
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -351,7 +361,7 @@ public function signatures(string $docId, string $sha, SignaturesVersionsRequest
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/signatures/{$sha}",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}",
method: HttpMethod::GET,
headers: $headers,
),
@@ -384,6 +394,7 @@ public function signatures(string $docId, string $sha, SignaturesVersionsRequest
* ```php
* $client->doc->versions->signatureContents(
* 'docId',
+ * 'layerName',
* 'sha',
* 'fieldKey',
* new SignatureContentsVersionsRequest([]),
@@ -391,6 +402,7 @@ public function signatures(string $docId, string $sha, SignaturesVersionsRequest
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param string $fieldKey
* @param SignatureContentsVersionsRequest $request
@@ -406,7 +418,7 @@ public function signatures(string $docId, string $sha, SignaturesVersionsRequest
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function signatureContents(string $docId, string $sha, string $fieldKey, SignatureContentsVersionsRequest $request = new SignatureContentsVersionsRequest(), ?array $options = null): string
+ public function signatureContents(string $docId, string $layerName, string $sha, string $fieldKey, SignatureContentsVersionsRequest $request = new SignatureContentsVersionsRequest(), ?array $options = null): string
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -417,7 +429,7 @@ public function signatureContents(string $docId, string $sha, string $fieldKey,
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/signatures/{$sha}/{$fieldKey}/contents",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}/{$fieldKey}/contents",
method: HttpMethod::GET,
headers: $headers,
),
@@ -444,6 +456,7 @@ public function signatureContents(string $docId, string $sha, string $fieldKey,
* ```php
* $client->doc->versions->signatureDigest(
* 'docId',
+ * 'layerName',
* 'sha',
* 'fieldKey',
* SignatureDigestVersionsRequestAlgorithm::Sha1->value,
@@ -452,6 +465,7 @@ public function signatureContents(string $docId, string $sha, string $fieldKey,
* ```
*
* @param string $docId
+ * @param string $layerName
* @param string $sha
* @param string $fieldKey
* @param value-of $algorithm
@@ -468,7 +482,7 @@ public function signatureContents(string $docId, string $sha, string $fieldKey,
* @throws CloudPDFException
* @throws CloudPDFApiException
*/
- public function signatureDigest(string $docId, string $sha, string $fieldKey, string $algorithm, SignatureDigestVersionsRequest $request = new SignatureDigestVersionsRequest(), ?array $options = null): string
+ public function signatureDigest(string $docId, string $layerName, string $sha, string $fieldKey, string $algorithm, SignatureDigestVersionsRequest $request = new SignatureDigestVersionsRequest(), ?array $options = null): string
{
$options = array_merge($this->options, $options ?? []);
$headers = [];
@@ -479,7 +493,7 @@ public function signatureDigest(string $docId, string $sha, string $fieldKey, st
$response = $this->client->sendRequest(
new JsonApiRequest(
baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
- path: "v1/docs/{$docId}/versions/signatures/{$sha}/{$fieldKey}/digest/{$algorithm}",
+ path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}/{$fieldKey}/digest/{$algorithm}",
method: HttpMethod::GET,
headers: $headers,
),
diff --git a/src/Documents/DocumentsClient.php b/src/Documents/DocumentsClient.php
index 009faa6f..56ca31ff 100644
--- a/src/Documents/DocumentsClient.php
+++ b/src/Documents/DocumentsClient.php
@@ -14,6 +14,8 @@
use JsonException;
use Psr\Http\Client\ClientExceptionInterface;
use CloudPDF\Types\DocumentsGet200Response;
+use CloudPDF\Documents\Requests\DocumentsUpdateRequest;
+use CloudPDF\Types\DocumentsUpdate200Response;
use CloudPDF\Documents\Requests\DocumentsCommitRequest;
use CloudPDF\Types\DocumentsCommit200Response;
use CloudPDF\Documents\Requests\UploadProxyDocumentsRequest;
@@ -103,6 +105,18 @@ public function list(string $tenantId, ListDocumentsRequest $request = new ListD
if ($request->state != null) {
$query['state'] = $request->state;
}
+ if ($request->q != null) {
+ $query['q'] = $request->q;
+ }
+ if ($request->folderId != null) {
+ $query['folderId'] = $request->folderId;
+ }
+ if ($request->sort != null) {
+ $query['sort'] = $request->sort;
+ }
+ if ($request->order != null) {
+ $query['order'] = $request->order;
+ }
try {
$response = $this->client->sendRequest(
new JsonApiRequest(
@@ -236,6 +250,68 @@ public function delete(string $tenantId, string $id, ?array $options = null): vo
);
}
+ /**
+ * A document that is being deleted answers 404.
+ *
+ * Example:
+ * ```php
+ * $client->documents->update(
+ * 'tenantId',
+ * 'id',
+ * new DocumentsUpdateRequest([
+ * 'name' => 'name',
+ * ]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param string $id
+ * @param DocumentsUpdateRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @return ?DocumentsUpdate200Response
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function update(string $tenantId, string $id, DocumentsUpdateRequest $request, ?array $options = null): ?DocumentsUpdate200Response
+ {
+ $options = array_merge($this->options, $options ?? []);
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/documents/{$id}",
+ method: HttpMethod::PATCH,
+ body: $request,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ $json = $response->getBody()->getContents();
+ if (empty($json)) {
+ return null;
+ }
+ return DocumentsUpdate200Response::fromJson($json);
+ }
+ } catch (JsonException $e) {
+ throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
/**
* Example:
* ```php
diff --git a/src/Documents/Requests/DocumentsImportFromRequest.php b/src/Documents/Requests/DocumentsImportFromRequest.php
index a8ceb74f..2890139e 100644
--- a/src/Documents/Requests/DocumentsImportFromRequest.php
+++ b/src/Documents/Requests/DocumentsImportFromRequest.php
@@ -24,6 +24,18 @@ class DocumentsImportFromRequest extends JsonSerializableType
#[JsonProperty('expected')]
public ?DocumentsImportFromRequestExpected $expected;
+ /**
+ * @var ?string $name What people call the document: shown in dashboards, searched and sorted by. 1 to 255 characters, no control characters, no leading or trailing whitespace. Names need not be unique.
+ */
+ #[JsonProperty('name')]
+ public ?string $name;
+
+ /**
+ * @var ?string $folderId A folder id, or root for the top level.
+ */
+ #[JsonProperty('folderId')]
+ public ?string $folderId;
+
/**
* @var ?array $metadata
*/
@@ -58,6 +70,8 @@ class DocumentsImportFromRequest extends JsonSerializableType
* @param array{
* source: DocumentsImportFromRequestSource,
* expected?: ?DocumentsImportFromRequestExpected,
+ * name?: ?string,
+ * folderId?: ?string,
* metadata?: ?array,
* idempotencyKey?: ?string,
* dedupMode?: ?value-of,
@@ -70,6 +84,8 @@ public function __construct(
) {
$this->source = $values['source'];
$this->expected = $values['expected'] ?? null;
+ $this->name = $values['name'] ?? null;
+ $this->folderId = $values['folderId'] ?? null;
$this->metadata = $values['metadata'] ?? null;
$this->idempotencyKey = $values['idempotencyKey'] ?? null;
$this->dedupMode = $values['dedupMode'] ?? null;
diff --git a/src/Documents/Requests/DocumentsInitRequest.php b/src/Documents/Requests/DocumentsInitRequest.php
index c6beac63..ac961531 100644
--- a/src/Documents/Requests/DocumentsInitRequest.php
+++ b/src/Documents/Requests/DocumentsInitRequest.php
@@ -22,6 +22,18 @@ class DocumentsInitRequest extends JsonSerializableType
#[JsonProperty('contentSha256')]
public string $contentSha256;
+ /**
+ * @var ?string $name What people call the document: shown in dashboards, searched and sorted by. 1 to 255 characters, no control characters, no leading or trailing whitespace. Names need not be unique.
+ */
+ #[JsonProperty('name')]
+ public ?string $name;
+
+ /**
+ * @var ?string $folderId A folder id, or root for the top level.
+ */
+ #[JsonProperty('folderId')]
+ public ?string $folderId;
+
/**
* @var ?array $metadata
*/
@@ -62,6 +74,8 @@ class DocumentsInitRequest extends JsonSerializableType
* @param array{
* contentLength: float,
* contentSha256: string,
+ * name?: ?string,
+ * folderId?: ?string,
* metadata?: ?array,
* idempotencyKey?: ?string,
* dedupMode?: ?value-of,
@@ -75,6 +89,8 @@ public function __construct(
) {
$this->contentLength = $values['contentLength'];
$this->contentSha256 = $values['contentSha256'];
+ $this->name = $values['name'] ?? null;
+ $this->folderId = $values['folderId'] ?? null;
$this->metadata = $values['metadata'] ?? null;
$this->idempotencyKey = $values['idempotencyKey'] ?? null;
$this->dedupMode = $values['dedupMode'] ?? null;
diff --git a/src/Documents/Requests/DocumentsUpdateRequest.php b/src/Documents/Requests/DocumentsUpdateRequest.php
new file mode 100644
index 00000000..f3f9ff50
--- /dev/null
+++ b/src/Documents/Requests/DocumentsUpdateRequest.php
@@ -0,0 +1,26 @@
+name = $values['name'];
+ }
+}
diff --git a/src/Documents/Requests/ListDocumentsRequest.php b/src/Documents/Requests/ListDocumentsRequest.php
index 9940af7c..e544cbb8 100644
--- a/src/Documents/Requests/ListDocumentsRequest.php
+++ b/src/Documents/Requests/ListDocumentsRequest.php
@@ -4,6 +4,8 @@
use CloudPDF\Core\Json\JsonSerializableType;
use CloudPDF\Documents\Types\ListDocumentsRequestState;
+use CloudPDF\Documents\Types\ListDocumentsRequestSort;
+use CloudPDF\Documents\Types\ListDocumentsRequestOrder;
class ListDocumentsRequest extends JsonSerializableType
{
@@ -18,15 +20,39 @@ class ListDocumentsRequest extends JsonSerializableType
public ?string $cursor;
/**
- * @var ?value-of $state
+ * @var ?value-of $state Only documents in this state. Without it, every state except deleting.
*/
public ?string $state;
+ /**
+ * @var ?string $q Only documents whose name contains this text, ignoring case.
+ */
+ public ?string $q;
+
+ /**
+ * @var ?string $folderId Only documents directly in this folder (root: the top level). Without it, documents in every folder.
+ */
+ public ?string $folderId;
+
+ /**
+ * @var ?value-of $sort createdAt (default), name (ignoring case), or size (stored bytes; 0 while pending).
+ */
+ public ?string $sort;
+
+ /**
+ * @var ?value-of $order Defaults to the reading order of the sort: A to Z for name, newest and largest first otherwise.
+ */
+ public ?string $order;
+
/**
* @param array{
* limit?: ?int,
* cursor?: ?string,
* state?: ?value-of,
+ * q?: ?string,
+ * folderId?: ?string,
+ * sort?: ?value-of,
+ * order?: ?value-of,
* } $values
*/
public function __construct(
@@ -35,5 +61,9 @@ public function __construct(
$this->limit = $values['limit'] ?? null;
$this->cursor = $values['cursor'] ?? null;
$this->state = $values['state'] ?? null;
+ $this->q = $values['q'] ?? null;
+ $this->folderId = $values['folderId'] ?? null;
+ $this->sort = $values['sort'] ?? null;
+ $this->order = $values['order'] ?? null;
}
}
diff --git a/src/Documents/Types/ListDocumentsRequestOrder.php b/src/Documents/Types/ListDocumentsRequestOrder.php
new file mode 100644
index 00000000..749c1e2c
--- /dev/null
+++ b/src/Documents/Types/ListDocumentsRequestOrder.php
@@ -0,0 +1,9 @@
+,
+ * } $options @phpstan-ignore-next-line Property is used in endpoint methods via HttpEndpointGenerator
+ */
+ private array $options;
+
+ /**
+ * @var RawClient $client
+ */
+ private RawClient $client;
+
+ /**
+ * @param RawClient $client
+ * @param ?array{
+ * baseUrl?: string,
+ * client?: ClientInterface,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * } $options
+ */
+ public function __construct(
+ RawClient $client,
+ ?array $options = null,
+ ) {
+ $this->client = $client;
+ $this->options = $options ?? [];
+ }
+
+ /**
+ * Example:
+ * ```php
+ * $client->folders->list(
+ * 'tenantId',
+ * new ListFoldersRequest([]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param ListFoldersRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @return ?FoldersList200Response
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function list(string $tenantId, ListFoldersRequest $request = new ListFoldersRequest(), ?array $options = null): ?FoldersList200Response
+ {
+ $options = array_merge($this->options, $options ?? []);
+ $query = [];
+ if ($request->limit != null) {
+ $query['limit'] = $request->limit;
+ }
+ if ($request->cursor != null) {
+ $query['cursor'] = $request->cursor;
+ }
+ if ($request->parentId != null) {
+ $query['parentId'] = $request->parentId;
+ }
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders",
+ method: HttpMethod::GET,
+ query: $query,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ $json = $response->getBody()->getContents();
+ if (empty($json)) {
+ return null;
+ }
+ return FoldersList200Response::fromJson($json);
+ }
+ } catch (JsonException $e) {
+ throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
+ /**
+ * 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.
+ *
+ * Example:
+ * ```php
+ * $client->folders->create(
+ * 'tenantId',
+ * new FoldersCreateRequest([
+ * 'name' => 'name',
+ * ]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param FoldersCreateRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @return ?FoldersCreate200Response
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function create(string $tenantId, FoldersCreateRequest $request, ?array $options = null): ?FoldersCreate200Response
+ {
+ $options = array_merge($this->options, $options ?? []);
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders",
+ method: HttpMethod::POST,
+ body: $request,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ $json = $response->getBody()->getContents();
+ if (empty($json)) {
+ return null;
+ }
+ return FoldersCreate200Response::fromJson($json);
+ }
+ } catch (JsonException $e) {
+ throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
+ /**
+ * Example:
+ * ```php
+ * $client->folders->get(
+ * 'tenantId',
+ * 'folderId',
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param string $folderId
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @return ?FoldersGet200Response
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function get(string $tenantId, string $folderId, ?array $options = null): ?FoldersGet200Response
+ {
+ $options = array_merge($this->options, $options ?? []);
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders/{$folderId}",
+ method: HttpMethod::GET,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ $json = $response->getBody()->getContents();
+ if (empty($json)) {
+ return null;
+ }
+ return FoldersGet200Response::fromJson($json);
+ }
+ } catch (JsonException $e) {
+ throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
+ /**
+ * 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 share links at once; their stored files and links are removed in the background. Uploads into those folders that have not committed cannot commit.
+ *
+ * Example:
+ * ```php
+ * $client->folders->delete(
+ * 'tenantId',
+ * 'folderId',
+ * new DeleteFoldersRequest([]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param string $folderId
+ * @param DeleteFoldersRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function delete(string $tenantId, string $folderId, DeleteFoldersRequest $request = new DeleteFoldersRequest(), ?array $options = null): void
+ {
+ $options = array_merge($this->options, $options ?? []);
+ $query = [];
+ if ($request->recursive != null) {
+ $query['recursive'] = $request->recursive;
+ }
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders/{$folderId}",
+ method: HttpMethod::DELETE,
+ query: $query,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ return;
+ }
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
+ /**
+ * 409 Conflict with `details.reason` `name-taken` when a sibling has the name, ignoring case.
+ *
+ * Example:
+ * ```php
+ * $client->folders->update(
+ * 'tenantId',
+ * 'folderId',
+ * new FoldersUpdateRequest([
+ * 'name' => 'name',
+ * ]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param string $folderId
+ * @param FoldersUpdateRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @return ?FoldersUpdate200Response
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function update(string $tenantId, string $folderId, FoldersUpdateRequest $request, ?array $options = null): ?FoldersUpdate200Response
+ {
+ $options = array_merge($this->options, $options ?? []);
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders/{$folderId}",
+ method: HttpMethod::PATCH,
+ body: $request,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ $json = $response->getBody()->getContents();
+ if (empty($json)) {
+ return null;
+ }
+ return FoldersUpdate200Response::fromJson($json);
+ }
+ } catch (JsonException $e) {
+ throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e);
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+
+ /**
+ * 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.documentIds` 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`).
+ *
+ * Example:
+ * ```php
+ * $client->folders->moveInto(
+ * 'tenantId',
+ * 'folderId',
+ * new FoldersMoveIntoRequest([]),
+ * );
+ * ```
+ *
+ * @param string $tenantId
+ * @param string $folderId A folder id, or root for the top level.
+ * @param FoldersMoveIntoRequest $request
+ * @param ?array{
+ * baseUrl?: string,
+ * maxRetries?: int,
+ * timeout?: float,
+ * headers?: array,
+ * queryParameters?: array,
+ * bodyProperties?: array,
+ * } $options
+ * @throws CloudPDFException
+ * @throws CloudPDFApiException
+ */
+ public function moveInto(string $tenantId, string $folderId, FoldersMoveIntoRequest $request = new FoldersMoveIntoRequest(), ?array $options = null): void
+ {
+ $options = array_merge($this->options, $options ?? []);
+ try {
+ $response = $this->client->sendRequest(
+ new JsonApiRequest(
+ baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '',
+ path: "v1/tenants/{$tenantId}/folders/{$folderId}/move-into",
+ method: HttpMethod::POST,
+ body: $request,
+ ),
+ $options,
+ );
+ $statusCode = $response->getStatusCode();
+ if ($statusCode >= 200 && $statusCode < 400) {
+ return;
+ }
+ } catch (ClientExceptionInterface $e) {
+ throw new CloudPDFException(message: $e->getMessage(), previous: $e);
+ }
+ throw new CloudPDFApiException(
+ message: 'API request failed',
+ statusCode: $statusCode,
+ body: $response->getBody()->getContents(),
+ );
+ }
+}
diff --git a/src/Folders/Requests/DeleteFoldersRequest.php b/src/Folders/Requests/DeleteFoldersRequest.php
new file mode 100644
index 00000000..a6ae4398
--- /dev/null
+++ b/src/Folders/Requests/DeleteFoldersRequest.php
@@ -0,0 +1,24 @@
+recursive = $values['recursive'] ?? null;
+ }
+}
diff --git a/src/Folders/Requests/FoldersCreateRequest.php b/src/Folders/Requests/FoldersCreateRequest.php
new file mode 100644
index 00000000..38543749
--- /dev/null
+++ b/src/Folders/Requests/FoldersCreateRequest.php
@@ -0,0 +1,34 @@
+name = $values['name'];
+ $this->parentId = $values['parentId'] ?? null;
+ }
+}
diff --git a/src/Folders/Requests/FoldersMoveIntoRequest.php b/src/Folders/Requests/FoldersMoveIntoRequest.php
new file mode 100644
index 00000000..2aaec060
--- /dev/null
+++ b/src/Folders/Requests/FoldersMoveIntoRequest.php
@@ -0,0 +1,35 @@
+ $documentIds
+ */
+ #[JsonProperty('documentIds'), ArrayType(['string'])]
+ public ?array $documentIds;
+
+ /**
+ * @var ?array $folderIds
+ */
+ #[JsonProperty('folderIds'), ArrayType(['string'])]
+ public ?array $folderIds;
+
+ /**
+ * @param array{
+ * documentIds?: ?array,
+ * folderIds?: ?array,
+ * } $values
+ */
+ public function __construct(
+ array $values = [],
+ ) {
+ $this->documentIds = $values['documentIds'] ?? null;
+ $this->folderIds = $values['folderIds'] ?? null;
+ }
+}
diff --git a/src/Folders/Requests/FoldersUpdateRequest.php b/src/Folders/Requests/FoldersUpdateRequest.php
new file mode 100644
index 00000000..badc8d70
--- /dev/null
+++ b/src/Folders/Requests/FoldersUpdateRequest.php
@@ -0,0 +1,26 @@
+name = $values['name'];
+ }
+}
diff --git a/src/Folders/Requests/ListFoldersRequest.php b/src/Folders/Requests/ListFoldersRequest.php
new file mode 100644
index 00000000..6febc09d
--- /dev/null
+++ b/src/Folders/Requests/ListFoldersRequest.php
@@ -0,0 +1,38 @@
+limit = $values['limit'] ?? null;
+ $this->cursor = $values['cursor'] ?? null;
+ $this->parentId = $values['parentId'] ?? null;
+ }
+}
diff --git a/src/Shares/Requests/SharesCreateRequest.php b/src/Shares/Requests/SharesCreateRequest.php
index 7f76021f..9faa8e91 100644
--- a/src/Shares/Requests/SharesCreateRequest.php
+++ b/src/Shares/Requests/SharesCreateRequest.php
@@ -6,6 +6,7 @@
use CloudPDF\Core\Json\JsonProperty;
use CloudPDF\Shares\Types\SharesCreateRequestLayerMode;
use CloudPDF\Shares\Types\SharesCreateRequestVisitorIdentity;
+use CloudPDF\Types\Identity;
use CloudPDF\Core\Types\ArrayType;
class SharesCreateRequest extends JsonSerializableType
@@ -46,6 +47,12 @@ class SharesCreateRequest extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesCreateRequestVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -85,6 +92,7 @@ class SharesCreateRequest extends JsonSerializableType
* keepVisitorLayers?: ?bool,
* visitorIdleSeconds?: ?int,
* visitorIdentity?: ?SharesCreateRequestVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* password?: ?string,
* sessionTtlSeconds?: ?int,
@@ -100,6 +108,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'] ?? null;
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->password = $values['password'] ?? null;
diff --git a/src/Shares/Requests/SharesUpdateRequest.php b/src/Shares/Requests/SharesUpdateRequest.php
index 6dc58369..91be80fa 100644
--- a/src/Shares/Requests/SharesUpdateRequest.php
+++ b/src/Shares/Requests/SharesUpdateRequest.php
@@ -6,6 +6,7 @@
use CloudPDF\Shares\Types\SharesUpdateRequestLayerMode;
use CloudPDF\Core\Json\JsonProperty;
use CloudPDF\Shares\Types\SharesUpdateRequestVisitorIdentity;
+use CloudPDF\Types\Identity;
use CloudPDF\Core\Types\ArrayType;
class SharesUpdateRequest extends JsonSerializableType
@@ -40,6 +41,12 @@ class SharesUpdateRequest extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesUpdateRequestVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var ?array $scope
*/
@@ -83,6 +90,7 @@ class SharesUpdateRequest extends JsonSerializableType
* keepVisitorLayers?: ?bool,
* visitorIdleSeconds?: ?int,
* visitorIdentity?: ?SharesUpdateRequestVisitorIdentity,
+ * identity?: ?Identity,
* scope?: ?array,
* origins?: ?array,
* password?: ?string,
@@ -99,6 +107,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'] ?? null;
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'] ?? null;
$this->origins = $values['origins'] ?? null;
$this->password = $values['password'] ?? null;
diff --git a/src/Types/DocVersionsList200Response.php b/src/Types/DocVersionsList200Response.php
index 487990ce..c17b4dcc 100644
--- a/src/Types/DocVersionsList200Response.php
+++ b/src/Types/DocVersionsList200Response.php
@@ -9,10 +9,10 @@
class DocVersionsList200Response extends JsonSerializableType
{
/**
- * @var string $head
+ * @var string $baseSha
*/
- #[JsonProperty('head')]
- public string $head;
+ #[JsonProperty('baseSha')]
+ public string $baseSha;
/**
* @var array $versions
@@ -22,14 +22,14 @@ class DocVersionsList200Response extends JsonSerializableType
/**
* @param array{
- * head: string,
+ * baseSha: string,
* versions: array,
* } $values
*/
public function __construct(
array $values,
) {
- $this->head = $values['head'];
+ $this->baseSha = $values['baseSha'];
$this->versions = $values['versions'];
}
diff --git a/src/Types/DocumentsCommit200ResponseDocument.php b/src/Types/DocumentsCommit200ResponseDocument.php
index 7801f0f1..084e5d35 100644
--- a/src/Types/DocumentsCommit200ResponseDocument.php
+++ b/src/Types/DocumentsCommit200ResponseDocument.php
@@ -20,6 +20,18 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsGet200ResponseDocument.php b/src/Types/DocumentsGet200ResponseDocument.php
index 2670df24..20356437 100644
--- a/src/Types/DocumentsGet200ResponseDocument.php
+++ b/src/Types/DocumentsGet200ResponseDocument.php
@@ -20,6 +20,18 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsImportFrom200ResponseDocument.php b/src/Types/DocumentsImportFrom200ResponseDocument.php
index 3ab40b09..b043306c 100644
--- a/src/Types/DocumentsImportFrom200ResponseDocument.php
+++ b/src/Types/DocumentsImportFrom200ResponseDocument.php
@@ -20,6 +20,18 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsImportFrom202ResponseDocument.php b/src/Types/DocumentsImportFrom202ResponseDocument.php
index cf447040..4dae8085 100644
--- a/src/Types/DocumentsImportFrom202ResponseDocument.php
+++ b/src/Types/DocumentsImportFrom202ResponseDocument.php
@@ -20,6 +20,18 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsInit200ResponseCreatedDocument.php b/src/Types/DocumentsInit200ResponseCreatedDocument.php
index 636417a3..969e7532 100644
--- a/src/Types/DocumentsInit200ResponseCreatedDocument.php
+++ b/src/Types/DocumentsInit200ResponseCreatedDocument.php
@@ -20,6 +20,18 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsInit200ResponseDedupedDocument.php b/src/Types/DocumentsInit200ResponseDedupedDocument.php
index 18cae94c..a560f550 100644
--- a/src/Types/DocumentsInit200ResponseDedupedDocument.php
+++ b/src/Types/DocumentsInit200ResponseDedupedDocument.php
@@ -20,6 +20,18 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsInit200ResponseResumedDocument.php b/src/Types/DocumentsInit200ResponseResumedDocument.php
index a5877318..9dd674c0 100644
--- a/src/Types/DocumentsInit200ResponseResumedDocument.php
+++ b/src/Types/DocumentsInit200ResponseResumedDocument.php
@@ -20,6 +20,18 @@ class DocumentsInit200ResponseResumedDocument extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsInit200ResponseResumedDocument extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsList200ResponseDocumentsItem.php b/src/Types/DocumentsList200ResponseDocumentsItem.php
index 6ad7e193..5c8634df 100644
--- a/src/Types/DocumentsList200ResponseDocumentsItem.php
+++ b/src/Types/DocumentsList200ResponseDocumentsItem.php
@@ -20,6 +20,18 @@ class DocumentsList200ResponseDocumentsItem extends JsonSerializableType
#[JsonProperty('tenantId')]
public string $tenantId;
+ /**
+ * @var string $name
+ */
+ #[JsonProperty('name')]
+ public string $name;
+
+ /**
+ * @var string $folderId The folder the document is in, or root.
+ */
+ #[JsonProperty('folderId')]
+ public string $folderId;
+
/**
* @var value-of $state
*/
@@ -90,6 +102,8 @@ class DocumentsList200ResponseDocumentsItem extends JsonSerializableType
* @param array{
* id: string,
* tenantId: string,
+ * name: string,
+ * folderId: string,
* state: value-of,
* createdAt: float,
* updatedAt: float,
@@ -108,6 +122,8 @@ public function __construct(
) {
$this->id = $values['id'];
$this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
$this->state = $values['state'];
$this->baseSha = $values['baseSha'] ?? null;
$this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
diff --git a/src/Types/DocumentsUpdate200Response.php b/src/Types/DocumentsUpdate200Response.php
new file mode 100644
index 00000000..0395cd2b
--- /dev/null
+++ b/src/Types/DocumentsUpdate200Response.php
@@ -0,0 +1,34 @@
+document = $values['document'];
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/DocumentsUpdate200ResponseDocument.php b/src/Types/DocumentsUpdate200ResponseDocument.php
new file mode 100644
index 00000000..162b47dc
--- /dev/null
+++ b/src/Types/DocumentsUpdate200ResponseDocument.php
@@ -0,0 +1,147 @@
+ $state
+ */
+ #[JsonProperty('state')]
+ public string $state;
+
+ /**
+ * @var ?string $baseSha
+ */
+ #[JsonProperty('baseSha')]
+ public ?string $baseSha;
+
+ /**
+ * @var ?float $storageSizeBytes
+ */
+ #[JsonProperty('storageSizeBytes')]
+ public ?float $storageSizeBytes;
+
+ /**
+ * @var ?array $metadata
+ */
+ #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])]
+ public ?array $metadata;
+
+ /**
+ * @var ?string $idempotencyKey
+ */
+ #[JsonProperty('idempotencyKey')]
+ public ?string $idempotencyKey;
+
+ /**
+ * @var ?string $failureReason
+ */
+ #[JsonProperty('failureReason')]
+ public ?string $failureReason;
+
+ /**
+ * @var ?value-of $thumbnailState
+ */
+ #[JsonProperty('thumbnailState')]
+ public ?string $thumbnailState;
+
+ /**
+ * @var ?string $thumbnailUrl
+ */
+ #[JsonProperty('thumbnailUrl')]
+ public ?string $thumbnailUrl;
+
+ /**
+ * @var float $createdAt
+ */
+ #[JsonProperty('createdAt')]
+ public float $createdAt;
+
+ /**
+ * @var float $updatedAt
+ */
+ #[JsonProperty('updatedAt')]
+ public float $updatedAt;
+
+ /**
+ * @var ?string $createdBy
+ */
+ #[JsonProperty('createdBy')]
+ public ?string $createdBy;
+
+ /**
+ * @param array{
+ * id: string,
+ * tenantId: string,
+ * name: string,
+ * folderId: string,
+ * state: value-of,
+ * createdAt: float,
+ * updatedAt: float,
+ * baseSha?: ?string,
+ * storageSizeBytes?: ?float,
+ * metadata?: ?array,
+ * idempotencyKey?: ?string,
+ * failureReason?: ?string,
+ * thumbnailState?: ?value-of,
+ * thumbnailUrl?: ?string,
+ * createdBy?: ?string,
+ * } $values
+ */
+ public function __construct(
+ array $values,
+ ) {
+ $this->id = $values['id'];
+ $this->tenantId = $values['tenantId'];
+ $this->name = $values['name'];
+ $this->folderId = $values['folderId'];
+ $this->state = $values['state'];
+ $this->baseSha = $values['baseSha'] ?? null;
+ $this->storageSizeBytes = $values['storageSizeBytes'] ?? null;
+ $this->metadata = $values['metadata'] ?? null;
+ $this->idempotencyKey = $values['idempotencyKey'] ?? null;
+ $this->failureReason = $values['failureReason'] ?? null;
+ $this->thumbnailState = $values['thumbnailState'] ?? null;
+ $this->thumbnailUrl = $values['thumbnailUrl'] ?? null;
+ $this->createdAt = $values['createdAt'];
+ $this->updatedAt = $values['updatedAt'];
+ $this->createdBy = $values['createdBy'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/DocumentsUpdate200ResponseDocumentState.php b/src/Types/DocumentsUpdate200ResponseDocumentState.php
new file mode 100644
index 00000000..6dce8b23
--- /dev/null
+++ b/src/Types/DocumentsUpdate200ResponseDocumentState.php
@@ -0,0 +1,11 @@
+folder = $values['folder'];
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersCreate200ResponseFolder.php b/src/Types/FoldersCreate200ResponseFolder.php
new file mode 100644
index 00000000..c8fa79df
--- /dev/null
+++ b/src/Types/FoldersCreate200ResponseFolder.php
@@ -0,0 +1,82 @@
+id = $values['id'];
+ $this->tenantId = $values['tenantId'];
+ $this->parentId = $values['parentId'];
+ $this->name = $values['name'];
+ $this->createdAt = $values['createdAt'];
+ $this->updatedAt = $values['updatedAt'];
+ $this->createdBy = $values['createdBy'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersGet200Response.php b/src/Types/FoldersGet200Response.php
new file mode 100644
index 00000000..f867d916
--- /dev/null
+++ b/src/Types/FoldersGet200Response.php
@@ -0,0 +1,43 @@
+ $path The folders above this one, from the top level down. Neither root nor the folder itself.
+ */
+ #[JsonProperty('path'), ArrayType([FoldersGet200ResponsePathItem::class])]
+ public array $path;
+
+ /**
+ * @param array{
+ * folder: FoldersGet200ResponseFolder,
+ * path: array,
+ * } $values
+ */
+ public function __construct(
+ array $values,
+ ) {
+ $this->folder = $values['folder'];
+ $this->path = $values['path'];
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersGet200ResponseFolder.php b/src/Types/FoldersGet200ResponseFolder.php
new file mode 100644
index 00000000..e102eff2
--- /dev/null
+++ b/src/Types/FoldersGet200ResponseFolder.php
@@ -0,0 +1,82 @@
+id = $values['id'];
+ $this->tenantId = $values['tenantId'];
+ $this->parentId = $values['parentId'];
+ $this->name = $values['name'];
+ $this->createdAt = $values['createdAt'];
+ $this->updatedAt = $values['updatedAt'];
+ $this->createdBy = $values['createdBy'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersGet200ResponsePathItem.php b/src/Types/FoldersGet200ResponsePathItem.php
new file mode 100644
index 00000000..04cd299f
--- /dev/null
+++ b/src/Types/FoldersGet200ResponsePathItem.php
@@ -0,0 +1,42 @@
+id = $values['id'];
+ $this->name = $values['name'];
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersList200Response.php b/src/Types/FoldersList200Response.php
new file mode 100644
index 00000000..a1bd086c
--- /dev/null
+++ b/src/Types/FoldersList200Response.php
@@ -0,0 +1,43 @@
+ $folders
+ */
+ #[JsonProperty('folders'), ArrayType([FoldersList200ResponseFoldersItem::class])]
+ public array $folders;
+
+ /**
+ * @var ?string $nextCursor
+ */
+ #[JsonProperty('nextCursor')]
+ public ?string $nextCursor;
+
+ /**
+ * @param array{
+ * folders: array,
+ * nextCursor?: ?string,
+ * } $values
+ */
+ public function __construct(
+ array $values,
+ ) {
+ $this->folders = $values['folders'];
+ $this->nextCursor = $values['nextCursor'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersList200ResponseFoldersItem.php b/src/Types/FoldersList200ResponseFoldersItem.php
new file mode 100644
index 00000000..e81da247
--- /dev/null
+++ b/src/Types/FoldersList200ResponseFoldersItem.php
@@ -0,0 +1,82 @@
+id = $values['id'];
+ $this->tenantId = $values['tenantId'];
+ $this->parentId = $values['parentId'];
+ $this->name = $values['name'];
+ $this->createdAt = $values['createdAt'];
+ $this->updatedAt = $values['updatedAt'];
+ $this->createdBy = $values['createdBy'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersUpdate200Response.php b/src/Types/FoldersUpdate200Response.php
new file mode 100644
index 00000000..894f204c
--- /dev/null
+++ b/src/Types/FoldersUpdate200Response.php
@@ -0,0 +1,34 @@
+folder = $values['folder'];
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/FoldersUpdate200ResponseFolder.php b/src/Types/FoldersUpdate200ResponseFolder.php
new file mode 100644
index 00000000..f1569406
--- /dev/null
+++ b/src/Types/FoldersUpdate200ResponseFolder.php
@@ -0,0 +1,82 @@
+id = $values['id'];
+ $this->tenantId = $values['tenantId'];
+ $this->parentId = $values['parentId'];
+ $this->name = $values['name'];
+ $this->createdAt = $values['createdAt'];
+ $this->updatedAt = $values['updatedAt'];
+ $this->createdBy = $values['createdBy'] ?? null;
+ }
+
+ /**
+ * @return string
+ */
+ public function __toString(): string
+ {
+ return $this->toJson();
+ }
+}
diff --git a/src/Types/TokensIssueRequestDocIdentity.php b/src/Types/Identity.php
similarity index 96%
rename from src/Types/TokensIssueRequestDocIdentity.php
rename to src/Types/Identity.php
index 188b9313..ae25d73b 100644
--- a/src/Types/TokensIssueRequestDocIdentity.php
+++ b/src/Types/Identity.php
@@ -5,7 +5,7 @@
use CloudPDF\Core\Json\JsonSerializableType;
use CloudPDF\Core\Json\JsonProperty;
-class TokensIssueRequestDocIdentity extends JsonSerializableType
+class Identity extends JsonSerializableType
{
/**
* @var ?string $userId
diff --git a/src/Types/SharesArchive200ResponseShare.php b/src/Types/SharesArchive200ResponseShare.php
index 17151a16..c18197d9 100644
--- a/src/Types/SharesArchive200ResponseShare.php
+++ b/src/Types/SharesArchive200ResponseShare.php
@@ -56,6 +56,12 @@ class SharesArchive200ResponseShare extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesArchive200ResponseShareVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -146,6 +152,7 @@ class SharesArchive200ResponseShare extends JsonSerializableType
* layerName?: ?string,
* visitorIdleSeconds?: ?float,
* visitorIdentity?: ?SharesArchive200ResponseShareVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* archivedAt?: ?float,
* expiresAt?: ?float,
@@ -163,6 +170,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'];
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->passwordProtected = $values['passwordProtected'];
diff --git a/src/Types/SharesCreate200ResponseShare.php b/src/Types/SharesCreate200ResponseShare.php
index ebd995a7..d696ec1a 100644
--- a/src/Types/SharesCreate200ResponseShare.php
+++ b/src/Types/SharesCreate200ResponseShare.php
@@ -56,6 +56,12 @@ class SharesCreate200ResponseShare extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesCreate200ResponseShareVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -146,6 +152,7 @@ class SharesCreate200ResponseShare extends JsonSerializableType
* layerName?: ?string,
* visitorIdleSeconds?: ?float,
* visitorIdentity?: ?SharesCreate200ResponseShareVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* archivedAt?: ?float,
* expiresAt?: ?float,
@@ -163,6 +170,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'];
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->passwordProtected = $values['passwordProtected'];
diff --git a/src/Types/SharesGet200ResponseShare.php b/src/Types/SharesGet200ResponseShare.php
index ba6ecc19..15ea2304 100644
--- a/src/Types/SharesGet200ResponseShare.php
+++ b/src/Types/SharesGet200ResponseShare.php
@@ -56,6 +56,12 @@ class SharesGet200ResponseShare extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesGet200ResponseShareVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -146,6 +152,7 @@ class SharesGet200ResponseShare extends JsonSerializableType
* layerName?: ?string,
* visitorIdleSeconds?: ?float,
* visitorIdentity?: ?SharesGet200ResponseShareVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* archivedAt?: ?float,
* expiresAt?: ?float,
@@ -163,6 +170,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'];
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->passwordProtected = $values['passwordProtected'];
diff --git a/src/Types/SharesList200ResponseSharesItem.php b/src/Types/SharesList200ResponseSharesItem.php
index 1ea9d19c..abd8621d 100644
--- a/src/Types/SharesList200ResponseSharesItem.php
+++ b/src/Types/SharesList200ResponseSharesItem.php
@@ -56,6 +56,12 @@ class SharesList200ResponseSharesItem extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesList200ResponseSharesItemVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -146,6 +152,7 @@ class SharesList200ResponseSharesItem extends JsonSerializableType
* layerName?: ?string,
* visitorIdleSeconds?: ?float,
* visitorIdentity?: ?SharesList200ResponseSharesItemVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* archivedAt?: ?float,
* expiresAt?: ?float,
@@ -163,6 +170,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'];
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->passwordProtected = $values['passwordProtected'];
diff --git a/src/Types/SharesUpdate200ResponseShare.php b/src/Types/SharesUpdate200ResponseShare.php
index 5f54c469..85d72599 100644
--- a/src/Types/SharesUpdate200ResponseShare.php
+++ b/src/Types/SharesUpdate200ResponseShare.php
@@ -56,6 +56,12 @@ class SharesUpdate200ResponseShare extends JsonSerializableType
#[JsonProperty('visitorIdentity')]
public ?SharesUpdate200ResponseShareVisitorIdentity $visitorIdentity;
+ /**
+ * @var ?Identity $identity
+ */
+ #[JsonProperty('identity')]
+ public ?Identity $identity;
+
/**
* @var array $scope
*/
@@ -146,6 +152,7 @@ class SharesUpdate200ResponseShare extends JsonSerializableType
* layerName?: ?string,
* visitorIdleSeconds?: ?float,
* visitorIdentity?: ?SharesUpdate200ResponseShareVisitorIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* archivedAt?: ?float,
* expiresAt?: ?float,
@@ -163,6 +170,7 @@ public function __construct(
$this->keepVisitorLayers = $values['keepVisitorLayers'];
$this->visitorIdleSeconds = $values['visitorIdleSeconds'] ?? null;
$this->visitorIdentity = $values['visitorIdentity'] ?? null;
+ $this->identity = $values['identity'] ?? null;
$this->scope = $values['scope'];
$this->origins = $values['origins'] ?? null;
$this->passwordProtected = $values['passwordProtected'];
diff --git a/src/Types/TokensIssueRequestDoc.php b/src/Types/TokensIssueRequestDoc.php
index c7c28a67..b0f33c0f 100644
--- a/src/Types/TokensIssueRequestDoc.php
+++ b/src/Types/TokensIssueRequestDoc.php
@@ -33,10 +33,10 @@ class TokensIssueRequestDoc extends JsonSerializableType
public array $scope;
/**
- * @var ?TokensIssueRequestDocIdentity $identity
+ * @var ?Identity $identity
*/
#[JsonProperty('identity')]
- public ?TokensIssueRequestDocIdentity $identity;
+ public ?Identity $identity;
/**
* @var ?array $origins
@@ -57,7 +57,7 @@ class TokensIssueRequestDoc extends JsonSerializableType
* scope: array,
* expiresIn: int,
* layerName?: ?string,
- * identity?: ?TokensIssueRequestDocIdentity,
+ * identity?: ?Identity,
* origins?: ?array,
* } $values
*/
diff --git a/src/Types/TokensIssueRequestTenant.php b/src/Types/TokensIssueRequestTenant.php
index 6be9bd00..195abd10 100644
--- a/src/Types/TokensIssueRequestTenant.php
+++ b/src/Types/TokensIssueRequestTenant.php
@@ -15,10 +15,7 @@ class TokensIssueRequestTenant extends JsonSerializableType
public string $sub;
/**
- * @var array<(
- * value-of
- * |value-of
- * )> $scope
+ * @var array $scope
*/
#[JsonProperty('scope'), ArrayType(['string'])]
public array $scope;
@@ -32,10 +29,7 @@ class TokensIssueRequestTenant extends JsonSerializableType
/**
* @param array{
* sub: string,
- * scope: array<(
- * value-of
- * |value-of
- * )>,
+ * scope: array,
* expiresIn: int,
* } $values
*/
diff --git a/src/Types/TokensIssueRequestTenantScopeItemOne.php b/src/Types/TokensIssueRequestTenantScopeItemOne.php
deleted file mode 100644
index 9b5122a3..00000000
--- a/src/Types/TokensIssueRequestTenantScopeItemOne.php
+++ /dev/null
@@ -1,13 +0,0 @@
-