feat: add storage types to node type registry#1035
Merged
pyramation merged 2 commits intomainfrom Apr 29, 2026
Merged
Conversation
Add BlueprintStoragePolicy, BlueprintBucketSeed, and BlueprintStorageConfig interfaces to the node type registry. Wire has_storage and storage properties into BlueprintMembershipType to match the construct_blueprint() SQL signature. These types provide autocomplete and type safety when building blueprint JSON with storage configuration (policies, bucket seeds, module-level overrides).
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…s, FTS weights, grant tuples - BlueprintPolicy: convert from interface to discriminated union on $type so data is typed per Authz* policy type (autocomplete for all 16 types) - BlueprintStoragePolicy: same treatment — typed data per $type plus the storage-specific tables/policy_name fields - Add BlueprintPrivilege type alias: 'select' | 'insert' | 'update' | 'delete' - BlueprintFtsSource.weight: string → 'A' | 'B' | 'C' | 'D' - Grant privileges: unknown[] → [BlueprintPrivilege, string | string[]][] (typed [verb, columns] tuples) - Fix codegen to emit single quotes (matches project eslint config) - Add eslint-disable for @typescript-eslint/no-empty-object-type in generated file header
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
Adds storage-related types to the node type registry and tightens all blueprint types for full autocomplete and type safety.
Storage types:
BlueprintStoragePolicy— typed policy objects forapply_storage_security()BlueprintBucketSeed— bucket seed entries forstorage_config.buckets[]BlueprintStorageConfig— top-level storage configurationBlueprintMembershipType.has_storage/.storage— storage support on membership typesType tightening (discriminated unions):
BlueprintPolicy— converted from flat interface to discriminated union on$type. Typing$type: "AuthzPublishable"narrowsdatatoAuthzPublishableParamswith autocomplete foris_published_field,published_at_field,require_published_at.BlueprintStoragePolicy— same discriminated union.$typeis literal union of all 16 Authz* types,datatyped per type.BlueprintPrivilege— new type:"select" | "insert" | "update" | "delete". Used by policy and grant types.BlueprintFtsSource.weight—string→"A" | "B" | "C" | "D"privileges—unknown[]→[BlueprintPrivilege, string | string[]][](typed[verb, columns]tuples)Codegen improvements:
eslint-disablefor@typescript-eslint/no-empty-object-typeAll Authz*
*Paramsinterfaces from the existing node type registry are reused — no new type definitions invented.Review & Testing Checklist for Human
BlueprintPolicywith$type: "AuthzEntityMembership"and confirmdataautocompletes withentity_field,membership_type,permission, etc.BlueprintStoragePolicynarrowsdatacorrectly when$typeis setBlueprintPolicyorBlueprintStoragePolicyobjects)cd graphql/node-type-registry && pnpm generate:typesto confirm codegen is reproducibleNotes
optionsfields remainRecord<string, unknown>— they are genuinely open-ended per index type (GIN, GiST, etc.)@typescript-eslint/no-require-importserrors ingenerate-types.tsline 21 are unchangedLink to Devin session: https://app.devin.ai/sessions/58b40b3f63804c20b86643cc873ba844
Requested by: @pyramation