-
Notifications
You must be signed in to change notification settings - Fork 204
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
Illiar/fix/mastercard plugin data structure #2668
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe changes involve modifications to the TypeScript schema and plugin files, focusing on the Changes
Sequence Diagram(s)sequenceDiagram
participant A as Client
participant B as ApiPlugin
participant C as MastercardMerchantScreeningPlugin
A->>B: Send request
B->>C: Invoke plugin with context
C->>C: Set HTTP method to 'POST'
C->>C: Extract address from entity
C-->>B: Return response
B-->>A: Send response back
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
Outside diff range, codebase verification and nitpick comments (1)
packages/workflow-core/src/lib/plugins/external-plugin/api-plugin.ts (1)
152-159
: Potential issue withmethod
variable usage.The change from
this.method
tomethod
in the code may lead to issues if themethod
variable is not properly defined or assigned within the local scope. Please ensure that themethod
variable is correctly initialized before use in the updated code.
- Check the assignment of the
method
variable inpackages/workflow-core/src/lib/plugins/external-plugin/api-plugin.ts
.Analysis chain
Verify the usage of the
method
variable.The change from
this.method
tomethod
may introduce differences in scope or context. Please ensure that themethod
variable is correctly defined and assigned in the context where it is used.Run the following script to verify the usage of the
method
variable:Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the definition and assignment of the `method` variable. # Test: Search for the definition and assignment of the `method` variable. Expect: The variable is correctly defined and assigned. rg --type typescript -A 5 $'method\s*='Length of output: 75
Script:
#!/bin/bash # Description: Verify the definition and assignment of the `method` variable. # Test: Search for the definition and assignment of the `method` variable. Expect: The variable is correctly defined and assigned. rg -A 5 'method\s*='Length of output: 4183
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/common/src/schemas/documents/merchant-screening-plugin-schema.ts (2 hunks)
- packages/workflow-core/src/lib/plugins/external-plugin/api-plugin.ts (2 hunks)
- packages/workflow-core/src/lib/plugins/external-plugin/mastercard-merchant-screening-plugin.ts (2 hunks)
Additional comments not posted (4)
packages/workflow-core/src/lib/plugins/external-plugin/mastercard-merchant-screening-plugin.ts (2)
12-15
: LGTM!The code changes are approved. Explicitly setting the HTTP method to 'POST' in the constructor enhances clarity and ensures consistency in the plugin's operations.
42-49
: LGTM, but verify the assumption about the address structure.The code changes are approved. The refactor streamlines the code and aligns the data extraction with a more straightforward structure, potentially reducing the risk of errors related to undefined properties.
However, please verify the assumption that the
entity.data.address
structure is always present and contains the required fields. If this assumption is not always true, it could lead to runtime errors.Run the following script to verify the assumption:
packages/workflow-core/src/lib/plugins/external-plugin/api-plugin.ts (1)
3-4
: LGTM!The reordering of import statements improves the organization of the file without affecting the functionality.
packages/common/src/schemas/documents/merchant-screening-plugin-schema.ts (1)
441-441
: LGTM!The code changes are approved.
Verify the impact of this change on the codebase by running the following script:
* fix: custom rule (#2626) * WIP - Move report components to common packages (#2625) * feat(*): checkpoint * feat(*): checkpoint * fix(*): fixed mistakes in pr * fix(*): fixed sentry version * feat(*): updated common and ui * Update packages version (#2628) * feat(*): checkpoint * feat(*): checkpoint * fix(*): fixed mistakes in pr * fix(*): fixed sentry version * feat(*): updated common and ui * chore(*): update changeset version * chore(*): updated all packages * chore: reverting the condition to run release action before publish work-flow service (#2629) Co-authored-by: Chirag Sharma IAMOPS <chirag.sharma@billrun.com> * fix(ui): fixed filtering of boolean fields (#2630) * Fix boolean fields (#2631) * fix(ui): fixed filtering of boolean fields * revert(*): reverted adapter change * revert(*): reverted adapter change * Fix boolean fields (#2632) * fix(ui): fixed filtering of boolean fields * revert(*): reverted adapter change * revert(*): reverted adapter change * fix(*): boolean fields * feat(*): update backoffice * revert(backoffice-v2): reverted mock * fix: adds missing env in docker compose files (#2633) Co-authored-by: Rituraj <rituraj@Riturajs-MBP.lan> * fix(docs): dead links * fix(docs): webhook section * fix(docs): webhook section * refactor(backoffice-v2): improved readability on condition (#2638) * fix(*): added a wait step for workflows service db (#2639) * Replaced pagination component (#2642) * feat(backoffice-v2): replaced pagination component and added last page button * revert(backoffice-v2): removed unused isEmptyArray util * fix(backoffice-v2): removed sleep added by mistake * fix(docs): fixed path to md file and in-progress page content (#2640) * feat(*): added merchant screening plugin to swagger (#2647) * feat(docs): added webhook auth * feat(docs): added webhook auth * chore(docs): adding programming languages tabs, more examples to hmac signature verification (#2648) * Illiar/feat/tag input and fixes (#2646) * feat: added default values to array input & fixed render * feat: added tags input * fix: bugfixes * feat: reworked tag input * feat: implemented value apply plugin & cleanup * fix: added ballerine entity id assignment * fixed child workflows handling (#2651) * fix(*): fixed child workflow handling * refactor(workflow-runner): updated log text * fix: migration --------- Co-authored-by: Illia Rudniev <cheskmr@gmail.com> * fix: fixed type * feat: refactor * fix: added raio input to fix styles & ui bump * fix: refactor * fix: refactor * fix: lock fix * feat: tags input add on blur update * fix(kyb-app): tags input now displays placeholder (#2654) --------- Co-authored-by: Omri Levy <61207713+Omri-Levy@users.noreply.github.com> * Added merchant screening (#2649) * feat(backoffice-v2): replaced pagination component and added last page button * revert(backoffice-v2): removed unused isEmptyArray util * fix(backoffice-v2): removed sleep added by mistake * feat(*): moved merchant screening processing to the unified api * feat(*): updated packages * refactor(*): removed empty file * refactor(workflow-core): updated merchant screening plugin * chore(*): addressed pr comments * bal 2663 fix transaction monitoring alert (#2653) * fix(ui): changed tsconfig (#2655) * Dev 318/workflow on demand migration (#2637) * Added merchant screening to proccess tracker (#2657) * feat(backoffice-v2): replaced pagination component and added last page button * revert(backoffice-v2): removed unused isEmptyArray util * fix(backoffice-v2): removed sleep added by mistake * feat(*): moved merchant screening processing to the unified api * feat(*): updated packages * refactor(*): removed empty file * refactor(workflow-core): updated merchant screening plugin * chore(*): addressed pr comments * feat(backoffice-v2): added merchant screening to proccess tracker * Feature/create multi merchant csv import (#2652) * feat: created the endpoint and functionality to create business reports as batch in a csv * feat: added batch processing logic functionaltiy * feat: fixed controller swagger * updated the parse csv logic - upload file do not work * feat: finalized functionality of batch processing * feat: test * feat: tests fix * feat: added withQualityControl to Batch reports Unified-API call --------- Co-authored-by: Tomer Shvadron <tomers@ballerine.com> * feat(*): update report ui (#2660) * fix(wf-def): disallow template editing (#2661) * Added local only secrets (#2663) * feat(*): added local only secrets * refactor(workflows-service): renamed secrets variable * Batch report upload (#2662) * feat: batch report upload * feat: pr comments fixes * feat: pr comments fixes * feat: pr comment fix * feat: conflict fix * fix(*): schema, optionals, and super on method (#2665) * fix(*): in memories (#2666) * fix(*): plugin headers (#2667) * Illiar/fix/mastercard plugin data structure (#2668) * fix: updated schema & changed address source * fix: fixed data structure and method bug --------- Co-authored-by: Illia Rudniev <cheskmr@gmail.com> * fix(mm): change ongoing montoring sttings to optional * version bump * version bump * version bump * version bump --------- Co-authored-by: liorzam <6435752+liorzam@users.noreply.github.com> Co-authored-by: Chirag <134513193+codechirag123@users.noreply.github.com> Co-authored-by: Chirag Sharma IAMOPS <chirag.sharma@billrun.com> Co-authored-by: riturajgc <65999719+riturajgc@users.noreply.github.com> Co-authored-by: Rituraj <rituraj@Riturajs-MBP.lan> Co-authored-by: Alon Peretz <8467965+alonp99@users.noreply.github.com> Co-authored-by: Illia Rudniev <cheskmr@gmail.com> Co-authored-by: Daniel Blokh <35891501+Blokh@users.noreply.github.com> Co-authored-by: Tomer Shvadron <tomers@ballerine.com>
Summary by CodeRabbit
New Features
vendor
field in the Merchant Screening Plugin schema is now optional, allowing for more flexible data input.Improvements