1export interface Canary {2 webhookUrl: string;3 label?: string;4 lastPinged?: number;5 pingCount?: number;6}78export interface VaultEntry {9 id: string; 10 type?: "login" | "note" | "passkey"; 11 title: string;12 username?: string; 13 password?: string; 14 url?: string; 15 totp?: string; 16 notes?: string;17 breach?: number; 18 canary?: Canary;19 createdAt: number; 20 modifiedAt: number;21 deletedAt?: number;22 tags?: string[];23 rpId?: string;24 rpName?: string;25 credentialId?: string;26 publicKeyCose?: string;27 privateKeyJwk?: JsonWebKey;28 userHandle?: string;29 userName?: string;30 userDisplayName?: string;31 algorithm?: -7 | -8;32 signCount?: number;33 aaguid?: string;34 backupEligible?: boolean;35 backupState?: boolean;36 lastUsedAt?: number;37}3839export interface LegacyVaultEntry {40 id: string;41 title: string;42 username: string;43 password: string;44 url: string;45 totp?: string;46 notes?: string;47 breach?: number;48 created: number;49 updated: number;50 deletedAt?: number;51}5253export interface PasskeyEntry extends VaultEntry {54 type: "passkey";55 rpId: string;56 rpName: string;57 credentialId: string;58 publicKeyCose: string;59 privateKeyJwk: JsonWebKey;60 userHandle: string;61 userName: string;62 userDisplayName: string;63 algorithm: -7 | -8;64 signCount: number;65 aaguid: string;66 backupEligible: boolean;67 backupState: boolean;68 lastUsedAt?: number;69}7071export interface PendingPasskeyRequest {72 requestId: number;73 type: "create" | "get";74 rpId: string;75 rpName: string;76 userName: string;77 userDisplayName?: string;78}7980export interface PasskeyProviderState {81 supported: boolean;82 enabled: boolean;83 attached: boolean;84 browserLabel: string;85 statusLabel: string;86 conflict?: string;87}8889export interface StoredVault {90 version: 1; 91 salt: string; 92 nonce: string; 93 ciphertext: string; 94 tag: string; 95}96979899100export type MessageType =101 | "UNLOCK"102 | "LOCK"103 | "IS_UNLOCKED"104 | "HAS_VAULT"105 | "GET_ENTRIES"106 | "ADD_ENTRY"107 | "BATCH_ADD_ENTRIES"108 | "RESTORE_ENTRIES"109 | "CLEAR_VAULT_ENTRIES"110 | "UPDATE_ENTRY"111 | "DELETE_ENTRY"112 | "AUTOFILL_QUERY"113 | "COPY"114 | "CREATE_VAULT"115 | "GET_ENTRY_FOR_FILL"116 | "CHECK_BREACH"117 | "CHECK_ALL_BREACHES"118 | "GET_SETTINGS"119 | "UPDATE_SETTINGS"120 | "FIRE_CANARY_PING"121 | "ACTIVATE_LICENSE"122 | "GET_LICENSE"123 | "IS_DURESS_ENABLED"124 | "SETUP_DURESS"125 | "DISABLE_DURESS"126 | "VERIFY_MAIN_PASSWORD"127 | "CHANGE_PASSWORD"128 | "GET_SITE_PASSWORD_POLICY"129 | "GET_SYNC_STATE"130 | "TRIGGER_SYNC"131 | "START_PAIRING"132 | "CANCEL_PAIRING"133 | "ACCEPT_PAIRING"134 | "REMOVE_PAIRED_DEVICE"135 | "REMOVE_TRUSTED_NETWORK"136 | "MARK_NETWORK_TRUSTED"137 | "GET_PENDING_PASSKEY"138 | "APPROVE_PASSKEY"139 | "DENY_PASSKEY"140 | "DELETE_PASSKEY"141 | "GET_PASSKEYS"142 | "GET_PASSKEY_PROVIDER_STATE"143 | "SET_PASSKEY_PROVIDER_ENABLED"144 | "GET_DELETED_ENTRIES"145 | "RESTORE_ENTRY"146 | "PURGE_ENTRY"147 | "PURGE_EXPIRED_TRASH"148 | "LIST_VAULT_SNAPSHOTS"149 | "RESTORE_VAULT_SNAPSHOT"150 | "COUNT_DUPLICATES"151 | "DEDUPLICATE_ENTRIES"152 153 154 155 156 | "PING" 157 | "SUMMON_AUTOFILL" 158 | "VAULT_LOCKED" 159 | "VAULT_UNLOCKED"; 160161export interface PasswordPolicy {162 minLength?: number;163 maxLength?: number;164 requiresUppercase?: boolean;165 requiresLowercase?: boolean;166 requiresNumbers?: boolean;167 requiresSymbols?: boolean;168 forbidsSymbols?: boolean;169 allowedSymbols?: string;170}171172export interface Message {173 type: MessageType;174 payload?: unknown;175}176177export interface MessageResponse {178 ok: boolean;179 data?: unknown;180 error?: string;181}