u
This commit is contained in:
@@ -442,6 +442,19 @@ export class ApiClient {
|
||||
update: (id, body) => this.#json('PATCH', `/api/number/${enc(id)}`, { body }),
|
||||
};
|
||||
|
||||
this.printer = {
|
||||
/** GET /api/printer → { printers: Printer[] } */
|
||||
list: () => this.#json('GET', '/api/printer'),
|
||||
/** POST /api/printer → 201 { printer } */
|
||||
create: (body) => this.#json('POST', '/api/printer', { body }),
|
||||
/** PATCH /api/printer/{id} → { printer } */
|
||||
update: (id, body) => this.#json('PATCH', `/api/printer/${enc(id)}`, { body }),
|
||||
/** DELETE /api/printer/{id} → 204 */
|
||||
delete: (id) => this.#empty('DELETE', `/api/printer/${enc(id)}`),
|
||||
/** PUT /api/printer/order body { printerIds } → { printerIds } */
|
||||
order: (body) => this.#json('PUT', '/api/printer/order', { body }),
|
||||
};
|
||||
|
||||
this.setting = {
|
||||
/** GET /api/company/setting?frontendOnly=1 → { settings: [{ key, value, frontend }] } */
|
||||
list: (query) => this.#json('GET', '/api/company/setting', { query }),
|
||||
|
||||
@@ -581,6 +581,14 @@ export const brand = {
|
||||
upsert(body) {
|
||||
return http('/api/brand', { method: 'PUT', body });
|
||||
},
|
||||
|
||||
/**
|
||||
* DELETE /api/brand/:id
|
||||
* → 204 No Content · 404 Brand not found
|
||||
*/
|
||||
delete(id) {
|
||||
return http(`/api/brand/${encodeURIComponent(id)}`, { method: 'DELETE' });
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user