barsa 10c8461661 Implement Zod DTOs for Request Validation and Enhance ESLint Rules
- Introduced Zod DTOs for request validation across multiple controllers, replacing inline validation with structured classes for improved maintainability and clarity.
- Updated ESLint configuration to enforce a rule against importing Zod directly in BFF controllers, promoting the use of shared domain schemas for request validation.
- Removed the SecureErrorMapperService to streamline the security module, as its functionality was deemed unnecessary.
- Enhanced various controllers to utilize the new DTOs, ensuring consistent validation and response handling across the application.
2025-12-26 13:04:15 +09:00

44 lines
1.3 KiB
TypeScript

/**
* Payments Domain - Contract
*
* Constants and types for the payments domain.
* All validated types are derived from schemas (see schema.ts).
*/
// ============================================================================
// Payment Method Type Constants
// ============================================================================
export const PAYMENT_METHOD_TYPE = {
CREDIT_CARD: "CreditCard",
BANK_ACCOUNT: "BankAccount",
REMOTE_CREDIT_CARD: "RemoteCreditCard",
REMOTE_BANK_ACCOUNT: "RemoteBankAccount",
MANUAL: "Manual",
} as const;
// ============================================================================
// Payment Gateway Type Constants
// ============================================================================
export const PAYMENT_GATEWAY_TYPE = {
MERCHANT: "merchant",
THIRDPARTY: "thirdparty",
TOKENIZATION: "tokenization",
MANUAL: "manual",
} as const;
// ============================================================================
// Re-export Types from Schema (Schema-First Approach)
// ============================================================================
export type {
PaymentMethodType,
PaymentMethod,
PaymentMethodList,
PaymentGatewayType,
PaymentGateway,
PaymentGatewayList,
InvoicePaymentLink,
} from "./schema.js";