Generated types and operations table for the akash console API. Consumed by @akashnetwork/openapi-sdk's createApi(...) to produce a typed client.
src/schema.d.ts— generated byopenapi-typescriptfromapps/api/swagger/openapi.json. Providespaths,components, andoperationstypes.src/operations.gen.ts— generated byscripts/gen-operations.ts. A flat operations table grouped by URL version (v1, …) keyed byoperationId.src/index.ts— public surface: re-exportspaths,components,operationDefs(types) andoperations,Operations(runtime).
Both generated files are committed; consumers do not need to regenerate to install.
import { createApi } from "@akashnetwork/openapi-sdk";
import { operations, type paths } from "@akashnetwork/console-api-types";
const api = createApi<paths, typeof operations>(operations, { baseUrl: "/api/proxy" });
const alerts = await api.v1.getAlerts();The merged spec lives at apps/api/swagger/openapi.json (api routes + on-disk notifications spec). To refresh after an api change:
# from repo root — rebuilds the api spec, then this package
npm run sdk:gen
# or just this package, against the existing spec
npm run generate -w @akashnetwork/console-api-typesgenerate runs:
openapi-typescript ../../apps/api/swagger/openapi.json -o src/schema.d.tstsx scripts/gen-operations.ts— reads the spec, groups by URL version prefix, writessrc/operations.gen.ts
Commit both regenerated files alongside any spec change.
gen-operations.ts groups by URL version prefix (e.g. /v1/... → "v1"), falling back to the first openapi tag, then "default". This keeps a stable api.v1.<operationId> surface across producers regardless of tag noise.
The generator silently skips routes that don't declare operationId. Today most apps/api routes are in this category, so this package's operations table is dominated by notifications. To bring more routes into the typed surface, add operationId to their createRoute(...) declarations.