Obs Client
Interfaces
Interfaces
SSEEvent
Server-Sent Event (SSE) data structure
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | |
data | any | Yes |
SSEConnectionOptions
SSE connection options
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
eventTypes | string[] | undefined | No | |
level | string | undefined | No | |
sessionId | string | undefined | No | |
follow | boolean | undefined | No |
StreamOptions
Stream options for tailing events Extended from base StreamOptions to include session events
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
eventTypes | ("error" | "log" | "session")[] | undefined | No | |
level | string | undefined | No | |
sessionId | string | undefined | No | |
follow | boolean | undefined | No |
ObsClientConfig
Shared types for Epic Flow Observability Platform SDK
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
serverUrl | string | Yes | |
apiKey | string | Yes | |
timeout | number | undefined | No | |
retries | number | undefined | No |
BaseEvent
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
timestamp | number | Yes | |
projectId | string | Yes | |
sessionId | string | undefined | No | |
metadata | Record<string, unknown> | Yes |
ErrorEvent
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "error" | Yes | |
level | "error" | "fatal" | Yes | |
message | string | Yes | |
stackTrace | string[] | Yes | |
sourceMap | { file: string; line: number; column: number; } | undefined | No | |
environment | { platform: string; version?: string; } | Yes |
ErrorFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
level | "error" | "fatal" | undefined | No | |
from | number | undefined | No | |
to | number | undefined | No | |
sessionId | string | undefined | No | |
limit | number | undefined | No | |
offset | number | undefined | No |
ErrorListResponse
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
errors | ErrorEvent[] | Yes | |
total | number | Yes | |
hasMore | boolean | Yes |
ErrorStats
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
totalErrors | number | Yes | |
errorRate | number | Yes | |
topErrors | { message: string; count: number; }[] | Yes | |
platformBreakdown | Record<string, number> | undefined | No |
LogEvent
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
type | "log" | Yes | |
level | "error" | "debug" | "info" | "warn" | Yes | |
message | string | Yes | |
context | Record<string, unknown> | undefined | No |
LogFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
level | "error" | "debug" | "info" | "warn" | undefined | No | |
from | number | undefined | No | |
to | number | undefined | No | |
search | string | undefined | No | |
limit | number | undefined | No | |
offset | number | undefined | No |
LogListResponse
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
logs | LogEvent[] | Yes | |
total | number | Yes | |
hasMore | boolean | Yes |
CreateLogInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
level | "error" | "debug" | "info" | "warn" | Yes | |
message | string | Yes | |
projectId | string | Yes | |
context | Record<string, unknown> | undefined | No | |
sessionId | string | undefined | No |
Breadcrumb
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | number | Yes | |
type | "navigation" | "click" | "input" | "api" | "custom" | Yes | |
category | string | undefined | No | |
message | string | Yes | |
data | Record<string, unknown> | undefined | No |
Session
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
projectId | string | Yes | |
userId | string | undefined | No | |
startTime | number | Yes | |
lastActivity | number | Yes | |
breadcrumbs | Breadcrumb[] | undefined | No | |
metadata | Record<string, unknown> | Yes | |
errorCount | number | undefined | No | |
logCount | number | undefined | No | |
environment | { platform?: string; version?: string; userAgent?: string; } | undefined | No |
SessionFilters
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
userId | string | undefined | No | |
from | number | undefined | No | |
to | number | undefined | No | |
limit | number | undefined | No |
SessionListResponse
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
sessions | Session[] | Yes | |
total | number | Yes | |
hasMore | boolean | undefined | No |
Project
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
name | string | Yes | |
description | string | undefined | No | |
apiKey | string | Yes | |
createdAt | number | Yes | |
settings | Record<string, unknown> | Yes |
CreateProjectInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | |
description | string | undefined | No | |
settings | Record<string, unknown> | undefined | No |
UpdateProjectInput
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | undefined | No | |
description | string | undefined | No | |
settings | Record<string, unknown> | undefined | No |
ProjectStats
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
totalErrors | number | Yes | |
totalLogs | number | Yes | |
totalSessions | number | Yes | |
errorTrend | { timestamp: number; count: number; }[] | Yes |
StreamOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
types | ("error" | "log")[] | undefined | No | |
follow | boolean | undefined | No |
StatsOptions
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
from | number | undefined | No | |
to | number | undefined | No | |
groupBy | "hour" | "day" | "week" | undefined | No |
RequestConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
method | "GET" | "POST" | "PUT" | "DELETE" | Yes | |
path | string | Yes | |
params | Record<string, unknown> | undefined | No | |
body | unknown | No | |
attempt | number | undefined | No |
RetryOptions
Retry utilities for handling transient failures
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
maxRetries | number | Yes | |
currentAttempt | number | undefined | No |
RetryConfig
Properties:
| Property | Type | Required | Description |
|---|---|---|---|
shouldRetry | (error: unknown, attempt: number) => boolean | Yes | |
calculateDelay | (attempt: number) => number | Yes |