Add delivery and supplier HTTP APIs with expanded response docs.
Wire store-backed CRUD for goods receipts and suppliers, and teach the API doc generator to expand $ref/allOf/array samples so route markdown shows full JSON shapes.
This commit is contained in:
26
src/db/delivery.js
Normal file
26
src/db/delivery.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, companyId) {
|
||||
const store = await getStore();
|
||||
return store.delivery.list(googleAuthId, companyId);
|
||||
}
|
||||
|
||||
export async function getById(googleAuthId, companyId, id) {
|
||||
const store = await getStore();
|
||||
return store.delivery.getById(googleAuthId, companyId, id);
|
||||
}
|
||||
|
||||
export async function create(googleAuthId, companyId, data) {
|
||||
const store = await getStore();
|
||||
return store.delivery.create(googleAuthId, companyId, data);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, companyId, id, data) {
|
||||
const store = await getStore();
|
||||
return store.delivery.update(googleAuthId, companyId, id, data);
|
||||
}
|
||||
|
||||
export async function remove(googleAuthId, companyId, id) {
|
||||
const store = await getStore();
|
||||
return store.delivery.delete(googleAuthId, companyId, id);
|
||||
}
|
||||
Reference in New Issue
Block a user