-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Copy pathReimbursementAccount.ts
52 lines (36 loc) · 1.45 KB
/
ReimbursementAccount.ts
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
48
49
50
51
52
import {ValueOf} from 'type-fest';
import * as OnyxCommon from './OnyxCommon';
import CONST from '../../CONST';
type BankAccountStep = ValueOf<typeof CONST.BANK_ACCOUNT.STEP>;
type BankAccountSubStep = ValueOf<typeof CONST.BANK_ACCOUNT.SUBSTEP>;
type ACHData = {
/** Step of the setup flow that we are on. Determines which view is presented. */
currentStep: BankAccountStep;
/** Optional subStep we would like the user to start back on */
subStep?: BankAccountSubStep;
/** Bank account state */
state?: string;
/** Bank account ID of the VBA that we are validating is required */
bankAccountID?: number;
};
type ReimbursementAccount = {
/** Whether we are loading the data via the API */
isLoading?: boolean;
/** A date that indicates the user has been throttled */
throttledDate?: string;
/** Additional data for the account in setup */
achData?: ACHData;
/** Disable validation button if max attempts exceeded */
maxAttemptsReached?: boolean;
/** Alert message to display above submit button */
error?: string;
/** Which field needs attention? */
errorFields?: OnyxCommon.ErrorFields;
/** Any additional error message to show */
errors?: OnyxCommon.Errors;
/** Draft step of the setup flow from Onyx */
draftStep?: BankAccountStep;
pendingAction?: OnyxCommon.PendingAction;
};
export default ReimbursementAccount;
export type {BankAccountStep, BankAccountSubStep};