@verdocs/js-sdk 4.2.136 → 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 CHANGED
@@ -5,32 +5,10 @@
5
5
  This SDK provides convenience wrappers for both Browser-based and NodeJS applications to call the Verdocs API, with strong typing and
6
6
  documentation to help you get started quickly developing for the Verdocs platform.
7
7
 
8
- ## Getting Started
8
+ Please see the [Documentation](https://developers.verdocs.com/sdks/js-ts/overview) for installation
9
+ and usage instructions.
9
10
 
10
- First add this module to your project:
11
-
12
- npm install --save @verdocs/js-sdk
13
-
14
- or:
15
-
16
- yarn add @verdocs/js-sdk
17
-
18
- This package is namespaced into packages that organize API calls into functional groups. A top-level `export *` is provided for simplicity,
19
- but to enable Tree Shaking to do its job, it is recommended that you only import the package required for a given task. For example, to
20
- perform a simple authentication request:
21
-
22
- ```typescript
23
- import {Auth} from '@verdocs/js-sdk/Auth';
24
- import {Transport} from '@verdocs/js-sdk/HTTP';
25
-
26
- const {accessToken} = await Auth.authenticateUser({username: 'MY_USERNAME', password: 'MY_PASSWORD'});
27
- Transport.setAuthToken(accessToken);
28
- ```
29
-
30
- Once you are authenticated, you can use the rest of the controls and embeds within an app. For instance, to provide a simple PDF
31
- viewer for a document stored within Verdocs:
32
-
33
- ## Documentation
11
+ ## Structure
34
12
 
35
13
  Verdocs functions are organized into high-level modules that represent the main objects within the platform:
36
14
 
@@ -45,25 +23,6 @@ Please see the [API Docs](https://github.com/Verdocs/js-sdk/tree/main/docs) for
45
23
 
46
24
  ## Contributing
47
25
 
48
- To avoid the presence of the `dist/` distribution directory appearing in package imports, when this project is built, this `README.md`
49
- and other support files are copied there. Be sure to run `npm version patch` from THIS directory, but the publish command from within
50
- the `dist` folder.
51
-
52
- ## HTTP Transport
53
-
54
- The underlying transport uses `axios`, a cross-environment (NodeJS vs. Browser) HTTP transport layer. When this SDK is included in a
55
- project, a `Transport` singleton Axios Instance will be created to support the API calls to Verdocs servers. This endpoint's operation
56
- may be configured by importing it. Please see the [Axios Documentation](https://github.com/axios/axios) for more information on the
57
- options available. For example, to override the default API call timeout of 3s:
58
-
59
- ```typescript
60
- import {Transport} from '@verdocs/js-sdk/Auth/HTTP';
61
-
62
- Transport.setTimeout(5000);
63
- ```
64
-
65
- ## Contributing
66
-
67
26
  This repository is actively maintained and supported by [Verdocs](https://verdocs.com/). We welcome community contributions and
68
27
  suggestions! Please file a pull request with any change requests and we will review them as soon as possible.
69
28
 
@@ -72,4 +31,3 @@ suggestions! Please file a pull request with any change requests and we will rev
72
31
  Currently, we have placeholder tests for a number of functions but had to disable the test suite. See
73
32
  https://jestjs.io/docs/ecmascript-modules and https://github.com/facebook/jest/issues/10025 for more information. Since we manage our
74
33
  own transport endpoint, we can probably do this mocking ourselves and eliminate the dependency in the first place.
75
-
package/dist/README.md CHANGED
@@ -5,32 +5,10 @@
5
5
  This SDK provides convenience wrappers for both Browser-based and NodeJS applications to call the Verdocs API, with strong typing and
6
6
  documentation to help you get started quickly developing for the Verdocs platform.
7
7
 
8
- ## Getting Started
8
+ Please see the [Documentation](https://developers.verdocs.com/sdks/js-ts/overview) for installation
9
+ and usage instructions.
9
10
 
10
- First add this module to your project:
11
-
12
- npm install --save @verdocs/js-sdk
13
-
14
- or:
15
-
16
- yarn add @verdocs/js-sdk
17
-
18
- This package is namespaced into packages that organize API calls into functional groups. A top-level `export *` is provided for simplicity,
19
- but to enable Tree Shaking to do its job, it is recommended that you only import the package required for a given task. For example, to
20
- perform a simple authentication request:
21
-
22
- ```typescript
23
- import {Auth} from '@verdocs/js-sdk/Auth';
24
- import {Transport} from '@verdocs/js-sdk/HTTP';
25
-
26
- const {accessToken} = await Auth.authenticateUser({username: 'MY_USERNAME', password: 'MY_PASSWORD'});
27
- Transport.setAuthToken(accessToken);
28
- ```
29
-
30
- Once you are authenticated, you can use the rest of the controls and embeds within an app. For instance, to provide a simple PDF
31
- viewer for a document stored within Verdocs:
32
-
33
- ## Documentation
11
+ ## Structure
34
12
 
35
13
  Verdocs functions are organized into high-level modules that represent the main objects within the platform:
36
14
 
@@ -45,25 +23,6 @@ Please see the [API Docs](https://github.com/Verdocs/js-sdk/tree/main/docs) for
45
23
 
46
24
  ## Contributing
47
25
 
48
- To avoid the presence of the `dist/` distribution directory appearing in package imports, when this project is built, this `README.md`
49
- and other support files are copied there. Be sure to run `npm version patch` from THIS directory, but the publish command from within
50
- the `dist` folder.
51
-
52
- ## HTTP Transport
53
-
54
- The underlying transport uses `axios`, a cross-environment (NodeJS vs. Browser) HTTP transport layer. When this SDK is included in a
55
- project, a `Transport` singleton Axios Instance will be created to support the API calls to Verdocs servers. This endpoint's operation
56
- may be configured by importing it. Please see the [Axios Documentation](https://github.com/axios/axios) for more information on the
57
- options available. For example, to override the default API call timeout of 3s:
58
-
59
- ```typescript
60
- import {Transport} from '@verdocs/js-sdk/Auth/HTTP';
61
-
62
- Transport.setTimeout(5000);
63
- ```
64
-
65
- ## Contributing
66
-
67
26
  This repository is actively maintained and supported by [Verdocs](https://verdocs.com/). We welcome community contributions and
68
27
  suggestions! Please file a pull request with any change requests and we will review them as soon as possible.
69
28
 
@@ -72,4 +31,3 @@ suggestions! Please file a pull request with any change requests and we will rev
72
31
  Currently, we have placeholder tests for a number of functions but had to disable the test suite. See
73
32
  https://jestjs.io/docs/ecmascript-modules and https://github.com/facebook/jest/issues/10025 for more information. Since we manage our
74
33
  own transport endpoint, we can probably do this mocking ourselves and eliminate the dependency in the first place.
75
-
package/dist/index.d.mts 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";
@@ -1338,19 +1348,52 @@ type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelo
1338
1348
  * const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};
1339
1349
  * const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);
1340
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.
1341
1363
  */
1342
1364
  declare const createEnvelope: (endpoint: VerdocsEndpoint, request: TCreateEnvelopeRequest) => Promise<IEnvelope>;
1343
1365
  /**
1344
- * Get all metadata for an Envelope.
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
1345
1373
  */
1346
1374
  declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<IEnvelope>;
1347
1375
  /**
1348
- * Get an Envelope Document
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
1349
1383
  */
1350
1384
  declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
1351
1385
  /**
1352
1386
  * Get a pre-signed download link for an Envelope Document. This link expires quickly, so it should
1353
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.
1354
1397
  */
1355
1398
  declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
1356
1399
  /**
@@ -1360,6 +1403,12 @@ declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: s
1360
1403
  declare const getDocumentPreviewLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
1361
1404
  /**
1362
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.
1363
1412
  */
1364
1413
  declare const cancelEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<TEnvelopeUpdateResult>;
1365
1414
  /**
@@ -1370,38 +1419,89 @@ declare const cancelEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) =>
1370
1419
  declare const getEnvelopeFile: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<any>;
1371
1420
  /**
1372
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.
1373
1428
  */
1374
1429
  declare const updateEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string, params: Pick<IEnvelope, "initial_reminder" | "followup_reminders">) => Promise<IEnvelope>;
1375
1430
  /**
1376
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.
1377
1439
  */
1378
1440
  declare const updateEnvelopeField: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, value: any) => Promise<IEnvelopeFieldSettings>;
1379
1441
  /**
1380
- * Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
1381
- * signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
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.
1382
1452
  */
1383
1453
  declare const updateEnvelopeFieldSignature: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, signatureId: string) => Promise<IEnvelopeFieldSettings>;
1384
1454
  /**
1385
- * Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
1386
- * signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
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.
1387
1465
  */
1388
1466
  declare const updateEnvelopeFieldInitials: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, initialId: string) => Promise<IEnvelopeFieldSettings>;
1389
1467
  /**
1390
- * 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.
1391
1476
  */
1392
1477
  declare const uploadEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<IEnvelopeFieldSettings>;
1393
1478
  /**
1394
- * 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.
1395
1482
  */
1396
1483
  declare const deleteEnvelopeFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<IEnvelopeFieldSettings>;
1397
1484
  /**
1398
- * 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.
1399
1492
  */
1400
1493
  declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId: string, fieldName: string) => Promise<any>;
1401
1494
  /**
1402
1495
  * Get a display URI for a given page in a file attached to an envelope document. These pages are rendered server-side
1403
1496
  * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
1404
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.
1405
1505
  */
1406
1506
  declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, documentId: string, page: number, variant?: "original" | "filled" | "certificate") => Promise<string>;
