@@ -4,34 +4,49 @@ import * as OnyxCommon from './OnyxCommon';
4
4
5
5
type Policy = {
6
6
/** The ID of the policy */
7
- id ? : string ;
7
+ id : string ;
8
8
9
9
/** The name of the policy */
10
- name ? : string ;
10
+ name : string ;
11
11
12
12
/** The current user's role in the policy */
13
- role ? : ValueOf < typeof CONST . POLICY . ROLE > ;
13
+ role : ValueOf < typeof CONST . POLICY . ROLE > ;
14
14
15
15
/** The policy type */
16
- type ? : ValueOf < typeof CONST . POLICY . TYPE > ;
16
+ type : ValueOf < typeof CONST . POLICY . TYPE > ;
17
17
18
18
/** The email of the policy owner */
19
- owner ? : string ;
19
+ owner : string ;
20
20
21
21
/** The output currency for the policy */
22
- outputCurrency ? : string ;
22
+ outputCurrency : string ;
23
23
24
24
/** The URL for the policy avatar */
25
25
avatar ?: string ;
26
26
27
27
/** Error objects keyed by field name containing errors keyed by microtime */
28
28
errorFields ?: OnyxCommon . ErrorFields ;
29
29
30
+ /** Indicates the type of change made to the policy that hasn't been synced with the server yet */
30
31
pendingAction ?: OnyxCommon . PendingAction ;
32
+
33
+ /** A list of errors keyed by microtime */
31
34
errors : OnyxCommon . Errors ;
35
+
36
+ /** Whether this policy was loaded from a policy summary, or loaded completely with all of its values */
32
37
isFromFullPolicy ?: boolean ;
38
+
39
+ /** When this policy was last modified */
33
40
lastModified ?: string ;
41
+
42
+ /** The custom units data for this policy */
34
43
customUnits ?: Record < string , unknown > ;
44
+
45
+ /** Whether chat rooms can be created and used on this policy. Enabled manually by CQ/JS snippet. Always true for free policies. */
46
+ areChatRoomsEnabled : boolean ;
47
+
48
+ /** Whether policy expense chats can be created and used on this policy. Enabled manually by CQ/JS snippet. Always true for free policies. */
49
+ isPolicyExpenseChatEnabled : boolean ;
35
50
} ;
36
51
37
52
export default Policy ;
0 commit comments