- Introduced MeStatus module to aggregate customer status, integrating dashboard summary, payment methods, internet eligibility, and residence card verification. - Updated dashboard hooks to utilize MeStatus for improved data fetching and error handling. - Enhanced notification handling across various modules, including cancellation notifications for internet and SIM services, ensuring timely user alerts. - Refactored related schemas and services to support new dashboard tasks and notification types, improving overall user engagement and experience.
58 lines
1.5 KiB
TypeScript
58 lines
1.5 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;
|
|
}
|
|
|
|
// ============================================================================
|
|
// Re-export Types from Schema (Schema-First Approach)
|
|
// ============================================================================
|
|
|
|
export type {
|
|
User,
|
|
UserAuth,
|
|
UserRole,
|
|
Address,
|
|
AddressFormData,
|
|
ResidenceCardVerificationStatus,
|
|
ResidenceCardVerification,
|
|
} from "./schema.js";
|