-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
28 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
export interface AccountEntity { | ||
id?: string; | ||
export type AccountEntity = { | ||
id: string; | ||
name: string; | ||
offbudget?: boolean; | ||
closed?: boolean; | ||
sort_order?: number; | ||
tombstone?: boolean; | ||
// TODO: remove once properly typed | ||
[k: string]: unknown; | ||
} | ||
offbudget: 0 | 1; | ||
closed: 0 | 1; | ||
sort_order: number; | ||
tombstone: 0 | 1; | ||
subtype: string | null; // TODO: remove? | ||
} & (_SyncFields<true> | _SyncFields<false>); | ||
|
||
type _SyncFields<T> = { | ||
account_id: T extends true ? string : null; | ||
bank: T extends true ? string : null; | ||
mask: T extends true ? string : null; // end of bank account number | ||
official_name: T extends true ? string : null; | ||
balance_current: T extends true ? number : null; | ||
balance_available: T extends true ? number : null; | ||
balance_limit: T extends true ? number : null; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters