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