@assinafy/cli 2.9.1 → 2.10.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/README.en.md +10 -9
- package/README.md +2 -4
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/dist/api.cjs +10 -13
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +10 -13
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +44 -46
- package/dist/types/api/resources/assignments.d.ts +1 -1
- package/dist/types/api/resources/assignments.d.ts.map +1 -1
- package/dist/types/api/resources/authentication.d.ts +1 -3
- package/dist/types/api/resources/authentication.d.ts.map +1 -1
- package/dist/types/api/resources/documents.d.ts +4 -2
- package/dist/types/api/resources/documents.d.ts.map +1 -1
- package/dist/types/api/resources/envelopes.d.ts +2 -2
- package/dist/types/api/resources/envelopes.d.ts.map +1 -1
- package/dist/types/api/resources/scheduled-sends.d.ts +1 -1
- package/dist/types/api/resources/scheduled-sends.d.ts.map +1 -1
- package/dist/types/api/types.d.ts +3 -3
- package/dist/types/api/types.d.ts.map +1 -1
- package/docs/README.md +1 -1
- package/docs/api-operations.json +89 -1
- package/docs/api-reference.md +1821 -341
- package/docs/assignments.md +6 -6
- package/docs/auth.md +3 -16
- package/docs/documents.md +20 -4
- package/docs/envelopes.md +4 -4
- package/docs/scheduled-sends.md +1 -1
- package/docs/sdk-reference.md +14 -14
- package/package.json +1 -1
package/docs/assignments.md
CHANGED
|
@@ -21,9 +21,9 @@ Commands:
|
|
|
21
21
|
identity-verification <documentId> <assignmentId> <signerId> Fetch a signer identity review and its evidence summary
|
|
22
22
|
identity-image [options] <documentId> <assignmentId> <signerId> Download identity review evidence while the review is open
|
|
23
23
|
review-identity [options] <documentId> <assignmentId> <signerId> Approve certification or reject and cancel the document after identity review
|
|
24
|
-
schedule [options] <documentId> Schedule an assignment without sending or charging now
|
|
25
|
-
signer-capacities <documentId> Read the capacities signers were assigned
|
|
26
|
-
notification-history <documentId> Read notification delivery/open times
|
|
24
|
+
schedule [options] <documentId> Schedule an assignment without sending or charging now
|
|
25
|
+
signer-capacities <documentId> Read the capacities signers were assigned
|
|
26
|
+
notification-history <documentId> Read notification delivery/open times
|
|
27
27
|
help [command] display help for command
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -214,7 +214,7 @@ Options:
|
|
|
214
214
|
```text
|
|
215
215
|
Usage: assinafy assignments schedule [options] <documentId>
|
|
216
216
|
|
|
217
|
-
Schedule an assignment without sending or charging now
|
|
217
|
+
Schedule an assignment without sending or charging now
|
|
218
218
|
|
|
219
219
|
Arguments:
|
|
220
220
|
documentId Document ID
|
|
@@ -229,7 +229,7 @@ Options:
|
|
|
229
229
|
```text
|
|
230
230
|
Usage: assinafy assignments signer-capacities [options] <documentId>
|
|
231
231
|
|
|
232
|
-
Read the capacities signers were assigned
|
|
232
|
+
Read the capacities signers were assigned
|
|
233
233
|
|
|
234
234
|
Arguments:
|
|
235
235
|
documentId Document ID
|
|
@@ -243,7 +243,7 @@ Options:
|
|
|
243
243
|
```text
|
|
244
244
|
Usage: assinafy assignments notification-history [options] <documentId>
|
|
245
245
|
|
|
246
|
-
Read notification delivery/open times
|
|
246
|
+
Read notification delivery/open times
|
|
247
247
|
|
|
248
248
|
Arguments:
|
|
249
249
|
documentId Document ID
|
package/docs/auth.md
CHANGED
|
@@ -23,7 +23,8 @@ Commands:
|
|
|
23
23
|
existing credentials required)
|
|
24
24
|
reset-password [options] Complete a password reset with the emailed
|
|
25
25
|
token (no existing credentials required)
|
|
26
|
-
api-keys
|
|
26
|
+
api-keys Inspect or revoke the current user personal
|
|
27
|
+
API key
|
|
27
28
|
mfa Two-factor authentication: login verification,
|
|
28
29
|
enrollment, and recovery codes
|
|
29
30
|
help [command] display help for command
|
|
@@ -125,31 +126,17 @@ Options:
|
|
|
125
126
|
```text
|
|
126
127
|
Usage: assinafy auth api-keys [options] [command]
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
Inspect or revoke the current user personal API key
|
|
129
130
|
|
|
130
131
|
Options:
|
|
131
132
|
-h, --help display help for command
|
|
132
133
|
|
|
133
134
|
Commands:
|
|
134
|
-
create [options] Generate (and rotate) the current user API key
|
|
135
135
|
get Show the masked current API key
|
|
136
136
|
delete|rm [options] Revoke the current API key
|
|
137
137
|
help [command] display help for command
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
#### `assinafy auth api-keys create`
|
|
141
|
-
|
|
142
|
-
```text
|
|
143
|
-
Usage: assinafy auth api-keys create [options]
|
|
144
|
-
|
|
145
|
-
Generate (and rotate) the current user API key
|
|
146
|
-
|
|
147
|
-
Options:
|
|
148
|
-
--password <password> Account password (prompted if omitted) (env:
|
|
149
|
-
ASSINAFY_PASSWORD)
|
|
150
|
-
-h, --help display help for command
|
|
151
|
-
```
|
|
152
|
-
|
|
153
140
|
#### `assinafy auth api-keys get`
|
|
154
141
|
|
|
155
142
|
```text
|
package/docs/documents.md
CHANGED
|
@@ -20,6 +20,7 @@ Commands:
|
|
|
20
20
|
thumbnail [options] <id> Download the document thumbnail (JPEG)
|
|
21
21
|
download-page [options] <id> <pageId> Download a single document page (JPEG)
|
|
22
22
|
activities [options] <id> Show one page of the activity log for a document
|
|
23
|
+
cancel [options] <id> Cancel an open document while retaining its files and history
|
|
23
24
|
delete|rm [options] <id> Delete a document
|
|
24
25
|
tags <id> List the tags attached to a document
|
|
25
26
|
tags-set <id> [tags...] Replace a document tag set by name
|
|
@@ -33,8 +34,8 @@ Commands:
|
|
|
33
34
|
send-token [options] <id> Email a one-time access token to a signer of a pending document
|
|
34
35
|
progress <id> Show signing progress for a document
|
|
35
36
|
wait [options] <id> Poll a document until it is ready (or fails / times out)
|
|
36
|
-
watchers <documentId> List document watchers (
|
|
37
|
-
set-watchers [options] <documentId> Replace contacts notified when the document ends
|
|
37
|
+
watchers <documentId> List document watchers (owner credentials required)
|
|
38
|
+
set-watchers [options] <documentId> Replace contacts notified when the document ends
|
|
38
39
|
help [command] display help for command
|
|
39
40
|
```
|
|
40
41
|
|
|
@@ -204,6 +205,21 @@ Options:
|
|
|
204
205
|
-h, --help display help for command
|
|
205
206
|
```
|
|
206
207
|
|
|
208
|
+
### `assinafy documents cancel`
|
|
209
|
+
|
|
210
|
+
```text
|
|
211
|
+
Usage: assinafy documents cancel [options] <id>
|
|
212
|
+
|
|
213
|
+
Cancel an open document while retaining its files and history
|
|
214
|
+
|
|
215
|
+
Arguments:
|
|
216
|
+
id Document ID
|
|
217
|
+
|
|
218
|
+
Options:
|
|
219
|
+
-y, --yes Skip the confirmation prompt
|
|
220
|
+
-h, --help display help for command
|
|
221
|
+
```
|
|
222
|
+
|
|
207
223
|
### `assinafy documents delete`
|
|
208
224
|
|
|
209
225
|
```text
|
|
@@ -408,7 +424,7 @@ Options:
|
|
|
408
424
|
```text
|
|
409
425
|
Usage: assinafy documents watchers [options] <documentId>
|
|
410
426
|
|
|
411
|
-
List document watchers (
|
|
427
|
+
List document watchers (owner credentials required)
|
|
412
428
|
|
|
413
429
|
Arguments:
|
|
414
430
|
documentId Document ID
|
|
@@ -422,7 +438,7 @@ Options:
|
|
|
422
438
|
```text
|
|
423
439
|
Usage: assinafy documents set-watchers [options] <documentId>
|
|
424
440
|
|
|
425
|
-
Replace contacts notified when the document ends
|
|
441
|
+
Replace contacts notified when the document ends
|
|
426
442
|
|
|
427
443
|
Arguments:
|
|
428
444
|
documentId Document ID
|
package/docs/envelopes.md
CHANGED
|
@@ -23,8 +23,8 @@ Commands:
|
|
|
23
23
|
resend <envelopeId> <signerId> Resend one signer’s envelope invitation; paid channels cost credits
|
|
24
24
|
add-document [options] <envelopeId> Add a processed document and notify its envelope signers
|
|
25
25
|
remove-document [options] <envelopeId> <documentId> Cancel and remove an open document, notifying its recipients
|
|
26
|
-
schedule [options] Schedule an envelope without sending or charging now
|
|
27
|
-
estimate-resend-cost <envelopeId> <signerId> Estimate one envelope reminder without sending or charging
|
|
26
|
+
schedule [options] Schedule an envelope without sending or charging now
|
|
27
|
+
estimate-resend-cost <envelopeId> <signerId> Estimate one envelope reminder without sending or charging
|
|
28
28
|
help [command] display help for command
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -216,7 +216,7 @@ Options:
|
|
|
216
216
|
```text
|
|
217
217
|
Usage: assinafy envelopes schedule [options]
|
|
218
218
|
|
|
219
|
-
Schedule an envelope without sending or charging now
|
|
219
|
+
Schedule an envelope without sending or charging now
|
|
220
220
|
|
|
221
221
|
Options:
|
|
222
222
|
--data <json> Envelope JSON with send_at (ISO 8601 or Unix seconds)
|
|
@@ -228,7 +228,7 @@ Options:
|
|
|
228
228
|
```text
|
|
229
229
|
Usage: assinafy envelopes estimate-resend-cost [options] <envelopeId> <signerId>
|
|
230
230
|
|
|
231
|
-
Estimate one envelope reminder without sending or charging
|
|
231
|
+
Estimate one envelope reminder without sending or charging
|
|
232
232
|
|
|
233
233
|
Arguments:
|
|
234
234
|
envelopeId Envelope ID
|
package/docs/scheduled-sends.md
CHANGED
package/docs/sdk-reference.md
CHANGED
|
@@ -113,8 +113,8 @@ try {
|
|
|
113
113
|
|
|
114
114
|
| SDK method | HTTP operation | Resolves to |
|
|
115
115
|
| --- | --- | --- |
|
|
116
|
-
| `listWatchers(documentId)` | `GET /documents/{documentId}/watchers`
|
|
117
|
-
| `setWatchers(documentId, watcherIds)` | `PUT /documents/{documentId}/watchers
|
|
116
|
+
| `listWatchers(documentId)` | `GET /documents/{documentId}/watchers` | `ISigner[]` |
|
|
117
|
+
| `setWatchers(documentId, watcherIds)` | `PUT /documents/{documentId}/watchers`; `{ watcher_ids: string[] }` | `ISigner[]` |
|
|
118
118
|
| `upload(source, options?)` | [`POST /accounts/{accountId}/documents`](./api-reference.md#upload-and-create-document) | `IDocumentUploadResponse` |
|
|
119
119
|
| `list(params?, accountId?)` | [`GET /accounts/{accountId}/documents`](./api-reference.md#list-documents) | `IDocumentListResponse` |
|
|
120
120
|
| `search(params?, accountId?)` | [`GET /accounts/{accountId}/documents/search`](./api-reference.md#search-documents-lightweight) | `IDocumentListResponse` |
|
|
@@ -127,6 +127,7 @@ try {
|
|
|
127
127
|
| `thumbnail(documentId, options?)` | [`GET /documents/{documentId}/thumbnail`](./api-reference.md#download-document-thumbnail) | JPEG `Buffer` |
|
|
128
128
|
| `downloadPage(documentId, pageId, options?)` | [`GET /documents/{documentId}/pages/{pageId}/download`](./api-reference.md#download-document-page) | JPEG `Buffer` |
|
|
129
129
|
| `activities(documentId, params?)` | [`GET /documents/{documentId}/activities`](./api-reference.md#list-document-activities) | `IDocumentActivity[]` |
|
|
130
|
+
| `cancel(documentId)` | [`PUT /documents/{documentId}/cancel`](./api-reference.md#cancel-document) | `IDocumentDetailsResponse` |
|
|
130
131
|
| `delete(documentId)` | [`DELETE /documents/{documentId}`](./api-reference.md#delete-document) | `IEmptyResult` (`unknown[]`) |
|
|
131
132
|
| `listTags(documentId, accountId?)` | [`GET /accounts/{accountId}/documents/{documentId}/tags`](./api-reference.md#list-document-tags) | `ITag[]` |
|
|
132
133
|
| `replaceTags(documentId, tags, accountId?)` | [`PUT /accounts/{accountId}/documents/{documentId}/tags`](./api-reference.md#replace-document-tags) | `ITag[]` |
|
|
@@ -141,7 +142,7 @@ try {
|
|
|
141
142
|
| `isFullySigned(documentId)` | SDK helper over `details` | `boolean` |
|
|
142
143
|
| `getSigningProgress(documentId)` | SDK helper over `details` | `{ signed; total; pending; percentage }` |
|
|
143
144
|
|
|
144
|
-
Watchers require owner credentials; OAuth application tokens cannot manage them. Up to ten workspace contacts with email addresses receive an email when the document is signed by all, declined or expired. The email has no document link or attachment. Setting watchers replaces the whole list, duplicates count once, and `[]` clears it. Changes stop once the document ends. See the complete [
|
|
145
|
+
Watchers require owner credentials; OAuth application tokens cannot manage them. Up to ten workspace contacts with email addresses receive an email when the document is signed by all, declined or expired. The email has no document link or attachment. Setting watchers replaces the whole list, duplicates count once, and `[]` clears it. Changes stop once the document ends. See the complete [request and response contracts](./api-reference.md#documents). CLI: `documents watchers` and `documents set-watchers --watcher-ids '["example_signer"]'`.
|
|
145
146
|
|
|
146
147
|
Upload input and options:
|
|
147
148
|
|
|
@@ -179,8 +180,8 @@ An envelope groups up to 20 processed documents and 20 existing workspace signer
|
|
|
179
180
|
| --- | --- | --- |
|
|
180
181
|
| `list(params?, accountId?)` | `GET /accounts/{accountId}/envelopes`; `{ page?, per_page?, search?, status?: "open" | "closed" }` | `PaginatedResult<IDocumentEnvelope>` |
|
|
181
182
|
| `create(payload, options?)` | `POST /accounts/{accountId}/envelopes`; `ICreateEnvelopePayload` | `IDocumentEnvelope` |
|
|
182
|
-
| `schedule(payload, accountId?)` | `POST /accounts/{accountId}/scheduled-sends
|
|
183
|
-
| `estimateResendCost(envelopeId, signerId, accountId?)` | `POST …/{envelopeId}/signers/{signerId}/estimate-resend-cost
|
|
183
|
+
| `schedule(payload, accountId?)` | `POST /accounts/{accountId}/scheduled-sends`; creation body plus `send_at` | `IScheduledSend` |
|
|
184
|
+
| `estimateResendCost(envelopeId, signerId, accountId?)` | `POST …/{envelopeId}/signers/{signerId}/estimate-resend-cost`; no body | `IResendCostEstimate` |
|
|
184
185
|
| `estimateCost(payload, accountId?)` | `POST /accounts/{accountId}/envelopes/estimate-cost`; same creation body, no changes or charges | `IEstimateCostResponse` |
|
|
185
186
|
| `get(envelopeId, accountId?)` | `GET /accounts/{accountId}/envelopes/{envelopeId}` | `IDocumentEnvelope` |
|
|
186
187
|
| `update(envelopeId, payload, accountId?)` | `PATCH /accounts/{accountId}/envelopes/{envelopeId}`; `{ name?, message?: string | null, document_ids?: string[] }` | `IDocumentEnvelope` |
|
|
@@ -466,9 +467,9 @@ The hourly lifecycle uses Brasília calendar days: notice-period alerts, warning
|
|
|
466
467
|
| SDK method | HTTP operation | Resolves to |
|
|
467
468
|
| --- | --- | --- |
|
|
468
469
|
| `list(params?, accountId?)` | [`GET /assignments?accountId=…`](./api-reference.md#list-assignments) | `PaginatedResult<IAssignment>` |
|
|
469
|
-
| `schedule(documentId, payload)` | `POST /documents/{documentId}/scheduled-sends
|
|
470
|
-
| `signerCapacities(documentId)` | `GET /documents/{documentId}/signer-capacities`
|
|
471
|
-
| `notificationHistory(documentId)` | `GET /documents/{documentId}/notification-history`
|
|
470
|
+
| `schedule(documentId, payload)` | `POST /documents/{documentId}/scheduled-sends`; assignment body plus `send_at` | `IScheduledSend` |
|
|
471
|
+
| `signerCapacities(documentId)` | `GET /documents/{documentId}/signer-capacities` | `ISignerCapacity[]` (`{ signer_id, sign_as }`) |
|
|
472
|
+
| `notificationHistory(documentId)` | `GET /documents/{documentId}/notification-history` | `ISignerNotificationHistory[]` |
|
|
472
473
|
| `create(documentId, payload)` | [`POST /documents/{documentId}/assignments`](./api-reference.md#create-assignment-request-signatures) | `IAssignment` |
|
|
473
474
|
| `estimateCost(documentId, payload)` | [`POST /documents/{documentId}/assignments/estimate-cost`](./api-reference.md#estimate-assignment-cost) | `IEstimateCostResponse` |
|
|
474
475
|
| `resetExpiration(documentId, assignmentId, expiresAt)` | [`PUT …/reset-expiration`](./api-reference.md#reset-assignment-expiration) | `IAssignment`; accepts a date, datetime or `null` to clear the deadline |
|
|
@@ -487,7 +488,7 @@ Assignment payload:
|
|
|
487
488
|
signers?: Array<string | {
|
|
488
489
|
id?: string;
|
|
489
490
|
signer_id?: string;
|
|
490
|
-
sign_as?: SignerCapacity | null;
|
|
491
|
+
sign_as?: SignerCapacity | null;
|
|
491
492
|
verification_method?: 'Email' | 'Whatsapp' | 'DigitalCertificate' | 'IdDocumentFaceMatchBasic';
|
|
492
493
|
notification_methods?: Array<'Email' | 'Whatsapp'>;
|
|
493
494
|
step?: number;
|
|
@@ -522,13 +523,13 @@ Production defaults `notification_methods: []` to `['Email']` and sends an invit
|
|
|
522
523
|
|
|
523
524
|
`credit_balance` can be null for unlimited plans. `IResendCostEstimate` also accepts the published `IEstimateCostResponse` shape. Check `'total' in estimate` to select the production shape; use its `has_sufficient_credits` before resending. The published shape uses `total_credits` and `has_sufficient_resources`.
|
|
524
525
|
|
|
525
|
-
|
|
526
|
+
`sign_as` records the capacity the sender assigns, printed on the certificate page. Omission or null means `Sign`. Values are exported as `SIGNER_CAPACITIES` and `SignerCapacity`: `Sign`, `Approve`, `Acknowledge`, `Party`, `Witness`, `Intervening`, `Receipt`, `IssuerEndorserGuarantor`, `IssuerEndorserGuarantorSurety`, `Surety`, `PartySurety`, `JointDebtor`, `PartyJointDebtor`, `ContractingParty`, `ContractedParty`, `Landlord`, `Tenant`, `Buyer`, `Seller`, `AttorneyInFact`, `LegalRepresentative`, `Employer`, `Employee`. The SDK preserves it through creation, estimates, scheduling and `uploadAndRequestSignatures`; CLI `assignments create --signers` and `send --signers` accept it in signer JSON. It is fixed on creation and read through `signerCapacities`; invitations, the signing page and webhooks do not carry it. An unsent document returns `[]`.
|
|
526
527
|
|
|
527
528
|
`notificationHistory(documentId)` returns an array of `{ signer_id, notification_history }`, in assignment signer order. Each history entry extends `IAssignmentSignerNotification` with required nullable `delivered_at` and `opened_at`. It retains `event` and `status`, plus optional `error_code`, `error_message`, `sent_at` and `failed_at`. Status is `sent | delivered | opened | failed`; timestamps and error fields are nullable. `error_code` is `MailboxFull | AddressNotFound | AddressSuppressed | ContentRejected | MarkedAsSpam | NotOnWhatsapp | RecipientRestricted | NotSent | Unknown | null`. Delivery and open times are hints: scanners may open email, and blocked images or disabled read receipts may hide opens. An unsent document returns `[]`. Both history and capacities accept OAuth `documents:read`. CLI: `assignments signer-capacities` and `assignments notification-history`.
|
|
528
529
|
|
|
529
530
|
## Scheduled sends (`client.scheduledSends`)
|
|
530
531
|
|
|
531
|
-
|
|
532
|
+
Full HTTP parameters, payloads, responses and errors are in the [production API reference](./api-reference.md).
|
|
532
533
|
|
|
533
534
|
| SDK method | HTTP operation | Resolves to |
|
|
534
535
|
| --- | --- | --- |
|
|
@@ -866,7 +867,6 @@ Push reads/writes return all eight booleans. Update accepts a non-empty partial
|
|
|
866
867
|
| `changePassword({ email, password, new_password })` | [`PUT /authentication/change-password`](./api-reference.md#change-password) | `{ email }` |
|
|
867
868
|
| `requestPasswordReset(email)` | [`PUT /authentication/request-password-reset`](./api-reference.md#request-password-reset) | `{ email }` |
|
|
868
869
|
| `resetPassword({ email, token?, new_password })` | [`PUT /authentication/reset-password`](./api-reference.md#reset-password) | `{ email }` |
|
|
869
|
-
| `createApiKey(password)` | [`POST /users/api-keys`](./api-reference.md#create-api-key) | `IApiKeyResponse` |
|
|
870
870
|
| `getApiKey()` | [`GET /users/api-keys`](./api-reference.md#get-api-key) | `IMaskedApiKeyResponse`; 404 means no key |
|
|
871
871
|
| `deleteApiKey()` | [`DELETE /users/api-keys`](./api-reference.md#delete-api-key) | `IEmptyResult` (`unknown[]`) |
|
|
872
872
|
| `verifyMfa({ mfa_token, code })` | [`POST /authentication/mfa/verify`](./api-reference.md#complete-a-two-factor-login) | `IMfaVerifyPayload` → `ILoginResponse` |
|
|
@@ -1075,7 +1075,7 @@ Verify the raw bytes before parsing; re-serialized JSON does not match. The enve
|
|
|
1075
1075
|
|
|
1076
1076
|
## Contract boundaries
|
|
1077
1077
|
|
|
1078
|
-
- Production OpenAPI publishes
|
|
1079
|
-
- Certificate start/complete are deployed production extensions, exposed by `startCertificate` and `completeCertificate` with the signing application's payloads. They supplement the
|
|
1078
|
+
- Production OpenAPI publishes 158 operations. Personal API-key creation is intentionally absent from the SDK; masked lookup and revocation remain available.
|
|
1079
|
+
- Certificate start/complete are deployed production extensions, exposed by `startCertificate` and `completeCertificate` with the signing application's payloads. They supplement the 158 OpenAPI operations; the API manifest contains only published paths.
|
|
1080
1080
|
- The SDK retains the two template compatibility routes above. Both `sendToken` call forms send the email-only production body.
|
|
1081
1081
|
- Original signer artifacts require a signer code. Completed copies use private expiring download tokens. Older download call forms remain callable for compatibility; server authorization and lifecycle rules apply.
|