@verdocs/js-sdk 5.1.7 → 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 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;
@@ -967,7 +968,7 @@ type TAccessKeyType = "email" | "in_app" | "in_person_link" | "sms";
967
968
  type TApiKeyPermission = "personal" | "global_read" | "global_write";
968
969
  /** @deprecated. See envelope.created_at, .updated_at, and .canceled_at. */
969
970
  type TDeprecatedHistoryEvent = "envelope:created" | "envelope:completed";
970
- 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;
971
972
  type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
972
973
  // Modification events have a string description
973
974
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
@@ -1456,15 +1457,17 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
1456
1457
  * ```
1457
1458
  *
1458
1459
  * @group Envelopes
1459
- * @api POST /v2/envelopes Create Envelope From Template
1460
- * @apiBody string(format:uuid) template_id The ID of the template to copy
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
1461
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.
1462
1465
  * @apiBody string name? Override the name of the envelope (defaults to the template name).
1463
1466
  * @apiBody string description? Override the description of the envelope (defaults to the template description).
1464
- * @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.
1465
1467
  * @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
1466
1468
  * @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
1467
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.
1468
1471
  * @apiSuccess IEnvelope . The newly-created envelope.
1469
1472
  */
1470
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;
@@ -967,7 +968,7 @@ type TAccessKeyType = "email" | "in_app" | "in_person_link" | "sms";
967
968
  type TApiKeyPermission = "personal" | "global_read" | "global_write";
968
969
  /** @deprecated. See envelope.created_at, .updated_at, and .canceled_at. */
969
970
  type TDeprecatedHistoryEvent = "envelope:created" | "envelope:completed";
970
- 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;
971
972
  type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "preparer" | "manual" | "in_person_link" | "guest" | "email" | "" | string; // Modification events have a string description
972
973
  // Modification events have a string description
973
974
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
@@ -1456,15 +1457,17 @@ type TAuthenticateRecipientRequest = IAuthenticateRecipientViaPasscodeRequest |
1456
1457
  * ```
1457
1458
  *
1458
1459
  * @group Envelopes
1459
- * @api POST /v2/envelopes Create Envelope From Template
1460
- * @apiBody string(format:uuid) template_id The ID of the template to copy
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
1461
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.
1462
1465
  * @apiBody string name? Override the name of the envelope (defaults to the template name).
1463
1466
  * @apiBody string description? Override the description of the envelope (defaults to the template description).
1464
- * @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.
1465
1467
  * @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
1466
1468
  * @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
1467
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.
1468
1471
  * @apiSuccess IEnvelope . The newly-created envelope.
1469
1472
  */
1470
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 From Template
1577
- * @apiBody string(format:uuid) template_id The ID of the template to copy
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 //