63 lines
2.0 KiB
JavaScript
63 lines
2.0 KiB
JavaScript
import companyuserGetByEmail from './store/companyuser/getByEmail.js';
|
|
import companyuserAdd from './store/companyuser/add.js';
|
|
import companyGetByCompanyUserId from './store/company/getByCompanyUserId.js';
|
|
import companyCreate from './store/company/create.js';
|
|
import companySetDefaultLang from './store/company/setDefaultLang.js';
|
|
import companySetRootCategory from './store/company/setRootCategory.js';
|
|
import companyDelete from './store/company/delete.js';
|
|
import companyList from './store/company/list.js';
|
|
import categoryGetTree from './store/category/getTree.js';
|
|
import categoryCreate from './store/category/create.js';
|
|
import langCreate from './store/lang/create.js';
|
|
import langDelete from './store/lang/delete.js';
|
|
import langList from './store/lang/list.js';
|
|
import googleAuthAdd from './store/google_auth/add.js';
|
|
import googleAuthList from './store/google_auth/list.js';
|
|
import googleAuthDel from './store/google_auth/del.js';
|
|
import storePurge from './store/purge.js';
|
|
import storeInitialize from './store/initialize.js';
|
|
|
|
export default class LibDashStore {
|
|
constructor(pool) {
|
|
this.pool = pool;
|
|
|
|
this.companyuser = {
|
|
getByEmail: companyuserGetByEmail(pool),
|
|
add: companyuserAdd(pool),
|
|
};
|
|
|
|
this.company = {
|
|
getByCompanyUserId: companyGetByCompanyUserId(pool),
|
|
create: companyCreate(pool),
|
|
setDefaultLang: companySetDefaultLang(pool),
|
|
setRootCategory: companySetRootCategory(pool),
|
|
delete: companyDelete(pool),
|
|
list: companyList(pool),
|
|
};
|
|
|
|
this.category = {
|
|
getTree: categoryGetTree(pool),
|
|
create: categoryCreate(pool),
|
|
};
|
|
|
|
this.lang = {
|
|
create: langCreate(pool),
|
|
delete: langDelete(pool),
|
|
list: langList(pool),
|
|
};
|
|
|
|
this.google_auth = {
|
|
add: googleAuthAdd(pool),
|
|
list: googleAuthList(pool),
|
|
del: googleAuthDel(pool),
|
|
};
|
|
|
|
this.purge = storePurge(pool);
|
|
this.initialize = storeInitialize(pool);
|
|
|
|
return this.initialize().then(() => this);
|
|
}
|
|
}
|
|
|
|
export { SCHEMA_SCRIPTS } from './schema.js';
|