aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/shared.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/lib/shared.ts')
-rw-r--r--app/src/lib/shared.ts141
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
+}