Skip to content

chore: update generated files from PR #11292#33

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

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

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

Auto-generated by the CI pipeline.

Source: https://github.com/loyaltylion/hogwarts/pull/11292

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.

Auto-generated codegen PR from hogwarts #11292. The regenerated TypeScript reflects three additive contract changes:

  1. New loyalty_pass_install rule kind — RuleLoyaltyPassInstall and CustomerAvailableRuleLoyaltyPassInstall interfaces added with the same shape as sibling rule kinds (limit/kind/variants and limit/kind/variant/context respectively), inserted into the SiteConfiguration.rules and CustomerEnrolled.available_rules unions, and added to the kind literal enums on CustomerHistoryActionEarnedPointsFromRule.rule and CustomerHistoryActionReceivedReward.rule.
  2. New optional country?: string query parameter, added uniformly to all 21 GET operations that already accept language?: unknown — consistent coverage, no missed endpoints.
  3. New title: string field on CustomerHistoryActionReceivedReward.rule.

All changes are additive and look like faithful regeneration — no manual edits or drift from the codegen pattern visible. Build/typecheck wasn't run as this PR only touches generated .d.ts-style types and runs through tsc at downstream consumer build time; downstream packages will pick this up as new optional fields/union variants without breakage.

One asymmetry worth confirming against the source PR before merging — see line comment on CustomerHistoryActionEarnedPointsFromRule.rule.

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";
kind: "birthday" | "loyalty_pass_install" | "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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The rule reference here (in CustomerHistoryActionEarnedPointsFromRule) still only carries id + kind, while the symmetrical rule reference on CustomerHistoryActionReceivedReward (line 4740) gained a new title: string field in this same regeneration. The two rule-reference subobjects had identical shapes before this PR, and the new title would be just as useful on the "earned points from rule" surface as on "received reward" — e.g. "Refer a friend — 500 points" alongside the existing reward-side example. Worth confirming with the source PR (#11292) author whether this asymmetry is deliberate (the field description mentions surfacing "alongside the reward", which hints at intent) or an oversight on the earned-points action. If it's an oversight, a follow-up to the source contract would close the gap; nothing to fix here in the codegen output itself.

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