forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemailAddress.ts
More file actions
33 lines (29 loc) · 1.25 KB
/
Copy pathemailAddress.ts
File metadata and controls
33 lines (29 loc) · 1.25 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
import type { EmailAddressJSONSnapshot } from 'snapshots';
import type { IdentificationLinkResource } from './identificationLink';
import type { ClerkResource } from './resource';
import type { EmailCodeStrategy, EmailLinkStrategy } from './strategies';
import type { CreateEmailLinkFlowReturn, StartEmailLinkFlowParams, VerificationResource } from './verification';
export type PrepareEmailAddressVerificationParams =
| {
strategy: EmailCodeStrategy;
}
| {
strategy: EmailLinkStrategy;
redirectUrl: string;
};
export type AttemptEmailAddressVerificationParams = {
code: string;
};
export interface EmailAddressResource extends ClerkResource {
id: string;
emailAddress: string;
verification: VerificationResource;
linkedTo: IdentificationLinkResource[];
toString: () => string;
prepareVerification: (params: PrepareEmailAddressVerificationParams) => Promise<EmailAddressResource>;
attemptVerification: (params: AttemptEmailAddressVerificationParams) => Promise<EmailAddressResource>;
createEmailLinkFlow: () => CreateEmailLinkFlowReturn<StartEmailLinkFlowParams, EmailAddressResource>;
destroy: () => Promise<void>;
create: () => Promise<EmailAddressResource>;
__internal_toSnapshot: () => EmailAddressJSONSnapshot;
}