Skip to content

Convert the record server module repositories to TypeScript - #4765

Open
SteRiccio wants to merge 1 commit into
masterfrom
claude/eloquent-babbage-6z89ib
Open

SteRiccio wants to merge 1 commit into
masterfrom
claude/eloquent-babbage-6z89ib

Conversation

@SteRiccio

@SteRiccio SteRiccio commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Description

Converts the record server module repositories to TypeScript (first part of the module: managers, jobs / update thread and service / API follow in separate PRs): record, node, node keys, file (DB, file system, S3 bucket) and validation report repositories.

  • deleteNodesByUuids maps the deleted nodes with the node transform callback: it was passed to manyOrNone, which has no such param, so it was ignored and the deleted nodes were returned with snake_case keys (no caller uses them yet). A no-op (row) => row passed to manyOrNone is removed as well.
  • The record validation is checked with Validation.isValid(Record.getValidation(record)).
  • The params not needed by all the callers are optional (records count: the node defs needed only with search or qualifier filters; validation report query: sort params).
  • The node transform callback builds a typed ArenaRecordNode; params typed (NodeDefEntity for root / ancestor defs, ArenaRecordNode[], ArenaValidation, record steps / cycles as strings).
  • The deprecated getSurveyDBSchema is replaced by Schemata.getSchemaSurvey; functions without await are not async anymore.

Types of changes

  • Docs change
  • Refactoring
  • Dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

How has this been tested

  • yarn typecheck: no errors
  • yarn test:unit: all passing except the 4 job tests that need a database (failing locally without PostgreSQL, same as on master)
  • yarn build:server:prod: OK
  • ESLint on the changed files: no errors

Do you consider this PR needs further testing?

  • No
  • Yes

The deleted nodes are mapped with the node transform callback (manyOrNone ignored it: the
callback is not one of its params); the record validation is checked with
Validation.isValid(Record.getValidation(record)) (isObjValid takes an untyped object). The
nodes / validation report select params not needed by all the callers are optional. The
deprecated getSurveyDBSchema is replaced by Schemata.getSchemaSurvey. Functions without await
are not async anymore.
@mergify

mergify Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue). If it does not match the queue conditions yet, it enters the queue once it does.

  • Queue this pull request

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

1 participant