chore: update generated files from PR #11258#27
Conversation
There was a problem hiding this comment.
This is an auto-generated codegen PR that re-emits src/types/api.ts and src/types/schemas.ts from the upstream contract changes in hogwarts#11258. Two distinct contract changes flow through:
- A new
country?: stringquery parameter is added to all 21 operations. - A new non-nullable
title: stringfield is added to theruleobject inside theCustomerHistoryActionReceivedRewardschema (mirrored in bothapi.tsandschemas.ts).
The codegen looks mechanically consistent — descriptions and shapes are identical across all 21 operation copies, and the schema change is reflected in both files. No client-code drift versus the contract.
A couple of observations that probably belong upstream rather than blocking this codegen PR, but worth flagging in case the upstream PR is still open for tweaks:
- The
countryparameter description reads "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability." This wording is applied uniformly to operations that aren't customer-scoped (e.g.configuration.getConfiguration) and to operations whose responses don't surface rewards (e.g.rules.completeClickthrough,rules.completeFacebookLike,rules.completeTwitterFollow, etc.). If the parameter genuinely affects behaviour on the non-reward-returning rule-complete endpoints, the description should explain how; if it doesn't, scoping the parameter to the reward/configuration/customer endpoints in the source OpenAPI would be cleaner. Either way, the fix belongs in hogwarts#11258, not here. rule.title: string(non-nullable) relies on a server-side fallback to the rule-kind default title. The contract description documents this — looks correct as long as the server never emits a null/missing title for this field. Worth a quick double-check in the source PR's handler if not already verified.
If the upstream PR is already merged and there's no appetite for revising the description copy, this codegen is safe to merge as-is.
| 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.
The description "ISO 3166-1 alpha-2 country code for the customer" is being applied to configuration.getConfiguration, which isn't customer-scoped — it returns site configuration. The wording reads awkwardly here. Upstream tweak in hogwarts#11258 rather than a fix in this codegen PR.
| 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.
rules.completeClickthrough (and the other rules.complete* operations at lines 10376, 10484, 10592, 10700, 10808) gained a country param whose description says it's "used to filter rewards by country availability." These endpoints are POST-completes returning rule completion state — they don't appear to surface a filtered rewards list. Worth confirming with the source PR whether the param has any effect on these operations, or whether the upstream OpenAPI is over-applying it as a shared query-param block.
Auto-generated by the CI pipeline.
Source: https://github.com/loyaltylion/hogwarts/pull/11258
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