assinafy 1.9.0 → 1.11.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 +55 -6
- data/README.en.md +569 -451
- data/README.md +702 -494
- data/docs/API_REFERENCE.md +245 -65
- data/lib/assinafy/client.rb +7 -7
- data/lib/assinafy/configuration.rb +14 -3
- data/lib/assinafy/oauth.rb +36 -15
- data/lib/assinafy/resources/account_resource.rb +47 -6
- data/lib/assinafy/resources/assignment_resource.rb +99 -30
- data/lib/assinafy/resources/auth_resource.rb +251 -2
- data/lib/assinafy/resources/base_resource.rb +21 -5
- data/lib/assinafy/resources/document_resource.rb +147 -67
- data/lib/assinafy/resources/field_resource.rb +43 -15
- data/lib/assinafy/resources/oauth_resource.rb +62 -8
- data/lib/assinafy/resources/signer_document_resource.rb +21 -3
- data/lib/assinafy/resources/signer_resource.rb +46 -13
- data/lib/assinafy/resources/tag_resource.rb +19 -8
- data/lib/assinafy/resources/template_resource.rb +32 -16
- data/lib/assinafy/resources/user_resource.rb +14 -2
- data/lib/assinafy/resources/webhook_resource.rb +273 -26
- data/lib/assinafy/support/webhook_verifier.rb +81 -23
- data/lib/assinafy/utils.rb +38 -0
- data/lib/assinafy/version.rb +1 -1
- data/sig/assinafy.rbs +33 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97dcce395cbee3bd4a632650550becfd07d6fa291da434678d1a31de4488d103
|
|
4
|
+
data.tar.gz: 4cde25cfc6221e23378892c4fa19d7779046b65642bc33dc734756f712c2aab8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 437fad120c4ec641767a2241f0e03589e14ea31b3407b603c85e7284476526711cd8d8f8732573d2ab4348aa9387cbfa077e43061ff91e1728eeda766b6c51f2
|
|
7
|
+
data.tar.gz: 9c2e1b81591e038d449145fa3f97f7b2b90f98fbfede435f01cd14fbfbb6b9d62805df762e39a01c0e9de7a8d9e729371d3b88e63b5049fb7ac29b0c10d01b88
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the `assinafy` Ruby gem are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.11.0
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Webhook endpoints: `WebhookResource#list_endpoints`, `#create_endpoint`, `#get_endpoint`, `#update_endpoint`,
|
|
10
|
+
`#delete_endpoint`, `#endpoint_secret`, and `#rotate_endpoint_secret`. An account can have 1 endpoint, or up to 3
|
|
11
|
+
on paid plans, each with its own URL, events, and signing setting. Secrets cannot be read or rotated by OAuth
|
|
12
|
+
applications.
|
|
13
|
+
- `WebhookResource#list_dispatches` accepts an `endpoint_id` filter.
|
|
14
|
+
- `Assinafy::Support::WebhookVerifier#verify_delivery` verifies Assinafy's Standard Webhooks signatures
|
|
15
|
+
(`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the endpoint's `whsec_` secret and rejects
|
|
16
|
+
timestamps more than 5 minutes off. It accepts Rails `request.headers`, a Rack env, or a plain Hash.
|
|
17
|
+
- Two-factor authentication: `AuthResource#verify_mfa` completes a login that answered with an `mfa_token`, and
|
|
18
|
+
`#mfa_methods`, `#start_totp_enrollment`, `#confirm_totp_enrollment`, `#regenerate_recovery_codes`, and
|
|
19
|
+
`#delete_mfa_method` manage authenticator methods and recovery codes.
|
|
20
|
+
- `SignerResource#create`, `#validate_create!`, and `Client#upload_and_request_signatures` send `government_id`,
|
|
21
|
+
so a `DigitalCertificate` signer can be created in one call.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- `WebhookResource#register`, `#get`, and `#inactivate` act on the account's oldest webhook endpoint, and
|
|
26
|
+
`#register` rejects keys other than `url`, `email`, `events`, and `is_active`.
|
|
27
|
+
- `WebhookVerifier#verify` remains for receivers whose own gateway signs bodies with a hex HMAC-SHA256.
|
|
28
|
+
- `DocumentResource#upload` no longer takes a `name` option; the document is named after the uploaded file. Use
|
|
29
|
+
`#rename` to change it.
|
|
30
|
+
- `DocumentResource#list` joins an Array `tags` filter into comma-separated tag IDs.
|
|
31
|
+
- `TemplateResource#create` enforces the 25 MB upload limit.
|
|
32
|
+
- `UserResource#stats` and `AccountResource#stats` validate `granularity` (`monthly` or `daily`) and `month`
|
|
33
|
+
(`YYYY-MM`) before sending.
|
|
34
|
+
- `OAuthResource#authorization_server_metadata` accepts only absolute HTTPS URL overrides.
|
|
35
|
+
- `Configuration#base_url=` and `#timeout=` validate their values like the constructor. The `User-Agent` header
|
|
36
|
+
is set on each request.
|
|
37
|
+
- `DigitalCertificate` is documented at 0.5 credits per signer on top of its notification (breakdown code
|
|
38
|
+
`SignatureDigitalCertificate`), with verification and notification methods inferred from each other.
|
|
39
|
+
- The guides cover the complete flow in order, including the two-factor login, OAuth refresh under a
|
|
40
|
+
per-connection lock, and a webhook receiver for Rails and Rack.
|
|
41
|
+
|
|
42
|
+
## 1.10.1
|
|
43
|
+
|
|
44
|
+
- Update the pinned Ruby setup action to support Ruby 4.0.7 in CI and release workflows.
|
|
45
|
+
|
|
46
|
+
## 1.10.0
|
|
47
|
+
|
|
48
|
+
- Support the RFC 8693 token-exchange grant for Assinafy-provisioned internal service clients.
|
|
49
|
+
- Validate OAuth grant parameters, PKCE challenges, authorization URLs, and token response shapes.
|
|
50
|
+
- Validate assignment deadlines, notification and verification method combinations, and signing steps before requests.
|
|
51
|
+
- Validate template role and signer IDs, distinct role assignments, and editor field payloads before document creation.
|
|
52
|
+
- Validate contact addresses, scalar payload fields, decline-reason lengths, and finite polling intervals consistently.
|
|
53
|
+
- Expand the document workflow guides, OAuth integration instructions, and API schema reference.
|
|
54
|
+
- Use Ruby 4.0.7 for the development and release toolchain.
|
|
55
|
+
|
|
5
56
|
## 1.9.0
|
|
6
57
|
|
|
7
58
|
- `OAuthResource#refresh`, and `#token` with the `refresh_token` grant, raise `Assinafy::Error` instead of
|
|
@@ -75,8 +126,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
|
|
|
75
126
|
value as a `422` only after the request has been sent — and after any signers created for that
|
|
76
127
|
assignment already exist.
|
|
77
128
|
|
|
78
|
-
- `spec/fixtures/api_contract.json` tracks the
|
|
79
|
-
schemas), including the four OAuth operations.
|
|
129
|
+
- `spec/fixtures/api_contract.json` tracks the upstream contract, including the four OAuth operations.
|
|
80
130
|
|
|
81
131
|
### Removed
|
|
82
132
|
|
|
@@ -162,8 +212,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
|
|
|
162
212
|
|
|
163
213
|
- `SignerResource#accept_terms` and `#verify_email` now send `signer-access-code` as
|
|
164
214
|
the documented query parameter (the `signerAccessCode` security scheme is `in: query`),
|
|
165
|
-
consistent with every other signer-authenticated endpoint.
|
|
166
|
-
only in the request body.
|
|
215
|
+
consistent with every other signer-authenticated endpoint.
|
|
167
216
|
- `TemplateResource#create` now performs the required `multipart/form-data` file
|
|
168
217
|
upload. The previous JSON body was rejected by the API (HTTP 400) and never worked.
|
|
169
218
|
Its signature is now `create(source, options = {}, account_id_override = nil)`.
|
|
@@ -205,8 +254,8 @@ documentation at <https://api.assinafy.com.br/v1/docs>.
|
|
|
205
254
|
method, sourced from the live API and the docs.
|
|
206
255
|
- Behavioral coverage: `spec/api_coverage_spec.rb` now also fails CI when a public
|
|
207
256
|
endpoint wrapper is missing a matrix row, and asserts documented aliases still
|
|
208
|
-
resolve to their canonical methods. Behavioral WebMock specs
|
|
209
|
-
|
|
257
|
+
resolve to their canonical methods. Behavioral WebMock specs cover the remaining
|
|
258
|
+
methods and `Client#upload_and_request_signatures`.
|
|
210
259
|
|
|
211
260
|
### Fixed
|
|
212
261
|
|