Skip to content

chore: update generated files from PR #11530#48

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

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

Conversation

@loyaltylion-bot

Copy link
Copy Markdown
Collaborator

Auto-generated by the CI pipeline.

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

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 type additions are mostly consistent with the existing OpenAPI shape: the new loyalty-pass rule is wired through both the configuration and customer rule unions, and tightening language from unknown to string matches the field documentation. The main elegance issue is that this branch expands the low-level operation surface without carrying those capabilities through the package's handwritten createHeadlessApiClient wrapper, which is the primary API shown in the README. That leaves new API capabilities discoverable in the types but awkward or unavailable for normal client users.

I could not read .claude/skills/core-elegance-review/SKILL.md because this checkout does not contain a .claude directory, so I applied the prompt's static-review checklist directly.

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.

Adding the customers.enroll path here should be paired with a customers.enroll(...) helper in src/client.ts. Every other operation in this paths map has a corresponding method on the high-level client, and the README steers consumers toward that wrapper rather than raw openapi-fetch. As-is, the endpoint is typed but unavailable through the package's main public surface.

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.

country is now accepted in the operation types, but createHeadlessApiClient has no country option and none of the wrapper methods accept per-call query params. That makes country-specific reward filtering unreachable for consumers using the advertised client API, even though the low-level type surface says the API supports it. Consider adding a client-level or per-call country option and passing it through consistently.

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