cloudpdf 3.0.0.alpha.5 → 3.0.0.alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.fern/metadata.json +2 -2
- data/lib/CloudPDF/documents/client.rb +49 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request.rb +25 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_dedup_mode.rb +14 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_expected.rb +14 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_mode.rb +14 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_source.rb +19 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_source_connection.rb +17 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request_source_url.rb +14 -0
- data/lib/CloudPDF/types/documents_import_from200response.rb +11 -0
- data/lib/CloudPDF/types/documents_import_from200response_document.rb +33 -0
- data/lib/CloudPDF/types/documents_import_from200response_document_state.rb +14 -0
- data/lib/CloudPDF/types/documents_import_from200response_document_thumbnail_state.rb +14 -0
- data/lib/CloudPDF/types/documents_import_from200response_tag.rb +13 -0
- data/lib/CloudPDF/types/documents_import_from202response.rb +11 -0
- data/lib/CloudPDF/types/documents_import_from202response_document.rb +33 -0
- data/lib/CloudPDF/types/documents_import_from202response_document_state.rb +14 -0
- data/lib/CloudPDF/types/documents_import_from202response_document_thumbnail_state.rb +14 -0
- data/lib/CloudPDF/types/documents_import_from202response_tag.rb +13 -0
- data/lib/CloudPDF/types/documents_import_from400response.rb +9 -0
- data/lib/CloudPDF/types/documents_import_from400response_error.rb +11 -0
- data/lib/CloudPDF/types/documents_import_from403response.rb +9 -0
- data/lib/CloudPDF/types/documents_import_from403response_error.rb +11 -0
- data/lib/CloudPDF/types/documents_import_from502response.rb +9 -0
- data/lib/CloudPDF/types/documents_import_from502response_error.rb +11 -0
- data/lib/CloudPDF/version.rb +1 -1
- data/lib/cloudpdf.rb +23 -0
- data/reference.md +119 -1
- metadata +25 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b5d667e02d713992d73f05628e284f88296a6ba5074f4a7a3ba39973a508bd4
|
|
4
|
+
data.tar.gz: 31ca047a8eb76373d2364fef4849a249f88734866c5c42b40ed3bc02177b0973
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7dc2d0efc8f66899706f4d643d87efeefd2115d3114bde0f672a2f3bd4a9fe5fa35cc2655e9e6e18cfd67bf8bf308d7ce51255a2a06b028a2d20de4490ec91e
|
|
7
|
+
data.tar.gz: 12477c22fa854372c21584dbfb83931e2e318497ee761988c0f8e5baef7aad6a098e59baf465bb5da433475713dea1fd831c68df79dcdb7c04a803f2105d9665
|
data/.fern/metadata.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"generatorConfig": {
|
|
6
6
|
"moduleName": "CloudPDF"
|
|
7
7
|
},
|
|
8
|
-
"originGitCommit": "
|
|
8
|
+
"originGitCommit": "1345fb7a45ee660a352774d29decce25cb54b8ea",
|
|
9
9
|
"originGitCommitIsDirty": false,
|
|
10
10
|
"invokedBy": "ci",
|
|
11
|
-
"requestedVersion": "3.0.0.alpha.
|
|
11
|
+
"requestedVersion": "3.0.0.alpha.7",
|
|
12
12
|
"ciProvider": "github"
|
|
13
13
|
}
|
|
@@ -299,6 +299,55 @@ module CloudPDF
|
|
|
299
299
|
end
|
|
300
300
|
end
|
|
301
301
|
|
|
302
|
+
# Default mode is synchronous and bounded: the response returns only after the transfer verified and committed (or
|
|
303
|
+
# failed). mode=async (connection sources only) answers 202 immediately and an in-process worker performs the
|
|
304
|
+
# transfer with leased, fenced retries; poll the document until ready/failed. The deployment import policy gates
|
|
305
|
+
# scheme, network range, and size; sources must declare a length. CloudPDF copies and owns the bytes — the source
|
|
306
|
+
# is never referenced in place. A 502 marks a retryable upstream failure: retry with the same idempotencyKey to
|
|
307
|
+
# resume the same document. URL sources are capabilities and never echoed back. Connection sources name
|
|
308
|
+
# operator-registered storage (bucket/prefix scope, allowed credential classes, and tenant bindings are deployment
|
|
309
|
+
# configuration); `revision` is provider-interpreted (S3 VersionId, GCS generation, Azure version id).
|
|
310
|
+
#
|
|
311
|
+
# @param request_options [Hash]
|
|
312
|
+
# @param params [CloudPDF::Documents::Types::DocumentsImportFromRequest]
|
|
313
|
+
# @option request_options [String] :base_url
|
|
314
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
315
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
316
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
317
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
318
|
+
# @option params [String] :tenant_id
|
|
319
|
+
#
|
|
320
|
+
# @example
|
|
321
|
+
# client.documents.import_from(tenant_id: "tenantId")
|
|
322
|
+
#
|
|
323
|
+
# @return [CloudPDF::Types::DocumentsImportFrom200Response]
|
|
324
|
+
def import_from(request_options: {}, **params)
|
|
325
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
326
|
+
request_data = CloudPDF::Documents::Types::DocumentsImportFromRequest.new(params).to_h
|
|
327
|
+
non_body_param_names = %w[tenantId]
|
|
328
|
+
body = request_data.except(*non_body_param_names)
|
|
329
|
+
|
|
330
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
331
|
+
base_url: request_options[:base_url],
|
|
332
|
+
method: "POST",
|
|
333
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/documents/import",
|
|
334
|
+
body: body,
|
|
335
|
+
request_options: request_options
|
|
336
|
+
)
|
|
337
|
+
begin
|
|
338
|
+
response = @client.send(request)
|
|
339
|
+
rescue Net::HTTPRequestTimeout
|
|
340
|
+
raise CloudPDF::Errors::TimeoutError
|
|
341
|
+
end
|
|
342
|
+
code = response.code.to_i
|
|
343
|
+
if code.between?(200, 299)
|
|
344
|
+
CloudPDF::Types::DocumentsImportFrom200Response.load(response.body)
|
|
345
|
+
else
|
|
346
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
347
|
+
raise error_class.new(response.body, code: code)
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
|
|
302
351
|
# @param request_options [Hash]
|
|
303
352
|
# @param params [CloudPDF::Documents::Types::DocumentsInitRequest]
|
|
304
353
|
# @option request_options [String] :base_url
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
class DocumentsImportFromRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :source, -> { CloudPDF::Documents::Types::DocumentsImportFromRequestSource }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :expected, -> { CloudPDF::Documents::Types::DocumentsImportFromRequestExpected }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
|
|
14
|
+
|
|
15
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
|
|
16
|
+
|
|
17
|
+
field :dedup_mode, -> { CloudPDF::Documents::Types::DocumentsImportFromRequestDedupMode }, optional: true, nullable: false, api_name: "dedupMode"
|
|
18
|
+
|
|
19
|
+
field :doc_id, -> { String }, optional: true, nullable: false, api_name: "docId"
|
|
20
|
+
|
|
21
|
+
field :mode, -> { CloudPDF::Documents::Types::DocumentsImportFromRequestMode }, optional: true, nullable: false
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
module DocumentsImportFromRequestDedupMode
|
|
7
|
+
extend CloudPDF::Internal::Types::Enum
|
|
8
|
+
|
|
9
|
+
ALWAYS_CREATE = "always-create"
|
|
10
|
+
REUSE_EXISTING = "reuse-existing"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
# Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
|
|
7
|
+
class DocumentsImportFromRequestExpected < Internal::Types::Model
|
|
8
|
+
field :size_bytes, -> { Integer }, optional: true, nullable: false, api_name: "sizeBytes"
|
|
9
|
+
|
|
10
|
+
field :sha256, -> { String }, optional: true, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
# Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which
|
|
7
|
+
# storage vendor holds the file.
|
|
8
|
+
class DocumentsImportFromRequestSource < Internal::Types::Model
|
|
9
|
+
extend CloudPDF::Internal::Types::Union
|
|
10
|
+
|
|
11
|
+
discriminant :kind
|
|
12
|
+
|
|
13
|
+
member -> { CloudPDF::Documents::Types::DocumentsImportFromRequestSourceURL }, key: "URL"
|
|
14
|
+
|
|
15
|
+
member -> { CloudPDF::Documents::Types::DocumentsImportFromRequestSourceConnection }, key: "CONNECTION"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
# The operator pre-registered the authority: the request names a connection and a key inside it. Which provider
|
|
7
|
+
# backs the connection (S3, GCS, Azure Blob, filesystem, ...) is deployment configuration, never wire surface.
|
|
8
|
+
class DocumentsImportFromRequestSourceConnection < Internal::Types::Model
|
|
9
|
+
field :connection_id, -> { String }, optional: false, nullable: false, api_name: "connectionId"
|
|
10
|
+
|
|
11
|
+
field :key, -> { String }, optional: false, nullable: false
|
|
12
|
+
|
|
13
|
+
field :revision, -> { String }, optional: true, nullable: false
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Documents
|
|
5
|
+
module Types
|
|
6
|
+
# The caller supplies the authority: a presigned S3/GCS/Azure/R2/MinIO GET, or any HTTPS endpoint the deployment
|
|
7
|
+
# import policy allows. The URL is a capability — treat it as a secret. CloudPDF never echoes its query string
|
|
8
|
+
# back in errors, logs, or stored failure reasons.
|
|
9
|
+
class DocumentsImportFromRequestSourceURL < Internal::Types::Model
|
|
10
|
+
field :url, -> { String }, optional: false, nullable: false
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom200Response < Internal::Types::Model
|
|
6
|
+
field :tag, -> { CloudPDF::Types::DocumentsImportFrom200ResponseTag }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :document, -> { CloudPDF::Types::DocumentsImportFrom200ResponseDocument }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom200ResponseDocument < Internal::Types::Model
|
|
6
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
|
+
|
|
10
|
+
field :state, -> { CloudPDF::Types::DocumentsImportFrom200ResponseDocumentState }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
13
|
+
|
|
14
|
+
field :storage_size_bytes, -> { Integer }, optional: false, nullable: true, api_name: "storageSizeBytes"
|
|
15
|
+
|
|
16
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true
|
|
17
|
+
|
|
18
|
+
field :idempotency_key, -> { String }, optional: false, nullable: true, api_name: "idempotencyKey"
|
|
19
|
+
|
|
20
|
+
field :failure_reason, -> { String }, optional: false, nullable: true, api_name: "failureReason"
|
|
21
|
+
|
|
22
|
+
field :thumbnail_state, -> { CloudPDF::Types::DocumentsImportFrom200ResponseDocumentThumbnailState }, optional: true, nullable: false, api_name: "thumbnailState"
|
|
23
|
+
|
|
24
|
+
field :thumbnail_url, -> { String }, optional: true, nullable: false, api_name: "thumbnailUrl"
|
|
25
|
+
|
|
26
|
+
field :created_at, -> { Integer }, optional: false, nullable: false, api_name: "createdAt"
|
|
27
|
+
|
|
28
|
+
field :updated_at, -> { Integer }, optional: false, nullable: false, api_name: "updatedAt"
|
|
29
|
+
|
|
30
|
+
field :created_by, -> { String }, optional: false, nullable: true, api_name: "createdBy"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsImportFrom200ResponseDocumentState
|
|
6
|
+
extend CloudPDF::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PENDING = "pending"
|
|
9
|
+
READY = "ready"
|
|
10
|
+
FAILED = "failed"
|
|
11
|
+
DELETING = "deleting"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsImportFrom200ResponseDocumentThumbnailState
|
|
6
|
+
extend CloudPDF::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PENDING = "pending"
|
|
9
|
+
READY = "ready"
|
|
10
|
+
LOCKED = "locked"
|
|
11
|
+
FAILED = "failed"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom202Response < Internal::Types::Model
|
|
6
|
+
field :tag, -> { CloudPDF::Types::DocumentsImportFrom202ResponseTag }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :document, -> { CloudPDF::Types::DocumentsImportFrom202ResponseDocument }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom202ResponseDocument < Internal::Types::Model
|
|
6
|
+
field :id, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
|
+
|
|
10
|
+
field :state, -> { CloudPDF::Types::DocumentsImportFrom202ResponseDocumentState }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
13
|
+
|
|
14
|
+
field :storage_size_bytes, -> { Integer }, optional: false, nullable: true, api_name: "storageSizeBytes"
|
|
15
|
+
|
|
16
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true
|
|
17
|
+
|
|
18
|
+
field :idempotency_key, -> { String }, optional: false, nullable: true, api_name: "idempotencyKey"
|
|
19
|
+
|
|
20
|
+
field :failure_reason, -> { String }, optional: false, nullable: true, api_name: "failureReason"
|
|
21
|
+
|
|
22
|
+
field :thumbnail_state, -> { CloudPDF::Types::DocumentsImportFrom202ResponseDocumentThumbnailState }, optional: true, nullable: false, api_name: "thumbnailState"
|
|
23
|
+
|
|
24
|
+
field :thumbnail_url, -> { String }, optional: true, nullable: false, api_name: "thumbnailUrl"
|
|
25
|
+
|
|
26
|
+
field :created_at, -> { Integer }, optional: false, nullable: false, api_name: "createdAt"
|
|
27
|
+
|
|
28
|
+
field :updated_at, -> { Integer }, optional: false, nullable: false, api_name: "updatedAt"
|
|
29
|
+
|
|
30
|
+
field :created_by, -> { String }, optional: false, nullable: true, api_name: "createdBy"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsImportFrom202ResponseDocumentState
|
|
6
|
+
extend CloudPDF::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PENDING = "pending"
|
|
9
|
+
READY = "ready"
|
|
10
|
+
FAILED = "failed"
|
|
11
|
+
DELETING = "deleting"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsImportFrom202ResponseDocumentThumbnailState
|
|
6
|
+
extend CloudPDF::Internal::Types::Enum
|
|
7
|
+
|
|
8
|
+
PENDING = "pending"
|
|
9
|
+
READY = "ready"
|
|
10
|
+
LOCKED = "locked"
|
|
11
|
+
FAILED = "failed"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom400ResponseError < Internal::Types::Model
|
|
6
|
+
field :code, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom403ResponseError < Internal::Types::Model
|
|
6
|
+
field :code, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsImportFrom502ResponseError < Internal::Types::Model
|
|
6
|
+
field :code, -> { String }, optional: false, nullable: false
|
|
7
|
+
|
|
8
|
+
field :message, -> { String }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
data/lib/CloudPDF/version.rb
CHANGED
data/lib/cloudpdf.rb
CHANGED
|
@@ -36,6 +36,12 @@ require_relative "CloudPDF/internal/iterators/offset_item_iterator"
|
|
|
36
36
|
require_relative "CloudPDF/internal/iterators/cursor_page_iterator"
|
|
37
37
|
require_relative "CloudPDF/internal/iterators/offset_page_iterator"
|
|
38
38
|
require_relative "CloudPDF/documents/types/list_documents_request_state"
|
|
39
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_source_url"
|
|
40
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_source_connection"
|
|
41
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_source"
|
|
42
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_expected"
|
|
43
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_dedup_mode"
|
|
44
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request_mode"
|
|
39
45
|
require_relative "CloudPDF/documents/types/documents_init_request_dedup_mode"
|
|
40
46
|
require_relative "CloudPDF/documents/types/documents_init_request_upload_preference"
|
|
41
47
|
require_relative "CloudPDF/doc/forms/types/export_data_forms_request_format"
|
|
@@ -99,6 +105,22 @@ require_relative "CloudPDF/types/documents_upload_proxy400response_error"
|
|
|
99
105
|
require_relative "CloudPDF/types/documents_upload_proxy400response"
|
|
100
106
|
require_relative "CloudPDF/types/documents_upload_proxy409response_error"
|
|
101
107
|
require_relative "CloudPDF/types/documents_upload_proxy409response"
|
|
108
|
+
require_relative "CloudPDF/types/documents_import_from200response_tag"
|
|
109
|
+
require_relative "CloudPDF/types/documents_import_from200response_document_state"
|
|
110
|
+
require_relative "CloudPDF/types/documents_import_from200response_document_thumbnail_state"
|
|
111
|
+
require_relative "CloudPDF/types/documents_import_from200response_document"
|
|
112
|
+
require_relative "CloudPDF/types/documents_import_from200response"
|
|
113
|
+
require_relative "CloudPDF/types/documents_import_from202response_tag"
|
|
114
|
+
require_relative "CloudPDF/types/documents_import_from202response_document_state"
|
|
115
|
+
require_relative "CloudPDF/types/documents_import_from202response_document_thumbnail_state"
|
|
116
|
+
require_relative "CloudPDF/types/documents_import_from202response_document"
|
|
117
|
+
require_relative "CloudPDF/types/documents_import_from202response"
|
|
118
|
+
require_relative "CloudPDF/types/documents_import_from400response_error"
|
|
119
|
+
require_relative "CloudPDF/types/documents_import_from400response"
|
|
120
|
+
require_relative "CloudPDF/types/documents_import_from403response_error"
|
|
121
|
+
require_relative "CloudPDF/types/documents_import_from403response"
|
|
122
|
+
require_relative "CloudPDF/types/documents_import_from502response_error"
|
|
123
|
+
require_relative "CloudPDF/types/documents_import_from502response"
|
|
102
124
|
require_relative "CloudPDF/types/documents_list200response_documents_item_state"
|
|
103
125
|
require_relative "CloudPDF/types/documents_list200response_documents_item_thumbnail_state"
|
|
104
126
|
require_relative "CloudPDF/types/documents_list200response_documents_item"
|
|
@@ -2006,6 +2028,7 @@ require_relative "CloudPDF/documents/types/documents_commit_request"
|
|
|
2006
2028
|
require_relative "CloudPDF/documents/types/download_documents_request"
|
|
2007
2029
|
require_relative "CloudPDF/documents/types/thumbnail_documents_request"
|
|
2008
2030
|
require_relative "CloudPDF/documents/types/upload_proxy_documents_request"
|
|
2031
|
+
require_relative "CloudPDF/documents/types/documents_import_from_request"
|
|
2009
2032
|
require_relative "CloudPDF/documents/types/documents_init_request"
|
|
2010
2033
|
require_relative "CloudPDF/tokens/client"
|
|
2011
2034
|
require_relative "CloudPDF/tokens/types/issue_tokens_request"
|
data/reference.md
CHANGED
|
@@ -1747,6 +1747,124 @@ end
|
|
|
1747
1747
|
</dl>
|
|
1748
1748
|
|
|
1749
1749
|
|
|
1750
|
+
</dd>
|
|
1751
|
+
</dl>
|
|
1752
|
+
</details>
|
|
1753
|
+
|
|
1754
|
+
<details><summary><code>client.documents.<a href="/lib/CloudPDF/documents/client.rb">import_from</a>(tenant_id:, request) -> CloudPDF::Types::DocumentsImportFrom200Response</code></summary>
|
|
1755
|
+
<dl>
|
|
1756
|
+
<dd>
|
|
1757
|
+
|
|
1758
|
+
#### 📝 Description
|
|
1759
|
+
|
|
1760
|
+
<dl>
|
|
1761
|
+
<dd>
|
|
1762
|
+
|
|
1763
|
+
<dl>
|
|
1764
|
+
<dd>
|
|
1765
|
+
|
|
1766
|
+
Default mode is synchronous and bounded: the response returns only after the transfer verified and committed (or failed). mode=async (connection sources only) answers 202 immediately and an in-process worker performs the transfer with leased, fenced retries; poll the document until ready/failed. The deployment import policy gates scheme, network range, and size; sources must declare a length. CloudPDF copies and owns the bytes — the source is never referenced in place. A 502 marks a retryable upstream failure: retry with the same idempotencyKey to resume the same document. URL sources are capabilities and never echoed back. Connection sources name operator-registered storage (bucket/prefix scope, allowed credential classes, and tenant bindings are deployment configuration); `revision` is provider-interpreted (S3 VersionId, GCS generation, Azure version id).
|
|
1767
|
+
</dd>
|
|
1768
|
+
</dl>
|
|
1769
|
+
</dd>
|
|
1770
|
+
</dl>
|
|
1771
|
+
|
|
1772
|
+
#### 🔌 Usage
|
|
1773
|
+
|
|
1774
|
+
<dl>
|
|
1775
|
+
<dd>
|
|
1776
|
+
|
|
1777
|
+
<dl>
|
|
1778
|
+
<dd>
|
|
1779
|
+
|
|
1780
|
+
```ruby
|
|
1781
|
+
client.documents.import_from(tenant_id: "tenantId")
|
|
1782
|
+
```
|
|
1783
|
+
</dd>
|
|
1784
|
+
</dl>
|
|
1785
|
+
</dd>
|
|
1786
|
+
</dl>
|
|
1787
|
+
|
|
1788
|
+
#### ⚙️ Parameters
|
|
1789
|
+
|
|
1790
|
+
<dl>
|
|
1791
|
+
<dd>
|
|
1792
|
+
|
|
1793
|
+
<dl>
|
|
1794
|
+
<dd>
|
|
1795
|
+
|
|
1796
|
+
**tenant_id:** `String`
|
|
1797
|
+
|
|
1798
|
+
</dd>
|
|
1799
|
+
</dl>
|
|
1800
|
+
|
|
1801
|
+
<dl>
|
|
1802
|
+
<dd>
|
|
1803
|
+
|
|
1804
|
+
**source:** `CloudPDF::Documents::Types::DocumentsImportFromRequestSource` — Where CloudPDF pulls the bytes from. The two shapes differ in WHO supplies the authority to read, not in which storage vendor holds the file.
|
|
1805
|
+
|
|
1806
|
+
</dd>
|
|
1807
|
+
</dl>
|
|
1808
|
+
|
|
1809
|
+
<dl>
|
|
1810
|
+
<dd>
|
|
1811
|
+
|
|
1812
|
+
**expected:** `CloudPDF::Documents::Types::DocumentsImportFromRequestExpected` — Integrity pins, enforced when present. When absent, the server-observed values become authoritative.
|
|
1813
|
+
|
|
1814
|
+
</dd>
|
|
1815
|
+
</dl>
|
|
1816
|
+
|
|
1817
|
+
<dl>
|
|
1818
|
+
<dd>
|
|
1819
|
+
|
|
1820
|
+
**metadata:** `Internal::Types::Hash[String, Object]`
|
|
1821
|
+
|
|
1822
|
+
</dd>
|
|
1823
|
+
</dl>
|
|
1824
|
+
|
|
1825
|
+
<dl>
|
|
1826
|
+
<dd>
|
|
1827
|
+
|
|
1828
|
+
**idempotency_key:** `String` — Retrying with the same key resumes the same document rather than importing a second copy — including after a 502.
|
|
1829
|
+
|
|
1830
|
+
</dd>
|
|
1831
|
+
</dl>
|
|
1832
|
+
|
|
1833
|
+
<dl>
|
|
1834
|
+
<dd>
|
|
1835
|
+
|
|
1836
|
+
**dedup_mode:** `CloudPDF::Documents::Types::DocumentsImportFromRequestDedupMode` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
|
|
1837
|
+
|
|
1838
|
+
</dd>
|
|
1839
|
+
</dl>
|
|
1840
|
+
|
|
1841
|
+
<dl>
|
|
1842
|
+
<dd>
|
|
1843
|
+
|
|
1844
|
+
**doc_id:** `String`
|
|
1845
|
+
|
|
1846
|
+
</dd>
|
|
1847
|
+
</dl>
|
|
1848
|
+
|
|
1849
|
+
<dl>
|
|
1850
|
+
<dd>
|
|
1851
|
+
|
|
1852
|
+
**mode:** `CloudPDF::Documents::Types::DocumentsImportFromRequestMode` — sync (default) holds the response open for the whole transfer. async answers 202 with the document pending and transfers in the background; it requires a connection source, and filesystem connections additionally require expected.sha256.
|
|
1853
|
+
|
|
1854
|
+
</dd>
|
|
1855
|
+
</dl>
|
|
1856
|
+
|
|
1857
|
+
<dl>
|
|
1858
|
+
<dd>
|
|
1859
|
+
|
|
1860
|
+
**request_options:** `CloudPDF::Documents::RequestOptions`
|
|
1861
|
+
|
|
1862
|
+
</dd>
|
|
1863
|
+
</dl>
|
|
1864
|
+
</dd>
|
|
1865
|
+
</dl>
|
|
1866
|
+
|
|
1867
|
+
|
|
1750
1868
|
</dd>
|
|
1751
1869
|
</dl>
|
|
1752
1870
|
</details>
|
|
@@ -1823,7 +1941,7 @@ client.documents.init(
|
|
|
1823
1941
|
<dl>
|
|
1824
1942
|
<dd>
|
|
1825
1943
|
|
|
1826
|
-
**dedup_mode:** `CloudPDF::Documents::Types::DocumentsInitRequestDedupMode`
|
|
1944
|
+
**dedup_mode:** `CloudPDF::Documents::Types::DocumentsInitRequestDedupMode` — always-create (default) creates a new document every time. reuse-existing returns a document that already holds the same content instead of storing it twice.
|
|
1827
1945
|
|
|
1828
1946
|
</dd>
|
|
1829
1947
|
</dl>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cloudpdf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.0.alpha.
|
|
4
|
+
version: 3.0.0.alpha.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CloudPDF
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: A typed Ruby client for deployment, tenant, and document operations in
|
|
14
14
|
the CloudPDF API.
|
|
@@ -57,6 +57,13 @@ files:
|
|
|
57
57
|
- lib/CloudPDF/documents/client.rb
|
|
58
58
|
- lib/CloudPDF/documents/types/delete_documents_request.rb
|
|
59
59
|
- lib/CloudPDF/documents/types/documents_commit_request.rb
|
|
60
|
+
- lib/CloudPDF/documents/types/documents_import_from_request.rb
|
|
61
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_dedup_mode.rb
|
|
62
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_expected.rb
|
|
63
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_mode.rb
|
|
64
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_source.rb
|
|
65
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_source_connection.rb
|
|
66
|
+
- lib/CloudPDF/documents/types/documents_import_from_request_source_url.rb
|
|
60
67
|
- lib/CloudPDF/documents/types/documents_init_request.rb
|
|
61
68
|
- lib/CloudPDF/documents/types/documents_init_request_dedup_mode.rb
|
|
62
69
|
- lib/CloudPDF/documents/types/documents_init_request_upload_preference.rb
|
|
@@ -1933,6 +1940,22 @@ files:
|
|
|
1933
1940
|
- lib/CloudPDF/types/documents_get403response_error.rb
|
|
1934
1941
|
- lib/CloudPDF/types/documents_get404response.rb
|
|
1935
1942
|
- lib/CloudPDF/types/documents_get404response_error.rb
|
|
1943
|
+
- lib/CloudPDF/types/documents_import_from200response.rb
|
|
1944
|
+
- lib/CloudPDF/types/documents_import_from200response_document.rb
|
|
1945
|
+
- lib/CloudPDF/types/documents_import_from200response_document_state.rb
|
|
1946
|
+
- lib/CloudPDF/types/documents_import_from200response_document_thumbnail_state.rb
|
|
1947
|
+
- lib/CloudPDF/types/documents_import_from200response_tag.rb
|
|
1948
|
+
- lib/CloudPDF/types/documents_import_from202response.rb
|
|
1949
|
+
- lib/CloudPDF/types/documents_import_from202response_document.rb
|
|
1950
|
+
- lib/CloudPDF/types/documents_import_from202response_document_state.rb
|
|
1951
|
+
- lib/CloudPDF/types/documents_import_from202response_document_thumbnail_state.rb
|
|
1952
|
+
- lib/CloudPDF/types/documents_import_from202response_tag.rb
|
|
1953
|
+
- lib/CloudPDF/types/documents_import_from400response.rb
|
|
1954
|
+
- lib/CloudPDF/types/documents_import_from400response_error.rb
|
|
1955
|
+
- lib/CloudPDF/types/documents_import_from403response.rb
|
|
1956
|
+
- lib/CloudPDF/types/documents_import_from403response_error.rb
|
|
1957
|
+
- lib/CloudPDF/types/documents_import_from502response.rb
|
|
1958
|
+
- lib/CloudPDF/types/documents_import_from502response_error.rb
|
|
1936
1959
|
- lib/CloudPDF/types/documents_init200response.rb
|
|
1937
1960
|
- lib/CloudPDF/types/documents_init200response_created.rb
|
|
1938
1961
|
- lib/CloudPDF/types/documents_init200response_created_document.rb
|