diff --git a/.fern/metadata.json b/.fern/metadata.json index 95ab9228..4600f4b1 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -5,9 +5,9 @@ "generatorConfig": { "moduleName": "CloudPDF" }, - "originGitCommit": "7ded7de29f4cc0dc9da18042fca6afd5c9557bfc", + "originGitCommit": "07aa3f26c82243b36a5ec94f7072130c7298d977", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0.alpha.16", + "requestedVersion": "3.0.0.alpha.17", "ciProvider": "github" } \ No newline at end of file diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 473885f2..977cc7df 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,12 +1,12 @@ { "language": "ruby", - "canonicalVersion": "3.0.0-next.16", - "sdkVersion": "3.0.0.alpha.16", + "canonicalVersion": "3.0.0-next.17", + "sdkVersion": "3.0.0.alpha.17", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "06543c26918bd79d426bf242c5a3091cdb7d298d3ac3296addabee2be80edb15", - "gitCommit": "7ded7de29f4cc0dc9da18042fca6afd5c9557bfc", + "openapiSha256": "8fa53cef2776eb0de9ec50c263aa547b309a04d1a2ecb6ee54b6338d6698dc00", + "gitCommit": "07aa3f26c82243b36a5ec94f7072130c7298d977", "gitCommitIsDirty": false }, "fern": { diff --git a/lib/CloudPDF/doc/client.rb b/lib/CloudPDF/doc/client.rb index 6eb6ccff..b8f3daac 100644 --- a/lib/CloudPDF/doc/client.rb +++ b/lib/CloudPDF/doc/client.rb @@ -157,6 +157,61 @@ def download(request_options: {}, **params) raise error_class.new(response.body, code: code) end + # The link opens the layer as it is when created: once the layer changes, it answers 404, so create it right + # before handing it over. It downloads that one file and nothing else, and a password-protected document is + # checked when the link is created. Deployments that verify tokens with their own keys (JWKS) mint links on their + # backend: a doc token with `layer_name`, a `download: { docVersion, mode: "incremental" }` claim and a short + # `exp`, passed as `link` on the versioned download URL. + # + # @param request_options [Hash] + # @param params [CloudPDF::Doc::Types::DocDownloadLinkRequest] + # @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.download_link( + # doc_id: "docId", + # layer_name: "layerName" + # ) + # + # @return [CloudPDF::Types::DocDownloadLink200Response] + def download_link(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + request_data = CloudPDF::Doc::Types::DocDownloadLinkRequest.new(params).to_h + non_body_param_names = %w[docId layerName X-Document-Password] + body = request_data.except(*non_body_param_names) + + 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: "POST", + path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/download-link", + 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::DocDownloadLink200Response.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + # @param request_options [Hash] # @param params [Hash] # @option request_options [String] :base_url diff --git a/lib/CloudPDF/doc/types/doc_download_link_request.rb b/lib/CloudPDF/doc/types/doc_download_link_request.rb new file mode 100644 index 00000000..d2e7e3d7 --- /dev/null +++ b/lib/CloudPDF/doc/types/doc_download_link_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Doc + module Types + class DocDownloadLinkRequest < 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 :expires_in, -> { Integer }, optional: true, nullable: false, api_name: "expiresIn" + end + end + end +end diff --git a/lib/CloudPDF/documents/client.rb b/lib/CloudPDF/documents/client.rb index d741296b..004a75af 100644 --- a/lib/CloudPDF/documents/client.rb +++ b/lib/CloudPDF/documents/client.rb @@ -392,6 +392,11 @@ def init(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # @return [CloudPDF::Layers::Client] + def layers + @layers ||= CloudPDF::Documents::Layers::Client.new(client: @client) + end end end end diff --git a/lib/CloudPDF/documents/layers/client.rb b/lib/CloudPDF/documents/layers/client.rb new file mode 100644 index 00000000..2cba34cd --- /dev/null +++ b/lib/CloudPDF/documents/layers/client.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +module CloudPDF + module Documents + module Layers + class Client + # @param client [CloudPDF::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # @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] :tenant_id + # @option params [String] :id + # @option params [Integer, nil] :limit + # @option params [String, nil] :cursor + # @option params [String, nil] :share_id + # + # @example + # client.documents.layers.list( + # tenant_id: "tenantId", + # id: "id" + # ) + # + # @return [CloudPDF::Types::DocumentsLayersList200Response] + def list(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["cursor"] = params[:cursor] if params.key?(:cursor) + query_params["shareId"] = params[:share_id] if params.key?(:share_id) + + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/documents/#{URI.encode_uri_component(params[:id].to_s)}/layers", + query: query_params, + 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::DocumentsLayersList200Response.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @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] :tenant_id + # @option params [String] :id + # @option params [String] :layer_name + # + # @example + # client.documents.layers.delete( + # tenant_id: "tenantId", + # id: "id", + # layer_name: "layerName" + # ) + # + # @return [untyped] + def delete(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "DELETE", + path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/documents/#{URI.encode_uri_component(params[:id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise CloudPDF::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + 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/documents/layers/types/delete_layers_request.rb b/lib/CloudPDF/documents/layers/types/delete_layers_request.rb new file mode 100644 index 00000000..413376d8 --- /dev/null +++ b/lib/CloudPDF/documents/layers/types/delete_layers_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Documents + module Layers + module Types + class DeleteLayersRequest < Internal::Types::Model + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :id, -> { String }, optional: false, nullable: false + + field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName" + end + end + end + end +end diff --git a/lib/CloudPDF/documents/layers/types/list_layers_request.rb b/lib/CloudPDF/documents/layers/types/list_layers_request.rb new file mode 100644 index 00000000..9d466b0f --- /dev/null +++ b/lib/CloudPDF/documents/layers/types/list_layers_request.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module CloudPDF + module Documents + module Layers + module Types + class ListLayersRequest < Internal::Types::Model + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :id, -> { String }, optional: false, nullable: false + + field :limit, -> { Integer }, optional: true, nullable: false + + field :cursor, -> { String }, optional: true, nullable: false + + field :share_id, -> { String }, optional: true, nullable: false, api_name: "shareId" + end + end + end + end +end diff --git a/lib/CloudPDF/shares/client.rb b/lib/CloudPDF/shares/client.rb index 310eec2f..94e31042 100644 --- a/lib/CloudPDF/shares/client.rb +++ b/lib/CloudPDF/shares/client.rb @@ -12,7 +12,12 @@ def initialize(client:) # Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, # and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired - # until `password` is supplied. Mounted only when the deployment can sign (HS256 mode). + # until `password` is supplied. A link that asks its visitors who they are on open returns 422 + # VisitorIdentityRequired until the required answers are given; `error.details` carries `fields` (what the link + # asks), `missing`, `invalid`, `purpose` and `privacyUrl`. A link that asks before the first change issues the + # session at once with `visitor.identityRequest`, and writes answer 403 VisitorIdentityRequired with the same + # details until the visitor exchanges again with their answers. Answers that can not be taken answer 422 on any + # link. Mounted only when the deployment can sign (HS256 mode). # # @param request_options [Hash] # @param params [CloudPDF::Shares::Types::SharesExchangeRequest] @@ -60,6 +65,7 @@ def exchange(request_options: {}, **params) # @option params [Integer, nil] :limit # @option params [String, nil] :cursor # @option params [String, nil] :doc_id + # @option params [Boolean, nil] :archived # # @example # client.shares.list(tenant_id: "tenantId") @@ -71,6 +77,7 @@ def list(request_options: {}, **params) query_params["limit"] = params[:limit] if params.key?(:limit) query_params["cursor"] = params[:cursor] if params.key?(:cursor) query_params["docId"] = params[:doc_id] if params.key?(:doc_id) + query_params["archived"] = params[:archived] if params.key?(:archived) request = CloudPDF::Internal::JSON::Request.new( base_url: request_options[:base_url], @@ -259,6 +266,54 @@ def update(request_options: {}, **params) raise error_class.new(response.body, code: code) end end + + # Archiving is final: an archived link never exchanges again, and to share again you create a new link. Pausing + # (`disabled`) is the reversible stop. An archived link no longer counts as using its shared layer, so that layer + # can be deleted. + # + # @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] :tenant_id + # @option params [String] :share_id + # + # @example + # client.shares.archive( + # tenant_id: "tenantId", + # share_id: "shareId" + # ) + # + # @return [CloudPDF::Types::SharesArchive200Response] + def archive(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "POST", + path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/shares/#{URI.encode_uri_component(params[:share_id].to_s)}/archive", + 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::SharesArchive200Response.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # @return [CloudPDF::Visitors::Client] + def visitors + @visitors ||= CloudPDF::Shares::Visitors::Client.new(client: @client) + end end end end diff --git a/lib/CloudPDF/shares/types/archive_shares_request.rb b/lib/CloudPDF/shares/types/archive_shares_request.rb new file mode 100644 index 00000000..86acb3ae --- /dev/null +++ b/lib/CloudPDF/shares/types/archive_shares_request.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class ArchiveSharesRequest < Internal::Types::Model + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :share_id, -> { String }, optional: false, nullable: false, api_name: "shareId" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/list_shares_request.rb b/lib/CloudPDF/shares/types/list_shares_request.rb index 918633b6..19faa7da 100644 --- a/lib/CloudPDF/shares/types/list_shares_request.rb +++ b/lib/CloudPDF/shares/types/list_shares_request.rb @@ -11,6 +11,8 @@ class ListSharesRequest < Internal::Types::Model field :cursor, -> { String }, optional: true, nullable: false field :doc_id, -> { String }, optional: true, nullable: false, api_name: "docId" + + field :archived, -> { Internal::Types::Boolean }, optional: true, nullable: false end end end diff --git a/lib/CloudPDF/shares/types/shares_create_request.rb b/lib/CloudPDF/shares/types/shares_create_request.rb index f9ba0aae..34d833e9 100644 --- a/lib/CloudPDF/shares/types/shares_create_request.rb +++ b/lib/CloudPDF/shares/types/shares_create_request.rb @@ -8,8 +8,16 @@ class SharesCreateRequest < Internal::Types::Model field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId" + field :layer_mode, -> { CloudPDF::Shares::Types::SharesCreateRequestLayerMode }, optional: true, nullable: false, api_name: "layerMode" + field :layer_name, -> { String }, optional: true, nullable: false, api_name: "layerName" + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: true, nullable: false, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity" + field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false diff --git a/lib/CloudPDF/shares/types/shares_create_request_layer_mode.rb b/lib/CloudPDF/shares/types/shares_create_request_layer_mode.rb new file mode 100644 index 00000000..66079bcf --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_layer_mode.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity.rb new file mode 100644 index 00000000..d3c9aef5 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class SharesCreateRequestVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_ask.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_ask.rb new file mode 100644 index 00000000..7fec8833 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_ask.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields.rb new file mode 100644 index 00000000..d5531ff3 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class SharesCreateRequestVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_display_name.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..896147d7 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_display_name.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_email.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_email.rb new file mode 100644 index 00000000..4b4bc0db --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_email.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organization.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..093c631a --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organization.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..fe4bb2f5 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_title.rb b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_title.rb new file mode 100644 index 00000000..abfff053 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_create_request_visitor_identity_fields_title.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesCreateRequestVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_exchange_request.rb b/lib/CloudPDF/shares/types/shares_exchange_request.rb index e12cd745..f6fddc2b 100644 --- a/lib/CloudPDF/shares/types/shares_exchange_request.rb +++ b/lib/CloudPDF/shares/types/shares_exchange_request.rb @@ -7,6 +7,12 @@ class SharesExchangeRequest < Internal::Types::Model field :share_token, -> { String }, optional: false, nullable: false, api_name: "shareToken" field :password, -> { String }, optional: true, nullable: false + + field :visitor_handle, -> { String }, optional: true, nullable: false, api_name: "visitorHandle" + + field :restart, -> { Internal::Types::Boolean }, optional: true, nullable: false + + field :visitor_identity, -> { CloudPDF::Shares::Types::SharesExchangeRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity" end end end diff --git a/lib/CloudPDF/shares/types/shares_exchange_request_visitor_identity.rb b/lib/CloudPDF/shares/types/shares_exchange_request_visitor_identity.rb new file mode 100644 index 00000000..1773ac29 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_exchange_request_visitor_identity.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class SharesExchangeRequestVisitorIdentity < Internal::Types::Model + field :display_name, -> { String }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { String }, optional: true, nullable: false + + field :title, -> { String }, optional: true, nullable: false + + field :organization, -> { String }, optional: true, nullable: false + + field :organizational_unit, -> { String }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request.rb b/lib/CloudPDF/shares/types/shares_update_request.rb index addf837a..b8ebe193 100644 --- a/lib/CloudPDF/shares/types/shares_update_request.rb +++ b/lib/CloudPDF/shares/types/shares_update_request.rb @@ -8,6 +8,16 @@ class SharesUpdateRequest < Internal::Types::Model field :share_id, -> { String }, optional: false, nullable: false, api_name: "shareId" + field :layer_mode, -> { CloudPDF::Shares::Types::SharesUpdateRequestLayerMode }, optional: true, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: true, nullable: false, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: true, nullable: false, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity" + field :scope, -> { Internal::Types::Array[String] }, optional: true, nullable: false field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false diff --git a/lib/CloudPDF/shares/types/shares_update_request_layer_mode.rb b/lib/CloudPDF/shares/types/shares_update_request_layer_mode.rb new file mode 100644 index 00000000..f75255e6 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_layer_mode.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity.rb new file mode 100644 index 00000000..136f2e3f --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class SharesUpdateRequestVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_ask.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_ask.rb new file mode 100644 index 00000000..07600134 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_ask.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields.rb new file mode 100644 index 00000000..00751102 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + class SharesUpdateRequestVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_display_name.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..3c0ed72e --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_display_name.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_email.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_email.rb new file mode 100644 index 00000000..d8f8d5eb --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_email.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organization.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..c5096594 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organization.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..fabe4b59 --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_title.rb b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_title.rb new file mode 100644 index 00000000..3125878a --- /dev/null +++ b/lib/CloudPDF/shares/types/shares_update_request_visitor_identity_fields_title.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Types + module SharesUpdateRequestVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end + end +end diff --git a/lib/CloudPDF/shares/visitors/client.rb b/lib/CloudPDF/shares/visitors/client.rb new file mode 100644 index 00000000..93078fd8 --- /dev/null +++ b/lib/CloudPDF/shares/visitors/client.rb @@ -0,0 +1,106 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Visitors + class Client + # @param client [CloudPDF::Internal::Http::RawClient] + # + # @return [void] + def initialize(client:) + @client = client + end + + # An archived link's visitors are listed too. + # + # @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] :tenant_id + # @option params [String] :share_id + # @option params [Integer, nil] :limit + # @option params [String, nil] :cursor + # + # @example + # client.shares.visitors.list( + # tenant_id: "tenantId", + # share_id: "shareId" + # ) + # + # @return [CloudPDF::Types::SharesVisitorsList200Response] + def list(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + query_params = {} + query_params["limit"] = params[:limit] if params.key?(:limit) + query_params["cursor"] = params[:cursor] if params.key?(:cursor) + + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "GET", + path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/shares/#{URI.encode_uri_component(params[:share_id].to_s)}/visitors", + query: query_params, + 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::SharesVisitorsList200Response.load(response.body)) + else + error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code) + raise error_class.new(response.body, code: code) + end + end + + # Their handle brings them back as a new visitor, who is asked again. Deleting a visitor already deleted changes + # nothing. + # + # @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] :tenant_id + # @option params [String] :share_id + # @option params [String] :visitor_id + # + # @example + # client.shares.visitors.delete( + # tenant_id: "tenantId", + # share_id: "shareId", + # visitor_id: "visitorId" + # ) + # + # @return [untyped] + def delete(request_options: {}, **params) + params = CloudPDF::Internal::Types::Utils.normalize_keys(params) + request = CloudPDF::Internal::JSON::Request.new( + base_url: request_options[:base_url], + method: "DELETE", + path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/shares/#{URI.encode_uri_component(params[:share_id].to_s)}/visitors/#{URI.encode_uri_component(params[:visitor_id].to_s)}", + request_options: request_options + ) + begin + response = @client.send(request) + rescue Net::HTTPRequestTimeout + raise CloudPDF::Errors::TimeoutError + end + code = response.code.to_i + return if code.between?(200, 299) + + 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/shares/visitors/types/delete_visitors_request.rb b/lib/CloudPDF/shares/visitors/types/delete_visitors_request.rb new file mode 100644 index 00000000..3b1a8921 --- /dev/null +++ b/lib/CloudPDF/shares/visitors/types/delete_visitors_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Visitors + module Types + class DeleteVisitorsRequest < Internal::Types::Model + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :share_id, -> { String }, optional: false, nullable: false, api_name: "shareId" + + field :visitor_id, -> { String }, optional: false, nullable: false, api_name: "visitorId" + end + end + end + end +end diff --git a/lib/CloudPDF/shares/visitors/types/list_visitors_request.rb b/lib/CloudPDF/shares/visitors/types/list_visitors_request.rb new file mode 100644 index 00000000..f1fcaf46 --- /dev/null +++ b/lib/CloudPDF/shares/visitors/types/list_visitors_request.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module CloudPDF + module Shares + module Visitors + module Types + class ListVisitorsRequest < Internal::Types::Model + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :share_id, -> { String }, optional: false, nullable: false, api_name: "shareId" + + field :limit, -> { Integer }, optional: true, nullable: false + + field :cursor, -> { String }, optional: true, nullable: false + end + end + end + end +end diff --git a/lib/CloudPDF/types/admin_error_payload_error.rb b/lib/CloudPDF/types/admin_error_payload_error.rb index c542d7af..1ed50567 100644 --- a/lib/CloudPDF/types/admin_error_payload_error.rb +++ b/lib/CloudPDF/types/admin_error_payload_error.rb @@ -6,6 +6,8 @@ class AdminErrorPayloadError < Internal::Types::Model field :code, -> { String }, optional: false, nullable: false field :message, -> { String }, optional: false, nullable: false + + field :details, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false end end end diff --git a/lib/CloudPDF/types/doc_download_link200response.rb b/lib/CloudPDF/types/doc_download_link200response.rb new file mode 100644 index 00000000..b1f50bf0 --- /dev/null +++ b/lib/CloudPDF/types/doc_download_link200response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocDownloadLink200Response < Internal::Types::Model + field :url, -> { String }, optional: false, nullable: false + + field :expires_at, -> { Integer }, optional: false, nullable: false, api_name: "expiresAt" + end + end +end diff --git a/lib/CloudPDF/types/doc_download_link404response.rb b/lib/CloudPDF/types/doc_download_link404response.rb new file mode 100644 index 00000000..51a8454a --- /dev/null +++ b/lib/CloudPDF/types/doc_download_link404response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocDownloadLink404Response + # DocDownloadLink404Response is an alias for EngineErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/doc_download_link501response.rb b/lib/CloudPDF/types/doc_download_link501response.rb new file mode 100644 index 00000000..42a6f446 --- /dev/null +++ b/lib/CloudPDF/types/doc_download_link501response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocDownloadLink501Response + # DocDownloadLink501Response is an alias for EngineErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_delete403response.rb b/lib/CloudPDF/types/documents_layers_delete403response.rb new file mode 100644 index 00000000..93c24201 --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_delete403response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersDelete403Response + # DocumentsLayersDelete403Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_delete404response.rb b/lib/CloudPDF/types/documents_layers_delete404response.rb new file mode 100644 index 00000000..9cbf541c --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_delete404response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersDelete404Response + # DocumentsLayersDelete404Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_delete409response.rb b/lib/CloudPDF/types/documents_layers_delete409response.rb new file mode 100644 index 00000000..fc50071e --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_delete409response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersDelete409Response + # DocumentsLayersDelete409Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_list200response.rb b/lib/CloudPDF/types/documents_layers_list200response.rb new file mode 100644 index 00000000..468bfefe --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_list200response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocumentsLayersList200Response < Internal::Types::Model + field :layers, -> { Internal::Types::Array[CloudPDF::Types::DocumentsLayersList200ResponseLayersItem] }, optional: false, nullable: false + + field :next_cursor, -> { String }, optional: true, nullable: false, api_name: "nextCursor" + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_list200response_layers_item.rb b/lib/CloudPDF/types/documents_layers_list200response_layers_item.rb new file mode 100644 index 00000000..844aac2c --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_list200response_layers_item.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class DocumentsLayersList200ResponseLayersItem < 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 :share_id, -> { String }, optional: false, nullable: true, api_name: "shareId" + + field :visitor_id, -> { String }, optional: false, nullable: true, api_name: "visitorId" + + field :storage_size_bytes, -> { Integer }, optional: false, nullable: true, api_name: "storageSizeBytes" + + field :created_at, -> { Integer }, optional: false, nullable: false, api_name: "createdAt" + + field :updated_at, -> { Integer }, optional: false, nullable: false, api_name: "updatedAt" + + field :last_seen_at, -> { Integer }, optional: false, nullable: true, api_name: "lastSeenAt" + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_list400response.rb b/lib/CloudPDF/types/documents_layers_list400response.rb new file mode 100644 index 00000000..2c6f0c1d --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_list400response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersList400Response + # DocumentsLayersList400Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_list403response.rb b/lib/CloudPDF/types/documents_layers_list403response.rb new file mode 100644 index 00000000..93d7052c --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_list403response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersList403Response + # DocumentsLayersList403Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/documents_layers_list404response.rb b/lib/CloudPDF/types/documents_layers_list404response.rb new file mode 100644 index 00000000..7cf29c14 --- /dev/null +++ b/lib/CloudPDF/types/documents_layers_list404response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module DocumentsLayersList404Response + # DocumentsLayersList404Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/engine_error_payload_code.rb b/lib/CloudPDF/types/engine_error_payload_code.rb index adb9bcb6..e55eaea8 100644 --- a/lib/CloudPDF/types/engine_error_payload_code.rb +++ b/lib/CloudPDF/types/engine_error_payload_code.rb @@ -34,6 +34,8 @@ module EngineErrorPayloadCode CHANGE_CONFLICT = "ChangeConflict" UNDO_UNAVAILABLE = "UndoUnavailable" IDEMPOTENCY_KEY_REUSED = "IdempotencyKeyReused" + LAYER_DELETED = "LayerDeleted" + VISITOR_IDENTITY_REQUIRED = "VisitorIdentityRequired" end end end diff --git a/lib/CloudPDF/types/shares_archive200response.rb b/lib/CloudPDF/types/shares_archive200response.rb new file mode 100644 index 00000000..4ce08dec --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesArchive200Response < Internal::Types::Model + field :share, -> { CloudPDF::Types::SharesArchive200ResponseShare }, optional: false, nullable: false + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share.rb b/lib/CloudPDF/types/shares_archive200response_share.rb new file mode 100644 index 00000000..786405f4 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesArchive200ResponseShare < Internal::Types::Model + field :id, -> { String }, optional: false, nullable: false + + field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId" + + field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId" + + field :layer_mode, -> { CloudPDF::Types::SharesArchive200ResponseShareLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: false, nullable: true, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: false, nullable: true, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentity }, optional: false, nullable: true, api_name: "visitorIdentity" + + field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false + + field :origins, -> { Internal::Types::Array[String] }, optional: false, nullable: true + + field :password_protected, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "passwordProtected" + + field :session_ttl_seconds, -> { Integer }, optional: false, nullable: false, api_name: "sessionTtlSeconds" + + field :disabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :archived_at, -> { Integer }, optional: false, nullable: true, api_name: "archivedAt" + + field :expires_at, -> { Integer }, optional: false, nullable: true, api_name: "expiresAt" + + field :exchange_count, -> { Integer }, optional: false, nullable: false, api_name: "exchangeCount" + + field :last_exchanged_at, -> { Integer }, optional: false, nullable: true, api_name: "lastExchangedAt" + + field :created_by, -> { String }, optional: false, nullable: false, api_name: "createdBy" + + field :created_at, -> { Integer }, optional: false, nullable: false, api_name: "createdAt" + + field :updated_at, -> { Integer }, optional: false, nullable: false, api_name: "updatedAt" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_layer_mode.rb b/lib/CloudPDF/types/shares_archive200response_share_layer_mode.rb new file mode 100644 index 00000000..f9f1a48d --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity.rb new file mode 100644 index 00000000..376a58e7 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesArchive200ResponseShareVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_ask.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_ask.rb new file mode 100644 index 00000000..122e8410 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_ask.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields.rb new file mode 100644 index 00000000..4926f5e5 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesArchive200ResponseShareVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesArchive200ResponseShareVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_display_name.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..c00e3def --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_email.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_email.rb new file mode 100644 index 00000000..def886d0 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organization.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..880b77ff --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..a92af71f --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_title.rb b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_title.rb new file mode 100644 index 00000000..7626b4d6 --- /dev/null +++ b/lib/CloudPDF/types/shares_archive200response_share_visitor_identity_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive200ResponseShareVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_archive404response.rb b/lib/CloudPDF/types/shares_archive404response.rb new file mode 100644 index 00000000..331f859d --- /dev/null +++ b/lib/CloudPDF/types/shares_archive404response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesArchive404Response + # SharesArchive404Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share.rb b/lib/CloudPDF/types/shares_create200response_share.rb index bd8e6964..a4719485 100644 --- a/lib/CloudPDF/types/shares_create200response_share.rb +++ b/lib/CloudPDF/types/shares_create200response_share.rb @@ -9,7 +9,15 @@ class SharesCreate200ResponseShare < 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 :layer_mode, -> { CloudPDF::Types::SharesCreate200ResponseShareLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: false, nullable: true, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: false, nullable: true, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentity }, optional: false, nullable: true, api_name: "visitorIdentity" field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false @@ -21,6 +29,8 @@ class SharesCreate200ResponseShare < Internal::Types::Model field :disabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :archived_at, -> { Integer }, optional: false, nullable: true, api_name: "archivedAt" + field :expires_at, -> { Integer }, optional: false, nullable: true, api_name: "expiresAt" field :exchange_count, -> { Integer }, optional: false, nullable: false, api_name: "exchangeCount" diff --git a/lib/CloudPDF/types/shares_create200response_share_layer_mode.rb b/lib/CloudPDF/types/shares_create200response_share_layer_mode.rb new file mode 100644 index 00000000..05ac8cc2 --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity.rb new file mode 100644 index 00000000..bd812b76 --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesCreate200ResponseShareVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_ask.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_ask.rb new file mode 100644 index 00000000..bd983868 --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_ask.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields.rb new file mode 100644 index 00000000..6dd45f6b --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesCreate200ResponseShareVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesCreate200ResponseShareVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_display_name.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..6bbd437d --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_email.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_email.rb new file mode 100644 index 00000000..e235b34e --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organization.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..3038589b --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..ed0de96d --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_title.rb b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_title.rb new file mode 100644 index 00000000..40f87b97 --- /dev/null +++ b/lib/CloudPDF/types/shares_create200response_share_visitor_identity_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesCreate200ResponseShareVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_delete_response.rb b/lib/CloudPDF/types/shares_delete404response.rb similarity index 77% rename from lib/CloudPDF/types/shares_delete_response.rb rename to lib/CloudPDF/types/shares_delete404response.rb index 387ee20e..ca27e774 100644 --- a/lib/CloudPDF/types/shares_delete_response.rb +++ b/lib/CloudPDF/types/shares_delete404response.rb @@ -2,8 +2,8 @@ module CloudPDF module Types - module SharesDeleteResponse - # SharesDeleteResponse is an alias for AdminErrorPayload + module SharesDelete404Response + # SharesDelete404Response is an alias for AdminErrorPayload # @option str [String] # diff --git a/lib/CloudPDF/types/shares_delete409response.rb b/lib/CloudPDF/types/shares_delete409response.rb new file mode 100644 index 00000000..c32d30ed --- /dev/null +++ b/lib/CloudPDF/types/shares_delete409response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesDelete409Response + # SharesDelete409Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response.rb b/lib/CloudPDF/types/shares_exchange200response.rb index 81a2752f..41ea8ae9 100644 --- a/lib/CloudPDF/types/shares_exchange200response.rb +++ b/lib/CloudPDF/types/shares_exchange200response.rb @@ -9,6 +9,10 @@ class SharesExchange200Response < Internal::Types::Model field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName" + field :layer_mode, -> { CloudPDF::Types::SharesExchange200ResponseLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :visitor, -> { CloudPDF::Types::SharesExchange200ResponseVisitor }, optional: false, nullable: false + field :expires_at, -> { Integer }, optional: false, nullable: false, api_name: "expiresAt" end end diff --git a/lib/CloudPDF/types/shares_exchange200response_layer_mode.rb b/lib/CloudPDF/types/shares_exchange200response_layer_mode.rb new file mode 100644 index 00000000..3c7bd7ad --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor.rb b/lib/CloudPDF/types/shares_exchange200response_visitor.rb new file mode 100644 index 00000000..6ba6d4b6 --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesExchange200ResponseVisitor < Internal::Types::Model + field :handle, -> { String }, optional: false, nullable: false + + field :keep, -> { Internal::Types::Boolean }, optional: false, nullable: false + + field :identity_request, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequest }, optional: false, nullable: true, api_name: "identityRequest" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request.rb new file mode 100644 index 00000000..378be6a8 --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesExchange200ResponseVisitorIdentityRequest < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFields }, optional: false, nullable: false + + field :missing, -> { Internal::Types::Array[CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestMissingItem] }, optional: false, nullable: false + + field :invalid, -> { Internal::Types::Array[CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestInvalidItem] }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields.rb new file mode 100644 index 00000000..178270c2 --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesExchange200ResponseVisitorIdentityRequestFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesExchange200ResponseVisitorIdentityRequestFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_display_name.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_display_name.rb new file mode 100644 index 00000000..f55d20dc --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_email.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_email.rb new file mode 100644 index 00000000..5c3018ab --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organization.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organization.rb new file mode 100644 index 00000000..c12fb64b --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organizational_unit.rb new file mode 100644 index 00000000..30b6741f --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_title.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_title.rb new file mode 100644 index 00000000..6ad528a7 --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_invalid_item.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_invalid_item.rb new file mode 100644 index 00000000..e7b5899d --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_invalid_item.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestInvalidItem + extend CloudPDF::Internal::Types::Enum + + DISPLAY_NAME = "displayName" + EMAIL = "email" + TITLE = "title" + ORGANIZATION = "organization" + ORGANIZATIONAL_UNIT = "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_missing_item.rb b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_missing_item.rb new file mode 100644 index 00000000..585a4fcc --- /dev/null +++ b/lib/CloudPDF/types/shares_exchange200response_visitor_identity_request_missing_item.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesExchange200ResponseVisitorIdentityRequestMissingItem + extend CloudPDF::Internal::Types::Enum + + DISPLAY_NAME = "displayName" + EMAIL = "email" + TITLE = "title" + ORGANIZATION = "organization" + ORGANIZATIONAL_UNIT = "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share.rb b/lib/CloudPDF/types/shares_get200response_share.rb index 14407fe2..78608089 100644 --- a/lib/CloudPDF/types/shares_get200response_share.rb +++ b/lib/CloudPDF/types/shares_get200response_share.rb @@ -9,7 +9,15 @@ class SharesGet200ResponseShare < 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 :layer_mode, -> { CloudPDF::Types::SharesGet200ResponseShareLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: false, nullable: true, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: false, nullable: true, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentity }, optional: false, nullable: true, api_name: "visitorIdentity" field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false @@ -21,6 +29,8 @@ class SharesGet200ResponseShare < Internal::Types::Model field :disabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :archived_at, -> { Integer }, optional: false, nullable: true, api_name: "archivedAt" + field :expires_at, -> { Integer }, optional: false, nullable: true, api_name: "expiresAt" field :exchange_count, -> { Integer }, optional: false, nullable: false, api_name: "exchangeCount" diff --git a/lib/CloudPDF/types/shares_get200response_share_layer_mode.rb b/lib/CloudPDF/types/shares_get200response_share_layer_mode.rb new file mode 100644 index 00000000..d346ac67 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity.rb new file mode 100644 index 00000000..b1690720 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesGet200ResponseShareVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_ask.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_ask.rb new file mode 100644 index 00000000..27805b31 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_ask.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields.rb new file mode 100644 index 00000000..84396097 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesGet200ResponseShareVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesGet200ResponseShareVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_display_name.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..731abeb3 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_email.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_email.rb new file mode 100644 index 00000000..32d5a2fb --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organization.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..5341f2e6 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..111b1292 --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_title.rb b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_title.rb new file mode 100644 index 00000000..03e11c5f --- /dev/null +++ b/lib/CloudPDF/types/shares_get200response_share_visitor_identity_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesGet200ResponseShareVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item.rb b/lib/CloudPDF/types/shares_list200response_shares_item.rb index b5f40d0c..c03d2358 100644 --- a/lib/CloudPDF/types/shares_list200response_shares_item.rb +++ b/lib/CloudPDF/types/shares_list200response_shares_item.rb @@ -9,7 +9,15 @@ class SharesList200ResponseSharesItem < 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 :layer_mode, -> { CloudPDF::Types::SharesList200ResponseSharesItemLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: false, nullable: true, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: false, nullable: true, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentity }, optional: false, nullable: true, api_name: "visitorIdentity" field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false @@ -21,6 +29,8 @@ class SharesList200ResponseSharesItem < Internal::Types::Model field :disabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :archived_at, -> { Integer }, optional: false, nullable: true, api_name: "archivedAt" + field :expires_at, -> { Integer }, optional: false, nullable: true, api_name: "expiresAt" field :exchange_count, -> { Integer }, optional: false, nullable: false, api_name: "exchangeCount" diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_layer_mode.rb b/lib/CloudPDF/types/shares_list200response_shares_item_layer_mode.rb new file mode 100644 index 00000000..10c31140 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity.rb new file mode 100644 index 00000000..3b75e95f --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesList200ResponseSharesItemVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_ask.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_ask.rb new file mode 100644 index 00000000..61b6db36 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_ask.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields.rb new file mode 100644 index 00000000..d80c3fca --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesList200ResponseSharesItemVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesList200ResponseSharesItemVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_display_name.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..09ea9411 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_email.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_email.rb new file mode 100644 index 00000000..95c69558 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organization.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..911c4cff --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..19c13da9 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_title.rb b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_title.rb new file mode 100644 index 00000000..5b9cb0b4 --- /dev/null +++ b/lib/CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesList200ResponseSharesItemVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share.rb b/lib/CloudPDF/types/shares_update200response_share.rb index 22f05aa3..2bb69bb9 100644 --- a/lib/CloudPDF/types/shares_update200response_share.rb +++ b/lib/CloudPDF/types/shares_update200response_share.rb @@ -9,7 +9,15 @@ class SharesUpdate200ResponseShare < 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 :layer_mode, -> { CloudPDF::Types::SharesUpdate200ResponseShareLayerMode }, optional: false, nullable: false, api_name: "layerMode" + + field :layer_name, -> { String }, optional: false, nullable: true, api_name: "layerName" + + field :keep_visitor_layers, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "keepVisitorLayers" + + field :visitor_idle_seconds, -> { Integer }, optional: false, nullable: true, api_name: "visitorIdleSeconds" + + field :visitor_identity, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentity }, optional: false, nullable: true, api_name: "visitorIdentity" field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false @@ -21,6 +29,8 @@ class SharesUpdate200ResponseShare < Internal::Types::Model field :disabled, -> { Internal::Types::Boolean }, optional: false, nullable: false + field :archived_at, -> { Integer }, optional: false, nullable: true, api_name: "archivedAt" + field :expires_at, -> { Integer }, optional: false, nullable: true, api_name: "expiresAt" field :exchange_count, -> { Integer }, optional: false, nullable: false, api_name: "exchangeCount" diff --git a/lib/CloudPDF/types/shares_update200response_share_layer_mode.rb b/lib/CloudPDF/types/shares_update200response_share_layer_mode.rb new file mode 100644 index 00000000..d29a1258 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_layer_mode.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareLayerMode + extend CloudPDF::Internal::Types::Enum + + SHARED = "shared" + PER_VISITOR = "per-visitor" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity.rb new file mode 100644 index 00000000..f12769aa --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesUpdate200ResponseShareVisitorIdentity < Internal::Types::Model + field :fields, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFields }, optional: false, nullable: false + + field :ask, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityAsk }, optional: false, nullable: false + + field :purpose, -> { String }, optional: true, nullable: false + + field :privacy_url, -> { String }, optional: true, nullable: false, api_name: "privacyUrl" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_ask.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_ask.rb new file mode 100644 index 00000000..5dd3a0ee --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_ask.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityAsk + extend CloudPDF::Internal::Types::Enum + + ON_OPEN = "on-open" + BEFORE_FIRST_CHANGE = "before-first-change" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields.rb new file mode 100644 index 00000000..555a3013 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesUpdate200ResponseShareVisitorIdentityFields < Internal::Types::Model + field :display_name, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFieldsEmail }, optional: true, nullable: false + + field :title, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFieldsTitle }, optional: true, nullable: false + + field :organization, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFieldsOrganization }, optional: true, nullable: false + + field :organizational_unit, -> { CloudPDF::Types::SharesUpdate200ResponseShareVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_display_name.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_display_name.rb new file mode 100644 index 00000000..b06a742a --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_display_name.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityFieldsDisplayName + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_email.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_email.rb new file mode 100644 index 00000000..08ee4197 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_email.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityFieldsEmail + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organization.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organization.rb new file mode 100644 index 00000000..1f3fa0e9 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organization.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityFieldsOrganization + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organizational_unit.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organizational_unit.rb new file mode 100644 index 00000000..cb2e6e89 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_organizational_unit.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityFieldsOrganizationalUnit + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_title.rb b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_title.rb new file mode 100644 index 00000000..92ce0520 --- /dev/null +++ b/lib/CloudPDF/types/shares_update200response_share_visitor_identity_fields_title.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate200ResponseShareVisitorIdentityFieldsTitle + extend CloudPDF::Internal::Types::Enum + + REQUIRED = "required" + OPTIONAL = "optional" + end + end +end diff --git a/lib/CloudPDF/types/shares_update409response.rb b/lib/CloudPDF/types/shares_update409response.rb new file mode 100644 index 00000000..7b7a7b20 --- /dev/null +++ b/lib/CloudPDF/types/shares_update409response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesUpdate409Response + # SharesUpdate409Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_delete_response.rb b/lib/CloudPDF/types/shares_visitors_delete_response.rb new file mode 100644 index 00000000..e2d221ea --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_delete_response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesVisitorsDeleteResponse + # SharesVisitorsDeleteResponse is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list200response.rb b/lib/CloudPDF/types/shares_visitors_list200response.rb new file mode 100644 index 00000000..948fb8ad --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list200response.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesVisitorsList200Response < Internal::Types::Model + field :visitors, -> { Internal::Types::Array[CloudPDF::Types::SharesVisitorsList200ResponseVisitorsItem] }, optional: false, nullable: false + + field :next_cursor, -> { String }, optional: true, nullable: false, api_name: "nextCursor" + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list200response_visitors_item.rb b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item.rb new file mode 100644 index 00000000..c6e51742 --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesVisitorsList200ResponseVisitorsItem < Internal::Types::Model + field :visitor_id, -> { String }, optional: false, nullable: false, api_name: "visitorId" + + field :answers, -> { CloudPDF::Types::SharesVisitorsList200ResponseVisitorsItemAnswers }, optional: false, nullable: false + + field :email_verified, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "emailVerified" + + field :consented_at, -> { Integer }, optional: false, nullable: true, api_name: "consentedAt" + + field :first_seen_at, -> { Integer }, optional: false, nullable: false, api_name: "firstSeenAt" + + field :last_seen_at, -> { Integer }, optional: false, nullable: false, api_name: "lastSeenAt" + + field :layer, -> { CloudPDF::Types::SharesVisitorsList200ResponseVisitorsItemLayer }, optional: false, nullable: true + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_answers.rb b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_answers.rb new file mode 100644 index 00000000..16985fbd --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_answers.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesVisitorsList200ResponseVisitorsItemAnswers < Internal::Types::Model + field :display_name, -> { String }, optional: true, nullable: false, api_name: "displayName" + + field :email, -> { String }, optional: true, nullable: false + + field :title, -> { String }, optional: true, nullable: false + + field :organization, -> { String }, optional: true, nullable: false + + field :organizational_unit, -> { String }, optional: true, nullable: false, api_name: "organizationalUnit" + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_layer.rb b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_layer.rb new file mode 100644 index 00000000..0282504e --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list200response_visitors_item_layer.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + class SharesVisitorsList200ResponseVisitorsItemLayer < Internal::Types::Model + field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName" + + field :storage_size_bytes, -> { Integer }, optional: false, nullable: true, api_name: "storageSizeBytes" + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list400response.rb b/lib/CloudPDF/types/shares_visitors_list400response.rb new file mode 100644 index 00000000..bc484482 --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list400response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesVisitorsList400Response + # SharesVisitorsList400Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/types/shares_visitors_list404response.rb b/lib/CloudPDF/types/shares_visitors_list404response.rb new file mode 100644 index 00000000..ff833815 --- /dev/null +++ b/lib/CloudPDF/types/shares_visitors_list404response.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +module CloudPDF + module Types + module SharesVisitorsList404Response + # SharesVisitorsList404Response is an alias for AdminErrorPayload + + # @option str [String] + # + # @return [untyped] + def self.load(str) + ::JSON.parse(str) + end + + # @option value [untyped] + # + # @return [String] + def self.dump(value) + ::JSON.generate(value) + end + end + end +end diff --git a/lib/CloudPDF/version.rb b/lib/CloudPDF/version.rb index 6e43f6b8..c54e1f9d 100644 --- a/lib/CloudPDF/version.rb +++ b/lib/CloudPDF/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module CloudPDF - VERSION = "3.0.0.alpha.16" + VERSION = "3.0.0.alpha.17" end diff --git a/lib/cloudpdf.rb b/lib/cloudpdf.rb index bbafb641..71991687 100644 --- a/lib/cloudpdf.rb +++ b/lib/cloudpdf.rb @@ -727,6 +727,25 @@ require_relative "CloudPDF/types/change_op_attachments_delete" require_relative "CloudPDF/types/change_op" require_relative "CloudPDF/doc/types/doc_changes_request_changes_item" +require_relative "CloudPDF/shares/types/shares_exchange_request_visitor_identity" +require_relative "CloudPDF/shares/types/shares_create_request_layer_mode" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields_display_name" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields_email" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields_title" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organization" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_fields" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity_ask" +require_relative "CloudPDF/shares/types/shares_create_request_visitor_identity" +require_relative "CloudPDF/shares/types/shares_update_request_layer_mode" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields_display_name" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields_email" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields_title" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organization" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_fields" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity_ask" +require_relative "CloudPDF/shares/types/shares_update_request_visitor_identity" require_relative "CloudPDF/documents/types/list_documents_request_state" require_relative "CloudPDF/documents/types/documents_import_from_request_source_url" require_relative "CloudPDF/documents/types/documents_import_from_request_source_connection" @@ -1363,6 +1382,14 @@ require_relative "CloudPDF/types/documents_download404response" require_relative "CloudPDF/types/documents_delete403response" require_relative "CloudPDF/types/documents_delete404response" +require_relative "CloudPDF/types/documents_layers_list200response_layers_item" +require_relative "CloudPDF/types/documents_layers_list200response" +require_relative "CloudPDF/types/documents_layers_list400response" +require_relative "CloudPDF/types/documents_layers_list403response" +require_relative "CloudPDF/types/documents_layers_list404response" +require_relative "CloudPDF/types/documents_layers_delete403response" +require_relative "CloudPDF/types/documents_layers_delete404response" +require_relative "CloudPDF/types/documents_layers_delete409response" require_relative "CloudPDF/types/documents_thumbnail_response_error" require_relative "CloudPDF/types/documents_thumbnail_response" require_relative "CloudPDF/types/deployment_license_status_response" @@ -1384,22 +1411,90 @@ require_relative "CloudPDF/types/tenants_usage404response" require_relative "CloudPDF/types/tenants_suspend_response" require_relative "CloudPDF/types/tenants_resume_response" +require_relative "CloudPDF/types/shares_create200response_share_layer_mode" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields_display_name" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields_email" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields_title" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields_organization" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_fields" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity_ask" +require_relative "CloudPDF/types/shares_create200response_share_visitor_identity" require_relative "CloudPDF/types/shares_create200response_share" require_relative "CloudPDF/types/shares_create200response" require_relative "CloudPDF/types/shares_create400response" require_relative "CloudPDF/types/shares_create403response" require_relative "CloudPDF/types/shares_create404response" +require_relative "CloudPDF/types/shares_list200response_shares_item_layer_mode" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_display_name" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_email" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_title" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organization" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_fields" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity_ask" +require_relative "CloudPDF/types/shares_list200response_shares_item_visitor_identity" require_relative "CloudPDF/types/shares_list200response_shares_item" require_relative "CloudPDF/types/shares_list200response" require_relative "CloudPDF/types/shares_list400response" +require_relative "CloudPDF/types/shares_get200response_share_layer_mode" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields_display_name" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields_email" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields_title" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields_organization" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_fields" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity_ask" +require_relative "CloudPDF/types/shares_get200response_share_visitor_identity" require_relative "CloudPDF/types/shares_get200response_share" require_relative "CloudPDF/types/shares_get200response" require_relative "CloudPDF/types/shares_get404response" +require_relative "CloudPDF/types/shares_update200response_share_layer_mode" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields_display_name" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields_email" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields_title" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields_organization" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_fields" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity_ask" +require_relative "CloudPDF/types/shares_update200response_share_visitor_identity" require_relative "CloudPDF/types/shares_update200response_share" require_relative "CloudPDF/types/shares_update200response" require_relative "CloudPDF/types/shares_update400response" require_relative "CloudPDF/types/shares_update404response" -require_relative "CloudPDF/types/shares_delete_response" +require_relative "CloudPDF/types/shares_update409response" +require_relative "CloudPDF/types/shares_archive200response_share_layer_mode" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields_display_name" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields_email" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields_title" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organization" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields_organizational_unit" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_fields" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity_ask" +require_relative "CloudPDF/types/shares_archive200response_share_visitor_identity" +require_relative "CloudPDF/types/shares_archive200response_share" +require_relative "CloudPDF/types/shares_archive200response" +require_relative "CloudPDF/types/shares_archive404response" +require_relative "CloudPDF/types/shares_visitors_list200response_visitors_item_answers" +require_relative "CloudPDF/types/shares_visitors_list200response_visitors_item_layer" +require_relative "CloudPDF/types/shares_visitors_list200response_visitors_item" +require_relative "CloudPDF/types/shares_visitors_list200response" +require_relative "CloudPDF/types/shares_visitors_list400response" +require_relative "CloudPDF/types/shares_visitors_list404response" +require_relative "CloudPDF/types/shares_visitors_delete_response" +require_relative "CloudPDF/types/shares_delete404response" +require_relative "CloudPDF/types/shares_delete409response" +require_relative "CloudPDF/types/shares_exchange200response_layer_mode" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_display_name" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_email" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_title" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organization" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields_organizational_unit" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_fields" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_missing_item" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request_invalid_item" +require_relative "CloudPDF/types/shares_exchange200response_visitor_identity_request" +require_relative "CloudPDF/types/shares_exchange200response_visitor" require_relative "CloudPDF/types/shares_exchange200response" require_relative "CloudPDF/types/shares_exchange400response" require_relative "CloudPDF/types/shares_exchange403response" @@ -1724,6 +1819,9 @@ require_relative "CloudPDF/types/doc_redactions_apply200response" require_relative "CloudPDF/types/doc_redactions_apply400response" require_relative "CloudPDF/types/doc_redactions_apply404response" +require_relative "CloudPDF/types/doc_download_link200response" +require_relative "CloudPDF/types/doc_download_link404response" +require_relative "CloudPDF/types/doc_download_link501response" require_relative "CloudPDF/types/doc_download_response" require_relative "CloudPDF/client" require_relative "CloudPDF/deployment/client" @@ -1731,6 +1829,7 @@ require_relative "CloudPDF/doc/types/head_doc_request" require_relative "CloudPDF/doc/types/doc_changes_request" require_relative "CloudPDF/doc/types/download_doc_request" +require_relative "CloudPDF/doc/types/doc_download_link_request" require_relative "CloudPDF/doc/types/manifest_doc_request" require_relative "CloudPDF/doc/types/render_doc_request" require_relative "CloudPDF/doc/types/text_doc_request" @@ -1741,6 +1840,7 @@ require_relative "CloudPDF/shares/types/get_shares_request" require_relative "CloudPDF/shares/types/delete_shares_request" require_relative "CloudPDF/shares/types/shares_update_request" +require_relative "CloudPDF/shares/types/archive_shares_request" require_relative "CloudPDF/tenants/client" require_relative "CloudPDF/tenants/types/list_tenants_request" require_relative "CloudPDF/tenants/types/tenants_create_request" @@ -1813,3 +1913,9 @@ require_relative "CloudPDF/doc/versions/types/signature_digest_versions_request" require_relative "CloudPDF/doc/metadata/custom/client" require_relative "CloudPDF/doc/metadata/custom/types/get_custom_request" +require_relative "CloudPDF/documents/layers/client" +require_relative "CloudPDF/documents/layers/types/list_layers_request" +require_relative "CloudPDF/documents/layers/types/delete_layers_request" +require_relative "CloudPDF/shares/visitors/client" +require_relative "CloudPDF/shares/visitors/types/list_visitors_request" +require_relative "CloudPDF/shares/visitors/types/delete_visitors_request" diff --git a/reference.md b/reference.md index dd8ba05b..dd3df615 100644 --- a/reference.md +++ b/reference.md @@ -252,6 +252,95 @@ client.doc.download( + + + + +
client.doc.download_link(doc_id:, layer_name:, request) -> CloudPDF::Types::DocDownloadLink200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +The link opens the layer as it is when created: once the layer changes, it answers 404, so create it right before handing it over. It downloads that one file and nothing else, and a password-protected document is checked when the link is created. Deployments that verify tokens with their own keys (JWKS) mint links on their backend: a doc token with `layer_name`, a `download: { docVersion, mode: "incremental" }` claim and a short `exp`, passed as `link` on the versioned download URL. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.doc.download_link( + 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. + +
+
+ +
+
+ +**expires_in:** `Integer` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Doc::RequestOptions` + +
+
+
+
+ +
@@ -502,7 +591,7 @@ client.doc.text(
-Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired until `password` is supplied. Mounted only when the deployment can sign (HS256 mode). +Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired until `password` is supplied. A link that asks its visitors who they are on open returns 422 VisitorIdentityRequired until the required answers are given; `error.details` carries `fields` (what the link asks), `missing`, `invalid`, `purpose` and `privacyUrl`. A link that asks before the first change issues the session at once with `visitor.identityRequest`, and writes answer 403 VisitorIdentityRequired with the same details until the visitor exchanges again with their answers. Answers that can not be taken answer 422 on any link. Mounted only when the deployment can sign (HS256 mode).
@@ -548,6 +637,30 @@ client.shares.exchange(share_token: "shareToken")
+**visitor_handle:** `String` + +
+
+ +
+
+ +**restart:** `Internal::Types::Boolean` + +
+
+ +
+
+ +**visitor_identity:** `CloudPDF::Shares::Types::SharesExchangeRequestVisitorIdentity` + +
+
+ +
+
+ **request_options:** `CloudPDF::Shares::RequestOptions`
@@ -620,6 +733,14 @@ client.shares.list(tenant_id: "tenantId")
+**archived:** `Internal::Types::Boolean` + +
+
+ +
+
+ **request_options:** `CloudPDF::Shares::RequestOptions`
@@ -694,6 +815,14 @@ client.shares.create(
+**layer_mode:** `CloudPDF::Shares::Types::SharesCreateRequestLayerMode` + +
+
+ +
+
+ **layer_name:** `String`
@@ -702,6 +831,30 @@ client.shares.create(
+**keep_visitor_layers:** `Internal::Types::Boolean` + +
+
+ +
+
+ +**visitor_idle_seconds:** `Integer` + +
+
+ +
+
+ +**visitor_identity:** `CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentity` + +
+
+ +
+
+ **scope:** `Internal::Types::Array[String]`
@@ -919,6 +1072,46 @@ client.shares.update(
+**layer_mode:** `CloudPDF::Shares::Types::SharesUpdateRequestLayerMode` + +
+
+ +
+
+ +**layer_name:** `String` + +
+
+ +
+
+ +**keep_visitor_layers:** `Internal::Types::Boolean` + +
+
+ +
+
+ +**visitor_idle_seconds:** `Integer` + +
+
+ +
+
+ +**visitor_identity:** `CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentity` + +
+
+ +
+
+ **scope:** `Internal::Types::Array[String]`
@@ -975,6 +1168,79 @@ client.shares.update(
+ +
+ + +
client.shares.archive(tenant_id:, share_id:) -> CloudPDF::Types::SharesArchive200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Archiving is final: an archived link never exchanges again, and to share again you create a new link. Pausing (`disabled`) is the reversible stop. An archived link no longer counts as using its shared layer, so that layer can be deleted. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.shares.archive( + tenant_id: "tenantId", + share_id: "shareId" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `String` + +
+
+ +
+
+ +**share_id:** `String` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Shares::RequestOptions` + +
+
+
+
+ +
@@ -5842,3 +6108,327 @@ client.doc.metadata.custom.get(
+## Documents Layers +
client.documents.layers.list(tenant_id:, id:) -> CloudPDF::Types::DocumentsLayersList200Response +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.documents.layers.list( + tenant_id: "tenantId", + id: "id" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `String` + +
+
+ +
+
+ +**id:** `String` + +
+
+ +
+
+ +**limit:** `Integer` + +
+
+ +
+
+ +**cursor:** `String` + +
+
+ +
+
+ +**share_id:** `String` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Documents::Layers::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.documents.layers.delete(tenant_id:, id:, layer_name:) -> +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.documents.layers.delete( + tenant_id: "tenantId", + id: "id", + layer_name: "layerName" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `String` + +
+
+ +
+
+ +**id:** `String` + +
+
+ +
+
+ +**layer_name:** `String` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Documents::Layers::RequestOptions` + +
+
+
+
+ + +
+
+
+ +## Shares Visitors +
client.shares.visitors.list(tenant_id:, share_id:) -> CloudPDF::Types::SharesVisitorsList200Response +
+
+ +#### 📝 Description + +
+
+ +
+
+ +An archived link's visitors are listed too. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.shares.visitors.list( + tenant_id: "tenantId", + share_id: "shareId" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `String` + +
+
+ +
+
+ +**share_id:** `String` + +
+
+ +
+
+ +**limit:** `Integer` + +
+
+ +
+
+ +**cursor:** `String` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Shares::Visitors::RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.shares.visitors.delete(tenant_id:, share_id:, visitor_id:) -> +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Their handle brings them back as a new visitor, who is asked again. Deleting a visitor already deleted changes nothing. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```ruby +client.shares.visitors.delete( + tenant_id: "tenantId", + share_id: "shareId", + visitor_id: "visitorId" +) +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**tenant_id:** `String` + +
+
+ +
+
+ +**share_id:** `String` + +
+
+ +
+
+ +**visitor_id:** `String` + +
+
+ +
+
+ +**request_options:** `CloudPDF::Shares::Visitors::RequestOptions` + +
+
+
+
+ + +
+
+
+