@assinafy/cli 2.7.1 → 2.8.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.
Files changed (52) hide show
  1. package/.env.example +2 -0
  2. package/README.en.md +14 -8
  3. package/README.md +11 -3
  4. package/dist/api.cjs +517 -61
  5. package/dist/api.cjs.map +1 -1
  6. package/dist/api.js +514 -61
  7. package/dist/api.js.map +1 -1
  8. package/dist/cli.cjs +1009 -169
  9. package/dist/types/api/client.d.ts +5 -0
  10. package/dist/types/api/client.d.ts.map +1 -1
  11. package/dist/types/api/envelope-types.d.ts +73 -0
  12. package/dist/types/api/envelope-types.d.ts.map +1 -0
  13. package/dist/types/api/index.d.ts +3 -0
  14. package/dist/types/api/index.d.ts.map +1 -1
  15. package/dist/types/api/resources/assignments.d.ts.map +1 -1
  16. package/dist/types/api/resources/contracts.d.ts +3 -1
  17. package/dist/types/api/resources/contracts.d.ts.map +1 -1
  18. package/dist/types/api/resources/documents.d.ts +21 -6
  19. package/dist/types/api/resources/documents.d.ts.map +1 -1
  20. package/dist/types/api/resources/embed.d.ts +14 -0
  21. package/dist/types/api/resources/embed.d.ts.map +1 -0
  22. package/dist/types/api/resources/envelopes.d.ts +31 -0
  23. package/dist/types/api/resources/envelopes.d.ts.map +1 -0
  24. package/dist/types/api/resources/signer-documents.d.ts +23 -11
  25. package/dist/types/api/resources/signer-documents.d.ts.map +1 -1
  26. package/dist/types/api/resources/signers.d.ts +1 -1
  27. package/dist/types/api/resources/signers.d.ts.map +1 -1
  28. package/dist/types/api/resources/users.d.ts +3 -1
  29. package/dist/types/api/resources/users.d.ts.map +1 -1
  30. package/dist/types/api/resources/webhooks.d.ts +6 -2
  31. package/dist/types/api/resources/webhooks.d.ts.map +1 -1
  32. package/dist/types/api/resources/workspaces.d.ts +9 -2
  33. package/dist/types/api/resources/workspaces.d.ts.map +1 -1
  34. package/dist/types/api/types.d.ts +103 -7
  35. package/dist/types/api/types.d.ts.map +1 -1
  36. package/dist/types/api/utils.d.ts +6 -0
  37. package/dist/types/api/utils.d.ts.map +1 -1
  38. package/docs/README.md +3 -1
  39. package/docs/api-operations.json +234 -2
  40. package/docs/api-reference.md +11533 -3716
  41. package/docs/assignments.md +16 -14
  42. package/docs/contracts.md +4 -3
  43. package/docs/documents.md +44 -27
  44. package/docs/embed.md +119 -0
  45. package/docs/envelopes.md +210 -0
  46. package/docs/sdk-reference.md +215 -29
  47. package/docs/send.md +15 -11
  48. package/docs/signer.md +84 -3
  49. package/docs/users.md +41 -0
  50. package/docs/webhooks.md +22 -6
  51. package/docs/workspaces.md +66 -3
  52. package/package.json +1 -1
@@ -46,22 +46,24 @@ Usage: assinafy assignments create [options] <documentId>
46
46
  Create a signing assignment for a document
47
47
 
48
48
  Arguments:
49
- documentId Document ID
49
+ documentId Document ID
50
50
 
51
51
  Options:
