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

BAL-3460 Documents context sync & bugfixes #3071

Merged
merged 28 commits into from
Feb 19, 2025

Conversation

chesterkmr
Copy link
Collaborator

@chesterkmr chesterkmr commented Feb 19, 2025

  • Implemented collection flow state transition when document is requested
  • Implemented mapping of document statuses to context
  • Added new documents to common package
  • Implemented $this scope for DocumentField schema definition
  • Various bugfixes

Omri-Levy and others added 24 commits February 2, 2025 16:06
* feat: implemented common useHttp hook

* feat: initial entity field group

* feat: implemented interaction logic with entity & tests

* feat: implemented EntityFieldGroup (WIP)

* feat: added entity type parameter to ui definition & updated stories

* Bal 3486 (#3034)

* feat: added entity creation & deletion endpoints

* fix: fixed entity deletion

* feat: finalized creation & deletion logic of entities

* fix: lock fix

* Bal 3487(WIP) (#3036)

* feat(workflows-service): implemented document controller, service, repository, and dto

* fix(workflows-service): added cascase on delete

* refactor(workflows-service): removed uploadFile method from collection flow service

* feat(workflows-service): added the ability to reupload document (#3019)

* feat: implemented documents upload

* feat: reworked creation ui

* feat: implemented document creation & deletion

* feat: finalized entity group field

* fix: fixed tests

* fix: cleanup

* fix: format fix

* fix: fixed build

---------

Co-authored-by: Omri Levy <[email protected]>
Co-authored-by: Omri Levy <[email protected]>
Co-authored-by: Shane <[email protected]>

* fix: crypto mock in tests

* feat: reworked documentfield & integrated entityfield to kyb & updated enpoints (#3040)

* feat: added end user creation skip for created entities in kyb (#3044)

* feat: implemented http document deletion on hide & fixed tests (#3045)

* feat: implemented sync plugin & fixes (#3047)

* fix: format

* fix: refactored test

* fix: refactor

* fix: refactor

* fix: updated logging & removed debugger

* feat: added external schema for cf document && updated endpoint

* fix: replaced id with ballerineEntityId & updated endpoint

* fix: fixed test

---------

Co-authored-by: Omri Levy <[email protected]>
Co-authored-by: Omri Levy <[email protected]>
Co-authored-by: Shane <[email protected]>
* feat(documents): add documents module and related components

- Introduce DocumentsModule with controller and service
- Implement DocumentTrackerModel for document representation
- Add endpoint to retrieve documents by workflow ID

(Your code is more scattered than a toddler's toys after a playdate)

* feat(document): add endpoint to fetch documents by workflow ID

- Implement new route for retrieving documents based on workflow and definition IDs
- Refactor services and modules to accommodate for new functionality

(your code organization is so tangled, it could be mistaken for a Christmas light display)

* feat(documents): implement new document tracking feature

- Add endpoint to retrieve documents based on workflow runtime and definition
- Introduce validation for document input data in the new endpoint

(Your code is so convoluted, it makes a Rubik's Cube look like tic-tac-toe)

* refactor(document): update document service and controller to enhance workflow

- Remove unused DocumentTrackerModel and associated DTOs
- Update getDocumentsByWorkflowId parameters for clarity and consistency
- Refactor document parsing for improved maintainability

(Your function signatures have more parameters than a conference call in 2020)

* chore(workflows-service): update subproject commit and clean up tests

- Update subproject commit reference in data-migrations
- Remove unnecessary console log from document unit test

(Your console logs should come with a warning label: "For debugging only")

* fix(workflow-service): resolve optional chaining issues in workflow definition

- Remove unnecessary optional chaining for better clarity
- Ensure accurate type handling for workflow definitions

(in just a few lines, your code went from 'nice try' to 'you nailed it' - good job!)

* feat(documents): implement documents tracker items fetching and query

- Add fetch function for documents tracker items
- Create query hooks for retrieving documents with search parameters
- Include hash in URL construction for complete state representation

(Your code organization is so scattered, it looks like a yard sale for functions)

* refactor(document): rename document retrieval functions for clarity

- Change function name from getDocumentsByWorkflowId to getDocumentTrackerByWorkflowId
- Update matching logic for clarity and reduce code duplication

(Your code is like a puzzling riddle—only the compiler knows the answer)

* feat: document tracker (BAL-3459, BAL-3435) (#3043)

* wip

* interface

* wip

* feat: document tracker

* reorder endpoints

* fallback

* fix

* PR comments + add endpoint

* feature flag

* polish

* invalidate data

* PR comments

* refactor(documents): update query key naming and structure

- Rename documentsQueryKey to documentsQueryKeys for consistency
- Adjust import paths for better organization of document hooks
- Simplify conditional checks in unit tests for better readability

(Your code is cleaner than a whistle, but I still wouldn't recommend using it to clean the house)

* chore(*): conflicts resolution

---------

Co-authored-by: Sasha <[email protected]>
Co-authored-by: Omri Levy <[email protected]>
- Refactor requestDocuments to use new request schema
- Update type definitions and processes for document entities
- Implement batch creation of documents in the repository

(your schema changes are so complex, they make IKEA instructions look like a coloring book)
* wip - integration fixes

* feat(documents): update document request schema and integration (#3057)

- Refactor requestDocuments to use new request schema
- Update type definitions and processes for document entities
- Implement batch creation of documents in the repository

(your schema changes are so complex, they make IKEA instructions look like a coloring book)

---------

Co-authored-by: Shane <[email protected]>
Copy link

changeset-bot bot commented Feb 19, 2025

⚠️ No Changeset found

Latest commit: 47db702

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 Feb 19, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

Comment on lines +49 to +53
if (
element.element === 'documentfield' &&
element?.params?.template?.type === type &&
element?.params?.template?.category === category
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic needs to be the same as the one in getDocumentId and in the backoffice. Where we also take into consideration fields like version and country.

@chesterkmr chesterkmr changed the title Bal 3460 BAL-3460 Documents context sync & bugfixes Feb 19, 2025
@chesterkmr chesterkmr merged commit 90f2b15 into epic/feat/documents-tracker Feb 19, 2025
16 checks passed
@chesterkmr chesterkmr deleted the bal-3460 branch February 19, 2025 16:31
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.

3 participants