Add customergroup and entity HTTP APIs with address and contact routes.
Expose store-backed CRUD for customer groups, entities, nested addresses, and contacts, matching the documented dashdbschema contracts.
This commit is contained in:
21
src/db/entitycontact.js
Normal file
21
src/db/entitycontact.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId, entityId) {
|
||||
const store = await getStore();
|
||||
return store.entitycontact.list(googleAuthId, companyId, entityId);
|
||||
}
|
||||
|
||||
export async function create(googleAuthId, companyId, entityId, data) {
|
||||
const store = await getStore();
|
||||
return store.entitycontact.create(googleAuthId, companyId, entityId, data);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, companyId, entityId, id, data) {
|
||||
const store = await getStore();
|
||||
return store.entitycontact.update(googleAuthId, companyId, entityId, id, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, entityId, id) {
|
||||
const store = await getStore();
|
||||
return store.entitycontact.delete(googleAuthId, companyId, entityId, id);
|
||||
}
|
||||
Reference in New Issue
Block a user