chore: update generated files from PR #11278#31
Conversation
There was a problem hiding this comment.
This PR is auto-generated by CI from the OpenAPI contract changes in hogwarts PR #11278 — it adds a country?: string query parameter to 21 operations (configuration, customer session/state, all rewards.redeem*/refundProductCart, and all rules.complete*). The generated diff is mechanical and consistent: every change is the same two-line addition with the same JSDoc, applied in the same query? block on each operation. No removals, no schema/component changes. As a generated artifact, the regeneration faithfully reflects the upstream spec change and looks correct to merge alongside #11278.
Two upstream observations (worth flagging to the source PR rather than fixing here, since this file is generated):
countryis typed asstring, which is broader than the JSDoc claim ("ISO 3166-1 alpha-2"). Defining this as acomponents["schemas"]enum or constrained string (e.g.pattern: "^[A-Z]{2}$") in the OpenAPI spec would give consumers compile-time / runtime safety and match howchannelis modelled viacomponents["schemas"]["SupportedChannel"]. The existinglanguage?: unknownshows the same untyped-string drift, so this would be a small step in the right direction.- The parameter is added to
customers.setBirthday,customers.emailMarketingSubscribe, and therules.complete*family. The JSDoc says "Used to filter rewards by country availability," which is intuitive forgetConfiguration/getCustomer/redeem*but less obvious for birthday/email-subscribe/rule-completion endpoints. Worth confirming on the source PR that those responses really do include country-filtered reward state — and if so, tightening the JSDoc to say so. Otherwise the parameter is a no-op on those routes and adds confusion.
Neither blocks this PR — the codegen output is correct relative to the contract it was generated from.
| channel?: components["schemas"]["SupportedChannel"]; | ||
| /** @description The language to use for the request. If not provided, the site's default language will be used */ | ||
| language?: unknown; | ||
| /** @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 */ |
There was a problem hiding this comment.
Respond to this comment to discuss this review with me
There was a problem hiding this comment.
New commit 7a04bc2 adds a small, unrelated regen on top of the previous diff: a required title: string field on the nested rule object inside the CustomerHistoryActionReceivedReward schema (mirrored in api.ts and schemas.ts). The JSDoc is clear about the localization/fallback semantics. This is purely additive and consistent across both generated files — no new issues. My prior country observations were upstream-only and don't apply to this delta.
Auto-generated by the CI pipeline.
Source: https://github.com/loyaltylion/hogwarts/pull/11278
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