41 lines
2.1 KiB
TypeScript
41 lines
2.1 KiB
TypeScript
export { fetchJson, fetchText, type ActivityRef, type ActivityRefSource, type ApiRequestOptions } from "./client";
|
|
export { authAPI, HWLAB_WEB_SESSION_COOKIE, type WorkspaceBootstrapResponse } from "./auth";
|
|
export { workbenchAPI } from "./workbench";
|
|
export { agentAPI } from "./agent";
|
|
export { hwpodAPI } from "./hwpod";
|
|
export { accessAPI } from "./access";
|
|
export { providerProfilesAPI } from "./providerProfiles";
|
|
export { apiKeysAPI } from "./apiKeys";
|
|
export { usageAPI } from "./usage";
|
|
export { systemAPI, type SkillUploadFileInput } from "./system";
|
|
|
|
import { fetchJson } from "./client";
|
|
import { accessAPI } from "./access";
|
|
import { agentAPI } from "./agent";
|
|
import { apiKeysAPI } from "./apiKeys";
|
|
import { authAPI } from "./auth";
|
|
import { hwpodAPI } from "./hwpod";
|
|
import { providerProfilesAPI } from "./providerProfiles";
|
|
import { usageAPI } from "./usage";
|
|
import { workbenchAPI } from "./workbench";
|
|
import { systemAPI } from "./system";
|
|
import type { ApiResult, LiveBuildsPayload, LiveProbePayload, SkillsResponse } from "@/types";
|
|
|
|
export const api = {
|
|
auth: authAPI,
|
|
workbench: workbenchAPI,
|
|
agent: agentAPI,
|
|
hwpod: hwpodAPI,
|
|
access: accessAPI,
|
|
providerProfiles: providerProfilesAPI,
|
|
apiKeys: apiKeysAPI,
|
|
usage: usageAPI,
|
|
system: systemAPI,
|
|
healthLive: (): Promise<ApiResult<LiveProbePayload>> => fetchJson("/health/live", { timeoutMs: 12000, timeoutName: "health/live" }),
|
|
health: (): Promise<ApiResult<LiveProbePayload>> => fetchJson("/health", { timeoutMs: 12000, timeoutName: "health" }),
|
|
restIndex: (): Promise<ApiResult<LiveProbePayload>> => fetchJson("/v1", { timeoutMs: 12000, timeoutName: "REST index" }),
|
|
adapter: (): Promise<ApiResult<LiveProbePayload>> => fetchJson("/v1/rpc/system.health", { method: "POST", body: JSON.stringify({}), timeoutMs: 12000, timeoutName: "adapter" }),
|
|
liveBuilds: (): Promise<ApiResult<LiveBuildsPayload>> => fetchJson("/v1/live-builds", { timeoutMs: 12000, timeoutName: "live builds" }),
|
|
skills: (): Promise<ApiResult<SkillsResponse>> => fetchJson("/v1/skills", { timeoutMs: 12000, timeoutName: "skills" })
|
|
};
|