chore: update generated files from PR #11462#35
Conversation
There was a problem hiding this comment.
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.
| patch?: never; | ||
| trace?: never; | ||
| }; | ||
| "/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": { |
There was a problem hiding this comment.
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.
| 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; |
There was a problem hiding this comment.
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.
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.tssrc/types/schemas.ts