@assinafy/sdk 2.10.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,129 @@ 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
+
102
+ ## [2.11.0] - 2026-11-02
103
+
104
+ ### Added
105
+
106
+ - Template document creation accepts either an existing signer `id` or an
107
+ `email` that reuses or creates the signer, with optional `name` and E.164
108
+ `whatsapp_phone_number`.
109
+ - Template creation and cost estimation support `DigitalCertificate` for
110
+ templates without placed signer fields; templates that produce `collect`
111
+ assignments remain rejected by the API.
112
+ - Webhook endpoint and delivery types expose hold state, attempt identity,
113
+ attempt kind, and whether another retry will follow. Endpoint updates expose
114
+ a newly generated signing secret when they turn signing on.
115
+
116
+ ### Changed
117
+
118
+ - Assignment deadlines accept date-only values, date-times interpreted as UTC
119
+ when no offset is present, and offset-aware date-times.
120
+ - New or changed webhook endpoint URLs require HTTPS. OAuth applications with
121
+ `webhooks:write` can rotate a signing secret, while reading it remains
122
+ API-key-only.
123
+ - Webhook delivery guidance covers the six-attempt retry policy, endpoint hold
124
+ probes, oldest-first recovery, and seven-day history retention.
125
+
126
+ ### Fixed
127
+
128
+ - Signer decline reasons count Unicode characters rather than UTF-16 code
129
+ units, allowing the documented 2,000-character limit for astral characters.
130
+ - Development tooling resolves `minimatch` 11.0.3, which prevents unbounded
131
+ glob-part amplification on attacker-controlled patterns.
132
+
10
133
  ## [2.10.0] - 2026-10-29
11
134
 
12
135
  ### Added
@@ -895,7 +1018,9 @@ signer fields with `cpf` and `whatsapp_phone_number`.
895
1018
  - High-level `uploadAndRequestSignatures` helper on `AssinafyClient`.
896
1019
  - `PaginatedResult<T>` with parsed `X-Pagination-*` header meta.
897
1020
 
898
- [Unreleased]: https://github.com/assinafy/typescript-sdk/compare/v2.10.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
1023
+ [2.11.0]: https://github.com/assinafy/typescript-sdk/compare/v2.10.0...v2.11.0
899
1024
  [2.10.0]: https://github.com/assinafy/typescript-sdk/compare/v2.9.1...v2.10.0
900
1025
  [2.9.1]: https://github.com/assinafy/typescript-sdk/compare/v2.9.0...v2.9.1
901
1026
  [2.9.0]: https://github.com/assinafy/typescript-sdk/compare/v2.8.1...v2.9.0