assinafy 2.1.1 → 2.3.0

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.
data/sig/assinafy.rbs CHANGED
@@ -104,6 +104,7 @@ module Assinafy
104
104
  end
105
105
 
106
106
  module Utils
107
+ def self.require_credit_ceiling: (Numeric | String | nil value) -> (Numeric | String | nil)
107
108
  MAX_NORMALIZATION_DEPTH: Integer
108
109
  EMAIL_PATTERN: Regexp
109
110
 
@@ -215,7 +216,7 @@ module Assinafy
215
216
  class AccountResource < BaseResource
216
217
  def list: () -> list_result
217
218
  def create: (params payload) -> api_object
218
- def get: (?String? account_id_override) -> api_object
219
+ def get: (?String? account_id_override, ?expand: String?) -> api_object
219
220
  def update: (params payload, ?String? account_id_override) -> api_object
220
221
  def delete: (?force: bool, ?account_id_override: String?) -> nil
221
222
  def theme: (?String? account_id_override) -> api_object
@@ -223,15 +224,25 @@ module Assinafy
223
224
  def download_logo: (?String? account_id_override) -> String
224
225
  def upload_logo: (upload_source source, ?String? account_id_override) -> api_object?
225
226
  def delete_logo: (?String? account_id_override) -> nil
227
+ def usage: (?String? account_id_override) -> api_object
228
+ def notification_policy: (?String? account_id_override) -> api_object
229
+ def update_notification_policy: (params payload, ?String? account_id_override) -> api_object
230
+ def list_embed_origins: (?String? account_id_override) -> Array[api_object]
231
+ def create_embed_origin: (String origin, ?String? account_id_override) -> api_object
232
+ def update_embed_origin: (String origin_id, String origin, ?String? account_id_override) -> api_object
233
+ def delete_embed_origin: (String origin_id, ?String? account_id_override) -> nil
226
234
  end
227
235
 
228
236
  class UserResource < BaseResource
229
237
  NOTIFICATION_PREFERENCE_CODES: Array[String]
238
+ PUSH_PREFERENCE_CODES: Array[String]
230
239
 
231
240
  def me: () -> api_object
232
241
  def stats: (?granularity: String?, ?month: String?) -> Array[api_object]
233
242
  def notification_preferences: () -> Hash[String, bool]
234
243
  def update_notification_preferences: (Hash[String | Symbol, bool] preferences) -> Hash[String, bool]
244
+ def push_preferences: () -> Hash[String, bool]
245
+ def update_push_preferences: (Hash[String | Symbol, bool] preferences) -> Hash[String, bool]
235
246
  end
236
247
 
237
248
  class DocumentResource < BaseResource
@@ -243,8 +254,8 @@ module Assinafy
243
254
  def list: (?params params, ?String? account_id_override) -> list_result
244
255
  def search: (?String? query, ?params params, ?String? account_id_override) -> list_result
245
256
  def statuses: () -> Array[api_object]
246
- def details: (String document_id) -> api_object
247
- def get: (String document_id) -> api_object
257
+ def details: (String document_id, ?expand: String | Array[String] | nil) -> api_object
258
+ def get: (String document_id, ?expand: String | Array[String] | nil) -> api_object
248
259
  def rename: (String document_id, String name) -> api_object
249
260
  def wait_until_ready: (
250
261
  String document_id,
@@ -252,9 +263,10 @@ module Assinafy
252
263
  ?poll_interval_seconds: Numeric
253
264
  ) -> api_object
254
265
  def download: (String document_id, ?String artifact_name) -> String
255
- def thumbnail: (String document_id) -> String
256
- def download_page: (String document_id, String page_id) -> String
257
- def activities: (String document_id) -> Array[api_object]
266
+ def thumbnail: (String document_id, ?artifact: String?) -> String
267
+ def download_page: (String document_id, String page_id, ?artifact: String?) -> String
268
+ def activities: (String document_id, ?params params) -> Array[api_object]
269
+ def activities_page: (String document_id, ?params params) -> list_result
258
270
  def delete: (String document_id) -> nil
