···11+import Foundation
22+33+// MARK: - Accounts
44+55+struct AccountsResponse: Decodable {
66+ let result: AccountsResult
77+}
88+99+struct AccountsResult: Decodable {
1010+ let amount: Double
1111+ let entities: [AccountEntity]
1212+}
1313+1414+struct AccountEntity: Decodable {
1515+ let id: Int
1616+ let name: String
1717+ let userConnection: UserConnection
1818+}
1919+2020+struct UserConnection: Decodable {
2121+ let accounts: [Account]
2222+}
2323+2424+struct Account: Decodable, Identifiable {
2525+ let id: Int
2626+ let alias: String
2727+ let number: String
2828+ let availableBalance: Double
2929+ let balance: Double
3030+ let eligibleWidgets: [String]
3131+ let active: Bool
3232+ let closed: Bool
3333+ let huntingtonType: String
3434+}
3535+3636+// MARK: - Transactions
3737+3838+struct CalendarResponse: Decodable {
3939+ let result: CalendarResult?
4040+}
4141+4242+struct CalendarResult: Decodable {
4343+ let days: [String: CalendarDay]
4444+}
4545+4646+struct CalendarDay: Decodable {
4747+ let transactions: [RawTransaction]
4848+}
4949+5050+struct RawTransaction: Decodable {
5151+ let id: Int
5252+ let accId: Int
5353+ let name: String
5454+ let amount: Double
5555+ let catId: Int
5656+ let transactionType: String
5757+}
5858+5959+struct Transaction: Identifiable {
6060+ let id: Int
6161+ let accId: Int
6262+ let name: String
6363+ let amount: Double
6464+ let catId: Int
6565+ let transactionType: String
6666+ let date: String
6767+}