This commit is contained in:
seb
2026-08-06 00:32:22 +02:00
parent 855710a198
commit d8b48d96e1
7 changed files with 151 additions and 58 deletions

View File

@@ -110,7 +110,8 @@ export class ApiClient {
history: (sku) => this.#json('GET', `/api/article/${enc(sku)}/history`),
/**
* Load history and refetch on SSE `article-<sku>`.
* `onHistory(history)` — returns unwatch(). Errors via notifyError.
* Paginates in StorageManager until the HTTP API supports skip/offset.
* `onHistory(history, total)` — returns `{ unwatch, setSkipAndOffset }`.
*/
historyWatch: (sku, onHistory) => this.watchArticleHistory(sku, onHistory),
/** PATCH /api/article/{sku} — body: at least one of { name, unitamount, unitSi } */