[OCRVS-9135] Set up oRPC contract pipeline (commons → toolkit → countryconfig)#11799
Closed
[OCRVS-9135] Set up oRPC contract pipeline (commons → toolkit → countryconfig)#11799
Conversation
|
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
|
ℹ️ Coverage metrics explained: |
📊 commons test coverage |
📊 events test coverage |
Contributor
|
Your environment is deployed to https://rikukissachiang-mai.e2e-k8s.opencrvs.dev |
Replace example contract with typed contracts for events, workqueue, roles, application config, certificates, users, locations, trigger, and content. Convert Roles from TS type to Zod schema. Add handler stubs in countryconfig. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This PR has been marked with label stale Since it has been inactive for 20 days. It will automatically be closed in 10 days if no further activity occurs. |
|
This PR has been automatically closed because it has been inactive for 30 days. Please reopen if you are still working on it. |
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.
Description
Establishes an end-to-end oRPC contract-first API pipeline:
./serverexportThe pipeline enables type-safe API contracts with automatic validation, making it easy for country configurations to implement procedures using the toolkit.
Changes
@orpc/contractand@orpc/serverdependencies to commons and toolkitpackages/commons/src/countryconfig/contract.tspackages/toolkit/src/server/index.tsthat implements and re-exports the contracttoolkit/src/apifrom tsc compilation (pre-existing dependency on unbuilt events package)Verification
All three packages now build and compile successfully:
yarn buildin commons ✅yarn buildin toolkit ✅yarn test:compilationin countryconfig ✅Runtime test in countryconfig successfully creates a typed handler via oRPC's implementation pattern.