-
Notifications
You must be signed in to change notification settings - Fork 89
/
action-configuration.ts
41 lines (35 loc) · 1.3 KB
/
action-configuration.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
import { ReturnStrategy } from 'src/models/return-strategy';
export interface ActionConfiguration {
/**
* Configure action modals behavior.
* @default ['before']
*/
modals?: ('before' | 'success' | 'error')[] | 'all';
/**
* Configure action notifications behavior.
* @default 'all'
*/
notifications?: ('before' | 'success' | 'error')[] | 'all';
/**
* Specifies return strategy for the deeplink when user signs/declines the request.
* @default 'back'
*/
returnStrategy?: ReturnStrategy;
/**
* Specifies return url for TWA-TWA connections.
* This will be applied as a return strategy if dApp is opened as a TWA and user selects TWA wallet (overrides `returnStrategy` if).
*/
twaReturnUrl?: `${string}://${string}`;
/**
* @deprecated Shouldn't be used anymore, SDK will automatically detect return strategy for TWA-TWA connections.
* Specifies whether the method should redirect user to the connected wallet
* @default 'ios'
*/
skipRedirectToWallet?: 'ios' | 'always' | 'never';
}
export type StrictActionConfiguration = {
[key in keyof Omit<ActionConfiguration, 'twaReturnUrl'>]-?: Exclude<
ActionConfiguration[key],
'all'
>;
} & { twaReturnUrl: ActionConfiguration['twaReturnUrl'] };