barsa 1b944f57aa Update Configuration Files and Refactor Code Structure
- Adjusted .prettierrc to ensure consistent formatting with a newline at the end of the file.
- Reformatted eslint.config.mjs for improved readability by aligning array elements.
- Updated pnpm-lock.yaml to use single quotes for consistency across dependencies.
- Simplified worktree setup in .cursor/worktrees.json for cleaner configuration.
- Enhanced documentation in .cursor/plans to clarify architecture refactoring.
- Refactored various service files for improved readability and maintainability, including rate-limiting and auth services.
- Updated imports and exports across multiple files for consistency and clarity.
- Improved error handling and logging in service methods to enhance debugging capabilities.
- Streamlined utility functions for better performance and maintainability across the domain packages.
2025-12-25 17:30:02 +09:00

57 lines
1.7 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;
// ============================================================================
// Business Types (Not validated at runtime)
// ============================================================================
/**
* Invoice payment link - not validated at runtime
* This is a business domain type used internally
*/
export interface InvoicePaymentLink {
url: string;
expiresAt: string;
gatewayName?: string;
}
// ============================================================================
// Re-export Types from Schema (Schema-First Approach)
// ============================================================================
export type {
PaymentMethodType,
PaymentMethod,
PaymentMethodList,
PaymentGatewayType,
PaymentGateway,
PaymentGatewayList,
} from "./schema.js";