@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.mjs CHANGED
@@ -22,6 +22,7 @@ const WEBHOOK_EVENTS = [
22
22
  'recipient_disclosure_accepted',
23
23
  'recipient_docs_downloaded',
24
24
  'recipient_invite_failed',
25
+ 'recipient_declined',
25
26
  ];
26
27
 
27
28
  const FIELD_TYPES = [
@@ -159,7 +160,7 @@ function getRGBA(roleIndex) {
159
160
  * is not specified explicitly, but will be the same for every call with the same input value.
160
161
  */
161
162
  function nameToRGBA(str) {
162
- if (!!str) {
163
+ if (str) {
163
164
  const validNum = parseInt(str.slice(-1), 10);
164
165
  if (!isNaN(validNum)) {
165
166
  str += (validNum * 99).toString();
@@ -1433,7 +1434,7 @@ class VerdocsEndpoint {
1433
1434
  this.profile = r || null;
1434
1435
  this.notifySessionListeners();
1435
1436
  })
1436
- .catch((e) => {
1437
+ .catch(() => {
1437
1438
  this.profile = null;
1438
1439
  this.sub = null;
1439
1440
  // We can't clear the token verdocs-auth may be using temporarily during registration
@@ -2663,7 +2664,7 @@ const isFieldFilled = (field, allRecipientFields) => {
2663
2664
  case 'checkbox':
2664
2665
  return value === 'true';
2665
2666
  case 'radio':
2666
- if (!!field.group) {
2667
+ if (field.group) {
2667
2668
  return allRecipientFields.filter((f) => f.group === field.group).some((field) => field.value === 'true');
2668
2669
  }
2669
2670
  return field.value === 'true';