assinafy 1.10.1 → 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 +41 -6
- data/README.en.md +554 -463
- data/README.md +681 -505
- data/docs/API_REFERENCE.md +137 -33
- data/lib/assinafy/client.rb +7 -7
- data/lib/assinafy/configuration.rb +14 -3
- data/lib/assinafy/oauth.rb +16 -9
- data/lib/assinafy/resources/account_resource.rb +5 -5
- data/lib/assinafy/resources/assignment_resource.rb +7 -5
- data/lib/assinafy/resources/auth_resource.rb +196 -1
- data/lib/assinafy/resources/base_resource.rb +15 -2
- data/lib/assinafy/resources/document_resource.rb +50 -57
- data/lib/assinafy/resources/field_resource.rb +14 -15
- data/lib/assinafy/resources/oauth_resource.rb +1 -1
- data/lib/assinafy/resources/signer_document_resource.rb +1 -2
- data/lib/assinafy/resources/signer_resource.rb +9 -7
- data/lib/assinafy/resources/tag_resource.rb +7 -7
- data/lib/assinafy/resources/template_resource.rb +16 -16
- data/lib/assinafy/resources/user_resource.rb +2 -2
- data/lib/assinafy/resources/webhook_resource.rb +255 -26
- data/lib/assinafy/support/webhook_verifier.rb +81 -23
- data/lib/assinafy/version.rb +1 -1
- data/sig/assinafy.rbs +29 -4
- metadata +1 -1
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,43 @@
|
|
|
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
|
+
|
|
5
42
|
## 1.10.1
|
|
6
43
|
|
|
7
44
|
- Update the pinned Ruby setup action to support Ruby 4.0.7 in CI and release workflows.
|
|
@@ -89,8 +126,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
|
|
|
89
126
|
value as a `422` only after the request has been sent — and after any signers created for that
|
|
90
127
|
assignment already exist.
|
|
91
128
|
|
|
92
|
-
- `spec/fixtures/api_contract.json` tracks the
|
|
93
|
-
schemas), including the four OAuth operations.
|
|
129
|
+
- `spec/fixtures/api_contract.json` tracks the upstream contract, including the four OAuth operations.
|
|
94
130
|
|
|
95
131
|
### Removed
|
|
96
132
|
|
|
@@ -176,8 +212,7 @@ All notable changes to the `assinafy` Ruby gem are documented here.
|
|
|
176
212
|
|
|
177
213
|
- `SignerResource#accept_terms` and `#verify_email` now send `signer-access-code` as
|
|
178
214
|
the documented query parameter (the `signerAccessCode` security scheme is `in: query`),
|
|
179
|
-
consistent with every other signer-authenticated endpoint.
|
|
180
|
-
only in the request body.
|
|
215
|
+
consistent with every other signer-authenticated endpoint.
|
|
181
216
|
- `TemplateResource#create` now performs the required `multipart/form-data` file
|
|
182
217
|
upload. The previous JSON body was rejected by the API (HTTP 400) and never worked.
|
|
183
218
|
Its signature is now `create(source, options = {}, account_id_override = nil)`.
|
|
@@ -219,8 +254,8 @@ documentation at <https://api.assinafy.com.br/v1/docs>.
|
|
|
219
254
|
method, sourced from the live API and the docs.
|
|
220
255
|
- Behavioral coverage: `spec/api_coverage_spec.rb` now also fails CI when a public
|
|
221
256
|
endpoint wrapper is missing a matrix row, and asserts documented aliases still
|
|
222
|
-
resolve to their canonical methods. Behavioral WebMock specs
|
|
223
|
-
|
|
257
|
+
resolve to their canonical methods. Behavioral WebMock specs cover the remaining
|
|
258
|
+
methods and `Client#upload_and_request_signatures`.
|
|
224
259
|
|
|
225
260
|
### Fixed
|
|
226
261
|
|