38 lines
944 B
TypeScript
Raw Normal View History

/**
* Subscriptions Domain
*
* Exports subscriptions contracts + schemas.
*
* Provider adapters (BFF-only) live under: `@customer-portal/domain/subscriptions/providers`.
*
* Types are derived from Zod schemas (Schema-First Approach)
*/
// Constants
export { SUBSCRIPTION_STATUS, SUBSCRIPTION_CYCLE } from "./contract.js";
// Schemas (includes derived types)
export * from "./schema.js";
// Re-export schemas for validation
export {
internetCancellationMonthSchema,
internetCancellationPreviewSchema,
internetCancelRequestSchema,
// Unified cancellation
serviceTypeSchema,
cancellationNoticeSchema,
cancellationStatusSchema,
cancellationPreviewSchema,
} from "./schema.js";
// Utilities
export {
generateCancellationMonths,
getCancellationEffectiveDate,
getRunDateFromMonth,
type BaseCancellationMonth,
type CancellationMonthWithRunDate,
type GenerateCancellationMonthsOptions,
} from "./utils/index.js";