UNPKG

@crediblex.io/fineract-api-client

Version:
145 lines 4.03 kB
/** * Interface for creating a savings account in Fineract * * Mandatory Fields: clientId or groupId, productId, submittedOnDate * Optional Fields: accountNo, externalId, fieldOfficerId */ export interface CreateSavingsAccountRequest { /** The ID of the client (required if groupId is not provided) */ clientId?: number; /** The ID of the group (required if clientId is not provided) */ groupId?: number; /** The ID of the savings product (mandatory) */ productId: number; /** The date when the account was submitted (mandatory) */ submittedOnDate: string; /** The date format for the submittedOnDate field */ dateFormat: string; /** The locale for date formatting */ locale: string; /** Optional account number */ accountNo?: string; /** Optional external identifier */ externalId?: string; fieldOfficerId?: number; } /** * Interface for the response when creating a savings account in Fineract */ export interface CreateSavingsAccountResponse { officeId: number; clientId: number; savingsId: number; resourceId: number; gsimId: number; } /** * Interface for the status of a savings account. */ export interface SavingsAccountStatus { id: number; code: string; value: string; submittedAndPendingApproval: boolean; approved: boolean; rejected: boolean; withdrawnByApplicant: boolean; active: boolean; closed: boolean; prematureClosed: boolean; transferInProgress: boolean; transferOnHold: boolean; matured: boolean; } /** * Interface for the changes made during the approval of a savings account. */ export interface ApproveSavingsAccountChanges { status: SavingsAccountStatus; locale: string; dateFormat: string; approvedOnDate: string; } /** * Interface for the response when approving a savings account in Fineract. */ export interface ApproveSavingsAccountResponse { officeId: number; clientId: number; savingsId: number; resourceId: number; changes: ApproveSavingsAccountChanges; } /** * Interface for creating a deposit transaction in a savings account. */ export interface DepositTransactionRequest { /** The date of the transaction (mandatory) */ transactionDate: string; /** The amount to deposit (mandatory) */ transactionAmount: number; /** The payment type ID (mandatory) */ paymentTypeId: number; /** Optional note for the transaction */ note?: string; /** The date format for the transactionDate field (mandatory) */ dateFormat: string; /** The locale for date formatting (mandatory) */ locale: string; } /** * Interface for the changes made during a deposit transaction. */ export interface DepositTransactionChanges { paymentTypeId: number; } /** * Interface for the response when creating a deposit transaction in Fineract. */ export interface DepositTransactionResponse { officeId: number; clientId: number; savingsId: number; resourceId: number; changes: DepositTransactionChanges; } /** * Interface for currency information. */ export interface Currency { code: string; name: string; decimalPlaces: number; displaySymbol: string; nameCode: string; displayLabel: string; } /** * Interface for payment type options. */ export interface PaymentTypeOption { id: number; name: string; description: string; isCashPayment: boolean; position: number; codeName?: string; isSystemDefined: boolean; } /** * Interface for the savings account transaction template response. */ export interface SavingsTransactionTemplateResponse { accountId: number; accountNo: string; date: number[]; currency: Currency; reversed: boolean; submittedOnDate: number[]; interestedPostedAsOn: boolean; isManualTransaction: boolean; lienTransaction: boolean; chargesPaidByData: any[]; paymentTypeOptions: PaymentTypeOption[]; } //# sourceMappingURL=savingsaccounts.d.ts.map