u
This commit is contained in:
@@ -192,6 +192,22 @@ export class ApiClient {
|
||||
},
|
||||
};
|
||||
|
||||
this.ledger = {
|
||||
/** POST /api/ledger → 201 { ledger: LedgerEntry } */
|
||||
add: (body) => this.#json('POST', '/api/ledger', { body }),
|
||||
/** GET /api/ledger/manifestarticle/{id} → { ledger: LedgerEntry[] } */
|
||||
listByManifestarticleId: (manifestarticleId, transactionType) =>
|
||||
this.#json('GET', `/api/ledger/manifestarticle/${enc(manifestarticleId)}`, {
|
||||
query: transactionType ? { transaction_type: transactionType } : undefined,
|
||||
}),
|
||||
/** GET /api/ledger/sku/{sku} → { ledger: LedgerEntry[] } */
|
||||
listBySku: (sku, transactionType) =>
|
||||
this.#json('GET', `/api/ledger/sku/${enc(sku)}`, {
|
||||
query: transactionType ? { transaction_type: transactionType } : undefined,
|
||||
}),
|
||||
/** GET /api/ledger → { ledger: LedgerEntry[] } */
|
||||
list: (query) => this.#json('GET', '/api/ledger', { query }),
|
||||
};
|
||||
|
||||
this.quote = {
|
||||
/** GET /api/quote → { quotes } */
|
||||
|
||||
Reference in New Issue
Block a user