Skip to content

feat(protect): add encryptQuery API with batch support#271

Closed
tobyhede wants to merge 1 commit into
pr/1-types-schema-foundationfrom
pr/2-encrypt-query-api
Closed

feat(protect): add encryptQuery API with batch support#271
tobyhede wants to merge 1 commit into
pr/1-types-schema-foundationfrom
pr/2-encrypt-query-api

Conversation

@tobyhede

Copy link
Copy Markdown
Contributor

Summary

Add the new unified encryptQuery API:

  • EncryptQueryOperation for single value encryption
  • BatchEncryptQueryOperation for batch encryption
  • QuerySearchTermsOperation for legacy compatibility
  • Updated ProtectClient with encryptQuery() method overloads

Supports:

  • Scalar terms with explicit queryType
  • JSON path queries (searchableJson)
  • JSON containment queries

Part 2 of 6 in the searchable JSON query API series.
Stacked on: PR #270

Test plan

  • Build passes
  • encrypt-query.test.ts passes
  • batch-encrypt-query.test.ts passes

Add the new unified encryptQuery API:
- EncryptQueryOperation for single value encryption
- BatchEncryptQueryOperation for batch encryption
- QuerySearchTermsOperation for legacy compatibility
- Updated ProtectClient with encryptQuery() method overloads

Supports:
- Scalar terms with explicit queryType
- JSON path queries (searchableJson)
- JSON containment queries

Includes comprehensive test coverage for all query types.
@changeset-bot

changeset-bot Bot commented Jan 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ccef5bb

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

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