@assinafy/sdk 2.11.0 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,98 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.0.0] - 2026-11-11
11
+
12
+ ### Breaking changes
13
+
14
+ These follow what the API now accepts and returns; code that compiled against
15
+ 2.x may need the change shown.
16
+
17
+ - `signerDocuments.download(signerId, documentId, artifactName, signerAccessCode)`
18
+ requires the access code and accepts only `'original'`; the API refuses other
19
+ artifacts and answers a request without a usable code with a redirect, which
20
+ now throws `ApiError` (`302`). Pass the signer's code; send the certified copy
21
+ with `resendCertifiedCopy()`.
22
+ - `signerDocuments.confirmData()` resolves to `ISigner | null` (`null` when the
23
+ API returns no signer, as production does). Stop reading the signer from it.
24
+ - `signerDocuments.getAssignment()` and `getCurrent()` return `ISigningDocument`:
25
+ document fields other than `id`, `name` and `status` are optional, because a
26
+ closed access code returns only those plus `current_signer`,
27
+ `certified_copy` and `envelope`. Check `is_signer_access_closed` first. Its
28
+ `assignment` has no `signers`, `signing_urls`, `copy_receivers` or `summary`,
29
+ which signer reads never return.
30
+ - `signerDocuments.acceptTerms()` returns `IAcceptTermsResult | null` instead of
31
+ `void` (`null` from deployments that acknowledge without data).
32
+ - `ISigningUrl.url` is `string | null`: `null` for embedded and WhatsApp-only
33
+ signers.
34
+ - `IWhatsAppNotification.sent_at` is an ISO-8601 string instead of a number.
35
+ - `IAccountTheme.logo` is `string | null`; `secondary_color` is `string`.
36
+ - `ICostEstimate.document_balance` and `credit_balance`, and the compact
37
+ resend-cost `credit_balance`, are `number | null` (`null` when unlimited).
38
+ - `IAssignment.sender_email` is `string | null`.
39
+ - `IDocumentActivity.origin.ip` is `string | null` (`null` when the request
40
+ carried no client address).
41
+ - `AssignmentVerificationMethod` and `AssignmentNotificationMethod` include
42
+ `'Bypass'`, and `INotificationHistoryEntry.status` includes `'delivered'` and
43
+ `'opened'`; exhaustive `switch` statements need the new cases.
44
+ - `ILegacyConfirmSignerDataPayload` is an alias of `IConfirmSignerDataPayload`,
45
+ which now has `whatsapp_phone_number`.
46
+
47
+ ### Added
48
+
49
+ - Envelopes through `client.envelopes`: send up to 20 documents to the same
50
+ signers with one invitation per signer and one document charge; estimate the
51
+ cost, rename or reorder, add and remove documents, remind a signer, cancel,
52
+ delete, read the activity trail, and download an artifact zip.
53
+ - Embedded signing through `client.embed`: manage the origins allowed to frame
54
+ the signing page and mint single-use sessions for signers created with
55
+ `embedded: true`.
56
+ - `Bypass` verification and notification methods for accounts that have the
57
+ feature, and `embedded` signers on assignments, template documents and
58
+ envelopes. Embedded signers use `Email`, `Whatsapp` or `Bypass` verification.
59
+ - `max_total_credits` on assignment, template document and envelope creation,
60
+ and `idempotencyKey` on template document and envelope creation.
61
+ - `workspaces.get(accountId, { expand: 'signing_features' })`, the workspace
62
+ `limits`, `workspaces.getUsage()`, `getNotificationPolicy()` and
63
+ `updateNotificationPolicy()`.
64
+ - `users.getPushPreferences()` and `updatePushPreferences()`.
65
+ - `webhooks.testEndpoint()`, overlapping secret rotation with
66
+ `rotateEndpointSecret(endpointId, accountId?, { keep_previous: true })`,
67
+ delivery `duration_ms`, and the `webhook_test` delivery event type.
68
+ - Signer-side `getTheme()`, `downloadLogo()`, `resendCertifiedCopy()`,
69
+ `downloadCertifiedCopy()` and `resendCertifiedCopyFromLink()`;
70
+ `getAssignment()` options for `expand: ['envelope']` and another envelope
71
+ document; `getCurrent()` envelope expansion; `envelope_id` filters on signer
72
+ document lists and searches.
73
+ - `documents.details()` / `get()` envelope expansion, `envelope_id` filters on
74
+ document lists and searches, and signed renders with `thumbnail()` /
75
+ `downloadPage()` `{ artifact: 'certificated' }`.
76
+ - `contracts.listRelated(documentId, accountId?, { expand: 'document' })`.
77
+ - `ApiError.code` and `ApiError.fieldErrors` expose the refusal code and the
78
+ fields a `400` refused.
79
+ - `signers.update()` clears `email`, `whatsapp_phone_number` and
80
+ `government_id` with `null` or an empty string.
81
+
82
+ ### Changed
83
+
84
+ - `signerDocuments.confirmData()` sends `whatsapp_phone_number` as a regular
85
+ field.
86
+ - Response types add `embedded` on signing URLs, typed notification failure
87
+ codes, `certificated_at` on verification, and verification fields on
88
+ document lists.
89
+ - The resend-cost estimate documents the compact `total` /
90
+ `has_sufficient_credits` shape that production returns.
91
+
92
+ ### Fixed
93
+
94
+ - Field validation with a signer access code no longer sends the workspace
95
+ credentials with the code, and `signerDocuments.listAsWorkspace()` never
96
+ forwards a signer access code passed through its list parameters.
97
+ - Signer artifact and certified-copy downloads throw `ApiError` (`302`) instead
98
+ of returning the expired-link page as file bytes.
99
+ - Webhook signature verification rejects signature values that are not
100
+ canonical base64.
101
+
10
102
  ## [2.11.0] - 2026-11-02
11
103
 
12
104
  ### Added
@@ -926,7 +1018,8 @@ signer fields with `cpf` and `whatsapp_phone_number`.
926
1018
  - High-level `uploadAndRequestSignatures` helper on `AssinafyClient`.
927
1019
  - `PaginatedResult<T>` with parsed `X-Pagination-*` header meta.
928
1020
 
929
- [Unreleased]: https://github.com/assinafy/typescript-sdk/compare/v2.11.0...HEAD
1021
+ [Unreleased]: https://github.com/assinafy/typescript-sdk/compare/v3.0.0...HEAD
1022
+ [3.0.0]: https://github.com/assinafy/typescript-sdk/compare/v2.11.0...v3.0.0
930
1023
  [2.11.0]: https://github.com/assinafy/typescript-sdk/compare/v2.10.0...v2.11.0
931
1024
  [2.10.0]: https://github.com/assinafy/typescript-sdk/compare/v2.9.1...v2.10.0
932
1025
  [2.9.1]: https://github.com/assinafy/typescript-sdk/compare/v2.9.0...v2.9.1