Use @signalapp/sqlcipher

This commit is contained in:
Fedor Indutny
2025-03-12 14:45:54 -07:00
committed by GitHub
parent df7997b313
commit 5a9253bd44
118 changed files with 2497 additions and 1485 deletions

View File

@@ -1,7 +1,7 @@
// Copyright 2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/better-sqlite3';
import type { Database } from '@signalapp/sqlcipher';
import type { ReadonlyDeep } from 'type-fest';
import type {
ConversationAttributesType,
@@ -236,6 +236,13 @@ export type SentProtoType = {
urgent: boolean;
hasPniSignatureMessage: boolean;
};
export type SentProtoDBType = {
contentHint: number;
proto: Uint8Array;
timestamp: number;
urgent: number;
hasPniSignatureMessage: number;
};
export type SentProtoWithMessageIdsType = SentProtoType & {
messageIds: Array<string>;
};
@@ -676,14 +683,14 @@ type ReadableInterface = {
) => Array<MessageType>;
getUnprocessedCount: () => number;
getUnprocessedById: (id: string) => UnprocessedType | undefined;
getAttachmentDownloadJob(
// Test-only
_getAttachmentDownloadJob(
job: Pick<
AttachmentDownloadJobType,
'messageId' | 'attachmentType' | 'digest'
>
): AttachmentDownloadJobType;
): AttachmentDownloadJobType | undefined;
getBackupCdnObjectMetadata: (
mediaId: string