Skip to content

chore: update generated files from PR #11283#32

Open
loyaltylion-bot wants to merge 1 commit into
mainfrom
codegen/pr-11283
Open

chore: update generated files from PR #11283#32
loyaltylion-bot wants to merge 1 commit into
mainfrom
codegen/pr-11283

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

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.ts
  • src/types/schemas.ts

@loyaltylion-minerva loyaltylion-minerva Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. A required title: string field on the nested rule object inside CustomerHistoryActionReceivedReward (in both api.ts and schemas.ts). The same shape is mirrored in both files, which is what we'd expect since schemas.ts is the inlined-types view of the same components in api.ts.
  2. An optional country?: string query 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 sibling channel / language parameters.

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.

Comment thread src/types/api.ts
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". */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Respond to this comment to discuss this review with me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant