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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +2 -2
  3. data/lib/CloudPDF/client.rb +5 -0
  4. data/lib/CloudPDF/doc/signatures/client.rb +5 -4
  5. data/lib/CloudPDF/doc/versions/client.rb +27 -10
  6. data/lib/CloudPDF/doc/versions/types/analysis_versions_request.rb +2 -0
  7. data/lib/CloudPDF/doc/versions/types/download_versions_request.rb +2 -0
  8. data/lib/CloudPDF/doc/versions/types/list_versions_request.rb +2 -0
  9. data/lib/CloudPDF/doc/versions/types/revision_versions_request.rb +2 -0
  10. data/lib/CloudPDF/doc/versions/types/signature_contents_versions_request.rb +2 -0
  11. data/lib/CloudPDF/doc/versions/types/signature_digest_versions_request.rb +2 -0
  12. data/lib/CloudPDF/doc/versions/types/signatures_versions_request.rb +2 -0
  13. data/lib/CloudPDF/documents/client.rb +55 -0
  14. data/lib/CloudPDF/documents/types/documents_import_from_request.rb +4 -0
  15. data/lib/CloudPDF/documents/types/documents_init_request.rb +4 -0
  16. data/lib/CloudPDF/documents/types/documents_update_request.rb +15 -0
  17. data/lib/CloudPDF/documents/types/list_documents_request.rb +8 -0
  18. data/lib/CloudPDF/documents/types/list_documents_request_order.rb +14 -0
  19. data/lib/CloudPDF/documents/types/list_documents_request_sort.rb +15 -0
  20. data/lib/CloudPDF/folders/client.rb +286 -0
  21. data/lib/CloudPDF/folders/types/delete_folders_request.rb +15 -0
  22. data/lib/CloudPDF/folders/types/folders_create_request.rb +15 -0
  23. data/lib/CloudPDF/folders/types/folders_move_into_request.rb +17 -0
  24. data/lib/CloudPDF/folders/types/folders_update_request.rb +15 -0
  25. data/lib/CloudPDF/folders/types/get_folders_request.rb +13 -0
  26. data/lib/CloudPDF/folders/types/list_folders_request.rb +17 -0
  27. data/lib/CloudPDF/shares/types/shares_create_request.rb +2 -0
  28. data/lib/CloudPDF/shares/types/shares_update_request.rb +2 -0
  29. data/lib/CloudPDF/types/doc_versions_list200response.rb +1 -1
  30. data/lib/CloudPDF/types/documents_commit200response_document.rb +4 -0
  31. data/lib/CloudPDF/types/documents_get200response_document.rb +4 -0
  32. data/lib/CloudPDF/types/documents_import_from200response_document.rb +4 -0
  33. data/lib/CloudPDF/types/documents_import_from202response_document.rb +4 -0
  34. data/lib/CloudPDF/types/documents_init200response_created_document.rb +4 -0
  35. data/lib/CloudPDF/types/documents_init200response_deduped_document.rb +4 -0
  36. data/lib/CloudPDF/types/documents_init200response_resumed_document.rb +4 -0
  37. data/lib/CloudPDF/types/documents_list200response_documents_item.rb +4 -0
  38. data/lib/CloudPDF/types/documents_update200response.rb +9 -0
  39. data/lib/CloudPDF/types/documents_update200response_document.rb +37 -0
  40. data/lib/CloudPDF/types/documents_update200response_document_state.rb +14 -0
  41. data/lib/CloudPDF/types/documents_update200response_document_thumbnail_state.rb +14 -0
  42. data/lib/CloudPDF/types/documents_update400response.rb +23 -0
  43. data/lib/CloudPDF/types/documents_update403response.rb +23 -0
  44. data/lib/CloudPDF/types/documents_update404response.rb +23 -0
  45. data/lib/CloudPDF/types/engine_error_payload_code.rb +0 -1
  46. data/lib/CloudPDF/types/folders_create200response.rb +9 -0
  47. data/lib/CloudPDF/types/folders_create200response_folder.rb +21 -0
  48. data/lib/CloudPDF/types/folders_create400response.rb +23 -0
  49. data/lib/CloudPDF/types/folders_create403response.rb +23 -0
  50. data/lib/CloudPDF/types/folders_create404response.rb +23 -0
  51. data/lib/CloudPDF/types/folders_create409response.rb +23 -0
  52. data/lib/CloudPDF/types/folders_delete403response.rb +23 -0
  53. data/lib/CloudPDF/types/folders_delete404response.rb +23 -0
  54. data/lib/CloudPDF/types/folders_delete409response.rb +23 -0
  55. data/lib/CloudPDF/types/folders_get200response.rb +11 -0
  56. data/lib/CloudPDF/types/folders_get200response_folder.rb +21 -0
  57. data/lib/CloudPDF/types/folders_get200response_path_item.rb +11 -0
  58. data/lib/CloudPDF/types/folders_get403response.rb +23 -0
  59. data/lib/CloudPDF/types/folders_get404response.rb +23 -0
  60. data/lib/CloudPDF/types/folders_list200response.rb +11 -0
  61. data/lib/CloudPDF/types/folders_list200response_folders_item.rb +21 -0
  62. data/lib/CloudPDF/types/folders_list400response.rb +23 -0
  63. data/lib/CloudPDF/types/folders_list403response.rb +23 -0
  64. data/lib/CloudPDF/types/folders_list404response.rb +23 -0
  65. data/lib/CloudPDF/types/folders_move_into400response.rb +23 -0
  66. data/lib/CloudPDF/types/folders_move_into403response.rb +23 -0
  67. data/lib/CloudPDF/types/folders_move_into404response.rb +23 -0
  68. data/lib/CloudPDF/types/folders_move_into409response.rb +23 -0
  69. data/lib/CloudPDF/types/folders_update200response.rb +9 -0
  70. data/lib/CloudPDF/types/folders_update200response_folder.rb +21 -0
  71. data/lib/CloudPDF/types/folders_update400response.rb +23 -0
  72. data/lib/CloudPDF/types/folders_update403response.rb +23 -0
  73. data/lib/CloudPDF/types/folders_update404response.rb +23 -0
  74. data/lib/CloudPDF/types/folders_update409response.rb +23 -0
  75. data/lib/CloudPDF/types/{tokens_issue_request_doc_identity.rb → identity.rb} +1 -1
  76. data/lib/CloudPDF/types/shares_archive200response_share.rb +2 -0
  77. data/lib/CloudPDF/types/shares_create200response_share.rb +2 -0
  78. data/lib/CloudPDF/types/shares_get200response_share.rb +2 -0
  79. data/lib/CloudPDF/types/shares_list200response_shares_item.rb +2 -0
  80. data/lib/CloudPDF/types/shares_update200response_share.rb +2 -0
  81. data/lib/CloudPDF/types/tokens_issue_request_doc.rb +1 -1
  82. data/lib/CloudPDF/types/tokens_issue_request_tenant.rb +1 -1
  83. data/lib/CloudPDF/version.rb +1 -1
  84. data/lib/cloudpdf.rb +47 -4
  85. data/reference.md +833 -141
  86. metadata +49 -6
  87. data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item.rb +0 -13
  88. data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item_one.rb +0 -16
  89. data/lib/CloudPDF/types/tokens_issue_request_tenant_scope_item_zero.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e95ed59ffc794a7e8f609249f54ae8776c826a6fa0b9ab2924339ff7021c5ca
