packages/express/src/messaging.ts and packages/core/src/authMessaging.ts are byte-identical (114 lines each, diff reports no changes). Every messaging type is therefore declared twice, and the two copies can drift without anything failing.
The express package already depends on core ("@seamless-auth/core": "workspace:^") and already re-exports from it in src/index.ts:
export type { SeamlessUser } from "@seamless-auth/core";
export { hasScopedRole, roleGrantsAccess } from "@seamless-auth/core";
So the fix follows the pattern already in place:
- Delete
packages/express/src/messaging.ts.
- Point the messaging type re-exports in
packages/express/src/index.ts at @seamless-auth/core.
- Update the internal importers (
src/internal/deliverAuthMessage.ts and anything else resolving ./messaging).
Related: the pure data shapes in this file (MessagingChannel, DeliveryResult, EmailMessage, SmsMessage, SendOtpEmailInput, SendOtpSmsInput, SendMagicLinkEmailInput, AuthDeliveryInstruction) are also duplicated in seamless-messaging/packages/core/src/types.ts, and have now been published from @seamless-auth/types as Zod schemas with inferred types. Core could take them from there instead of declaring them, leaving only the transport interfaces (which carry provider implementations) local to this repo.
packages/express/src/messaging.tsandpackages/core/src/authMessaging.tsare byte-identical (114 lines each,diffreports no changes). Every messaging type is therefore declared twice, and the two copies can drift without anything failing.The express package already depends on core (
"@seamless-auth/core": "workspace:^") and already re-exports from it insrc/index.ts:So the fix follows the pattern already in place:
packages/express/src/messaging.ts.packages/express/src/index.tsat@seamless-auth/core.src/internal/deliverAuthMessage.tsand anything else resolving./messaging).Related: the pure data shapes in this file (
MessagingChannel,DeliveryResult,EmailMessage,SmsMessage,SendOtpEmailInput,SendOtpSmsInput,SendMagicLinkEmailInput,AuthDeliveryInstruction) are also duplicated inseamless-messaging/packages/core/src/types.ts, and have now been published from@seamless-auth/typesas Zod schemas with inferred types. Core could take them from there instead of declaring them, leaving only the transport interfaces (which carry provider implementations) local to this repo.