Skip to content

chore: update generated files from PR #11484#41

Open
loyaltylion-bot wants to merge 1 commit into
mainfrom
codegen/pr-11484
Open

chore: update generated files from PR #11484#41
loyaltylion-bot wants to merge 1 commit into
mainfrom
codegen/pr-11484

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

Auto-generated by the CI pipeline.

Source: https://github.com/loyaltylion/hogwarts/pull/11484

These files were regenerated from changes to the API contracts. Review and merge alongside the main PR.

Generated files:

  • src/types/api.ts
  • src/types/schemas.ts

@loyaltylion-minerva loyaltylion-minerva Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Static review only, per the environment constraints. I found one issue: the generated types expose country-aware Headless API filtering, but the package's exported convenience client still has no way to send country, so consumers using createHeadlessApiClient cannot actually use the new behavior.

Comment thread src/types/api.ts
language?: unknown;
language?: string;
/** @description ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used */
country?: string;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This new country parameter needs a matching change in the exported client wrapper. createHeadlessApiClient currently accepts global channel and language, then sends them as headers for every call, but it has no country option and none of the wrapper methods include params.query. Since this parameter is what filters configuration/customer/reward responses by country availability, consumers using the main client API will still always get the site default country even after these generated types are published. Please add a country?: string option or per-call country support in src/client.ts and thread it through the generated operations that now accept this query param.

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