Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bank account verification plugin #2931

Merged
merged 18 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5aea501
feat(plugins): add bank account verification plugin
tomer-shvadron Dec 31, 2024
bfa3a23
feat(bank-account-verification): enhance bank account verification lo…
tomer-shvadron Jan 1, 2025
503b300
fix(middleware): enable setting entities in middleware classes
tomer-shvadron Jan 1, 2025
fe9fbf6
chore(release): bump package versions and update changelogs
tomer-shvadron Jan 2, 2025
64082a7
Revert "chore(release): bump package versions and update changelogs"
tomer-shvadron Jan 3, 2025
3f12a01
chore(workflows): update workflow configurations and dependencies
tomer-shvadron Jan 3, 2025
ba7779a
chore(all): update package versions and dependencies
tomer-shvadron Jan 3, 2025
d1a2665
Merge branch 'dev' into bal-3173
alonp99 Jan 4, 2025
294baa2
Merge branch 'dev' into bal-3173
tomer-shvadron Jan 12, 2025
6650723
chore: bump versions and update dependencies across multiple packages
tomer-shvadron Jan 12, 2025
57a74a2
Merge branch 'dev' into bal-3173
tomer-shvadron Jan 19, 2025
3d7a616
refactor(plugins): rename ballerine-plugin to ballerine-api-plugin
tomer-shvadron Jan 20, 2025
f2af165
fix(plugin): correct transformers order in handleJmespathTransformers
tomer-shvadron Jan 20, 2025
8ef6db8
Merge branch 'dev' into bal-3173
tomer-shvadron Jan 21, 2025
dac1b7e
chore: bump versions across multiple packages and update dependencies
tomer-shvadron Jan 21, 2025
28bb4f2
chore(deps): update vite dependency to use @types/[email protected]
tomer-shvadron Jan 21, 2025
b22d99e
test(external-plugin): enhance plugin tests with additional properties
tomer-shvadron Jan 21, 2025
60f0be9
Merge branch 'dev' into bal-3173
tomer-shvadron Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/backoffice-v2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @ballerine/backoffice-v2

## 0.7.86

### Patch Changes

- bank account verification plugin
- @ballerine/[email protected]
- @ballerine/[email protected]

## 0.7.85

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions apps/backoffice-v2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ballerine/backoffice-v2",
"version": "0.7.85",
"version": "0.7.86",
"description": "Ballerine - Backoffice",
"homepage": "https://github.com/ballerine-io/ballerine",
"type": "module",
Expand Down Expand Up @@ -55,8 +55,8 @@
"@ballerine/common": "0.9.61",
"@ballerine/react-pdf-toolkit": "^1.2.54",
"@ballerine/ui": "^0.5.54",
"@ballerine/workflow-browser-sdk": "0.6.80",
"@ballerine/workflow-node-sdk": "0.6.80",
"@ballerine/workflow-browser-sdk": "0.6.81",
"@ballerine/workflow-node-sdk": "0.6.81",
"@botpress/webchat": "^2.1.10",
"@botpress/webchat-generator": "^0.2.9",
"@fontsource/inter": "^4.5.15",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { createBlocksTyped } from '@/lib/blocks/create-blocks-typed/create-block
import { WarningFilledSvg } from '@ballerine/ui';

