- Implemented FormStep component for user input (name, email, address). - Created OtpStep component for OTP verification. - Developed SuccessStep component to display success messages based on account creation. - Introduced eligibility-check.store for managing state throughout the eligibility check process. - Added commitlint configuration for standardized commit messages. - Configured knip for workspace management and project structure.
71 lines
2.0 KiB
TypeScript
71 lines
2.0 KiB
TypeScript
/**
|
|
* Get Started Domain
|
|
*
|
|
* Unified "Get Started" flow for:
|
|
* - Email verification (OTP)
|
|
* - Account status detection
|
|
* - Quick eligibility check (guest)
|
|
* - Account completion (SF-only → full account)
|
|
* - "Maybe Later" flow
|
|
*/
|
|
|
|
// ============================================================================
|
|
// Constants & Contract Types
|
|
// ============================================================================
|
|
|
|
export {
|
|
ACCOUNT_STATUS,
|
|
OTP_ERROR_CODE,
|
|
GET_STARTED_ERROR_CODE,
|
|
type AccountStatus,
|
|
type OtpErrorCode,
|
|
type GetStartedErrorCode,
|
|
type SendVerificationCodeRequest,
|
|
type SendVerificationCodeResponse,
|
|
type VerifyCodeRequest,
|
|
type VerifyCodeResponse,
|
|
type QuickEligibilityRequest,
|
|
type QuickEligibilityResponse,
|
|
type GuestEligibilityRequest,
|
|
type GuestEligibilityResponse,
|
|
type GuestHandoffToken,
|
|
type CompleteAccountRequest,
|
|
type MaybeLaterRequest,
|
|
type MaybeLaterResponse,
|
|
type SignupWithEligibilityRequest,
|
|
type SignupWithEligibilityResponse,
|
|
type GetStartedSession,
|
|
type GetStartedError,
|
|
} from "./contract.js";
|
|
|
|
// ============================================================================
|
|
// Schemas (for validation)
|
|
// ============================================================================
|
|
|
|
export {
|
|
// OTP schemas
|
|
sendVerificationCodeRequestSchema,
|
|
sendVerificationCodeResponseSchema,
|
|
otpCodeSchema,
|
|
verifyCodeRequestSchema,
|
|
verifyCodeResponseSchema,
|
|
accountStatusSchema,
|
|
// Quick eligibility schemas (OTP-verified)
|
|
quickEligibilityRequestSchema,
|
|
quickEligibilityResponseSchema,
|
|
// Guest eligibility schemas (no OTP required)
|
|
guestEligibilityRequestSchema,
|
|
guestEligibilityResponseSchema,
|
|
guestHandoffTokenSchema,
|
|
// Account completion schemas
|
|
completeAccountRequestSchema,
|
|
// Signup with eligibility schemas (full inline signup)
|
|
signupWithEligibilityRequestSchema,
|
|
signupWithEligibilityResponseSchema,
|
|
// Maybe later schemas
|
|
maybeLaterRequestSchema,
|
|
maybeLaterResponseSchema,
|
|
// Session schema
|
|
getStartedSessionSchema,
|
|
} from "./schema.js";
|