259
271
  def create_from_template: (
260
272
  String template_id,
@@ -279,10 +291,39 @@ module Assinafy
279
291
  def replace_tags: (String document_id, Array[String] tags, ?String? account_id_override) -> Array[api_object]
280
292
  def append_tags: (String document_id, Array[String] tags, ?String? account_id_override) -> Array[api_object]
281
293
  def detach_tag: (String document_id, String tag_id, ?String? account_id_override) -> api_object
294
+ def signer_capacities: (String document_id) -> Array[api_object]
295
+ def notification_history: (String document_id) -> Array[api_object]
296
+ def watchers: (String document_id) -> Array[api_object]
297
+ def set_watchers: (String document_id, Array[String] watcher_ids) -> Array[api_object]
282
298
  def fully_signed?: (String document_id) -> bool
283
299
  def signing_progress: (String document_id) -> signing_progress
284
300
  end
285
301
 
302
+ class EnvelopeResource < BaseResource
303
+ def schedule: (params payload, ?String? account_id_override, send_at: String | Integer) -> api_object
304
+ def estimate_resend_cost: (String envelope_id, String signer_id, ?String? account_id_override) -> api_object
305
+ def list: (?params params, ?String? account_id_override) -> list_result
306
+ def create: (params payload, ?String? account_id_override, ?idempotency_key: String?) -> api_object
307
+ def estimate_cost: (params payload, ?String? account_id_override) -> api_object
308
+ def get: (String envelope_id, ?String? account_id_override) -> api_object
309
+ def update: (String envelope_id, params payload, ?String? account_id_override) -> api_object
310
+ def delete: (String envelope_id, ?String? account_id_override) -> nil
311
+ def activities: (String envelope_id, ?params params, ?String? account_id_override) -> list_result
312
+ def download: (String envelope_id, ?String artifact, ?String? account_id_override) -> String
313
+ def cancel: (String envelope_id, ?String? account_id_override) -> Array[api_object]
314
+ def resend_notification: (String envelope_id, String signer_id, ?String? account_id_override) -> api_object
315
+ def add_document: (String envelope_id, params payload, ?String? account_id_override) -> api_object
316
+ def remove_document: (String envelope_id, String document_id, ?String? account_id_override) -> api_object
317
+ end
318
+
319
+ class ScheduledSendResource < BaseResource
320
+ def self.require_send_at: (String | Integer value) -> Time
321
+ def self.scheduled_expiration: (String | Integer | nil value, Time send_time) -> String?
322
+ def list: (?params params, ?String? account_id_override) -> list_result
323
+ def cancel: (String scheduled_send_id, ?String? account_id_override) -> api_object
324
+ def send_now: (String scheduled_send_id, ?String? account_id_override) -> api_object
325
+ end
326
+
286
327
  class ContractResource < BaseResource
287
328
  STATUSES: Array[String]
288
329
  RELATION_TYPES: Array[String]
@@ -295,7 +336,7 @@ module Assinafy
295
336
  def list: (?params params, ?String? account_id_override) -> list_result
296
337
  def get: (String document_id, ?String? account_id_override) -> api_object?
297
338
  def update: (String document_id, params payload, ?String? account_id_override) -> api_object
298
- def related: (String document_id, ?String? account_id_override) -> api_object?
339
+ def related: (String document_id, ?String? account_id_override, ?expand: String?) -> api_object?
299
340
  def renew: (String document_id, params payload, ?String? account_id_override) -> api_object
300
341
  def terminate: (String document_id, ?params payload, ?String? account_id_override) -> api_object
301
342
  end
@@ -314,9 +355,9 @@ module Assinafy
314
355
  def self_data: (signer_access_code: String) -> api_object
315
356
  def identity_verification: (signer_access_code: String) -> api_object
316
357
  def start_identity_verification: (consent: bool, signer_access_code: String) -> api_object
317
- def accept_terms: (signer_access_code: String) -> nil
318
- def verify_email: (verification_code: String, signer_access_code: String) -> nil
319
- def confirm_data: (String document_id, params payload, signer_access_code: String) -> api_object
358
+ def accept_terms: (signer_access_code: String) -> api_object?
359
+ def verify_email: (verification_code: String, signer_access_code: String) -> Array[untyped]?
360
+ def confirm_data: (String document_id, params payload, signer_access_code: String) -> Array[untyped]
320
361
  def upload_signature: (
321
362
  String content,
322
363
  signer_access_code: String,
@@ -325,11 +366,16 @@ module Assinafy
325
366
  ?reuse: bool?
326
367
  ) -> (nil | Array[untyped])
327
368
  def download_signature: (signer_access_code: String, ?type: String) -> String
369
+ def theme: (signer_access_code: String) -> api_object
370
+ def download_logo: (signer_access_code: String) -> String
328
371
  end
329
372
 
330
373
  class SignerDocumentResource < BaseResource
331
- def current: (String signer_id, signer_access_code: String) -> api_object
332
- def document: (String signer_id, signer_access_code: String) -> api_object
374
+ def send_certified_copy: (signer_access_code: String, ?document_id: String?) -> api_object
375
+ def download_certified_copy: (String token, ?pades: bool) -> String
376
+ def resend_certified_copy: (String token) -> api_object
377
+ def current: (String signer_id, signer_access_code: String, ?expand: String | Array[String] | nil) -> api_object
378
+ def document: (String signer_id, signer_access_code: String, ?expand: String | Array[String] | nil) -> api_object
333
379
  def list: (String signer_id, ?params params, ?signer_access_code: String?) -> list_result
334
380
  def list_as_workspace: (String signer_id, ?params params) -> list_result
335
381
  def search: (String signer_id, ?String? query, ?params params, ?signer_access_code: String?) -> list_result
@@ -349,6 +395,8 @@ module Assinafy
349
395
  end
350
396
 
351
397
  class AssignmentResource < BaseResource
398
+ SIGNER_CAPACITIES: Array[String]
399
+ def schedule: (String document_id, params payload, send_at: String | Integer) -> api_object
352
400
  OPTIONAL_FIELDS: Array[Symbol]
353
401
  METHODS: Array[String]
354
402
  VERIFICATION_METHODS: Array[String]
@@ -373,7 +421,14 @@ module Assinafy
373
421
  decision: String,
374
422
  ?note: String?
375
423
  ) -> api_object