export const useKybRegistryInfoBlock = ({ pluginsOutput, workflow }) => {
const isBankAccountVerification = useMemo(
() => !!pluginsOutput?.bankAccountVerification,
[pluginsOutput?.bankAccountVerification],
);

const getCell = useCallback(() => {
if (Object.keys(pluginsOutput?.businessInformation?.data?.[0] ?? {}).length) {
return {
Expand All @@ -28,6 +33,39 @@ export const useKybRegistryInfoBlock = ({ pluginsOutput, workflow }) => {
>;
}

if (Object.keys(pluginsOutput?.bankAccountVerification?.clientResponsePayload ?? {}).length) {
const data = {
...pluginsOutput?.bankAccountVerification?.responseHeader.overallResponse,
decisionElements:
pluginsOutput?.bankAccountVerification?.clientResponsePayload.decisionElements,
orchestrationDecisions:
pluginsOutput?.bankAccountVerification?.clientResponsePayload.orchestrationDecisions,
};

return {
id: 'nested-details',
type: 'details',
hideSeparator: true,
value: {
data: Object.entries(data)
?.filter(([property]) => {
console.log(property);

return !['tenantID', 'clientReferenceId'].includes(property);
})
.map(([title, value]) => ({
title,
value,
})),
},
} satisfies Extract<
Parameters<ReturnType<typeof createBlocksTyped>['addCell']>[0],
{
type: 'details';
}
>;
}

const message =
pluginsOutput?.businessInformation?.message ??
pluginsOutput?.businessInformation?.data?.message;
Expand Down Expand Up @@ -94,12 +132,12 @@ export const useKybRegistryInfoBlock = ({ pluginsOutput, workflow }) => {
.addCell({
id: 'nested-details-heading',
type: 'heading',
value: 'Registry Information',
value: isBankAccountVerification ? 'Bank Account Verification' : 'Registry Information',
})
.addCell({
id: 'nested-details-subheading',
type: 'subheading',
value: 'Registry-Provided Data',
value: `${isBankAccountVerification ? 'Experian' : 'Registry'}-Provided Data`,
props: {
className: 'mb-4',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ export const useDefaultBlocksLogic = () => {
...entityDataAdditionalInfo
} = workflow?.context?.entity?.data?.additionalInfo ?? {};
const { website: websiteBasicRequirement, processingDetails, ...storeInfo } = store ?? {};
const kycChildWorkflows = workflow?.childWorkflows?.filter(
childWorkflow => childWorkflow?.context?.entity?.type === 'individual',
);

const kybChildWorkflows = workflow?.childWorkflows?.filter(
childWorkflow => childWorkflow?.context?.entity?.type === 'business',
);
Expand Down
6 changes: 6 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# kyb-app

## 0.3.101

### Patch Changes

- @ballerine/[email protected]

## 0.3.100

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/kyb-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/kyb-app",
"private": true,
"version": "0.3.100",
"version": "0.3.101",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -18,7 +18,7 @@
"@ballerine/blocks": "0.2.30",
"@ballerine/common": "^0.9.61",
"@ballerine/ui": "0.5.56",
"@ballerine/workflow-browser-sdk": "0.6.80",
"@ballerine/workflow-browser-sdk": "0.6.81",
"@lukemorales/query-key-factory": "^1.0.3",
"@radix-ui/react-icons": "^1.3.0",
"@rjsf/core": "^5.9.0",
Expand Down
6 changes: 6 additions & 0 deletions examples/headless-example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/headless-example

## 0.3.80

### Patch Changes

- @ballerine/[email protected]

## 0.3.79

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/headless-example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/headless-example",
"private": true,
"version": "0.3.79",
"version": "0.3.80",
"type": "module",
"scripts": {
"spellcheck": "cspell \"*\"",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@ballerine/common": "0.9.61",
"@ballerine/workflow-browser-sdk": "0.6.80",
"@ballerine/workflow-browser-sdk": "0.6.81",
"@felte/reporter-svelte": "^1.1.5",
"@felte/validator-zod": "^1.0.13",
"@fontsource/inter": "^4.5.15",
Expand Down
6 changes: 6 additions & 0 deletions packages/workflow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ballerine/workflow-core

## 0.6.81

### Patch Changes

- bank account verification plugin

## 0.6.80

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/workflow-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ballerine/workflow-core",
"author": "Ballerine <[email protected]>",
"version": "0.6.80",
"version": "0.6.81",
"description": "workflow-core",
"module": "./dist/esm/index.js",
"main": "./dist/cjs/index.js",
Expand Down
3 changes: 3 additions & 0 deletions packages/workflow-core/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { BALLERINE_API_PLUGINS } from './plugins/external-plugin/vendor-consts';
import { BallerineApiPlugin } from './plugins/external-plugin/ballerine-plugin';
import { BallerineEmailPlugin } from './plugins/external-plugin/ballerine-email-plugin';
import { IndividualsSanctionsV2Plugin } from './plugins/external-plugin/individuals-sanctions-v2-plugin/individuals-sanctions-v2-plugin';
import { BankAccountVerificationPlugin } from './plugins/external-plugin/bank-account-verification-plugin/bank-account-verification-plugin';

export const PluginKind = {
KYC: 'kyc',
Expand All @@ -18,6 +19,7 @@ export const PluginKind = {
EMAIL: 'email',
MASTERCARD_MERCHANT_SCREENING: 'mastercard-merchant-screening',
INDIVIDUAL_SANCTIONS_V2: 'individual-sanctions-v2',
BANK_ACCOUNT_VERIFICATION: 'bank-account-verification',
} as const;

export const pluginsRegistry = {
Expand All @@ -28,6 +30,7 @@ export const pluginsRegistry = {
[PluginKind.EMAIL]: EmailPlugin,
[PluginKind.MASTERCARD_MERCHANT_SCREENING]: MastercardMerchantScreeningPlugin,
[PluginKind.INDIVIDUAL_SANCTIONS_V2]: IndividualsSanctionsV2Plugin,
[PluginKind.BANK_ACCOUNT_VERIFICATION]: BankAccountVerificationPlugin,
[BALLERINE_API_PLUGINS['individual-sanctions']]: BallerineApiPlugin,
[BALLERINE_API_PLUGINS['company-sanctions']]: BallerineApiPlugin,
[BALLERINE_API_PLUGINS['ubo']]: BallerineApiPlugin,
Expand Down
Loading
Loading