-
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
Added merchant screening plugin to swagger #2647
Conversation
|
WalkthroughThe recent changes involve updates to various packages within the Ballerine ecosystem, primarily focusing on incrementing version numbers and updating dependencies to their latest versions. These updates include enhancements to documentation, schema definitions, and other internal adjustments without introducing breaking changes or new features. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant Common
User->>App: Request for merchant screening
App->>Common: Validate context schema
App->>Common: Fetch merchant screening data
Common-->>App: Return validated data
App-->>User: Response with merchant screening results
Poem
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 as PR comments)
Additionally, you can add 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)
services/workflows-service/src/swagger/swagger.ts (1)
164-164
: Missing 'data' field indefaultContextSchema
. ThedefaultContextSchema
and its components do not explicitly cover a field named 'data'. Ensure that the 'data' field is included or handled appropriately in the schema definition.
defaultContextSchema
is defined inpackages/common/src/schemas/documents/default-context-schema.ts
.defaultInputContextSchema
does not include a 'data' field.Analysis chain
Ensure required fields are covered by
defaultContextSchema
.The
required
array includes 'data'. Verify thatdefaultContextSchema
covers this field adequately.Run the following script to verify the required fields in
defaultContextSchema
:Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify required fields in `defaultContextSchema`. # Test: Retrieve required fields from `defaultContextSchema`. Expect: 'data' field is included. ast-grep --lang typescript --pattern 'export const defaultContextSchema = Type.Object({ required: $_ })'Length of output: 106
Script:
#!/bin/bash # Search for the definition of `defaultContextSchema` and inspect its structure. rg 'defaultContextSchema' -A 10 --type=typescriptLength of output: 84
Script:
#!/bin/bash # Search for the definition of `defaultContextSchema` and inspect its structure in TypeScript files. rg 'defaultContextSchema' -A 10 --glob '*.ts'Length of output: 18767
Script:
#!/bin/bash # Extract the complete definition of `defaultContextSchema` to verify its fields. rg 'export const defaultContextSchema' -A 20 packages/common/src/schemas/documents/default-context-schema.tsLength of output: 764
Script:
#!/bin/bash # Search for the definition of `defaultInputContextSchema` to verify if it includes the 'data' field. rg 'defaultInputContextSchema' -A 10Length of output: 2180
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (23)
- 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/common/CHANGELOG.md (1 hunks)
- packages/common/package.json (1 hunks)
- packages/common/src/schemas/documents/default-context-schema.ts (2 hunks)
- packages/common/src/schemas/documents/merchant-screening-plugin-schema.ts (1 hunks)
- packages/common/src/schemas/documents/workflow/documents/schemas/utils.ts (1 hunks)
- packages/workflow-core/CHANGELOG.md (1 hunks)
- packages/workflow-core/package.json (2 hunks)
- sdks/web-ui-sdk/CHANGELOG.md (1 hunks)
- sdks/web-ui-sdk/package.json (2 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/src/swagger/swagger.ts (2 hunks)
- websites/docs/package.json (1 hunks)
Files skipped from review due to trivial changes (18)
- apps/backoffice-v2/CHANGELOG.md
- apps/backoffice-v2/package.json
- apps/kyb-app/CHANGELOG.md
- apps/kyb-app/package.json
- examples/headless-example/CHANGELOG.md
- examples/headless-example/package.json
- packages/common/CHANGELOG.md
- packages/common/package.json
- packages/workflow-core/CHANGELOG.md
- sdks/web-ui-sdk/CHANGELOG.md
- sdks/web-ui-sdk/package.json
- sdks/workflow-browser-sdk/CHANGELOG.md
- sdks/workflow-browser-sdk/package.json
- sdks/workflow-node-sdk/CHANGELOG.md
- sdks/workflow-node-sdk/package.json
- services/workflows-service/CHANGELOG.md
- services/workflows-service/package.json
- websites/docs/package.json
Additional comments not posted (12)
packages/common/src/schemas/documents/workflow/documents/schemas/utils.ts (1)
3-10
: LGTM! Verify the updated function usage.The changes to the
TypeStringEnum
function enhance its flexibility by allowing configuration through theoptions
parameter and supporting both mutable and immutable arrays. Ensure that all usages of this function are updated to match the new signature.Run the following script to verify the function usage:
Verification successful
Function Usage Verified
All usages of the
TypeStringEnum
function have been updated to match the new signature, supporting both mutable and immutable arrays and the optionaloptions
parameter. No further action is required.
- Verified in
packages/common/src/schemas/documents/merchant-screening-plugin-schema.ts
- Verified in
packages/common/src/schemas/documents/workflow/documents/schemas/UG.ts
- Verified in
packages/common/src/schemas/documents/workflow/documents/schemas/GH.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `TypeStringEnum` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'TypeStringEnum'Length of output: 77
Script:
#!/bin/bash # Description: Verify all function calls to `TypeStringEnum` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'TypeStringEnum'Length of output: 9671
packages/common/src/schemas/documents/default-context-schema.ts (1)
Line range hint
7-34
: LGTM! Verify the new import paths and schema integration.The changes improve modularity by updating import paths and adding the
MerchantScreeningPluginSchema
to enhance functionality. Ensure that the new import paths are correct and that the schema is integrated as intended.Run the following script to verify the import paths and schema integration:
packages/workflow-core/package.json (1)
Line range hint
4-34
: LGTM! Verify compatibility with the updated dependency.The version updates for
@ballerine/workflow-core
and@ballerine/common
suggest minor improvements or bug fixes. Ensure that the updated dependency version is compatible with the package's functionality.Run the following script to verify compatibility with the updated dependency:
services/workflows-service/src/swagger/swagger.ts (1)
5-5
: Verify the completeness ofdefaultContextSchema
.Ensure that
defaultContextSchema
includes all necessary properties that were previously defined inline. This change promotes reusability but requires verification to ensure no essential properties are omitted.Run the following script to verify the contents of
defaultContextSchema
:packages/common/src/schemas/documents/merchant-screening-plugin-schema.ts (8)
27-76
: Ensure address schema fields are comprehensive and accurate.The
AddressSchema
defines various fields for an address. Verify that the descriptions and constraints (e.g., minLength, maxLength) are accurate and align with the intended use.Run the following script to verify the field definitions in
AddressSchema
:
98-139
: ReviewPrincipalSchema
for completeness and accuracy.Ensure that all fields in
PrincipalSchema
are correctly defined and described. Check for any missing fields or inaccuracies in descriptions.Run the following script to verify the field definitions in
PrincipalSchema
:Verification successful
PrincipalSchema is complete and accurate.
The
PrincipalSchema
includes all necessary fields for identifying a business principal, such as names, contact information, and identification numbers. Each field is well-defined with appropriate descriptions and constraints. No fields appear to be missing.
- Fields like
FirstName
,LastName
, andPhoneNumber
have constraints ensuring valid input.- Optional fields like
MiddleInitial
,AltPhoneNumber
,NationalId
, andDriversLicense
provide flexibility.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `PrincipalSchema`. # Test: Retrieve field definitions and descriptions. Expect: Complete and accurate schema. ast-grep --lang typescript --pattern 'const PrincipalSchema = Type.Object({ $$$ })'Length of output: 4639
202-331
: ReviewMerchantSchema
for accuracy and completeness.Ensure that
MerchantSchema
covers all necessary fields and that descriptions are accurate. Verify that optional fields are correctly implemented.Run the following script to verify the field definitions in
MerchantSchema
:Verification successful
MerchantSchema is accurate and complete.
The
MerchantSchema
covers all necessary fields with accurate descriptions. Optional fields are correctly implemented usingType.Optional
. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `MerchantSchema`. # Test: Retrieve field definitions and descriptions. Expect: Accurate and complete schema. ast-grep --lang typescript --pattern 'const MerchantSchema = Type.Object({ $$$ })'Length of output: 14123
333-381
: VerifyMerchantScreeningRawSchema
structure and descriptions.Ensure that
MerchantScreeningRawSchema
is well-structured and that field descriptions are clear and accurate.Run the following script to verify the field definitions in
MerchantScreeningRawSchema
:Verification successful
Schema structure and descriptions are well-defined.
The
MerchantScreeningRawSchema
is well-structured, with clear and accurate field descriptions. No issues were found with the schema definitions.
- The schema includes fields like
PageOffset
,Ref
,TransactionReferenceNumber
,PossibleMerchantMatches
, andPossibleInquiryMatches
, all with appropriate descriptions and examples.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `MerchantScreeningRawSchema`. # Test: Retrieve field definitions and descriptions. Expect: Well-structured and clear schema. ast-grep --lang typescript --pattern 'const MerchantScreeningRawSchema = Type.Object({ $$$ })'Length of output: 5403
383-421
: CheckMerchantScreeningAggregatedSchema
andMerchantScreeningProcessedSchema
for correctness.Ensure that these schemas are correctly defined and that fields are accurately described.
Run the following script to verify the field definitions in
MerchantScreeningAggregatedSchema
andMerchantScreeningProcessedSchema
:Verification successful
Schemas are correctly defined.
The
MerchantScreeningAggregatedSchema
andMerchantScreeningProcessedSchema
are accurately defined with the expected fields and types. No issues were found in their definitions.
MerchantScreeningAggregatedSchema
includes fields such asname
,terminationReasonCode
,dateAdded
,matches
,data
,exactMatchesAmount
,partialMatchesAmount
,exactMatches
,partialMatches
,principals
, andurls
.MerchantScreeningProcessedSchema
includesterminatedMatchedMerchant
andinquiredMatchedMerchant
, both arrays ofMerchantScreeningAggregatedSchema
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `MerchantScreeningAggregatedSchema` and `MerchantScreeningProcessedSchema`. # Test: Retrieve field definitions and descriptions. Expect: Correctly defined schemas. ast-grep --lang typescript --pattern 'const MerchantScreeningAggregatedSchema = Type.Object({ $$$ })' ast-grep --lang typescript --pattern 'const MerchantScreeningProcessedSchema = Type.Object({ $$$ })'Length of output: 4447
1-3
: Verify import paths and dependencies.Ensure that the imported modules
TypeStringEnum
,ProcessStatuses
, and others are correctly defined and available.Run the following script to verify the import paths and dependencies:
Verification successful
Import paths and dependencies are correctly defined.
The imported modules
TypeStringEnum
andProcessStatuses
are correctly defined and available in the codebase. The import paths used in the filepackages/common/src/schemas/documents/merchant-screening-plugin-schema.ts
match their definitions.
TypeStringEnum
is defined inpackages/common/src/schemas/documents/workflow/documents/schemas/utils.ts
.ProcessStatuses
is defined inpackages/common/src/consts/index.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify import paths and dependencies. # Test: Check if the imported modules are defined and available. rg --type typescript -A 2 $'export const TypeStringEnum = $_' rg --type typescript -A 2 $'export const ProcessStatuses = $_'Length of output: 196
Script:
#!/bin/bash # Corrected script to verify import paths and dependencies. # Test: Check if the imported modules are defined and available in TypeScript files. rg --glob '*.ts' -A 2 $'export const TypeStringEnum = $_' rg --glob '*.ts' -A 2 $'export const ProcessStatuses = $_'Length of output: 118
Script:
#!/bin/bash # Expanded script to verify import paths and dependencies with variations. # Test: Check for any definitions or exports of TypeStringEnum and ProcessStatuses. rg --glob '*.ts' -A 2 'TypeStringEnum' rg --glob '*.ts' -A 2 'ProcessStatuses'Length of output: 6409
147-200
: CheckMerchantMatchSchema
for consistency and clarity.Ensure that the fields in
MerchantMatchSchema
are consistent with other schemas and clearly described. Verify that optional fields are correctly marked.Run the following script to verify the field definitions in
MerchantMatchSchema
:Verification successful
MerchantMatchSchema is consistent and clear.
The fields in
MerchantMatchSchema
are consistent with other schemas in the codebase, and optional fields are correctly marked. The descriptions and examples provide clarity for each field.
PrincipalMatch
andUrlMatch
are correctly marked as optional.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `MerchantMatchSchema`. # Test: Retrieve field definitions and descriptions. Expect: Consistent and clear schema. ast-grep --lang typescript --pattern 'const MerchantMatchSchema = Type.Object({ $$$ })'Length of output: 5974
Script:
#!/bin/bash # Description: Find other schema definitions in the same directory to compare with `MerchantMatchSchema`. ast-grep --lang typescript --pattern 'const $_ = Type.Object({ $$$ })'Length of output: 63629
423-433
: ReviewMerchantScreeningPluginSchema
for accuracy and completeness.Ensure that
MerchantScreeningPluginSchema
is accurately defined and that all fields are correctly described.Run the following script to verify the field definitions in
MerchantScreeningPluginSchema
:Verification successful
MerchantScreeningPluginSchema is accurately and completely defined.
The schema fields are appropriately described and utilize correctly defined types, ensuring the schema's accuracy and completeness. No further action is required.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify field definitions in `MerchantScreeningPluginSchema`. # Test: Retrieve field definitions and descriptions. Expect: Accurate and complete schema. ast-grep --lang typescript --pattern 'export const MerchantScreeningPluginSchema = Type.Optional($_)'Length of output: 1320
Script:
#!/bin/bash # Description: Check definitions of TypeStringEnum, MerchantScreeningRawSchema, and MerchantScreeningProcessedSchema. # Find the definition of TypeStringEnum ast-grep --lang typescript --pattern 'const TypeStringEnum = $_' # Find the definition of MerchantScreeningRawSchema ast-grep --lang typescript --pattern 'const MerchantScreeningRawSchema = $_' # Find the definition of MerchantScreeningProcessedSchema ast-grep --lang typescript --pattern 'const MerchantScreeningProcessedSchema = $_'Length of output: 7476
* 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
New Dependency Updates
@ballerine/common
,@ballerine/workflow-browser-sdk
, and@ballerine/workflow-core
, improving overall performance and compatibility.Documentation Improvements
defaultContextSchema
, enhancing clarity and maintainability.Version Updates