assinafy 2.2.0 → 2.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +65 -4
- data/README.en.md +164 -1074
- data/README.md +31 -22
- data/docs/API_REFERENCE.md +189 -111
- data/docs/GUIDE.md +1079 -0
- data/lib/assinafy/client.rb +82 -45
- data/lib/assinafy/configuration.rb +8 -7
- data/lib/assinafy/oauth.rb +12 -15
- data/lib/assinafy/resources/account_resource.rb +13 -10
- data/lib/assinafy/resources/assignment_resource.rb +116 -94
- data/lib/assinafy/resources/base_resource.rb +66 -114
- data/lib/assinafy/resources/contract_resource.rb +17 -33
- data/lib/assinafy/resources/document_resource.rb +140 -57
- data/lib/assinafy/resources/envelope_resource.rb +57 -9
- data/lib/assinafy/resources/field_resource.rb +8 -17
- data/lib/assinafy/resources/oauth_resource.rb +26 -20
- data/lib/assinafy/resources/scheduled_send_resource.rb +127 -0
- data/lib/assinafy/resources/signer_document_resource.rb +24 -14
- data/lib/assinafy/resources/signer_resource.rb +51 -66
- data/lib/assinafy/resources/tag_resource.rb +16 -22
- data/lib/assinafy/resources/template_resource.rb +5 -6
- data/lib/assinafy/resources/user_resource.rb +7 -2
- data/lib/assinafy/resources/webhook_resource.rb +55 -47
- data/lib/assinafy/support/webhook_verifier.rb +2 -2
- data/lib/assinafy/utils.rb +14 -21
- data/lib/assinafy/validation.rb +80 -0
- data/lib/assinafy/version.rb +1 -1
- data/lib/assinafy.rb +2 -1
- data/sig/assinafy.rbs +24 -30
- metadata +7 -5
- data/lib/assinafy/resources/auth_resource.rb +0 -502
data/sig/assinafy.rbs
CHANGED
|
@@ -138,7 +138,7 @@ module Assinafy
|
|
|
138
138
|
redirect_uri: String,
|
|
139
139
|
?code_verifier: String?,
|
|
140
140
|
?code_challenge: String?,
|
|
141
|
-
|
|
141
|
+
scope: Array[String] | String,
|
|
142
142
|
?state: String?,
|
|
143
143
|
?resource: String?,
|
|
144
144
|
?authorization_endpoint: String,
|
|
@@ -158,30 +158,6 @@ module Assinafy
|
|
|
158
158
|
def initialize: (untyped connection, ?String? default_account_id, ?_Logger? logger) -> void
|
|
159
159
|
end
|
|
160
160
|
|
|
161
|
-
class AuthResource < BaseResource
|
|
162
|
-
def login: (email: String, password: String) -> api_object
|
|
163
|
-
def social_login: (provider: String, token: String, has_accepted_terms: bool) -> api_object
|
|
164
|
-
def link_social_login: (provider: String, token: String) -> nil
|
|
165
|
-
def create_api_key: (password: String) -> api_object
|
|
166
|
-
def get_api_key: () -> api_object?
|
|
167
|
-
def api_key: () -> api_object?
|
|
168
|
-
def delete_api_key: () -> nil
|
|
169
|
-
def change_password: (email: String, password: String, new_password: String) -> api_object
|
|
170
|
-
def request_password_reset: (email: String) -> api_object
|
|
171
|
-
def reset_password: (email: String, new_password: String, ?token: String?) -> api_object
|
|
172
|
-
def verify_mfa: (mfa_token: String, code: String) -> api_object
|
|
173
|
-
def mfa_methods: () -> api_object
|
|
174
|
-
def start_totp_enrollment: (?label: String?) -> api_object
|
|
175
|
-
def confirm_totp_enrollment: (
|
|
176
|
-
method_id: String,
|
|
177
|
-
code: String,
|
|
178
|
-
?password: String?,
|
|
179
|
-
?reauth_code: String?
|
|
180
|
-
) -> api_object
|
|
181
|
-
def regenerate_recovery_codes: (?password: String?, ?code: String?) -> api_object
|
|
182
|
-
def delete_mfa_method: (String method_id, ?password: String?, ?code: String?) -> api_object
|
|
183
|
-
end
|
|
184
|
-
|
|
185
161
|
class OAuthResource < BaseResource
|
|
186
162
|
GRANT_TYPES: Array[String]
|
|
187
163
|
TOKEN_TYPE_HINTS: Array[String]
|
|
@@ -210,7 +186,7 @@ module Assinafy
|
|
|
210
186
|
) -> nil
|
|
211
187
|
def userinfo: () -> api_object
|
|
212
188
|
def protected_resource_metadata: () -> api_object
|
|
213
|
-
def authorization_server_metadata: (?String url) -> api_object
|
|
189
|
+
def authorization_server_metadata: (?String? url) -> api_object
|
|
214
190
|
end
|
|
215
191
|
|
|
216
192
|
class AccountResource < BaseResource
|
|
@@ -268,6 +244,7 @@ module Assinafy
|
|
|
268
244
|
def activities: (String document_id, ?params params) -> Array[api_object]
|
|
269
245
|
def activities_page: (String document_id, ?params params) -> list_result
|
|
270
246
|
def delete: (String document_id) -> nil
|
|
247
|
+
def cancel: (String document_id) -> api_object
|
|
271
248
|
def create_from_template: (
|
|
272
249
|
String template_id,
|
|
273
250
|
Array[params] | params signers_or_payload,
|
|
@@ -291,11 +268,17 @@ module Assinafy
|
|
|
291
268
|
def replace_tags: (String document_id, Array[String] tags, ?String? account_id_override) -> Array[api_object]
|
|
292
269
|
def append_tags: (String document_id, Array[String] tags, ?String? account_id_override) -> Array[api_object]
|
|
293
270
|
def detach_tag: (String document_id, String tag_id, ?String? account_id_override) -> api_object
|
|
271
|
+
def signer_capacities: (String document_id) -> Array[api_object]
|
|
272
|
+
def notification_history: (String document_id) -> Array[api_object]
|
|
273
|
+
def watchers: (String document_id) -> Array[api_object]
|
|
274
|
+
def set_watchers: (String document_id, Array[String] watcher_ids) -> Array[api_object]
|
|
294
275
|
def fully_signed?: (String document_id) -> bool
|
|
295
276
|
def signing_progress: (String document_id) -> signing_progress
|
|
296
277
|
end
|
|
297
278
|
|
|
298
279
|
class EnvelopeResource < BaseResource
|
|
280
|
+
def schedule: (params payload, ?String? account_id_override, send_at: String | Integer) -> api_object
|
|
281
|
+
def estimate_resend_cost: (String envelope_id, String signer_id, ?String? account_id_override) -> api_object
|
|
299
282
|
def list: (?params params, ?String? account_id_override) -> list_result
|
|
300
283
|
def create: (params payload, ?String? account_id_override, ?idempotency_key: String?) -> api_object
|
|
301
284
|
def estimate_cost: (params payload, ?String? account_id_override) -> api_object
|
|
@@ -310,6 +293,14 @@ module Assinafy
|
|
|
310
293
|
def remove_document: (String envelope_id, String document_id, ?String? account_id_override) -> api_object
|
|
311
294
|
end
|
|
312
295
|
|
|
296
|
+
class ScheduledSendResource < BaseResource
|
|
297
|
+
def self.require_send_at: (String | Integer value) -> Time
|
|
298
|
+
def self.scheduled_expiration: (String | Integer | nil value, Time send_time) -> String?
|
|
299
|
+
def list: (?params params, ?String? account_id_override) -> list_result
|
|
300
|
+
def cancel: (String scheduled_send_id, ?String? account_id_override) -> api_object
|
|
301
|
+
def send_now: (String scheduled_send_id, ?String? account_id_override) -> api_object
|
|
302
|
+
end
|
|
303
|
+
|
|
313
304
|
class ContractResource < BaseResource
|
|
314
305
|
STATUSES: Array[String]
|
|
315
306
|
RELATION_TYPES: Array[String]
|
|
@@ -343,7 +334,7 @@ module Assinafy
|
|
|
343
334
|
def start_identity_verification: (consent: bool, signer_access_code: String) -> api_object
|
|
344
335
|
def accept_terms: (signer_access_code: String) -> api_object?
|
|
345
336
|
def verify_email: (verification_code: String, signer_access_code: String) -> Array[untyped]?
|
|
346
|
-
def confirm_data: (String document_id, params payload, signer_access_code: String) -> Array[untyped]
|
|
337
|
+
def confirm_data: (String document_id, params payload, signer_access_code: String) -> Array[untyped]?
|
|
347
338
|
def upload_signature: (
|
|
348
339
|
String content,
|
|
349
340
|
signer_access_code: String,
|
|
@@ -376,11 +367,13 @@ module Assinafy
|
|
|
376
367
|
String signer_id,
|
|
377
368
|
String document_id,
|
|
378
369
|
?String artifact_name,
|
|
379
|
-
|
|
370
|
+
signer_access_code: String
|
|
380
371
|
) -> String
|
|
381
372
|
end
|
|
382
373
|
|
|
383
374
|
class AssignmentResource < BaseResource
|
|
375
|
+
SIGNER_CAPACITIES: Array[String]
|
|
376
|
+
def schedule: (String document_id, params payload, send_at: String | Integer) -> api_object
|
|
384
377
|
OPTIONAL_FIELDS: Array[Symbol]
|
|
385
378
|
METHODS: Array[String]
|
|
386
379
|
VERIFICATION_METHODS: Array[String]
|
|
@@ -497,11 +490,11 @@ module Assinafy
|
|
|
497
490
|
end
|
|
498
491
|
|
|
499
492
|
class Client
|
|
500
|
-
attr_reader auth: Resources::AuthResource
|
|
501
493
|
attr_reader oauth: Resources::OAuthResource
|
|
502
494
|
attr_reader accounts: Resources::AccountResource
|
|
503
495
|
attr_reader users: Resources::UserResource
|
|
504
496
|
attr_reader documents: Resources::DocumentResource
|
|
497
|
+
attr_reader scheduled_sends: Resources::ScheduledSendResource
|
|
505
498
|
attr_reader envelopes: Resources::EnvelopeResource
|
|
506
499
|
attr_reader contracts: Resources::ContractResource
|
|
507
500
|
attr_reader signers: Resources::SignerResource
|
|
@@ -533,7 +526,8 @@ module Assinafy
|
|
|
533
526
|
?wait_for_ready: bool,
|
|
534
527
|
?expires_at: String?,
|
|
535
528
|
?copy_receivers: Array[String]?,
|
|
536
|
-
?account_id: String
|
|
529
|
+
?account_id: String?,
|
|
530
|
+
?max_total_credits: Numeric | String | nil
|
|
537
531
|
) -> workflow_result
|
|
538
532
|
def faraday_connection: () -> untyped
|
|
539
533
|
end
|
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.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Assinafy SDK Contributors
|
|
@@ -133,9 +133,9 @@ dependencies:
|
|
|
133
133
|
- - "~>"
|
|
134
134
|
- !ruby/object:Gem::Version
|
|
135
135
|
version: '3.0'
|
|
136
|
-
description: Ruby SDK for Assinafy. Covers the documented
|
|
137
|
-
|
|
138
|
-
field APIs, plus the high-level upload_and_request_signatures helper.
|
|
136
|
+
description: Ruby SDK for Assinafy. Covers the documented OAuth 2.1, account, user,
|
|
137
|
+
document, envelope, contract, signer, assignment, scheduled-send, webhook, template,
|
|
138
|
+
tag, and field APIs, plus the high-level upload_and_request_signatures helper.
|
|
139
139
|
email:
|
|
140
140
|
- sdk@assinafy.com.br
|
|
141
141
|
executables: []
|
|
@@ -147,6 +147,7 @@ files:
|
|
|
147
147
|
- README.en.md
|
|
148
148
|
- README.md
|
|
149
149
|
- docs/API_REFERENCE.md
|
|
150
|
+
- docs/GUIDE.md
|
|
150
151
|
- lib/assinafy.rb
|
|
151
152
|
- lib/assinafy/client.rb
|
|
152
153
|
- lib/assinafy/configuration.rb
|
|
@@ -155,13 +156,13 @@ files:
|
|
|
155
156
|
- lib/assinafy/oauth.rb
|
|
156
157
|
- lib/assinafy/resources/account_resource.rb
|
|
157
158
|
- lib/assinafy/resources/assignment_resource.rb
|
|
158
|
-
- lib/assinafy/resources/auth_resource.rb
|
|
159
159
|
- lib/assinafy/resources/base_resource.rb
|
|
160
160
|
- lib/assinafy/resources/contract_resource.rb
|
|
161
161
|
- lib/assinafy/resources/document_resource.rb
|
|
162
162
|
- lib/assinafy/resources/envelope_resource.rb
|
|
163
163
|
- lib/assinafy/resources/field_resource.rb
|
|
164
164
|
- lib/assinafy/resources/oauth_resource.rb
|
|
165
|
+
- lib/assinafy/resources/scheduled_send_resource.rb
|
|
165
166
|
- lib/assinafy/resources/signer_document_resource.rb
|
|
166
167
|
- lib/assinafy/resources/signer_resource.rb
|
|
167
168
|
- lib/assinafy/resources/tag_resource.rb
|
|
@@ -170,6 +171,7 @@ files:
|
|
|
170
171
|
- lib/assinafy/resources/webhook_resource.rb
|
|
171
172
|
- lib/assinafy/support/webhook_verifier.rb
|
|
172
173
|
- lib/assinafy/utils.rb
|
|
174
|
+
- lib/assinafy/validation.rb
|
|
173
175
|
- lib/assinafy/version.rb
|
|
174
176
|
- sig/assinafy.rbs
|
|
175
177
|
homepage: https://www.assinafy.com.br
|