1407
1507
  interface ITimeRange {
@@ -1429,6 +1529,24 @@ interface IListEnvelopesParams {
1429
1529
  *
1430
1530
  * const {count, envelopes} = await getEnvelopes((VerdocsEndpoint.getDefault(), { q: 'test' });
1431
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
1432
1550
  */
1433
1551
  declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesParams) => Promise<{
1434
1552
  count: number;
@@ -1441,6 +1559,11 @@ declare const getEnvelopes: (endpoint: VerdocsEndpoint, params?: IListEnvelopesP
1441
1559
  * an initials block to be used for all initials fields in the document. Thus, this is typically called one time to
1442
1560
  * create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
1443
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.
1444
1567
  */
1445
1568
  declare const createInitials: (endpoint: VerdocsEndpoint, name: string, initials: Blob) => Promise<IInitial>;
1446
1569
  /**
@@ -1527,18 +1650,28 @@ interface IKbaIdentity {
1527
1650
  */
1528
1651
  declare const submitKbaIdentity: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, identity: IKbaIdentity) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
1529
1652
  interface IKbaChallengeResponse {
1530
- responses: {
1531
- type: string;
1532
- answer: string | number;
1533
- }[];
1653
+ type: string;
1654
+ answer: string | number;
1534
1655
  }
1535
1656
  /**
1536
1657
  * Submit an identity response to a KBA challenge. Answers should be submitted in the same order as
1537
1658
  * the challenges were listed in `IRecipientKbaStepChallenge.questions`.
1538
1659
  */
1539
- declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, response: IKbaChallengeResponse) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
1660
+ declare const submitKbaChallengeResponse: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, responses: IKbaChallengeResponse[]) => Promise<IRecipientKbaStepNone | IRecipientKbaStepComplete | IRecipientKbaStepPin | IRecipientKbaStepIdentity | IRecipientKbaStepChallenge | IRecipientKbaStepFailed>;
1540
1661
  /**
1541
- * Update a recipient's status block
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.
1542
1675
  */
1543
1676
  declare const updateRecipient: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, params: IUpdateRecipientSubmitParams | IUpdateRecipientClaimEnvelope | IUpdateRecipientAgreedParams | IUpdateRecipientNameParams | IUpdateRecipientDeclineParams | IUpdateRecipientPrepareParams) => Promise<IRecipient>;