4
- data.tar.gz: b029d01ffb43183c13b30f52c9a854e0ee8ae4796bf922a722fc43a695eabba8
3
+ metadata.gz: 60b08232398dd3b69b7047deb1604b0f0c8923a86e3bdab1b001a9d1e6444ff4
4
+ data.tar.gz: be28a21f10968317e529e58a51fdc54b9e69b758a6ecb4bf8c482f46a9dd1d7e
5
5
  SHA512:
6
- metadata.gz: 47c9670feae8fd960afb50c873552be12bd6698666f384a36ec4e1ebe8415ea97f6e714e4a630dd0c8694e75578122520f8adf983842b5e2b453a6db2dbf2845
7
- data.tar.gz: 05e5c4076118baa3cba478feb0f59a0d088b142e795ecb80e02e112adb25c97ed9fb9161886982f4b0884351a4511101cafba8e1c5ccfd8b102b5d8f63ede18d
6
+ metadata.gz: f45952c49aa1914d94edd9230406ab102e293062f3c4708bf18763ce7909608d8249673c28d364d831ec3a025281ee63af76fbd28ee6e243b5cad72f3e7cc04a
7
+ data.tar.gz: 25eb38175721c461c143b3da952b74147c05ae5923eb34c00184c39f8dafa6d54731baeaa9bcd56ce7dcf1dc89766e7f7124d9ba9c817d11c4264d3d902c6ff1
data/.fern/metadata.json CHANGED
@@ -5,9 +5,9 @@
5
5
  "generatorConfig": {
6
6
  "moduleName": "CloudPDF"
7
7
  },
