Skip to content

feat(pricing-client, targeting-client): product recommendation rule table - #620

Merged
paulofph merged 1 commit into
mainfrom
feat/pricing-targeting-client-rule-table
Nov 20, 2026
Merged

paulofph merged 1 commit into
mainfrom
feat/pricing-targeting-client-rule-table

Conversation

@paulofph

Copy link
Copy Markdown
Member

Summary

Updates two clients to the current specs on main of the source APIs. The specs were regenerated with scripts/update-openapi.js (openapi.json + openapi-runtime.json), then npm run typegen (openapi.d.ts).

@epilot/pricing-client 3.65.3 → 3.66.0 (Pricing API 1.3.0)

  • ProductRecommendationSearch.campaign_id (optional): asks for the offers from a tariff change campaign's rule table. It is used together with contract_id.
  • The rule table schemas from 1.2.4 (ProductRecommendationRule and related) were already in the client (9836685), so nothing changes there.

@epilot/targeting-client 0.20.0 → 0.21.0 (Targeting API 1.1.0, latest main)

  • SetupNewProductRecommendation.rules?: ProductRecommendationRule[]
  • New schemas:
    • ProductRecommendationRule
    • ProductRecommendationOfferGroup
    • SetupCampaignRuleError: the setupCampaign 400 response is now ClientError | SetupCampaignRuleError.
  • product_recommendations gets maxItems: 1. Its generated type changes from a tuple with rest elements to a single-item tuple.
  • The spec also adds changes that had not been synced yet:
    • an EmailEngagement schema and an email_engagement query parameter on getRecipients
    • 403/503 responses on setupCampaign, discoverCampaigns, updateRecipientEntityUiStatus and restoreRecipientEntityUiStatus

Versioning

Both package.json versions were bumped by a minor version, following the recent direct-bump pattern for these two clients (CONTRIBUTING: npm version minor --no-git-tag-version). There is no changeset, so a later changeset version will not bump them a second time.

How it gets released

  • @epilot/sdk: released automatically. This PR changes clients/*/src/openapi.json, openapi.d.ts and openapi-runtime.json. The auto-release job checks git diff HEAD~1 HEAD on the push to main.
    • A squash merge puts everything in one commit.
    • A merge commit's diff against its first parent contains the same files.
    • Either way the commit matches, so CI regenerates packages/epilot-sdk-v2 (pnpm --filter @epilot/sdk generate), bumps the patch version, tags it and publishes.
    • The regenerated packages/epilot-sdk-v2 output is left out of this PR on purpose, as in previous client PRs, because the auto-release commit produces it.
    • Do not use [skip release] in the merge commit message. A rebase merge would also work, because the last commit contains the spec files.
  • @epilot/pricing-client / @epilot/targeting-client (standalone npm packages): these are not auto-released. A maintainer publishes them after merge (pnpm publish in each client folder or pnpm publish-packages). Nothing was published from this PR.

Test plan

  • npm run build in both clients
  • vitest in both clients (3/3 each)
  • pnpm lint (biome, repo-wide) is clean
  • pnpm generate-sdk, then build and test of @epilot/sdk locally: 376/376 pass. Only the pricing/targeting types, docs and definitions changed, which shows the rest of the SDK was already in sync.
  • Generated types contain campaign_id (pricing) and rules, ProductRecommendationRule and SetupCampaignRuleError (targeting).

Generated by Claude Code

…able

- @epilot/pricing-client 3.66.0: Pricing API 1.3.0 spec, adds
  `campaign_id` to `ProductRecommendationSearch` (rule table schemas from
  1.2.4 were already in the client)
- @epilot/targeting-client 0.21.0: `rules` on
  `SetupNewProductRecommendation`, new `ProductRecommendationRule`,
  `ProductRecommendationOfferGroup`, `SetupCampaignRuleError` schemas,
  `maxItems: 1` on `product_recommendations`, `email_engagement` filter,
  403/503 responses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012h2oEFg2vbGeGsCBZspGn4
@paulofph
paulofph merged commit eb55713 into main Nov 20, 2026
7 checks passed
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