assinafy 2.0.1 → 2.1.1

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: 83473f4fd075a7c665a16ee6ea6c38c64c548927930221d24ecd468cce1f4203
4
- data.tar.gz: 57c81beb685fe09baf9de80eb36abc628d224952b2b08e582d19e24ecb402c16
3
+ metadata.gz: d98e9a7dcc345cedc9196fe2356abde16e37ba098253ee66892fd62522d7eb92
4
+ data.tar.gz: 63ea42ed9f2f171f111f174766a29e2df588fbc832bcee3ff57747ee539a7b34
5
5
  SHA512:
6
- metadata.gz: dda868b4808b8885693edc57d8825eaf25a31dd628395180f651bd479a2b59ced524205683900812aa61654b2e79a7c69a110ca8c99c54ea084f21ea3515640a
7
- data.tar.gz: ba6c518504f42fddaa0f9cfe4f58b0bfe6e23a83255f2cee5ef1a76551fba72b628f8ea448ba93b24201b055fd41c2ee95882534c3eedfb334f49a5b23cb5439
6
+ metadata.gz: 1e6c49c00aa499cc06db92281c54f41a58afbe5431d03e319153057f417a1490b65b128873d6201845d95e69b1ac90283dc8fbbaf5cc83517a8dc430b5b460a1
7
+ data.tar.gz: ee0b354da27acc2bf7faa70e5416eec3e98fad6f72b822697d13d0dd7ff3938907848b772426157e5270f91f5f22d3b8c213390e8b114ef0a5adfb68ae3167b9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to the `assinafy` Ruby gem are documented here.
4
4
 
5
+ ## [2.1.1] - 2026-11-02
6
+
7
+ ### Fixed
8
+
9
+ - Daily account and user statistics require a `YYYY-MM` month before a request is sent.
10
+ - Signer confirmation, field regex and tag color payloads reject malformed values before a request is sent.
11
+ - WhatsApp notification `sent_at` values are documented as ISO 8601 date-time strings.
12
+
13
+ ## [2.1.0] - 2026-10-28
14
+
15
+ ### Added
16
+
17
+ - `ContractResource` and `client.contracts` cover listing, reading, updating, relating, renewing and terminating
18
+ the contract terms tracked on documents, including nullable fields and optimistic `updated_at` preconditions.
19
+ - User notification preferences support `ContractRenewalNotice`, `ContractExpiring`, `ContractExpired` and
20
+ `ContractRenewed`.
21
+
22
+ ### Changed
23
+
24
+ - New or changed webhook endpoint URLs must be absolute HTTPS URLs; invalid URLs raise `ValidationError` before a
25
+ request.
26
+ - Contract, document, assignment, webhook and reminder-cost response fields reflect the current API contract.
27
+
5
28
  ## [2.0.1] - 2026-10-19
6
29
 
7
30
  ### Fixed
data/README.en.md CHANGED
@@ -691,7 +691,7 @@ See [Errors](#errors) for the full hierarchy.
691
691
 
692
692
  ## Resource reference
693
693
 
694
- `Assinafy::Client` exposes thirteen accessors — twelve API resources plus the local `webhook_verifier` helper:
694
+ `Assinafy::Client` exposes fourteen accessors — thirteen API resources plus the local `webhook_verifier` helper:
695
695
 
696
696
  | Accessor | What it covers |
697
697
  | --------------------------- | ------------------------------------------------------------------ |
@@ -700,6 +700,7 @@ See [Errors](#errors) for the full hierarchy.
700
700
  | `client.accounts` | Account CRUD, theme, KPI stats, brand logo |
701
701
  | `client.users` | User profile, notification preferences, cross-account KPIs |
702
702
  | `client.documents` | Upload, list, search, rename, download, delete, verify, tags |
703
+ | `client.contracts` | Contract terms, amendments, renewals, terminations |
703
704
  | `client.signers` | Workspace signer CRUD + signer self-service endpoints |
704
705
  | `client.signer_documents` | Signer-authenticated multi-document operations + search |
705
706
  | `client.assignments` | List/create/sign/decline/resend/estimate assignments |
@@ -729,11 +730,12 @@ client.accounts.delete_logo
729
730
  ```ruby
730
731
  client.users.me
731
732
  client.users.stats(granularity: 'daily', month: '2026-06') # cross-account KPI rows
732
- client.users.notification_preferences # returns all nine owner-email preferences
733
- client.users.update_notification_preferences(SignerDeclined: false) # partial request; returns all nine
733
+ client.users.notification_preferences # returns all thirteen owner-email preferences
734
+ client.users.update_notification_preferences(SignerDeclined: false) # partial request; returns all thirteen
734
735
  ```
735
736
 
736
- Both stats methods validate `granularity` (`monthly` or `daily`) and `month` (`YYYY-MM`) locally, and return rows
737
+ Both stats methods validate `granularity` (`monthly` or `daily`) and `month` (`YYYY-MM`) locally; daily statistics
738
+ require `month`. They return rows
737
739
  with `period`, `documents_uploaded`, `documents_sent`, `signature_requests`,
738
740
  `signature_requests_notification_email`, `signature_requests_notification_whatsapp`,
739
741
  `signature_requests_notification_bypass`, `signature_requests_verification_email`,
@@ -781,6 +783,27 @@ client.documents.signing_progress('document-id') # => { signed: 1, total: 2, p
781
783
  An Array `tags` filter is sent as comma-separated tag IDs. The tag arrays of `replace_tags`/`append_tags` take tag
782
784
  IDs.
783
785
 
786
+ ### Contracts
787
+
788
+ ```ruby
789
+ contract = client.contracts.update(
790
+ 'document-id',
791
+ status: 'active', counterparty_name: 'Example Ltda', value: 120_000, currency: 'BRL',
792
+ start_date: '2026-11-01', end_date: '2027-10-31', auto_renew: true,
793
+ renewal_term_months: 12, notice_period_days: 30
794
+ )
795
+
796
+ client.contracts.get('document-id')
797
+ client.contracts.list(status: ['active'], ending_within_days: 30)
798
+ client.contracts.related('document-id')
799
+ client.contracts.renew('document-id', term: contract['term'], updated_at: contract['updated_at'])
800
+ client.contracts.terminate('document-id', reason: 'Ended by the parties')
801
+ ```
802
+
803
+ `update` is partial and preserves explicit `nil` values as JSON `null`. Link an amendment document with
804
+ `parent_document_id` and `relation_type`. Reads require OAuth scope `documents:read`; writes require
805
+ `documents:write` and a plan with contract tracking. `get` and `related` return `nil` when no tracked terms exist.
806
+
784
807
  ### Signers (workspace CRUD)
785
808
 
786
809
  ```ruby