@verdocs/js-sdk 6.7.3 → 6.7.6

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_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",
@@ -1051,7 +1051,8 @@ declare const WEBHOOK_EVENTS: readonly [
1051
1051
  "recipient_auth_fail",
1052
1052
  "recipient_disclosure_accepted",
1053
1053
  "recipient_docs_downloaded",
1054
- "recipient_invite_failed"
1054
+ "recipient_invite_failed",
1055
+ "recipient_declined"
1055
1056
  ];
1056
1057
  type TTemplateVisibility = "private" | "shared" | "public";
1057
1058
  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_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",
@@ -1051,7 +1051,8 @@ declare const WEBHOOK_EVENTS: readonly [
1051
1051
  "recipient_auth_fail",
1052
1052
  "recipient_disclosure_accepted",
1053
1053
  "recipient_docs_downloaded",
1054
- "recipient_invite_failed"
1054
+ "recipient_invite_failed",
1055
+ "recipient_declined"
1055
1056
  ];
1056
1057
  type TTemplateVisibility = "private" | "shared" | "public";
1057
1058
  type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@ const WEBHOOK_EVENTS = [
24
24
  'recipient_disclosure_accepted',
25
25
  'recipient_docs_downloaded',
26
26
  'recipient_invite_failed',
27
+ 'recipient_declined',
27
28
  ];
28
29
 
29
30
  const FIELD_TYPES = [
@@ -161,7 +162,7 @@ function getRGBA(roleIndex) {
161
162
  * is not specified explicitly, but will be the same for every call with the same input value.
162
163
  */
163
164
  function nameToRGBA(str) {
164
- if (!!str) {
165
+ if (str) {
165
166
  const validNum = parseInt(str.slice(-1), 10);
166
167
  if (!isNaN(validNum)) {
167
168
  str += (validNum * 99).toString();
@@ -1435,7 +1436,7 @@ class VerdocsEndpoint {
1435
1436
  this.profile = r || null;
1436
1437
  this.notifySessionListeners();
1437
1438
  })
1438
- .catch((e) => {
1439
+ .catch(() => {
1439
1440
  this.profile = null;
1440
1441
  this.sub = null;
1441
1442
  // We can't clear the token verdocs-auth may be using temporarily during registration
@@ -2665,7 +2666,7 @@ const isFieldFilled = (field, allRecipientFields) => {
2665
2666
  case 'checkbox':
2666
2667
  return value === 'true';
2667
2668
  case 'radio':
2668
- if (!!field.group) {
2669
+ if (field.group) {
2669
2670
  return allRecipientFields.filter((f) => f.group === field.group).some((field) => field.value === 'true');
2670
2671
  }
2671
2672
  return field.value === 'true';