-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
59 lines (54 loc) · 1.64 KB
/
index.d.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
53
54
55
56
57
58
59
export interface AccountCallbackPayload {
accountId: string
userId: string
itemId: string
}
export interface ErrorCallbackPayload {
errorType: string,
errorMessage: string
errorDetails?: string
}
export interface FormCallbackPayload {
accountId: string
userId: string
}
type AccountCallback = (payload: AccountCallbackPayload) => void
type ItemNotFoundCallback = (search: string) => void
type UIEventCallback = (payload: any) => void
type ErrorCallback = (payload: ErrorCallbackPayload) => void
type TokenExpiredCallback = (updateToken: (token: string) => void) => void
type FormCallback = (payload: FormCallbackPayload) => void
export interface LinkConfig {
/**
* @deprecated The use of `linkKey` has been discontinued. `LinkConfig` can now be initialized without it.
*/
linkKey?: string
sandbox: boolean
userToken: string
flowId?: string
/**
* @deprecated Use flowId instead
*/
customizationId?: string
accountId?: string
items?: string[] | null
ddsConfig?: string | null
onAccountCreated?: AccountCallback
onAccountConnected?: AccountCallback
onAccountRemoved?: AccountCallback
onAccountError?: AccountCallback
onDDSSuccess?: AccountCallback
onDDSError?: AccountCallback
onUIEvent?: UIEventCallback
onError?: ErrorCallback
onClose?: any
onCantFindItemClicked?: ItemNotFoundCallback
onExitIntroClicked?: () => void
onTokenExpired?: TokenExpiredCallback
onFormSubmitted?: FormCallback
onDocumentsSubmitted?: FormCallback
}
export declare class ArgyleLink {
static start(config: LinkConfig): void
static close(): void
}