import type {DocumentReference, Timestamp} from '@google-cloud/firestore'; import {Account} from '../account'; import {CardModel} from '../card'; export enum KeyEncryptionMethod { PASSWORD = 'PASSWORD', KEY = 'KEY', WALLET = 'WALLET', } export enum KycStatus { NONE = 'NONE', APPROVED = 'APPROVED', SUBMITTED = 'SUBMITTED', REJECTED = 'REJECTED', } export type KycItem = 'idProof' | 'addressProof'; export interface KycData { status: KycStatus; rejectedReason?: string; updatedAt: number; } export interface KycDataModel { status: KycStatus; rejectedReason?: string; updatedAt: Timestamp; } export interface UserRecoveryKey { id: string; signer: string; encryptedRecoveryKey: string; encryptionMethod: KeyEncryptionMethod; wallet?: string; createdAt: number; } export interface UserRecoveryKeyModel { signer: string; encryptedRecoveryKey: string; encryptionMethod: KeyEncryptionMethod; wallet?: string; createdAt: Timestamp; } export interface User { id: string; name: string; uniqueId: string; codegoUserId?: string; cards: string[]; wallets: string[]; roles: string[]; accounts: string[]; isBanned: boolean; isLocked: boolean; isMetalApproved?: boolean; kyc: Record; nonce: number; createdAt: number; updatedAt: number; lastLoggedInAt: number; } export interface UserModel { name: string; uniqueId: string; codegoUserId?: string; cards: DocumentReference[]; wallets: string[]; roles: string[]; accounts: DocumentReference[]; isBanned: boolean; isLocked: boolean; isMetalApproved?: boolean; kyc: Record; nonce: number; createdAt: Timestamp; updatedAt: Timestamp; lastLoggedInAt: Timestamp; }