UNPKG

@qbcart/company-localdb

Version:

The client-side database used across the QBCart Company ecosystem.

28 lines (27 loc) 864 B
/*********************************************** * @license * Copyright (c) QBCart Inc. All rights reserved. ************************************************/ import { Dexie, Table } from 'dexie'; import type LineItem from './interfaces/line-item'; import type Customer from './interfaces/customer'; import type SyncTimes from './interfaces/sync-times'; import type DataToSync from './interfaces/data-to-sync'; import type User from './interfaces/user'; /** * Database schema */ declare class LocalDB extends Dexie { lineItems: Table<LineItem, string>; customers: Table<Customer, string>; syncTimes: Table<SyncTimes, string>; user: Table<User, string>; lastForcedUpdate: number; dataToSync: DataToSync; constructor(); } /** * An instance to interface the database. */ declare const localDB: LocalDB; export { localDB, LocalDB };