8
- "originGitCommit": "07aa3f26c82243b36a5ec94f7072130c7298d977",
8
+ "originGitCommit": "3a88df90980e5c0546a5ebbfd1252d8fca77ff9b",
9
9
  "originGitCommitIsDirty": false,
10
10
  "invokedBy": "ci",
11
- "requestedVersion": "3.0.0.alpha.17",
11
+ "requestedVersion": "3.0.0.alpha.18",
12
12
  "ciProvider": "github"
13
13
  }
@@ -43,6 +43,11 @@ module CloudPDF
43
43
  @documents ||= CloudPDF::Documents::Client.new(client: @raw_client)
44
44
  end
45
45
 
46
+ # @return [CloudPDF::Folders::Client]
47
+ def folders
48
+ @folders ||= CloudPDF::Folders::Client.new(client: @raw_client)
49
+ end
50
+
46
51
  # @return [CloudPDF::Tokens::Client]
47
52
  def tokens
48
53
  @tokens ||= CloudPDF::Tokens::Client.new(client: @raw_client)
@@ -105,8 +105,9 @@ module CloudPDF
105
105
  end
106
106
 
107
107
  # `cms` is the detached CMS over the prepared digest, base64. `expectedVersion` must be what prepare returned.
108
- # Idempotent by signing id: the same CMS again answers `already-completed`. Every layer of the document then
109
- # sits over the new version; refetch the manifest after a completion.
108
+ # Idempotent by signing id: the same CMS again answers `already-completed`. The new version is the layer's own:
109
+ # only this layer moves to it, and the document and every other layer stay as they were. Refetch the manifest
110
+ # after a completion.
110
111
  #
111
112
  # @param request_options [Hash]
112
113
  # @param params [CloudPDF::Doc::Signatures::Types::DocSignaturesCompleteRequest]
@@ -224,8 +225,8 @@ module CloudPDF
224
225
  # Multipart: a JSON `body` part (field, subFilter, digest, contentsSize, signer, certify, lock), naming the
225
226
  # appearance PDF it may carry as `resources: { appearance: '<key>' }`, and that PDF as the part
226
227
  # `resource:<key>`. A certification (`certify.permission`) additionally requires `doc.sign.certify`. The layer
227
- # is read-only until the signing completes, is cancelled, or expires (15 minutes). A layer behind the document
228
- # head cannot sign (StaleBase).
228
+ # is read-only until the signing completes, is cancelled, or expires (15 minutes). The signature is made over
229
+ # the layer's own base: the upload, or the version its last signature made.
229
230
  #
230
231
  # @param request_options [Hash]
231
232
  # @param params [void]
@@ -11,7 +11,8 @@ module CloudPDF
11
11
  @client = client
12
12
  end
13
13
 
14
- # Every completed signature publishes a new version. Never cached: the list grows.
14
+ # Every completed signature makes a new version of its layer; another layer's versions are never listed. Never
15
+ # cached: the list grows.
15
16
  #
16
17
  # @param request_options [Hash]
17
18
  # @param params [Hash]
