fix: type EntityTypeDef.poleType as PoleType literal union (#141) - #148
Open
1HazyOne707 wants to merge 1 commit into
Open
fix: type EntityTypeDef.poleType as PoleType literal union (#141)#1481HazyOne707 wants to merge 1 commit into
1HazyOne707 wants to merge 1 commit into
Conversation
…s#141) - Add exported PoleType type: PERSON | ORGANIZATION | LOCATION | EVENT | OBJECT | CUSTOM - EntityTypeDef.poleType now uses PoleType instead of bare string, catching invalid/lowercase values at compile time instead of a runtime 422 from the server - Document RelationshipDef.source/target as requiring an exact entity label from the same schema (no wildcard support server-side) - Export PoleType from package root
|
@1HazyOne707 is attempting to deploy a commit to the lyonwj's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Heads up — the only failing check here is Vercel's deploy authorization gate, which needs a team member to approve (not something I can action from my side). The actual code change hasn't had a human review yet. Happy to rebase or adjust if anything's changed since I opened this, just wanted to surface it in case the bot-only failing check caused it to get skipped over. |
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.
Summary
Fixes #141 —
EntityTypeDef.poleTypewas typed as barestring, letting invalid/lowercase values pass TypeScript compilation only to fail at runtime with an opaque422 schema validation failedfrom the server.Changes
PoleTypeliteral union:"PERSON" | "ORGANIZATION" | "LOCATION" | "EVENT" | "OBJECT" | "CUSTOM"EntityTypeDef.poleTypenow usesPoleTypeinstead ofstringRelationshipDef.source/targetwith JSDoc: they require an exact entity label from the same ontology schema — no wildcard ("*") support server-side, per the issue's findingsPoleTypeexported from the package root alongside the other ontology typestoDocument) uses an explicitas PoleTypeassertion since the raw server response is still typed asstring(trusted boundary)Closes #141