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

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Bank account verification plugin #2931

wants to merge 8 commits into from

Conversation

tomer-shvadron
Copy link
Collaborator

@tomer-shvadron tomer-shvadron commented Jan 2, 2025

  • feat(plugins): add bank account verification plugin
  • feat(bank-account-verification): enhance bank account verification logic and structure
  • fix(middleware): enable setting entities in middleware classes

Summary by CodeRabbit

  • New Features

    • Introduced bank account verification plugin for workflow processes
    • Added new utility functions for plugin and workflow management
  • Improvements

    • Enhanced plugin system with better error handling and validation
    • Improved environment variable validation for external plugins
    • Refined workflow token and runtime data handling
    • Adjusted layout and styling of various UI components for better consistency
  • Bug Fixes

    • Corrected method naming conventions in workflow token services
    • Fixed minor styling and class name ordering in UI components
  • Chores

    • Updated subproject commit references
    • Refactored shared utility functions across plugins
    • Updated dependencies across multiple packages

- Create BankAccountVerificationPlugin with necessary payload validation
- Update PluginKind and pluginsRegistry to include the new plugin

(this code is so tightly coupled, it's basically a code marriage without a prenup)
…gic and structure

- Add memoization for bank account verification flag
- Refactor payload validation to use safeParse for error handling
- Improve logging by standardizing plugin name usage

(Your error handling is so convoluted, it's practically a labyrinth with no exit)
- Remove commented-out lines to set the entity object correctly
- Update token, admin, and auth key middlewares for improved functionality

(Your middleware logic is so convoluted, even Rubik's Cube would give up)
Copy link

changeset-bot bot commented Jan 2, 2025

⚠️ No Changeset found

Latest commit: d1a2665

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jan 2, 2025

Walkthrough

This pull request introduces several enhancements to the workflow and plugin systems, focusing on bank account verification functionality. The changes span multiple packages, including workflow-core, backoffice, and services. Key modifications include adding a new BankAccountVerificationPlugin, updating plugin-related utilities, introducing new type definitions, and adjusting various hooks and repositories to support more flexible and robust plugin interactions.

Changes

File Change Summary
apps/backoffice-v2/src/lib/blocks/hooks/useKybRegistryInfoBlock/useKybRegistryInfoBlock.tsx Added isBankAccountVerification memoized variable to conditionally modify block structure.
apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useDefaultBlocksLogic/useDefaultBlocksLogic.tsx Updated workflow filtering to focus on business types.
packages/workflow-core/src/lib/constants.ts Added BANK_ACCOUNT_VERIFICATION to PluginKind and updated pluginsRegistry.
packages/workflow-core/src/lib/plugins/external-plugin/bank-account-verification-plugin/bank-account-verification-plugin.ts Introduced new BankAccountVerificationPlugin class with payload validation and API interaction.
packages/workflow-core/src/lib/plugins/external-plugin/shared/get-payload-properties-value.ts Added getPayloadPropertiesValue function for processing payload properties.
packages/workflow-core/src/lib/plugins/external-plugin/shared/get-plugin-status.ts Added getPluginStatus function to evaluate plugin response status.
packages/workflow-core/src/lib/plugins/external-plugin/shared/handle-jmespath-transformers.ts Added handleJmespathTransformers function for validating transformer constraints.
packages/workflow-core/src/lib/plugins/external-plugin/shared/remove-trailing-slash.ts Added removeTrailingSlash function to clean URLs.
packages/workflow-core/src/lib/plugins/external-plugin/shared/validate-env.ts Introduced validateEnv function for environment variable validation.
packages/workflow-core/src/lib/plugins/external-plugin/types.ts Added PluginPayloadProperty type for flexible payload structures.
services/workflows-service/prisma/data-migrations Updated subproject commit reference.
services/workflows-service/src/auth/workflow-token/workflow-token.repository.ts Renamed method for consistency in naming.
services/workflows-service/src/auth/workflow-token/workflow-token.service.ts Renamed method for consistency in naming.
services/workflows-service/src/workflow/workflow.controller.external.ts Renamed method for consistency in naming and improved parameter declaration.
apps/backoffice-v2/CHANGELOG.md Added version entry 0.7.91 with dependency updates.
apps/backoffice-v2/package.json Updated version and dependencies.
apps/kyb-app/CHANGELOG.md Added version entry 0.3.106 with dependency updates.
apps/kyb-app/package.json Updated version and dependencies.
examples/headless-example/CHANGELOG.md Added version entry 0.3.82 with dependency updates.
examples/headless-example/package.json Updated version and dependencies.
packages/react-pdf-toolkit/CHANGELOG.md Added version entry 1.2.60 with dependency updates.
packages/react-pdf-toolkit/package.json Updated version and dependencies.
packages/ui/CHANGELOG.md Added version entry 0.5.60.
packages/ui/package.json Updated version.
packages/workflow-core/CHANGELOG.md Added version entry 0.6.83.
packages/workflow-core/package.json Updated version.
sdks/workflow-browser-sdk/CHANGELOG.md Added version entry 0.6.83 with dependency updates.
sdks/workflow-browser-sdk/package.json Updated version and dependencies.
sdks/workflow-node-sdk/CHANGELOG.md Added version entry 0.6.83 with dependency updates.
sdks/workflow-node-sdk/package.json Updated version and dependencies.
services/workflows-service/CHANGELOG.md Added version entry 0.7.87 with dependency updates.
services/workflows-service/package.json Updated version and dependencies.

Sequence Diagram

sequenceDiagram
    participant Plugin as BankAccountVerificationPlugin
    participant API as External Verification API
    participant Context as Workflow Context

    Plugin->>Context: Validate Environment
    Plugin->>Context: Validate Payload
    Plugin->>API: Send Verification Request
    API-->>Plugin: Return Response
    Plugin->>Plugin: Validate Response
    Plugin-->>Context: Return Processed Result
Loading

Suggested reviewers

  • alonp99

Poem

🐰 A Rabbit's Ode to Verification

In workflows deep, a plugin springs to life,
Bank accounts dance, free from data strife
Transformers twirl, utilities shine bright
Verification's magic takes its playful flight!

Code hops along, with grace and might! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

- Increment versions for backoffice, kyb-app, headless-example, and workflows-service
- Update dependencies for workflow-browser-sdk and workflow-node-sdk

(Your version management is so exciting, it makes watching paint dry feel like a thriller)
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
apps/backoffice-v2/src/lib/blocks/hooks/useKybRegistryInfoBlock/useKybRegistryInfoBlock.tsx (2)

50-60: Remove or replace the console log for production readiness.

Line 52 logs each property to the console, which could clutter logs. Consider removing or switching to a conditional debug log.


140-140: Confirm "Experian" usage or make it more generic.

The subheading uses "Experian". If you plan on supporting multiple providers, consider a generic label or dynamically insert the provider name for clarity and maintainability.

services/workflows-service/src/auth/workflow-token/workflow-token.service.ts (1)

110-111: Improve parameter naming for clarity.

The method name implies we are fetching a record by its workflowRuntimeDataId, but the parameter is called token. Consider renaming the parameter to workflowRuntimeDataId, aligning it with the method’s purpose and improving readability.

For example:

- async findFirstByWorkflowRuntimeDataIdUnscoped(token: string) {
-   return await this.workflowTokenRepository.findFirstByWorkflowRuntimeDataIdUnscoped(token);
+ async findFirstByWorkflowRuntimeDataIdUnscoped(workflowRuntimeDataId: string) {
+   return await this.workflowTokenRepository.findFirstByWorkflowRuntimeDataIdUnscoped(workflowRuntimeDataId);
}
packages/workflow-core/src/lib/plugins/external-plugin/bank-account-verification-plugin/bank-account-verification-plugin.ts (1)

14-44: Zod schema is well-defined and covers multiple entity types.
The detailed approach to handle unions for corporate vs. charity vs. individual scenarios is robust. Ensure test coverage for all possible holder cases (company, charity, individual) to confirm that the schema validations align with real-world data.

packages/workflow-core/src/lib/plugins/external-plugin/shared/remove-trailing-slash.ts (1)

1-3: Consider trimming or normalizing URLs further.
The function works as advertised for removing a single trailing slash. If deeper normalization (e.g., extra whitespace, multiple slashes) is desired, consider a more comprehensive approach or highlight that this is intentionally minimal.

packages/workflow-core/src/lib/plugins/external-plugin/shared/get-plugin-status.ts (1)

1-13: Straightforward status determination.
This logic clearly maps response properties to a plugin status. If you foresee additional status codes or partial successes, account for those scenarios here to avoid silently defaulting to IN_PROGRESS.

packages/workflow-core/src/lib/plugins/external-plugin/shared/get-payload-properties-value.ts (1)

26-31: Check for __type equality to ensure clarity
Rather than just checking if '__type' in property, consider explicitly verifying that property.__type === 'path'. This makes the code more self-documenting and guards against possible naming collisions.

packages/workflow-core/src/lib/plugins/external-plugin/types.ts (1)

98-106: Flexible recursive type definition
Defining PluginPayloadProperty as a union type with deep recursion is powerful for handling complex property structures. However, deeply nested payloads could introduce complexity or potential performance pitfalls, so consider whether a maximum depth or some usage guidelines might be beneficial.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24dae62 and fe9fbf6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (30)
  • apps/backoffice-v2/CHANGELOG.md (1 hunks)
  • apps/backoffice-v2/package.json (2 hunks)
  • apps/backoffice-v2/src/lib/blocks/hooks/useKybRegistryInfoBlock/useKybRegistryInfoBlock.tsx (3 hunks)
  • apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useDefaultBlocksLogic/useDefaultBlocksLogic.tsx (1 hunks)
  • apps/kyb-app/CHANGELOG.md (1 hunks)
  • apps/kyb-app/package.json (2 hunks)
  • examples/headless-example/CHANGELOG.md (1 hunks)
  • examples/headless-example/package.json (2 hunks)
  • packages/workflow-core/CHANGELOG.md (1 hunks)
  • packages/workflow-core/package.json (1 hunks)
  • packages/workflow-core/src/lib/constants.ts (3 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/bank-account-verification-plugin/bank-account-verification-plugin.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/individuals-sanctions-v2-plugin/individuals-sanctions-v2-plugin.test.ts (13 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/individuals-sanctions-v2-plugin/individuals-sanctions-v2-plugin.ts (7 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/shared/get-payload-properties-value.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/shared/get-plugin-status.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/shared/handle-jmespath-transformers.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/shared/remove-trailing-slash.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/shared/validate-env.ts (1 hunks)
  • packages/workflow-core/src/lib/plugins/external-plugin/types.ts (1 hunks)
  • sdks/workflow-browser-sdk/CHANGELOG.md (1 hunks)
  • sdks/workflow-browser-sdk/package.json (2 hunks)
  • sdks/workflow-node-sdk/CHANGELOG.md (1 hunks)
  • sdks/workflow-node-sdk/package.json (2 hunks)
  • services/workflows-service/CHANGELOG.md (1 hunks)
  • services/workflows-service/package.json (2 hunks)
  • services/workflows-service/prisma/data-migrations (1 hunks)
  • services/workflows-service/src/auth/workflow-token/workflow-token.repository.ts (1 hunks)
  • services/workflows-service/src/auth/workflow-token/workflow-token.service.ts (1 hunks)
  • services/workflows-service/src/workflow/workflow.controller.external.ts (1 hunks)
✅ Files skipped from review due to trivial changes (11)
  • services/workflows-service/prisma/data-migrations
  • packages/workflow-core/package.json
  • sdks/workflow-node-sdk/package.json
  • apps/kyb-app/package.json
  • sdks/workflow-browser-sdk/CHANGELOG.md
  • examples/headless-example/CHANGELOG.md
  • sdks/workflow-node-sdk/CHANGELOG.md
  • services/workflows-service/src/auth/workflow-token/workflow-token.repository.ts
  • examples/headless-example/package.json
  • services/workflows-service/src/workflow/workflow.controller.external.ts
  • apps/backoffice-v2/CHANGELOG.md
🔇 Additional comments (81)
apps/backoffice-v2/src/lib/blocks/variants/DefaultBlocks/hooks/useDefaultBlocksLogic/useDefaultBlocksLogic.tsx (1)

136-136: Confirm filtering logic for business entity type
This line now filters child workflows strictly for entities of type "business". Ensure that omitting other entity types (e.g., "individual") is intentional. If business types are the only valid scenario here, this is fine, but confirm that no existing functionality relies on filtering out individual or other types for child workflows.

apps/backoffice-v2/src/lib/blocks/hooks/useKybRegistryInfoBlock/useKybRegistryInfoBlock.tsx (3)

7-10: Ensure the dependency array covers all needed values.

While this logic appears sound, confirm that isBankAccountVerification recalculates for all relevant changes. If you ever reference subproperties of bankAccountVerification elsewhere, consider adding them to the dependency array to avoid stale memoization.


36-43: Check for potential undefined fields before spreading the response.

Access to pluginsOutput?.bankAccountVerification?.responseHeader.overallResponse may cause runtime errors if responseHeader or overallResponse is missing or undefined. Consider adding defensive checks (e.g. optional chaining or defaults) for safer destructuring.

Also applies to: 45-67


135-135: Validate the naming consistency.

Using "Bank Account Verification" as the heading is appropriate for the new plugin. Ensure that other references and headings match this naming convention throughout the codebase for clarity.

packages/workflow-core/src/lib/plugins/external-plugin/bank-account-verification-plugin/bank-account-verification-plugin.ts (2)

1-13: Imports are clean and functionally relevant.
All imported modules appear necessary and well-integrated into the plugin's logic.


75-114: Constructor effectively sets up plugin transforms.
The approach to merge incoming transformers with helper transformers is neat. Consider verifying that no naming collisions occur if users define a helper transformer themselves.

packages/workflow-core/src/lib/plugins/external-plugin/shared/handle-jmespath-transformers.ts (1)

1-24: Good safeguard against JMESPath usage.
Declaring JMESPath transformers as unsupported is a clear approach to deprecate them. This helps avoid accidental transformer usage that the plugin does not handle.

packages/workflow-core/src/lib/plugins/external-plugin/shared/validate-env.ts (1)

1-29: Robust environment variable validation.
The consistent usage of Zod with trailing slash removal showcases a well-structured approach. If you anticipate optional usage of APP_API_URL or any other future expansions of env variables, consider extending the schema and ensuring relevant test coverage.

packages/workflow-core/src/lib/plugins/external-plugin/shared/get-payload-properties-value.ts (2)

19-24: Consider handling unexpected property types
When a property is an object without __type, the code correctly moves to recursive processing. However, if property contains unexpected fields or if property.value is undefined, it might cause silent failures. You may want to validate the structure more strictly or handle missing/invalid property paths for better error resilience.


32-38: Deep property resolution appears correct
Recursively calling getPayloadPropertiesValue for nested objects is a neat approach to handle arbitrarily nested payloads. The logic and final return object structure look good.

packages/workflow-core/src/lib/constants.ts (3)

12-12: Good addition of BankAccountVerificationPlugin
Importing and referencing this new plugin aligns with the existing plugin pattern.


22-22: Enumeration extension is consistent
Adding 'BANK_ACCOUNT_VERIFICATION': 'bank-account-verification' to PluginKind follows the established naming convention.


33-33: Plugin registry integration
Registering [PluginKind.BANK_ACCOUNT_VERIFICATION]: BankAccountVerificationPlugin correctly follows the established plugin registry approach and should enable the plugin to be discovered at runtime without issues.

packages/workflow-core/src/lib/plugins/external-plugin/individuals-sanctions-v2-plugin/individuals-sanctions-v2-plugin.ts (9)

1-10: Imports structure looks good
The file imports relevant libraries (zod, outvariant, @ballerine/common, custom modules) in a clear and orderly manner. Nothing to address here.


13-17: Expanded usage of shared utilities
Importing validateEnv, PluginPayloadProperty, and getPayloadPropertiesValue promotes modularity. Great to see repeated logic factored into shared utilities.


76-76: Improved clarity in specifying __type: 'path'
Using the __type property to differentiate path-based properties from literals or nested objects is consistent with the new PluginPayloadProperty type. This helps maintain uniform usage across the codebase.


82-82: Helpful contextual logging
Defining pluginName and appending it to log statements consistently will simplify debugging and improve log clarity.


115-121: Enforcing JMESPath deprecation
By using invariant checks for transformers named 'jmespath-transformer', you’re preventing unapproved usage. This keeps future changes consistent with your current deprecation plans.


Line range hint 126-161: Robust request validation
The flow for transforming and validating the request, early returning on errors, is clean and clearly communicates failure conditions. Good job preventing partial execution if the request is invalid.


Line range hint 162-198: Adaptive handling of KYC information
Your mix of checks for arrays, single objects, or nested structures is thorough. The method ensures that KYC data is extracted from multiple shapes, which is crucial if the incoming data is highly dynamic.


204-210: Combining request payload with validated properties
Merging requestPayload, validatedPayload, and kycInformationByDataType before the API call ensures each part is included without overwriting. This is a strong, clear approach to payload construction.


Line range hint 220-229: Sensible post-response checks
Ensuring a non-empty content-length provides a basic safeguard against empty responses. Continue verifying other response aspects for robust error handling (e.g., verifying the content type matches expectations).

packages/workflow-core/src/lib/plugins/external-plugin/individuals-sanctions-v2-plugin/individuals-sanctions-v2-plugin.test.ts (48)

26-29: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Looks good. These literal properties follow the plugin's parameters structure properly.


31-31: Use of __type: 'path' for workflowRuntimeId
Ensure that relevant parts of your code handle the __type field consistently.


35-35: Use of __type: 'path' for endUserId
This aligns with the same approach for workflowRuntimeId. Maintain consistent usage throughout the codebase.


39-39: Use of __type: 'path' for kycInformation
No issues found. This retains consistency with the other path fields.


77-80: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Repeated pattern from earlier test block. Continuity looks good.


82-82: Use of __type: 'path' for workflowRuntimeId
No concerns. Matches the established pattern.


86-86: Use of __type: 'path' for endUserId
Maintaining the pattern from previous blocks.


90-90: Use of __type: 'path' for kycInformation
Continues the same path-based approach in the payload.


128-131: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
No issues discovered. Properly declared literal properties.


133-133: Use of __type: 'path' for workflowRuntimeId
Looks consistent with prior segments.


137-137: Use of __type: 'path' for endUserId
No additional concerns.


141-141: Use of __type: 'path' for kycInformation
Same path-based property usage.


179-182: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
No objections. Continues the established pattern.


184-184: Use of __type: 'path' for workflowRuntimeId
Ensures dynamic value resolution.


188-188: Use of __type: 'path' for endUserId
No issues discovered.


192-192: Use of __type: 'path' for kycInformation
Maintains the plugin's structure.


233-236: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Again, this is consistent with the previous modifications.


238-238: Use of __type: 'path' for workflowRuntimeId
Fields remain consistent across scenarios.


242-242: Use of __type: 'path' for endUserId
No issues.


246-246: Use of __type: 'path' for kycInformation
Continuing the same approach for path-based data extraction.


279-279: Use of __type: 'path' for workflowRuntimeId
Same logic as prior usage.


283-283: Use of __type: 'path' for endUserId
No issues found.


287-287: Use of __type: 'path' for kycInformation
Ensures data extraction from nested structures.


354-357: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Introduces literal properties for this scenario.


436-439: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Structure remains consistent with other test cases.


441-441: Use of __type: 'path' for workflowRuntimeId
No suggestions to change.


445-445: Use of __type: 'path' for endUserId
No problems identified.


449-449: Use of __type: 'path' for kycInformation
Matches the same schema approach.


524-527: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Solid addition. Follows the prior patterns.


529-529: Use of __type: 'path' for workflowRuntimeId
No issues detected.


533-533: Use of __type: 'path' for endUserId
Ensures path-based retrieval.


537-537: Use of __type: 'path' for kycInformation
No concerns.


606-609: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Adheres to the same approach.


611-611: Use of __type: 'path' for workflowRuntimeId
Maintains the consistent plugin design.


615-615: Use of __type: 'path' for endUserId
Uniform approach across tests.


619-619: Use of __type: 'path' for kycInformation
Continues path-based logic.


697-700: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Accurate setup for handling the plugin’s API call error scenario.


702-702: Use of __type: 'path' for workflowRuntimeId
No further changes needed.


706-706: Use of __type: 'path' for endUserId
Maintains uniform data resolution.


710-710: Use of __type: 'path' for kycInformation
Carries forward existing pattern.


792-795: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Handles scenario for 'NOT_IMPLEMENTED' reason properly.


797-797: Use of __type: 'path' for workflowRuntimeId
Consistent usage.


801-801: Use of __type: 'path' for endUserId
No issues discovered.


805-805: Use of __type: 'path' for kycInformation
Mirrors the approach in other tests.


881-884: Change to include clientId, vendor, ongoingMonitoring, and immediateResults in payload
Ensures success scenario setup is aligned with prior additions.


886-886: Use of __type: 'path' for workflowRuntimeId
Continues consistent pattern.


890-890: Use of __type: 'path' for endUserId
No suggestions.


894-894: Use of __type: 'path' for kycInformation
Matches the existing path-based approach.

sdks/workflow-browser-sdk/package.json (2)

4-4: Version bump to 0.6.81
This version update aligns with the core packages. Confirm compatibility tests are executed.


37-37: Dependency update for @ballerine/workflow-core: now 0.6.81
Ensures consistency with other modules.

services/workflows-service/package.json (3)

4-4: Version bump to 0.7.85
Minor release increment. Looks good.


53-53: @ballerine/workflow-core updated to 0.6.81
Coordinates well with the latest plugin features.


54-54: @ballerine/workflow-node-sdk updated to 0.6.81
Necessary for new bank account verification plugin sync.

apps/backoffice-v2/package.json (3)

3-3: Version bump to 0.7.86
Increment to accommodate new plugin integrations.


58-58: @ballerine/workflow-browser-sdk updated to 0.6.81
Keeps this backoffice version in sync with browser SDK updates.


59-59: @ballerine/workflow-node-sdk updated to 0.6.81
Maintains consistency across services.

packages/workflow-core/CHANGELOG.md (1)

3-7: LGTM! Changelog entry follows the standard format.

The changelog entry properly documents the addition of the bank account verification plugin as a patch change.

apps/kyb-app/CHANGELOG.md (1)

3-7: LGTM! Changelog entry follows the standard format.

The changelog entry properly documents the dependency update to @ballerine/[email protected].

services/workflows-service/CHANGELOG.md (1)

3-10: LGTM! Changelog entry follows the standard format.

The changelog entry properly documents:

  1. Addition of the bank account verification plugin
  2. Updates to dependencies:

- Add node_modules and config files to .eslintignore
- Modify permissions to allow write access in GitHub workflows
- Update Dockerfile paths for various services

(Your workflow dependencies are boxing each other like they’re auditioning for a soap opera)
- Bump versions across multiple packages
- Update dependencies for improved stability

(Your dependency updates look like they were done in a race against time)
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx (2)

150-150: Consider making the height responsive instead of fixed.
Setting a fixed height (h-[30rem]) might cause layout overflow on smaller screens or inconsistent spacing across devices. Consider using responsive utilities or auto height.


183-183: User feedback suggestion.
Consider adding more context for "No Monthly Visitors Data Available" (e.g., possible reasons, recommended actions).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe9fbf6 and 3f12a01.

📒 Files selected for processing (4)
  • packages/ui/src/components/atoms/Tooltip/Tooltip.tsx (1 hunks)
  • packages/ui/src/components/templates/report/components/AdsAndSocialMedia/AdsAndSocialMedia.tsx (5 hunks)
  • packages/ui/src/components/templates/report/components/BusinessReportSummary/BusinessReportSummary.tsx (1 hunks)
  • packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx (9 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/ui/src/components/templates/report/components/BusinessReportSummary/BusinessReportSummary.tsx
  • packages/ui/src/components/atoms/Tooltip/Tooltip.tsx
  • packages/ui/src/components/templates/report/components/AdsAndSocialMedia/AdsAndSocialMedia.tsx
🔇 Additional comments (14)
packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx (14)

154-154: No issues found.
The usage of mt-auto h-4/5 w-full pb-0 helps with consistent layout.


168-168: Tooltip container styling looks good.
Ensures the tooltip is distinct from the chart's background and helps users read the info quickly.


192-192: No issues regarding the new layout.
Shifting to a flex-col gap-4 approach in the right column accommodates different screen sizes well.


193-193: No functional concerns.
This change to h-1/2 w-full is consistent with the new interface layout.


194-194: Header styling is consistent with overall design.
No concerns here.


196-196: Check text overflow for smaller devices.
The content area is given a fixed height of h-4/5. Just confirm it doesn't cause overlap.


231-231: Minor style improvement.
The small circle color swatch is a helpful visual cue to link the legend item with the chart segment.


234-234: No issues found.
The flex w-full justify-between className optimizes spacing.


246-246: Consistent empty state.
Maintaining the same pattern for empty data signals to users that no data is available.


257-257: Visual grouping is effective.
Using flex h-3/5 items-center gap-6 correctly aligns engagement metrics side by side.


272-272: Icon usage is appropriate.
The info icon is an intuitive way to convey tooltips are available.


278-278: Enhanced tooltip styling.
Applying a border and background color can help with clarity.


280-280: Good clarity.
Descriptive text ensures users understand the engagement metric meaning.


296-296: Consistent empty state message.
Provides users clarity on missing data.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f12a01 and ba7779a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • apps/backoffice-v2/CHANGELOG.md (1 hunks)
  • apps/backoffice-v2/package.json (2 hunks)
  • apps/kyb-app/CHANGELOG.md (1 hunks)
  • apps/kyb-app/package.json (2 hunks)
  • examples/headless-example/CHANGELOG.md (1 hunks)
  • examples/headless-example/package.json (2 hunks)
  • packages/react-pdf-toolkit/CHANGELOG.md (1 hunks)
  • packages/react-pdf-toolkit/package.json (2 hunks)
  • packages/ui/CHANGELOG.md (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/workflow-core/CHANGELOG.md (1 hunks)
  • packages/workflow-core/package.json (1 hunks)
  • sdks/workflow-browser-sdk/CHANGELOG.md (1 hunks)
  • sdks/workflow-browser-sdk/package.json (2 hunks)
  • sdks/workflow-node-sdk/CHANGELOG.md (1 hunks)
  • sdks/workflow-node-sdk/package.json (2 hunks)
  • services/workflows-service/CHANGELOG.md (1 hunks)
  • services/workflows-service/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (14)
  • packages/ui/package.json
  • packages/ui/CHANGELOG.md
  • sdks/workflow-node-sdk/package.json
  • packages/workflow-core/package.json
  • examples/headless-example/package.json
  • sdks/workflow-browser-sdk/CHANGELOG.md
  • examples/headless-example/CHANGELOG.md
  • apps/kyb-app/CHANGELOG.md
  • packages/react-pdf-toolkit/CHANGELOG.md
  • sdks/workflow-node-sdk/CHANGELOG.md
  • packages/workflow-core/CHANGELOG.md
  • services/workflows-service/CHANGELOG.md
  • apps/backoffice-v2/CHANGELOG.md
  • apps/kyb-app/package.json
🔇 Additional comments (4)
sdks/workflow-browser-sdk/package.json (1)

4-4: LGTM! Version updates are consistent.

The version bump and dependency update maintain version alignment between related packages, which is crucial for the bank account verification plugin integration.

Also applies to: 37-37

services/workflows-service/package.json (1)

4-4: LGTM! Version and dependency updates are consistent.

The version bump and dependency updates align with the PR's bank account verification plugin changes. The synchronized updates of workflow packages maintain consistency across the codebase.

Also applies to: 54-55

apps/backoffice-v2/package.json (1)

3-3: LGTM! Coordinated version and dependency updates.

The version bump and dependency updates are well-coordinated across the monorepo, maintaining consistency between the workflow SDKs, UI components, and PDF toolkit.

Also applies to: 57-60

packages/react-pdf-toolkit/package.json (1)

4-4: LGTM! Version bump follows semantic versioning.

The patch version increment (1.2.59 → 1.2.60) is appropriate for the changes described in the PR.

packages/react-pdf-toolkit/package.json Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants