Skip to content

chore: update generated files from PR #11462#35

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

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

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

Auto-generated by the CI pipeline.

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

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.

The generated contract changes look internally consistent, but this branch leaves the package's public createHeadlessApiClient wrapper behind the new API surface. Consumers can import the raw generated types and make their own requests, but the advertised client cannot call the new enroll endpoint and still has no way to send the new country query parameter used for country-based reward filtering.

Comment thread src/types/api.ts
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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 adds the public headless enroll endpoint to the generated contract, but the package's exported createHeadlessApiClient wrapper does not get a corresponding customers.enroll(...) method. This means merchants using the client cannot actually opt a customer into the new customer_opt_in flow without dropping down to a hand-written fetch, even though the rest of the customer endpoints are wrapped in src/client.ts. Please add the wrapper method alongside this generated update.

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.

The generated operations now expose country as the query parameter that drives country-based reward filtering, but createHeadlessApiClient has no country option and none of its wrapped calls pass query params through. For all consumers using the high-level client, configuration/customer/reward responses will therefore keep falling back to the site default country and can show the wrong available rewards for shoppers in restricted countries. Please thread a country?: string option through the wrapper, similar to how language is handled.

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