Skip to content

feat: add createSearchTerms#137

Merged
calvinbrewer merged 1 commit intomainfrom
search-terms
May 28, 2025
Merged

feat: add createSearchTerms#137
calvinbrewer merged 1 commit intomainfrom
search-terms

Conversation

@calvinbrewer
Copy link
Copy Markdown
Contributor

  • add support for createSearchTerms method on the protectClient to impove the developer experience of encrypting search terms for use with SQL queries

@calvinbrewer calvinbrewer requested a review from Copilot May 28, 2025 15:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a new createSearchTerms method on the ProtectClient to simplify encrypting search terms for SQL queries. Key changes include:

  • New type definitions for SearchTerm and EncryptedSearchTerm in types.ts.
  • A new SearchTermsOperation in the ffi operations that encrypts an array of search terms.
  • Integration of the createSearchTerms method in the ProtectClient along with corresponding tests and documentation updates.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/protect/src/types.ts Added type definitions for search term encryption.
packages/protect/src/ffi/operations/search-terms.ts Implements encryption logic for search terms with special formatting based on return type.
packages/protect/src/ffi/index.ts Exposes the createSearchTerms method in the ProtectClient API.
packages/protect/tests/search-terms.test.ts Added tests to validate the functionality for default, composite-literal, and escaped composite literal returns.
docs/reference/supabase-sdk.md Updated documentation to demonstrate the new API usage.
.changeset/fruity-shoes-talk.md New changeset note documenting the minor release.

@calvinbrewer calvinbrewer merged commit 1555751 into main May 28, 2025
1 check passed
@calvinbrewer calvinbrewer deleted the search-terms branch May 28, 2025 15:17
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.

2 participants