(
runId: string,
auth?: AuthContext | null,
)
| 16 | constructor(private readonly repository: TraceRepository) {} |
| 17 | |
| 18 | async list( |
| 19 | runId: string, |
| 20 | auth?: AuthContext | null, |
| 21 | ): Promise<{ events: TraceEventPayload[]; cursor?: string }> { |
| 22 | const organizationId = this.requireOrganizationId(auth); |
| 23 | const records = await this.repository.listByRunId(runId, organizationId); |
| 24 | const events = records.map((record) => this.mapRecordToEvent(record)); |
| 25 | const cursor = events.length > 0 ? events[events.length - 1].id : undefined; |
| 26 | return { events, cursor }; |
| 27 | } |
| 28 | |
| 29 | async listSince( |
| 30 | runId: string, |
no test coverage detected