diff --git a/.fern/metadata.json b/.fern/metadata.json index 1aab95e..7682e22 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -11,10 +11,10 @@ "homepage": "https://www.cloudpdf.com" } }, - "originGitCommit": "b0888bd6ca83627cb07ea05c440e35c183cebbd0", + "originGitCommit": "5f2d480665034420df58c19fd1328b0823104e0f", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0-alpha.12", + "requestedVersion": "3.0.0-alpha.13", "ciProvider": "github", - "sdkVersion": "3.0.0-alpha.12" + "sdkVersion": "3.0.0-alpha.13" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index ff8c23e..bdede2b 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "php", - "canonicalVersion": "3.0.0-next.12", - "sdkVersion": "3.0.0-alpha.12", + "canonicalVersion": "3.0.0-next.13", + "sdkVersion": "3.0.0-alpha.13", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "501ec54f2f28089dc8a3cf3a8d2ff3ade44c6c35d47977a3dfa47465fb83a049", - "gitCommit": "b0888bd6ca83627cb07ea05c440e35c183cebbd0", + "openapiSha256": "a472da9c7aed5db7f2b6b1f67f1b6268a9407afe9e7cf879ac04b878b4fc9dc7", + "gitCommit": "5f2d480665034420df58c19fd1328b0823104e0f", "gitCommitIsDirty": false }, "fern": { diff --git a/reference.md b/reference.md index 6f07775..3c05bd4 100644 --- a/reference.md +++ b/reference.md @@ -3701,3 +3701,970 @@ $client->doc->redactions->apply( +## Doc Signatures +
$client->doc->signatures->list($docId, $layerName, $request) -> ?DocSignaturesList200Response +
+
+ +#### 📝 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 + +
+
+ +
+
+ +```php +$client->doc->signatures->list( + 'docId', + 'layerName', + new ListSignaturesRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->signatures->abort($docId, $layerName, $signingId, $request) -> ?DocSignaturesAbort200Response +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->signatures->abort( + 'docId', + 'layerName', + 'signingId', + new AbortSignaturesRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$layerName:** `string` + +
+
+ +
+
+ +**$signingId:** `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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->signatures->complete($docId, $layerName, $signingId, $request) -> ?DocSignaturesComplete200Response +
+
+ +#### 📝 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`. Every layer of the document then sits over the new version; refetch the manifest after a completion. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->signatures->complete( + 'docId', + 'layerName', + 'signingId', + new DocSignaturesCompleteRequest([ + 'cms' => 'cms', + 'expectedVersion' => new DocSignaturesCompleteRequestExpectedVersion([ + 'baseSha256' => 'baseSha256', + 'editsVersion' => 1, + ]), + ]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$layerName:** `string` + +
+
+ +
+
+ +**$signingId:** `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. + +
+
+ +
+
+ +**$cms:** `string` + +
+
+ +
+
+ +**$expectedVersion:** `DocSignaturesCompleteRequestExpectedVersion` + +
+
+
+
+ + +
+
+
+ +
$client->doc->signatures->analysis($docId, $layerName, $request) -> ?DocSignaturesAnalysis200Response +
+
+ +#### 📝 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 + +
+
+ +
+
+ +```php +$client->doc->signatures->analysis( + 'docId', + 'layerName', + new AnalysisSignaturesRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$layerName:** `string` + +
+
+ +
+
+ +**$sinceSignature:** `?int` + +
+
+ +
+
+ +**$sinceRevision:** `?int` + +
+
+ +
+
+ +**$level:** `?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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->signatures->prepare($docId, $layerName, $request) -> ?DocSignaturesPrepare200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +The multipart envelope: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock, appearance) and an optional `resource:` PDF part the body's `appearance.resource` names. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer is read-only until the signing completes, is aborted, or expires (15 minutes). A layer behind the document head cannot sign (StaleBase). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->signatures->prepare( + 'docId', + 'layerName', + new PrepareSignaturesRequest([ + 'file' => File::createFromString("example_file", "example_file"), + ]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$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. + +
+
+
+
+ + +
+
+
+ +## Doc Versions +
$client->doc->versions->list($docId, $request) -> ?DocVersionsList200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Every completed signature publishes a new version. Never cached: the list grows. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->list( + 'docId', + new ListVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->analysis($docId, $sha, $request) -> ?DocVersionsAnalysis200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every layer and every caller. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->analysis( + 'docId', + 'sha', + new AnalysisVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `string` + +
+
+ +
+
+ +**$sinceSignature:** `?int` + +
+
+ +
+
+ +**$sinceRevision:** `?int` + +
+
+ +
+
+ +**$level:** `?string` + +
+
+ +
+
+ +**$until:** `?int` + +
+
+ +
+
+ +**$policy:** `?int` + +
+
+ +
+
+ +**$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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->download($docId, $sha, $request) -> string +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->download( + 'docId', + 'sha', + new DownloadVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->revision($docId, $sha, $index, $request) -> string +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->revision( + 'docId', + 'sha', + 1, + new RevisionVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `string` + +
+
+ +
+
+ +**$index:** `int` + +
+
+ +
+
+ +**$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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->signatures($docId, $sha, $request) -> ?DocVersionsSignatures200Response +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->signatures( + 'docId', + 'sha', + new SignaturesVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->signatureContents($docId, $sha, $fieldKey, $request) -> string +
+
+ +#### 📝 Description + +
+
+ +
+
+ +`fieldKey` is the field's fully qualified name, token-text encoded (the same encoding attachment keys use). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->signatureContents( + 'docId', + 'sha', + 'fieldKey', + new SignatureContentsVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `string` + +
+
+ +
+
+ +**$fieldKey:** `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. + +
+
+
+
+ + +
+
+
+ +
$client->doc->versions->signatureDigest($docId, $sha, $fieldKey, $algorithm, $request) -> string +
+
+ +#### 📝 Description + +
+
+ +
+
+ +What a CMS verifier compares its message digest to. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```php +$client->doc->versions->signatureDigest( + 'docId', + 'sha', + 'fieldKey', + SignatureDigestVersionsRequestAlgorithm::Sha1->value, + new SignatureDigestVersionsRequest([]), +); +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**$docId:** `string` + +
+
+ +
+
+ +**$sha:** `string` + +
+
+ +
+
+ +**$fieldKey:** `string` + +
+
+ +
+
+ +**$algorithm:** `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. + +
+
+
+
+ + +
+
+
+ diff --git a/src/CloudPDFClient.php b/src/CloudPDFClient.php index 1b232d4..9b0d869 100644 --- a/src/CloudPDFClient.php +++ b/src/CloudPDFClient.php @@ -76,8 +76,8 @@ public function __construct( $defaultHeaders = [ 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'CloudPDF', - 'X-Fern-SDK-Version' => '3.0.0-alpha.12', - 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.12', + 'X-Fern-SDK-Version' => '3.0.0-alpha.13', + 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.13', ]; if ($token != null) { $defaultHeaders['Authorization'] = "Bearer $token"; diff --git a/src/Doc/DocClient.php b/src/Doc/DocClient.php index 4895ba3..650aa09 100644 --- a/src/Doc/DocClient.php +++ b/src/Doc/DocClient.php @@ -7,6 +7,8 @@ use CloudPDF\Doc\Metadata\MetadataClient; use CloudPDF\Doc\Pages\PagesClient; use CloudPDF\Doc\Redactions\RedactionsClient; +use CloudPDF\Doc\Signatures\SignaturesClient; +use CloudPDF\Doc\Versions\VersionsClient; use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Requests\HeadDocRequest; @@ -51,6 +53,16 @@ class DocClient */ public RedactionsClient $redactions; + /** + * @var SignaturesClient $signatures + */ + public SignaturesClient $signatures; + + /** + * @var VersionsClient $versions + */ + public VersionsClient $versions; + /** * @var array{ * baseUrl?: string, @@ -88,6 +100,8 @@ public function __construct( $this->metadata = new MetadataClient($this->client, $this->options); $this->pages = new PagesClient($this->client, $this->options); $this->redactions = new RedactionsClient($this->client, $this->options); + $this->signatures = new SignaturesClient($this->client, $this->options); + $this->versions = new VersionsClient($this->client, $this->options); } /** diff --git a/src/Doc/Signatures/Requests/AbortSignaturesRequest.php b/src/Doc/Signatures/Requests/AbortSignaturesRequest.php new file mode 100644 index 0000000..2357253 --- /dev/null +++ b/src/Doc/Signatures/Requests/AbortSignaturesRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Signatures/Requests/AnalysisSignaturesRequest.php b/src/Doc/Signatures/Requests/AnalysisSignaturesRequest.php new file mode 100644 index 0000000..751c90e --- /dev/null +++ b/src/Doc/Signatures/Requests/AnalysisSignaturesRequest.php @@ -0,0 +1,46 @@ + $level + */ + public ?string $level; + + /** + * @var ?string $documentPassword 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. + */ + public ?string $documentPassword; + + /** + * @param array{ + * sinceSignature?: ?int, + * sinceRevision?: ?int, + * level?: ?value-of, + * documentPassword?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sinceSignature = $values['sinceSignature'] ?? null; + $this->sinceRevision = $values['sinceRevision'] ?? null; + $this->level = $values['level'] ?? null; + $this->documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Signatures/Requests/DocSignaturesCompleteRequest.php b/src/Doc/Signatures/Requests/DocSignaturesCompleteRequest.php new file mode 100644 index 0000000..7e7ac79 --- /dev/null +++ b/src/Doc/Signatures/Requests/DocSignaturesCompleteRequest.php @@ -0,0 +1,42 @@ +documentPassword = $values['documentPassword'] ?? null; + $this->cms = $values['cms']; + $this->expectedVersion = $values['expectedVersion']; + } +} diff --git a/src/Doc/Signatures/Requests/ListSignaturesRequest.php b/src/Doc/Signatures/Requests/ListSignaturesRequest.php new file mode 100644 index 0000000..04488d3 --- /dev/null +++ b/src/Doc/Signatures/Requests/ListSignaturesRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Signatures/Requests/PrepareSignaturesRequest.php b/src/Doc/Signatures/Requests/PrepareSignaturesRequest.php new file mode 100644 index 0000000..2b27e78 --- /dev/null +++ b/src/Doc/Signatures/Requests/PrepareSignaturesRequest.php @@ -0,0 +1,32 @@ +documentPassword = $values['documentPassword'] ?? null; + $this->file = $values['file']; + } +} diff --git a/src/Doc/Signatures/SignaturesClient.php b/src/Doc/Signatures/SignaturesClient.php new file mode 100644 index 0000000..9700a06 --- /dev/null +++ b/src/Doc/Signatures/SignaturesClient.php @@ -0,0 +1,405 @@ +, + * } $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 ?? []; + } + + /** + * 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. + * + * Example: + * ```php + * $client->doc->signatures->list( + * 'docId', + * 'layerName', + * new ListSignaturesRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $layerName + * @param ListSignaturesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocSignaturesList200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function list(string $docId, string $layerName, ListSignaturesRequest $request = new ListSignaturesRequest(), ?array $options = null): ?DocSignaturesList200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/layers/{$layerName}/signatures", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocSignaturesList200Response::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->doc->signatures->abort( + * 'docId', + * 'layerName', + * 'signingId', + * new AbortSignaturesRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $layerName + * @param string $signingId + * @param AbortSignaturesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocSignaturesAbort200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function abort(string $docId, string $layerName, string $signingId, AbortSignaturesRequest $request = new AbortSignaturesRequest(), ?array $options = null): ?DocSignaturesAbort200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/layers/{$layerName}/signatures/{$signingId}", + method: HttpMethod::DELETE, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocSignaturesAbort200Response::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(), + ); + } + + /** + * `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. + * + * Example: + * ```php + * $client->doc->signatures->complete( + * 'docId', + * 'layerName', + * 'signingId', + * new DocSignaturesCompleteRequest([ + * 'cms' => 'cms', + * 'expectedVersion' => new DocSignaturesCompleteRequestExpectedVersion([ + * 'baseSha256' => 'baseSha256', + * 'editsVersion' => 1, + * ]), + * ]), + * ); + * ``` + * + * @param string $docId + * @param string $layerName + * @param string $signingId + * @param DocSignaturesCompleteRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocSignaturesComplete200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function complete(string $docId, string $layerName, string $signingId, DocSignaturesCompleteRequest $request, ?array $options = null): ?DocSignaturesComplete200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/layers/{$layerName}/signatures/{$signingId}/complete", + method: HttpMethod::POST, + headers: $headers, + body: $request, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocSignaturesComplete200Response::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(), + ); + } + + /** + * 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. + * + * Example: + * ```php + * $client->doc->signatures->analysis( + * 'docId', + * 'layerName', + * new AnalysisSignaturesRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $layerName + * @param AnalysisSignaturesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocSignaturesAnalysis200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function analysis(string $docId, string $layerName, AnalysisSignaturesRequest $request = new AnalysisSignaturesRequest(), ?array $options = null): ?DocSignaturesAnalysis200Response + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sinceSignature != null) { + $query['since.signature'] = $request->sinceSignature; + } + if ($request->sinceRevision != null) { + $query['since.revision'] = $request->sinceRevision; + } + if ($request->level != null) { + $query['level'] = $request->level; + } + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/layers/{$layerName}/signatures/analysis", + method: HttpMethod::GET, + headers: $headers, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocSignaturesAnalysis200Response::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(), + ); + } + + /** + * The multipart envelope: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock, appearance) and an optional `resource:` PDF part the body's `appearance.resource` names. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer is read-only until the signing completes, is aborted, or expires (15 minutes). A layer behind the document head cannot sign (StaleBase). + * + * Example: + * ```php + * $client->doc->signatures->prepare( + * 'docId', + * 'layerName', + * new PrepareSignaturesRequest([ + * 'file' => File::createFromString("example_file", "example_file"), + * ]), + * ); + * ``` + * + * @param string $docId + * @param string $layerName + * @param PrepareSignaturesRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * } $options + * @return ?DocSignaturesPrepare200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function prepare(string $docId, string $layerName, PrepareSignaturesRequest $request, ?array $options = null): ?DocSignaturesPrepare200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + $body = new MultipartFormData(); + $body->addPart($request->file->toMultipartFormDataPart('file')); + try { + $response = $this->client->sendRequest( + new MultipartApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/layers/{$layerName}/signatures/prepare", + method: HttpMethod::POST, + headers: $headers, + body: $body, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocSignaturesPrepare200Response::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(), + ); + } +} diff --git a/src/Doc/Signatures/Types/AnalysisSignaturesRequestLevel.php b/src/Doc/Signatures/Types/AnalysisSignaturesRequestLevel.php new file mode 100644 index 0000000..1c35d6e --- /dev/null +++ b/src/Doc/Signatures/Types/AnalysisSignaturesRequestLevel.php @@ -0,0 +1,11 @@ +baseSha256 = $values['baseSha256']; + $this->editsVersion = $values['editsVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Doc/Versions/Requests/AnalysisVersionsRequest.php b/src/Doc/Versions/Requests/AnalysisVersionsRequest.php new file mode 100644 index 0000000..1ae89bb --- /dev/null +++ b/src/Doc/Versions/Requests/AnalysisVersionsRequest.php @@ -0,0 +1,60 @@ + $level + */ + public ?string $level; + + /** + * @var ?int $until + */ + public ?int $until; + + /** + * @var ?int $policy + */ + public ?int $policy; + + /** + * @var ?string $documentPassword 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. + */ + public ?string $documentPassword; + + /** + * @param array{ + * sinceSignature?: ?int, + * sinceRevision?: ?int, + * level?: ?value-of, + * until?: ?int, + * policy?: ?int, + * documentPassword?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->sinceSignature = $values['sinceSignature'] ?? null; + $this->sinceRevision = $values['sinceRevision'] ?? null; + $this->level = $values['level'] ?? null; + $this->until = $values['until'] ?? null; + $this->policy = $values['policy'] ?? null; + $this->documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/DownloadVersionsRequest.php b/src/Doc/Versions/Requests/DownloadVersionsRequest.php new file mode 100644 index 0000000..a1c2b3a --- /dev/null +++ b/src/Doc/Versions/Requests/DownloadVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/ListVersionsRequest.php b/src/Doc/Versions/Requests/ListVersionsRequest.php new file mode 100644 index 0000000..87ec5e8 --- /dev/null +++ b/src/Doc/Versions/Requests/ListVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/RevisionVersionsRequest.php b/src/Doc/Versions/Requests/RevisionVersionsRequest.php new file mode 100644 index 0000000..dddda8e --- /dev/null +++ b/src/Doc/Versions/Requests/RevisionVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/SignatureContentsVersionsRequest.php b/src/Doc/Versions/Requests/SignatureContentsVersionsRequest.php new file mode 100644 index 0000000..907b771 --- /dev/null +++ b/src/Doc/Versions/Requests/SignatureContentsVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/SignatureDigestVersionsRequest.php b/src/Doc/Versions/Requests/SignatureDigestVersionsRequest.php new file mode 100644 index 0000000..986ab25 --- /dev/null +++ b/src/Doc/Versions/Requests/SignatureDigestVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Requests/SignaturesVersionsRequest.php b/src/Doc/Versions/Requests/SignaturesVersionsRequest.php new file mode 100644 index 0000000..5553d64 --- /dev/null +++ b/src/Doc/Versions/Requests/SignaturesVersionsRequest.php @@ -0,0 +1,24 @@ +documentPassword = $values['documentPassword'] ?? null; + } +} diff --git a/src/Doc/Versions/Types/AnalysisVersionsRequestLevel.php b/src/Doc/Versions/Types/AnalysisVersionsRequestLevel.php new file mode 100644 index 0000000..4f8f41f --- /dev/null +++ b/src/Doc/Versions/Types/AnalysisVersionsRequestLevel.php @@ -0,0 +1,11 @@ +, + * } $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 ?? []; + } + + /** + * Every completed signature publishes a new version. Never cached: the list grows. + * + * Example: + * ```php + * $client->doc->versions->list( + * 'docId', + * new ListVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param ListVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocVersionsList200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function list(string $docId, ListVersionsRequest $request = new ListVersionsRequest(), ?array $options = null): ?DocVersionsList200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocVersionsList200Response::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(), + ); + } + + /** + * Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every layer and every caller. + * + * Example: + * ```php + * $client->doc->versions->analysis( + * 'docId', + * 'sha', + * new AnalysisVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param AnalysisVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocVersionsAnalysis200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function analysis(string $docId, string $sha, AnalysisVersionsRequest $request = new AnalysisVersionsRequest(), ?array $options = null): ?DocVersionsAnalysis200Response + { + $options = array_merge($this->options, $options ?? []); + $query = []; + if ($request->sinceSignature != null) { + $query['since.signature'] = $request->sinceSignature; + } + if ($request->sinceRevision != null) { + $query['since.revision'] = $request->sinceRevision; + } + if ($request->level != null) { + $query['level'] = $request->level; + } + if ($request->until != null) { + $query['until'] = $request->until; + } + if ($request->policy != null) { + $query['policy'] = $request->policy; + } + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/analysis/{$sha}", + method: HttpMethod::GET, + headers: $headers, + query: $query, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocVersionsAnalysis200Response::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->doc->versions->download( + * 'docId', + * 'sha', + * new DownloadVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param DownloadVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function download(string $docId, string $sha, DownloadVersionsRequest $request = new DownloadVersionsRequest(), ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/download/{$sha}", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return $response->getBody()->getContents(); + } + } 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->doc->versions->revision( + * 'docId', + * 'sha', + * 1, + * new RevisionVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param int $index + * @param RevisionVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function revision(string $docId, string $sha, int $index, RevisionVersionsRequest $request = new RevisionVersionsRequest(), ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/revisions/{$sha}/{$index}", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return $response->getBody()->getContents(); + } + } 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->doc->versions->signatures( + * 'docId', + * 'sha', + * new SignaturesVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param SignaturesVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return ?DocVersionsSignatures200Response + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function signatures(string $docId, string $sha, SignaturesVersionsRequest $request = new SignaturesVersionsRequest(), ?array $options = null): ?DocVersionsSignatures200Response + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/signatures/{$sha}", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + $json = $response->getBody()->getContents(); + if (empty($json)) { + return null; + } + return DocVersionsSignatures200Response::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(), + ); + } + + /** + * `fieldKey` is the field's fully qualified name, token-text encoded (the same encoding attachment keys use). + * + * Example: + * ```php + * $client->doc->versions->signatureContents( + * 'docId', + * 'sha', + * 'fieldKey', + * new SignatureContentsVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param string $fieldKey + * @param SignatureContentsVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function signatureContents(string $docId, string $sha, string $fieldKey, SignatureContentsVersionsRequest $request = new SignatureContentsVersionsRequest(), ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/signatures/{$sha}/{$fieldKey}/contents", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return $response->getBody()->getContents(); + } + } catch (ClientExceptionInterface $e) { + throw new CloudPDFException(message: $e->getMessage(), previous: $e); + } + throw new CloudPDFApiException( + message: 'API request failed', + statusCode: $statusCode, + body: $response->getBody()->getContents(), + ); + } + + /** + * What a CMS verifier compares its message digest to. + * + * Example: + * ```php + * $client->doc->versions->signatureDigest( + * 'docId', + * 'sha', + * 'fieldKey', + * SignatureDigestVersionsRequestAlgorithm::Sha1->value, + * new SignatureDigestVersionsRequest([]), + * ); + * ``` + * + * @param string $docId + * @param string $sha + * @param string $fieldKey + * @param value-of $algorithm + * @param SignatureDigestVersionsRequest $request + * @param ?array{ + * baseUrl?: string, + * maxRetries?: int, + * timeout?: float, + * headers?: array, + * queryParameters?: array, + * bodyProperties?: array, + * } $options + * @return string + * @throws CloudPDFException + * @throws CloudPDFApiException + */ + public function signatureDigest(string $docId, string $sha, string $fieldKey, string $algorithm, SignatureDigestVersionsRequest $request = new SignatureDigestVersionsRequest(), ?array $options = null): string + { + $options = array_merge($this->options, $options ?? []); + $headers = []; + if ($request->documentPassword != null) { + $headers['X-Document-Password'] = $request->documentPassword; + } + try { + $response = $this->client->sendRequest( + new JsonApiRequest( + baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? '', + path: "v1/docs/{$docId}/versions/signatures/{$sha}/{$fieldKey}/digest/{$algorithm}", + method: HttpMethod::GET, + headers: $headers, + ), + $options, + ); + $statusCode = $response->getStatusCode(); + if ($statusCode >= 200 && $statusCode < 400) { + return $response->getBody()->getContents(); + } + } 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/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.php b/src/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.php index d40ee62..a892012 100644 --- a/src/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.php +++ b/src/Types/DocAnnotationsCreate200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocAnnotationsCreate200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocAnnotationsCreate200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocAnnotationsCreate400ResponseCode.php b/src/Types/DocAnnotationsCreate400ResponseCode.php index 56dda25..69bcfee 100644 --- a/src/Types/DocAnnotationsCreate400ResponseCode.php +++ b/src/Types/DocAnnotationsCreate400ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsCreate400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsCreate404ResponseCode.php b/src/Types/DocAnnotationsCreate404ResponseCode.php index b67c5aa..17c06c5 100644 --- a/src/Types/DocAnnotationsCreate404ResponseCode.php +++ b/src/Types/DocAnnotationsCreate404ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsCreate404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.php b/src/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.php index 1274044..5094b35 100644 --- a/src/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.php +++ b/src/Types/DocAnnotationsDelete200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocAnnotationsDelete200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocAnnotationsDelete200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocAnnotationsDelete404ResponseCode.php b/src/Types/DocAnnotationsDelete404ResponseCode.php index 08ac775..5e9c989 100644 --- a/src/Types/DocAnnotationsDelete404ResponseCode.php +++ b/src/Types/DocAnnotationsDelete404ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsDelete404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsExportAppearance400ResponseCode.php b/src/Types/DocAnnotationsExportAppearance400ResponseCode.php index 8fc77c6..66b819b 100644 --- a/src/Types/DocAnnotationsExportAppearance400ResponseCode.php +++ b/src/Types/DocAnnotationsExportAppearance400ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsExportAppearance400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsExportAppearance404ResponseCode.php b/src/Types/DocAnnotationsExportAppearance404ResponseCode.php index 395e061..4b9af57 100644 --- a/src/Types/DocAnnotationsExportAppearance404ResponseCode.php +++ b/src/Types/DocAnnotationsExportAppearance404ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsExportAppearance404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsFlatten200ResponseMetaCacheDelta.php b/src/Types/DocAnnotationsFlatten200ResponseMetaCacheDelta.php index 5217ccf..001769c 100644 --- a/src/Types/DocAnnotationsFlatten200ResponseMetaCacheDelta.php +++ b/src/Types/DocAnnotationsFlatten200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocAnnotationsFlatten200ResponseMetaCacheDelta extends JsonSerializableTyp #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocAnnotationsFlatten200ResponseMetaCacheDelta extends JsonSerializableTyp * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocAnnotationsFlatten400ResponseCode.php b/src/Types/DocAnnotationsFlatten400ResponseCode.php index 4239896..0a6f81c 100644 --- a/src/Types/DocAnnotationsFlatten400ResponseCode.php +++ b/src/Types/DocAnnotationsFlatten400ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsFlatten400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsFlatten404ResponseCode.php b/src/Types/DocAnnotationsFlatten404ResponseCode.php index 8651012..6f175ce 100644 --- a/src/Types/DocAnnotationsFlatten404ResponseCode.php +++ b/src/Types/DocAnnotationsFlatten404ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsFlatten404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.php index 161b08c..91bac20 100644 --- a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.php +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeText.php @@ -137,7 +137,7 @@ class DocAnnotationsList200ResponseAnnotationsItemFreeText extends JsonSerializa public string $intent; /** - * @var value-of $fontFamily + * @var string $fontFamily */ #[JsonProperty('fontFamily')] public string $fontFamily; @@ -154,6 +154,12 @@ class DocAnnotationsList200ResponseAnnotationsItemFreeText extends JsonSerializa #[JsonProperty('textAlign')] public string $textAlign; + /** + * @var DocAnnotationsList200ResponseAnnotationsItemFreeTextRichText $richText + */ + #[JsonProperty('richText')] + public DocAnnotationsList200ResponseAnnotationsItemFreeTextRichText $richText; + /** * @var DocAnnotationsList200ResponseAnnotationsItemFreeTextColor $color */ @@ -236,9 +242,10 @@ class DocAnnotationsList200ResponseAnnotationsItemFreeText extends JsonSerializa * rect: DocAnnotationsList200ResponseAnnotationsItemFreeTextRect, * blendMode: value-of, * intent: value-of, - * fontFamily: value-of, + * fontFamily: string, * fontSize: float, * textAlign: value-of, + * richText: DocAnnotationsList200ResponseAnnotationsItemFreeTextRichText, * color: DocAnnotationsList200ResponseAnnotationsItemFreeTextColor, * opacity: float, * strokeWidth: float, @@ -293,6 +300,7 @@ public function __construct( $this->fontFamily = $values['fontFamily']; $this->fontSize = $values['fontSize']; $this->textAlign = $values['textAlign']; + $this->richText = $values['richText']; $this->color = $values['color']; $this->fontColor = $values['fontColor'] ?? null; $this->interiorColor = $values['interiorColor'] ?? null; diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextFontFamily.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextFontFamily.php deleted file mode 100644 index 72be236..0000000 --- a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextFontFamily.php +++ /dev/null @@ -1,21 +0,0 @@ - $paragraphs + */ + #[JsonProperty('paragraphs'), ArrayType([DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItem::class])] + public array $paragraphs; + + /** + * @param array{ + * body: DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBody, + * paragraphs: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->body = $values['body']; + $this->paragraphs = $values['paragraphs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBody.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBody.php new file mode 100644 index 0000000..4bf021e --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBody.php @@ -0,0 +1,147 @@ +> $decoration + */ + #[JsonProperty('decoration'), ArrayType(['string'])] + public array $decoration; + + /** + * @var value-of $script + */ + #[JsonProperty('script')] + public string $script; + + /** + * @var float $letterSpacing + */ + #[JsonProperty('letterSpacing')] + public float $letterSpacing; + + /** + * @var float $horizontalScale + */ + #[JsonProperty('horizontalScale')] + public float $horizontalScale; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @var value-of $align + */ + #[JsonProperty('align')] + public string $align; + + /** + * @var value-of $dir + */ + #[JsonProperty('dir')] + public string $dir; + + /** + * @var ?float $lineHeight + */ + #[JsonProperty('lineHeight')] + public ?float $lineHeight; + + /** + * @var ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyMargins $margins + */ + #[JsonProperty('margins')] + public ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyMargins $margins; + + /** + * @var ?float $textIndent + */ + #[JsonProperty('textIndent')] + public ?float $textIndent; + + /** + * @param array{ + * family: string, + * weight: int, + * italic: bool, + * size: float, + * color: string, + * decoration: array>, + * script: value-of, + * letterSpacing: float, + * horizontalScale: float, + * align: value-of, + * dir: value-of, + * unknown?: ?string, + * lineHeight?: ?float, + * margins?: ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyMargins, + * textIndent?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->family = $values['family']; + $this->weight = $values['weight']; + $this->italic = $values['italic']; + $this->size = $values['size']; + $this->color = $values['color']; + $this->decoration = $values['decoration']; + $this->script = $values['script']; + $this->letterSpacing = $values['letterSpacing']; + $this->horizontalScale = $values['horizontalScale']; + $this->unknown = $values['unknown'] ?? null; + $this->align = $values['align']; + $this->dir = $values['dir']; + $this->lineHeight = $values['lineHeight'] ?? null; + $this->margins = $values['margins'] ?? null; + $this->textIndent = $values['textIndent'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyAlign.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyAlign.php new file mode 100644 index 0000000..bd62726 --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyAlign.php @@ -0,0 +1,11 @@ +top = $values['top']; + $this->bottom = $values['bottom']; + $this->left = $values['left']; + $this->right = $values['right']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyScript.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyScript.php new file mode 100644 index 0000000..76e15f7 --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextBodyScript.php @@ -0,0 +1,10 @@ + $align + */ + #[JsonProperty('align')] + public ?string $align; + + /** + * @var ?value-of $dir + */ + #[JsonProperty('dir')] + public ?string $dir; + + /** + * @var ?float $lineHeight + */ + #[JsonProperty('lineHeight')] + public ?float $lineHeight; + + /** + * @var ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemMargins $margins + */ + #[JsonProperty('margins')] + public ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemMargins $margins; + + /** + * @var ?float $textIndent + */ + #[JsonProperty('textIndent')] + public ?float $textIndent; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @var array $runs + */ + #[JsonProperty('runs'), ArrayType([DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItem::class])] + public array $runs; + + /** + * @param array{ + * runs: array, + * align?: ?value-of, + * dir?: ?value-of, + * lineHeight?: ?float, + * margins?: ?DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemMargins, + * textIndent?: ?float, + * unknown?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->align = $values['align'] ?? null; + $this->dir = $values['dir'] ?? null; + $this->lineHeight = $values['lineHeight'] ?? null; + $this->margins = $values['margins'] ?? null; + $this->textIndent = $values['textIndent'] ?? null; + $this->unknown = $values['unknown'] ?? null; + $this->runs = $values['runs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemAlign.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemAlign.php new file mode 100644 index 0000000..e3612df --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemAlign.php @@ -0,0 +1,11 @@ +top = $values['top']; + $this->bottom = $values['bottom']; + $this->left = $values['left']; + $this->right = $values['right']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php new file mode 100644 index 0000000..be6828e --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php @@ -0,0 +1,42 @@ +text = $values['text']; + $this->style = $values['style'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php new file mode 100644 index 0000000..4e226c2 --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php @@ -0,0 +1,107 @@ +> $decoration + */ + #[JsonProperty('decoration'), ArrayType(['string'])] + public ?array $decoration; + + /** + * @var ?value-of $script + */ + #[JsonProperty('script')] + public ?string $script; + + /** + * @var ?float $letterSpacing + */ + #[JsonProperty('letterSpacing')] + public ?float $letterSpacing; + + /** + * @var ?float $horizontalScale + */ + #[JsonProperty('horizontalScale')] + public ?float $horizontalScale; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @param array{ + * family?: ?string, + * weight?: ?int, + * italic?: ?bool, + * size?: ?float, + * color?: ?string, + * decoration?: ?array>, + * script?: ?value-of, + * letterSpacing?: ?float, + * horizontalScale?: ?float, + * unknown?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->family = $values['family'] ?? null; + $this->weight = $values['weight'] ?? null; + $this->italic = $values['italic'] ?? null; + $this->size = $values['size'] ?? null; + $this->color = $values['color'] ?? null; + $this->decoration = $values['decoration'] ?? null; + $this->script = $values['script'] ?? null; + $this->letterSpacing = $values['letterSpacing'] ?? null; + $this->horizontalScale = $values['horizontalScale'] ?? null; + $this->unknown = $values['unknown'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php new file mode 100644 index 0000000..17cfb24 --- /dev/null +++ b/src/Types/DocAnnotationsList200ResponseAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php @@ -0,0 +1,10 @@ + $fontFamily + * @var string $fontFamily */ #[JsonProperty('fontFamily')] public string $fontFamily; @@ -154,6 +154,12 @@ class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText extends J #[JsonProperty('textAlign')] public string $textAlign; + /** + * @var DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichText $richText + */ + #[JsonProperty('richText')] + public DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichText $richText; + /** * @var DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor $color */ @@ -236,9 +242,10 @@ class DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeText extends J * rect: DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRect, * blendMode: value-of, * intent: value-of, - * fontFamily: value-of, + * fontFamily: string, * fontSize: float, * textAlign: value-of, + * richText: DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichText, * color: DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextColor, * opacity: float, * strokeWidth: float, @@ -293,6 +300,7 @@ public function __construct( $this->fontFamily = $values['fontFamily']; $this->fontSize = $values['fontSize']; $this->textAlign = $values['textAlign']; + $this->richText = $values['richText']; $this->color = $values['color']; $this->fontColor = $values['fontColor'] ?? null; $this->interiorColor = $values['interiorColor'] ?? null; diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.php deleted file mode 100644 index 5702819..0000000 --- a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextFontFamily.php +++ /dev/null @@ -1,21 +0,0 @@ - $paragraphs + */ + #[JsonProperty('paragraphs'), ArrayType([DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItem::class])] + public array $paragraphs; + + /** + * @param array{ + * body: DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBody, + * paragraphs: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->body = $values['body']; + $this->paragraphs = $values['paragraphs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBody.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBody.php new file mode 100644 index 0000000..dc3c2ac --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBody.php @@ -0,0 +1,147 @@ +> $decoration + */ + #[JsonProperty('decoration'), ArrayType(['string'])] + public array $decoration; + + /** + * @var value-of $script + */ + #[JsonProperty('script')] + public string $script; + + /** + * @var float $letterSpacing + */ + #[JsonProperty('letterSpacing')] + public float $letterSpacing; + + /** + * @var float $horizontalScale + */ + #[JsonProperty('horizontalScale')] + public float $horizontalScale; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @var value-of $align + */ + #[JsonProperty('align')] + public string $align; + + /** + * @var value-of $dir + */ + #[JsonProperty('dir')] + public string $dir; + + /** + * @var ?float $lineHeight + */ + #[JsonProperty('lineHeight')] + public ?float $lineHeight; + + /** + * @var ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyMargins $margins + */ + #[JsonProperty('margins')] + public ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyMargins $margins; + + /** + * @var ?float $textIndent + */ + #[JsonProperty('textIndent')] + public ?float $textIndent; + + /** + * @param array{ + * family: string, + * weight: int, + * italic: bool, + * size: float, + * color: string, + * decoration: array>, + * script: value-of, + * letterSpacing: float, + * horizontalScale: float, + * align: value-of, + * dir: value-of, + * unknown?: ?string, + * lineHeight?: ?float, + * margins?: ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyMargins, + * textIndent?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->family = $values['family']; + $this->weight = $values['weight']; + $this->italic = $values['italic']; + $this->size = $values['size']; + $this->color = $values['color']; + $this->decoration = $values['decoration']; + $this->script = $values['script']; + $this->letterSpacing = $values['letterSpacing']; + $this->horizontalScale = $values['horizontalScale']; + $this->unknown = $values['unknown'] ?? null; + $this->align = $values['align']; + $this->dir = $values['dir']; + $this->lineHeight = $values['lineHeight'] ?? null; + $this->margins = $values['margins'] ?? null; + $this->textIndent = $values['textIndent'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyAlign.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyAlign.php new file mode 100644 index 0000000..e67105f --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyAlign.php @@ -0,0 +1,11 @@ +top = $values['top']; + $this->bottom = $values['bottom']; + $this->left = $values['left']; + $this->right = $values['right']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyScript.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyScript.php new file mode 100644 index 0000000..2162fff --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextBodyScript.php @@ -0,0 +1,10 @@ + $align + */ + #[JsonProperty('align')] + public ?string $align; + + /** + * @var ?value-of $dir + */ + #[JsonProperty('dir')] + public ?string $dir; + + /** + * @var ?float $lineHeight + */ + #[JsonProperty('lineHeight')] + public ?float $lineHeight; + + /** + * @var ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemMargins $margins + */ + #[JsonProperty('margins')] + public ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemMargins $margins; + + /** + * @var ?float $textIndent + */ + #[JsonProperty('textIndent')] + public ?float $textIndent; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @var array $runs + */ + #[JsonProperty('runs'), ArrayType([DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItem::class])] + public array $runs; + + /** + * @param array{ + * runs: array, + * align?: ?value-of, + * dir?: ?value-of, + * lineHeight?: ?float, + * margins?: ?DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemMargins, + * textIndent?: ?float, + * unknown?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->align = $values['align'] ?? null; + $this->dir = $values['dir'] ?? null; + $this->lineHeight = $values['lineHeight'] ?? null; + $this->margins = $values['margins'] ?? null; + $this->textIndent = $values['textIndent'] ?? null; + $this->unknown = $values['unknown'] ?? null; + $this->runs = $values['runs']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemAlign.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemAlign.php new file mode 100644 index 0000000..247a779 --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemAlign.php @@ -0,0 +1,11 @@ +top = $values['top']; + $this->bottom = $values['bottom']; + $this->left = $values['left']; + $this->right = $values['right']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php new file mode 100644 index 0000000..c5c2d30 --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItem.php @@ -0,0 +1,42 @@ +text = $values['text']; + $this->style = $values['style'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php new file mode 100644 index 0000000..8cbee56 --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyle.php @@ -0,0 +1,107 @@ +> $decoration + */ + #[JsonProperty('decoration'), ArrayType(['string'])] + public ?array $decoration; + + /** + * @var ?value-of $script + */ + #[JsonProperty('script')] + public ?string $script; + + /** + * @var ?float $letterSpacing + */ + #[JsonProperty('letterSpacing')] + public ?float $letterSpacing; + + /** + * @var ?float $horizontalScale + */ + #[JsonProperty('horizontalScale')] + public ?float $horizontalScale; + + /** + * @var ?string $unknown + */ + #[JsonProperty('unknown')] + public ?string $unknown; + + /** + * @param array{ + * family?: ?string, + * weight?: ?int, + * italic?: ?bool, + * size?: ?float, + * color?: ?string, + * decoration?: ?array>, + * script?: ?value-of, + * letterSpacing?: ?float, + * horizontalScale?: ?float, + * unknown?: ?string, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->family = $values['family'] ?? null; + $this->weight = $values['weight'] ?? null; + $this->italic = $values['italic'] ?? null; + $this->size = $values['size'] ?? null; + $this->color = $values['color'] ?? null; + $this->decoration = $values['decoration'] ?? null; + $this->script = $values['script'] ?? null; + $this->letterSpacing = $values['letterSpacing'] ?? null; + $this->horizontalScale = $values['horizontalScale'] ?? null; + $this->unknown = $values['unknown'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php new file mode 100644 index 0000000..fc98efb --- /dev/null +++ b/src/Types/DocAnnotationsListAll200ResponsePagesItemAnnotationsItemFreeTextRichTextParagraphsItemRunsItemStyleDecorationItem.php @@ -0,0 +1,10 @@ + $pages */ @@ -38,6 +50,8 @@ class DocAnnotationsUpdate200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocAnnotationsUpdate400ResponseCode.php b/src/Types/DocAnnotationsUpdate400ResponseCode.php index 7eb9b2f..070d8a0 100644 --- a/src/Types/DocAnnotationsUpdate400ResponseCode.php +++ b/src/Types/DocAnnotationsUpdate400ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsUpdate400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocAnnotationsUpdate404ResponseCode.php b/src/Types/DocAnnotationsUpdate404ResponseCode.php index bab0cdb..6467c3b 100644 --- a/src/Types/DocAnnotationsUpdate404ResponseCode.php +++ b/src/Types/DocAnnotationsUpdate404ResponseCode.php @@ -23,4 +23,10 @@ enum DocAnnotationsUpdate404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocDownloadResponseCode.php b/src/Types/DocDownloadResponseCode.php index 44cdb50..9d5b300 100644 --- a/src/Types/DocDownloadResponseCode.php +++ b/src/Types/DocDownloadResponseCode.php @@ -23,4 +23,10 @@ enum DocDownloadResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsExportDataResponseCode.php b/src/Types/DocFormsExportDataResponseCode.php index 38d22fb..3243519 100644 --- a/src/Types/DocFormsExportDataResponseCode.php +++ b/src/Types/DocFormsExportDataResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsExportDataResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsGet404ResponseCode.php b/src/Types/DocFormsGet404ResponseCode.php index 68a4f42..05bbe7d 100644 --- a/src/Types/DocFormsGet404ResponseCode.php +++ b/src/Types/DocFormsGet404ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsGet404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsImportData200ResponseMetaCacheDelta.php b/src/Types/DocFormsImportData200ResponseMetaCacheDelta.php index 0844d50..a3f0480 100644 --- a/src/Types/DocFormsImportData200ResponseMetaCacheDelta.php +++ b/src/Types/DocFormsImportData200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocFormsImportData200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocFormsImportData200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocFormsImportData400ResponseCode.php b/src/Types/DocFormsImportData400ResponseCode.php index 7f5bb56..ab82db8 100644 --- a/src/Types/DocFormsImportData400ResponseCode.php +++ b/src/Types/DocFormsImportData400ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsImportData400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsImportData404ResponseCode.php b/src/Types/DocFormsImportData404ResponseCode.php index 5c7159a..fec695d 100644 --- a/src/Types/DocFormsImportData404ResponseCode.php +++ b/src/Types/DocFormsImportData404ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsImportData404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsReset200ResponseMetaCacheDelta.php b/src/Types/DocFormsReset200ResponseMetaCacheDelta.php index 30eed89..f190441 100644 --- a/src/Types/DocFormsReset200ResponseMetaCacheDelta.php +++ b/src/Types/DocFormsReset200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocFormsReset200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocFormsReset200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocFormsReset404ResponseCode.php b/src/Types/DocFormsReset404ResponseCode.php index e795d46..9977c67 100644 --- a/src/Types/DocFormsReset404ResponseCode.php +++ b/src/Types/DocFormsReset404ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsReset404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsSetValue200ResponseMetaCacheDelta.php b/src/Types/DocFormsSetValue200ResponseMetaCacheDelta.php index b78b001..406413e 100644 --- a/src/Types/DocFormsSetValue200ResponseMetaCacheDelta.php +++ b/src/Types/DocFormsSetValue200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocFormsSetValue200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocFormsSetValue200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocFormsSetValue400ResponseCode.php b/src/Types/DocFormsSetValue400ResponseCode.php index 6a69bb6..19139d3 100644 --- a/src/Types/DocFormsSetValue400ResponseCode.php +++ b/src/Types/DocFormsSetValue400ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsSetValue400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocFormsSetValue404ResponseCode.php b/src/Types/DocFormsSetValue404ResponseCode.php index a0748b7..f063ec2 100644 --- a/src/Types/DocFormsSetValue404ResponseCode.php +++ b/src/Types/DocFormsSetValue404ResponseCode.php @@ -23,4 +23,10 @@ enum DocFormsSetValue404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocHead404ResponseCode.php b/src/Types/DocHead404ResponseCode.php index 14c0f8b..d02c454 100644 --- a/src/Types/DocHead404ResponseCode.php +++ b/src/Types/DocHead404ResponseCode.php @@ -23,4 +23,10 @@ enum DocHead404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocManifest200Response.php b/src/Types/DocManifest200Response.php index c75f0e6..aa8234f 100644 --- a/src/Types/DocManifest200Response.php +++ b/src/Types/DocManifest200Response.php @@ -56,6 +56,24 @@ class DocManifest200Response extends JsonSerializableType #[JsonProperty('baseSha')] public string $baseSha; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + + /** + * @var ?int $baseByteLength + */ + #[JsonProperty('baseByteLength')] + public ?int $baseByteLength; + /** * @var ?DocManifest200ResponseScopes $scopes */ @@ -79,6 +97,9 @@ class DocManifest200Response extends JsonSerializableType * actionsVersion?: ?int, * attachmentsVersion?: ?int, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, + * baseByteLength?: ?int, * scopes?: ?DocManifest200ResponseScopes, * } $values */ @@ -93,6 +114,9 @@ public function __construct( $this->annotationsVersion = $values['annotationsVersion'] ?? null; $this->auditHead = $values['auditHead']; $this->baseSha = $values['baseSha']; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; + $this->baseByteLength = $values['baseByteLength'] ?? null; $this->scopes = $values['scopes'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocManifest404ResponseCode.php b/src/Types/DocManifest404ResponseCode.php index c5d1c2e..151b4c1 100644 --- a/src/Types/DocManifest404ResponseCode.php +++ b/src/Types/DocManifest404ResponseCode.php @@ -23,4 +23,10 @@ enum DocManifest404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocMetadataGet404ResponseCode.php b/src/Types/DocMetadataGet404ResponseCode.php index 224c916..32d22b7 100644 --- a/src/Types/DocMetadataGet404ResponseCode.php +++ b/src/Types/DocMetadataGet404ResponseCode.php @@ -23,4 +23,10 @@ enum DocMetadataGet404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesDelete200ResponseMetaCacheDelta.php b/src/Types/DocPagesDelete200ResponseMetaCacheDelta.php index e7327b7..38f806f 100644 --- a/src/Types/DocPagesDelete200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesDelete200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesDelete200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesDelete200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesDelete400ResponseCode.php b/src/Types/DocPagesDelete400ResponseCode.php index a9b05a0..6b50bbb 100644 --- a/src/Types/DocPagesDelete400ResponseCode.php +++ b/src/Types/DocPagesDelete400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesDelete400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesDelete404ResponseCode.php b/src/Types/DocPagesDelete404ResponseCode.php index 2ea24f7..2e4119b 100644 --- a/src/Types/DocPagesDelete404ResponseCode.php +++ b/src/Types/DocPagesDelete404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesDelete404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesExtract400ResponseCode.php b/src/Types/DocPagesExtract400ResponseCode.php index 7f45099..f3a6b7f 100644 --- a/src/Types/DocPagesExtract400ResponseCode.php +++ b/src/Types/DocPagesExtract400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesExtract400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesExtract404ResponseCode.php b/src/Types/DocPagesExtract404ResponseCode.php index 1f6d96d..7dfd207 100644 --- a/src/Types/DocPagesExtract404ResponseCode.php +++ b/src/Types/DocPagesExtract404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesExtract404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesFlatten200ResponseMetaCacheDelta.php b/src/Types/DocPagesFlatten200ResponseMetaCacheDelta.php index 004c75c..5a744a1 100644 --- a/src/Types/DocPagesFlatten200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesFlatten200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesFlatten200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesFlatten200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesFlatten400ResponseCode.php b/src/Types/DocPagesFlatten400ResponseCode.php index 48f2a83..e30d7ea 100644 --- a/src/Types/DocPagesFlatten400ResponseCode.php +++ b/src/Types/DocPagesFlatten400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesFlatten400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesFlatten404ResponseCode.php b/src/Types/DocPagesFlatten404ResponseCode.php index ba9477b..e8e1c8c 100644 --- a/src/Types/DocPagesFlatten404ResponseCode.php +++ b/src/Types/DocPagesFlatten404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesFlatten404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesInsert200ResponseMetaCacheDelta.php b/src/Types/DocPagesInsert200ResponseMetaCacheDelta.php index d9233a3..62f36e5 100644 --- a/src/Types/DocPagesInsert200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesInsert200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesInsert200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesInsert200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesInsert400ResponseCode.php b/src/Types/DocPagesInsert400ResponseCode.php index 0b2970c..c4f355c 100644 --- a/src/Types/DocPagesInsert400ResponseCode.php +++ b/src/Types/DocPagesInsert400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesInsert400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesInsert404ResponseCode.php b/src/Types/DocPagesInsert404ResponseCode.php index 929bfb2..0401ee3 100644 --- a/src/Types/DocPagesInsert404ResponseCode.php +++ b/src/Types/DocPagesInsert404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesInsert404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.php b/src/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.php index 179f863..3ec589c 100644 --- a/src/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesInsertBlank200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesInsertBlank200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesInsertBlank200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesInsertBlank400ResponseCode.php b/src/Types/DocPagesInsertBlank400ResponseCode.php index e7920f3..f70466c 100644 --- a/src/Types/DocPagesInsertBlank400ResponseCode.php +++ b/src/Types/DocPagesInsertBlank400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesInsertBlank400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesInsertBlank404ResponseCode.php b/src/Types/DocPagesInsertBlank404ResponseCode.php index 865f265..68acbdb 100644 --- a/src/Types/DocPagesInsertBlank404ResponseCode.php +++ b/src/Types/DocPagesInsertBlank404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesInsertBlank404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesMove200ResponseMetaCacheDelta.php b/src/Types/DocPagesMove200ResponseMetaCacheDelta.php index ee47bb4..fe3c215 100644 --- a/src/Types/DocPagesMove200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesMove200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesMove200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesMove200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesMove400ResponseCode.php b/src/Types/DocPagesMove400ResponseCode.php index 32a4ebf..7226c0f 100644 --- a/src/Types/DocPagesMove400ResponseCode.php +++ b/src/Types/DocPagesMove400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesMove400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesMove404ResponseCode.php b/src/Types/DocPagesMove404ResponseCode.php index 0ef7a42..15d3a80 100644 --- a/src/Types/DocPagesMove404ResponseCode.php +++ b/src/Types/DocPagesMove404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesMove404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesRemoveName200ResponseMetaCacheDelta.php b/src/Types/DocPagesRemoveName200ResponseMetaCacheDelta.php index 0f20bc2..9b5bcd6 100644 --- a/src/Types/DocPagesRemoveName200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesRemoveName200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesRemoveName200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesRemoveName200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesRemoveName400ResponseCode.php b/src/Types/DocPagesRemoveName400ResponseCode.php index 99e6755..2c729cb 100644 --- a/src/Types/DocPagesRemoveName400ResponseCode.php +++ b/src/Types/DocPagesRemoveName400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesRemoveName400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesRemoveName404ResponseCode.php b/src/Types/DocPagesRemoveName404ResponseCode.php index 2922aad..35a3fbc 100644 --- a/src/Types/DocPagesRemoveName404ResponseCode.php +++ b/src/Types/DocPagesRemoveName404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesRemoveName404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesRotate200ResponseMetaCacheDelta.php b/src/Types/DocPagesRotate200ResponseMetaCacheDelta.php index 1df186f..91c8cfd 100644 --- a/src/Types/DocPagesRotate200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesRotate200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesRotate200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesRotate200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesRotate400ResponseCode.php b/src/Types/DocPagesRotate400ResponseCode.php index 97cc26f..934863e 100644 --- a/src/Types/DocPagesRotate400ResponseCode.php +++ b/src/Types/DocPagesRotate400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesRotate400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesRotate404ResponseCode.php b/src/Types/DocPagesRotate404ResponseCode.php index 6d192cc..65c8243 100644 --- a/src/Types/DocPagesRotate404ResponseCode.php +++ b/src/Types/DocPagesRotate404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesRotate404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesSetName200ResponseMetaCacheDelta.php b/src/Types/DocPagesSetName200ResponseMetaCacheDelta.php index 03d8ebd..9b9b0dd 100644 --- a/src/Types/DocPagesSetName200ResponseMetaCacheDelta.php +++ b/src/Types/DocPagesSetName200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocPagesSetName200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocPagesSetName200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocPagesSetName400ResponseCode.php b/src/Types/DocPagesSetName400ResponseCode.php index c1393e6..f1ced27 100644 --- a/src/Types/DocPagesSetName400ResponseCode.php +++ b/src/Types/DocPagesSetName400ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesSetName400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocPagesSetName404ResponseCode.php b/src/Types/DocPagesSetName404ResponseCode.php index 7ffdb06..9ae37ff 100644 --- a/src/Types/DocPagesSetName404ResponseCode.php +++ b/src/Types/DocPagesSetName404ResponseCode.php @@ -23,4 +23,10 @@ enum DocPagesSetName404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocRedactionsApply200ResponseMetaCacheDelta.php b/src/Types/DocRedactionsApply200ResponseMetaCacheDelta.php index fb488b6..f8d3aa7 100644 --- a/src/Types/DocRedactionsApply200ResponseMetaCacheDelta.php +++ b/src/Types/DocRedactionsApply200ResponseMetaCacheDelta.php @@ -26,6 +26,18 @@ class DocRedactionsApply200ResponseMetaCacheDelta extends JsonSerializableType #[JsonProperty('annotationsVersion')] public ?int $annotationsVersion; + /** + * @var ?int $layerVersion + */ + #[JsonProperty('layerVersion')] + public ?int $layerVersion; + + /** + * @var ?bool $working + */ + #[JsonProperty('working')] + public ?bool $working; + /** * @var array $pages */ @@ -38,6 +50,8 @@ class DocRedactionsApply200ResponseMetaCacheDelta extends JsonSerializableType * docVersion: int, * pages: array, * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, * } $values */ public function __construct( @@ -46,6 +60,8 @@ public function __construct( $this->previousDocVersion = $values['previousDocVersion']; $this->docVersion = $values['docVersion']; $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; $this->pages = $values['pages']; } diff --git a/src/Types/DocRedactionsApply400ResponseCode.php b/src/Types/DocRedactionsApply400ResponseCode.php index a950827..ecdbc11 100644 --- a/src/Types/DocRedactionsApply400ResponseCode.php +++ b/src/Types/DocRedactionsApply400ResponseCode.php @@ -23,4 +23,10 @@ enum DocRedactionsApply400ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocRedactionsApply404ResponseCode.php b/src/Types/DocRedactionsApply404ResponseCode.php index 8becd94..29120bb 100644 --- a/src/Types/DocRedactionsApply404ResponseCode.php +++ b/src/Types/DocRedactionsApply404ResponseCode.php @@ -23,4 +23,10 @@ enum DocRedactionsApply404ResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocRenderResponseCode.php b/src/Types/DocRenderResponseCode.php index 715a557..6afb051 100644 --- a/src/Types/DocRenderResponseCode.php +++ b/src/Types/DocRenderResponseCode.php @@ -23,4 +23,10 @@ enum DocRenderResponseCode: string case LayerVersionConflict = "LayerVersionConflict"; case NotImplemented = "NotImplemented"; case MalformedPdf = "MalformedPdf"; + case SigningPending = "SigningPending"; + case SigningExpired = "SigningExpired"; + case SigningVersionMismatch = "SigningVersionMismatch"; + case SignatureRefused = "SignatureRefused"; + case ProtectedDocument = "ProtectedDocument"; + case StaleBase = "StaleBase"; } diff --git a/src/Types/DocSignaturesAbort200Response.php b/src/Types/DocSignaturesAbort200Response.php new file mode 100644 index 0000000..0965d85 --- /dev/null +++ b/src/Types/DocSignaturesAbort200Response.php @@ -0,0 +1,34 @@ + $status + */ + #[JsonProperty('status')] + public string $status; + + /** + * @param array{ + * status: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->status = $values['status']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAbort200ResponseStatus.php b/src/Types/DocSignaturesAbort200ResponseStatus.php new file mode 100644 index 0000000..095e6b4 --- /dev/null +++ b/src/Types/DocSignaturesAbort200ResponseStatus.php @@ -0,0 +1,10 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAbort404ResponseCode.php b/src/Types/DocSignaturesAbort404ResponseCode.php new file mode 100644 index 0000000..b0f1ecd --- /dev/null +++ b/src/Types/DocSignaturesAbort404ResponseCode.php @@ -0,0 +1,32 @@ + $mode + */ + #[JsonProperty('mode')] + public string $mode; + + /** + * @var int $policyVersion + */ + #[JsonProperty('policyVersion')] + public int $policyVersion; + + /** + * @var DocSignaturesAnalysis200ResponseBasis $basis + */ + #[JsonProperty('basis')] + public DocSignaturesAnalysis200ResponseBasis $basis; + + /** + * @var DocSignaturesAnalysis200ResponseSince $since + */ + #[JsonProperty('since')] + public DocSignaturesAnalysis200ResponseSince $since; + + /** + * @var DocSignaturesAnalysis200ResponseUntil $until + */ + #[JsonProperty('until')] + public DocSignaturesAnalysis200ResponseUntil $until; + + /** + * @var array $restrictions + */ + #[JsonProperty('restrictions'), ArrayType([DocSignaturesAnalysis200ResponseRestrictionsItem::class])] + public array $restrictions; + + /** + * @var DocSignaturesAnalysis200ResponseCurrent $current + */ + #[JsonProperty('current')] + public DocSignaturesAnalysis200ResponseCurrent $current; + + /** + * @var DocSignaturesAnalysis200ResponseLater $later + */ + #[JsonProperty('later')] + public DocSignaturesAnalysis200ResponseLater $later; + + /** + * @var value-of $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var array $steps + */ + #[JsonProperty('steps'), ArrayType(['mixed'])] + public array $steps; + + /** + * @param array{ + * mode: value-of, + * policyVersion: int, + * basis: DocSignaturesAnalysis200ResponseBasis, + * since: DocSignaturesAnalysis200ResponseSince, + * until: DocSignaturesAnalysis200ResponseUntil, + * restrictions: array, + * current: DocSignaturesAnalysis200ResponseCurrent, + * later: DocSignaturesAnalysis200ResponseLater, + * verdict: value-of, + * steps: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->mode = $values['mode']; + $this->policyVersion = $values['policyVersion']; + $this->basis = $values['basis']; + $this->since = $values['since']; + $this->until = $values['until']; + $this->restrictions = $values['restrictions']; + $this->current = $values['current']; + $this->later = $values['later']; + $this->verdict = $values['verdict']; + $this->steps = $values['steps']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseBasis.php b/src/Types/DocSignaturesAnalysis200ResponseBasis.php new file mode 100644 index 0000000..aa826de --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseBasis.php @@ -0,0 +1,50 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @param array{ + * version: DocSignaturesAnalysis200ResponseBasisVersion, + * editsVersion: int, + * source: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->version = $values['version']; + $this->editsVersion = $values['editsVersion']; + $this->source = $values['source']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseBasisSource.php b/src/Types/DocSignaturesAnalysis200ResponseBasisSource.php new file mode 100644 index 0000000..63a3d72 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseBasisSource.php @@ -0,0 +1,9 @@ +sha256 = $values['sha256']; + $this->byteLength = $values['byteLength']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrent.php b/src/Types/DocSignaturesAnalysis200ResponseCurrent.php new file mode 100644 index 0000000..59a7672 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseCurrent.php @@ -0,0 +1,67 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var bool $complete + */ + #[JsonProperty('complete')] + public bool $complete; + + /** + * @var ?DocSignaturesAnalysis200ResponseCurrentPrimary $primary + */ + #[JsonProperty('primary')] + public ?DocSignaturesAnalysis200ResponseCurrentPrimary $primary; + + /** + * @var array $findings + */ + #[JsonProperty('findings'), ArrayType([DocSignaturesAnalysis200ResponseCurrentFindingsItem::class])] + public array $findings; + + /** + * @var value-of $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @param array{ + * verdict: value-of, + * complete: bool, + * findings: array, + * method: value-of, + * primary?: ?DocSignaturesAnalysis200ResponseCurrentPrimary, + * } $values + */ + public function __construct( + array $values, + ) { + $this->verdict = $values['verdict']; + $this->complete = $values['complete']; + $this->primary = $values['primary'] ?? null; + $this->findings = $values['findings']; + $this->method = $values['method']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php b/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php new file mode 100644 index 0000000..aa83913 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php @@ -0,0 +1,66 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var int $objectNumber + */ + #[JsonProperty('objectNumber')] + public int $objectNumber; + + /** + * @var ?string $edge + */ + #[JsonProperty('edge')] + public ?string $edge; + + /** + * @var ?string $detail + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @param array{ + * rule: string, + * verdict: value-of, + * objectNumber: int, + * edge?: ?string, + * detail?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rule = $values['rule']; + $this->verdict = $values['verdict']; + $this->objectNumber = $values['objectNumber']; + $this->edge = $values['edge'] ?? null; + $this->detail = $values['detail'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php b/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php new file mode 100644 index 0000000..79c2d5b --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php @@ -0,0 +1,10 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var int $objectNumber + */ + #[JsonProperty('objectNumber')] + public int $objectNumber; + + /** + * @var ?string $edge + */ + #[JsonProperty('edge')] + public ?string $edge; + + /** + * @var ?string $detail + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @param array{ + * rule: string, + * verdict: value-of, + * objectNumber: int, + * edge?: ?string, + * detail?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rule = $values['rule']; + $this->verdict = $values['verdict']; + $this->objectNumber = $values['objectNumber']; + $this->edge = $values['edge'] ?? null; + $this->detail = $values['detail'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php b/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php new file mode 100644 index 0000000..2145817 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php @@ -0,0 +1,10 @@ + $undoneObjectNumbers + */ + #[JsonProperty('undoneObjectNumbers'), ArrayType(['integer'])] + public array $undoneObjectNumbers; + + /** + * @param array{ + * revisionCount: int, + * undoneObjectNumbers: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->revisionCount = $values['revisionCount']; + $this->undoneObjectNumbers = $values['undoneObjectNumbers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseMode.php b/src/Types/DocSignaturesAnalysis200ResponseMode.php new file mode 100644 index 0000000..10f6723 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseMode.php @@ -0,0 +1,9 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var bool $own + */ + #[JsonProperty('own')] + public bool $own; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @var mixed $fields + */ + #[JsonProperty('fields')] + public mixed $fields; + + /** + * @param array{ + * signatureIndex: int, + * revisionIndex: int, + * source: value-of, + * own: bool, + * permission?: ?float, + * fields?: mixed, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signatureIndex = $values['signatureIndex']; + $this->revisionIndex = $values['revisionIndex']; + $this->source = $values['source']; + $this->own = $values['own']; + $this->permission = $values['permission'] ?? null; + $this->fields = $values['fields'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php b/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php new file mode 100644 index 0000000..945972c --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php @@ -0,0 +1,10 @@ +revisionIndex = $values['revisionIndex']; + $this->signatureIndex = $values['signatureIndex'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseUntil.php b/src/Types/DocSignaturesAnalysis200ResponseUntil.php new file mode 100644 index 0000000..3a93c52 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseUntil.php @@ -0,0 +1,34 @@ +revisionIndex = $values['revisionIndex']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis200ResponseVerdict.php b/src/Types/DocSignaturesAnalysis200ResponseVerdict.php new file mode 100644 index 0000000..d1110ba --- /dev/null +++ b/src/Types/DocSignaturesAnalysis200ResponseVerdict.php @@ -0,0 +1,11 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis400ResponseCode.php b/src/Types/DocSignaturesAnalysis400ResponseCode.php new file mode 100644 index 0000000..ff1d0e8 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis400ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesAnalysis404ResponseCode.php b/src/Types/DocSignaturesAnalysis404ResponseCode.php new file mode 100644 index 0000000..d7c1f37 --- /dev/null +++ b/src/Types/DocSignaturesAnalysis404ResponseCode.php @@ -0,0 +1,32 @@ + $status + */ + #[JsonProperty('status')] + public string $status; + + /** + * @var DocSignaturesComplete200ResponseSignature $signature + */ + #[JsonProperty('signature')] + public DocSignaturesComplete200ResponseSignature $signature; + + /** + * @var DocSignaturesComplete200ResponseVersion $version + */ + #[JsonProperty('version')] + public DocSignaturesComplete200ResponseVersion $version; + + /** + * @var DocSignaturesComplete200ResponsePrevious $previous + */ + #[JsonProperty('previous')] + public DocSignaturesComplete200ResponsePrevious $previous; + + /** + * @var DocSignaturesComplete200ResponseProtection $protection + */ + #[JsonProperty('protection')] + public DocSignaturesComplete200ResponseProtection $protection; + + /** + * @var DocSignaturesComplete200ResponseMeta $meta + */ + #[JsonProperty('meta')] + public DocSignaturesComplete200ResponseMeta $meta; + + /** + * @param array{ + * status: value-of, + * signature: DocSignaturesComplete200ResponseSignature, + * version: DocSignaturesComplete200ResponseVersion, + * previous: DocSignaturesComplete200ResponsePrevious, + * protection: DocSignaturesComplete200ResponseProtection, + * meta: DocSignaturesComplete200ResponseMeta, + * } $values + */ + public function __construct( + array $values, + ) { + $this->status = $values['status']; + $this->signature = $values['signature']; + $this->version = $values['version']; + $this->previous = $values['previous']; + $this->protection = $values['protection']; + $this->meta = $values['meta']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMeta.php b/src/Types/DocSignaturesComplete200ResponseMeta.php new file mode 100644 index 0000000..bd5cd72 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMeta.php @@ -0,0 +1,43 @@ + $affectedPages + */ + #[JsonProperty('affectedPages'), ArrayType([DocSignaturesComplete200ResponseMetaAffectedPagesItem::class])] + public array $affectedPages; + + /** + * @var ?DocSignaturesComplete200ResponseMetaCacheDelta $cacheDelta + */ + #[JsonProperty('cacheDelta')] + public ?DocSignaturesComplete200ResponseMetaCacheDelta $cacheDelta; + + /** + * @param array{ + * affectedPages: array, + * cacheDelta?: ?DocSignaturesComplete200ResponseMetaCacheDelta, + * } $values + */ + public function __construct( + array $values, + ) { + $this->affectedPages = $values['affectedPages']; + $this->cacheDelta = $values['cacheDelta'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItem.php b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItem.php new file mode 100644 index 0000000..3f6b1c5 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItem.php @@ -0,0 +1,50 @@ +pageObjectNumber = $values['pageObjectNumber']; + $this->revision = $values['revision']; + $this->weakAnnotationState = $values['weakAnnotationState']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemRevision.php b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemRevision.php new file mode 100644 index 0000000..02a5c3a --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemRevision.php @@ -0,0 +1,50 @@ +docSessionId = $values['docSessionId']; + $this->pageObjectNumber = $values['pageObjectNumber']; + $this->generation = $values['generation']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState.php b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState.php new file mode 100644 index 0000000..a79c69e --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState.php @@ -0,0 +1,196 @@ +kind = $values['kind']; + $this->value = $values['value']; + } + + /** + * @param DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown $unknown + * @return DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState + */ + public static function unknown(DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown $unknown): DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState + { + return new DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState([ + 'kind' => 'unknown', + 'value' => $unknown, + ]); + } + + /** + * @param DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown $known + * @return DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState + */ + public static function known(DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown $known): DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState + { + return new DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationState([ + 'kind' => 'known', + 'value' => $known, + ]); + } + + /** + * @return bool + */ + public function isUnknown(): bool + { + return $this->value instanceof DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown && $this->kind === 'unknown'; + } + + /** + * @return DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown + */ + public function asUnknown(): DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown + { + if (!($this->value instanceof DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown && $this->kind === 'unknown')) { + throw new Exception( + "Expected unknown; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isKnown(): bool + { + return $this->value instanceof DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown && $this->kind === 'known'; + } + + /** + * @return DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown + */ + public function asKnown(): DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown + { + if (!($this->value instanceof DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown && $this->kind === 'known')) { + throw new Exception( + "Expected known; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + $result = []; + $result['kind'] = $this->kind; + + $base = parent::jsonSerialize(); + $result = array_merge($base, $result); + + switch ($this->kind) { + case 'unknown': + $value = $this->asUnknown()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'known': + $value = $this->asKnown()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case '_unknown': + default: + if (is_null($this->value)) { + break; + } + if ($this->value instanceof JsonSerializableType) { + $value = $this->value->jsonSerialize(); + $result = array_merge($value, $result); + } elseif (is_array($this->value)) { + $result = array_merge($this->value, $result); + } + } + + return $result; + } + + /** + * @param array $data + */ + public static function jsonDeserialize(array $data): static + { + $args = []; + if (!array_key_exists('kind', $data)) { + throw new Exception( + "JSON data is missing property 'kind'", + ); + } + $kind = $data['kind']; + if (!(is_string($kind))) { + throw new Exception( + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), + ); + } + + $args['kind'] = $kind; + switch ($kind) { + case 'unknown': + $args['value'] = DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown::jsonDeserialize($data); + break; + case 'known': + $args['value'] = DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown::jsonDeserialize($data); + break; + case '_unknown': + default: + $args['kind'] = '_unknown'; + $args['value'] = $data; + } + + // @phpstan-ignore-next-line + return new static($args); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.php b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.php new file mode 100644 index 0000000..fa761f7 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateKnown.php @@ -0,0 +1,34 @@ +hasAnyWeakAnnotations = $values['hasAnyWeakAnnotations']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.php b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.php new file mode 100644 index 0000000..af2cd3d --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaAffectedPagesItemWeakAnnotationStateUnknown.php @@ -0,0 +1,26 @@ +toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaCacheDelta.php b/src/Types/DocSignaturesComplete200ResponseMetaCacheDelta.php new file mode 100644 index 0000000..dd2512a --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaCacheDelta.php @@ -0,0 +1,75 @@ + $pages + */ + #[JsonProperty('pages'), ArrayType([DocSignaturesComplete200ResponseMetaCacheDeltaPagesItem::class])] + public array $pages; + + /** + * @param array{ + * previousDocVersion: int, + * docVersion: int, + * pages: array, + * annotationsVersion?: ?int, + * layerVersion?: ?int, + * working?: ?bool, + * } $values + */ + public function __construct( + array $values, + ) { + $this->previousDocVersion = $values['previousDocVersion']; + $this->docVersion = $values['docVersion']; + $this->annotationsVersion = $values['annotationsVersion'] ?? null; + $this->layerVersion = $values['layerVersion'] ?? null; + $this->working = $values['working'] ?? null; + $this->pages = $values['pages']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItem.php b/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItem.php new file mode 100644 index 0000000..1dc55fe --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItem.php @@ -0,0 +1,42 @@ +pageObjectNumber = $values['pageObjectNumber']; + $this->cache = $values['cache']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItemCache.php b/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItemCache.php new file mode 100644 index 0000000..bd6b680 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseMetaCacheDeltaPagesItemCache.php @@ -0,0 +1,42 @@ +contentVersion = $values['contentVersion']; + $this->annotationVersion = $values['annotationVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponsePrevious.php b/src/Types/DocSignaturesComplete200ResponsePrevious.php new file mode 100644 index 0000000..908998f --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponsePrevious.php @@ -0,0 +1,42 @@ +baseSha256 = $values['baseSha256']; + $this->editsVersion = $values['editsVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseProtection.php b/src/Types/DocSignaturesComplete200ResponseProtection.php new file mode 100644 index 0000000..dfa32bc --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseProtection.php @@ -0,0 +1,67 @@ + $enforced + */ + #[JsonProperty('enforced')] + public ?string $enforced; + + /** + * @var ?value-of $judged + */ + #[JsonProperty('judged')] + public ?string $judged; + + /** + * @var ?DocSignaturesComplete200ResponseProtectionCertification $certification + */ + #[JsonProperty('certification')] + public ?DocSignaturesComplete200ResponseProtectionCertification $certification; + + /** + * @var array $fieldLocks + */ + #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesComplete200ResponseProtectionFieldLocksItem::class])] + public array $fieldLocks; + + /** + * @var int $policyVersion + */ + #[JsonProperty('policyVersion')] + public int $policyVersion; + + /** + * @param array{ + * fieldLocks: array, + * policyVersion: int, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocSignaturesComplete200ResponseProtectionCertification, + * } $values + */ + public function __construct( + array $values, + ) { + $this->enforced = $values['enforced'] ?? null; + $this->judged = $values['judged'] ?? null; + $this->certification = $values['certification'] ?? null; + $this->fieldLocks = $values['fieldLocks']; + $this->policyVersion = $values['policyVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionCertification.php b/src/Types/DocSignaturesComplete200ResponseProtectionCertification.php new file mode 100644 index 0000000..c502707 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseProtectionCertification.php @@ -0,0 +1,42 @@ +signatureIndex = $values['signatureIndex']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php b/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php new file mode 100644 index 0000000..74c8866 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php @@ -0,0 +1,11 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec $spec + */ + #[JsonProperty('spec')] + public ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec $spec; + + /** + * @param array{ + * signatureIndex: int, + * source: value-of, + * spec?: ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signatureIndex = $values['signatureIndex']; + $this->source = $values['source']; + $this->spec = $values['spec'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php new file mode 100644 index 0000000..55090c5 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php new file mode 100644 index 0000000..f50df38 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php @@ -0,0 +1,10 @@ + $kind + */ + #[JsonProperty('kind')] + public string $kind; + + /** + * @var ?string $filter + */ + #[JsonProperty('filter')] + public ?string $filter; + + /** + * @var ?string $subFilter + */ + #[JsonProperty('subFilter')] + public ?string $subFilter; + + /** + * @var ?array $byteRange + */ + #[JsonProperty('byteRange'), ArrayType(['mixed'])] + public ?array $byteRange; + + /** + * @var int $contentsSize + */ + #[JsonProperty('contentsSize')] + public int $contentsSize; + + /** + * @var ?value-of $coverage + */ + #[JsonProperty('coverage')] + public ?string $coverage; + + /** + * @var ?int $revisionIndex + */ + #[JsonProperty('revisionIndex')] + public ?int $revisionIndex; + + /** + * @var DocSignaturesComplete200ResponseSignatureSigner $signer + */ + #[JsonProperty('signer')] + public DocSignaturesComplete200ResponseSignatureSigner $signer; + + /** + * @var ?float $docMdp + */ + #[JsonProperty('docMdp')] + public ?float $docMdp; + + /** + * @var bool $catalogCertification + */ + #[JsonProperty('catalogCertification')] + public bool $catalogCertification; + + /** + * @var ?DocSignaturesComplete200ResponseSignatureFieldMdp $fieldMdp + */ + #[JsonProperty('fieldMdp')] + public ?DocSignaturesComplete200ResponseSignatureFieldMdp $fieldMdp; + + /** + * @var ?DocSignaturesComplete200ResponseSignatureLock $lock + */ + #[JsonProperty('lock')] + public ?DocSignaturesComplete200ResponseSignatureLock $lock; + + /** + * @var ?DocSignaturesComplete200ResponseSignatureSeedValue $seedValue + */ + #[JsonProperty('seedValue')] + public ?DocSignaturesComplete200ResponseSignatureSeedValue $seedValue; + + /** + * @param array{ + * index: int, + * field: DocSignaturesComplete200ResponseSignatureField, + * fieldName: string, + * signed: bool, + * kind: value-of, + * contentsSize: int, + * signer: DocSignaturesComplete200ResponseSignatureSigner, + * catalogCertification: bool, + * widget?: ?DocSignaturesComplete200ResponseSignatureWidget, + * filter?: ?string, + * subFilter?: ?string, + * byteRange?: ?array, + * coverage?: ?value-of, + * revisionIndex?: ?int, + * docMdp?: ?float, + * fieldMdp?: ?DocSignaturesComplete200ResponseSignatureFieldMdp, + * lock?: ?DocSignaturesComplete200ResponseSignatureLock, + * seedValue?: ?DocSignaturesComplete200ResponseSignatureSeedValue, + * } $values + */ + public function __construct( + array $values, + ) { + $this->index = $values['index']; + $this->field = $values['field']; + $this->fieldName = $values['fieldName']; + $this->widget = $values['widget'] ?? null; + $this->signed = $values['signed']; + $this->kind = $values['kind']; + $this->filter = $values['filter'] ?? null; + $this->subFilter = $values['subFilter'] ?? null; + $this->byteRange = $values['byteRange'] ?? null; + $this->contentsSize = $values['contentsSize']; + $this->coverage = $values['coverage'] ?? null; + $this->revisionIndex = $values['revisionIndex'] ?? null; + $this->signer = $values['signer']; + $this->docMdp = $values['docMdp'] ?? null; + $this->catalogCertification = $values['catalogCertification']; + $this->fieldMdp = $values['fieldMdp'] ?? null; + $this->lock = $values['lock'] ?? null; + $this->seedValue = $values['seedValue'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php b/src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php new file mode 100644 index 0000000..3824166 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php @@ -0,0 +1,10 @@ +kind = $values['kind']; + $this->value = $values['value']; + } + + /** + * @param DocSignaturesComplete200ResponseSignatureFieldObjectNumber $objectNumber + * @return DocSignaturesComplete200ResponseSignatureField + */ + public static function objectNumber(DocSignaturesComplete200ResponseSignatureFieldObjectNumber $objectNumber): DocSignaturesComplete200ResponseSignatureField + { + return new DocSignaturesComplete200ResponseSignatureField([ + 'kind' => 'objectNumber', + 'value' => $objectNumber, + ]); + } + + /** + * @param DocSignaturesComplete200ResponseSignatureFieldFqn $fqn + * @return DocSignaturesComplete200ResponseSignatureField + */ + public static function fqn(DocSignaturesComplete200ResponseSignatureFieldFqn $fqn): DocSignaturesComplete200ResponseSignatureField + { + return new DocSignaturesComplete200ResponseSignatureField([ + 'kind' => 'fqn', + 'value' => $fqn, + ]); + } + + /** + * @return bool + */ + public function isObjectNumber(): bool + { + return $this->value instanceof DocSignaturesComplete200ResponseSignatureFieldObjectNumber && $this->kind === 'objectNumber'; + } + + /** + * @return DocSignaturesComplete200ResponseSignatureFieldObjectNumber + */ + public function asObjectNumber(): DocSignaturesComplete200ResponseSignatureFieldObjectNumber + { + if (!($this->value instanceof DocSignaturesComplete200ResponseSignatureFieldObjectNumber && $this->kind === 'objectNumber')) { + throw new Exception( + "Expected objectNumber; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isFqn(): bool + { + return $this->value instanceof DocSignaturesComplete200ResponseSignatureFieldFqn && $this->kind === 'fqn'; + } + + /** + * @return DocSignaturesComplete200ResponseSignatureFieldFqn + */ + public function asFqn(): DocSignaturesComplete200ResponseSignatureFieldFqn + { + if (!($this->value instanceof DocSignaturesComplete200ResponseSignatureFieldFqn && $this->kind === 'fqn')) { + throw new Exception( + "Expected fqn; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + $result = []; + $result['kind'] = $this->kind; + + $base = parent::jsonSerialize(); + $result = array_merge($base, $result); + + switch ($this->kind) { + case 'objectNumber': + $value = $this->asObjectNumber()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'fqn': + $value = $this->asFqn()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case '_unknown': + default: + if (is_null($this->value)) { + break; + } + if ($this->value instanceof JsonSerializableType) { + $value = $this->value->jsonSerialize(); + $result = array_merge($value, $result); + } elseif (is_array($this->value)) { + $result = array_merge($this->value, $result); + } + } + + return $result; + } + + /** + * @param array $data + */ + public static function jsonDeserialize(array $data): static + { + $args = []; + if (!array_key_exists('kind', $data)) { + throw new Exception( + "JSON data is missing property 'kind'", + ); + } + $kind = $data['kind']; + if (!(is_string($kind))) { + throw new Exception( + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), + ); + } + + $args['kind'] = $kind; + switch ($kind) { + case 'objectNumber': + $args['value'] = DocSignaturesComplete200ResponseSignatureFieldObjectNumber::jsonDeserialize($data); + break; + case 'fqn': + $args['value'] = DocSignaturesComplete200ResponseSignatureFieldFqn::jsonDeserialize($data); + break; + case '_unknown': + default: + $args['kind'] = '_unknown'; + $args['value'] = $data; + } + + // @phpstan-ignore-next-line + return new static($args); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureFieldFqn.php b/src/Types/DocSignaturesComplete200ResponseSignatureFieldFqn.php new file mode 100644 index 0000000..3ca68fe --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureFieldFqn.php @@ -0,0 +1,34 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdp.php b/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdp.php new file mode 100644 index 0000000..210bbc6 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdp.php @@ -0,0 +1,51 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php b/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php new file mode 100644 index 0000000..8b6ebf4 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php @@ -0,0 +1,10 @@ +fieldObjectNumber = $values['fieldObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureKind.php b/src/Types/DocSignaturesComplete200ResponseSignatureKind.php new file mode 100644 index 0000000..68585a7 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureKind.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php b/src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php new file mode 100644 index 0000000..cd03692 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php @@ -0,0 +1,10 @@ + $subFilters + */ + #[JsonProperty('subFilters'), ArrayType(['string'])] + public array $subFilters; + + /** + * @var array $digestMethods + */ + #[JsonProperty('digestMethods'), ArrayType(['string'])] + public array $digestMethods; + + /** + * @var array $reasons + */ + #[JsonProperty('reasons'), ArrayType(['string'])] + public array $reasons; + + /** + * @var bool $unsupportedRequired + */ + #[JsonProperty('unsupportedRequired')] + public bool $unsupportedRequired; + + /** + * @param array{ + * requiredFlags: int, + * presentFlags: int, + * subFilters: array, + * digestMethods: array, + * reasons: array, + * unsupportedRequired: bool, + * version?: ?int, + * mdp?: ?float, + * filter?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->requiredFlags = $values['requiredFlags']; + $this->presentFlags = $values['presentFlags']; + $this->version = $values['version'] ?? null; + $this->mdp = $values['mdp'] ?? null; + $this->filter = $values['filter'] ?? null; + $this->subFilters = $values['subFilters']; + $this->digestMethods = $values['digestMethods']; + $this->reasons = $values['reasons']; + $this->unsupportedRequired = $values['unsupportedRequired']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureSigner.php b/src/Types/DocSignaturesComplete200ResponseSignatureSigner.php new file mode 100644 index 0000000..0db5e65 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureSigner.php @@ -0,0 +1,66 @@ +name = $values['name'] ?? null; + $this->reason = $values['reason'] ?? null; + $this->location = $values['location'] ?? null; + $this->contactInfo = $values['contactInfo'] ?? null; + $this->claimedTime = $values['claimedTime'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureWidget.php b/src/Types/DocSignaturesComplete200ResponseSignatureWidget.php new file mode 100644 index 0000000..78f187f --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseSignatureWidget.php @@ -0,0 +1,42 @@ +annotObjectNumber = $values['annotObjectNumber']; + $this->pageObjectNumber = $values['pageObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete200ResponseStatus.php b/src/Types/DocSignaturesComplete200ResponseStatus.php new file mode 100644 index 0000000..ab544f9 --- /dev/null +++ b/src/Types/DocSignaturesComplete200ResponseStatus.php @@ -0,0 +1,9 @@ +sha256 = $values['sha256']; + $this->byteLength = $values['byteLength']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete400Response.php b/src/Types/DocSignaturesComplete400Response.php new file mode 100644 index 0000000..d3bcfca --- /dev/null +++ b/src/Types/DocSignaturesComplete400Response.php @@ -0,0 +1,59 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete400ResponseCode.php b/src/Types/DocSignaturesComplete400ResponseCode.php new file mode 100644 index 0000000..dcc84bf --- /dev/null +++ b/src/Types/DocSignaturesComplete400ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete404ResponseCode.php b/src/Types/DocSignaturesComplete404ResponseCode.php new file mode 100644 index 0000000..70a8497 --- /dev/null +++ b/src/Types/DocSignaturesComplete404ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesComplete409ResponseCode.php b/src/Types/DocSignaturesComplete409ResponseCode.php new file mode 100644 index 0000000..dfa40d1 --- /dev/null +++ b/src/Types/DocSignaturesComplete409ResponseCode.php @@ -0,0 +1,32 @@ + $revisions + */ + #[JsonProperty('revisions'), ArrayType([DocSignaturesList200ResponseRevisionsItem::class])] + public array $revisions; + + /** + * @var array $signatures + */ + #[JsonProperty('signatures'), ArrayType([DocSignaturesList200ResponseSignaturesItem::class])] + public array $signatures; + + /** + * @var DocSignaturesList200ResponseProtection $protection + */ + #[JsonProperty('protection')] + public DocSignaturesList200ResponseProtection $protection; + + /** + * @param array{ + * chainValid: bool, + * revisions: array, + * signatures: array, + * protection: DocSignaturesList200ResponseProtection, + * } $values + */ + public function __construct( + array $values, + ) { + $this->chainValid = $values['chainValid']; + $this->revisions = $values['revisions']; + $this->signatures = $values['signatures']; + $this->protection = $values['protection']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseProtection.php b/src/Types/DocSignaturesList200ResponseProtection.php new file mode 100644 index 0000000..f7bbc2d --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseProtection.php @@ -0,0 +1,67 @@ + $enforced + */ + #[JsonProperty('enforced')] + public ?string $enforced; + + /** + * @var ?value-of $judged + */ + #[JsonProperty('judged')] + public ?string $judged; + + /** + * @var ?DocSignaturesList200ResponseProtectionCertification $certification + */ + #[JsonProperty('certification')] + public ?DocSignaturesList200ResponseProtectionCertification $certification; + + /** + * @var array $fieldLocks + */ + #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesList200ResponseProtectionFieldLocksItem::class])] + public array $fieldLocks; + + /** + * @var int $policyVersion + */ + #[JsonProperty('policyVersion')] + public int $policyVersion; + + /** + * @param array{ + * fieldLocks: array, + * policyVersion: int, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocSignaturesList200ResponseProtectionCertification, + * } $values + */ + public function __construct( + array $values, + ) { + $this->enforced = $values['enforced'] ?? null; + $this->judged = $values['judged'] ?? null; + $this->certification = $values['certification'] ?? null; + $this->fieldLocks = $values['fieldLocks']; + $this->policyVersion = $values['policyVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseProtectionCertification.php b/src/Types/DocSignaturesList200ResponseProtectionCertification.php new file mode 100644 index 0000000..0388f0b --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseProtectionCertification.php @@ -0,0 +1,42 @@ +signatureIndex = $values['signatureIndex']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseProtectionEnforced.php b/src/Types/DocSignaturesList200ResponseProtectionEnforced.php new file mode 100644 index 0000000..d2b7234 --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseProtectionEnforced.php @@ -0,0 +1,11 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec $spec + */ + #[JsonProperty('spec')] + public ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec $spec; + + /** + * @param array{ + * signatureIndex: int, + * source: value-of, + * spec?: ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signatureIndex = $values['signatureIndex']; + $this->source = $values['source']; + $this->spec = $values['spec'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php new file mode 100644 index 0000000..73336f3 --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php new file mode 100644 index 0000000..7e4641b --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php @@ -0,0 +1,10 @@ +index = $values['index']; + $this->end = $values['end']; + $this->xrefOffset = $values['xrefOffset']; + $this->signatureIndex = $values['signatureIndex'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItem.php b/src/Types/DocSignaturesList200ResponseSignaturesItem.php new file mode 100644 index 0000000..a5a6c6e --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItem.php @@ -0,0 +1,171 @@ + $kind + */ + #[JsonProperty('kind')] + public string $kind; + + /** + * @var ?string $filter + */ + #[JsonProperty('filter')] + public ?string $filter; + + /** + * @var ?string $subFilter + */ + #[JsonProperty('subFilter')] + public ?string $subFilter; + + /** + * @var ?array $byteRange + */ + #[JsonProperty('byteRange'), ArrayType(['mixed'])] + public ?array $byteRange; + + /** + * @var int $contentsSize + */ + #[JsonProperty('contentsSize')] + public int $contentsSize; + + /** + * @var ?value-of $coverage + */ + #[JsonProperty('coverage')] + public ?string $coverage; + + /** + * @var ?int $revisionIndex + */ + #[JsonProperty('revisionIndex')] + public ?int $revisionIndex; + + /** + * @var DocSignaturesList200ResponseSignaturesItemSigner $signer + */ + #[JsonProperty('signer')] + public DocSignaturesList200ResponseSignaturesItemSigner $signer; + + /** + * @var ?float $docMdp + */ + #[JsonProperty('docMdp')] + public ?float $docMdp; + + /** + * @var bool $catalogCertification + */ + #[JsonProperty('catalogCertification')] + public bool $catalogCertification; + + /** + * @var ?DocSignaturesList200ResponseSignaturesItemFieldMdp $fieldMdp + */ + #[JsonProperty('fieldMdp')] + public ?DocSignaturesList200ResponseSignaturesItemFieldMdp $fieldMdp; + + /** + * @var ?DocSignaturesList200ResponseSignaturesItemLock $lock + */ + #[JsonProperty('lock')] + public ?DocSignaturesList200ResponseSignaturesItemLock $lock; + + /** + * @var ?DocSignaturesList200ResponseSignaturesItemSeedValue $seedValue + */ + #[JsonProperty('seedValue')] + public ?DocSignaturesList200ResponseSignaturesItemSeedValue $seedValue; + + /** + * @param array{ + * index: int, + * field: DocSignaturesList200ResponseSignaturesItemField, + * fieldName: string, + * signed: bool, + * kind: value-of, + * contentsSize: int, + * signer: DocSignaturesList200ResponseSignaturesItemSigner, + * catalogCertification: bool, + * widget?: ?DocSignaturesList200ResponseSignaturesItemWidget, + * filter?: ?string, + * subFilter?: ?string, + * byteRange?: ?array, + * coverage?: ?value-of, + * revisionIndex?: ?int, + * docMdp?: ?float, + * fieldMdp?: ?DocSignaturesList200ResponseSignaturesItemFieldMdp, + * lock?: ?DocSignaturesList200ResponseSignaturesItemLock, + * seedValue?: ?DocSignaturesList200ResponseSignaturesItemSeedValue, + * } $values + */ + public function __construct( + array $values, + ) { + $this->index = $values['index']; + $this->field = $values['field']; + $this->fieldName = $values['fieldName']; + $this->widget = $values['widget'] ?? null; + $this->signed = $values['signed']; + $this->kind = $values['kind']; + $this->filter = $values['filter'] ?? null; + $this->subFilter = $values['subFilter'] ?? null; + $this->byteRange = $values['byteRange'] ?? null; + $this->contentsSize = $values['contentsSize']; + $this->coverage = $values['coverage'] ?? null; + $this->revisionIndex = $values['revisionIndex'] ?? null; + $this->signer = $values['signer']; + $this->docMdp = $values['docMdp'] ?? null; + $this->catalogCertification = $values['catalogCertification']; + $this->fieldMdp = $values['fieldMdp'] ?? null; + $this->lock = $values['lock'] ?? null; + $this->seedValue = $values['seedValue'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php b/src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php new file mode 100644 index 0000000..a463528 --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php @@ -0,0 +1,10 @@ +kind = $values['kind']; + $this->value = $values['value']; + } + + /** + * @param DocSignaturesList200ResponseSignaturesItemFieldObjectNumber $objectNumber + * @return DocSignaturesList200ResponseSignaturesItemField + */ + public static function objectNumber(DocSignaturesList200ResponseSignaturesItemFieldObjectNumber $objectNumber): DocSignaturesList200ResponseSignaturesItemField + { + return new DocSignaturesList200ResponseSignaturesItemField([ + 'kind' => 'objectNumber', + 'value' => $objectNumber, + ]); + } + + /** + * @param DocSignaturesList200ResponseSignaturesItemFieldFqn $fqn + * @return DocSignaturesList200ResponseSignaturesItemField + */ + public static function fqn(DocSignaturesList200ResponseSignaturesItemFieldFqn $fqn): DocSignaturesList200ResponseSignaturesItemField + { + return new DocSignaturesList200ResponseSignaturesItemField([ + 'kind' => 'fqn', + 'value' => $fqn, + ]); + } + + /** + * @return bool + */ + public function isObjectNumber(): bool + { + return $this->value instanceof DocSignaturesList200ResponseSignaturesItemFieldObjectNumber && $this->kind === 'objectNumber'; + } + + /** + * @return DocSignaturesList200ResponseSignaturesItemFieldObjectNumber + */ + public function asObjectNumber(): DocSignaturesList200ResponseSignaturesItemFieldObjectNumber + { + if (!($this->value instanceof DocSignaturesList200ResponseSignaturesItemFieldObjectNumber && $this->kind === 'objectNumber')) { + throw new Exception( + "Expected objectNumber; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isFqn(): bool + { + return $this->value instanceof DocSignaturesList200ResponseSignaturesItemFieldFqn && $this->kind === 'fqn'; + } + + /** + * @return DocSignaturesList200ResponseSignaturesItemFieldFqn + */ + public function asFqn(): DocSignaturesList200ResponseSignaturesItemFieldFqn + { + if (!($this->value instanceof DocSignaturesList200ResponseSignaturesItemFieldFqn && $this->kind === 'fqn')) { + throw new Exception( + "Expected fqn; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + $result = []; + $result['kind'] = $this->kind; + + $base = parent::jsonSerialize(); + $result = array_merge($base, $result); + + switch ($this->kind) { + case 'objectNumber': + $value = $this->asObjectNumber()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'fqn': + $value = $this->asFqn()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case '_unknown': + default: + if (is_null($this->value)) { + break; + } + if ($this->value instanceof JsonSerializableType) { + $value = $this->value->jsonSerialize(); + $result = array_merge($value, $result); + } elseif (is_array($this->value)) { + $result = array_merge($this->value, $result); + } + } + + return $result; + } + + /** + * @param array $data + */ + public static function jsonDeserialize(array $data): static + { + $args = []; + if (!array_key_exists('kind', $data)) { + throw new Exception( + "JSON data is missing property 'kind'", + ); + } + $kind = $data['kind']; + if (!(is_string($kind))) { + throw new Exception( + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), + ); + } + + $args['kind'] = $kind; + switch ($kind) { + case 'objectNumber': + $args['value'] = DocSignaturesList200ResponseSignaturesItemFieldObjectNumber::jsonDeserialize($data); + break; + case 'fqn': + $args['value'] = DocSignaturesList200ResponseSignaturesItemFieldFqn::jsonDeserialize($data); + break; + case '_unknown': + default: + $args['kind'] = '_unknown'; + $args['value'] = $data; + } + + // @phpstan-ignore-next-line + return new static($args); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemFieldFqn.php b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldFqn.php new file mode 100644 index 0000000..8e0144c --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldFqn.php @@ -0,0 +1,34 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdp.php b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdp.php new file mode 100644 index 0000000..5a5037c --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdp.php @@ -0,0 +1,51 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php new file mode 100644 index 0000000..3a8cd3f --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php @@ -0,0 +1,10 @@ +fieldObjectNumber = $values['fieldObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemKind.php b/src/Types/DocSignaturesList200ResponseSignaturesItemKind.php new file mode 100644 index 0000000..b861c53 --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemKind.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php b/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php new file mode 100644 index 0000000..64f8bfc --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php @@ -0,0 +1,10 @@ + $subFilters + */ + #[JsonProperty('subFilters'), ArrayType(['string'])] + public array $subFilters; + + /** + * @var array $digestMethods + */ + #[JsonProperty('digestMethods'), ArrayType(['string'])] + public array $digestMethods; + + /** + * @var array $reasons + */ + #[JsonProperty('reasons'), ArrayType(['string'])] + public array $reasons; + + /** + * @var bool $unsupportedRequired + */ + #[JsonProperty('unsupportedRequired')] + public bool $unsupportedRequired; + + /** + * @param array{ + * requiredFlags: int, + * presentFlags: int, + * subFilters: array, + * digestMethods: array, + * reasons: array, + * unsupportedRequired: bool, + * version?: ?int, + * mdp?: ?float, + * filter?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->requiredFlags = $values['requiredFlags']; + $this->presentFlags = $values['presentFlags']; + $this->version = $values['version'] ?? null; + $this->mdp = $values['mdp'] ?? null; + $this->filter = $values['filter'] ?? null; + $this->subFilters = $values['subFilters']; + $this->digestMethods = $values['digestMethods']; + $this->reasons = $values['reasons']; + $this->unsupportedRequired = $values['unsupportedRequired']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php b/src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php new file mode 100644 index 0000000..30cd32e --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php @@ -0,0 +1,66 @@ +name = $values['name'] ?? null; + $this->reason = $values['reason'] ?? null; + $this->location = $values['location'] ?? null; + $this->contactInfo = $values['contactInfo'] ?? null; + $this->claimedTime = $values['claimedTime'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemWidget.php b/src/Types/DocSignaturesList200ResponseSignaturesItemWidget.php new file mode 100644 index 0000000..d46713f --- /dev/null +++ b/src/Types/DocSignaturesList200ResponseSignaturesItemWidget.php @@ -0,0 +1,42 @@ +annotObjectNumber = $values['annotObjectNumber']; + $this->pageObjectNumber = $values['pageObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList404Response.php b/src/Types/DocSignaturesList404Response.php new file mode 100644 index 0000000..7478810 --- /dev/null +++ b/src/Types/DocSignaturesList404Response.php @@ -0,0 +1,59 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesList404ResponseCode.php b/src/Types/DocSignaturesList404ResponseCode.php new file mode 100644 index 0000000..67db3bc --- /dev/null +++ b/src/Types/DocSignaturesList404ResponseCode.php @@ -0,0 +1,32 @@ + $algorithm + */ + #[JsonProperty('algorithm')] + public string $algorithm; + + /** + * @var array $byteRange + */ + #[JsonProperty('byteRange'), ArrayType(['mixed'])] + public array $byteRange; + + /** + * @var int $contentsSize + */ + #[JsonProperty('contentsSize')] + public int $contentsSize; + + /** + * @var string $subFilter + */ + #[JsonProperty('subFilter')] + public string $subFilter; + + /** + * @var DocSignaturesPrepare200ResponseExpectedVersion $expectedVersion + */ + #[JsonProperty('expectedVersion')] + public DocSignaturesPrepare200ResponseExpectedVersion $expectedVersion; + + /** + * @var ?string $expiresAt + */ + #[JsonProperty('expiresAt')] + public ?string $expiresAt; + + /** + * @param array{ + * signingId: string, + * digest: string, + * algorithm: value-of, + * byteRange: array, + * contentsSize: int, + * subFilter: string, + * expectedVersion: DocSignaturesPrepare200ResponseExpectedVersion, + * expiresAt?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signingId = $values['signingId']; + $this->digest = $values['digest']; + $this->algorithm = $values['algorithm']; + $this->byteRange = $values['byteRange']; + $this->contentsSize = $values['contentsSize']; + $this->subFilter = $values['subFilter']; + $this->expectedVersion = $values['expectedVersion']; + $this->expiresAt = $values['expiresAt'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesPrepare200ResponseAlgorithm.php b/src/Types/DocSignaturesPrepare200ResponseAlgorithm.php new file mode 100644 index 0000000..9553cb4 --- /dev/null +++ b/src/Types/DocSignaturesPrepare200ResponseAlgorithm.php @@ -0,0 +1,10 @@ +baseSha256 = $values['baseSha256']; + $this->editsVersion = $values['editsVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesPrepare400Response.php b/src/Types/DocSignaturesPrepare400Response.php new file mode 100644 index 0000000..79d1729 --- /dev/null +++ b/src/Types/DocSignaturesPrepare400Response.php @@ -0,0 +1,59 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesPrepare400ResponseCode.php b/src/Types/DocSignaturesPrepare400ResponseCode.php new file mode 100644 index 0000000..6a92f65 --- /dev/null +++ b/src/Types/DocSignaturesPrepare400ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesPrepare404ResponseCode.php b/src/Types/DocSignaturesPrepare404ResponseCode.php new file mode 100644 index 0000000..63f3275 --- /dev/null +++ b/src/Types/DocSignaturesPrepare404ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocSignaturesPrepare409ResponseCode.php b/src/Types/DocSignaturesPrepare409ResponseCode.php new file mode 100644 index 0000000..6dcbf85 --- /dev/null +++ b/src/Types/DocSignaturesPrepare409ResponseCode.php @@ -0,0 +1,32 @@ + $mode + */ + #[JsonProperty('mode')] + public string $mode; + + /** + * @var int $policyVersion + */ + #[JsonProperty('policyVersion')] + public int $policyVersion; + + /** + * @var DocVersionsAnalysis200ResponseBasis $basis + */ + #[JsonProperty('basis')] + public DocVersionsAnalysis200ResponseBasis $basis; + + /** + * @var DocVersionsAnalysis200ResponseSince $since + */ + #[JsonProperty('since')] + public DocVersionsAnalysis200ResponseSince $since; + + /** + * @var DocVersionsAnalysis200ResponseUntil $until + */ + #[JsonProperty('until')] + public DocVersionsAnalysis200ResponseUntil $until; + + /** + * @var array $restrictions + */ + #[JsonProperty('restrictions'), ArrayType([DocVersionsAnalysis200ResponseRestrictionsItem::class])] + public array $restrictions; + + /** + * @var DocVersionsAnalysis200ResponseCurrent $current + */ + #[JsonProperty('current')] + public DocVersionsAnalysis200ResponseCurrent $current; + + /** + * @var DocVersionsAnalysis200ResponseLater $later + */ + #[JsonProperty('later')] + public DocVersionsAnalysis200ResponseLater $later; + + /** + * @var value-of $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var array $steps + */ + #[JsonProperty('steps'), ArrayType(['mixed'])] + public array $steps; + + /** + * @param array{ + * mode: value-of, + * policyVersion: int, + * basis: DocVersionsAnalysis200ResponseBasis, + * since: DocVersionsAnalysis200ResponseSince, + * until: DocVersionsAnalysis200ResponseUntil, + * restrictions: array, + * current: DocVersionsAnalysis200ResponseCurrent, + * later: DocVersionsAnalysis200ResponseLater, + * verdict: value-of, + * steps: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->mode = $values['mode']; + $this->policyVersion = $values['policyVersion']; + $this->basis = $values['basis']; + $this->since = $values['since']; + $this->until = $values['until']; + $this->restrictions = $values['restrictions']; + $this->current = $values['current']; + $this->later = $values['later']; + $this->verdict = $values['verdict']; + $this->steps = $values['steps']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseBasis.php b/src/Types/DocVersionsAnalysis200ResponseBasis.php new file mode 100644 index 0000000..91e61a6 --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseBasis.php @@ -0,0 +1,50 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @param array{ + * version: DocVersionsAnalysis200ResponseBasisVersion, + * editsVersion: int, + * source: value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->version = $values['version']; + $this->editsVersion = $values['editsVersion']; + $this->source = $values['source']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseBasisSource.php b/src/Types/DocVersionsAnalysis200ResponseBasisSource.php new file mode 100644 index 0000000..09e61bb --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseBasisSource.php @@ -0,0 +1,9 @@ +sha256 = $values['sha256']; + $this->byteLength = $values['byteLength']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrent.php b/src/Types/DocVersionsAnalysis200ResponseCurrent.php new file mode 100644 index 0000000..e4ed1ed --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseCurrent.php @@ -0,0 +1,67 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var bool $complete + */ + #[JsonProperty('complete')] + public bool $complete; + + /** + * @var ?DocVersionsAnalysis200ResponseCurrentPrimary $primary + */ + #[JsonProperty('primary')] + public ?DocVersionsAnalysis200ResponseCurrentPrimary $primary; + + /** + * @var array $findings + */ + #[JsonProperty('findings'), ArrayType([DocVersionsAnalysis200ResponseCurrentFindingsItem::class])] + public array $findings; + + /** + * @var value-of $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @param array{ + * verdict: value-of, + * complete: bool, + * findings: array, + * method: value-of, + * primary?: ?DocVersionsAnalysis200ResponseCurrentPrimary, + * } $values + */ + public function __construct( + array $values, + ) { + $this->verdict = $values['verdict']; + $this->complete = $values['complete']; + $this->primary = $values['primary'] ?? null; + $this->findings = $values['findings']; + $this->method = $values['method']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php b/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php new file mode 100644 index 0000000..2ffa5d8 --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php @@ -0,0 +1,66 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var int $objectNumber + */ + #[JsonProperty('objectNumber')] + public int $objectNumber; + + /** + * @var ?string $edge + */ + #[JsonProperty('edge')] + public ?string $edge; + + /** + * @var ?string $detail + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @param array{ + * rule: string, + * verdict: value-of, + * objectNumber: int, + * edge?: ?string, + * detail?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rule = $values['rule']; + $this->verdict = $values['verdict']; + $this->objectNumber = $values['objectNumber']; + $this->edge = $values['edge'] ?? null; + $this->detail = $values['detail'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php b/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php new file mode 100644 index 0000000..21262cc --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php @@ -0,0 +1,10 @@ + $verdict + */ + #[JsonProperty('verdict')] + public string $verdict; + + /** + * @var int $objectNumber + */ + #[JsonProperty('objectNumber')] + public int $objectNumber; + + /** + * @var ?string $edge + */ + #[JsonProperty('edge')] + public ?string $edge; + + /** + * @var ?string $detail + */ + #[JsonProperty('detail')] + public ?string $detail; + + /** + * @param array{ + * rule: string, + * verdict: value-of, + * objectNumber: int, + * edge?: ?string, + * detail?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->rule = $values['rule']; + $this->verdict = $values['verdict']; + $this->objectNumber = $values['objectNumber']; + $this->edge = $values['edge'] ?? null; + $this->detail = $values['detail'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php b/src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php new file mode 100644 index 0000000..6bc920a --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php @@ -0,0 +1,10 @@ + $undoneObjectNumbers + */ + #[JsonProperty('undoneObjectNumbers'), ArrayType(['integer'])] + public array $undoneObjectNumbers; + + /** + * @param array{ + * revisionCount: int, + * undoneObjectNumbers: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->revisionCount = $values['revisionCount']; + $this->undoneObjectNumbers = $values['undoneObjectNumbers']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseMode.php b/src/Types/DocVersionsAnalysis200ResponseMode.php new file mode 100644 index 0000000..4cbb207 --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseMode.php @@ -0,0 +1,9 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var bool $own + */ + #[JsonProperty('own')] + public bool $own; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @var mixed $fields + */ + #[JsonProperty('fields')] + public mixed $fields; + + /** + * @param array{ + * signatureIndex: int, + * revisionIndex: int, + * source: value-of, + * own: bool, + * permission?: ?float, + * fields?: mixed, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signatureIndex = $values['signatureIndex']; + $this->revisionIndex = $values['revisionIndex']; + $this->source = $values['source']; + $this->own = $values['own']; + $this->permission = $values['permission'] ?? null; + $this->fields = $values['fields'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php b/src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php new file mode 100644 index 0000000..e6d5fa4 --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php @@ -0,0 +1,10 @@ +revisionIndex = $values['revisionIndex']; + $this->signatureIndex = $values['signatureIndex'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseUntil.php b/src/Types/DocVersionsAnalysis200ResponseUntil.php new file mode 100644 index 0000000..062e5ba --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseUntil.php @@ -0,0 +1,34 @@ +revisionIndex = $values['revisionIndex']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis200ResponseVerdict.php b/src/Types/DocVersionsAnalysis200ResponseVerdict.php new file mode 100644 index 0000000..47f83cb --- /dev/null +++ b/src/Types/DocVersionsAnalysis200ResponseVerdict.php @@ -0,0 +1,11 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis400ResponseCode.php b/src/Types/DocVersionsAnalysis400ResponseCode.php new file mode 100644 index 0000000..d659af1 --- /dev/null +++ b/src/Types/DocVersionsAnalysis400ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsAnalysis404ResponseCode.php b/src/Types/DocVersionsAnalysis404ResponseCode.php new file mode 100644 index 0000000..0d8a54a --- /dev/null +++ b/src/Types/DocVersionsAnalysis404ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsDownloadResponseCode.php b/src/Types/DocVersionsDownloadResponseCode.php new file mode 100644 index 0000000..1a5fb42 --- /dev/null +++ b/src/Types/DocVersionsDownloadResponseCode.php @@ -0,0 +1,32 @@ + $versions + */ + #[JsonProperty('versions'), ArrayType([DocVersionsList200ResponseVersionsItem::class])] + public array $versions; + + /** + * @param array{ + * head: string, + * versions: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->head = $values['head']; + $this->versions = $values['versions']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsList200ResponseVersionsItem.php b/src/Types/DocVersionsList200ResponseVersionsItem.php new file mode 100644 index 0000000..9d34195 --- /dev/null +++ b/src/Types/DocVersionsList200ResponseVersionsItem.php @@ -0,0 +1,82 @@ + $producer + */ + #[JsonProperty('producer')] + public string $producer; + + /** + * @var ?string $signingId + */ + #[JsonProperty('signingId')] + public ?string $signingId; + + /** + * @var int $createdAt + */ + #[JsonProperty('createdAt')] + public int $createdAt; + + /** + * @param array{ + * sha256: string, + * byteLength: int, + * number: int, + * producer: value-of, + * createdAt: int, + * parentSha256?: ?string, + * signingId?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->sha256 = $values['sha256']; + $this->byteLength = $values['byteLength']; + $this->number = $values['number']; + $this->parentSha256 = $values['parentSha256'] ?? null; + $this->producer = $values['producer']; + $this->signingId = $values['signingId'] ?? null; + $this->createdAt = $values['createdAt']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsList200ResponseVersionsItemProducer.php b/src/Types/DocVersionsList200ResponseVersionsItemProducer.php new file mode 100644 index 0000000..5f9549b --- /dev/null +++ b/src/Types/DocVersionsList200ResponseVersionsItemProducer.php @@ -0,0 +1,9 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsList404ResponseCode.php b/src/Types/DocVersionsList404ResponseCode.php new file mode 100644 index 0000000..ef82c99 --- /dev/null +++ b/src/Types/DocVersionsList404ResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsRevisionResponseCode.php b/src/Types/DocVersionsRevisionResponseCode.php new file mode 100644 index 0000000..5fa8ff1 --- /dev/null +++ b/src/Types/DocVersionsRevisionResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatureContentsResponseCode.php b/src/Types/DocVersionsSignatureContentsResponseCode.php new file mode 100644 index 0000000..aa3c026 --- /dev/null +++ b/src/Types/DocVersionsSignatureContentsResponseCode.php @@ -0,0 +1,32 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatureDigestResponseCode.php b/src/Types/DocVersionsSignatureDigestResponseCode.php new file mode 100644 index 0000000..40d2f3b --- /dev/null +++ b/src/Types/DocVersionsSignatureDigestResponseCode.php @@ -0,0 +1,32 @@ + $revisions + */ + #[JsonProperty('revisions'), ArrayType([DocVersionsSignatures200ResponseRevisionsItem::class])] + public array $revisions; + + /** + * @var array $signatures + */ + #[JsonProperty('signatures'), ArrayType([DocVersionsSignatures200ResponseSignaturesItem::class])] + public array $signatures; + + /** + * @var DocVersionsSignatures200ResponseProtection $protection + */ + #[JsonProperty('protection')] + public DocVersionsSignatures200ResponseProtection $protection; + + /** + * @param array{ + * chainValid: bool, + * revisions: array, + * signatures: array, + * protection: DocVersionsSignatures200ResponseProtection, + * } $values + */ + public function __construct( + array $values, + ) { + $this->chainValid = $values['chainValid']; + $this->revisions = $values['revisions']; + $this->signatures = $values['signatures']; + $this->protection = $values['protection']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseProtection.php b/src/Types/DocVersionsSignatures200ResponseProtection.php new file mode 100644 index 0000000..0c56764 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseProtection.php @@ -0,0 +1,67 @@ + $enforced + */ + #[JsonProperty('enforced')] + public ?string $enforced; + + /** + * @var ?value-of $judged + */ + #[JsonProperty('judged')] + public ?string $judged; + + /** + * @var ?DocVersionsSignatures200ResponseProtectionCertification $certification + */ + #[JsonProperty('certification')] + public ?DocVersionsSignatures200ResponseProtectionCertification $certification; + + /** + * @var array $fieldLocks + */ + #[JsonProperty('fieldLocks'), ArrayType([DocVersionsSignatures200ResponseProtectionFieldLocksItem::class])] + public array $fieldLocks; + + /** + * @var int $policyVersion + */ + #[JsonProperty('policyVersion')] + public int $policyVersion; + + /** + * @param array{ + * fieldLocks: array, + * policyVersion: int, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocVersionsSignatures200ResponseProtectionCertification, + * } $values + */ + public function __construct( + array $values, + ) { + $this->enforced = $values['enforced'] ?? null; + $this->judged = $values['judged'] ?? null; + $this->certification = $values['certification'] ?? null; + $this->fieldLocks = $values['fieldLocks']; + $this->policyVersion = $values['policyVersion']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionCertification.php b/src/Types/DocVersionsSignatures200ResponseProtectionCertification.php new file mode 100644 index 0000000..22bf04a --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseProtectionCertification.php @@ -0,0 +1,42 @@ +signatureIndex = $values['signatureIndex']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php b/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php new file mode 100644 index 0000000..d6111c3 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php @@ -0,0 +1,11 @@ + $source + */ + #[JsonProperty('source')] + public string $source; + + /** + * @var ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec $spec + */ + #[JsonProperty('spec')] + public ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec $spec; + + /** + * @param array{ + * signatureIndex: int, + * source: value-of, + * spec?: ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec, + * } $values + */ + public function __construct( + array $values, + ) { + $this->signatureIndex = $values['signatureIndex']; + $this->source = $values['source']; + $this->spec = $values['spec'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php new file mode 100644 index 0000000..80f3ddb --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php new file mode 100644 index 0000000..4454871 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php @@ -0,0 +1,10 @@ +index = $values['index']; + $this->end = $values['end']; + $this->xrefOffset = $values['xrefOffset']; + $this->signatureIndex = $values['signatureIndex'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItem.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItem.php new file mode 100644 index 0000000..76e6b34 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItem.php @@ -0,0 +1,171 @@ + $kind + */ + #[JsonProperty('kind')] + public string $kind; + + /** + * @var ?string $filter + */ + #[JsonProperty('filter')] + public ?string $filter; + + /** + * @var ?string $subFilter + */ + #[JsonProperty('subFilter')] + public ?string $subFilter; + + /** + * @var ?array $byteRange + */ + #[JsonProperty('byteRange'), ArrayType(['mixed'])] + public ?array $byteRange; + + /** + * @var int $contentsSize + */ + #[JsonProperty('contentsSize')] + public int $contentsSize; + + /** + * @var ?value-of $coverage + */ + #[JsonProperty('coverage')] + public ?string $coverage; + + /** + * @var ?int $revisionIndex + */ + #[JsonProperty('revisionIndex')] + public ?int $revisionIndex; + + /** + * @var DocVersionsSignatures200ResponseSignaturesItemSigner $signer + */ + #[JsonProperty('signer')] + public DocVersionsSignatures200ResponseSignaturesItemSigner $signer; + + /** + * @var ?float $docMdp + */ + #[JsonProperty('docMdp')] + public ?float $docMdp; + + /** + * @var bool $catalogCertification + */ + #[JsonProperty('catalogCertification')] + public bool $catalogCertification; + + /** + * @var ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp $fieldMdp + */ + #[JsonProperty('fieldMdp')] + public ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp $fieldMdp; + + /** + * @var ?DocVersionsSignatures200ResponseSignaturesItemLock $lock + */ + #[JsonProperty('lock')] + public ?DocVersionsSignatures200ResponseSignaturesItemLock $lock; + + /** + * @var ?DocVersionsSignatures200ResponseSignaturesItemSeedValue $seedValue + */ + #[JsonProperty('seedValue')] + public ?DocVersionsSignatures200ResponseSignaturesItemSeedValue $seedValue; + + /** + * @param array{ + * index: int, + * field: DocVersionsSignatures200ResponseSignaturesItemField, + * fieldName: string, + * signed: bool, + * kind: value-of, + * contentsSize: int, + * signer: DocVersionsSignatures200ResponseSignaturesItemSigner, + * catalogCertification: bool, + * widget?: ?DocVersionsSignatures200ResponseSignaturesItemWidget, + * filter?: ?string, + * subFilter?: ?string, + * byteRange?: ?array, + * coverage?: ?value-of, + * revisionIndex?: ?int, + * docMdp?: ?float, + * fieldMdp?: ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp, + * lock?: ?DocVersionsSignatures200ResponseSignaturesItemLock, + * seedValue?: ?DocVersionsSignatures200ResponseSignaturesItemSeedValue, + * } $values + */ + public function __construct( + array $values, + ) { + $this->index = $values['index']; + $this->field = $values['field']; + $this->fieldName = $values['fieldName']; + $this->widget = $values['widget'] ?? null; + $this->signed = $values['signed']; + $this->kind = $values['kind']; + $this->filter = $values['filter'] ?? null; + $this->subFilter = $values['subFilter'] ?? null; + $this->byteRange = $values['byteRange'] ?? null; + $this->contentsSize = $values['contentsSize']; + $this->coverage = $values['coverage'] ?? null; + $this->revisionIndex = $values['revisionIndex'] ?? null; + $this->signer = $values['signer']; + $this->docMdp = $values['docMdp'] ?? null; + $this->catalogCertification = $values['catalogCertification']; + $this->fieldMdp = $values['fieldMdp'] ?? null; + $this->lock = $values['lock'] ?? null; + $this->seedValue = $values['seedValue'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php new file mode 100644 index 0000000..1f294e7 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php @@ -0,0 +1,10 @@ +kind = $values['kind']; + $this->value = $values['value']; + } + + /** + * @param DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber $objectNumber + * @return DocVersionsSignatures200ResponseSignaturesItemField + */ + public static function objectNumber(DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber $objectNumber): DocVersionsSignatures200ResponseSignaturesItemField + { + return new DocVersionsSignatures200ResponseSignaturesItemField([ + 'kind' => 'objectNumber', + 'value' => $objectNumber, + ]); + } + + /** + * @param DocVersionsSignatures200ResponseSignaturesItemFieldFqn $fqn + * @return DocVersionsSignatures200ResponseSignaturesItemField + */ + public static function fqn(DocVersionsSignatures200ResponseSignaturesItemFieldFqn $fqn): DocVersionsSignatures200ResponseSignaturesItemField + { + return new DocVersionsSignatures200ResponseSignaturesItemField([ + 'kind' => 'fqn', + 'value' => $fqn, + ]); + } + + /** + * @return bool + */ + public function isObjectNumber(): bool + { + return $this->value instanceof DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber && $this->kind === 'objectNumber'; + } + + /** + * @return DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber + */ + public function asObjectNumber(): DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber + { + if (!($this->value instanceof DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber && $this->kind === 'objectNumber')) { + throw new Exception( + "Expected objectNumber; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return bool + */ + public function isFqn(): bool + { + return $this->value instanceof DocVersionsSignatures200ResponseSignaturesItemFieldFqn && $this->kind === 'fqn'; + } + + /** + * @return DocVersionsSignatures200ResponseSignaturesItemFieldFqn + */ + public function asFqn(): DocVersionsSignatures200ResponseSignaturesItemFieldFqn + { + if (!($this->value instanceof DocVersionsSignatures200ResponseSignaturesItemFieldFqn && $this->kind === 'fqn')) { + throw new Exception( + "Expected fqn; got " . $this->kind . " with value of type " . get_debug_type($this->value), + ); + } + + return $this->value; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } + + /** + * @return array + */ + public function jsonSerialize(): array + { + $result = []; + $result['kind'] = $this->kind; + + $base = parent::jsonSerialize(); + $result = array_merge($base, $result); + + switch ($this->kind) { + case 'objectNumber': + $value = $this->asObjectNumber()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case 'fqn': + $value = $this->asFqn()->jsonSerialize(); + $result = array_merge($value, $result); + break; + case '_unknown': + default: + if (is_null($this->value)) { + break; + } + if ($this->value instanceof JsonSerializableType) { + $value = $this->value->jsonSerialize(); + $result = array_merge($value, $result); + } elseif (is_array($this->value)) { + $result = array_merge($this->value, $result); + } + } + + return $result; + } + + /** + * @param array $data + */ + public static function jsonDeserialize(array $data): static + { + $args = []; + if (!array_key_exists('kind', $data)) { + throw new Exception( + "JSON data is missing property 'kind'", + ); + } + $kind = $data['kind']; + if (!(is_string($kind))) { + throw new Exception( + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), + ); + } + + $args['kind'] = $kind; + switch ($kind) { + case 'objectNumber': + $args['value'] = DocVersionsSignatures200ResponseSignaturesItemFieldObjectNumber::jsonDeserialize($data); + break; + case 'fqn': + $args['value'] = DocVersionsSignatures200ResponseSignaturesItemFieldFqn::jsonDeserialize($data); + break; + case '_unknown': + default: + $args['kind'] = '_unknown'; + $args['value'] = $data; + } + + // @phpstan-ignore-next-line + return new static($args); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldFqn.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldFqn.php new file mode 100644 index 0000000..025175a --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldFqn.php @@ -0,0 +1,34 @@ +name = $values['name']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdp.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdp.php new file mode 100644 index 0000000..00d2cb1 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdp.php @@ -0,0 +1,51 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php new file mode 100644 index 0000000..26ace10 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php @@ -0,0 +1,10 @@ +fieldObjectNumber = $values['fieldObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php new file mode 100644 index 0000000..54cc38c --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php @@ -0,0 +1,9 @@ + $action + */ + #[JsonProperty('action')] + public string $action; + + /** + * @var array $fields + */ + #[JsonProperty('fields'), ArrayType(['string'])] + public array $fields; + + /** + * @var ?float $permission + */ + #[JsonProperty('permission')] + public ?float $permission; + + /** + * @param array{ + * action: value-of, + * fields: array, + * permission?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->action = $values['action']; + $this->fields = $values['fields']; + $this->permission = $values['permission'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php new file mode 100644 index 0000000..be755ff --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php @@ -0,0 +1,10 @@ + $subFilters + */ + #[JsonProperty('subFilters'), ArrayType(['string'])] + public array $subFilters; + + /** + * @var array $digestMethods + */ + #[JsonProperty('digestMethods'), ArrayType(['string'])] + public array $digestMethods; + + /** + * @var array $reasons + */ + #[JsonProperty('reasons'), ArrayType(['string'])] + public array $reasons; + + /** + * @var bool $unsupportedRequired + */ + #[JsonProperty('unsupportedRequired')] + public bool $unsupportedRequired; + + /** + * @param array{ + * requiredFlags: int, + * presentFlags: int, + * subFilters: array, + * digestMethods: array, + * reasons: array, + * unsupportedRequired: bool, + * version?: ?int, + * mdp?: ?float, + * filter?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->requiredFlags = $values['requiredFlags']; + $this->presentFlags = $values['presentFlags']; + $this->version = $values['version'] ?? null; + $this->mdp = $values['mdp'] ?? null; + $this->filter = $values['filter'] ?? null; + $this->subFilters = $values['subFilters']; + $this->digestMethods = $values['digestMethods']; + $this->reasons = $values['reasons']; + $this->unsupportedRequired = $values['unsupportedRequired']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php new file mode 100644 index 0000000..b50d692 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php @@ -0,0 +1,66 @@ +name = $values['name'] ?? null; + $this->reason = $values['reason'] ?? null; + $this->location = $values['location'] ?? null; + $this->contactInfo = $values['contactInfo'] ?? null; + $this->claimedTime = $values['claimedTime'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemWidget.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemWidget.php new file mode 100644 index 0000000..b22cb72 --- /dev/null +++ b/src/Types/DocVersionsSignatures200ResponseSignaturesItemWidget.php @@ -0,0 +1,42 @@ +annotObjectNumber = $values['annotObjectNumber']; + $this->pageObjectNumber = $values['pageObjectNumber']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures404Response.php b/src/Types/DocVersionsSignatures404Response.php new file mode 100644 index 0000000..4c57191 --- /dev/null +++ b/src/Types/DocVersionsSignatures404Response.php @@ -0,0 +1,59 @@ + $name + */ + #[JsonProperty('name')] + public string $name; + + /** + * @var value-of $code + */ + #[JsonProperty('code')] + public string $code; + + /** + * @var string $message + */ + #[JsonProperty('message')] + public string $message; + + /** + * @var ?array $details + */ + #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] + public ?array $details; + + /** + * @param array{ + * name: value-of, + * code: value-of, + * message: string, + * details?: ?array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->name = $values['name']; + $this->code = $values['code']; + $this->message = $values['message']; + $this->details = $values['details'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocVersionsSignatures404ResponseCode.php b/src/Types/DocVersionsSignatures404ResponseCode.php new file mode 100644 index 0000000..3a484bb --- /dev/null +++ b/src/Types/DocVersionsSignatures404ResponseCode.php @@ -0,0 +1,32 @@ +