-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsendPhoneMessageEvent.ts
More file actions
45 lines (40 loc) · 1.05 KB
/
sendPhoneMessageEvent.ts
File metadata and controls
45 lines (40 loc) · 1.05 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
// https://auth0.com/docs/customize/actions/explore-triggers/mfa-notifications-trigger/send-phone-message-event-object
import type {
Dictionary,
EventBaseRequest,
EventClient,
EventTenant,
EventUser,
EventUserBaseIdentity,
} from "./shared";
type UserIdentity = EventUserBaseIdentity & {
last_password_reset?: string;
name?: string;
phone_number?: string;
phone_verified?: boolean;
user_id: string;
username?: string;
nickname?: string;
picture?: string;
updated_at: string;
user_metadata: Dictionary;
};
type User = Pick<
EventUser,
"created_at" | "email" | "email_verified" | "family_name" | "given_name"
> &
Partial<Pick<EventUser<UserIdentity>, "app_metadata" | "identities">>;
export type SendPhoneMessageUser = User;
export type SendPhoneMessageEvent = {
client: EventClient;
message_options: {
action: "enrollment" | "second-factor-authentication";
code: string;
message_type: "sms" | "voice";
recipient: string;
text: string;
};
request: EventBaseRequest;
tenant: EventTenant;
user: User;
};