cloudpdf 3.0.0.alpha.17 → 3.0.0.alpha.18
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/client.rb +5 -0
- data/lib/CloudPDF/doc/signatures/client.rb +5 -4
- data/lib/CloudPDF/doc/versions/client.rb +27 -10
- data/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/download_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/list_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/revision_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/signature_contents_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/signature_digest_versions_request.rb +2 -0
- data/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb +2 -0
- data/lib/CloudPDF/documents/client.rb +55 -0
- data/lib/CloudPDF/documents/types/documents_import_from_request.rb +4 -0
- data/lib/CloudPDF/documents/types/documents_init_request.rb +4 -0
- data/lib/CloudPDF/documents/types/documents_update_request.rb +15 -0
- data/lib/CloudPDF/documents/types/list_documents_request.rb +8 -0
- data/lib/CloudPDF/documents/types/list_documents_request_order.rb +14 -0
- data/lib/CloudPDF/documents/types/list_documents_request_sort.rb +15 -0
- data/lib/CloudPDF/folders/client.rb +286 -0
- data/lib/CloudPDF/folders/types/delete_folders_request.rb +15 -0
- data/lib/CloudPDF/folders/types/folders_create_request.rb +15 -0
- data/lib/CloudPDF/folders/types/folders_move_into_request.rb +17 -0
- data/lib/CloudPDF/folders/types/folders_update_request.rb +15 -0
- data/lib/CloudPDF/folders/types/get_folders_request.rb +13 -0
- data/lib/CloudPDF/folders/types/list_folders_request.rb +17 -0
- data/lib/CloudPDF/shares/types/shares_create_request.rb +2 -0
- data/lib/CloudPDF/shares/types/shares_update_request.rb +2 -0
- data/lib/CloudPDF/types/doc_versions_list200response.rb +1 -1
- data/lib/CloudPDF/types/documents_commit200response_document.rb +4 -0
- data/lib/CloudPDF/types/documents_get200response_document.rb +4 -0
- data/lib/CloudPDF/types/documents_import_from200response_document.rb +4 -0
- data/lib/CloudPDF/types/documents_import_from202response_document.rb +4 -0
- data/lib/CloudPDF/types/documents_init200response_created_document.rb +4 -0
- data/lib/CloudPDF/types/documents_init200response_deduped_document.rb +4 -0
- data/lib/CloudPDF/types/documents_init200response_resumed_document.rb +4 -0
- data/lib/CloudPDF/types/documents_list200response_documents_item.rb +4 -0
- data/lib/CloudPDF/types/documents_update200response.rb +9 -0
- data/lib/CloudPDF/types/documents_update200response_document.rb +37 -0
- data/lib/CloudPDF/types/documents_update200response_document_state.rb +14 -0
- data/lib/CloudPDF/types/documents_update200response_document_thumbnail_state.rb +14 -0
- data/lib/CloudPDF/types/documents_update400response.rb +23 -0
- data/lib/CloudPDF/types/documents_update403response.rb +23 -0
- data/lib/CloudPDF/types/documents_update404response.rb +23 -0
- data/lib/CloudPDF/types/engine_error_payload_code.rb +0 -1
- data/lib/CloudPDF/types/folders_create200response.rb +9 -0
- data/lib/CloudPDF/types/folders_create200response_folder.rb +21 -0
- data/lib/CloudPDF/types/folders_create400response.rb +23 -0
- data/lib/CloudPDF/types/folders_create403response.rb +23 -0
- data/lib/CloudPDF/types/folders_create404response.rb +23 -0
- data/lib/CloudPDF/types/folders_create409response.rb +23 -0
- data/lib/CloudPDF/types/folders_delete403response.rb +23 -0
- data/lib/CloudPDF/types/folders_delete404response.rb +23 -0
- data/lib/CloudPDF/types/folders_delete409response.rb +23 -0
- data/lib/CloudPDF/types/folders_get200response.rb +11 -0
- data/lib/CloudPDF/types/folders_get200response_folder.rb +21 -0
- data/lib/CloudPDF/types/folders_get200response_path_item.rb +11 -0
- data/lib/CloudPDF/types/folders_get403response.rb +23 -0
- data/lib/CloudPDF/types/folders_get404response.rb +23 -0
- data/lib/CloudPDF/types/folders_list200response.rb +11 -0
- data/lib/CloudPDF/types/folders_list200response_folders_item.rb +21 -0
- data/lib/CloudPDF/types/folders_list400response.rb +23 -0
- data/lib/CloudPDF/types/folders_list403response.rb +23 -0
- data/lib/CloudPDF/types/folders_list404response.rb +23 -0
- data/lib/CloudPDF/types/folders_move_into400response.rb +23 -0
- data/lib/CloudPDF/types/folders_move_into403response.rb +23 -0
- data/lib/CloudPDF/types/folders_move_into404response.rb +23 -0
- data/lib/CloudPDF/types/folders_move_into409response.rb +23 -0
- data/lib/CloudPDF/types/folders_update200response.rb +9 -0
- data/lib/CloudPDF/types/folders_update200response_folder.rb +21 -0
- data/lib/CloudPDF/types/folders_update400response.rb +23 -0
- data/lib/CloudPDF/types/folders_update403response.rb +23 -0
- data/lib/CloudPDF/types/folders_update404response.rb +23 -0
- data/lib/CloudPDF/types/folders_update409response.rb +23 -0
- data/lib/CloudPDF/types/{tokens_issue_request_doc_identity.rb → identity.rb} +1 -1
- data/lib/CloudPDF/types/shares_archive200response_share.rb +2 -0
- data/lib/CloudPDF/types/shares_create200response_share.rb +2 -0
- data/lib/CloudPDF/types/shares_get200response_share.rb +2 -0
- data/lib/CloudPDF/types/shares_list200response_shares_item.rb +2 -0
- data/lib/CloudPDF/types/shares_update200response_share.rb +2 -0
- data/lib/CloudPDF/types/tokens_issue_request_doc.rb +1 -1
- data/lib/CloudPDF/types/tokens_issue_request_tenant.rb +1 -1
- data/lib/CloudPDF/version.rb +1 -1
- data/lib/cloudpdf.rb +47 -4
- data/reference.md +833 -141
- metadata +49 -6
- data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item.rb +0 -13
- data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item_one.rb +0 -16
- data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item_zero.rb +0 -11
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [CloudPDF::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# @param request_options [Hash]
|
|
14
|
+
# @param params [Hash]
|
|
15
|
+
# @option request_options [String] :base_url
|
|
16
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
17
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
18
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
19
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
20
|
+
# @option params [String] :tenant_id
|
|
21
|
+
# @option params [Integer, nil] :limit
|
|
22
|
+
# @option params [String, nil] :cursor
|
|
23
|
+
# @option params [String, nil] :parent_id
|
|
24
|
+
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.folders.list(tenant_id: "tenantId")
|
|
27
|
+
#
|
|
28
|
+
# @return [CloudPDF::Types::FoldersList200Response]
|
|
29
|
+
def list(request_options: {}, **params)
|
|
30
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
31
|
+
query_params = {}
|
|
32
|
+
query_params["limit"] = params[:limit] if params.key?(:limit)
|
|
33
|
+
query_params["cursor"] = params[:cursor] if params.key?(:cursor)
|
|
34
|
+
query_params["parentId"] = params[:parent_id] if params.key?(:parent_id)
|
|
35
|
+
|
|
36
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
37
|
+
base_url: request_options[:base_url],
|
|
38
|
+
method: "GET",
|
|
39
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders",
|
|
40
|
+
query: query_params,
|
|
41
|
+
request_options: request_options
|
|
42
|
+
)
|
|
43
|
+
begin
|
|
44
|
+
response = @client.send(request)
|
|
45
|
+
rescue Net::HTTPRequestTimeout
|
|
46
|
+
raise CloudPDF::Errors::TimeoutError
|
|
47
|
+
end
|
|
48
|
+
code = response.code.to_i
|
|
49
|
+
if code.between?(200, 299)
|
|
50
|
+
(response.body.to_s.empty? ? nil : CloudPDF::Types::FoldersList200Response.load(response.body))
|
|
51
|
+
else
|
|
52
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
53
|
+
raise error_class.new(response.body, code: code)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# 409 Conflict carries `details.reason`: `name-taken` (a sibling has the name, ignoring case; `details.name`) or
|
|
58
|
+
# `too-deep` (folders nest at most 100 levels; `details.maxDepth`). 404 when the parent folder does not exist.
|
|
59
|
+
#
|
|
60
|
+
# @param request_options [Hash]
|
|
61
|
+
# @param params [CloudPDF::Folders::Types::FoldersCreateRequest]
|
|
62
|
+
# @option request_options [String] :base_url
|
|
63
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
64
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
65
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
66
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
67
|
+
# @option params [String] :tenant_id
|
|
68
|
+
#
|
|
69
|
+
# @example
|
|
70
|
+
# client.folders.create(
|
|
71
|
+
# tenant_id: "tenantId",
|
|
72
|
+
# name: "name"
|
|
73
|
+
# )
|
|
74
|
+
#
|
|
75
|
+
# @return [CloudPDF::Types::FoldersCreate200Response]
|
|
76
|
+
def create(request_options: {}, **params)
|
|
77
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
78
|
+
request_data = CloudPDF::Folders::Types::FoldersCreateRequest.new(params).to_h
|
|
79
|
+
non_body_param_names = %w[tenantId]
|
|
80
|
+
body = request_data.except(*non_body_param_names)
|
|
81
|
+
|
|
82
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
83
|
+
base_url: request_options[:base_url],
|
|
84
|
+
method: "POST",
|
|
85
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders",
|
|
86
|
+
body: body,
|
|
87
|
+
request_options: request_options
|
|
88
|
+
)
|
|
89
|
+
begin
|
|
90
|
+
response = @client.send(request)
|
|
91
|
+
rescue Net::HTTPRequestTimeout
|
|
92
|
+
raise CloudPDF::Errors::TimeoutError
|
|
93
|
+
end
|
|
94
|
+
code = response.code.to_i
|
|
95
|
+
if code.between?(200, 299)
|
|
96
|
+
(response.body.to_s.empty? ? nil : CloudPDF::Types::FoldersCreate200Response.load(response.body))
|
|
97
|
+
else
|
|
98
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
99
|
+
raise error_class.new(response.body, code: code)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @param request_options [Hash]
|
|
104
|
+
# @param params [Hash]
|
|
105
|
+
# @option request_options [String] :base_url
|
|
106
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
107
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
108
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
109
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
110
|
+
# @option params [String] :tenant_id
|
|
111
|
+
# @option params [String] :folder_id
|
|
112
|
+
#
|
|
113
|
+
# @example
|
|
114
|
+
# client.folders.get(
|
|
115
|
+
# tenant_id: "tenantId",
|
|
116
|
+
# folder_id: "folderId"
|
|
117
|
+
# )
|
|
118
|
+
#
|
|
119
|
+
# @return [CloudPDF::Types::FoldersGet200Response]
|
|
120
|
+
def get(request_options: {}, **params)
|
|
121
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
122
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
123
|
+
base_url: request_options[:base_url],
|
|
124
|
+
method: "GET",
|
|
125
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders/#{URI.encode_uri_component(params[:folder_id].to_s)}",
|
|
126
|
+
request_options: request_options
|
|
127
|
+
)
|
|
128
|
+
begin
|
|
129
|
+
response = @client.send(request)
|
|
130
|
+
rescue Net::HTTPRequestTimeout
|
|
131
|
+
raise CloudPDF::Errors::TimeoutError
|
|
132
|
+
end
|
|
133
|
+
code = response.code.to_i
|
|
134
|
+
if code.between?(200, 299)
|
|
135
|
+
(response.body.to_s.empty? ? nil : CloudPDF::Types::FoldersGet200Response.load(response.body))
|
|
136
|
+
else
|
|
137
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
138
|
+
raise error_class.new(response.body, code: code)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Without recursive, a folder with anything inside is refused: 409 Conflict with `details.reason` `not-empty` and
|
|
143
|
+
# what it holds, counted over every level below, in `details.folders` and `details.documents`. With
|
|
144
|
+
# recursive=true, the folder and every folder under it go at once, and every document in them stops opening,
|
|
145
|
+
# leaves every list and stops answering its share links at once; their stored files and links are removed in the
|
|
146
|
+
# background. Uploads into those folders that have not committed cannot commit.
|
|
147
|
+
#
|
|
148
|
+
# @param request_options [Hash]
|
|
149
|
+
# @param params [Hash]
|
|
150
|
+
# @option request_options [String] :base_url
|
|
151
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
152
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
153
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
154
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
155
|
+
# @option params [String] :tenant_id
|
|
156
|
+
# @option params [String] :folder_id
|
|
157
|
+
# @option params [Boolean, nil] :recursive
|
|
158
|
+
#
|
|
159
|
+
# @example
|
|
160
|
+
# client.folders.delete(
|
|
161
|
+
# tenant_id: "tenantId",
|
|
162
|
+
# folder_id: "folderId"
|
|
163
|
+
# )
|
|
164
|
+
#
|
|
165
|
+
# @return [untyped]
|
|
166
|
+
def delete(request_options: {}, **params)
|
|
167
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
168
|
+
query_params = {}
|
|
169
|
+
query_params["recursive"] = params[:recursive] if params.key?(:recursive)
|
|
170
|
+
|
|
171
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
172
|
+
base_url: request_options[:base_url],
|
|
173
|
+
method: "DELETE",
|
|
174
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders/#{URI.encode_uri_component(params[:folder_id].to_s)}",
|
|
175
|
+
query: query_params,
|
|
176
|
+
request_options: request_options
|
|
177
|
+
)
|
|
178
|
+
begin
|
|
179
|
+
response = @client.send(request)
|
|
180
|
+
rescue Net::HTTPRequestTimeout
|
|
181
|
+
raise CloudPDF::Errors::TimeoutError
|
|
182
|
+
end
|
|
183
|
+
code = response.code.to_i
|
|
184
|
+
return if code.between?(200, 299)
|
|
185
|
+
|
|
186
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
187
|
+
raise error_class.new(response.body, code: code)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# 409 Conflict with `details.reason` `name-taken` when a sibling has the name, ignoring case.
|
|
191
|
+
#
|
|
192
|
+
# @param request_options [Hash]
|
|
193
|
+
# @param params [CloudPDF::Folders::Types::FoldersUpdateRequest]
|
|
194
|
+
# @option request_options [String] :base_url
|
|
195
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
196
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
197
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
198
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
199
|
+
# @option params [String] :tenant_id
|
|
200
|
+
# @option params [String] :folder_id
|
|
201
|
+
#
|
|
202
|
+
# @example
|
|
203
|
+
# client.folders.update(
|
|
204
|
+
# tenant_id: "tenantId",
|
|
205
|
+
# folder_id: "folderId",
|
|
206
|
+
# name: "name"
|
|
207
|
+
# )
|
|
208
|
+
#
|
|
209
|
+
# @return [CloudPDF::Types::FoldersUpdate200Response]
|
|
210
|
+
def update(request_options: {}, **params)
|
|
211
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
212
|
+
request_data = CloudPDF::Folders::Types::FoldersUpdateRequest.new(params).to_h
|
|
213
|
+
non_body_param_names = %w[tenantId folderId]
|
|
214
|
+
body = request_data.except(*non_body_param_names)
|
|
215
|
+
|
|
216
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
217
|
+
base_url: request_options[:base_url],
|
|
218
|
+
method: "PATCH",
|
|
219
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders/#{URI.encode_uri_component(params[:folder_id].to_s)}",
|
|
220
|
+
body: body,
|
|
221
|
+
request_options: request_options
|
|
222
|
+
)
|
|
223
|
+
begin
|
|
224
|
+
response = @client.send(request)
|
|
225
|
+
rescue Net::HTTPRequestTimeout
|
|
226
|
+
raise CloudPDF::Errors::TimeoutError
|
|
227
|
+
end
|
|
228
|
+
code = response.code.to_i
|
|
229
|
+
if code.between?(200, 299)
|
|
230
|
+
(response.body.to_s.empty? ? nil : CloudPDF::Types::FoldersUpdate200Response.load(response.body))
|
|
231
|
+
else
|
|
232
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
233
|
+
raise error_class.new(response.body, code: code)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or
|
|
238
|
+
# are being deleted in `details.documentIds` and `details.folderIds`. 409 Conflict carries `details.reason`:
|
|
239
|
+
# `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest
|
|
240
|
+
# folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the
|
|
241
|
+
# destination, ignoring case; `details.name`).
|
|
242
|
+
#
|
|
243
|
+
# @param request_options [Hash]
|
|
244
|
+
# @param params [CloudPDF::Folders::Types::FoldersMoveIntoRequest]
|
|
245
|
+
# @option request_options [String] :base_url
|
|
246
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
247
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
248
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
249
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
250
|
+
# @option params [String] :tenant_id
|
|
251
|
+
# @option params [String] :folder_id
|
|
252
|
+
#
|
|
253
|
+
# @example
|
|
254
|
+
# client.folders.move_into(
|
|
255
|
+
# tenant_id: "tenantId",
|
|
256
|
+
# folder_id: "folderId"
|
|
257
|
+
# )
|
|
258
|
+
#
|
|
259
|
+
# @return [untyped]
|
|
260
|
+
def move_into(request_options: {}, **params)
|
|
261
|
+
params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
|
|
262
|
+
request_data = CloudPDF::Folders::Types::FoldersMoveIntoRequest.new(params).to_h
|
|
263
|
+
non_body_param_names = %w[tenantId folderId]
|
|
264
|
+
body = request_data.except(*non_body_param_names)
|
|
265
|
+
|
|
266
|
+
request = CloudPDF::Internal::JSON::Request.new(
|
|
267
|
+
base_url: request_options[:base_url],
|
|
268
|
+
method: "POST",
|
|
269
|
+
path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/folders/#{URI.encode_uri_component(params[:folder_id].to_s)}/move-into",
|
|
270
|
+
body: body,
|
|
271
|
+
request_options: request_options
|
|
272
|
+
)
|
|
273
|
+
begin
|
|
274
|
+
response = @client.send(request)
|
|
275
|
+
rescue Net::HTTPRequestTimeout
|
|
276
|
+
raise CloudPDF::Errors::TimeoutError
|
|
277
|
+
end
|
|
278
|
+
code = response.code.to_i
|
|
279
|
+
return if code.between?(200, 299)
|
|
280
|
+
|
|
281
|
+
error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
|
|
282
|
+
raise error_class.new(response.body, code: code)
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class DeleteFoldersRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
10
|
+
|
|
11
|
+
field :recursive, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class FoldersCreateRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
10
|
+
|
|
11
|
+
field :parent_id, -> { String }, optional: true, nullable: false, api_name: "parentId"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class FoldersMoveIntoRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
10
|
+
|
|
11
|
+
field :document_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "documentIds"
|
|
12
|
+
|
|
13
|
+
field :folder_ids, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "folderIds"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class FoldersUpdateRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
10
|
+
|
|
11
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class GetFoldersRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Folders
|
|
5
|
+
module Types
|
|
6
|
+
class ListFoldersRequest < Internal::Types::Model
|
|
7
|
+
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
8
|
+
|
|
9
|
+
field :limit, -> { Integer }, optional: true, nullable: false
|
|
10
|
+
|
|
11
|
+
field :cursor, -> { String }, optional: true, nullable: false
|
|
12
|
+
|
|
13
|
+
field :parent_id, -> { String }, optional: true, nullable: false, api_name: "parentId"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -18,6 +18,8 @@ module CloudPDF
|
|
|
18
18
|
|
|
19
19
|
field :visitor_identity, -> { CloudPDF::Shares::Types::SharesCreateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity"
|
|
20
20
|
|
|
21
|
+
field :identity, -> { CloudPDF::Types::Identity }, optional: true, nullable: false
|
|
22
|
+
|
|
21
23
|
field :scope, -> { Internal::Types::Array[String] }, optional: false, nullable: false
|
|
22
24
|
|
|
23
25
|
field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
@@ -18,6 +18,8 @@ module CloudPDF
|
|
|
18
18
|
|
|
19
19
|
field :visitor_identity, -> { CloudPDF::Shares::Types::SharesUpdateRequestVisitorIdentity }, optional: true, nullable: false, api_name: "visitorIdentity"
|
|
20
20
|
|
|
21
|
+
field :identity, -> { CloudPDF::Types::Identity }, optional: true, nullable: false
|
|
22
|
+
|
|
21
23
|
field :scope, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
22
24
|
|
|
23
25
|
field :origins, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module CloudPDF
|
|
4
4
|
module Types
|
|
5
5
|
class DocVersionsList200Response < Internal::Types::Model
|
|
6
|
-
field :
|
|
6
|
+
field :base_sha, -> { String }, optional: false, nullable: false, api_name: "baseSha"
|
|
7
7
|
|
|
8
8
|
field :versions, -> { Internal::Types::Array[CloudPDF::Types::DocVersionsList200ResponseVersionsItem] }, optional: false, nullable: false
|
|
9
9
|
end
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsCommit200ResponseDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsGet200ResponseDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsImportFrom200ResponseDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsImportFrom202ResponseDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsInit200ResponseCreatedDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsInit200ResponseDedupedDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsInit200ResponseResumedDocumentState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -7,6 +7,10 @@ module CloudPDF
|
|
|
7
7
|
|
|
8
8
|
field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
|
|
9
9
|
|
|
10
|
+
field :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
10
14
|
field :state, -> { CloudPDF::Types::DocumentsList200ResponseDocumentsItemState }, optional: false, nullable: false
|
|
11
15
|
|
|
12
16
|
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
class DocumentsUpdate200ResponseDocument < 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 :name, -> { String }, optional: false, nullable: false
|
|
11
|
+
|
|
12
|
+
field :folder_id, -> { String }, optional: false, nullable: false, api_name: "folderId"
|
|
13
|
+
|
|
14
|
+
field :state, -> { CloudPDF::Types::DocumentsUpdate200ResponseDocumentState }, optional: false, nullable: false
|
|
15
|
+
|
|
16
|
+
field :base_sha, -> { String }, optional: false, nullable: true, api_name: "baseSha"
|
|
17
|
+
|
|
18
|
+
field :storage_size_bytes, -> { Integer }, optional: false, nullable: true, api_name: "storageSizeBytes"
|
|
19
|
+
|
|
20
|
+
field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true
|
|
21
|
+
|
|
22
|
+
field :idempotency_key, -> { String }, optional: false, nullable: true, api_name: "idempotencyKey"
|
|
23
|
+
|
|
24
|
+
field :failure_reason, -> { String }, optional: false, nullable: true, api_name: "failureReason"
|
|
25
|
+
|
|
26
|
+
field :thumbnail_state, -> { CloudPDF::Types::DocumentsUpdate200ResponseDocumentThumbnailState }, optional: true, nullable: false, api_name: "thumbnailState"
|
|
27
|
+
|
|
28
|
+
field :thumbnail_url, -> { String }, optional: true, nullable: false, api_name: "thumbnailUrl"
|
|
29
|
+
|
|
30
|
+
field :created_at, -> { Integer }, optional: false, nullable: false, api_name: "createdAt"
|
|
31
|
+
|
|
32
|
+
field :updated_at, -> { Integer }, optional: false, nullable: false, api_name: "updatedAt"
|
|
33
|
+
|
|
34
|
+
field :created_by, -> { String }, optional: false, nullable: true, api_name: "createdBy"
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsUpdate200ResponseDocumentState
|
|
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 DocumentsUpdate200ResponseDocumentThumbnailState
|
|
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,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsUpdate400Response
|
|
6
|
+
# DocumentsUpdate400Response is an alias for AdminErrorPayload
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsUpdate403Response
|
|
6
|
+
# DocumentsUpdate403Response is an alias for AdminErrorPayload
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module CloudPDF
|
|
4
|
+
module Types
|
|
5
|
+
module DocumentsUpdate404Response
|
|
6
|
+
# DocumentsUpdate404Response is an alias for AdminErrorPayload
|
|
7
|
+
|
|
8
|
+
# @option str [String]
|
|
9
|
+
#
|
|
10
|
+
# @return [untyped]
|
|
11
|
+
def self.load(str)
|
|
12
|
+
::JSON.parse(str)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# @option value [untyped]
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
def self.dump(value)
|
|
19
|
+
::JSON.generate(value)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|