diff options
| author | ivar <i@oiee.no> | 2026-01-14 21:32:16 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-01-14 21:32:16 +0100 |
| commit | b35302fa020ec82a9d67a6cb34379d42983d3cfc (patch) | |
| tree | 6d9ece54091d96589c9d8b0fa8ec4181c60913e7 /app/src/lib/shared.ts | |
| parent | 5a5717699b8b2d60b7d92c2087ed2cc22667e1cc (diff) | |
| download | sparebank1-actualbudget-master.tar.xz sparebank1-actualbudget-master.zip | |
Diffstat (limited to 'app/src/lib/shared.ts')
| -rw-r--r-- | app/src/lib/shared.ts | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/app/src/lib/shared.ts b/app/src/lib/shared.ts index a7cf207..cc4472f 100644 --- a/app/src/lib/shared.ts +++ b/app/src/lib/shared.ts @@ -11,3 +11,144 @@ export const ImportForm = v.object({ ), dryRun: v.boolean() }) +export type Sb1TransactionDetails = { + id: string; + date: Date; + type: string; + amount: number; + typeCode: string; + typeText: string; + valueDate: Date; + accountKey: string; + bookedDate: Date; + accountName: string; + description: string; + eInvoiceUrl: string; + nonUniqueId: string; + postingDate: Date; + currencyCode: string; + exchangeRate: number; + kidOrMessage: string; + accountNumber: number; + currencyAmount: number; + paymentDetails: Sb1PaymentDetails; + accountCurrency: string; + archiveReference: string; + paymentReference: string; + remoteAccountName: string; + cleanedDescription: string; + numericalReference: string; + classificationInput: Sb1ClassificationInput; + originalDescription: string; + remoteAccountNumber: string; +} + +export type Sb1PaymentDetails = { + amount: number; + message: string; + paymentCid: string; + payeeAddress: Sb1PayeeAddress; + payeeBankName: string; + payeeBicSwift: string; + amountCurrency: string; + serviceCharges: Sb1ServiceCharge[]; + payeeBankAddress: Sb1PayeeAddress; + paymentReference: string; + payeeEmailAddress: string; + internationalDetails: Sb1InternationalDetails; +} + +export type Sb1InternationalDetails = { + agreedRate: string; + agreedWith: string; + authorityReportCode: string; + authorityReportText: string; +} + +export type Sb1PayeeAddress = { + city: string; + line1: string; + line2: string; + line3: string; + zipCode: string; + countryCode: string; +} + +export type Sb1ServiceCharge = { + paidBy: string; + chargedAmount: number; + chargedAmountCurrency: string; +} + +export type Sb1Tokens = { + access_token: string + expires_in: number + refresh_token_expires_in: number + refresh_token_absolute_expires_in: number + token_type: string + refresh_token: string +} + +export type Sb1Transaction = { + id: string + nonUniqueId: string + description: string + cleanedDescription: string + accountNumber: Sb1AccountNumber + amount: number + date: number + interestDate: number + typeCode: string + typeText: string + currencyCode: string + canShowDetails: boolean + source: string + isConfidential: boolean + bookingStatus: string + accountName: string + accountKey: string + accountCurrency: string + isFromCurrencyAccount: boolean + classificationInput: Sb1ClassificationInput +} + +export type Sb1Account = { + key: string; + accountNumber: string; + iban: string; + name: string; + description: string; + balance: number; + availableBalance: number; + currencyCode: string; + owner: Sb1AccountOwner; + productType: string; + type: string; + productId: string; + descriptionCode: string; + accountProperties: { [key: string]: boolean }; +} + +export type Sb1AccountOwner = { + name: string; + firstName: string; + lastName: string; + type: string; + age: number; + customerKey: string; + ssnKey: string; +} + +export type Sb1AccountNumber = { + value: string + formatted: string + unformatted: string +} + +export type Sb1ClassificationInput = { + id: string + amount: number + type: string + text: string + date: string +} |
