21 lines · 675 B · TypeScript
RawDownload
import type { LogSession } from "../types";import type { ApiCore, RequestOptions } from "./core"; export function createLogsApi(core: ApiCore) {  return {    getLogSessions: (options?: RequestOptions): Promise<{ sessions: LogSession[] }> =>      core.request("/logs", options),     getLogs: (      sessionId: string,      limit?: number,      options?: RequestOptions,    ): Promise<{ logs: string[] }> => {      const query = limit ? `?limit=${limit}` : "";      return core.request(`/logs/${sessionId}${query}`, options);    },     deleteLogSession: (sessionId: string): Promise<void> =>      core.request(`/logs/${sessionId}`, { method: "DELETE" }),  };}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t