← Về thư mục
frontend/src/features/artifacts/api.ts
- FetchFn · type · L8-L8 — type FetchFn = (input: string, init?: RequestInit) => Promise;
- setArtifactsFetch · function · L12-L14 — function setArtifactsFetch(fn: FetchFn | null): void
- artifactsFetch · function · L16-L20 — function artifactsFetch(input: string, init?: RequestInit): Promise
- ApiError · class · L23-L37 — class ApiError extends Error
- constructor · method · L28-L36 — constructor(body: unknown, httpStatus: number)
- apiErrorText · function · L40-L44 — function apiErrorText(e: unknown): string
- api · function · L49-L66 — async function api(p: string, o: RequestInit = {}): Promise
- asArtifactList · function · L68-L79 — function asArtifactList(value: unknown): ArtifactRow[]
- asVersionList · function · L81-L93 — function asVersionList(value: unknown): ArtifactVersionRow[]
- bytes · function · L96-L101 — function bytes(b: number | null | undefined): string
- looksBinary · function · L106-L117 — function looksBinary(s: string | null | undefined): boolean
- el · function · L119-L128 — function el( tag: K, className?: string | null, text?: string | null, ): HTMLElementTagNameMap[K]
- svgElement · function · L130-L136 — function svgElement(name: string, attrs?: Record): SVGElement
- icon · function · L160-L163 — function icon(name: string, size = 16): string
- iconEl · function · L165-L169 — function iconEl(name: string, size = 16, extraClass?: string): HTMLElement
- HostWindow · type · L171-L173 — type HostWindow = Record & { t?: (key: string, ...args: unknown[]) => string; };
- hostWindow · function · L175-L177 — function hostWindow(): HostWindow
- callWindow · function · L180-L184 — function callWindow(name: string, ...args: unknown[]): unknown
- translate · function · L186-L190 — function translate(key: string, ...args: unknown[]): string
- fetchArtifactText · function · L192-L197 — function fetchArtifactText(url: string): Promise
- isApiStatus · function · L199-L204 — function isApiStatus(e: unknown, status: number, code?: string): boolean