diff options
Diffstat (limited to 'app/src/lib/shared.ts')
| -rw-r--r-- | app/src/lib/shared.ts | 154 |
1 files changed, 0 insertions, 154 deletions
diff --git a/app/src/lib/shared.ts b/app/src/lib/shared.ts deleted file mode 100644 index cc4472f..0000000 --- a/app/src/lib/shared.ts +++ /dev/null @@ -1,154 +0,0 @@ -import * as v from 'valibot' - -export type ImportForm = v.InferOutput<typeof ImportForm> -export const ImportForm = v.object({ - budgetId: v.string(), - mappings: v.array( - v.object({ - sb1Id: v.string(), - actualId: v.string() - }) - ), - 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 -} |
