Add codegen to make adding new bank account locations easier#168
Open
Add codegen to make adding new bank account locations easier#168
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a small codegen pipeline for asset-movement bank-account “address” types/schemas, so new bank account location schemas can be added by dropping in a new file rather than manually editing large union types.
Changes:
- Introduces JSON-schema-like definitions for bank account address variants and shared schema fragments.
- Adds scripts + Makefile rules to generate
index.generated.tsandtypes.generated.tsfor address schemas. - Updates
asset-movement/common.tsto re-export and consume the generated address types.
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/run-ts | Improves selection of the compiled JS entrypoint when tsc emits multiple files. |
| src/services/asset-movement/lib/data/types.ts | Adds BankAccountAddressSchema + shared schema fragments/references. |
| src/services/asset-movement/lib/data/json-schema.ts | Adds a minimal JSON-schema type subset used by schema definitions. |
| src/services/asset-movement/lib/data/scripts/generator.ts | Generates TypeScript types + exported JSON schema from address definitions. |
| src/services/asset-movement/lib/data/scripts/generate-index.sh | Generates an index module aggregating all address schema files. |
| src/services/asset-movement/lib/data/addresses/{us,pix,interac,iban-swift,clabe}.ts | Defines per-location bank-account schema fragments. |
| src/services/asset-movement/common.ts | Switches bank account address types to generated ones; re-exports generated artifacts. |
| Makefile | Adds generation steps and cleans generated address files. |
| .gitignore | Ignores generated asset-movement address .generated.ts files. |
| package.json / package-lock.json | Adds json-schema-to-typescript as a dev dependency. |
| .cspell.config.mjs | Adds interac to dictionary. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.