feat(parsers+api+ui): expose CARC-labeled CAS adjustments (SP3 P2)
This commit is contained in:
@@ -417,6 +417,22 @@ async function listRemittances<T = unknown>(
|
||||
return (await res.json()) as PaginatedResponse<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch one remittance with its labeled CAS `adjustments` array.
|
||||
* Throws `ApiError` on 404 so callers can branch on `.status`.
|
||||
*/
|
||||
async function getRemittance<T = unknown>(id: string): Promise<T> {
|
||||
if (!isConfigured) throw notConfiguredError();
|
||||
const res = await fetch(joinUrl(`/api/remittances/${encodeURIComponent(id)}`), {
|
||||
headers: { Accept: "application/json" },
|
||||
});
|
||||
if (!res.ok) {
|
||||
const detail = await readErrorBody(res);
|
||||
throw new ApiError(res.status, detail || res.statusText);
|
||||
}
|
||||
return (await res.json()) as T;
|
||||
}
|
||||
|
||||
async function listProviders<T = unknown>(
|
||||
params: ListProvidersParams = {}
|
||||
): Promise<PaginatedResponse<T>> {
|
||||
@@ -516,6 +532,7 @@ export const api = {
|
||||
getBatch,
|
||||
listClaims,
|
||||
listRemittances,
|
||||
getRemittance,
|
||||
listProviders,
|
||||
listActivity,
|
||||
listUnmatched,
|
||||
|
||||
Reference in New Issue
Block a user