leadconduit-trustedform 2.4.3 → 2.4.5

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,11 @@
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.3] - 2025-01-08
6
+ ### Fixed
7
+ - v4 now appends `share_url` ([sc-84484](https://app.shortcut.com/active-prospect/story/84484/trustedform-v4-retain-include-trustedform-share-url-as-an-appended-field))
8
+ and `verify.form_submitted` ([sc-84576](https://app.shortcut.com/active-prospect/story/84576/trustedform-v4-verify-include-form-submitted-as-an-appended-field))
9
+
5
10
  ## [2.4.1] - 2024-08-12
6
11
  ### Added
7
12
  - added "|" to be the default scan delimiter for TF version 4
@@ -136,14 +136,16 @@ const response = (vars, req, res) => {
136
136
  try {
137
137
  const parsed = JSON.parse(res.body);
138
138
  if (res.status === 200) {
139
- const verify = hasVerifyData(parsed)
139
+ const verify = hasVerifyData(parsed)
140
140
  ? pickBy({
141
141
  languages: parsed.verify.languages.map(lang => lang.text),
142
+ form_submitted: parsed.verify.result.form_submitted,
142
143
  language_approved: parsed.verify.result.language_approved,
144
+ // note that the Verify one_to_one value is handled separately
143
145
  success: parsed.verify.result.success,
144
- }, (v) => !isUndefined(v))
145
- : undefined;
146
-
146
+ }, (v) => !isUndefined(v))
147
+ : undefined;
148
+
147
149
  const appended = pickBy({
148
150
  outcome: parsed.outcome,
149
151
  reason: parsed.reason,
@@ -153,12 +155,13 @@ const response = (vars, req, res) => {
153
155
  successful_match: parsed.match_lead?.result?.success,
154
156
  email_fingerprint_matched: parsed.match_lead?.result?.email_match,
155
157
  phone_fingerprint_matched: parsed.match_lead?.result?.phone_match,
158
+
156
159
  reference_code: parsed.retain?.reference,
157
160
  vendor: parsed.retain?.vendor,
158
-
159
161
  previously_retained: parsed.retain?.results?.previously_retained,
160
- expires_at: parsed.retain?.results?.expires_at || parsed.insights?.properties?.expires_at,
161
162
  masked_cert_url: parsed.retain?.results?.masked_cert_url,
163
+ share_url: parsed.retain?.results?.share_url,
164
+ expires_at: parsed.retain?.results?.expires_at || parsed.insights?.properties?.expires_at,
162
165
 
163
166
  scans_result: parsed.insights?.scans?.result?.success,
164
167
  required_scans_found: parsed.insights?.scans?.result?.required?.found,
@@ -233,6 +236,7 @@ response.variables = () => [
233
236
  { name: 'previously_retained', type: 'boolean', description: 'A boolean indicating whether your account had already retained this certificate.' },
234
237
  { name: 'expires_at', type: 'time', description: 'The UTC ISO8601 formatted date and time when this certificate will no longer be available for API requests.' },
235
238
  { name: 'masked_cert_url', type: 'url', description: 'The certificate url that masks the lead source url and snapshot' },
239
+ { name: 'share_url', type: 'url', description: 'The expiring share URL of the certificate' },
236
240
  { name: 'scans_result', type: 'boolean', description: 'A boolean indicating if all required text was found and none of the forbidden text was found.' },
237
241
  { name: 'required_scans_found', type: 'array', description: 'A list of required scan terms that were found in the recorded content.' },
238
242
  { name: 'required_scans_not_found', type: 'array', description: 'A list of required scan terms that were not found in the recorded content.' },
@@ -269,6 +273,7 @@ response.variables = () => [
269
273
  { name: 'one_to_one', type: 'boolean', description: 'A boolean indicating if the cert structure satisfied the requirements for 1:1 consent.' },
270
274
  { name: 'verify.languages', type: 'array', description: 'A list of the consent languages detected within the certificate' },
271
275
  { 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.' },
276
+ { name: 'verify.form_submitted', type: 'boolean', description: 'A boolean indicating whether the form was successfully submitted by the consumer.' },
272
277
  { name: 'verify.success', type: 'boolean', description: 'A boolean indicating if any of the consent languages found meet the success criteria defined for your account.' },
273
278
  ];
274
279