Skip to content

Commit

Permalink
fix: missing types from account & transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielpanga committed Jan 16, 2025
1 parent d6658a7 commit 1bb5009
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/types/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export type BankData = {
closingBalance: number | null
/** Automatically invested balance */
automaticallyInvestedBalance: number | null
/** Overdraft used limit */
overdraftUsedLimit: number | null
/** Unarranged overdraft amount */
unarrangedOverdraftAmount: number | null
}

export type CreditData = {
Expand All @@ -69,4 +73,10 @@ export type CreditData = {
minimumPayment: number | null
/** Maximum credit card limit. */
creditLimit: number | null
/** If the credit card limit is flexible. */
isLimitFlexible: boolean | null
/** Credit card status. */
status: 'ACTIVE' | 'BLOCKED' | 'CANCELLED' | null
/** Credit card holder type. */
holderType: 'MAIN' | 'ADDITIONAL' | null
}
19 changes: 19 additions & 0 deletions src/types/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ export type TransactionPaymentParticipant = {
routingNumber?: string
}

export type TransactionBoletoMetadataResponse = {
/** Digitable line of the boleto */
digitableLine: string | null
/** Barcode of the boleto */
barcode: string | null
/** Base amount of the boleto */
baseAmount: number | null
/** Penalty amount of the boleto */
penaltyAmount: number | null
/** Interest amount of the boleto */
interestAmount: number | null
/** Discount amount of the boleto */
discountAmount: number | null
}

export type TransactionPaymentData = {
/** The identity of the sender of the transfer */
payer?: TransactionPaymentParticipant
Expand All @@ -51,6 +66,8 @@ export type TransactionPaymentData = {
referenceNumber?: string
/** The payer description / motive of the transfer */
reason?: string
/** Additional data related to boleto transaction */
boletoMetadata: TransactionBoletoMetadataResponse | null
}

export type TransactionMerchantData = {
Expand Down Expand Up @@ -121,4 +138,6 @@ export type Transaction = {
merchant?: TransactionMerchantData
/** Category ID of the transaction */
categoryId: string | null
/** Operation type of the transaction */
operationType: string | null
}

0 comments on commit 1bb5009

Please sign in to comment.