1544
1677
  /**
@@ -1567,14 +1700,32 @@ declare const envelopeRecipientUpdateName: (endpoint: VerdocsEndpoint, envelopeI
1567
1700
  declare const envelopeRecipientPrepare: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, recipients: IRecipient[]) => Promise<IRecipient>;
1568
1701
  /**
1569
1702
  * Begin a signing session for an Envelope. This path requires an invite code, and should generally
1570
- * be called with a NON-default endpoint to avoid conflicting with any active user session the user
1703
+ * be called with a NON-default Endpoint to avoid conflicting with any active user session the user
1571
1704
  * may have. To initiate in-person signing by an authenticated user (e.g. self-signing), call
1572
1705
  * getInPersonLink() instead. The response from that call includes both a link for direct signing
1573
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.
1574
1714
  */
1575
1715
  declare const startSigningSession: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, key: string) => Promise<ISignerTokenResponse>;
1576
1716
  /**
1577
- * 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.
1578
1729
  */
1579
1730
  declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string) => Promise<IInPersonLinkResponse>;
1580
1731
  /**
@@ -1582,7 +1733,17 @@ declare const getInPersonLink: (endpoint: VerdocsEndpoint, envelope_id: string,
1582
1733
  */
1583
1734
  declare const sendDelegate: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<IEnvelope>;
