-
Notifications
You must be signed in to change notification settings - Fork 180
/
verifcationRequestParams.ts
64 lines (56 loc) · 1.66 KB
/
verifcationRequestParams.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
60
61
62
63
64
import { VerifyLocale } from '../enums';
import { EmailWorkflow } from './emailWorkflow';
import { SMSWorkflow } from './smsWorkflow';
import { SilentAuthWorkflow } from './silentAuthWorkflow';
import { VoiceWorkflow } from './voiceWorkflow';
import { WhatsAppInteractiveWorkflow } from './whatsAppInteractiveWorkflow';
import { WhatsAppWorkflow } from './whatsAppWorkflow';
/**
* Represents parameters for creating a verification request for sending
* verification codes via different communication channels.
*/
export type VerificationRequestParams = {
/**
* The brand associated with the verification request.
*/
brand: string;
/**
* An array of workflow configurations for sending verification codes via
* different channels. Each element in the array corresponds to a specific
* channel workflow.
*/
workflow: Array<
| EmailWorkflow
| SMSWorkflow
| SilentAuthWorkflow
| VoiceWorkflow
| WhatsAppInteractiveWorkflow
| WhatsAppWorkflow
>;
/**
* (Optional) The verification code to be sent.
*/
code?: string;
/**
* (Optional) The locale for the verification request.
*/
locale?: VerifyLocale | string;
/**
* (Optional) The timeout duration for the verification channel in seconds.
*/
channelTimeout?: number;
/**
* (Optional) The client reference associated with the verification request.
*/
clientRef?: string;
/**
* (Optional) The length of the verification code, if not provided,
* defaults to 4 digits.
*/
codeLength?: 4 | 5 | 6 | 7 | 8 | 9 | 10;
/**
* (Optional) Indicates whether fraud checking is enabled for the
* verification request.
*/
fraudCheck?: boolean;
};