@verdocs/js-sdk 4.2.135 → 4.2.148
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.md +3 -45
- package/dist/README.md +3 -45
- package/dist/index.d.mts +230 -25
- package/dist/index.d.ts +230 -25
- package/dist/index.js +214 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +214 -22
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +6 -6
- package/dist/tsconfig.json +1 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -458,12 +458,19 @@ type TAccessKey = IInPersonAccessKey | IInAppAccessKey | IEmailAccessKey | ISMSA
|
|
|
458
458
|
* process.
|
|
459
459
|
*/
|
|
460
460
|
interface IEnvelope {
|
|
461
|
+
/** Unique identifier for the envelope (UUID) */
|
|
461
462
|
id: string;
|
|
463
|
+
/** Current status of the envelope. Note that 'complete', 'declined', and 'canceled' are immutable/permanent end states. */
|
|
462
464
|
status: TEnvelopeStatus;
|
|
465
|
+
/** ID of the envelope's creator. */
|
|
463
466
|
profile_id: string;
|
|
467
|
+
/** ID of the template from which the envelope was created. */
|
|
464
468
|
template_id: string | null;
|
|
469
|
+
/** ID of the organization to which the envelope belongs. */
|
|
465
470
|
organization_id: string;
|
|
471
|
+
/** Name of the envelope. By defaut, inherited from the envelope's template, but may be overridden when the envelope is created. */
|
|
466
472
|
name: string;
|
|
473
|
+
/** If set to true, no email or SMS messages will be sent to any of the envelope's recipients. */
|
|
467
474
|
no_contact?: boolean;
|
|
468
475
|
/** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
|
|
469
476
|
initial_reminder: number | null;
|
|
@@ -471,8 +478,11 @@ interface IEnvelope {
|
|
|
471
478
|
followup_reminders: number | null;
|
|
472
479
|
/** When the next reminder is scheduled to be sent. */
|
|
473
480
|
next_reminder: string | null;
|
|
481
|
+
/** Date/time when the envelope was created. */
|
|
474
482
|
created_at: string;
|
|
483
|
+
/** Date/time when the envelope was created. */
|
|
475
484
|
updated_at: string;
|
|
485
|
+
/** Date/time when the envelope was canceled, or null. */
|
|
476
486
|
canceled_at: string;
|
|
477
487
|
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
478
488
|
visibility: "private" | "shared";
|
|
@@ -744,9 +754,11 @@ interface ITemplate {
|
|
|
744
754
|
*/
|
|
745
755
|
organization_id: string;
|
|
746
756
|
/**
|
|
747
|
-
* Who
|
|
757
|
+
* Who will "own" envelopes created from this template. Note that while either option is
|
|
758
|
+
* technically allowed for all visibility settings, "template_owner" only has an effect if
|
|
759
|
+
* visibility is "shared" or "public".
|
|
748
760
|
*/
|
|
749
|
-
sender:
|
|
761
|
+
sender: TTemplateSender;
|
|
750
762
|
/*
|
|
751
763
|
The user-supplied name of the template.
|
|
752
764
|
*/
|
|
@@ -898,7 +910,7 @@ interface ITemplateFieldSetting {
|
|
|
898
910
|
[key: string]: any;
|
|
899
911
|
}
|
|
900
912
|
type TRequestStatus = "OK" | "ERROR";
|
|
901
|
-
type
|
|
913
|
+
type TTemplateSender = "envelope_creator" | "template_owner";
|
|
902
914
|
type TTemplateAction = "create_personal" | "create_org" | "create_public" | "read" | "write" | "delete" | "change_visibility_personal" | "change_visibility_org" | "change_visibility_public";
|
|
903
915
|
type TRecipientAction = "submit" | "decline" | "prepare" | "update";
|
|
904
916
|
type TEnvelopeStatus = "complete" | "pending" | "in progress" | "declined" | "canceled";
|
|
@@ -1336,19 +1348,52 @@ type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelo
|
|
|
1336
1348
|
* const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};
|
|
1337
1349
|
* const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);
|
|
1338
1350
|
* ```
|
|
1351
|
+
*
|
|
1352
|
+
* @group Envelopes
|
|
1353
|
+
* @api POST /v2/envelopes Create Envelope
|
|
1354
|
+
* @apiBody string(format:uuid) template_id The template to base the new Envelope from
|
|
1355
|
+
* @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
|
|
1356
|
+
* @apiBody string name? Override the name of the envelope (defaults to the template name).
|
|
1357
|
+
* @apiBody string description? Override the description of the envelope (defaults to the template description).
|
|
1358
|
+
* @apiBody array(items:IEnvelopeField) fields? Provide default values for fields in the envelope. Note that only "name", "role_name", and "default" should be set in this array.
|
|
1359
|
+
* @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
|
|
1360
|
+
* @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
|
|
1361
|
+
* @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
|
|
1362
|
+
* @apiSuccess IEnvelope . The newly-created envelope.
|
|
1339
1363
|
*/
|
|
1340
1364
|
declare const createEnvelope: (endpoint: VerdocsEndpoint, request: TCreateEnvelopeRequest) => Promise<IEnvelope>;
|
|
1341
1365
|
/**
|
|
1342
|
-
* Get all metadata for an
|
|
1366
|
+
* Get all metadata for an envelope. Note that when called by non-creators (e.g. Recipients)
|
|
1367
|
+
* this will return only the **metadata** the caller is allowed to view.
|
|
1368
|
+
*
|
|
1369
|
+
* @group Envelopes
|
|
1370
|
+
* @api GET /v2/envelopes/:id Get Envelope Details
|
|
1371
|
+
* @apiParam string(format: 'uuid') id The ID of the envelope to retrieve.
|
|
1372
|
+
* @apiSuccess IEnvelope . The detailed metadata for the envelope requested
|
|
1343
1373
|
*/
|
|
1344
1374
|
declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<IEnvelope>;
|
|
1345
1375
|
/**
|
|
1346
|
-
* Get an
|
|
1376
|
+
* Get all metadata for an envelope document. Note that when called by non-creators (e.g. Recipients)
|
|
1377
|
+
* this will return only the **metadata** the caller is allowed to view.
|
|
1378
|
+
*
|
|
1379
|
+
* @group Envelopes
|
|
1380
|
+
* @api GET /envelopes/:id Get Envelope Details
|
|
1381
|
+
* @apiParam string(format: 'uuid') id The ID of the document to retrieve.
|
|
1382
|
+
* @apiSuccess IEnvelopeDocument . The detailed metadata for the document requested
|
|
1347
1383
|
*/
|
|
1348
1384
|
declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
|
|
1349
1385
|
/**
|
|
1350
1386
|
* Get a pre-signed download link for an Envelope Document. This link expires quickly, so it should
|
|
1351
1387
|
* be accessed immediately and never shared. Content-Disposition will be set to "download".
|
|
1388
|
+
*
|
|
1389
|
+
* @group Envelopes
|
|
1390
|
+
* @api GET /envelopes/:envelope_id/envelope_documents/:document_id Preview, Download, or Link to a Document
|
|
1391
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
|
|
1392
|
+
* @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
|
|
1393
|
+
* @apiQuery boolean download? Set to true to generate a download link (content-disposition: download).
|
|
1394
|
+
* @apiQuery boolean preview? Set to true to generate a preview link (content-disposition: inline).
|
|
1395
|
+
* @apiQuery boolean file? Set to true to return the raw binary BLOB data of the file rather than a link.
|
|
1396
|
+
* @apiSuccess string . The generated link.
|
|
1352
1397
|
*/
|
|
1353
1398
|
declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
|
|
1354
1399
|
/**
|
|
@@ -1358,6 +1403,12 @@ declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: s
|
|
|
1358
1403
|
declare const getDocumentPreviewLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
|
|
1359
1404
|
/**
|
|
1360
1405
|
* Cancel an Envelope.
|
|
1406
|
+
*
|
|
1407
|
+
* @group Envelopes
|
|
1408
|
+
* @api PUT /v2/envelopes/:id Cancel envelope
|
|
1409
|
+
* @apiParam string(format: 'uuid') id The ID of the envelope to cancel.
|
|
1410
|
+
* @apiBody string(enum: 'cancel') action The action to perform (currently only "cancel" is supported).
|
|
1411
|
+
* @apiSuccess IEnvelope . The updated envelope.
|
|
1361
1412
|
*/
|
|
1362
1413
|
declare const cancelEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<TEnvelopeUpdateResult>;
|
|
1363
1414
|
/**
|
|
@@ -1368,38 +1419,89 @@ declare const cancelEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) =>
|
|
|
1368
1419
|
declare const getEnvelopeFile: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<any>;
|
|
1369
1420
|
/**
|
|
1370
1421
|
* Update an envelope. Currently, only reminder settings may be changed.
|
|
1422
|
+
*
|
|
1423
|
+
* @group Envelopes
|
|
1424
|
+
* @api PATCH /v2/envelopes/:id Update Envelope
|
|
1425
|
+
* @apiParam string(format: 'uuid') id The ID of the envelope to update.
|
|
1426
|
+
* @apiBody IEnvelope . Set of fields to update. Omit (leave undefined) any fields that should not be changed.
|
|
1427
|
+
* @apiSuccess IEnvelope . A copy of the newly-updated envelope.
|
|
1371
1428
|
*/
|
|
1372
1429
|
declare const updateEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string, params: Pick<IEnvelope, "initial_reminder" | "followup_reminders">) => Promise<IEnvelope>;
|
|
1373
1430
|
/**
|
|
1374
1431
|
* Update a Document field. Typically called during the signing process as a Recipient fills in fields.
|
|
1432
|
+
*
|
|
1433
|
+
* @group Envelopes
|
|
1434
|
+
* @api PUT /envelopes/:envelope_id/fields/:field_name Update Envelope Field
|
|
1435
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
|
|
1436
|
+
* @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
|
|
1437
|
+
* @apiBody IEnvelopeFieldSettings . Set of properties to update. Leave undefined any properties that should not be changed.
|
|
1438
|
+
* @apiSuccess IEnvelope . A copy of the newly-updated field.
|
|
1375
1439
|
*/
|
|
1376
1440
|
declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, value: any) => Promise<IEnvelopeFieldSettings>;
|
|
1377
1441
|
/**
|
|
1378
|
-
*
|
|
1379
|
-
* signature for a Recipient, then call `
|
|
1442
|
+
* Apply a signature to a signature field. Signature fields are ID-driven. Call `createSignature()`
|
|
1443
|
+
* first to create a signature for a Recipient, then call `updateEnvelopeFieldSignature()` to
|
|
1444
|
+
* attach it to a field.
|
|
1445
|
+
*
|
|
1446
|
+
* @group Envelopes
|
|
1447
|
+
* @api PUT /envelopes/:envelope_id/fields/:field_name/signature/:signature_id Update Envelope
|
|
1448
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
|
|
1449
|
+
* @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
|
|
1450
|
+
* @apiParam string(format: 'uuid') signature_id The ID of the signature to attach.
|
|
1451
|
+
* @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
|
|
1380
1452
|
*/
|
|
1381
1453
|
declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, signatureId: string) => Promise<IEnvelopeFieldSettings>;
|
|
1382
1454
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1455
|
+
* Apply an initial to an initials field. Initial fields are ID-driven. Call `createInitial()`
|
|
1456
|
+
* first to create an initial block for a Recipient, then call `supdateEnvelopeFieldInitials()` to
|
|
1457
|
+
* attach it to a field.
|
|
1458
|
+
*
|
|
1459
|
+
* @group Envelopes
|
|
1460
|
+
* @api PUT /envelopes/:envelope_id/fields/:field_name/initial/:initial_id Update Envelope
|
|
1461
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
|
|
1462
|
+
* @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
|
|
1463
|
+
* @apiParam string(format: 'uuid') initial_id The ID of the initial block to attach.
|
|
1464
|
+
* @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
|
|
1385
1465
|
*/
|
|
1386
1466
|
declare const updateEnvelopeFieldInitials: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, initialId: string) => Promise<IEnvelopeFieldSettings>;
|
|
1387
1467
|
/**
|
|
1388
|
-
* Upload an attachment
|
|
1468
|
+
* Upload an attachment to an attachment field
|
|
1469
|
+
*
|
|
1470
|
+
* @group Envelopes
|
|
1471
|
+
* @api PUT /envelopes/:envelope_id/fields/:field_name Upload or Delete Attachment
|
|
1472
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to update.
|
|
1473
|
+
* @apiParam string field_name The name of the field to update. Be sure to URL-encode the value.
|
|
1474
|
+
* @apiBody string document The file to attach. Must contain standard File object fields. If omitted, the attachment will be deleted instead.
|
|
1475
|
+
* @apiSuccess IEnvelopeFieldSettings . A copy of the newly-updated field.
|
|
1389
1476
|
*/
|
|
1390
1477
|
declare const uploadEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IEnvelopeFieldSettings>;
|
|
1391
1478
|
/**
|
|
1392
|
-
* Delete an attachment.
|
|
1479
|
+
* Delete an attachment. Note that this is not a DELETE endpoint because the field itself is not
|
|
1480
|
+
* being deleted. Instead, it is a similar operation to uploading a new attachment, but the
|
|
1481
|
+
* omission of the attachment signals the server to delete the current entry.
|
|
1393
1482
|
*/
|
|
1394
1483
|
declare const deleteEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<IEnvelopeFieldSettings>;
|
|
1395
1484
|
/**
|
|
1396
|
-
* Get the attached file for an attachment field (if any)
|
|
1485
|
+
* Get the attached file for an attachment field (if any).
|
|
1486
|
+
*
|
|
1487
|
+
* @group Envelopes
|
|
1488
|
+
* @api GET /envelopes/:envelope_id/fields/:field_name/document Download attachment in binary format
|
|
1489
|
+
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
|
|
1490
|
+
* @apiParam string field_name The name of the field from which to download the attachment.
|
|
1491
|
+
* @apiSuccess string . The file binary data.
|
|
1397
1492
|
*/
|
|
1398
1493
|
declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<any>;
|
|
1399
1494
|
/**
|
|
1400
1495
|
* Get a display URI for a given page in a file attached to an envelope document. These pages are rendered server-side
|
|
1401
1496
|
* into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
|
|
1402
1497
|
* for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
|
|
1498
|
+
*
|
|
1499
|
+
* @group Envelopes
|
|
1500
|
+
* @api GET /v2/envelope-documnets/page-image/:document_id/:variant/:page Get Document Page Display URI
|
|
1501
|
+
* @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
|
|
1502
|
+
* @apiParam string(enum: 'original'|'filled') variant The variant of the document to retrieve.
|
|
1503
|
+
* @apiParam integer page The page number to retrieve
|
|
1504
|
+
* @apiSuccess string . The page display URI. Note that this is a signed URL with a short expiration. It should be used immediately and never databased or cached.
|
|
1403
1505
|
*/
|
|
1404
1506
|
declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, documentId: string, page: number, variant?: "original" | "filled" | "certificate") => Promise<string>;
|
|
1405
1507
|
interface ITimeRange {
|
|
@@ -1427,6 +1529,24 @@ interface IListEnvelopesParams {
|
|
|
1427
1529
|
*
|
|
1428
1530
|
* const {count, envelopes} = await getEnvelopes((VerdocsEndpoint.getDefault(), { q: 'test' });
|
|
1429
1531
|
* ```
|
|
1532
|
+
*
|
|
1533
|
+
* @group Envelopes
|
|
1534
|
+
* @api GET /v2/envelopes List Envelopes
|
|
1535
|
+
* @apiQuery string q? Match envelopes whose name contains this string
|
|
1536
|
+
* @apiQuery string(enum: 'inbox' | 'sent' | 'action' | 'waiting' | 'completed') view? Request pre-defined view. `inbox` returns envelopes where action is required by the caller. `sent` returns envelopes created by the caller. `action` returns envelopes where action is required by the caller. `waiting` returns envelopes where action is required by anyone. `completed` returns envelopes where all actions are complete.
|
|
1537
|
+
* @apiQuery array(items: 'complete' | 'pending' | 'in progress' | 'declined' | 'canceled') status? Match envelopes in one of the specified states.
|
|
1538
|
+
* @apiQuery boolean(default: false) include_org? If true, include organizations-shared envelopes
|
|
1539
|
+
* @apiQuery string(format: uuid) template_id? Match envelopes created from the specified template ID
|
|
1540
|
+
* @apiQuery string(format: date-time) created_before? Match envelopes created before this date
|
|
1541
|
+
* @apiQuery string(format: date-time) created_after? Match envelopes created after this date
|
|
1542
|
+
* @apiQuery string(enum: 'name' | 'created_at' | 'updated_at' | 'canceled_at' | 'status') sort_by? Return results sorted by this criteria
|
|
1543
|
+
* @apiQuery boolean ascending? Set true/false to override the sort direction. Note that the default depends on `sort_by`. Date-based sorts default to descending, while name and status default to ascending.
|
|
1544
|
+
* @apiQuery integer(default: 20) rows? Limit the number of rows returned
|
|
1545
|
+
* @apiQuery integer(default: 0) page? Specify which page of results to return
|
|
1546
|
+
* @apiSuccess integer(format: int32) count The total number of records matching the query, helpful for pagination
|
|
1547
|
+
* @apiSuccess integer(format: int32) rows The number of rows returned in this response page
|
|
1548
|
+
* @apiSuccess integer(format: int32) page The page number of this response
|
|
1549
|
+
* @apiSuccess array(items: IEnvelope) envelopes List of envelopes found
|
|
1430
1550
|
*/
|
|
1431
1551
|
declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) => Promise<{
|
|
1432
1552
|
count: number;
|
|
@@ -1439,6 +1559,11 @@ declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesP
|
|
|
1439
1559
|
* an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
|
|
1440
1560
|
* create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
|
|
1441
1561
|
* to be "stamped" by the user.
|
|
1562
|
+
*
|
|
1563
|
+
* @group Signatures and Initials
|
|
1564
|
+
* @api POST /initials Create Initial Block
|
|
1565
|
+
* @apiBody string initial Blob containing initials image to store.
|
|
1566
|
+
* @apiSuccess IInitial . The newly-created initial block.
|
|
1442
1567
|
*/
|
|
1443
1568
|
declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
|
|
1444
1569
|
/**
|
|
@@ -1525,18 +1650,28 @@ interface IKbaIdentity {
|
|
|
1525
1650
|
*/
|
|
1526
1651
|
declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1527
1652
|
interface IKbaChallengeResponse {
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
answer: string | number;
|
|
1531
|
-
}[];
|
|
1653
|
+
type: string;
|
|
1654
|
+
answer: string | number;
|
|
1532
1655
|
}
|
|
1533
1656
|
/**
|
|
1534
1657
|
* Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
|
|
1535
1658
|
* the challenges were listed in `IRecipientKbaStepChallenge.questions`.
|
|
1536
1659
|
*/
|
|
1537
|
-
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string,
|
|
1660
|
+
declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, responses: IKbaChallengeResponse[]) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
|
|
1538
1661
|
/**
|
|
1539
|
-
* Update a recipient's status
|
|
1662
|
+
* Update a recipient's status.
|
|
1663
|
+
*
|
|
1664
|
+
* @group Recipients
|
|
1665
|
+
* @api PUT /envelopes/:envelope_id/recipients/:role_name Update Recipient Status
|
|
1666
|
+
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
1667
|
+
* @apiParam string role_name The role to adjust.
|
|
1668
|
+
* @apiBody string(enum:'submit'|'decline'|'owner_update'|'update'|'prepare') action The action to take. Adjusts the status, and may also perform other operations.
|
|
1669
|
+
* @apiBody string first_name? Ignored unless action is 'owner_update' or 'update'. The new owner's or recipient's first name.
|
|
1670
|
+
* @apiBody string last_name? Ignored unless action is 'owner_update' or 'update'. The new owner's or recipient's last name.
|
|
1671
|
+
* @apiBody string email? Ignored unless action is 'owner_update'. The new owner's email address.
|
|
1672
|
+
* @apiBody boolean agreed? Ignored unless action is 'update'. Set to true to accept the e-signing disclosures.
|
|
1673
|
+
* @apiBody array(items:IRecipient) recipients? Ignored unless action is 'prepare'. A list of recipients and their fields to set defaults for.
|
|
1674
|
+
* @apiSuccess IRecipient . The updated Recipient.
|
|
1540
1675
|
*/
|
|
1541
1676
|
declare const updateRecipient: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, params: IUpdateRecipientSubmitParams | IUpdateRecipientClaimEnvelope | IUpdateRecipientAgreedParams | IUpdateRecipientNameParams | IUpdateRecipientDeclineParams | IUpdateRecipientPrepareParams) => Promise<IRecipient>;
|
|
1542
1677
|
/**
|
|
@@ -1565,14 +1700,32 @@ declare const envelopeRecipientUpdateName: (endpoint: VerdocsEndpoint, envelopeI
|
|
|
1565
1700
|
declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, recipients: IRecipient[]) => Promise<IRecipient>;
|
|
1566
1701
|
/**
|
|
1567
1702
|
* Begin a signing session for an Envelope. This path requires an invite code, and should generally
|
|
1568
|
-
* be called with a NON-default
|
|
1703
|
+
* be called with a NON-default Endpoint to avoid conflicting with any active user session the user
|
|
1569
1704
|
* may have. To initiate in-person signing by an authenticated user (e.g. self-signing), call
|
|
1570
1705
|
* getInPersonLink() instead. The response from that call includes both a link for direct signing
|
|
1571
1706
|
* via a Web browser as well as an in-person access_key. That access_key.key may be used here as well.
|
|
1707
|
+
*
|
|
1708
|
+
* @group Recipients
|
|
1709
|
+
* @api POST /v2/sign/unauth/:envelope_id/:role_name/:key Start Signing Session
|
|
1710
|
+
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
1711
|
+
* @apiParam string role_name The role to request.
|
|
1712
|
+
* @apiParam string key Access key generated by the envelope creator or email/SMS invite.
|
|
1713
|
+
* @apiSuccess ISignerTokenResponse . Signing session token and envelope/recipient metadata.
|
|
1572
1714
|
*/
|
|
1573
1715
|
declare const startSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
|
|
1574
1716
|
/**
|
|
1575
|
-
* Get an in-person signing link.
|
|
1717
|
+
* Get an in-person signing link. Must be called by the owner/creator of the envelope. The response
|
|
1718
|
+
* also includes the raw access key that may be used to directly initiate a signing session (see
|
|
1719
|
+
* `startSigningSession`) as well as an access token representing a valid signing session for
|
|
1720
|
+
* immediate use in embeds or other applications. Note that in-person signing is considered a
|
|
1721
|
+
* lower-security operation than authenticated signing, and the final envelope certificate will
|
|
1722
|
+
* reflect this.
|
|
1723
|
+
*
|
|
1724
|
+
* @group Recipients
|
|
1725
|
+
* @api POST /v2/sign/in-person/:envelope_id/:role_name Get In-Person Signing Link
|
|
1726
|
+
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
1727
|
+
* @apiParam string role_name The role to request.
|
|
1728
|
+
* @apiSuccess IInPersonLinkResponse . Signing session token and envelope/recipient metadata.
|
|
1576
1729
|
*/
|
|
1577
1730
|
declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IInPersonLinkResponse>;
|
|
1578
1731
|
/**
|
|
@@ -1580,7 +1733,17 @@ declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string,
|
|
|
1580
1733
|
*/
|
|
1581
1734
|
declare const sendDelegate: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IEnvelope>;
|
|
1582
1735
|
/**
|
|
1583
|
-
* Resend a recipient's invitation.
|
|
1736
|
+
* Resend a recipient's invitation. NOTE: User interfaces should rate-limit this operation to
|
|
1737
|
+
* avoid spamming recipients. Excessive use of this endpoint may result in Verdocs rate-limiting
|
|
1738
|
+
* the calling application to prevent abuse. This endpoint will return a 200 OK even if the
|
|
1739
|
+
* no_contact flag is set on the envelope (in which case the call will be ignored).
|
|
1740
|
+
*
|
|
1741
|
+
* @group Recipients
|
|
1742
|
+
* @api PUT /v2/envelopes/:envelope_id/recipients/:role_name Resend Invitation
|
|
1743
|
+
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
1744
|
+
* @apiParam string role_name The role to operate on.
|
|
1745
|
+
* @apiBody string(enum:'resend') action The operation to perform.
|
|
1746
|
+
* @apiSuccess string . Success message.
|
|
1584
1747
|
*/
|
|
1585
1748
|
declare const resendInvitation: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<any>;
|
|
1586
1749
|
/**
|
|
@@ -1633,18 +1796,39 @@ declare const getNextRecipient: (envelope: IEnvelope) => IRecipient;
|
|
|
1633
1796
|
* a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
|
|
1634
1797
|
* create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
|
|
1635
1798
|
* to be "stamped" by the user.
|
|
1799
|
+
*
|
|
1800
|
+
* @group Signatures and Initials
|
|
1801
|
+
* @api POST /signatures Create Signature Block
|
|
1802
|
+
*
|
|
1803
|
+
* @apiBody string signature Blob containing signature image to store.
|
|
1804
|
+
* @apiSuccess ISignature . The newly-created signature block.
|
|
1636
1805
|
*/
|
|
1637
1806
|
declare const createSignature: (endpoint: VerdocsEndpoint, name: string, signature: Blob) => Promise<ISignature>;
|
|
1638
1807
|
/**
|
|
1639
|
-
* Get the
|
|
1808
|
+
* Get the available signatures for a user.
|
|
1809
|
+
*
|
|
1810
|
+
* @group Signatures and Initials
|
|
1811
|
+
* @api GET /signatures Create Signature Block
|
|
1812
|
+
*
|
|
1813
|
+
* @apiSuccess array(items:ISignature) . A list of signatures previously stored for the user.
|
|
1640
1814
|
*/
|
|
1641
1815
|
declare const getSignatures: (endpoint: VerdocsEndpoint) => Promise<ISignature[]>;
|
|
1642
1816
|
/**
|
|
1643
1817
|
* Get a user's signature by ID.
|
|
1818
|
+
*
|
|
1819
|
+
* @group Signatures and Initials
|
|
1820
|
+
* @api GET /signatures/:id Delete Signature Block
|
|
1821
|
+
* @apiParam string(format: 'uuid') id The ID of the signature to delete.
|
|
1822
|
+
* @apiSuccess ISignature . The signature metadata requested.
|
|
1644
1823
|
*/
|
|
1645
1824
|
declare const getSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
|
|
1646
1825
|
/**
|
|
1647
1826
|
* Delete a user's signature.
|
|
1827
|
+
*
|
|
1828
|
+
* @group Signatures and Initials
|
|
1829
|
+
* @api DELETE /signatures/:id Delete Signature Block
|
|
1830
|
+
* @apiParam string(format: 'uuid') id The ID of the signature to delete.
|
|
1831
|
+
* @apiSuccess string . OK
|
|
1648
1832
|
*/
|
|
1649
1833
|
declare const deleteSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
|
|
1650
1834
|
interface ICreateApiKeyRequest {
|
|
@@ -1923,6 +2107,11 @@ type TAuthenticationRequest = IROPCRequest | IClientCredentialsRequest | IRefres
|
|
|
1923
2107
|
* const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
|
|
1924
2108
|
* VerdocsEndpoint.getDefault().setAuthToken(access_token);
|
|
1925
2109
|
* ```
|
|
2110
|
+
*
|
|
2111
|
+
* @group Authentication
|
|
2112
|
+
* @api POST /v2/oauth2/token Authenticate
|
|
2113
|
+
* @apiBody string(format: 'uuid') id The ID of the envelope to retrieve.
|
|
2114
|
+
* @apiSuccess IAuthenticateResponse . The detailed metadata for the envelope requested
|
|
1926
2115
|
*/
|
|
1927
2116
|
declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationRequest) => Promise<IAuthenticateResponse>;
|
|
1928
2117
|
/**
|
|
@@ -2455,6 +2644,7 @@ declare const getTag: (endpoint: VerdocsEndpoint, name: string) => Promise<ITag>
|
|
|
2455
2644
|
*/
|
|
2456
2645
|
declare const getAllTags: (endpoint: VerdocsEndpoint) => Promise<ITag[]>;
|
|
2457
2646
|
type ITemplateSortBy = "created_at" | "updated_at" | "name" | "last_used_at" | "counter" | "star_counter";
|
|
2647
|
+
type TTemplateVisibilityFilter = "private_shared" | "private" | "shared" | "public";
|
|
2458
2648
|
interface IGetTemplatesParams {
|
|
2459
2649
|
/** List only those templates whose names, descriptions, etc contain this search term. */
|
|
2460
2650
|
q?: string;
|
|
@@ -2463,7 +2653,7 @@ interface IGetTemplatesParams {
|
|
|
2463
2653
|
/** List only those templates created by the caller. */
|
|
2464
2654
|
is_creator?: boolean;
|
|
2465
2655
|
/** Visibility status of templates to include. private_shared is the default (private + shared) */
|
|
2466
|
-
visibility
|
|
2656
|
+
visibility?: TTemplateVisibilityFilter;
|
|
2467
2657
|
/** Sort order */
|
|
2468
2658
|
sort_by?: TSortTemplateBy;
|
|
2469
2659
|
/** Set to true or false to control the sort order. Omit this field to sort dates descending, names ascending. */
|
|
@@ -2484,6 +2674,21 @@ interface IGetTemplatesParams {
|
|
|
2484
2674
|
* await getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
|
|
2485
2675
|
* await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
|
|
2486
2676
|
* ```
|
|
2677
|
+
*
|
|
2678
|
+
* @group Templates
|
|
2679
|
+
* @api GET /v2/templates Get Templates
|
|
2680
|
+
* @apiQuery string q? Find templates whose names/descriptions contain the specified query string
|
|
2681
|
+
* @apiQuery boolean is_starred? If true, returns only templates with at least one "star".
|
|
2682
|
+
* @apiQuery boolean is_creator? If true, returns only templates that the caller created.
|
|
2683
|
+
* @apiQuery string(enum: 'private_shared' | 'private' | 'shared' | 'public') visibility? Return only templates with the specified visibility.
|
|
2684
|
+
* @apiQuery string(enum: 'created_at' | 'updated_at' | 'name' | 'last_used_at' | 'counter' | 'star_counter') sort_by? Return results sorted by this criteria
|
|
2685
|
+
* @apiQuery boolean ascending? Set true/false to override the sort direction. Note that the default depends on `sort_by`. Date-based sorts default to descending, while name defaults to ascending.
|
|
2686
|
+
* @apiQuery integer(default: 20) rows? Limit the number of rows returned
|
|
2687
|
+
* @apiQuery integer(default: 0) page? Specify which page of results to return
|
|
2688
|
+
* @apiSuccess integer(format: int32) count The total number of records matching the query, helpful for pagination
|
|
2689
|
+
* @apiSuccess integer(format: int32) rows The number of rows returned in this response page
|
|
2690
|
+
* @apiSuccess integer(format: int32) page The page number of this response
|
|
2691
|
+
* @apiSuccess array(items: ITemplate) templates List of templates found
|
|
2487
2692
|
*/
|
|
2488
2693
|
declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<{
|
|
2489
2694
|
count: number;
|
|
@@ -2542,7 +2747,7 @@ interface ITemplateCreateParams {
|
|
|
2542
2747
|
*/
|
|
2543
2748
|
is_public?: boolean;
|
|
2544
2749
|
/** Optional (defaults to EVERYONE_AS_CREATOR). Who may create and send envelopes using this template. */
|
|
2545
|
-
sender?:
|
|
2750
|
+
sender?: TTemplateSender;
|
|
2546
2751
|
/** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
|
|
2547
2752
|
initial_reminder?: number;
|
|
2548
2753
|
/** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
|
|
@@ -2821,4 +3026,4 @@ declare const decodeJWTBody: (token: string) => any;
|
|
|
2821
3026
|
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
2822
3027
|
*/
|
|
2823
3028
|
declare const decodeAccessTokenBody: (token: string) => TSession;
|
|
2824
|
-
export { TRequestStatus,
|
|
3029
|
+
export { TRequestStatus, TTemplateSender, TTemplateAction, TRecipientAction, TEnvelopeStatus, TRecipientStatus, TRecipientType, TSortTemplateBy, TAccessKeyType, TApiKeyPermission, TDeprecatedHistoryEvent, THistoryEvent, TEventDetail, TEnvelopeUpdateResult, TFieldType, TWebhookEvent, TTemplateVisibility, FIELD_TYPES, DEFAULT_FIELD_WIDTHS, DEFAULT_FIELD_HEIGHTS, WEBHOOK_EVENTS, ALL_PERMISSIONS, IChannel, IDisabledChannel, INotification, IApiKey, IGroup, IGroupProfile, IOAuth2App, IOrganization, IOrganizationInvitation, IPendingWebhook, IProfile, IUser, IWebhookEvents, IWebhook, IInPersonAccessKey, IInAppAccessKey, IEmailAccessKey, ISMSAccessKey, TAccessKey, IEnvelope, IEnvelopeDocument, IDropdownOption, IEnvelopeField, IEnvelopeFieldOptions, IEnvelopeFieldSettings, IEnvelopeHistory, IInitial, IKbaPINRequired, IRecipient, IRole, ISignature, ITemplate, ITemplateDocument, ITemplateField, ITextFieldSetting, ITemplateFieldSetting, TEnvironment, TSessionChangedListener, VerdocsEndpointOptions, VerdocsEndpoint, createEnvelope, getEnvelope, getEnvelopeDocument, getDocumentDownloadLink, getDocumentPreviewLink, cancelEnvelope, getEnvelopeFile, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldSignature, updateEnvelopeFieldInitials, uploadEnvelopeFieldAttachment, deleteEnvelopeFieldAttachment, getFieldAttachment, getEnvelopeDocumentPageDisplayUri, ITimeRange, IListEnvelopesParams, getEnvelopes, createInitials, IRecipientKbaStepNone, IRecipientKbaStepComplete, IRecipientKbaStepPin, IRecipientKbaStepIdentity, IRecipientKbaStepChallenge, IRecipientKbaStepFailed, TRecipientKbaStep, getKbaStep, submitKbaPin, IKbaIdentity, submitKbaIdentity, IKbaChallengeResponse, submitKbaChallengeResponse, updateRecipient, envelopeRecipientSubmit, envelopeRecipientDecline, envelopeRecipientChangeOwner, envelopeRecipientAgree, envelopeRecipientUpdateName, envelopeRecipientPrepare, startSigningSession, getInPersonLink, sendDelegate, resendInvitation, userIsEnvelopeOwner, userIsEnvelopeRecipient, envelopeIsActive, envelopeIsComplete, userCanCancelEnvelope, userCanFinishEnvelope, recipientHasAction, getRecipientsWithActions, recipientCanAct, userCanAct, userCanSignNow, getNextRecipient, createSignature, getSignatures, getSignature, deleteSignature, IEnvelopesSearchResult, IDocumentSearchOptions, ICreateEnvelopeRecipient, ISignerTokenResponse, IInPersonLinkResponse, IUpdateRecipientSubmitParams, IUpdateRecipientDeclineParams, IUpdateRecipientClaimEnvelope, IUpdateRecipientStatus, IUpdateRecipientAgreedParams, IUpdateRecipientNameParams, IUpdateRecipientPrepareParams, ICreateEnvelopeReminderRequest, ICreateEnvelopeFromTemplateRequest, ICreateEnvelopeDirectlyRequest, TCreateEnvelopeRequest, getApiKeys, createApiKey, rotateApiKey, updateApiKey, deleteApiKey, getOrganizationContacts, deleteOrganizationContact, createOrganizationContact, updateOrganizationContact, getGroups, getGroup, createGroup, updateGroup, deleteGroup, addGroupMember, deleteGroupMember, getOrganizationInvitations, createOrganizationInvitation, deleteOrganizationInvitation, updateOrganizationInvitation, resendOrganizationInvitation, getOrganizationInvitation, acceptOrganizationInvitation, declineOrganizationInvitation, getOrganizationMembers, deleteOrganizationMember, updateOrganizationMember, getOrganization, createOrganization, updateOrganization, deleteOrganization, updateOrganizationLogo, updateOrganizationThumbnail, ICreateApiKeyRequest, IUpdateApiKeyRequest, ICreateInvitationRequest, IAcceptOrganizationInvitationRequest, ISetWebhookRequest, getWebhooks, setWebhooks, TTemplatePermissionCreatePublic, TTemplatePermissionCreateOrg, TTemplatePermissionCreatePersonal, TTemplatePermissionDelete, TTemplatePermissionVisibility, TTemplateMemberRead, TTemplateMemberWrite, TTemplateMemberDelete, TTemplateMemberVisibility, TTemplatePermission, TAccountPermissionOwnerAdd, TAccountPermissionOwnerRemove, TAccountPermissionAdminAdd, TAccountPermissionAdminRemove, TAccountPermissionMemberView, TAccountPermissionMemberAdd, TAccountPermissionMemberRemove, TAccountPermission, TOrgPermissionCreate, TOrgPermissionView, TOrgPermissionUpdate, TOrgPermissionDelete, TOrgPermissionTransfer, TOrgPermissionList, TOrgPermission, TEnvelopePermissionCreate, TEnvelopePermissionCancel, TEnvelopePermissionView, TEnvelopePermissionOrg, TEnvelopePermission, TPermission, TRole, RolePermissions, userHasPermissions, ISigningSession, IUserSession, IIdToken, TSessionType, TSession, TActiveSession, canPerformTemplateAction, hasRequiredPermissions, createField, updateField, deleteField, userIsTemplateCreator, userHasSharedTemplate, userCanCreatePersonalTemplate, userCanCreateOrgTemplate, userCanCreatePublicTemplate, userCanReadTemplate, userCanUpdateTemplate, userCanMakeTemplatePrivate, userCanMakeTemplateShared, userCanMakeTemplatePublic, userCanChangeOrgVisibility, userCanDeleteTemplate, userCanSendTemplate, userCanCreateTemplate, userCanBuildTemplate, getFieldsForRole, userCanPreviewTemplate, createTemplateRole, updateTemplateRole, deleteTemplateRole, getStars, toggleStar, addTemplateTag, getTemplateTags, deleteTemplateTag, createTag, getTag, getAllTags, ITemplateSortBy, TTemplateVisibilityFilter, IGetTemplatesParams, getTemplates, getTemplate, IDocumentFromUri, IDocumentFromData, ITemplateCreateParams, createTemplate, duplicateTemplate, ITemplateCreateFromSharepointParams, createTemplateFromSharepoint, updateTemplate, deleteTemplate, getTemplateDocuments, getTemplateDocument, createTemplateDocument, deleteTemplateDocument, getTemplateDocumentFile, getTemplateDocumentThumbnail, getTemplateDocumentPageDisplayUri, ITemplateTag, ITag, IStar, ITemplateSearchResult, IValidator, getValidators, getValidator, isValidEmail, isValidPhone, isValidRoleName, isValidTag, IROPCRequest, IClientCredentialsRequest, IRefreshTokenRequest, TAuthenticationRequest, authenticate, refreshToken, changePassword, resetPassword, resendVerification, verifyEmail, getMyUser, getNotifications, getProfiles, getCurrentProfile, switchProfile, updateProfile, deleteProfile, createProfile, updateProfilePhoto, ICreateProfileRequest, IUpdateProfileRequest, IAuthenticateResponse, IChangePasswordRequest, IChangePasswordResponse, IResetPasswordRequest, IResetPasswordResponse, IVerifyEmailRequest, getRGB, getRGBA, nameToRGBA, getRoleColor, formatShortTimeAgo, getRTop, getRLeft, getRValue, blobToBase64, rescale, sortFields, fileToDataUrl, downloadBlob, Countries, getCountryByCode, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, getPlusOneCountry, isCanada, isAmericanSamoa, isDominicanRepublic, isPuertoRico, getMatchingCountry, integerSequence, formatFullName, formatInitials, fullNameToInitials, capitalize, convertToE164, randomString, AtoB, decodeJWTBody, decodeAccessTokenBody, IFileWithData, ICountry };
|