Skip to content

feat(core): take the message data shapes from @seamless-auth/types - #17

Merged
Bccorb merged 1 commit into
mainfrom
feat/shared-message-types
Oct 31, 2026
Merged

Bccorb merged 1 commit into
mainfrom
feat/shared-message-types

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Closes #4.

Changes

@seamless-auth/messaging now depends on @seamless-auth/types (^0.33.0) and re-exports the shared definitions instead of declaring its own copies:

  • MessagingChannel, DeliveryResult and SmsMessage in packages/core/src/types.ts
  • SendOtpEmailInput, SendOtpSmsInput and SendMagicLinkEmailInput in packages/core/src/messages.ts
  • AuthDeliveryInstruction is newly exported, so a transport author can type the payload the API returns in external delivery mode without a second import

All imports are import type, so the compiled JavaScript does not load @seamless-auth/types or Zod. The dependency is there for the published .d.ts files.

What stays local

Two shapes are not in the shared package yet, so they stay here:

  • EmailMessage is the shared EmailMessage extended with headers, which landed here in feat(email): carry custom headers through to SES #14 after @seamless-auth/types published its copy. Dropping it would break the SES v2 header support.
  • SendEnrollmentInviteEmailInput has no shared counterpart.

Once @seamless-auth/types carries both, these become plain re-exports.

EmailTransport, SmsTransport, the handler and override types, AuthMessagingService and the provider configs stay here as the issue describes, since they carry implementation rather than data.

Checks

npm run typecheck, npm run lint, npm run format:check and npm test (12 passing) all pass locally.

@Bccorb
Bccorb merged commit 2f730ff into main Oct 31, 2026
3 checks passed
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.

Take the message data shapes from @seamless-auth/types

1 participant