@@ -21,10 +22,14 @@ module CloudPDF
21
22
  # @option request_options [Hash{String => Object}] :additional_body_parameters
22
23
  # @option request_options [Integer] :timeout_in_seconds
23
24
  # @option params [String] :doc_id
25
+ # @option params [String] :layer_name
24
26
  # @option params [String, nil] :document_password
25
27
  #
26
28
  # @example
27
- # client.doc.versions.list(doc_id: "docId")
29
+ # client.doc.versions.list(
30
+ # doc_id: "docId",
31
+ # layer_name: "layerName"
32
+ # )
28
33
  #
29
34
  # @return [CloudPDF::Types::DocVersionsList200Response]
30
35
  def list(request_options: {}, **params)
@@ -35,7 +40,7 @@ module CloudPDF
35
40
  request = CloudPDF::Internal::JSON::Request.new(
36
41
  base_url: request_options[:base_url],
37
42
  method: "GET",
38
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions",
43
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions",
39
44
  headers: headers,
40
45
  request_options: request_options
41
46
  )
@@ -54,7 +59,7 @@ module CloudPDF
54
59
  end
55
60
 
56
61
  # Exactly one of `since.signature` / `since.revision`; `until=<revision>` defaults to the last. The same answer
57
- # for every layer and every caller.
62
+ # for every caller.
58
63
  #
59
64
  # @param request_options [Hash]
60
65
  # @param params [Hash]
@@ -64,6 +69,7 @@ module CloudPDF
64
69
  # @option request_options [Hash{String => Object}] :additional_body_parameters
65
70
  # @option request_options [Integer] :timeout_in_seconds
66
71
  # @option params [String] :doc_id
72
+ # @option params [String] :layer_name
67
73
  # @option params [String] :sha
68
74
  # @option params [Integer, nil] :since_signature
69
75
  # @option params [Integer, nil] :since_revision
@@ -75,6 +81,7 @@ module CloudPDF
75
81
  # @example
76
82
  # client.doc.versions.analysis(
77
83
  # doc_id: "docId",
84
+ # layer_name: "layerName",
78
85
  # sha: "sha"
79
86
  # )
80
87
  #
@@ -94,7 +101,7 @@ module CloudPDF
94
101
  request = CloudPDF::Internal::JSON::Request.new(
95
102
  base_url: request_options[:base_url],
96
103
  method: "GET",
97
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/analysis/#{URI.encode_uri_component(params[:sha].to_s)}",
104
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/analysis/#{URI.encode_uri_component(params[:sha].to_s)}",
98
105
  headers: headers,
99
106
  query: query_params,
100
107
  request_options: request_options
@@ -121,12 +128,14 @@ module CloudPDF
121
128
  # @option request_options [Hash{String => Object}] :additional_body_parameters
122
129
  # @option request_options [Integer] :timeout_in_seconds
123
130
  # @option params [String] :doc_id
131
+ # @option params [String] :layer_name
124
132
  # @option params [String] :sha
125
133
  # @option params [String, nil] :document_password
126
134
  #
127
135
  # @example
128
136
  # client.doc.versions.download(
129
137
  # doc_id: "docId",
138
+ # layer_name: "layerName",
130
139
  # sha: "sha"
131
140
  # )
132
141
  #
@@ -139,7 +148,7 @@ module CloudPDF
139
148
  request = CloudPDF::Internal::JSON::Request.new(
140
149
  base_url: request_options[:base_url],
141
150
  method: "GET",
142
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/download/#{URI.encode_uri_component(params[:sha].to_s)}",
151
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/download/#{URI.encode_uri_component(params[:sha].to_s)}",
143
152
  headers: headers,
144
153
  request_options: request_options
145
154
  )
@@ -163,6 +172,7 @@ module CloudPDF
163
172
  # @option request_options [Hash{String => Object}] :additional_body_parameters
164
173
  # @option request_options [Integer] :timeout_in_seconds
165
174
  # @option params [String] :doc_id
175
+ # @option params [String] :layer_name
166
176
  # @option params [String] :sha
167
177
  # @option params [Integer] :index
168
178
  # @option params [String, nil] :document_password
@@ -170,6 +180,7 @@ module CloudPDF
170
180
  # @example
171
181
  # client.doc.versions.revision(
172
182
  # doc_id: "docId",
183
+ # layer_name: "layerName",
173
184
  # sha: "sha",
174
185
  # index: 1
175
186
  # )
@@ -183,7 +194,7 @@ module CloudPDF
183
194
  request = CloudPDF::Internal::JSON::Request.new(
184
195
  base_url: request_options[:base_url],
185
196
  method: "GET",
186
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/revisions/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:index].to_s)}",
197
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/revisions/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:index].to_s)}",
187
198
  headers: headers,
