chore: update generated files from PR #11506#42
Conversation
There was a problem hiding this comment.
The generated schema changes are mostly coherent: the loyalty-pass rule is mirrored in both the component and named schema surfaces, the history rule title is carried through consistently, and narrowing language from unknown to string makes the contract more useful.
The main elegance gap is that this package has two public surfaces: raw OpenAPI types and the createHeadlessApiClient wrapper. This PR updates the raw generated surface, but the wrapper now lags behind the contract for the new enroll endpoint and country-aware filtering. If this branch is intentionally raw-types-only, that is worth making explicit; otherwise the hand-written client needs the same surface area.
| }; | ||
| get?: never; | ||
| put?: never; | ||
| post: operations["customers.enroll"]; |
There was a problem hiding this comment.
This exposes the new customers.enroll operation in the generated contract, but createHeadlessApiClient still has no customers.enroll wrapper method. Every existing operation in this API file is represented in the high-level client, so users following the advertised client surface cannot call the new endpoint without dropping to raw fetch/paths types. Please add the wrapper method as part of the same change, or make it explicit that this endpoint is intentionally raw-OpenAPI-only.
| 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.
country is now part of the generated query contract, but the exported client cannot pass it: HeadlessApiClientOptions only accepts channel/language, and each wrapper request only supplies path params. That means consumers using createHeadlessApiClient still cannot use the country-based reward filtering this contract advertises. Please thread a country option through the wrapper requests, or use the supported country header if the API accepts one.
| @@ -63,6 +63,22 @@ export interface paths { | |||
| patch?: never; | |||
| trace?: never; | |||
| }; | |||
| "/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": { | |||
| parameters: { | |||
There was a problem hiding this comment.
Respond to this comment to discuss this review with me
Auto-generated by the CI pipeline.
Source: https://github.com/loyaltylion/hogwarts/pull/11506
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