Turns the rows the category service reads from categories into the Category the category routes send.
f
categoryRowToApi(row: CategoryRow): Category
Converts row to the Category the category routes send.
f
isCategoryRow(obj: unknown): obj is CategoryRow
Checks whether a row node:sqlite returned is a CategoryRow.
I
CategoryRow
Returned by the category service's SELECTs on categories.
- created_at: string
- id: string
- kind: CategoryKind
- name: string
-
position: number
Sorts the categories, lowest first.
- slug: string
- updated_at: string | null
Usage
import * as mod from "api/model/category.ts";