1584
1735
  /**
1585
- * 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.
1586
1747
  */
1587
1748
  declare const resendInvitation: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string) => Promise<any>;
1588
1749
  /**
@@ -1635,18 +1796,39 @@ declare const getNextRecipient: (envelope: IEnvelope) => IRecipient;
1635
1796
  * a signature block to be used for all signature fields in the document. Thus, this is typically called one time to
1636
1797
  * create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
1637
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.
1638
1805
  */
1639
1806
  declare const createSignature: (endpoint: VerdocsEndpoint, name: string, signature: Blob) => Promise<ISignature>;
1640
1807
  /**
1641
- * Get the availbable signatures for a user.
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.
1642
1814
  */
1643
1815
  declare const getSignatures: (endpoint: VerdocsEndpoint) => Promise<ISignature[]>;
1644
1816
  /**
1645
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.
1646
1823
  */
1647
1824
  declare const getSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
1648
1825
  /**
1649
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
1650
1832
  */
1651
1833
  declare const deleteSignature: (endpoint: VerdocsEndpoint, signatureId: string) => Promise<any>;
1652
1834
  interface ICreateApiKeyRequest {
@@ -1925,6 +2107,11 @@ type TAuthenticationRequest = IROPCRequest | IClientCredentialsRequest | IRefres
1925
2107
  * const {access_token} = await Auth.authenticate({ client_id: '...', client_secret: '...', grant_type:'client_credentials' });
1926
2108
  * VerdocsEndpoint.getDefault().setAuthToken(access_token);
1927
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
1928
2115
  */
1929
2116
  declare const authenticate: (endpoint: VerdocsEndpoint, params: TAuthenticationRequest) => Promise<IAuthenticateResponse>;
1930
2117
  /**
@@ -2466,7 +2653,7 @@ interface IGetTemplatesParams {
2466
2653
  /** List only those templates created by the caller. */
2467
2654
  is_creator?: boolean;
2468
2655
  /** Visibility status of templates to include. private_shared is the default (private + shared) */
2469
- visibility: TTemplateVisibilityFilter;
2656
+ visibility?: TTemplateVisibilityFilter;
2470
2657
  /** Sort order */
2471
2658
  sort_by?: TSortTemplateBy;
2472
2659
  /** Set to true or false to control the sort order. Omit this field to sort dates descending, names ascending. */
@@ -2487,6 +2674,21 @@ interface IGetTemplatesParams {
2487
2674
  * await getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
2488
2675
  * await getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
2489
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
2490
2692
  */
2491
2693
  declare const getTemplates: (endpoint: VerdocsEndpoint, params?: IGetTemplatesParams) => Promise<{
2492
2694
  count: number;