@assinafy/sdk 2.8.1 → 2.9.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  This ledger maps the official
4
4
  [`GET /v1/docs/openapi.json`](https://api.assinafy.com.br/v1/docs/openapi.json)
5
- contract to the public SDK API: 85 paths, 112 HTTP operations, and 45 component
5
+ contract to the public SDK API: 90 paths, 118 HTTP operations, and 49 component
6
6
  schemas.
7
7
 
8
8
  All paths below include the `/v1` prefix shown by the OpenAPI document, except
@@ -14,7 +14,7 @@ Status meanings:
14
14
 
15
15
  - **Covered** — a public, typed SDK method sends the operation.
16
16
  - **Compatibility extension** — route retained for existing integrations but
17
- absent from the current OpenAPI path set and excluded from the 112-operation
17
+ absent from the current OpenAPI path set and excluded from the 118-operation
18
18
  total.
19
19
 
20
20
  ## Accounts — 10/10
@@ -62,6 +62,17 @@ Status meanings:
62
62
  | `POST` | `/v1/users/api-keys` | `client.auth.createApiKey(password)` | Covered |
63
63
  | `DELETE` | `/v1/users/api-keys` | `client.auth.deleteApiKey()` | Covered |
64
64
 
65
+ ## Contract lifecycle management (CLM) — 6/6
66
+
67
+ | Method | Path | SDK method | Status |
68
+ | --- | --- | --- | --- |
69
+ | `GET` | `/v1/accounts/{accountId}/contracts` | `client.contracts.list(params?, accountId?)` | Covered |
70
+ | `GET` | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `client.contracts.get(documentId, accountId?)` | Covered |
71
+ | `PUT` | `/v1/accounts/{accountId}/documents/{documentId}/contract` | `client.contracts.set(documentId, payload, accountId?)` | Covered |
72
+ | `GET` | `/v1/accounts/{accountId}/documents/{documentId}/contract/related` | `client.contracts.listRelated(documentId, accountId?)` | Covered |
73
+ | `POST` | `/v1/accounts/{accountId}/documents/{documentId}/contract/renew` | `client.contracts.renew(documentId, payload, accountId?)` | Covered |
74
+ | `POST` | `/v1/accounts/{accountId}/documents/{documentId}/contract/terminate` | `client.contracts.terminate(documentId, payload?, accountId?)` | Covered |
75
+
65
76
  ## Documents — 18/18
66
77
 
67
78
  | Method | Path | SDK method | Status |
@@ -210,7 +221,7 @@ Five additional routes are documented separately under
210
221
  ## Template compatibility routes
211
222
 
212
223
  These routes are available to existing integrations but do not appear in the
213
- current OpenAPI path set. They are excluded from the official 112-operation
224
+ current OpenAPI path set. They are excluded from the official 118-operation
214
225
  coverage count.
215
226
 
216
227
  | Method | Path | SDK method | Status |
@@ -225,7 +236,7 @@ coverage count.
225
236
 
226
237
  Two browser URL helpers used by older deployments are live but absent from the
227
238
  current OpenAPI path set, so they are likewise excluded from the official
228
- 112-operation coverage count.
239
+ 118-operation coverage count.
229
240
 
230
241
  | Method | Path | SDK method | Status |
231
242
  | --- | --- | --- | --- |
@@ -38,7 +38,7 @@ GET /v1/login-callback
38
38
 
39
39
  They map to `auth.getSocialLoginUrl()` and
40
40
  `auth.getSocialLoginCallbackUrl()` and are not part of the official
41
- 112-operation total.
41
+ 118-operation total.
42
42
 
43
43
  The SDK also includes the production contract additions for:
44
44
 
@@ -56,6 +56,30 @@ Older signer-self responses can omit `has_signature`, `has_initial`, and
56
56
  `is_signature_reusable`; assignment signers can omit `notification_history`.
57
57
  Those fields are optional in the SDK response types.
58
58
 
59
+ ## Contract lifecycle management (CLM)
60
+
61
+ Production exposes the six contract lifecycle operations under
62
+ `/v1/accounts/{accountId}` through `client.contracts`. They track terms on an
63
+ existing document, link signed amendment/renewal/termination instruments, run
64
+ the hourly renewal and expiration lifecycle, and expose portfolio filters.
65
+ OAuth reads require `documents:read`; writes require `documents:write` plus a
66
+ workspace plan with contract tracking.
67
+
68
+ A sandbox may return the generic `404` while these routes are not deployed, or
69
+ `403` while its workspace plan does not include contract tracking. The SDK does
70
+ not reinterpret either response or route a sandbox request to production.
71
+ Read operations remain available after a production plan lapses; writes are
72
+ plan-gated. Signed amendments wait and the lifecycle catches up after the plan
73
+ returns, as defined by the production integration guide.
74
+
75
+ `documents.details()` can expose `has_contract` only in a workspace context and
76
+ only when contract tracking is available. A missing key means unknown, not
77
+ false. The thirteen notification preferences include
78
+ `ContractRenewalNotice`, `ContractExpiring`, `ContractExpired`, and
79
+ `ContractRenewed`. Contract changes also use the typed
80
+ `document_contract_*` webhook event names; obtain the current subscribable
81
+ catalog with `webhooks.listEventTypes()`.
82
+
59
83
  `DocumentStatsRow` separates notification-channel counters from verification
60
84
  method counters. Notification counters are not mutually exclusive.
61
85
  `signature_requests_verification_{email,whatsapp,bypass,digital_certificate}`
package/docs/RELEASING.md CHANGED
@@ -9,7 +9,7 @@ event, and the workflow intentionally does not depend on one.
9
9
 
10
10
  | Runtime | Release responsibility |
11
11
  | --- | --- |
12
- | Bun 1.4.0 | Locked install, tests, build, contract checks, and packaging |
12
+ | Bun 1.4.4 | Locked install, tests, build, contract checks, and packaging |
13
13
  | Node.js 22 | Minimum supported consumer runtime |
14
14
  | Node.js 24 LTS | Packaging and registry publishing runtime |
15
15
  | Node.js 26 Current | Forward-compatibility consumer test |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@assinafy/sdk",
3
- "version": "2.8.1",
4
- "packageManager": "bun@1.4.0",
3
+ "version": "2.9.1",
4
+ "packageManager": "bun@1.4.4",
5
5
  "description": "TypeScript SDK for Assinafy API - Digital signature platform",
6
6
  "type": "commonjs",
7
7
  "main": "dist/index.js",
@@ -44,6 +44,8 @@
44
44
  "digital-signature",
45
45
  "electronic-signature",
46
46
  "signature",
47
+ "contract-lifecycle-management",
48
+ "gestao-de-contratos",
47
49
  "pdf",
48
50
  "webhook",
49
51
  "sdk",
@@ -67,20 +69,21 @@
67
69
  "devDependencies": {
68
70
  "@arethetypeswrong/cli": "^0.18.5",
69
71
  "@eslint/js": "^10.0.1",
70
- "@types/bun": "^1.4.0",
71
- "@types/node": "^22.20.1",
72
+ "@types/bun": "^1.4.4",
73
+ "@types/node": "^22.20.5",
72
74
  "@typescript/native": "npm:typescript@^7.0.2",
73
- "eslint": "^10.9.1",
74
- "publint": "^0.3.24",
75
+ "eslint": "^10.13.0",
76
+ "publint": "^0.3.25",
75
77
  "tsup": "^8.5.1",
76
78
  "typescript": "^6.0.3",
77
- "typescript-eslint": "^8.68.0"
79
+ "typescript-eslint": "^8.72.1"
78
80
  },
79
81
  "dependencies": {
80
- "axios": "^1.20.0"
82
+ "axios": "^1.21.0"
81
83
  },
82
84
  "overrides": {
83
85
  "esbuild": "0.28.2",
86
+ "follow-redirects": "1.16.2",
84
87
  "brace-expansion": "5.0.12"
85
88
  },
86
89
  "files": [