52
- --signer-ids <csv> Comma-separated signer IDs (required)
53
- --signers <json> JSON array of signer refs, with verification_method,
54
- step, … (required)
55
- --method <method> virtual or collect (choices: "virtual", "collect",
56
- default: "virtual")
57
- --message <message> Message shown to signers
58
- --expires-at <iso8601> Expiration timestamp
59
- --copy-receivers <csv> Comma-separated signer IDs to receive a copy of the
60
- document
61
- --entries <json> JSON array of field placement entries, required for
62
- --method collect (e.g.
63
- '[{"page_id":"p1","fields":[{"signer_id":"s1","field_id":"f1"}]}]')
64
- -h, --help display help for command
52
+ --signer-ids <csv> Comma-separated signer IDs (required)
53
+ --signers <json> JSON array of signer refs, with
54
+ verification_method, step, … (required)
55
+ --method <method> virtual or collect (choices: "virtual",
56
+ "collect", default: "virtual")
57
+ --message <message> Message shown to signers
58
+ --max-total-credits <amount> Reject the send if its credit cost exceeds this
59
+ amount
60
+ --expires-at <iso8601> Expiration timestamp
61
+ --copy-receivers <csv> Comma-separated signer IDs to receive a copy of
62
+ the document
63
+ --entries <json> JSON array of field placement entries, required
64
+ for --method collect (e.g.
65
+ '[{"page_id":"p1","fields":[{"signer_id":"s1","field_id":"f1"}]}]')
66
+ -h, --help display help for command
65
67
  ```
66
68
 
67
69
  ### `assinafy assignments estimate-cost`
package/docs/contracts.md CHANGED
@@ -16,7 +16,7 @@ Commands:
16
16
  amendment link
17
17
  set [options] <documentId> Set terms or link an amendment; null clears,
18
18
  omitted fields stay unchanged
19
- related <documentId> Read the root contract and every linked
19
+ related [options] <documentId> Read the root contract and every linked
20
20
  instrument
21
21
  renew [options] <documentId> Start the next term using the current term
22
22
  or a later end_date
@@ -89,10 +89,11 @@ Usage: assinafy contracts related [options] <documentId>
89
89
  Read the root contract and every linked instrument
90
90
 
91
91
  Arguments:
92
- documentId Contract or amendment document ID
92
+ documentId Contract or amendment document ID
93
93
 
94
94
  Options:
95
- -h, --help display help for command
95
+ --expand <relation> Include document details (choices: "document")
96
+ -h, --help display help for command
96
97
  ```
97
98
 
98
99
  ### `assinafy contracts renew`
package/docs/documents.md CHANGED
@@ -14,7 +14,7 @@ Commands:
14
14
  upload [options] <file> Upload a PDF to the workspace
15
15
  list [options] List workspace documents
16
16
  search [options] [query] Lightweight document search (type-ahead)
17
- get <id> Show details for a document
17
+ get [options] <id> Show details for a document
18
18
  rename <id> <name> Rename a document (only before the signature process starts)
19
19
  download [options] <id> Download a document artifact
20
20
  thumbnail [options] <id> Download the document thumbnail (JPEG)
@@ -65,6 +65,7 @@ Options:
65
65
  --method <method> Filter by signature method (virtual or collect) (choices:
66
66
  "virtual", "collect")
67
67
  --tags <ids> Comma-separated tag IDs (AND semantics)
68
+ --envelope <id> Filter by envelope ID
68
69
  --page <n> Page number to fetch
69
70
  --per-page <n> Items per page
70
71
  --search <query> Filter by a search query
@@ -84,6 +85,7 @@ Arguments:
84
85
 
85
86
  Options:
86
87
  --status <status> Filter by document status
88
+ --envelope <id> Filter by envelope ID
87
89
  --page <n> Page number to fetch
88
90
  --per-page <n> Items per page
89
91
  --search <query> Filter by a search query
@@ -99,10 +101,14 @@ Usage: assinafy documents get [options] <id>
99
101
  Show details for a document
100
102
 
101
103
  Arguments:
102
- id Document ID
104
+ id Document ID
103
105
 
104
106
  Options:
105
- -h, --help display help for command
107
+ --access-code <code> Read as a signer instead of the owner (env:
108
+ ASSINAFY_SIGNER_ACCESS_CODE)
109
+ --expand <relation> Include envelope details (choices: "envelope",
110
+ "envelope_id", "envelope,envelope_id")
111
+ -h, --help display help for command
106
112
  ```
107
113
 
108
114
  ### `assinafy documents rename`
@@ -128,14 +134,16 @@ Usage: assinafy documents download [options] <id>
128
134
  Download a document artifact
129
135
 
130
136
  Arguments:
131
- id Document ID
137
+ id Document ID
132
138
 
133
139
  Options:
134
- --artifact <name> original | certificated | certificate-page | pades |
135
- bundle (default: "certificated")
136
- -o, --output <path> Output file path
137
- --force Overwrite the output file if it already exists
138
- -h, --help display help for command
140
+ --access-code <code> Read as a signer instead of the owner (env:
141
+ ASSINAFY_SIGNER_ACCESS_CODE)
142
+ --artifact <name> original | certificated | certificate-page | pades |
143
+ bundle (default: "certificated")
144
+ -o, --output <path> Output file path
145
+ --force Overwrite the output file if it already exists
146
+ -h, --help display help for command
139
147
  ```
140
148
 