376
- def signer_document: (signer_access_code: String, ?has_accepted_terms: bool?) -> api_object
424
+ def create_embed_session: (String document_id, String assignment_id, String signer_id) -> api_object
425
+ def exchange_embed_session: (String token, ?parent_origin: String?) -> api_object
426
+ def signer_document: (
427
+ signer_access_code: String,
428
+ ?has_accepted_terms: bool?,
429
+ ?expand: String | Array[String] | nil,
430
+ ?document_id: String?
431
+ ) -> api_object
377
432
  def sign: (String document_id, String assignment_id, Array[params] items, signer_access_code: String) -> api_object
378
433
  def decline: (
379
434
  String document_id,
@@ -399,7 +454,8 @@ module Assinafy
399
454
  def delete_endpoint: (String endpoint_id, ?String? account_id_override) -> nil
400
455
  def delete_endpoint_by_url: (String url, ?String? account_id_override) -> nil
401
456
  def endpoint_secret: (String endpoint_id, ?String? account_id_override) -> api_object
402
- def rotate_endpoint_secret: (String endpoint_id, ?String? account_id_override) -> api_object
457
+ def rotate_endpoint_secret: (String endpoint_id, ?String? account_id_override, ?keep_previous: bool) -> api_object
458
+ def test_endpoint: (String endpoint_id, ?String? account_id_override) -> api_object
403
459
  end
404
460
 
405
461
  class TemplateResource < BaseResource
@@ -462,6 +518,8 @@ module Assinafy
462
518
  attr_reader accounts: Resources::AccountResource
463
519
  attr_reader users: Resources::UserResource
464
520
  attr_reader documents: Resources::DocumentResource
521
+ attr_reader scheduled_sends: Resources::ScheduledSendResource
522
+ attr_reader envelopes: Resources::EnvelopeResource
465
523
  attr_reader contracts: Resources::ContractResource
466
524
  attr_reader signers: Resources::SignerResource
467
525
  attr_reader signer_documents: Resources::SignerDocumentResource
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assinafy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Assinafy SDK Contributors
@@ -134,8 +134,9 @@ dependencies:
134
134
  - !ruby/object:Gem::Version
135
135
  version: '3.0'
136
136
  description: Ruby SDK for Assinafy. Covers the documented authentication, OAuth 2.1,
137
- account, user, document, contract, signer, assignment, webhook, template, tag, and
138
- field APIs, plus the high-level upload_and_request_signatures helper.
137
+ account, user, document, envelope, contract, signer, assignment, scheduled-send,
138
+ webhook, template, tag, and field APIs, plus the high-level upload_and_request_signatures
139
+ helper.
139
140
  email:
140
141
  - sdk@assinafy.com.br
141
142
  executables: []
@@ -159,8 +160,10 @@ files:
159
160
  - lib/assinafy/resources/base_resource.rb
160
161
  - lib/assinafy/resources/contract_resource.rb
161
162
  - lib/assinafy/resources/document_resource.rb
163
+ - lib/assinafy/resources/envelope_resource.rb
162
164
  - lib/assinafy/resources/field_resource.rb
163
165
  - lib/assinafy/resources/oauth_resource.rb
166
+ - lib/assinafy/resources/scheduled_send_resource.rb
164
167
  - lib/assinafy/resources/signer_document_resource.rb
165
168
  - lib/assinafy/resources/signer_resource.rb
166
169
  - lib/assinafy/resources/tag_resource.rb