47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
export type TPassportDevicePlatform =
|
|
| 'ios'
|
|
| 'ipados'
|
|
| 'macos'
|
|
| 'watchos'
|
|
| 'android'
|
|
| 'web'
|
|
| 'unknown';
|
|
|
|
export type TPassportDeviceStatus = 'active' | 'revoked';
|
|
|
|
export type TPassportPushProvider = 'apns';
|
|
|
|
export type TPassportPushEnvironment = 'development' | 'production';
|
|
|
|
export interface IPassportCapabilities {
|
|
gps: boolean;
|
|
nfc: boolean;
|
|
push: boolean;
|
|
}
|
|
|
|
export interface IPassportDevice {
|
|
id: string;
|
|
data: {
|
|
userId: string;
|
|
label: string;
|
|
platform: TPassportDevicePlatform;
|
|
status: TPassportDeviceStatus;
|
|
publicKeyAlgorithm: 'p256';
|
|
publicKeyX963Base64: string;
|
|
capabilities: IPassportCapabilities;
|
|
pushRegistration?: {
|
|
provider: TPassportPushProvider;
|
|
token: string;
|
|
topic: string;
|
|
environment: TPassportPushEnvironment;
|
|
registeredAt: number;
|
|
lastDeliveredAt?: number;
|
|
lastError?: string;
|
|
};
|
|
appVersion?: string;
|
|
createdAt: number;
|
|
lastSeenAt?: number;
|
|
lastChallengeAt?: number;
|
|
};
|
|
}
|