188
199
  request_options: request_options
189
200
  )
@@ -207,12 +218,14 @@ module CloudPDF
207
218
  # @option request_options [Hash{String => Object}] :additional_body_parameters
208
219
  # @option request_options [Integer] :timeout_in_seconds
209
220
  # @option params [String] :doc_id
221
+ # @option params [String] :layer_name
210
222
  # @option params [String] :sha
211
223
  # @option params [String, nil] :document_password
212
224
  #
213
225
  # @example
214
226
  # client.doc.versions.signatures(
215
227
  # doc_id: "docId",
228
+ # layer_name: "layerName",
216
229
  # sha: "sha"
217
230
  # )
218
231
  #
@@ -225,7 +238,7 @@ module CloudPDF
225
238
  request = CloudPDF::Internal::JSON::Request.new(
226
239
  base_url: request_options[:base_url],
227
240
  method: "GET",
228
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}",
241
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}",
229
242
  headers: headers,
230
243
  request_options: request_options
231
244
  )
@@ -253,6 +266,7 @@ module CloudPDF
253
266
  # @option request_options [Hash{String => Object}] :additional_body_parameters
254
267
  # @option request_options [Integer] :timeout_in_seconds
255
268
  # @option params [String] :doc_id
269
+ # @option params [String] :layer_name
256
270
  # @option params [String] :sha
257
271
  # @option params [String] :field_key
258
272
  # @option params [String, nil] :document_password
@@ -260,6 +274,7 @@ module CloudPDF
260
274
  # @example
261
275
  # client.doc.versions.signature_contents(
262
276
  # doc_id: "docId",
277
+ # layer_name: "layerName",
263
278
  # sha: "sha",
264
279
  # field_key: "fieldKey"
265
280
  # )
@@ -273,7 +288,7 @@ module CloudPDF
273
288
  request = CloudPDF::Internal::JSON::Request.new(
274
289
  base_url: request_options[:base_url],
275
290
  method: "GET",
276
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:field_key].to_s)}/contents",
291
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:field_key].to_s)}/contents",
277
292
  headers: headers,
278
293
  request_options: request_options
279
294
  )
@@ -299,6 +314,7 @@ module CloudPDF
299
314
  # @option request_options [Hash{String => Object}] :additional_body_parameters
300
315
  # @option request_options [Integer] :timeout_in_seconds
301
316
  # @option params [String] :doc_id
317
+ # @option params [String] :layer_name
302
318
  # @option params [String] :sha
303
319
  # @option params [String] :field_key
304
320
  # @option params [CloudPDF::Doc::Versions::Types::SignatureDigestVersionsRequestAlgorithm] :algorithm
@@ -307,6 +323,7 @@ module CloudPDF
307
323
  # @example
308
324
  # client.doc.versions.signature_digest(
309
325
  # doc_id: "docId",
326
+ # layer_name: "layerName",
310
327
  # sha: "sha",
311
328
  # field_key: "fieldKey",
312
329
  # algorithm: "sha1"
