Introduce in-memory transactions for sessions

This commit is contained in:
Fedor Indutny 2021-05-17 11:03:42 -07:00 committed by Scott Nonnenberg
parent 403b3c5fc6
commit 94d2c56ab9
12 changed files with 874 additions and 391 deletions

4
ts/textsecure.d.ts vendored
View file

@ -61,15 +61,11 @@ export type TextSecureType = {
setUuidAndDeviceId: (uuid: string, deviceId: number) => Promise<void>;
};
unprocessed: {
batchAdd: (dataArray: Array<UnprocessedType>) => Promise<void>;
remove: (id: string | Array<string>) => Promise<void>;
getCount: () => Promise<number>;
removeAll: () => Promise<void>;
getAll: () => Promise<Array<UnprocessedType>>;
updateAttempts: (id: string, attempts: number) => Promise<void>;
addDecryptedDataToList: (
array: Array<Partial<UnprocessedType>>
) => Promise<void>;
};
get: (key: string, defaultValue?: any) => any;
put: (key: string, value: any) => Promise<void>;