@verdocs/js-sdk 5.1.6 → 5.1.8
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/dist/index.d.mts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -398,6 +398,7 @@ interface IWebhookEvents {
|
|
|
398
398
|
envelope_completed: boolean;
|
|
399
399
|
envelope_updated: boolean;
|
|
400
400
|
envelope_canceled: boolean;
|
|
401
|
+
envelope_expired: boolean;
|
|
401
402
|
template_created: boolean;
|
|
402
403
|
template_updated: boolean;
|
|
403
404
|
template_deleted: boolean;
|
|
@@ -501,6 +502,8 @@ interface IEnvelope {
|
|
|
501
502
|
updated_at: string;
|
|
502
503
|
/** Date/time when the envelope was canceled, or null. */
|
|
503
504
|
canceled_at: string;
|
|
505
|
+
/** Date/time when the envelope will automatically expire, or null. */
|
|
506
|
+
expires_at?: string;
|
|
504
507
|
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
505
508
|
visibility: "private" | "shared";
|
|
506
509
|
search_key?: string | null;
|
|
@@ -965,12 +968,12 @@ type TAccessKeyType = "email" | "in_app" | "in_person_link" | "sms";
|
|
|
965
968
|
type TApiKeyPermission = "personal" | "global_read" | "global_write";
|
|
966
969
|
/** @deprecated. See envelope.created_at, .updated_at, and .canceled_at. */
|
|
967
970
|
type TDeprecatedHistoryEvent = "envelope:created" | "envelope:completed";
|
|
968
|
-
type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submitted" | "recipient:prepared" | "recipient:claimed" | "recipient:agreed" | "recipient:invited" | "recipient:reminder" | "recipient:delegated" | "recipient:updated_info" | "recipient:declined" | "recipient:kba_verified" | "recipient:kba_failed" | "recipient:id_verified" | "recipient:id_failed" | "recipient:pin_verified" | "recipient:pin_failed" | "invitation:resent" | "envelope:cc" | "envelope:canceled" | "owner:updated_recipient_info" | "owner:get_in_person_link" | TDeprecatedHistoryEvent;
|
|
971
|
+
type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submitted" | "recipient:prepared" | "recipient:claimed" | "recipient:agreed" | "recipient:invited" | "recipient:reminder" | "recipient:delegated" | "recipient:updated_info" | "recipient:declined" | "recipient:kba_verified" | "recipient:kba_failed" | "recipient:id_verified" | "recipient:id_failed" | "recipient:pin_verified" | "recipient:pin_failed" | "invitation:resent" | "envelope:cc" | "envelope:canceled" | "envelope:expired" | "owner:updated_recipient_info" | "owner:get_in_person_link" | TDeprecatedHistoryEvent;
|
|
969
972
|
type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
|
|
970
973
|
// Modification events have a string description
|
|
971
974
|
type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
|
|
972
975
|
type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
973
|
-
type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
|
|
976
|
+
type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
|
|
974
977
|
type TTemplateVisibility = "private" | "shared" | "public";
|
|
975
978
|
type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
|
|
976
979
|
/**
|
|
@@ -982,7 +985,7 @@ type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kb
|
|
|
982
985
|
*/
|
|
983
986
|
type TRecipientAuthMethod = "kba" | "passcode" | "sms" | "email" | "id";
|
|
984
987
|
type TRecipientAuthStep = TRecipientAuthMethod | null;
|
|
985
|
-
type TUsageType = "envelope" | "envelope_canceled" | "envelope_completed" | "sms_invite" | "template" | "auth_email" | "auth_sms" | "auth_kba" | "auth_id" | "auth_passcode";
|
|
988
|
+
type TUsageType = "envelope" | "envelope_canceled" | "envelope_completed" | "envelope_expired" | "sms_invite" | "template" | "auth_email" | "auth_sms" | "auth_kba" | "auth_id" | "auth_passcode";
|
|
986
989
|
declare const FIELD_TYPES: TFieldType[];
|
|
987
990
|
declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
|
|
988
991
|
declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
|
|
@@ -1359,6 +1362,7 @@ interface ICreateEnvelopeFromTemplateRequest {
|
|
|
1359
1362
|
description?: string;
|
|
1360
1363
|
fields?: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
|
|
1361
1364
|
environment?: string;
|
|
1365
|
+
/** If set, Verdocs will not attempt to contact the recipient via email or SMS. */
|
|
1362
1366
|
no_contact?: boolean;
|
|
1363
1367
|
/** Override the sender name of the envelope in email and other notifications. NOTE: To prevent spam filters from blocking messages, only the NAME may be overidden. The "from" email address will be notifications@verdocs.com and cannot be changed. */
|
|
1364
1368
|
sender_name?: string;
|
|
@@ -1366,6 +1370,8 @@ interface ICreateEnvelopeFromTemplateRequest {
|
|
|
1366
1370
|
initial_reminder?: number;
|
|
1367
1371
|
/** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
|
|
1368
1372
|
followup_reminders?: number;
|
|
1373
|
+
/** If set, the envelope will automatically expire at the specified date/time (ISO8601, UTC) */
|
|
1374
|
+
expires_at?: string;
|
|
1369
1375
|
}
|
|
1370
1376
|
interface ICreateEnvelopeDirectlyRequest {
|
|
1371
1377
|
name: string;
|
|
@@ -1375,11 +1381,14 @@ interface ICreateEnvelopeDirectlyRequest {
|
|
|
1375
1381
|
documents: IEnvelopeDocument[];
|
|
1376
1382
|
fields: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
|
|
1377
1383
|
environment?: string;
|
|
1384
|
+
/** If set, Verdocs will not attempt to contact the recipient via email or SMS. */
|
|
1378
1385
|
no_contact?: boolean;
|
|
1379
1386
|
/** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
|
|
1380
1387
|
initial_reminder: number;
|
|
1381
1388
|
/** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
|
|
1382
1389
|
followup_reminders: number;
|
|
1390
|
+
/** If set, the envelope will automatically expire at the specified date/time (ISO8601, UTC) */
|
|
1391
|
+
expires_at?: string;
|
|
1383
1392
|
}
|
|
1384
1393
|
type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelopeDirectlyRequest;
|
|
1385
1394
|
interface IAuthenticateRecipientViaPasscodeRequest {
|
|
@@ -1448,15 +1457,17 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
|
|
|
1448
1457
|
* ```
|
|
1449
1458
|
*
|
|
1450
1459
|
* @group Envelopes
|
|
1451
|
-
* @api POST /v2/envelopes Create Envelope
|
|
1452
|
-
* @apiBody string(format:uuid) template_id
|
|
1460
|
+
* @api POST /v2/envelopes Create Envelope
|
|
1461
|
+
* @apiBody string(format:uuid) template_id If using a template, the ID of the template to copy
|
|
1453
1462
|
* @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
|
|
1463
|
+
* @apiBody array(items:IEnvelopeDocument) documents? If not using a template, a list of documents to include in the envelope.
|
|
1464
|
+
* @apiBody array(items:IEnvelopeField) fields? If not using a template, a list of fields to include in the envelope.
|
|
1454
1465
|
* @apiBody string name? Override the name of the envelope (defaults to the template name).
|
|
1455
1466
|
* @apiBody string description? Override the description of the envelope (defaults to the template description).
|
|
1456
|
-
* @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.
|
|
1457
1467
|
* @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
|
|
1458
1468
|
* @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
|
|
1459
1469
|
* @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
|
|
1470
|
+
* @apiBody string expires_at? If set, the envelope will automatically expire (be canceled) at this date and time. Expirations must be at least 1 day in the future.
|
|
1460
1471
|
* @apiSuccess IEnvelope . The newly-created envelope.
|
|
1461
1472
|
*/
|
|
1462
1473
|
declare const createEnvelope: (endpoint: VerdocsEndpoint, request: TCreateEnvelopeRequest) => Promise<IEnvelope>;
|
package/dist/index.d.ts
CHANGED
|
@@ -398,6 +398,7 @@ interface IWebhookEvents {
|
|
|
398
398
|
envelope_completed: boolean;
|
|
399
399
|
envelope_updated: boolean;
|
|
400
400
|
envelope_canceled: boolean;
|
|
401
|
+
envelope_expired: boolean;
|
|
401
402
|
template_created: boolean;
|
|
402
403
|
template_updated: boolean;
|
|
403
404
|
template_deleted: boolean;
|
|
@@ -501,6 +502,8 @@ interface IEnvelope {
|
|
|
501
502
|
updated_at: string;
|
|
502
503
|
/** Date/time when the envelope was canceled, or null. */
|
|
503
504
|
canceled_at: string;
|
|
505
|
+
/** Date/time when the envelope will automatically expire, or null. */
|
|
506
|
+
expires_at?: string;
|
|
504
507
|
/** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
|
|
505
508
|
visibility: "private" | "shared";
|
|
506
509
|
search_key?: string | null;
|
|
@@ -965,12 +968,12 @@ type TAccessKeyType = "email" | "in_app" | "in_person_link" | "sms";
|
|
|
965
968
|
type TApiKeyPermission = "personal" | "global_read" | "global_write";
|
|
966
969
|
/** @deprecated. See envelope.created_at, .updated_at, and .canceled_at. */
|
|
967
970
|
type TDeprecatedHistoryEvent = "envelope:created" | "envelope:completed";
|
|
968
|
-
type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submitted" | "recipient:prepared" | "recipient:claimed" | "recipient:agreed" | "recipient:invited" | "recipient:reminder" | "recipient:delegated" | "recipient:updated_info" | "recipient:declined" | "recipient:kba_verified" | "recipient:kba_failed" | "recipient:id_verified" | "recipient:id_failed" | "recipient:pin_verified" | "recipient:pin_failed" | "invitation:resent" | "envelope:cc" | "envelope:canceled" | "owner:updated_recipient_info" | "owner:get_in_person_link" | TDeprecatedHistoryEvent;
|
|
971
|
+
type THistoryEvent = "recipient:signed" | "recipient:opened" | "recipient:submitted" | "recipient:prepared" | "recipient:claimed" | "recipient:agreed" | "recipient:invited" | "recipient:reminder" | "recipient:delegated" | "recipient:updated_info" | "recipient:declined" | "recipient:kba_verified" | "recipient:kba_failed" | "recipient:id_verified" | "recipient:id_failed" | "recipient:pin_verified" | "recipient:pin_failed" | "invitation:resent" | "envelope:cc" | "envelope:canceled" | "envelope:expired" | "owner:updated_recipient_info" | "owner:get_in_person_link" | TDeprecatedHistoryEvent;
|
|
969
972
|
type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
|
|
970
973
|
// Modification events have a string description
|
|
971
974
|
type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
|
|
972
975
|
type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
|
|
973
|
-
type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
|
|
976
|
+
type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
|
|
974
977
|
type TTemplateVisibility = "private" | "shared" | "public";
|
|
975
978
|
type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
|
|
976
979
|
/**
|
|
@@ -982,7 +985,7 @@ type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kb
|
|
|
982
985
|
*/
|
|
983
986
|
type TRecipientAuthMethod = "kba" | "passcode" | "sms" | "email" | "id";
|
|
984
987
|
type TRecipientAuthStep = TRecipientAuthMethod | null;
|
|
985
|
-
type TUsageType = "envelope" | "envelope_canceled" | "envelope_completed" | "sms_invite" | "template" | "auth_email" | "auth_sms" | "auth_kba" | "auth_id" | "auth_passcode";
|
|
988
|
+
type TUsageType = "envelope" | "envelope_canceled" | "envelope_completed" | "envelope_expired" | "sms_invite" | "template" | "auth_email" | "auth_sms" | "auth_kba" | "auth_id" | "auth_passcode";
|
|
986
989
|
declare const FIELD_TYPES: TFieldType[];
|
|
987
990
|
declare const DEFAULT_FIELD_WIDTHS: Record<TFieldType, number>;
|
|
988
991
|
declare const DEFAULT_FIELD_HEIGHTS: Record<TFieldType, number>;
|
|
@@ -1359,6 +1362,7 @@ interface ICreateEnvelopeFromTemplateRequest {
|
|
|
1359
1362
|
description?: string;
|
|
1360
1363
|
fields?: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
|
|
1361
1364
|
environment?: string;
|
|
1365
|
+
/** If set, Verdocs will not attempt to contact the recipient via email or SMS. */
|
|
1362
1366
|
no_contact?: boolean;
|
|
1363
1367
|
/** Override the sender name of the envelope in email and other notifications. NOTE: To prevent spam filters from blocking messages, only the NAME may be overidden. The "from" email address will be notifications@verdocs.com and cannot be changed. */
|
|
1364
1368
|
sender_name?: string;
|
|
@@ -1366,6 +1370,8 @@ interface ICreateEnvelopeFromTemplateRequest {
|
|
|
1366
1370
|
initial_reminder?: number;
|
|
1367
1371
|
/** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
|
|
1368
1372
|
followup_reminders?: number;
|
|
1373
|
+
/** If set, the envelope will automatically expire at the specified date/time (ISO8601, UTC) */
|
|
1374
|
+
expires_at?: string;
|
|
1369
1375
|
}
|
|
1370
1376
|
interface ICreateEnvelopeDirectlyRequest {
|
|
1371
1377
|
name: string;
|
|
@@ -1375,11 +1381,14 @@ interface ICreateEnvelopeDirectlyRequest {
|
|
|
1375
1381
|
documents: IEnvelopeDocument[];
|
|
1376
1382
|
fields: Pick<IEnvelopeField, "name" | "role_name" | "default">[];
|
|
1377
1383
|
environment?: string;
|
|
1384
|
+
/** If set, Verdocs will not attempt to contact the recipient via email or SMS. */
|
|
1378
1385
|
no_contact?: boolean;
|
|
1379
1386
|
/** Delay (in seconds) before the first reminder is sent (min: 4hrs). Set to 0 or null to disable. */
|
|
1380
1387
|
initial_reminder: number;
|
|
1381
1388
|
/** Delay (in seconds) before subsequent remidners are sent (min: 12hrs). Set to 0 or null to disable. */
|
|
1382
1389
|
followup_reminders: number;
|
|
1390
|
+
/** If set, the envelope will automatically expire at the specified date/time (ISO8601, UTC) */
|
|
1391
|
+
expires_at?: string;
|
|
1383
1392
|
}
|
|
1384
1393
|
type TCreateEnvelopeRequest = ICreateEnvelopeFromTemplateRequest | ICreateEnvelopeDirectlyRequest;
|
|
1385
1394
|
interface IAuthenticateRecipientViaPasscodeRequest {
|
|
@@ -1448,15 +1457,17 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
|
|
|
1448
1457
|
* ```
|
|
1449
1458
|
*
|
|
1450
1459
|
* @group Envelopes
|
|
1451
|
-
* @api POST /v2/envelopes Create Envelope
|
|
1452
|
-
* @apiBody string(format:uuid) template_id
|
|
1460
|
+
* @api POST /v2/envelopes Create Envelope
|
|
1461
|
+
* @apiBody string(format:uuid) template_id If using a template, the ID of the template to copy
|
|
1453
1462
|
* @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
|
|
1463
|
+
* @apiBody array(items:IEnvelopeDocument) documents? If not using a template, a list of documents to include in the envelope.
|
|
1464
|
+
* @apiBody array(items:IEnvelopeField) fields? If not using a template, a list of fields to include in the envelope.
|
|
1454
1465
|
* @apiBody string name? Override the name of the envelope (defaults to the template name).
|
|
1455
1466
|
* @apiBody string description? Override the description of the envelope (defaults to the template description).
|
|
1456
|
-
* @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.
|
|
1457
1467
|
* @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
|
|
1458
1468
|
* @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
|
|
1459
1469
|
* @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
|
|
1470
|
+
* @apiBody string expires_at? If set, the envelope will automatically expire (be canceled) at this date and time. Expirations must be at least 1 day in the future.
|
|
1460
1471
|
* @apiSuccess IEnvelope . The newly-created envelope.
|
|
1461
1472
|
*/
|
|
1462
1473
|
declare const createEnvelope: (endpoint: VerdocsEndpoint, request: TCreateEnvelopeRequest) => Promise<IEnvelope>;
|
package/dist/index.js
CHANGED
|
@@ -1573,15 +1573,17 @@ class VerdocsEndpoint {
|
|
|
1573
1573
|
* ```
|
|
1574
1574
|
*
|
|
1575
1575
|
* @group Envelopes
|
|
1576
|
-
* @api POST /v2/envelopes Create Envelope
|
|
1577
|
-
* @apiBody string(format:uuid) template_id
|
|
1576
|
+
* @api POST /v2/envelopes Create Envelope
|
|
1577
|
+
* @apiBody string(format:uuid) template_id If using a template, the ID of the template to copy
|
|
1578
1578
|
* @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
|
|
1579
|
+
* @apiBody array(items:IEnvelopeDocument) documents? If not using a template, a list of documents to include in the envelope.
|
|
1580
|
+
* @apiBody array(items:IEnvelopeField) fields? If not using a template, a list of fields to include in the envelope.
|
|
1579
1581
|
* @apiBody string name? Override the name of the envelope (defaults to the template name).
|
|
1580
1582
|
* @apiBody string description? Override the description of the envelope (defaults to the template description).
|
|
1581
|
-
* @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.
|
|
1582
1583
|
* @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
|
|
1583
1584
|
* @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
|
|
1584
1585
|
* @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
|
|
1586
|
+
* @apiBody string expires_at? If set, the envelope will automatically expire (be canceled) at this date and time. Expirations must be at least 1 day in the future.
|
|
1585
1587
|
* @apiSuccess IEnvelope . The newly-created envelope.
|
|
1586
1588
|
*/
|
|
1587
1589
|
const createEnvelope = async (endpoint, request) => endpoint.api //
|