Skip to content

chore: update generated files from PR #11452#34

Open
loyaltylion-bot wants to merge 7 commits into
mainfrom
codegen/pr-11452
Open

chore: update generated files from PR #11452#34
loyaltylion-bot wants to merge 7 commits into
mainfrom
codegen/pr-11452

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

Auto-generated by the CI pipeline.

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

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.

The generated schema updates are internally consistent with the upstream contracts I checked, but there is one integration gap to address before releasing this client: the new country context is exposed only in the generated operation types, while the package's documented client wrapper cannot send it.

Comment thread src/types/api.ts
language?: unknown;
language?: string;
/** @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 */
country?: string;

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 adds country as a supported query parameter, but createHeadlessApiClient does not expose any way to send it. That matters because, unlike channel and language, the upstream headless contract does not define a corresponding X-LoyaltyLion-Country header, so every call made through the documented client wrapper will continue to use the site's default country and cannot exercise country-based reward availability. Please add a country option/per-call override and include it in params.query for the wrapper calls that return configuration/customer reward data, or users will have to bypass the client to use this newly generated API surface.

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

Previous country-wrapper feedback remains unaddressed; the new changes only reword generated descriptions, and I found no new issues.

Comment thread src/types/api.ts Outdated
currency: string;
/** @description `ISO 639-1` code indicating the language used for any text in this response */
language: unknown;
language: string;

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

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

Previous country-wrapper feedback remains unaddressed. The latest push adds generated types for the customer enrollment endpoint, but that new endpoint is also not exposed through the documented client wrapper.

Comment thread src/types/api.ts
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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 generated endpoint needs a matching createHeadlessApiClient wrapper method before this package is released. The documented client currently exposes the neighboring customer actions (getCustomer, initializeSession, setBirthday, and subscribeToEmailMarketing), but there is no customers.enroll method, so consumers using the package's main API cannot call this new endpoint without dropping down to their own fetch/openapi client. Please add the wrapper method alongside the generated type update.

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

Previous country and enroll wrapper feedback remains unaddressed. The latest change adds fulfillment_type and clearer custom voucher code descriptions to the generated types; I found no new issues.

Comment thread src/types/api.ts
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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

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

Previous country and enroll wrapper feedback remains unaddressed. The latest generated change narrows custom reward fulfillment properties into a discriminated union; I found no new issues.

Comment thread src/types/api.ts
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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

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

Previous country and enroll wrapper feedback remains unaddressed. The latest generated changes only clarify custom reward/voucher descriptions; I found no new issues.

Comment thread src/types/api.ts
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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

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

Previous country and enroll wrapper feedback remains unaddressed. The latest regeneration mostly reorders generated schema blocks without adding new exported schema names; I found no new issues.

Comment thread src/types/api.ts
@@ -63,6 +63,22 @@ export interface paths {
patch?: never;
trace?: never;
};
"/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {

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