Skip to content

feat: shopper/admin attributes, bundle min/max, catalog rule validation, pricebook segmentation#89

Merged
field123 merged 6 commits into
mainfrom
feat/pim-and-catalog-spec-updates
May 6, 2026
Merged

feat: shopper/admin attributes, bundle min/max, catalog rule validation, pricebook segmentation#89
field123 merged 6 commits into
mainfrom
feat/pim-and-catalog-spec-updates

Conversation

@field123
Copy link
Copy Markdown
Collaborator

@field123 field123 commented May 6, 2026

Closes #90

Summary

Brings the legacy SDK in line with recent additions to the upstream PIM (pim.yaml) and shopper Catalog View (catalog_view.yaml) OpenAPI specs. All changes are additive — no breaking changes.

From pim.yaml (admin / PXM)

  • shopper_attributes / admin_attributes on products — adds the two { [key: string]: string } maps to PcmProductBase.attributes (the equivalent fields are already on HierarchyBase and NodeBase, so this rounds out the trio).
  • Per-option min / max on bundle component options — adds min and max to ProductComponentOption (component-level min/max already exists on ProductComponents).
  • Product export columns.include — adds an optional third argument to ExportProducts(filter, useTemplateSlugs, columns) and threads { data: { type: 'product', attributes: { columns } } } through as the request body. Supports individual keys (admin_attributes.cost_of_goods) and wildcards (admin_attributes.*).

From catalog_view.yaml (shopper / catalog)

  • Validate on Rules — new POST /catalogs/rules/validate method on the CatalogsRulesEndpoint. Adds CatalogRuleValidatorRequest (with match_type of filter | similarity | conflict | resolve_for_shopper), RuleMeta (similarity_score, active, resolved_for_shopper, release_id), ValidatedRule, and ValidateRulesResponse.
  • pricebook_ids on RuleFilter — populates the previously-stub RuleFilter interface with eq and in operators against id, catalog_id, account_ids, customer_ids, channels, tags and the new pricebook_ids. Also adds pricebook_ids?: string[] on RuleBase.attributes.
  • Pricebook segmentation product fields — adds available_prices, alternative_prices and available_pricebook_ids on ProductResponse.attributes. Component product metadata also gains alternative_prices. New AvailablePrice, AlternativePrice and PriceTier types.
  • ReleaseIndexingCompleteData — new type for the indexing-complete payload ({ data: { status: 'succeeded' | 'failed' } }).

Out of scope

  • The EP-Pricebook-IDs-Of-Available-Prices-To-Show request header isn't threaded through the relevant Catalog/Catalogs.Products methods. The request factory already supports additionalHeaders so this could be done as a follow-up; threading it through every method is a larger API surface change worth its own PR.

Test plan

  • yarn lint clean
  • yarn rollup builds clean (existing CodeFileHref re-export warning is pre-existing on main)
  • yarn test — pre-existing environment issue on main (chai module not linked under current Node version) blocks the suite; not introduced here
  • Reviewer: spot-check the new types compile against a downstream consumer

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test Results

  1 files  ±0   55 suites  ±0   2s ⏱️ ±0s
358 tests ±0  358 ✅ ±0  0 💤 ±0  0 ❌ ±0 
363 runs  ±0  363 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 0e63d78. ± Comparison against base commit ee97601.

@field123 field123 requested a review from ellanan May 6, 2026 08:57
@field123 field123 merged commit 807e7a3 into main May 6, 2026
11 checks passed
@field123 field123 deleted the feat/pim-and-catalog-spec-updates branch May 6, 2026 09:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🎉 This PR is included in version 33.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for shopper/admin attributes, bundle min/max, catalog rule validation and pricebook segmentation

2 participants