forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphoneNumber.ts
More file actions
38 lines (32 loc) · 1.34 KB
/
Copy pathphoneNumber.ts
File metadata and controls
38 lines (32 loc) · 1.34 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
import type { PhoneNumberJSONSnapshot } from 'snapshots';
import type { IdentificationLinkResource } from './identificationLink';
import type { ClerkResource } from './resource';
import type { PhoneCodeStrategy } from './strategies';
import type { VerificationResource } from './verification';
export type PhoneNumberVerificationStrategy = PhoneCodeStrategy;
export type PreparePhoneNumberVerificationParams = {
strategy: PhoneNumberVerificationStrategy;
};
export type AttemptPhoneNumberVerificationParams = {
code: string;
};
export type SetReservedForSecondFactorParams = {
reserved: boolean;
};
export interface PhoneNumberResource extends ClerkResource {
id: string;
phoneNumber: string;
verification: VerificationResource;
reservedForSecondFactor: boolean;
defaultSecondFactor: boolean;
linkedTo: IdentificationLinkResource[];
backupCodes?: string[];
toString: () => string;
prepareVerification: () => Promise<PhoneNumberResource>;
attemptVerification: (params: AttemptPhoneNumberVerificationParams) => Promise<PhoneNumberResource>;
makeDefaultSecondFactor: () => Promise<PhoneNumberResource>;
setReservedForSecondFactor: (params: SetReservedForSecondFactorParams) => Promise<PhoneNumberResource>;
destroy: () => Promise<void>;
create: () => Promise<PhoneNumberResource>;
__internal_toSnapshot: () => PhoneNumberJSONSnapshot;
}