@verdocs/js-sdk 6.7.5 → 6.7.7

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
@@ -1030,7 +1030,7 @@ type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "prepare
1030
1030
  // Modification events have a string description
1031
1031
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
1032
1032
  type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
1033
- type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "recipient_submitted" | "recipient_updated" | "recipient_delegated" | "kba_event" | "entitlement_used" | "recipient_invited" | "recipient_reminded" | "recipient_auth_fail" | "recipient_disclosure_accepted" | "recipient_docs_downloaded" | "recipient_invite_failed";
1033
+ type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "recipient_submitted" | "recipient_updated" | "recipient_delegated" | "kba_event" | "entitlement_used" | "recipient_invited" | "recipient_reminded" | "recipient_opened" | "recipient_auth_fail" | "recipient_disclosure_accepted" | "recipient_docs_downloaded" | "recipient_invite_failed" | "recipient_declined";
1034
1034
  declare const WEBHOOK_EVENTS: readonly [
1035
1035
  "envelope_created",
1036
1036
  "envelope_completed",
@@ -1048,10 +1048,12 @@ declare const WEBHOOK_EVENTS: readonly [
1048
1048
  "entitlement_used",
1049
1049
  "recipient_invited",
1050
1050
  "recipient_reminded",
1051
+ "recipient_opened",
1051
1052
  "recipient_auth_fail",
1052
1053
  "recipient_disclosure_accepted",
1053
1054
  "recipient_docs_downloaded",
1054
- "recipient_invite_failed"
1055
+ "recipient_invite_failed",
1056
+ "recipient_declined"
1055
1057
  ];
1056
1058
  type TTemplateVisibility = "private" | "shared" | "public";
1057
1059
  type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
package/dist/index.d.ts CHANGED
@@ -1030,7 +1030,7 @@ type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "prepare
1030
1030
  // Modification events have a string description
1031
1031
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
1032
1032
  type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
1033
- type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "recipient_submitted" | "recipient_updated" | "recipient_delegated" | "kba_event" | "entitlement_used" | "recipient_invited" | "recipient_reminded" | "recipient_auth_fail" | "recipient_disclosure_accepted" | "recipient_docs_downloaded" | "recipient_invite_failed";
1033
+ type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "recipient_submitted" | "recipient_updated" | "recipient_delegated" | "kba_event" | "entitlement_used" | "recipient_invited" | "recipient_reminded" | "recipient_opened" | "recipient_auth_fail" | "recipient_disclosure_accepted" | "recipient_docs_downloaded" | "recipient_invite_failed" | "recipient_declined";
1034
1034
  declare const WEBHOOK_EVENTS: readonly [
1035
1035
  "envelope_created",
1036
1036
  "envelope_completed",
@@ -1048,10 +1048,12 @@ declare const WEBHOOK_EVENTS: readonly [
1048
1048
  "entitlement_used",
1049
1049
  "recipient_invited",
1050
1050
  "recipient_reminded",
1051
+ "recipient_opened",
1051
1052
  "recipient_auth_fail",
1052
1053
  "recipient_disclosure_accepted",
1053
1054
  "recipient_docs_downloaded",
1054
- "recipient_invite_failed"
1055
+ "recipient_invite_failed",
1056
+ "recipient_declined"
1055
1057
  ];
1056
1058
  type TTemplateVisibility = "private" | "shared" | "public";
1057
1059
  type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
package/dist/index.js CHANGED
@@ -20,10 +20,12 @@ const WEBHOOK_EVENTS = [
20
20
  'entitlement_used',
21
21
  'recipient_invited',
22
22
  'recipient_reminded',
23
+ 'recipient_opened',
23
24
  'recipient_auth_fail',
24
25
  'recipient_disclosure_accepted',
25
26
  'recipient_docs_downloaded',
26
27
  'recipient_invite_failed',
28
+ 'recipient_declined',
27
29
  ];
28
30
 
29
31
  const FIELD_TYPES = [
@@ -161,7 +163,7 @@ function getRGBA(roleIndex) {
161
163
  * is not specified explicitly, but will be the same for every call with the same input value.
162
164
  */
163
165
  function nameToRGBA(str) {
164
- if (!!str) {
166
+ if (str) {
165
167
  const validNum = parseInt(str.slice(-1), 10);
166
168
  if (!isNaN(validNum)) {
167
169
  str += (validNum * 99).toString();
@@ -1435,7 +1437,7 @@ class VerdocsEndpoint {
1435
1437
  this.profile = r || null;
1436
1438
  this.notifySessionListeners();
1437
1439
  })
1438
- .catch((e) => {
1440
+ .catch(() => {
1439
1441
  this.profile = null;
1440
1442
  this.sub = null;
1441
1443
  // We can't clear the token verdocs-auth may be using temporarily during registration
@@ -2665,7 +2667,7 @@ const isFieldFilled = (field, allRecipientFields) => {
2665
2667
  case 'checkbox':
2666
2668
  return value === 'true';
2667
2669
  case 'radio':
2668
- if (!!field.group) {
2670
+ if (field.group) {
2669
2671
  return allRecipientFields.filter((f) => f.group === field.group).some((field) => field.value === 'true');
2670
2672
  }
2671
2673
  return field.value === 'true';