From b2751c26a513bc8a8f7df5efbf240c5a066c0f07 Mon Sep 17 00:00:00 2001 From: dhiva-pattabhiraman Date: Tue, 18 Jan 2022 10:54:47 +0000 Subject: [PATCH] Updated doc-scan example to illustrate the use of Watchlist Advanced Config for a custom account. (Commented code only) --- .../src/controllers/index.controller.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/examples/doc-scan/src/controllers/index.controller.js b/examples/doc-scan/src/controllers/index.controller.js index babd069b..5ef5b9b1 100644 --- a/examples/doc-scan/src/controllers/index.controller.js +++ b/examples/doc-scan/src/controllers/index.controller.js @@ -43,6 +43,32 @@ async function createSession() { .build()) .build(); + /** + * Example of setting up Watchlist Advanced Config for a custom account + * with search profile + * + const { + RequestedCustomAccountWatchlistAdvancedCaConfigBuilder, + RequestedSearchProfileSourcesBuilder, + } = require('yoti'); + + const customAccountWatchListAdvancedCaConfig = + new RequestedCustomAccountWatchlistAdvancedCaConfigBuilder() + .withRemoveDeceased(false) + .withShareUrl(false) + .withApiKey('your-api-key') + .withMonitoring(false) + .withClientRef('your-client-reference') + .withTags({ tag1: 'tag1-value' }) + .withSources(new RequestedSearchProfileSourcesBuilder() + .withSearchProfile('your-search-profile-id') + .build()) + .withMatchingStrategy(new RequestedFuzzyMatchingStrategyBuilder() + .withFuzziness(0.5) + .build()) + .build(); + */ + const sessionSpec = new SessionSpecificationBuilder() .withClientSessionTokenTtl(600) .withResourcesTtl(90000)