Add company settings and number sequence API routes
- Add CompanySetting routes (list, get, set) backed by company-scoped store - Add Number routes (list, update) for managing number sequences - Register new store namespaces for numbers and companysetting - Add CompanySetting and NumberSequence schemas to OpenAPI - Regenerate API docs and index for the new routes
This commit is contained in:
16
src/db/companysetting.js
Normal file
16
src/db/companysetting.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId, options) {
|
||||
const store = await getStore();
|
||||
return store.companysetting.list(googleAuthId, options);
|
||||
}
|
||||
|
||||
export async function getByKey(googleAuthId, key, options) {
|
||||
const store = await getStore();
|
||||
return store.companysetting.get(googleAuthId, key, options);
|
||||
}
|
||||
|
||||
export async function set(googleAuthId, input) {
|
||||
const store = await getStore();
|
||||
return store.companysetting.set(googleAuthId, input);
|
||||
}
|
||||
11
src/db/numbers.js
Normal file
11
src/db/numbers.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { getStore } from './store.js';
|
||||
|
||||
export async function list(googleAuthId) {
|
||||
const store = await getStore();
|
||||
return store.numbers.list(googleAuthId);
|
||||
}
|
||||
|
||||
export async function update(googleAuthId, id, input) {
|
||||
const store = await getStore();
|
||||
return store.numbers.update(googleAuthId, id, input);
|
||||
}
|
||||
@@ -27,6 +27,8 @@ const STORE_NAMESPACES = [
|
||||
'entitycontact',
|
||||
'quote',
|
||||
'order',
|
||||
'numbers',
|
||||
'companysetting',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user