chore: update generated files from PR #11530#48
Conversation
There was a problem hiding this comment.
The generated type additions are mostly consistent with the existing OpenAPI shape: the new loyalty-pass rule is wired through both the configuration and customer rule unions, and tightening language from unknown to string matches the field documentation. The main elegance issue is that this branch expands the low-level operation surface without carrying those capabilities through the package's handwritten createHeadlessApiClient wrapper, which is the primary API shown in the README. That leaves new API capabilities discoverable in the types but awkward or unavailable for normal client users.
I could not read .claude/skills/core-elegance-review/SKILL.md because this checkout does not contain a .claude directory, so I applied the prompt's static-review checklist directly.
| patch?: never; | ||
| trace?: never; | ||
| }; | ||
| "/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": { |
There was a problem hiding this comment.
Adding the customers.enroll path here should be paired with a customers.enroll(...) helper in src/client.ts. Every other operation in this paths map has a corresponding method on the high-level client, and the README steers consumers toward that wrapper rather than raw openapi-fetch. As-is, the endpoint is typed but unavailable through the package's main public surface.
| 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 accepted in the operation types, but createHeadlessApiClient has no country option and none of the wrapper methods accept per-call query params. That makes country-specific reward filtering unreachable for consumers using the advertised client API, even though the low-level type surface says the API supports it. Consider adding a client-level or per-call country option and passing it through consistently.
Auto-generated by the CI pipeline.
Source: https://github.com/loyaltylion/hogwarts/pull/11530
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