Skip to content

feat(protect): add QueryTerm types and search-terms JSON support#270

Closed
tobyhede wants to merge 1 commit into
mainfrom
pr/1-types-schema-foundation
Closed

feat(protect): add QueryTerm types and search-terms JSON support#270
tobyhede wants to merge 1 commit into
mainfrom
pr/1-types-schema-foundation

Conversation

@tobyhede

Copy link
Copy Markdown
Contributor

Summary

This PR adds foundational types for the new encryptQuery API:

  • QueryTerm union types (ScalarQueryTerm, JsonPathQueryTerm, JsonContainsQueryTerm, JsonContainedByQueryTerm)
  • QueryTypeName mapping to schema builder methods
  • Type guards for QueryTerm variants
  • JSON path utilities for path conversion
  • Updated search-terms operation to support JSON path and containment queries
  • Added searchableJson() method to schema builder for SteVec indexing

Part 1 of 6 in the searchable JSON query API series.

Test plan

  • Build passes (pnpm build)
  • Query term guards tests pass
  • Existing tests continue to pass (pre-existing failures unrelated to this PR)

@changeset-bot

changeset-bot Bot commented Jan 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 939f602

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Add foundational types for the new encryptQuery API:
- QueryTerm union types (ScalarQueryTerm, JsonPathQueryTerm, etc.)
- QueryTypeName mapping to schema builder methods
- Type guards for QueryTerm variants
- JSON path utilities for path conversion

Update search-terms operation to support JSON path and containment
queries alongside simple value searches.

Add searchableJson() method to schema builder for SteVec indexing.

Upgrade protect-ffi to 0.20.1 for encryptQueryBulk support.
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