Skip to content

chore: update generated files from PR #11258#27

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

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

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

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.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 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:

  1. A new country?: string query parameter is added to all 21 operations.
  2. A new non-nullable title: string field is added to the rule object inside the CustomerHistoryActionReceivedReward schema (mirrored in both api.ts and schemas.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 country parameter 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.

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

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 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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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