Skip to content

[SABRA-2456] Add V2 Facets and Searchabilities API Support#237

Open
aandrukhovich wants to merge 21 commits intomasterfrom
SABRA-2456/cio-node
Open

[SABRA-2456] Add V2 Facets and Searchabilities API Support#237
aandrukhovich wants to merge 21 commits intomasterfrom
SABRA-2456/cio-node

Conversation

@aandrukhovich
Copy link

Add V2 Facets and Searchabilities API Support

Summary

This PR adds support for the V2 versions of the /v2/facets and /v2/searchabilities endpoints, running in parallel with the existing V1 implementations.

Changes

New Facets V2 Methods

  • addFacetConfigurationV2 - Create a single facet configuration
  • getFacetConfigurationsV2 - Retrieve all facet configurations with pagination
  • getFacetConfigurationV2 - Get a specific facet by name
  • modifyFacetConfigurationsV2 - Batch partial update facets (PATCH)
  • modifyFacetConfigurationV2 - Partially update a single facet
  • replaceFacetConfigurationV2 - Replace a single facet configuration (PUT)
  • createOrReplaceFacetConfigurationsV2 - Batch create or replace facets (PUT)
  • removeFacetConfigurationV2 - Delete a facet configuration

New Searchabilities V2 Methods

  • retrieveSearchabilitiesV2 - Retrieve searchabilities with filtering/pagination/sorting
  • getSearchabilityV2 - Get a specific searchability by name
  • patchSearchabilitiesV2 - Batch create or update searchabilities
  • patchSearchabilityV2 - Update a single searchability
  • deleteSearchabilitiesV2 - Batch delete searchabilities
  • deleteSearchabilityV2 - Delete a single searchability

New Types (TypeScript)

  • FacetConfigurationV2 - V2 facet model with pathInMetadata field
  • SearchabilityConfigurationV2 - V2 searchability model with new fields (displayable, hidden, createdAt, updatedAt)
  • Request/response types for all V2 operations

V2 API Differences from V1

Facets:

  • Requires pathInMetadata field which specifies where in item metadata the facet data is located
  • Uses /v2/facets endpoint instead of /v1/facets

Searchabilities:

  • Adds displayable and hidden fields
  • Adds createdAt/updatedAt timestamps
  • Simplified query parameter filtering (direct boolean params)
  • Uses /v2/searchabilities endpoint instead of /v1/searchabilities

Test Plan

  • Added catalog-facet-configurations-v2.js with comprehensive test coverage for all facet V2 operations
  • Added catalog-searchabilities-v2.js with comprehensive test coverage for all searchability V2 operations
  • All tests include proper cleanup in after hooks
  • Tests cover success cases, error cases, and network timeout scenarios

Breaking Changes

None. V2 methods are additive and V1 methods remain unchanged.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

Copilot AI review requested due to automatic review settings February 25, 2026 23:41
@constructor-claude-bedrock

This comment has been minimized.

This comment was marked as outdated.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment has been minimized.

@constructor-claude-bedrock

This comment was marked as outdated.

constructor-claude-bedrock[bot]

This comment was marked as outdated.

Copy link

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

constructor-claude-bedrock[bot]

This comment was marked as outdated.

Copy link

@constructor-claude-bedrock constructor-claude-bedrock bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR adds V2 Facets and Searchabilities API support with comprehensive method coverage, TypeScript types, and integration tests.

Inline comments: 8 discussions added

Overall Assessment: ⚠️ Needs Work

@esezen esezen requested a review from a team March 23, 2026 15:45
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.

3 participants