Validator for account name field. Ensures the account name is at least 3 characters long and contains only letters and spaces.
Validator for account number field. Ensures the account number is between 8-12 digits and numeric.
Regex pattern to validate account numbers. The account number must only contain letters and digits, between 6 and 20 characters long.
Singleton class responsible for user authentication and session management.
Implementation of BaseContactInfo for bank account contacts. Handles storage and validation of contact details specific to bank accounts.
Contact class that wraps the Zod schema and provides additional functionality
Type representing a complete contact record. Includes both user-provided and system-generated fields.
Union type representing either a mobile or bank contact Used for type-safe handling of contact information throughout the application
Type representing user-provided contact information. Used for creating or updating contacts.
Repository class for managing Contact
data through API interactions.
Extends the BaseRepository
to leverage shared functionality.
Valid contact channel types. Inferred from the contactTypeSchema.
Utility functions to create standardized payout channel codes
Type guard function that checks if the provided data is an array of valid wallet statement items. Uses Zod schema validation to ensure each item in the array matches the WalletStatementItem schema.
Implementation of BaseContactInfo for mobile phone contacts. Handles storage and validation of contact details specific to mobile numbers.
Payout class that wraps the Zod schema and provides additional functionality
Represents the approval status for payouts that require authorization.
Represents the available channels through which payouts can be processed.
Represents the current status of a payout transaction.
Type definition inferred from identifierSchema Represents the structure of a user who actions the payout
Valid payout channel codes that can be used in the system
Type definition inferred from payoutSchema Represents the complete payout record structure
Type definition inferred from payoutInputSchema Represents the structure of data required to create a new payout
Repository class for managing payout operations including creation, approval, rejection, and retrieval of payouts.
Export object containing all payout-related schemas Used for validation and type checking throughout the application
Permission Type
Custom error class representing an error caused by missing required permissions.
Extends the built-in Error class to include the requiredPermissions
property.
TypeScript type representing a validated user profile. Use this type for profile instances that have been validated against the schema.
Zod schema for validating user profile data. Defines validation rules and constraints for each profile field.
Enum representing the supported output formats for statement generation. Used to specify the desired file format when requesting statement downloads.
Interface defining the structure of a generated statement file. Contains metadata about the file and its content type.
Represents a user in Afloat
Validates if the provided account name is valid.
Validates if the provided account number is valid. The account number must be numeric and between 8-12 digits.
TypeScript type for a validated wallet object. Use this type for wallet instances that have been validated against the schema.
Repository class for managing wallet operations including balance checking, statement generation, and wallet information retrieval.
Collection of wallet-related schemas for export. Provides access to both wallet and statement entry validation schemas.
TypeScript type for a validated statement entry object. Use this type for statement entries that have been validated against the schema.