Skip to content

Generated types, pagination and new endpoints - #10

Merged
alexpate merged 8 commits into
mainfrom
feat/generated-types
Oct 8, 2026
Merged

alexpate merged 8 commits into
mainfrom
feat/generated-types

Conversation

@alexpate

@alexpate alexpate commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

What

  • Types are generated from the API's OpenAPI spec (openapi.json -> src/generated), and the public types are derived from them.
  • New: passes.createDownloadLink, passes.redemptions.
  • Pagination: startingAfter on list methods, and listAll helpers for passes, templates, webhooks, events, pass events and webhook deliveries.
  • templates.list takes includeArchived, limit, startingAfter.
  • New types: template design issuerName / locations / relevantDate, redemption_policy, require_download_link, PATCH delivery + warnings, DELETE warnings, template warnings, and the pass.update_failed / pass.redeemed webhook events.
  • Minor changeset for @passmint/node; README updated.

Why

Types are now derived from the API's spec, and lin.ky needs pagination and the new endpoints.

Compatibility

Minor release. Every 0.4.0 type name is still exported.

  • Runtime: PASSMINT_EVENT_TYPES now has 9 entries (adds pass.update_failed, pass.redeemed). Code that subscribes webhooks with events: [...PASSMINT_EVENT_TYPES] will start receiving those events.
  • Response types gained fields the API already returned (e.g. Pass.redeemed_count, Account.plan). Hand-built typed object literals of Pass / Template / Account need them; reads and casts are unaffected.
  • Event-type unions gained pass.update_failed / pass.redeemed, and PassEvent['type'] gained update_failed, redeemed, download_link_created, update_not_delivered. Exhaustive switches and Record<PassmintEventType, ...> maps will flag the new members. PassEventType is a new export.
  • Pass.field_values and Account.organization_slug keep their 0.4.0 types for compatibility (see their docs).
  • Exported response types are now type aliases rather than interfaces: extends / implements still work, declaration merging into them no longer does.

Testing

pnpm lint, pnpm test (172 unit + type tests, including the 0.4.0 compatibility suite), pnpm build, pnpm attw, pnpm publint, pnpm generate:check all green.

Release

Draft until the platform release with the matching API changes is deployed. Then re-sync the spec from platform main with pnpm sync-spec and confirm no diff. Merge and publish only with Alex's go-ahead.

@alexpate
alexpate marked this pull request as ready for review October 8, 2026 14:39
@alexpate
alexpate merged commit 67231a6 into main Oct 8, 2026
6 checks passed
@alexpate
alexpate deleted the feat/generated-types branch October 8, 2026 14:41
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