tweb-i2p/src/config/database.ts

23 lines
603 B
TypeScript
Raw Normal View History

2021-04-08 13:52:31 +00:00
/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
2021-02-13 15:32:10 +00:00
import { IDBStore } from "../lib/idb";
import Modes from "./modes";
2021-04-24 17:06:24 +00:00
export type DatabaseStoreName = 'session' | 'stickerSets' | 'users' | 'chats' | 'messages' | 'dialogs';
2021-02-13 15:32:10 +00:00
export type DatabaseStore = Omit<IDBStore, 'name'> & {name: DatabaseStoreName};
const Database = {
name: 'tweb' + (Modes.test ? '_test' : ''),
version: 5,
stores: [{
name: 'session'
}, {
name: 'stickerSets'
}] as DatabaseStore[],
};
export default Database;