barsa a8580b0d61 Enhance Salesforce Account and Contact Creation in Signup Workflow
- Updated SalesforceAccountService to map gender values to Salesforce picklist values and added date of birth handling for contact creation.
- Modified SignupWorkflowService to require gender and date of birth during account creation, ensuring complete data submission.
- Adjusted SignupAccountResolverService to include gender and date of birth in account creation logic, improving data integrity.
- Introduced SalesforceContactRecord interface in domain to standardize contact data structure, enhancing type safety and validation.
2026-01-06 16:52:02 +09:00

75 lines
1.9 KiB
TypeScript

/**
* Customer Domain - Contract
*
* Constants and provider-specific types.
* Main domain types exported from schema.ts
*
* Pattern matches billing and subscriptions domains.
*/
// ============================================================================
// User Role Constants
// ============================================================================
export const USER_ROLE = {
USER: "USER",
ADMIN: "ADMIN",
} as const;
export type UserRoleValue = (typeof USER_ROLE)[keyof typeof USER_ROLE];
// ============================================================================
// Salesforce Integration Types (Provider-Specific, Not Validated)
// ============================================================================
/**
* Salesforce account field mapping
* This is provider-specific and not validated at runtime
*/
export interface SalesforceAccountFieldMap {
internetEligibility: string;
customerNumber: string;
}
/**
* Salesforce account record structure
* Raw structure from Salesforce API
*/
export interface SalesforceAccountRecord {
Id: string;
Name?: string | null;
WH_Account__c?: string | null;
[key: string]: unknown;
}
/**
* Salesforce contact record structure
* Raw structure from Salesforce API
*/
export interface SalesforceContactRecord {
Id: string;
AccountId?: string | null;
FirstName?: string | null;
LastName?: string | null;
Email?: string | null;
MobilePhone?: string | null;
Phone?: string | null;
Sex__c?: string | null;
Birthdate?: string | null; // YYYY-MM-DD format
[key: string]: unknown;
}
// ============================================================================
// Re-export Types from Schema (Schema-First Approach)
// ============================================================================
export type {
User,
UserAuth,
UserRole,
Address,
AddressFormData,
ResidenceCardVerificationStatus,
ResidenceCardVerification,
} from "./schema.js";