-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconnectProps.d.ts
More file actions
144 lines (142 loc) · 4.33 KB
/
connectProps.d.ts
File metadata and controls
144 lines (142 loc) · 4.33 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/* eslint-disable @typescript-eslint/no-explicit-any */
// Connect Widget Props
interface ConnectWidgetPropTypes extends ConnectProps {
language?: LanguageType
onPostMessage: (event: string, data?: object) => void
showTooSmallDialog: boolean
webSocketConnection?: any
}
interface PostMessageEventOverrides {
memberConnected?: {
createEventData: ({ institution, member }: { institution: object; member: object }) => object
}
memberStatusUpdate?: {
createEventData: ({ institution, member }: { institution: object; member: object }) => object
getHasStatusChanged: ({
currentMember,
previousMember,
}: {
currentMember: object
previousMember: object
}) => boolean
}
}
interface ConnectProps {
availableAccountTypes?: []
clientConfig: ClientConfigType
onAnalyticEvent?: (eventName: string, metadata: object) => void
onAnalyticPageview?: (path: string, metadata: object) => void
onManualAccountAdded?: () => void
onMemberDeleted?: (memberGuid: string) => void
onShowConnectSuccessSurvey: () => void | undefined
onSubmitConnectSuccessSurvey: (answers: object) => void
onSuccessfulAggregation?: () => void
onUpsertMember?: () => void
postMessageEventOverrides?: PostMessageEventOverrides
profiles: ProfilesTypes
userFeatures?: object
webSocketConnection?: any
experimentalFeatures?: null | {
unavailableInstitutions?: { guid: string; name: string }[]
optOutOfEarlyUserRelease?: boolean
memberPollingMilliseconds?: number
useWebSockets?: boolean
}
}
interface ClientConfigType {
_initialValues: string
is_mobile_webview: boolean
target_origin_referrer: string | null
ui_message_protocol: string
ui_message_version: number
ui_message_webview_url_scheme: string
color_scheme: string
mode: string
current_institution_code: string | null
current_institution_guid: string | null
current_member_guid: string | null
current_microdeposit_guid: string | null
enable_app2app: boolean
disable_background_agg: boolean | null
disable_institution_search: boolean
include_identity: boolean | null
include_transactions: boolean | null
iso_country_code: string | null
oauth_referral_source: string
update_credentials: boolean
wait_for_full_aggregation: boolean
data_request?: { products?: string[] | null; inferred?: boolean } | null
use_cases?: UseCaseType[] | null
additional_product_option?: string | null
show_back_button?: boolean | null
}
interface ProfilesTypes {
loading: boolean
client:
| any
| {
guid: string
has_atrium_api?: boolean
has_limited_institutions?: boolean
oauth_app_name: string
}
clientColorScheme: {
primary_100: string
primary_200: string
primary_300: string
primary_400: string
primary_500: string
color_scheme?: string
widget_brand_color: string | null
}
clientProfile:
| {
account_verification_is_enabled?: boolean
account_identification_is_enabled?: boolean
custom_copy_namespace?: string
is_microdeposits_enabled?: boolean
locale: string
show_external_link_popup?: boolean
tax_statement_is_enabled?: boolean
use_cases_is_enabled?: boolean
uses_custom_popular_institution_list?: boolean
uses_oauth?: boolean
}
| any
user:
| {
guid: string
email?: string
}
| object
userProfile: {
too_small_modal_dismissed_at?: string
}
widgetProfile: {
display_disclosure_in_connect?: boolean
enable_manual_accounts?: boolean
enable_support_requests?: boolean
show_microdeposits_in_connect?: boolean
show_mx_branding?: boolean
}
}
type LanguageType = {
locale: 'en' | 'es' | 'fr-ca'
custom_copy_namespace: string
}
interface AnalyticContextType {
onAnalyticEvent?: (eventName: string, metadata: object) => void
onAnalyticPageview?: (path: string, metadata: object) => void
onShowConnectSuccessSurvey?: () => void | undefined
onSubmitConnectSuccessSurvey?: (answers: object) => void
}
interface PostMessageContextType {
onPostMessage: (event: string, data?: object) => void
postMessageEventOverrides?: PostMessageEventOverrides
}
interface UserFeatureType {
guid: string
feature_name: string
// is_enabled can be a boolean or a string, a string when posthog experiment variants are used
is_enabled: boolean | string
}