barsa 464f98284a feat(eligibility): add address key field for Salesforce Flow duplicate detection
Add Eligibility_Address_Key__c field (postcode:streetAddress format) to Case records
for eligibility check requests. Salesforce Flow will use this field to detect duplicate
requests for the same address within a time period.

Changes:
- Add eligibilityAddressKey to CreateCaseParams and CASE_FIELDS mapping
- Add streetAddress param to EligibilityCheckCaseParams for passing from callers
- Add createAddressKey() helper in WorkflowCaseManager to generate the key
- Update raw.types.ts schema with new field
- Note in internet-eligibility.service.ts that basic flow skips duplicate detection
2026-01-20 19:00:09 +09:00

66 lines
1.9 KiB
TypeScript

/**
* Get Started Domain
*
* Unified "Get Started" flow for:
* - Email verification (OTP)
* - Account status detection
* - Guest eligibility check (no OTP required)
* - Account completion (SF-only → full account)
* - Signup with eligibility (full 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 BilingualEligibilityAddress,
type GuestEligibilityRequest,
type GuestEligibilityResponse,
type GuestHandoffToken,
type CompleteAccountRequest,
type SignupWithEligibilityRequest,
type SignupWithEligibilityResponse,
type MigrateWhmcsAccountRequest,
type GetStartedSession,
type GetStartedError,
} from "./contract.js";
// ============================================================================
// Schemas (for validation)
// ============================================================================
export {
// OTP schemas
sendVerificationCodeRequestSchema,
sendVerificationCodeResponseSchema,
otpCodeSchema,
verifyCodeRequestSchema,
verifyCodeResponseSchema,
accountStatusSchema,
// Guest eligibility schemas (no OTP required)
bilingualEligibilityAddressSchema,
guestEligibilityRequestSchema,
guestEligibilityResponseSchema,
guestHandoffTokenSchema,
// Account completion schemas
completeAccountRequestSchema,
// Signup with eligibility schemas (full inline signup)
signupWithEligibilityRequestSchema,
signupWithEligibilityResponseSchema,
// WHMCS migration schema (passwordless migration)
migrateWhmcsAccountRequestSchema,
// Session schema
getStartedSessionSchema,
} from "./schema.js";