chore: update generated files from PR #11283#32
Conversation
There was a problem hiding this comment.
This is a CI-generated update to the two openapi-typescript-produced files (src/types/api.ts, src/types/schemas.ts) reflecting upstream contract changes from hogwarts PR #11283. The diff contains two distinct additions:
- A required
title: stringfield on the nestedruleobject insideCustomerHistoryActionReceivedReward(in bothapi.tsandschemas.ts). The same shape is mirrored in both files, which is what we'd expect sinceschemas.tsis the inlined-types view of the same components inapi.ts. - An optional
country?: stringquery parameter added to 21 operations — described as an ISO 3166-1 alpha-2 code used for filtering rewards by country availability. The description text is identical across all 21 sites and matches the existing style of the siblingchannel/languageparameters.
Both additions are additive and backward-compatible at the type level: response consumers that ignore title continue to compile, and the new query parameter is optional so existing call sites are unaffected. The changes look like a faithful regeneration with no manual edits or drift between the two generated files — nothing to flag for the codegen output itself.
One upstream observation that's worth surfacing back to the hogwarts PR rather than blocking here: title is generated as a required (non-nullable) string, but the JSDoc states the value falls back to "the default title for the rule kind". Worth confirming the backend really does always populate title even when the rule has been deleted (the same schema notes the rule may no longer exist in the current Site Configuration). If there's any path where title could be absent, the upstream OpenAPI schema should mark it nullable/optional so this regenerates as title: string | null or title?: string. Not a blocker for merging this codegen PR.
No issues with the generated output. LGTM.
| id: number; | ||
| /** @enum {string} */ | ||
| kind: "birthday" | "collection_purchase" | "newsletter_signup" | "pageview" | "product_purchase" | "purchase" | "join_program" | "review" | "custom" | "facebook_like" | "twitter_follow" | "instagram_follow" | "instagram_mention" | "instagram_post_hashtag" | "tiktok_follow" | "tiktok_post_hashtag" | "referral" | "clickthrough" | "retail_purchase"; | ||
| /** @description Localized display title for the rule (the merchant-configured title for the shopper-facing locale, falling back to the default title for the rule kind). Useful for surfacing the rule context alongside the reward — e.g. "Refer a friend — $5 voucher". */ |
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/11283
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