leadconduit-trustedform 2.4.0 → 2.4.1
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org)
|
|
4
4
|
|
|
5
|
+
## [2.4.1] - 2024-08-12
|
|
6
|
+
### Added
|
|
7
|
+
- added "|" to be the default scan delimiter for TF version 4
|
|
8
|
+
|
|
5
9
|
## [2.4.0] - 2024-04-10
|
|
6
10
|
### Added
|
|
7
11
|
- v4 integration now supports optional api key mapping
|
package/lib/trustedform.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { get } = require('lodash');
|
|
1
2
|
const helpers = require('./helpers');
|
|
2
3
|
const { compact, pickBy, isUndefined } = require('lodash');
|
|
3
4
|
|
|
@@ -24,7 +25,7 @@ const request = (vars) => {
|
|
|
24
25
|
body.insights.scans = {
|
|
25
26
|
required: trustedform.scan_required_text,
|
|
26
27
|
forbidden: trustedform.scan_forbidden_text,
|
|
27
|
-
delimiter: trustedform
|
|
28
|
+
delimiter: get(trustedform, 'scan_delimiter', '|'),
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -179,8 +180,8 @@ const response = (vars, req, res) => {
|
|
|
179
180
|
page_url: parsed.insights?.properties?.page_url,
|
|
180
181
|
parent_page_url: parsed.insights?.properties?.parent_page_url,
|
|
181
182
|
|
|
182
|
-
languages: parsed.
|
|
183
|
-
language_approved: parsed.
|
|
183
|
+
languages: parsed.verify?.languages.map(lang => lang.text),
|
|
184
|
+
language_approved: parsed.verify?.result?.language_approved,
|
|
184
185
|
success: parsed.verify?.result?.success,
|
|
185
186
|
}, (v) => { return !isUndefined(v); });
|
|
186
187
|
// only include this property if page scan was selected
|
|
@@ -256,7 +257,7 @@ response.variables = () => [
|
|
|
256
257
|
{ name: 'page_url', type: 'string', description: 'The URL of the page hosting TrustedForm Certify.' },
|
|
257
258
|
{ name: 'parent_page_url', type: 'string', description: 'The parent URL of the page hosting TrustedForm Certify, if framed.' },
|
|
258
259
|
{ name: 'verify.languages', type: 'array', description: 'A list of the consent languages detected within the certificate' },
|
|
259
|
-
{ name: 'verify.language_approved', type: '
|
|
260
|
+
{ name: 'verify.language_approved', type: 'boolean', description: 'A boolean indicating if any of the consent languages found have been approved in your account\'s consent language manager.' },
|
|
260
261
|
{ name: 'verify.success', type: 'boolean', description: 'A boolean indicating if any of the consent languages found meet the success criteria defined for your account.' },
|
|
261
262
|
];
|
|
262
263
|
|