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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8a12972c20d3f42452948edca772428326d37eafaf2354286bd9d3285bb6bf2
4
- data.tar.gz: ad4b481584b05d052d7f44cde2a0cc7c99873e127031c30c60662c0a95dbca40
3
+ metadata.gz: 97dcce395cbee3bd4a632650550becfd07d6fa291da434678d1a31de4488d103
4
+ data.tar.gz: 4cde25cfc6221e23378892c4fa19d7779046b65642bc33dc734756f712c2aab8
5
5
  SHA512:
6
- metadata.gz: 8990224d37bac65328f95e7bdae28c999381f33fa64f1cfe300f3fffc124e8e98ab4e8e8473802534b1155ec06fc5c8080ffffb8a809118abf8d58cc661ad6a7
7
- data.tar.gz: 35be652f65fa20a29cef34f3487f4af98ac9e94d613ec51c816b24ee879ed436b4c168aaeb51f32fef81864a9b7e54824812fa713693b2e7235e424ae407f085
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 current upstream contract (93 operations, 39
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. Previously it was sent
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 were added for the
223
- previously untested methods and for `Client#upload_and_request_signatures`.
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