141
149
  ### `assinafy documents thumbnail`
@@ -146,12 +154,15 @@ Usage: assinafy documents thumbnail [options] <id>
146
154
  Download the document thumbnail (JPEG)
147
155
 
148
156
  Arguments:
149
- id Document ID
157
+ id Document ID
150
158
 
151
159
  Options:
152
- -o, --output <path> Output file path
153
- --force Overwrite the output file if it already exists
154
- -h, --help display help for command
160
+ --artifact <name> Use the signed PDF (choices: "certificated")
161
+ --access-code <code> Read as a signer instead of the owner (env:
162
+ ASSINAFY_SIGNER_ACCESS_CODE)
163
+ -o, --output <path> Output file path
164
+ --force Overwrite the output file if it already exists
165
+ -h, --help display help for command
155
166
  ```
156
167
 
157
168
  ### `assinafy documents download-page`
@@ -162,13 +173,16 @@ Usage: assinafy documents download-page [options] <id> <pageId>
162
173
  Download a single document page (JPEG)
163
174
 
164
175
  Arguments:
165
- id Document ID
166
- pageId Page ID
176
+ id Document ID
177
+ pageId Page ID
167
178
 
168
179
  Options:
169
- -o, --output <path> Output file path
170
- --force Overwrite the output file if it already exists
171
- -h, --help display help for command
180
+ --artifact <name> Use the signed PDF (choices: "certificated")
181
+ --access-code <code> Read as a signer instead of the owner (env:
182
+ ASSINAFY_SIGNER_ACCESS_CODE)
183
+ -o, --output <path> Output file path
184
+ --force Overwrite the output file if it already exists
185
+ -h, --help display help for command
172
186
  ```
173
187
 
174
188
  ### `assinafy documents activities`
@@ -270,17 +284,20 @@ Usage: assinafy documents create-from-template [options] <templateId>
270
284
  Create a document from a template
271
285
 
272
286
  Arguments:
273
- templateId Template ID
287
+ templateId Template ID
274
288
 
275
289
  Options:
276
- --signers <json> JSON array of signers, e.g.
277
- '[{"role_id":"r","id":"s","verification_method":"Email","notification_methods":["Email"]}]'
278
- --name <name> Document name
279
- --message <message> Message shown to signers
280
- --expires-at <iso8601> Expiration timestamp
281
- --tags <names> Comma-separated tag names to attach
282
- --editor-fields <json> JSON array of editor field placements
283
- -h, --help display help for command
290
+ --idempotency-key <key> Creation key for recovering a lost response
291
+ --max-total-credits <amount> Reject creation if its credit cost exceeds this
292
+ amount
293
+ --signers <json> JSON array of signers, e.g.
294
+ '[{"role_id":"r","id":"s","verification_method":"Email","notification_methods":["Email"]}]'
295
+ --name <name> Document name
296
+ --message <message> Message shown to signers
297
+ --expires-at <iso8601> Expiration timestamp
298
+ --tags <names> Comma-separated tag names to attach
299
+ --editor-fields <json> JSON array of editor field placements
300
+ -h, --help display help for command
284
301
  ```
285
302
 
286
303
  ### `assinafy documents estimate-template-cost`
package/docs/embed.md ADDED
@@ -0,0 +1,119 @@
1
+ # `assinafy embed`
2
+
3
+ ## `assinafy embed`
4
+
5
+ ```text
6
+ Usage: assinafy embed [options] [command]
7
+
8
+ Embedded signing origins and sessions
9
+
10
+ Options:
11
+ -h, --help display help for command
12
+
13
+ Commands:
14
+ origins Manage origins allowed to embed signing pages
15
+ session <documentId> <assignmentId> <signerId> Mint a private iframe URL valid for five minutes
16
+ exchange [options] Consume a session token (Assinafy embed page operation)
17
+ help [command] display help for command
18
+ ```
19
+
20
+ ### `assinafy embed origins`
21
+
22
+ ```text
23
+ Usage: assinafy embed origins [options] [command]
24
+
25
+ Manage origins allowed to embed signing pages
26
+
27
+ Options:
28
+ -h, --help display help for command
29
+
30
+ Commands:
31
+ list List allowed origins
32
+ create [options] Allow an exact origin
33
+ update [options] <originId> Replace an allowed origin
34
+ delete [options] <originId> Remove an allowed origin
35
+ help [command] display help for command
36
+ ```
37
+
38
+ #### `assinafy embed origins list`
39
+
40
+ ```text
41
+ Usage: assinafy embed origins list [options]
42
+
43
+ List allowed origins
44
+
45
+ Options:
46
+ -h, --help display help for command
47
+ ```
48
+
49
+ #### `assinafy embed origins create`
50
+
51
+ ```text
52
+ Usage: assinafy embed origins create [options]
53
+
54
+ Allow an exact origin
55
+
56
+ Options:
57
+ --origin <url> HTTPS origin (HTTP allowed for localhost/127.0.0.1)
58
+ -h, --help display help for command
59
+ ```
60
+
61
+ #### `assinafy embed origins update`
62
+
63
+ ```text
64
+ Usage: assinafy embed origins update [options] <originId>
65
+
66
+ Replace an allowed origin
67
+
68
+ Arguments:
69
+ originId Origin ID
70
+
71
+ Options:
72
+ --origin <url> New exact origin
73
+ -h, --help display help for command
74
+ ```
75
+
76
+ #### `assinafy embed origins delete`
77
+
78
+ ```text
79
+ Usage: assinafy embed origins delete [options] <originId>
80
+
81
+ Remove an allowed origin
82
+
83
+ Arguments:
84
+ originId Origin ID
85
+
86
+ Options:
87
+ -y, --yes Skip confirmation
88
+ -h, --help display help for command
89
+ ```
90
+
91
+ ### `assinafy embed session`
92
+
93
+ ```text
94
+ Usage: assinafy embed session [options] <documentId> <assignmentId> <signerId>
95
+
96
+ Mint a private iframe URL valid for five minutes
97
+
98
+ Arguments:
99
+ documentId Document ID
100
+ assignmentId Assignment ID
101
+ signerId Signer ID
102
+
103
+ Options:
104
+ -h, --help display help for command
105
+ ```
106
+
107
+ ### `assinafy embed exchange`
108
+
109
+ ```text
110
+ Usage: assinafy embed exchange [options]
111
+
112
+ Consume a session token (Assinafy embed page operation)
113
+
114
+ Options:
115
+ --session-token <token> Private session token (env:
116
+ ASSINAFY_EMBED_SESSION_TOKEN)
117
+ --parent-origin <url> Origin hosting the iframe
118
+ -h, --help display help for command
119
+ ```
@@ -0,0 +1,210 @@
1
+ # `assinafy envelopes`
2
+
3
+ ## `assinafy envelopes`
4
+
5
+ ```text
6
+ Usage: assinafy envelopes [options] [command]
7
+
8
+ Send and manage groups of documents
9
+
10
+ Options:
11
+ -h, --help display help for command
12
+
13
+ Commands:
14
+ list [options] List workspace envelopes
15
+ create [options] Create an envelope and send invitations
16
+ estimate-cost [options] Estimate without sending or charging
17
+ get <envelopeId> Read an envelope and its documents
18
+ update [options] <envelopeId> Rename, change message, or reorder documents
19
+ cancel [options] <envelopeId> Cancel open documents and notify recipients
20
+ delete [options] <envelopeId> Delete a closed envelope, keeping its documents
21
+ activities [options] <envelopeId> Read a page of document activities
22
+ download [options] <envelopeId> Download a ZIP of document artifacts
23
+ resend <envelopeId> <signerId> Resend one signer’s envelope invitation; paid channels cost credits
24
+ add-document [options] <envelopeId> Add a processed document and notify its envelope signers
25
+ remove-document [options] <envelopeId> <documentId> Cancel and remove an open document, notifying its recipients
26
+ help [command] display help for command
27
+ ```
28
+
29
+ ### `assinafy envelopes list`
30
+
31
+ ```text
32
+ Usage: assinafy envelopes list [options]
33
+
34
+ List workspace envelopes
35
+
36
+ Options:
37
+ --page <n> Page number to fetch
38
+ --per-page <n> Items per page
39
+ --search <text> Part of the envelope name
40
+ --status <status> Document lifecycle group (choices: "open", "closed")
41
+ -h, --help display help for command
42
+ ```
43
+
44
+ ### `assinafy envelopes create`
45
+
46
+ ```text
47
+ Usage: assinafy envelopes create [options]
48
+
49
+ Create an envelope and send invitations
50
+
51
+ Options:
52
+ --data <json> Envelope JSON: name, signers, documents, optional
53
+ max_total_credits
54
+ --idempotency-key <key> Creation key for recovering a lost response
55
+ -h, --help display help for command
56
+ ```
57
+
58
+ ### `assinafy envelopes estimate-cost`
59
+
60
+ ```text
61
+ Usage: assinafy envelopes estimate-cost [options]
62
+
63
+ Estimate without sending or charging
64
+
65
+ Options:
66
+ --data <json> Envelope JSON: name, signers, documents, optional
67
+ max_total_credits
68
+ -h, --help display help for command
69
+ ```
70
+
71
+ ### `assinafy envelopes get`
72
+
73
+ ```text
74
+ Usage: assinafy envelopes get [options] <envelopeId>
75
+
76
+ Read an envelope and its documents
77
+
78
+ Arguments:
79
+ envelopeId Envelope ID
80
+
81
+ Options:
82
+ -h, --help display help for command
83
+ ```
84
+
85
+ ### `assinafy envelopes update`
86
+
87
+ ```text
88
+ Usage: assinafy envelopes update [options] <envelopeId>
89
+
90
+ Rename, change message, or reorder documents
91
+
92
+ Arguments:
93
+ envelopeId Envelope ID
94
+
95
+ Options:
96
+ --data <json> Partial JSON: name, message (null clears), document_ids
97
+ -h, --help display help for command
98
+ ```
99
+
100
+ ### `assinafy envelopes cancel`
101
+
102
+ ```text
103
+ Usage: assinafy envelopes cancel [options] <envelopeId>
104
+
105
+ Cancel open documents and notify recipients
106
+
107
+ Arguments:
108
+ envelopeId Envelope ID
109
+
110
+ Options:
111
+ -y, --yes Skip confirmation
112
+ -h, --help display help for command
113
+ ```
114
+
115
+ ### `assinafy envelopes delete`
116
+
117
+ ```text
118
+ Usage: assinafy envelopes delete [options] <envelopeId>
119
+
120
+ Delete a closed envelope, keeping its documents
121
+
122
+ Arguments:
123
+ envelopeId Envelope ID
124
+
125
+ Options:
126
+ -y, --yes Skip confirmation
127
+ -h, --help display help for command
128
+ ```
129
+
130
+ ### `assinafy envelopes activities`
131
+
132
+ ```text
133
+ Usage: assinafy envelopes activities [options] <envelopeId>
134
+
135
+ Read a page of document activities
136
+
137
+ Arguments:
138
+ envelopeId Envelope ID
139
+
140
+ Options:
141
+ --page <n> Page number to fetch
142
+ --per-page <n> Items per page
143
+ --sort <field> id or -id
144
+ -h, --help display help for command
145
+ ```
146
+
147
+ ### `assinafy envelopes download`
148
+
149
+ ```text
150
+ Usage: assinafy envelopes download [options] <envelopeId>
151
+
152
+ Download a ZIP of document artifacts
153
+
154
+ Arguments:
155
+ envelopeId Envelope ID
156
+
157
+ Options:
158
+ -o, --output <path> Output file path
159
+ --force Overwrite the output file if it already exists
160
+ --artifact <name> original, certificated, certificate-page, pades, bundle
161
+ (default: "certificated")
162
+ -h, --help display help for command
163
+ ```
164
+
165
+ ### `assinafy envelopes resend`
166
+
167
+ ```text
168
+ Usage: assinafy envelopes resend [options] <envelopeId> <signerId>
169
+
170
+ Resend one signer’s envelope invitation; paid channels cost credits
171
+
172
+ Arguments:
173
+ envelopeId Envelope ID
174
+ signerId Signer ID
175
+
176
+ Options:
177
+ -h, --help display help for command
178
+ ```
179
+
180
+ ### `assinafy envelopes add-document`
181
+
182
+ ```text
183
+ Usage: assinafy envelopes add-document [options] <envelopeId>
184
+
185
+ Add a processed document and notify its envelope signers
186
+
187
+ Arguments:
188
+ envelopeId Envelope ID
189
+
190
+ Options:
191
+ --data <json> JSON: id, signer_ids, optional method, entries, expires_at,
192
+ copy_receiver_ids, max_total_credits
193
+ -h, --help display help for command
194
+ ```
195
+
196
+ ### `assinafy envelopes remove-document`
197
+
198
+ ```text
199
+ Usage: assinafy envelopes remove-document [options] <envelopeId> <documentId>
200
+
201
+ Cancel and remove an open document, notifying its recipients
202
+
203
+ Arguments:
204
+ envelopeId Envelope ID
205
+ documentId Document ID
206
+
207
+ Options:
208
+ -y, --yes Skip confirmation
209
+ -h, --help display help for command
210
+ ```