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:
seb
2026-08-06 07:38:05 +02:00
parent 1860f38640
commit 74269cd3ef
30 changed files with 4166 additions and 0 deletions

21
src/db/entitycontact.js Normal file
View 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);
}