Skip to main content

A JavaScript/TypeScript package providing common utilities and logic shared across all Temboplus-Afloat Projects

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
64%
Published
3 weeks ago (0.1.28)
f
ACC_NAME_VALIDATOR

Validator for account name field. Ensures the account name is at least 3 characters long and contains only letters and spaces.

f
ACC_NUMBER_VALIDATOR

Validator for account number field. Ensures the account number is between 8-12 digits and numeric.

v
ACCOUNT_NUMBER_REGEX

Regex pattern to validate account numbers. The account number must only contain letters and digits, between 6 and 20 characters long.

c
APIError

Custom error class representing API-related errors. Extends the built-in Error class to include additional properties such as statusCode, error, and details.

c
BankContactInfo

Implementation of BaseContactInfo for bank account contacts. Handles storage and validation of contact details specific to bank accounts.

T
ContactData

Type representing a complete contact record. Includes both user-provided and system-generated fields.

T
ContactInfo

Union type representing either a mobile or bank contact Used for type-safe handling of contact information throughout the application

T
ContactInput

Type representing user-provided contact information. Used for creating or updating contacts.

c
ContactRepository

Repository class for managing Contact data through API interactions. Extends the BaseRepository to leverage shared functionality.

v
ContactSchemas

Collection of all contact-related schemas.

T
ContactType

Valid contact channel types. Inferred from the contactTypeSchema.

v
createPayoutChannelCode

Utility functions to create standardized payout channel codes

I
GetPayoutsAPIArgs

Arguments for retrieving payouts from the API.

f
isWalletStatementItemArray

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.

c
MobileContactInfo

Implementation of BaseContactInfo for mobile phone contacts. Handles storage and validation of contact details specific to mobile numbers.

E
PAYOUT_APPROVAL_STATUS

Represents the approval status for payouts that require authorization.

E
PAYOUT_CHANNEL

Represents the available channels through which payouts can be processed.

E
PAYOUT_STATUS

Represents the current status of a payout transaction.

T
PayoutApprover

Type definition inferred from identifierSchema Represents the structure of a user who actions the payout

T
PayoutChannelCode

Valid payout channel codes that can be used in the system

T
PayoutData

Type definition inferred from payoutSchema Represents the complete payout record structure

T
PayoutInput

Type definition inferred from payoutInputSchema Represents the structure of data required to create a new payout

c
PayoutRepository

Repository class for managing payout operations including creation, approval, rejection, and retrieval of payouts.

v
PayoutSchemas

Export object containing all payout-related schemas Used for validation and type checking throughout the application

T
Permission

Permission Type

c
PermissionError

Custom error class representing an error caused by missing required permissions. Extends the built-in Error class to include the requiredPermissions property.

T
Profile

TypeScript type representing a validated user profile. Use this type for profile instances that have been validated against the schema.

v
profileSchema

Zod schema for validating user profile data. Defines validation rules and constraints for each profile field.

E
STATEMENT_OUTPUT_TYPE

Enum representing the supported output formats for statement generation. Used to specify the desired file format when requesting statement downloads.

I
StatementFile

Interface defining the structure of a generated statement file. Contains metadata about the file and its content type.

f
validateAccName

Validates if the provided account name is valid.

f
validateBankAccNo

Validates if the provided account number is valid. The account number must be numeric and between 8-12 digits.

T
Wallet

TypeScript type for a validated wallet object. Use this type for wallet instances that have been validated against the schema.

c
WalletRepo

Repository class for managing wallet operations including balance checking, statement generation, and wallet information retrieval.

v
WalletSchemas

Collection of wallet-related schemas for export. Provides access to both wallet and statement entry validation schemas.

T
WalletStatementItem

TypeScript type for a validated statement entry object. Use this type for statement entries that have been validated against the schema.