Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"generatorConfig": {
"moduleName": "CloudPDF"
},
"originGitCommit": "3a88df90980e5c0546a5ebbfd1252d8fca77ff9b",
"originGitCommit": "0606e988ebff3773183ef02e0a820c36b3a25f8d",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "3.0.0.alpha.18",
"requestedVersion": "3.0.0.alpha.19",
"ciProvider": "github"
}
8 changes: 4 additions & 4 deletions cloudpdf-generation.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"language": "ruby",
"canonicalVersion": "3.0.0-next.18",
"sdkVersion": "3.0.0.alpha.18",
"canonicalVersion": "3.0.0-next.19",
"sdkVersion": "3.0.0.alpha.19",
"source": {
"repository": "embedpdf/embed-pdf-viewer",
"openapi": "cloudpdf/contract/openapi.json",
"openapiSha256": "ad2a3baa628061e7b3e8b597cfd15bcda7f103d0f829cb01388a0fed6c4f5873",
"gitCommit": "3a88df90980e5c0546a5ebbfd1252d8fca77ff9b",
"openapiSha256": "e88e02ed71f422ad08b2393abeda474e8dcf6707b6e753af74ba2f40da8e7d6b",
"gitCommit": "0606e988ebff3773183ef02e0a820c36b3a25f8d",
"gitCommitIsDirty": false
},
"fern": {
Expand Down
6 changes: 3 additions & 3 deletions lib/CloudPDF/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def doc
@doc ||= CloudPDF::Doc::Client.new(client: @raw_client)
end

# @return [CloudPDF::Shares::Client]
def shares
@shares ||= CloudPDF::Shares::Client.new(client: @raw_client)
# @return [CloudPDF::Grants::Client]
def grants
@grants ||= CloudPDF::Grants::Client.new(client: @raw_client)
end

# @return [CloudPDF::Tenants::Client]
Expand Down
4 changes: 2 additions & 2 deletions lib/CloudPDF/documents/layers/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def initialize(client:)
# @option params [String] :id
# @option params [Integer, nil] :limit
# @option params [String, nil] :cursor
# @option params [String, nil] :share_id
# @option params [String, nil] :grant_id
#
# @example
# client.documents.layers.list(
Expand All @@ -36,7 +36,7 @@ def list(request_options: {}, **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)
query_params["grantId"] = params[:grant_id] if params.key?(:grant_id)

request = CloudPDF::Internal::JSON::Request.new(
base_url: request_options[:base_url],
Expand Down
2 changes: 1 addition & 1 deletion lib/CloudPDF/documents/layers/types/list_layers_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ListLayersRequest < Internal::Types::Model

field :cursor, -> { String }, optional: true, nullable: false

field :share_id, -> { String }, optional: true, nullable: false, api_name: "shareId"
field :grant_id, -> { String }, optional: true, nullable: false, api_name: "grantId"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/CloudPDF/folders/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def get(request_options: {}, **params)
# Without recursive, a folder with anything inside is refused: 409 Conflict with `details.reason` `not-empty` and
# what it holds, counted over every level below, in `details.folders` and `details.documents`. With
# recursive=true, the folder and every folder under it go at once, and every document in them stops opening,
# leaves every list and stops answering its share links at once; their stored files and links are removed in the
# leaves every list and stops answering its grants at once; their stored files and grants are removed in the
# background. Uploads into those folders that have not committed cannot commit.
#
# @param request_options [Hash]
Expand Down
110 changes: 55 additions & 55 deletions lib/CloudPDF/shares/client.rb → lib/CloudPDF/grants/client.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class ArchiveSharesRequest < Internal::Types::Model
class ArchiveGrantsRequest < 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 :grant_id, -> { String }, optional: false, nullable: false, api_name: "grantId"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class DeleteSharesRequest < Internal::Types::Model
class DeleteGrantsRequest < 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 :grant_id, -> { String }, optional: false, nullable: false, api_name: "grantId"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class GetSharesRequest < Internal::Types::Model
class GetGrantsRequest < 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 :grant_id, -> { String }, optional: false, nullable: false, api_name: "grantId"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesCreateRequest < Internal::Types::Model
class GrantsCreateRequest < Internal::Types::Model
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::Shares::Types::SharesCreateRequestLayerMode }, optional: true, nullable: false, api_name: "layerMode"
field :name, -> { String }, optional: true, nullable: false

field :layer_mode, -> { CloudPDF::Grants::Types::GrantsCreateRequestLayerMode }, 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 :visitor_identity, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity"

field :identity, -> { CloudPDF::Types::Identity }, optional: true, nullable: false

field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false

field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false

field :password, -> { String }, optional: true, nullable: false
field :passphrase, -> { String }, optional: true, nullable: false

field :session_ttl_seconds, -> { Integer }, optional: true, nullable: false, api_name: "sessionTtlSeconds"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesCreateRequestLayerMode
module GrantsCreateRequestLayerMode
extend CloudPDF::Internal::Types::Enum

SHARED = "shared"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesCreateRequestVisitorIdentity < Internal::Types::Model
field :fields, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFields }, optional: false, nullable: false
class GrantsCreateRequestVisitorIdentity < Internal::Types::Model
field :fields, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFields }, optional: false, nullable: false

