@assinafy/cli 2.8.0 → 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 +70 -67
- package/README.md +28 -24
- package/THIRD_PARTY_NOTICES.md +9 -9
- package/dist/api.cjs +204 -55
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +202 -55
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +1413 -559
- package/dist/types/api/client.d.ts +2 -0
- package/dist/types/api/client.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/resources/assignments.d.ts +7 -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 +7 -1
- package/dist/types/api/resources/documents.d.ts.map +1 -1
- package/dist/types/api/resources/envelopes.d.ts +7 -1
- package/dist/types/api/resources/envelopes.d.ts.map +1 -1
- package/dist/types/api/resources/scheduled-sends.d.ts +11 -0
- package/dist/types/api/resources/scheduled-sends.d.ts.map +1 -0
- package/dist/types/api/types.d.ts +36 -2
- package/dist/types/api/types.d.ts.map +1 -1
- package/dist/types/api/utils.d.ts +3 -0
- package/dist/types/api/utils.d.ts.map +1 -1
- package/docs/README.md +3 -1
- package/docs/api-operations-staging.json +1262 -0
- package/docs/api-operations.json +89 -1
- package/docs/api-reference-staging.md +18466 -0
- package/docs/api-reference.md +1830 -323
- package/docs/assignments.md +46 -0
- package/docs/auth.md +3 -16
- package/docs/documents.md +47 -0
- package/docs/envelopes.md +29 -0
- package/docs/scheduled-sends.md +63 -0
- package/docs/sdk-reference.md +66 -4
- package/install.ps1 +1 -1
- package/install.sh +1 -1
- package/package.json +4 -4
package/README.en.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @assinafy/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
_[Leia em português](README.md) · English_
|
|
4
4
|
|
|
5
5
|
The official command-line interface and Node.js SDK for the [Assinafy API](https://api.assinafy.com.br/v1/docs), a Brazilian digital-signature platform. Upload PDFs, manage signers, request signatures, track activity history, and download certified documents — from a terminal, a shell script, or an application.
|
|
6
6
|
|
|
7
|
-
The CLI is a single self-contained executable. It prints human-readable tables by default and structured JSON with `--json`, so the same commands serve both interactive use and automation. The same package exposes a fully typed SDK at `@assinafy/cli/api
|
|
7
|
+
The CLI is a single self-contained executable. It prints human-readable tables by default and structured JSON with `--json`, so the same commands serve both interactive use and automation. The same package exposes a fully typed SDK at `@assinafy/cli/api`; the HTTP reference covers all 158 published production operations.
|
|
8
8
|
|
|
9
9
|
This document reads top to bottom: install, authenticate, send your first signature request, then understand the model well enough to automate it. The [command reference](#command-reference) and [SDK](#nodejs-sdk) sections near the end are lookup tables you can jump to once the flow makes sense.
|
|
10
10
|
|
|
@@ -80,17 +80,17 @@ npx @assinafy/cli whoami
|
|
|
80
80
|
|
|
81
81
|
Use an API key for direct owner integrations, OAuth for customer-consented marketplace connections, or a user JWT for user-session operations.
|
|
82
82
|
|
|
83
|
-
| Credential
|
|
84
|
-
|
|
|
85
|
-
| API key
|
|
83
|
+
| Credential | Header sent | Use it for |
|
|
84
|
+
| ------------------ | ------------------------------- | --------------------------------------------------------------------- |
|
|
85
|
+
| API key | `X-Api-Key: <key>` | Direct owner integrations and permitted account operations. |
|
|
86
86
|
| OAuth access token | `Authorization: Bearer <token>` | Marketplace connections, limited to granted scopes and one workspace. |
|
|
87
|
-
| User JWT
|
|
87
|
+
| User JWT | `Authorization: Bearer <jwt>` | User sessions and permitted account operations. |
|
|
88
88
|
|
|
89
|
-
Generate an API key from the Assinafy dashboard
|
|
89
|
+
Generate an API key from the Assinafy dashboard. The CLI can inspect or revoke an existing key with a permitted user session:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
assinafy auth login
|
|
93
|
-
assinafy auth api-keys
|
|
92
|
+
assinafy auth login user@example.com # returns a JWT
|
|
93
|
+
assinafy auth api-keys get --token <jwt> # shows the masked key
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
When two-factor authentication is enabled, `auth login` asks for an authenticator or recovery code (or reads `--mfa-code` / `ASSINAFY_MFA_CODE`); the challenge is single-use and expires after 5 minutes. `auth mfa enroll`, `confirm`, `list`, `recovery-codes`, and `remove` manage the authenticator and recovery codes.
|
|
@@ -350,7 +350,7 @@ import { WebhookVerifier } from '@assinafy/cli/api';
|
|
|
350
350
|
const verifier = new WebhookVerifier(process.env.ASSINAFY_WEBHOOK_SECRET);
|
|
351
351
|
// rawBody: the Buffer exactly as received; headers: the request headers
|
|
352
352
|
if (!verifier.verifyDelivery(rawBody, headers)) {
|
|
353
|
-
|
|
353
|
+
// answer 401 and drop the delivery
|
|
354
354
|
}
|
|
355
355
|
const event = verifier.extractEvent(rawBody);
|
|
356
356
|
```
|
|
@@ -384,12 +384,12 @@ JSON errors carry a stable shape:
|
|
|
384
384
|
|
|
385
385
|
```json
|
|
386
386
|
{
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
387
|
+
"error": {
|
|
388
|
+
"message": "Saldo insuficiente. (document doc_abc123 exists; 2 signer(s) created or reused)",
|
|
389
|
+
"code": "api_error",
|
|
390
|
+
"statusCode": 402,
|
|
391
|
+
"details": { "documentId": "doc_abc123", "signerIds": ["sig_1", "sig_2"] }
|
|
392
|
+
}
|
|
393
393
|
}
|
|
394
394
|
```
|
|
395
395
|
|
|
@@ -403,19 +403,19 @@ Every setting resolves as **CLI flag → environment variable → config-file pr
|
|
|
403
403
|
|
|
404
404
|
Empty optional settings are ignored, including `.env.example` defaults. Configurations with invalid profile field types are ignored for reads and rejected by mutations.
|
|
405
405
|
|
|
406
|
-
| What
|
|
407
|
-
|
|
|
408
|
-
| API key (sent as `X-Api-Key`)
|
|
409
|
-
| OAuth access token or user JWT (sent as `Bearer`) | `--token`
|
|
410
|
-
| Default account / workspace ID
|
|
411
|
-
| API base URL
|
|
412
|
-
| Config profile
|
|
413
|
-
| Config directory
|
|
414
|
-
| Webhook endpoint signing secret (`whsec_`)
|
|
415
|
-
| Password / new password
|
|
416
|
-
| Social provider / reset token
|
|
417
|
-
| Signer access code / email or WhatsApp OTP
|
|
418
|
-
| Web PKI operation token
|
|
406
|
+
| What | Flag | Environment variable |
|
|
407
|
+
| ------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------ |
|
|
408
|
+
| API key (sent as `X-Api-Key`) | `--api-key` | `ASSINAFY_API_KEY` |
|
|
409
|
+
| OAuth access token or user JWT (sent as `Bearer`) | `--token` | `ASSINAFY_TOKEN` |
|
|
410
|
+
| Default account / workspace ID | `--account-id` | `ASSINAFY_ACCOUNT_ID` |
|
|
411
|
+
| API base URL | `--base-url` | `ASSINAFY_BASE_URL` |
|
|
412
|
+
| Config profile | `-p, --profile` | `ASSINAFY_PROFILE` |
|
|
413
|
+
| Config directory | — | `ASSINAFY_CONFIG_DIR` |
|
|
414
|
+
| Webhook endpoint signing secret (`whsec_`) | _(config only)_ | `ASSINAFY_WEBHOOK_SECRET` |
|
|
415
|
+
| Password / new password | `--password` / `--new-password` | `ASSINAFY_PASSWORD` / `ASSINAFY_NEW_PASSWORD` |
|
|
416
|
+
| Social provider / reset token | `--provider-token` / `--reset-token` | `ASSINAFY_PROVIDER_TOKEN` / `ASSINAFY_RESET_TOKEN` |
|
|
417
|
+
| Signer access code / email or WhatsApp OTP | `--access-code` / `--code` | `ASSINAFY_SIGNER_ACCESS_CODE` / `ASSINAFY_VERIFICATION_CODE` |
|
|
418
|
+
| Web PKI operation token | `--certificate-token` | `ASSINAFY_CERTIFICATE_TOKEN` |
|
|
419
419
|
|
|
420
420
|
`.env.example` documents every CLI and installer environment variable.
|
|
421
421
|
|
|
@@ -450,7 +450,7 @@ Assinafy runs a **separate sandbox** at `https://sandbox.assinafy.com.br/v1`. It
|
|
|
450
450
|
|
|
451
451
|
## Command reference
|
|
452
452
|
|
|
453
|
-
Run `assinafy <command> --help` for the full flags of any command. Every command's help output is mirrored under [`docs/`](./docs), the [API reference](./docs/api-reference.md) holds the official request/response payloads for all
|
|
453
|
+
Run `assinafy <command> --help` for the full flags of any command. Every command's help output is mirrored under [`docs/`](./docs), the [API reference](./docs/api-reference.md) holds the official request/response payloads for all 158 published operations, and the [SDK reference](./docs/sdk-reference.md) maps each SDK method to its operation.
|
|
454
454
|
|
|
455
455
|
Global flags accepted by every command: `--api-key`, `--token`, `--account-id`, `--base-url`, `-p, --profile`, `--json`, `-q, --quiet`. `assinafy -v` prints the version.
|
|
456
456
|
|
|
@@ -469,30 +469,31 @@ assinafy send contract.pdf \
|
|
|
469
469
|
|
|
470
470
|
### `documents`
|
|
471
471
|
|
|
472
|
-
| Command
|
|
473
|
-
|
|
|
474
|
-
| `documents upload <file> [--name] [--metadata] [--wait]`
|
|
475
|
-
| `documents list [--status] [--method] [--tags] [--page] [--per-page] [--search] [--sort]` | List documents
|
|
476
|
-
| `documents search [query] [--status] [--page] [--per-page] [--sort]`
|
|
477
|
-
| `documents get <id>`
|
|
478
|
-
| `documents rename <id> <name>`
|
|
479
|
-
| `documents download <id> [--artifact] [-o] [--force]`
|
|
480
|
-
| `documents thumbnail <id> [-o] [--force]`
|
|
481
|
-
| `documents download-page <id> <pageId> [-o] [--force]`
|
|
482
|
-
| `documents activities <id>`
|
|
483
|
-
| `documents
|
|
484
|
-
| `documents
|
|
485
|
-
| `documents tags
|
|
486
|
-
| `documents tags-
|
|
487
|
-
| `documents tags-
|
|
488
|
-
| `documents
|
|
489
|
-
| `documents
|
|
490
|
-
| `documents
|
|
491
|
-
| `documents
|
|
492
|
-
| `documents
|
|
493
|
-
| `documents
|
|
494
|
-
| `documents
|
|
495
|
-
| `documents
|
|
472
|
+
| Command | Description |
|
|
473
|
+
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
474
|
+
| `documents upload <file> [--name] [--metadata] [--wait]` | Upload a PDF (max 25 MiB) |
|
|
475
|
+
| `documents list [--status] [--method] [--tags] [--page] [--per-page] [--search] [--sort]` | List documents |
|
|
476
|
+
| `documents search [query] [--status] [--page] [--per-page] [--sort]` | Lightweight type-ahead search |
|
|
477
|
+
| `documents get <id>` | Show document details |
|
|
478
|
+
| `documents rename <id> <name>` | Rename a document (before signing starts) |
|
|
479
|
+
| `documents download <id> [--artifact] [-o] [--force]` | Download an artifact (`original`/`certificated`/`certificate-page`/`pades` PDFs, or `bundle` ZIP) |
|
|
480
|
+
| `documents thumbnail <id> [-o] [--force]` | Download the thumbnail (JPEG) |
|
|
481
|
+
| `documents download-page <id> <pageId> [-o] [--force]` | Download one page (JPEG) |
|
|
482
|
+
| `documents activities <id>` | Activity log |
|
|
483
|
+
| `documents cancel <id> [-y]` | Cancel an open document and retain its files and history |
|
|
484
|
+
| `documents delete <id> [-y]` | Delete a document |
|
|
485
|
+
| `documents tags <id>` | List attached tags |
|
|
486
|
+
| `documents tags-set <id> [tags...]` | Replace the tag set by name (none detaches all) |
|
|
487
|
+
| `documents tags-add <id> <tags...>` | Attach tags by name |
|
|
488
|
+
| `documents tags-remove <id> <tagId>` | Detach one tag |
|
|
489
|
+
| `documents create-from-template <templateId> --signers <json> [...]` | Create from a template |
|
|
490
|
+
| `documents estimate-template-cost <templateId> --signers <json>` | Estimate template cost |
|
|
491
|
+
| `documents verify <hash>` | Verify by signature hash (public) |
|
|
492
|
+
| `documents statuses` | List every document status and whether it is deletable |
|
|
493
|
+
| `documents public <id>` | Public unauthenticated lookup |
|
|
494
|
+
| `documents send-token <id> --recipient <email>` | Email a one-time access token to a pending signer (email channel only) |
|
|
495
|
+
| `documents progress <id>` | Signing progress |
|
|
496
|
+
| `documents wait <id> [--timeout] [--interval]` | Poll until ready, failed, or timed out |
|
|
496
497
|
|
|
497
498
|
### `signers`
|
|
498
499
|
|
|
@@ -559,7 +560,7 @@ Field definitions are what `--method collect` assignments gather. Run `fields ty
|
|
|
559
560
|
|
|
560
561
|
### `auth`
|
|
561
562
|
|
|
562
|
-
`login <email> [--mfa-code]` · `social-login` · `link-social-login` · `change-password` · `request-password-reset <email>` · `reset-password --reset-token` · `api-keys
|
|
563
|
+
`login <email> [--mfa-code]` · `social-login` · `link-social-login` · `change-password` · `request-password-reset <email>` · `reset-password --reset-token` · `api-keys get|delete` · `mfa verify --mfa-token [--mfa-code]` · `mfa list` · `mfa enroll [--label]` · `mfa confirm <methodId> [--code] [--password|--reauth-code]` · `mfa recovery-codes [--password|--mfa-code]` · `mfa remove <methodId> [--password|--mfa-code] [-y]`
|
|
563
564
|
|
|
564
565
|
For server-to-server use, prefer an API key (`assinafy login` or `--api-key`) and skip this group. `auth login`, `auth mfa verify`, `auth social-login`, `auth request-password-reset`, and `auth reset-password` run without stored credentials; the rest accept the API key or JWT documented for their endpoint.
|
|
565
566
|
|
|
@@ -581,15 +582,15 @@ The same package ships a typed SDK. It covers every published operation, unwraps
|
|
|
581
582
|
import { AssinafyClient, ApiError, PartialWorkflowError } from '@assinafy/cli/api';
|
|
582
583
|
|
|
583
584
|
const client = AssinafyClient.create(
|
|
584
|
-
|
|
585
|
-
|
|
585
|
+
process.env.ASSINAFY_API_KEY!,
|
|
586
|
+
process.env.ASSINAFY_ACCOUNT_ID!,
|
|
586
587
|
);
|
|
587
588
|
|
|
588
589
|
const { data, meta } = await client.documents.list({ status: 'pending_signature' });
|
|
589
590
|
|
|
590
591
|
const document = await client.documents.upload(
|
|
591
|
-
|
|
592
|
-
|
|
592
|
+
{ filePath: './contract.pdf' },
|
|
593
|
+
{ name: 'Service agreement', metadata: { external_id: 'order-123' } },
|
|
593
594
|
);
|
|
594
595
|
await client.documents.waitUntilReady(document.id);
|
|
595
596
|
```
|
|
@@ -600,13 +601,13 @@ Errors are typed: `ValidationError` for local input, `ApiError` (with `statusCod
|
|
|
600
601
|
|
|
601
602
|
```ts
|
|
602
603
|
try {
|
|
603
|
-
|
|
604
|
+
await client.uploadAndRequestSignatures({ source: { filePath: './contract.pdf' }, signers });
|
|
604
605
|
} catch (error) {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
606
|
+
if (error instanceof PartialWorkflowError) {
|
|
607
|
+
console.error({ documentId: error.documentId, signerIds: error.signerIds });
|
|
608
|
+
// Inspect the document before resuming; signer IDs can belong to reused records.
|
|
609
|
+
}
|
|
610
|
+
throw error;
|
|
610
611
|
}
|
|
611
612
|
```
|
|
612
613
|
|
|
@@ -653,9 +654,9 @@ The [release runbook](./docs/releasing.md) covers tags, trusted publishing, and
|
|
|
653
654
|
|
|
654
655
|
## Contract boundaries
|
|
655
656
|
|
|
656
|
-
- The production OpenAPI publishes
|
|
657
|
+
- The production OpenAPI publishes 158 operations. The SDK intentionally omits personal API-key creation; create keys in the Assinafy dashboard. Masked lookup and revocation remain available.
|
|
657
658
|
- The SDK keeps two platform-compatible template routes (`GET /accounts/{id}/templates/{id}` and its page download) that are absent from the published OpenAPI paths.
|
|
658
|
-
- Certificate start/complete are deployed production extensions of the public signing frontend, exposed as `signerDocuments.startCertificate(accessCode)` and `signerDocuments.completeCertificate(accessCode, token)`. Start posts `{ "signer-access-code": code }` and returns `{ token }`; complete posts `{ "signer-access-code": code, token }` and returns `{ signerName }`. Both also carry the access code in the query string and strip owner credentials. They supplement, but are not part of, the
|
|
659
|
+
- Certificate start/complete are deployed production extensions of the public signing frontend, exposed as `signerDocuments.startCertificate(accessCode)` and `signerDocuments.completeCertificate(accessCode, token)`. Start posts `{ "signer-access-code": code }` and returns `{ token }`; complete posts `{ "signer-access-code": code, token }` and returns `{ signerName }`. Both also carry the access code in the query string and strip owner credentials. They supplement, but are not part of, the 158 OpenAPI operations.
|
|
659
660
|
- `send-token` sends the email-only body `{ "channel": "email", "recipient": "..." }`; WhatsApp and the older `{ "email" }` body are rejected by the API with `400`.
|
|
660
661
|
- `signer documents` and `signer search` accept the workspace API key or token when `--access-code` is omitted.
|
|
661
662
|
- Webhook signatures follow Standard Webhooks; `WebhookVerifier.verifyDelivery` implements the published scheme. The older `verify(body, signature)` method is deprecated and does not match Assinafy deliveries.
|
|
@@ -663,3 +664,5 @@ The [release runbook](./docs/releasing.md) covers tags, trusted publishing, and
|
|
|
663
664
|
## License
|
|
664
665
|
|
|
665
666
|
MIT © Assinafy
|
|
667
|
+
|
|
668
|
+
Scheduled sends, document watchers, signer capacities, notification history and envelope reminder estimates are published production operations. See their [SDK flows](docs/sdk-reference.md#scheduled-sends-clientscheduledsends) and [HTTP contracts](docs/api-reference.md).
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @assinafy/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
_Português · [Read in English](README.en.md)_
|
|
4
4
|
|
|
5
|
-
CLI e SDK TypeScript para
|
|
5
|
+
CLI e SDK TypeScript para a [API Assinafy](https://api.assinafy.com.br/v1/docs): documentos, signatários, assinaturas, templates, contratos, envelopes, assinatura incorporada, OAuth, envios agendados e webhooks. A referência HTTP inclui as 158 operações de produção publicadas.
|
|
6
6
|
|
|
7
7
|
## Instalação
|
|
8
8
|
|
|
@@ -36,13 +36,13 @@ assinafy workspaces list --json
|
|
|
36
36
|
|
|
37
37
|
A precedência da CLI é flag → ambiente → perfil → padrão. As credenciais são escolhidas juntas no primeiro nível preenchido; a chave de API vence o token quando ambos são informados no mesmo nível.
|
|
38
38
|
|
|
39
|
-
| Valor
|
|
40
|
-
|
|
|
41
|
-
| Chave de API | `ASSINAFY_API_KEY`
|
|
42
|
-
| Bearer token | `ASSINAFY_TOKEN`
|
|
43
|
-
| Workspace
|
|
44
|
-
| URL base
|
|
45
|
-
| Perfil
|
|
39
|
+
| Valor | Variável |
|
|
40
|
+
| ------------ | --------------------- |
|
|
41
|
+
| Chave de API | `ASSINAFY_API_KEY` |
|
|
42
|
+
| Bearer token | `ASSINAFY_TOKEN` |
|
|
43
|
+
| Workspace | `ASSINAFY_ACCOUNT_ID` |
|
|
44
|
+
| URL base | `ASSINAFY_BASE_URL` |
|
|
45
|
+
| Perfil | `ASSINAFY_PROFILE` |
|
|
46
46
|
|
|
47
47
|
Produção usa `https://api.assinafy.com.br/v1`; sandbox usa `https://sandbox.assinafy.com.br/v1` e credenciais próprias. HTTPS/TLS 1.2+ é obrigatório. Consulte [.env.example](.env.example) para as demais variáveis seguras.
|
|
48
48
|
|
|
@@ -78,12 +78,12 @@ assinafy assignments create "$DOCUMENT_ID" \
|
|
|
78
78
|
|
|
79
79
|
Leia custo, saldo e bloqueios antes da escrita. A operação pode consumir créditos e enviar convites. `notification_methods: []` assume Email em produção; informe o canal para escolhê-lo explicitamente.
|
|
80
80
|
|
|
81
|
-
| Verificação
|
|
82
|
-
|
|
|
83
|
-
| `Email`
|
|
84
|
-
| `Whatsapp`
|
|
85
|
-
| `IdDocumentFaceMatchBasic` | `Email` ou `Whatsapp` | CPF, recurso biométrico, consentimento e créditos
|
|
86
|
-
| `DigitalCertificate`
|
|
81
|
+
| Verificação | Notificação válida | Requisitos adicionais |
|
|
82
|
+
| -------------------------- | --------------------- | ------------------------------------------------------------- |
|
|
83
|
+
| `Email` | `Email` | E-mail do signatário |
|
|
84
|
+
| `Whatsapp` | `Whatsapp` | Telefone e créditos |
|
|
85
|
+
| `IdDocumentFaceMatchBasic` | `Email` ou `Whatsapp` | CPF, recurso biométrico, consentimento e créditos |
|
|
86
|
+
| `DigitalCertificate` | `Email` ou `Whatsapp` | CPF/CNPJ correspondente, recurso, créditos e passo individual |
|
|
87
87
|
|
|
88
88
|
Passos explícitos são contíguos a partir de 1. Um signatário com certificado fica sozinho no passo. Assignments `collect` usam as páginas e entradas reais; `virtual` assina com `entries: []`. Os formatos completos estão em [assignments](docs/assignments.md).
|
|
89
89
|
|
|
@@ -139,17 +139,21 @@ Confirme a disponibilidade do artefato; `document_ready` significa a última ass
|
|
|
139
139
|
import { AssinafyClient } from '@assinafy/cli/api';
|
|
140
140
|
|
|
141
141
|
const client = new AssinafyClient({
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
token: process.env.ASSINAFY_TOKEN!,
|
|
143
|
+
accountId: process.env.ASSINAFY_ACCOUNT_ID!,
|
|
144
144
|
});
|
|
145
145
|
|
|
146
146
|
const result = await client.uploadAndRequestSignatures({
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
source: { filePath: './contrato.pdf' },
|
|
148
|
+
signers: [
|
|
149
|
+
{
|
|
150
|
+
name: 'Ana Lima',
|
|
151
|
+
email: 'ana@example.com',
|
|
152
|
+
verification_method: 'Email',
|
|
153
|
+
notification_methods: ['Email'],
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
waitForReady: true,
|
|
153
157
|
});
|
|
154
158
|
console.log(result.document.id, result.assignment.id, result.signer_ids);
|
|
155
159
|
```
|
|
@@ -172,7 +176,7 @@ Respostas envelopadas resolvem para `data`; listas paginadas retornam `{ data, m
|
|
|
172
176
|
|
|
173
177
|
## Referências e desenvolvimento
|
|
174
178
|
|
|
175
|
-
- [Referência HTTP](docs/api-reference.md): parâmetros e requisições/respostas de todas as
|
|
179
|
+
- [Referência HTTP](docs/api-reference.md): parâmetros e requisições/respostas de todas as 158 operações publicadas.
|
|
176
180
|
- [Referência do SDK](docs/sdk-reference.md): métodos, helpers, compatibilidade e fluxos adicionais.
|
|
177
181
|
- [Comandos](docs/README.md): documentos, signatários, assignments, signer, OAuth, auth, workspaces, usuários, templates, contratos, tags, fields, webhooks e configuração.
|
|
178
182
|
- [Segurança](SECURITY.md), [contribuição](CONTRIBUTING.md) e [releases](docs/releasing.md).
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The self-contained Assinafy CLI bundle includes the following third-party software. Each section preserves the license notice distributed by that package.
|
|
4
4
|
|
|
5
|
-
## @clack/core 1.
|
|
5
|
+
## @clack/core 1.6.0
|
|
6
6
|
|
|
7
7
|
License: MIT
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ Source: git+https://github.com/bombshell-dev/clack.git
|
|
|
18
18
|
|
|
19
19
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
20
|
|
|
21
|
-
## @clack/prompts 1.
|
|
21
|
+
## @clack/prompts 1.9.0
|
|
22
22
|
|
|
23
23
|
License: MIT
|
|
24
24
|
|
|
@@ -34,7 +34,7 @@ Source: git+https://github.com/bombshell-dev/clack.git
|
|
|
34
34
|
|
|
35
35
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
36
36
|
|
|
37
|
-
## @commander-js/extra-typings 15.
|
|
37
|
+
## @commander-js/extra-typings 15.1.0
|
|
38
38
|
|
|
39
39
|
License: MIT
|
|
40
40
|
|
|
@@ -62,7 +62,7 @@ Source: git+https://github.com/commander-js/extra-typings.git
|
|
|
62
62
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
63
63
|
SOFTWARE.
|
|
64
64
|
|
|
65
|
-
## @types/node
|
|
65
|
+
## @types/node 26.6.11
|
|
66
66
|
|
|
67
67
|
License: MIT
|
|
68
68
|
|
|
@@ -124,7 +124,7 @@ Source: git+https://github.com/alexindigo/asynckit.git
|
|
|
124
124
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
125
125
|
SOFTWARE.
|
|
126
126
|
|
|
127
|
-
## axios 1.
|
|
127
|
+
## axios 1.21.1
|
|
128
128
|
|
|
129
129
|
License: MIT
|
|
130
130
|
|
|
@@ -192,7 +192,7 @@ Source: git://github.com/felixge/node-combined-stream.git
|
|
|
192
192
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
193
193
|
THE SOFTWARE.
|
|
194
194
|
|
|
195
|
-
## commander 15.
|
|
195
|
+
## commander 15.1.0
|
|
196
196
|
|
|
197
197
|
License: MIT
|
|
198
198
|
|
|
@@ -499,7 +499,7 @@ Source: git+https://github.com/43081j/fast-wrap-ansi.git
|
|
|
499
499
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
500
500
|
SOFTWARE.
|
|
501
501
|
|
|
502
|
-
## follow-redirects 1.16.
|
|
502
|
+
## follow-redirects 1.16.3
|
|
503
503
|
|
|
504
504
|
License: MIT
|
|
505
505
|
|
|
@@ -915,7 +915,7 @@ Source: git+https://github.com/Rob--W/proxy-from-env.git
|
|
|
915
915
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
916
916
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
917
917
|
|
|
918
|
-
## sisteransi
|
|
918
|
+
## sisteransi 2.0.0
|
|
919
919
|
|
|
920
920
|
License: MIT
|
|
921
921
|
|
|
@@ -943,7 +943,7 @@ Source: https://github.com/terkelg/sisteransi
|
|
|
943
943
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
944
944
|
SOFTWARE.
|
|
945
945
|
|
|
946
|
-
## undici-types
|
|
946
|
+
## undici-types 8.9.0
|
|
947
947
|
|
|
948
948
|
License: MIT
|
|
949
949
|
|