-
-
Notifications
You must be signed in to change notification settings - Fork 207
Expand file tree
/
Copy pathaccount.ts
More file actions
47 lines (37 loc) · 1.18 KB
/
account.ts
File metadata and controls
47 lines (37 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { IntegrationId } from './integrations'
import { Transaction } from './transaction'
export interface Account {
// where this account's information came from
integration: IntegrationId
// unique identifier for this account
accountId?: string
// masked account number (e.g xxxx xxxx xxxx 1947)
mask?: string
// a institution can have multiple accounts (e.g. Chase)
institution?: string
// an account has a number associated to it (e.g. Sapphire Reserve Credit Card)
account: string
// type of account (e.g. credit card, 401k, etc.)
type?: string
current?: number
available?: number
limit?: number
currency?: string
// transaction list
transactions?: Transaction[]
}
export interface BaseAccountConfig {
id: string
integration: IntegrationId
}
export interface PlaidAccountConfig extends BaseAccountConfig {
token: string
}
export interface CSVAccountConfig extends BaseAccountConfig {
paths: string[]
transformer: { [inputColumn: string]: keyof Transaction }
dateFormat: string
negateValues?: boolean
delimiter?: string
}
export type AccountConfig = PlaidAccountConfig | CSVAccountConfig