field :ask, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityAsk }, optional: false, nullable: false
field :ask, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityAsk }, optional: false, nullable: false

field :purpose, -> { String }, optional: true, nullable: false

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestVisitorIdentityAsk
module GrantsCreateRequestVisitorIdentityAsk
extend CloudPDF::Internal::Types::Enum

ON_OPEN = "on-open"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesCreateRequestVisitorIdentityFields < Internal::Types::Model
field :display_name, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName"
class GrantsCreateRequestVisitorIdentityFields < Internal::Types::Model
field :display_name, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFieldsDisplayName }, optional: true, nullable: false, api_name: "displayName"

field :email, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsEmail }, optional: true, nullable: false
field :email, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFieldsEmail }, optional: true, nullable: false

field :title, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsTitle }, optional: true, nullable: false
field :title, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFieldsTitle }, optional: true, nullable: false

field :organization, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsOrganization }, optional: true, nullable: false
field :organization, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFieldsOrganization }, optional: true, nullable: false

field :organizational_unit, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit"
field :organizational_unit, -> { CloudPDF::Grants::Types::GrantsCreateRequestVisitorIdentityFieldsOrganizationalUnit }, optional: true, nullable: false, api_name: "organizationalUnit"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestVisitorIdentityFieldsDisplayName
module GrantsCreateRequestVisitorIdentityFieldsDisplayName
extend CloudPDF::Internal::Types::Enum

REQUIRED = "required"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesCreateRequestVisitorIdentityFieldsTitle
module GrantsCreateRequestVisitorIdentityFieldsEmail
extend CloudPDF::Internal::Types::Enum

REQUIRED = "required"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestVisitorIdentityFieldsOrganization
module GrantsCreateRequestVisitorIdentityFieldsOrganization
extend CloudPDF::Internal::Types::Enum

REQUIRED = "required"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestVisitorIdentityFieldsOrganizationalUnit
module GrantsCreateRequestVisitorIdentityFieldsOrganizationalUnit
extend CloudPDF::Internal::Types::Enum

REQUIRED = "required"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestVisitorIdentityFieldsEmail
module GrantsCreateRequestVisitorIdentityFieldsTitle
extend CloudPDF::Internal::Types::Enum

REQUIRED = "required"
Expand Down
19 changes: 19 additions & 0 deletions lib/CloudPDF/grants/types/grants_exchange_request.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# frozen_string_literal: true

module CloudPDF
module Grants
module Types
class GrantsExchangeRequest < Internal::Types::Model
field :grant, -> { String }, optional: false, nullable: false

field :passphrase, -> { 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::Grants::Types::GrantsExchangeRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity"
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesExchangeRequestVisitorIdentity < Internal::Types::Model
class GrantsExchangeRequestVisitorIdentity < Internal::Types::Model
field :display_name, -> { String }, optional: true, nullable: false, api_name: "displayName"

field :email, -> { String }, optional: true, nullable: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesUpdateRequest < Internal::Types::Model
class GrantsUpdateRequest < 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 :grant_id, -> { String }, optional: false, nullable: false, api_name: "grantId"

field :layer_mode, -> { CloudPDF::Shares::Types::SharesUpdateRequestLayerMode }, optional: true, nullable: false, api_name: "layerMode"
field :name, -> { String }, optional: true, nullable: false

field :layer_mode, -> { CloudPDF::Grants::Types::GrantsUpdateRequestLayerMode }, 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 :visitor_identity, -> { CloudPDF::Grants::Types::GrantsUpdateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity"

field :identity, -> { CloudPDF::Types::Identity }, optional: true, nullable: false

field :scope, -> { Internal::Types::Array[String] }, optional: true, nullable: false

field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false

field :password, -> { String }, optional: true, nullable: false
field :passphrase, -> { String }, optional: true, nullable: false

field :session_ttl_seconds, -> { Integer }, optional: true, nullable: false, api_name: "sessionTtlSeconds"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
module SharesUpdateRequestLayerMode
module GrantsUpdateRequestLayerMode
extend CloudPDF::Internal::Types::Enum

SHARED = "shared"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# frozen_string_literal: true

module CloudPDF
module Shares
module Grants
module Types
class SharesUpdateRequestVisitorIdentity < Internal::Types::Model
field :fields, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityFields }, optional: false, nullable: false
class GrantsUpdateRequestVisitorIdentity < Internal::Types::Model
field :fields, -> { CloudPDF::Grants::Types::GrantsUpdateRequestVisitorIdentityFields }, optional: false, nullable: false

field :ask, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentityAsk }, optional: false, nullable: false
field :ask, -> { CloudPDF::Grants::Types::GrantsUpdateRequestVisitorIdentityAsk }, optional: false, nullable: false

field :purpose, -> { String }, optional: true, nullable: false

Expand Down
Loading
Loading