@@ -321,7 +338,7 @@ module CloudPDF
321
338
  request = CloudPDF::Internal::JSON::Request.new(
322
339
  base_url: request_options[:base_url],
323
340
  method: "GET",
324
- path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:field_key].to_s)}/digest/#{URI.encode_uri_component(params[:algorithm].to_s)}",
341
+ path: "v1/docs/#{URI.encode_uri_component(params[:doc_id].to_s)}/layers/#{URI.encode_uri_component(params[:layer_name].to_s)}/versions/signatures/#{URI.encode_uri_component(params[:sha].to_s)}/#{URI.encode_uri_component(params[:field_key].to_s)}/digest/#{URI.encode_uri_component(params[:algorithm].to_s)}",
325
342
  headers: headers,
326
343
  request_options: request_options
327
344
  )
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class AnalysisVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :since_signature, -> { Integer }, optional: true, nullable: false, api_name: "since.signature"
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class DownloadVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password"
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class ListVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password"
11
13
  end
12
14
  end
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class RevisionVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :index, -> { Integer }, optional: false, nullable: false
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class SignatureContentsVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :field_key, -> { String }, optional: false, nullable: false, api_name: "fieldKey"
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class SignatureDigestVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :field_key, -> { String }, optional: false, nullable: false, api_name: "fieldKey"
@@ -7,6 +7,8 @@ module CloudPDF
7
7
  class SignaturesVersionsRequest < Internal::Types::Model
8
8
  field :doc_id, -> { String }, optional: false, nullable: false, api_name: "docId"
9
9
 
10
+ field :layer_name, -> { String }, optional: false, nullable: false, api_name: "layerName"
11
+
10
12
  field :sha, -> { String }, optional: false, nullable: false
11
13
 
12
14
  field :document_password, -> { String }, optional: true, nullable: false, api_name: "X-Document-Password"
@@ -21,6 +21,10 @@ module CloudPDF
21
21
  # @option params [Integer, nil] :limit
22
22
  # @option params [String, nil] :cursor
23
23
  # @option params [CloudPDF::Documents::Types::ListDocumentsRequestState, nil] :state
24
+ # @option params [String, nil] :q
25
+ # @option params [String, nil] :folder_id
26
+ # @option params [CloudPDF::Documents::Types::ListDocumentsRequestSort, nil] :sort
27
+ # @option params [CloudPDF::Documents::Types::ListDocumentsRequestOrder, nil] :order
24
28
  #
25
29
  # @example
26
30
  # client.documents.list(tenant_id: "tenantId")
@@ -32,6 +36,10 @@ module CloudPDF
32
36
  query_params["limit"] = params[:limit] if params.key?(:limit)
33
37
  query_params["cursor"] = params[:cursor] if params.key?(:cursor)
34
38
  query_params["state"] = params[:state] if params.key?(:state)
39
+ query_params["q"] = params[:q] if params.key?(:q)
40
+ query_params["folderId"] = params[:folder_id] if params.key?(:folder_id)
41
+ query_params["sort"] = params[:sort] if params.key?(:sort)
42
+ query_params["order"] = params[:order] if params.key?(:order)
35
43
 
