Construct the TypeScript client and access its typed service namespaces.

Eyeball

Authenticated TypeScript entry point for every Eyeball SDK namespace.

Constructor

ts
constructor(options: EyeballOptions): Eyeball
ParameterTypeRequiredDescription
optionsEyeballOptionsYesProject credential, executor URL, user binding, and optional test seams.

Returns: Eyeball

Properties

PropertyTypeRequiredReadonlyDescription
connectionsConnectionsClientYesYesDevelopment connection fixture administration.
executionsExecutionsClientYesYesExecution history and terminal-state polling.
filesFilesClientYesYesProject-scoped staged file operations.
subscriptionsSubscriptionsClientYesYesUser-scoped trigger subscription operations.
toolsToolsClientYesYesLocal discovery and canonical tool execution.
triggerEventsTriggerEventsClientYesYesRedacted project trigger-arrival history.
triggersTriggersClientYesYesLocal canonical trigger discovery.
webhooksWebhooksClientYesYesSigned webhook endpoint and delivery operations.

VERSION

Installed SDK source version.

ts
const VERSION: "0.2.0"

Types

EyeballOptions

Authentication, executor location, user binding, and transport seams.

ts
export interface EyeballOptions {
  apiKey: string;
  baseUrl: string;
  fetch?: typeof globalThis.fetch;
  /** Default end-user binding for user-scoped methods. */
  userId?: string;
  /** Test seam used by execution polling. */
  clock?: EyeballClock;
  /** Test seam used by execution polling. */
  sleep?: EyeballSleep;
  /** Development-only escape hatch for non-loopback cleartext executor URLs. */
  allowInsecureHttp?: boolean;
}
PropertyTypeRequiredReadonlyDescription
allowInsecureHttpbooleanNoNoDevelopment-only escape hatch for non-loopback cleartext executor URLs.
apiKeystringYesNo
baseUrlstringYesNo
clockEyeballClockNoNoTest seam used by execution polling.
fetch(input: string | URL | Request, init?: RequestInit) => Promise<Response>NoNo
sleepEyeballSleepNoNoTest seam used by execution polling.
userIdstringNoNoDefault end-user binding for user-scoped methods.

EyeballClock

Injectable millisecond clock used to bound execution polling.

ts
export interface EyeballClock {
  now(): number;
}
PropertyTypeRequiredReadonlyDescription
now() => numberYesNo

EyeballSleep

Injectable sleep function used by polling and safe GET retry delays.

ts
export type EyeballSleep = (milliseconds: number) => Promise<void>;

JsonValue

ts
export type JsonValue =
  | JsonPrimitive
  | readonly JsonValue[]
  | { readonly [key: string]: JsonValue };