diff --git a/packages/desktop-client/src/components/modals/CreateAccount.tsx b/packages/desktop-client/src/components/modals/CreateAccount.tsx index 7a6867d3178..e5792dfbc6a 100644 --- a/packages/desktop-client/src/components/modals/CreateAccount.tsx +++ b/packages/desktop-client/src/components/modals/CreateAccount.tsx @@ -19,6 +19,7 @@ import { View } from '../common/View'; type CreateAccountProps = { modalProps: CommonModalProps; syncServerStatus: SyncServerStatus; + upgradingAccountId?: string; }; export function CreateAccount({ @@ -47,6 +48,13 @@ export function CreateAccount({ } }; + type NormalizedAccount = { + account_id: string; + name: string; + institution: string; + orgDomain: string; + }; + const onConnectSimpleFin = async () => { if (!isSimpleFinSetupComplete) { onSimpleFinInit(); diff --git a/packages/loot-core/src/types/models/simplefin.d.ts b/packages/loot-core/src/types/models/simplefin.d.ts new file mode 100644 index 00000000000..821de80accb --- /dev/null +++ b/packages/loot-core/src/types/models/simplefin.d.ts @@ -0,0 +1,10 @@ +export type SimpleFinOrganization = { + name: string; + domain: string; +}; + +export type SimpleFinAccount = { + id: string; + name: string; + org: SimpleFinOrganization; +}; \ No newline at end of file diff --git a/packages/loot-core/src/types/server-handlers.d.ts b/packages/loot-core/src/types/server-handlers.d.ts index 00e48beb1c1..1883a36ccac 100644 --- a/packages/loot-core/src/types/server-handlers.d.ts +++ b/packages/loot-core/src/types/server-handlers.d.ts @@ -14,6 +14,7 @@ import { CategoryGroupEntity, GoCardlessToken, GoCardlessInstitution, + SimpleFinAccount, PayeeEntity, } from './models'; import { EmptyObject } from './util'; @@ -223,7 +224,7 @@ export interface ServerHandlers { 'simplefin-status': () => Promise<{ configured: boolean }>; - 'simplefin-accounts': () => Promise<{ configured: boolean }>; + 'simplefin-accounts': () => Promise<{ accounts: SimpleFinAccount[] }>; 'gocardless-get-banks': (country: string) => Promise<{ data: GoCardlessInstitution[]; diff --git a/upcoming-release-notes/2188.md b/upcoming-release-notes/2188.md index 0e3049bb5d3..8029cdb4e41 100644 --- a/upcoming-release-notes/2188.md +++ b/upcoming-release-notes/2188.md @@ -3,4 +3,4 @@ category: Enhancements authors: [zachwhelchel,duplaja,lancepick,latetedemelon] --- -Add option to link an account to SimpleFIN for syncing transactions. +Add option to link an account with SimpleFIN for syncing transactions.