36
44
  request = CloudPDF::Internal::JSON::Request.new(
37
45
  base_url: request_options[:base_url],
@@ -130,6 +138,53 @@ module CloudPDF
130
138
  raise error_class.new(response.body, code: code)
131
139
  end
132
140
 
141
+ # A document that is being deleted answers 404.
142
+ #
143
+ # @param request_options [Hash]
144
+ # @param params [CloudPDF::Documents::Types::DocumentsUpdateRequest]
145
+ # @option request_options [String] :base_url
146
+ # @option request_options [Hash{String => Object}] :additional_headers
147
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
148
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
149
+ # @option request_options [Integer] :timeout_in_seconds
150
+ # @option params [String] :tenant_id
151
+ # @option params [String] :id
152
+ #
153
+ # @example
154
+ # client.documents.update(
155
+ # tenant_id: "tenantId",
156
+ # id: "id",
157
+ # name: "name"
158
+ # )
159
+ #
160
+ # @return [CloudPDF::Types::DocumentsUpdate200Response]
161
+ def update(request_options: {}, **params)
162
+ params = CloudPDF::Internal::Types::Utils.normalize_keys(params)
163
+ request_data = CloudPDF::Documents::Types::DocumentsUpdateRequest.new(params).to_h
164
+ non_body_param_names = %w[tenantId id]
165
+ body = request_data.except(*non_body_param_names)
166
+
167
+ request = CloudPDF::Internal::JSON::Request.new(
168
+ base_url: request_options[:base_url],
169
+ method: "PATCH",
170
+ path: "v1/tenants/#{URI.encode_uri_component(params[:tenant_id].to_s)}/documents/#{URI.encode_uri_component(params[:id].to_s)}",
171
+ body: body,
172
+ request_options: request_options
173
+ )
174
+ begin
175
+ response = @client.send(request)
176
+ rescue Net::HTTPRequestTimeout
177
+ raise CloudPDF::Errors::TimeoutError
178
+ end
179
+ code = response.code.to_i
180
+ if code.between?(200, 299)
181
+ (response.body.to_s.empty? ? nil : CloudPDF::Types::DocumentsUpdate200Response.load(response.body))
182
+ else
183
+ error_class = CloudPDF::Errors::ResponseError.subclass_for_code(code)
184
+ raise error_class.new(response.body, code: code)
185
+ end
186
+ end
187
+
133
188
  # @param request_options [Hash]
134
189
  # @param params [CloudPDF::Documents::Types::DocumentsCommitRequest]
135
190
  # @option request_options [String] :base_url
@@ -10,6 +10,10 @@ module CloudPDF
10
10
 
11
11
  field :expected, -> { CloudPDF::Documents::Types::DocumentsImportFromRequestExpected }, optional: true, nullable: false
12
12
 
13
+ field :name, -> { String }, optional: true, nullable: false
14
+
15
+ field :folder_id, -> { String }, optional: true, nullable: false, api_name: "folderId"
16
+
13
17
  field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
14
18
 
15
19
  field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
@@ -10,6 +10,10 @@ module CloudPDF
10
10
 
11
11
  field :content_sha256, -> { String }, optional: false, nullable: false, api_name: "contentSha256"
12
12
 
13
+ field :name, -> { String }, optional: true, nullable: false
14
+
15
+ field :folder_id, -> { String }, optional: true, nullable: false, api_name: "folderId"
16
+
13
17
  field :metadata, -> { Internal::Types::Hash[String, Object] }, optional: true, nullable: false
14
18
 
15
19
  field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CloudPDF
4
+ module Documents
5
+ module Types
6
+ class DocumentsUpdateRequest < Internal::Types::Model
7
+ field :tenant_id, -> { String }, optional: false, nullable: false, api_name: "tenantId"
8
+
9
+ field :id, -> { String }, optional: false, nullable: false
10
+
11
+ field :name, -> { String }, optional: false, nullable: false
12
+ end
13
+ end
14
+ end
15
+ end
@@ -11,6 +11,14 @@ module CloudPDF
11
11
  field :cursor, -> { String }, optional: true, nullable: false
12
12
 
13
13
  field :state, -> { CloudPDF::Documents::Types::ListDocumentsRequestState }, optional: true, nullable: false
14
+
15
+ field :q, -> { String }, optional: true, nullable: false
16
+
17
+ field :folder_id, -> { String }, optional: true, nullable: false, api_name: "folderId"
18
+
19
+ field :sort, -> { CloudPDF::Documents::Types::ListDocumentsRequestSort }, optional: true, nullable: false
20
+
21
+ field :order, -> { CloudPDF::Documents::Types::ListDocumentsRequestOrder }, optional: true, nullable: false
14
22
  end
15
23
  end
16
24
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CloudPDF
4
+ module Documents
5
+ module Types
6
+ module ListDocumentsRequestOrder
7
+ extend CloudPDF::Internal::Types::Enum
8
+
9
+ ASC = "asc"
10
+ DESC = "desc"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CloudPDF
4
+ module Documents
5
+ module Types
6
+ module ListDocumentsRequestSort
7
+ extend CloudPDF::Internal::Types::Enum
8
+
9
+ CREATED_AT = "createdAt"
10
+ NAME = "name"
11
+ SIZE = "size"
12
+ end
13
+ end
14
+ end
15
+ end