diff --git a/.fern/metadata.json b/.fern/metadata.json index f720cc36..b31e3913 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -5,9 +5,9 @@ "generatorConfig": { "moduleName": "CloudPDF" }, - "originGitCommit": "e074ee8465006a168ff6d8cfa73928df13ae159c", + "originGitCommit": "4b156274cbffac1a19f266d36d27b4ed07bf2b53", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.2.0", + "requestedVersion": "3.3.0", "ciProvider": "github" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 55f89b6c..21b60b6d 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "ruby", - "canonicalVersion": "3.2.0", - "sdkVersion": "3.2.0", + "canonicalVersion": "3.3.0", + "sdkVersion": "3.3.0", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "92b335b44d0957c70139f64ee3dd92e19d9d3a1452c90077002ed31dbddc3e7d", - "gitCommit": "e074ee8465006a168ff6d8cfa73928df13ae159c", + "openapiSha256": "8d6fda1d157a3f3f82d3a16835381932eaa6efe3054100bb0aa63c0ad5ac6909", + "gitCommit": "4b156274cbffac1a19f266d36d27b4ed07bf2b53", "gitCommitIsDirty": false }, "fern": { diff --git a/lib/CloudPDF/client.rb b/lib/CloudPDF/client.rb index cecb8095..0a88ff3f 100644 --- a/lib/CloudPDF/client.rb +++ b/lib/CloudPDF/client.rb @@ -13,7 +13,7 @@ def initialize(token:, base_url: nil, max_retries: 2) headers: { "X-Fern-Language" => "Ruby", Authorization: "Bearer #{token}", - "EmbedPDF-Version" => "3.2" + "EmbedPDF-Version" => "3.3" }, max_retries: max_retries ) diff --git a/lib/CloudPDF/doc/signatures/client.rb b/lib/CloudPDF/doc/signatures/client.rb index 61c62e4d..612205ef 100644 --- a/lib/CloudPDF/doc/signatures/client.rb +++ b/lib/CloudPDF/doc/signatures/client.rb @@ -225,8 +225,10 @@ def analysis(request_options: {}, **params) # Multipart: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock), naming the # appearance PDF it may carry as `resources: { appearance: '' }`, and that PDF as the part # `resource:`. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer - # is read-only until the signing completes, is cancelled, or expires (15 minutes). The signature is made over - # the layer's own base: the upload, or the version its last signature made. + # is read-only until the signing completes, is cancelled, or expires (15 minutes). A document timestamp (`kind: + # 'timestamp'`) may leave `field` out, since 3.3: the engine then makes a field of no size for it, under a name + # no other field has, and the answer names it in `field`. That needs `doc.sign` for the document. The signature + # is made over the layer's own base: the upload, or the version its last signature made. # # @param request_options [Hash] # @param params [void] @@ -277,6 +279,111 @@ def prepare(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # Each entry is one DER object, base64. It reads the layer as it is now, so entries stored and not yet sealed by + # a signature are among them. Arrived in 3.3. + # + # @param request_options [Hash] + # @param params [Hash] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :doc_id + # @option params [String] :layer_name + # @option params [String, nil] :document_password + # + # @example + # client.doc.signatures.validation_info( + # doc_id: "docId", + # layer_name: "layerName" + # ) + # + # @return [CloudPDF::Types::DocSignaturesValidationInfoResponse] + def validation_info(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + headers = {} + headers["X-Document-Password"] = params[:document_password] if params[:document_password] + + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/signatures/validation-info", + headers: headers, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise CloudPDF::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : CloudPDF::Types::DocSignaturesValidationInfoResponse.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Each entry is one DER object of at most 16 MiB, base64. An entry the file already holds, byte for byte, is not + # stored again: `added` counts the new ones. An entry that is not one DER object fails the request and nothing + # is stored; the error names it, as in `certificates[1]`. The server stores what it is given and asks no + # certificate authority: collect the answers first. It needs `doc.sign` for the document, not for a group of + # fields, and is refused after a certification that allows no changes. It cannot be undone, and it leaves undo + # for earlier changes as it was. Arrived in 3.3. + # + # @param request_options [Hash] + # @param params [CloudPDF::Doc::Signatures::Types::DocSignaturesAddValidationInfoRequest] + # @option request_options [String] :base_url + # @option request_options [Hash{String => Object}] :additional_headers + # @option request_options [Hash{String => Object}] :additional_query_parameters + # @option request_options [Hash{String => Object}] :additional_body_parameters + # @option request_options [Integer] :timeout_in_seconds + # @option params [String] :doc_id + # @option params [String] :layer_name + # @option params [String, nil] :document_password + # @option params [String, nil] :idempotency_key + # + # @example + # client.doc.signatures.add_validation_info( + # doc_id: "docId", + # layer_name: "layerName" + # ) + # + # @return [CloudPDF::Types::DocSignaturesAddValidationInfoResponse] + def add_validation_info(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + request_data = CloudPDF::Doc::Signatures::Types::DocSignaturesAddValidationInfoRequest.new(params).to_h + non_body_param_names = %w[docId layerName X-Document-Password Idempotency-Key] + body = request_data.except(*non_body_param_names) + + headers = {} + headers["X-Document-Password"] = params[:document_password] if params[:document_password] + headers["Idempotency-Key"] = params[:idempotency_key] if params[:idempotency_key] + + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/signatures/validation-info", + headers: headers, + body: body, + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise CloudPDF::Errors::TimeoutError + end + code = response.code.to_i + if code.between?(200, 299) + (response.body.to_s.empty? ? nil : CloudPDF::Types::DocSignaturesAddValidationInfoResponse.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end end end end diff --git a/lib/CloudPDF/doc/signatures/types/doc_signatures_add_validation_info_request.rb b/lib/CloudPDF/doc/signatures/types/doc_signatures_add_validation_info_request.rb new file mode 100644 index 00000000..275c1ad2 --- /dev/null +++ b/lib/CloudPDF/doc/signatures/types/doc_signatures_add_validation_info_request.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module CloudPDF + module Doc + module Signatures + module Types + class DocSignaturesAddValidationInfoRequest < Internal::Types::Model + field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId" + + field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName" + + field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password" + + field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "Idempotency-Key" + + field :certificates, -> { Internal::Types::Array[String] }, optional: true, nullable: false + + field :ocsp_responses, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "ocspResponses" + + field :crls, -> { Internal::Types::Array[String] }, optional: true, nullable: false + end + end + end + end +end diff --git a/lib/CloudPDF/doc/signatures/types/validation_info_signatures_request.rb b/lib/CloudPDF/doc/signatures/types/validation_info_signatures_request.rb new file mode 100644 index 00000000..a35df987 --- /dev/null +++ b/lib/CloudPDF/doc/signatures/types/validation_info_signatures_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Doc + module Signatures + module Types + class ValidationInfoSignaturesRequest < Internal::Types::Model + field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId" + + field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName" + + field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password" + end + end + end + end +end diff --git a/lib/CloudPDF/doc/versions/client.rb b/lib/CloudPDF/doc/versions/client.rb index 82c7c207..5c042ee0 100644 --- a/lib/CloudPDF/doc/versions/client.rb +++ b/lib/CloudPDF/doc/versions/client.rb @@ -59,7 +59,9 @@ def list(request_options: {}, **params) end # Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer - # for every caller. + # for every caller. A version never changes, but the rules that judge it can: with `engine`, the `analysis` + # value of the layer's head, a settled answer is `immutable`. Without it, or with another value, the answer is + # this server's own, with `no-store` and the current value in `EmbedPDF-Engine`. # # @param request_options [Hash] # @param params [Hash] @@ -75,7 +77,7 @@ def list(request_options: {}, **params) # @option params [Integer, nil] :since_revision # @option params [CloudPDF::Doc::Versions::Types::AnalysisVersionsRequestLevel, nil] :level # @option params [Integer, nil] :until_ - # @option params [Integer, nil] :policy + # @option params [String, nil] :engine # @option params [String, nil] :document_password # # @example @@ -93,7 +95,7 @@ def analysis(request_options: {}, **params) query_params["since.revision"] = params[:since_revision] if params.key?(:since_revision) query_params["level"] = params[:level] if params.key?(:level) query_params["until"] = params[:until_] if params.key?(:until_) - query_params["policy"] = params[:policy] if params.key?(:policy) + query_params["engine"] = params[:engine] if params.key?(:engine) headers = {} headers["X-Document-Password"] = params[:document_password] if params[:document_password] @@ -210,6 +212,10 @@ def revision(request_options: {}, **params) raise error_class.new(response.body, code: code) end + # A version never changes, but what the server reads from it can: with `engine`, the `signatures` value of the + # layer's head, the answer is `immutable`. Without it, or with another value, the answer is this server's own, + # with `no-store` and the current value in `EmbedPDF-Engine`. + # # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url @@ -220,6 +226,7 @@ def revision(request_options: {}, **params) # @option params [String] :doc_id # @option params [String] :layer_name # @option params [String] :sha256 + # @option params [String, nil] :engine # @option params [String, nil] :document_password # # @example @@ -232,6 +239,9 @@ def revision(request_options: {}, **params) # @return [CloudPDF::Types::DocVersionsSignaturesResponse] def signatures(request_options: {}, **params) params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["engine"] = params[:engine] if params.key?(:engine) + headers = {} headers["X-Document-Password"] = params[:document_password] if params[:document_password] @@ -240,6 +250,7 @@ def signatures(request_options: {}, **params) method: "GET", path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha256].to_s)}", headers: headers, + query: query_params, request_options: request_options ) begin diff --git a/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb b/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb index f02c0747..95df8540 100644 --- a/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb +++ b/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb @@ -19,7 +19,7 @@ class AnalysisVersionsRequest < Internal::Types::Model field :until_, -> { Integer }, optional: true, nullable: false, api_name: "until" - field :policy, -> { Integer }, optional: true, nullable: false + field :engine, -> { String }, optional: true, nullable: false field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password" end diff --git a/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb b/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb index e3ff934f..e283ebe4 100644 --- a/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb +++ b/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb @@ -11,6 +11,8 @@ class SignaturesVersionsRequest < Internal::Types::Model field :sha256, -> { String }, optional: false, nullable: false + field :engine, -> { String }, optional: true, nullable: false + field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password" end end diff --git a/lib/CloudPDF/types/doc_signatures_add_validation_info_response.rb b/lib/CloudPDF/types/doc_signatures_add_validation_info_response.rb new file mode 100644 index 00000000..88be68b9 --- /dev/null +++ b/lib/CloudPDF/types/doc_signatures_add_validation_info_response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocSignaturesAddValidationInfoResponse < Internal::Types::Model + field :added, -> { CloudPDF::Types::DocSignaturesAddValidationInfoResponseAdded }, optional: false, nullable: false + + field :meta, -> { CloudPDF::Types::MutationMeta }, optional: false, nullable: false + end + end +end diff --git a/lib/CloudPDF/types/doc_signatures_add_validation_info_response_added.rb b/lib/CloudPDF/types/doc_signatures_add_validation_info_response_added.rb new file mode 100644 index 00000000..6b021d6d --- /dev/null +++ b/lib/CloudPDF/types/doc_signatures_add_validation_info_response_added.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocSignaturesAddValidationInfoResponseAdded < Internal::Types::Model + field :certificates, -> { Integer }, optional: false, nullable: false + + field :ocsp_responses, -> { Integer }, optional: false, nullable: false, api_name: "ocspResponses" + + field :crls, -> { Integer }, optional: false, nullable: false + end + end +end diff --git a/lib/CloudPDF/types/doc_signatures_prepare_response.rb b/lib/CloudPDF/types/doc_signatures_prepare_response.rb index 9181c0a4..8570c26a 100644 --- a/lib/CloudPDF/types/doc_signatures_prepare_response.rb +++ b/lib/CloudPDF/types/doc_signatures_prepare_response.rb @@ -18,6 +18,8 @@ class DocSignaturesPrepareResponse < Internal::Types::Model field :expected_version, -> { CloudPDF::Types::DocSignaturesPrepareResponseExpectedVersion }, optional: false, nullable: false, api_name: "expectedVersion" field :expires_at, -> { String }, optional: false, nullable: true, api_name: "expiresAt" + + field :field, -> { CloudPDF::Types::FormFieldRef }, optional: true, nullable: false end end end diff --git a/lib/CloudPDF/types/doc_signatures_validation_info_response.rb b/lib/CloudPDF/types/doc_signatures_validation_info_response.rb new file mode 100644 index 00000000..4ebbb820 --- /dev/null +++ b/lib/CloudPDF/types/doc_signatures_validation_info_response.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocSignaturesValidationInfoResponse < Internal::Types::Model + field :certificates, -> { Internal::Types::Array[String] }, optional: false, nullable: false + + field :ocsp_responses, -> { Internal::Types::Array[String] }, optional: false, nullable: false, api_name: "ocspResponses" + + field :crls, -> { Internal::Types::Array[String] }, optional: false, nullable: false + end + end +end diff --git a/lib/CloudPDF/version.rb b/lib/CloudPDF/version.rb index d51d4b01..fd54bd90 100644 --- a/lib/CloudPDF/version.rb +++ b/lib/CloudPDF/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module CloudPDF - VERSION = "3.2.0" + VERSION = "3.3.0" end diff --git a/lib/cloudpdf.rb b/lib/cloudpdf.rb index fb7c1870..aa7cf65e 100644 --- a/lib/cloudpdf.rb +++ b/lib/cloudpdf.rb @@ -1402,6 +1402,9 @@ require_relative "CloudPDF/types/doc_signatures_analysis_response_later" require_relative "CloudPDF/types/doc_signatures_analysis_response_verdict" require_relative "CloudPDF/types/doc_signatures_analysis_response" +require_relative "CloudPDF/types/doc_signatures_validation_info_response" +require_relative "CloudPDF/types/doc_signatures_add_validation_info_response_added" +require_relative "CloudPDF/types/doc_signatures_add_validation_info_response" require_relative "CloudPDF/types/doc_signatures_prepare_response_algorithm" require_relative "CloudPDF/types/doc_signatures_prepare_response_expected_version" require_relative "CloudPDF/types/doc_signatures_prepare_response" @@ -1597,6 +1600,8 @@ require_relative "CloudPDF/doc/signatures/types/doc_signatures_complete_request" require_relative "CloudPDF/doc/signatures/types/analysis_signatures_request" require_relative "CloudPDF/doc/signatures/types/prepare_signatures_request" +require_relative "CloudPDF/doc/signatures/types/validation_info_signatures_request" +require_relative "CloudPDF/doc/signatures/types/doc_signatures_add_validation_info_request" require_relative "CloudPDF/doc/versions/client" require_relative "CloudPDF/doc/versions/types/list_versions_request" require_relative "CloudPDF/doc/versions/types/analysis_versions_request" diff --git a/reference.md b/reference.md index c102c7f8..7eeb53bd 100644 --- a/reference.md +++ b/reference.md @@ -6342,7 +6342,7 @@ client.doc.signatures.analysis(
-Multipart: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock), naming the appearance PDF it may carry as `resources: { appearance: '' }`, and that PDF as the part `resource:`. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer is read-only until the signing completes, is cancelled, or expires (15 minutes). The signature is made over the layer's own base: the upload, or the version its last signature made. +Multipart: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock), naming the appearance PDF it may carry as `resources: { appearance: '' }`, and that PDF as the part `resource:`. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer is read-only until the signing completes, is cancelled, or expires (15 minutes). A document timestamp (`kind: 'timestamp'`) may leave `field` out, since 3.3: the engine then makes a field of no size for it, under a name no other field has, and the answer names it in `field`. That needs `doc.sign` for the document. The signature is made over the layer's own base: the upload, or the version its last signature made.
@@ -6407,6 +6407,200 @@ client.doc.signatures.prepare( + + + + +
client.doc.signatures.validation_info(doc_id:, layer_name:) -> CloudPDF::Types::DocSignaturesValidationInfoResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Each entry is one DER object, base64. It reads the layer as it is now, so entries stored and not yet sealed by a signature are among them. Arrived in 3.3. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.doc.signatures.validation_info( + doc_id: "docId", + layer_name: "layerName" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**doc_id:** `String` + +
+
+ +
+
+ +**layer_name:** `String` + +
+
+ +
+
+ +**document_password:** `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. + +
+
+ +
+
+ +**request_options:** `CloudPDF::Doc::Signatures::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.doc.signatures.add_validation_info(doc_id:, layer_name:, request) -> CloudPDF::Types::DocSignaturesAddValidationInfoResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Each entry is one DER object of at most 16 MiB, base64. An entry the file already holds, byte for byte, is not stored again: `added` counts the new ones. An entry that is not one DER object fails the request and nothing is stored; the error names it, as in `certificates[1]`. The server stores what it is given and asks no certificate authority: collect the answers first. It needs `doc.sign` for the document, not for a group of fields, and is refused after a certification that allows no changes. It cannot be undone, and it leaves undo for earlier changes as it was. Arrived in 3.3. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.doc.signatures.add_validation_info( + doc_id: "docId", + layer_name: "layerName" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**doc_id:** `String` + +
+
+ +
+
+ +**layer_name:** `String` + +
+
+ +
+
+ +**document_password:** `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. + +
+
+ +
+
+ +**idempotency_key:** `String` — Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. + +
+
+ +
+
+ +**certificates:** `Internal::Types::Array[String]` + +
+
+ +
+
+ +**ocsp_responses:** `Internal::Types::Array[String]` + +
+
+ +
+
+ +**crls:** `Internal::Types::Array[String]` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Doc::Signatures::RequestOptions` + +
+
+
+
+ +
@@ -6505,7 +6699,7 @@ client.doc.versions.list(
-Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every caller. +Exactly one of `since.signature` / `since.revision`; `until=` defaults to the last. The same answer for every caller. A version never changes, but the rules that judge it can: with `engine`, the `analysis` value of the layer's head, a settled answer is `immutable`. Without it, or with another value, the answer is this server's own, with `no-store` and the current value in `EmbedPDF-Engine`.
@@ -6595,7 +6789,7 @@ client.doc.versions.analysis(
-**policy:** `Integer` +**engine:** `String` — The `analysis` engine value from the layer's head (`engine.analysis`): the rules the answer is judged with. With it, a settled answer is cached.
@@ -6788,6 +6982,20 @@ client.doc.versions.revision(
+#### 📝 Description + +
+
+ +
+
+ +A version never changes, but what the server reads from it can: with `engine`, the `signatures` value of the layer's head, the answer is `immutable`. Without it, or with another value, the answer is this server's own, with `no-store` and the current value in `EmbedPDF-Engine`. +
+
+
+
+ #### 🔌 Usage
@@ -6840,6 +7048,14 @@ client.doc.versions.signatures(
+**engine:** `String` — The `signatures` engine value from the layer's head (`engine.signatures`): what the answer is computed with besides the file. With it, the answer is cached. + +
+
+ +
+
+ **document_password:** `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.