Home / Type/ AsyncClientOptions Type — typescript-sdk Architecture

AsyncClientOptions Type — typescript-sdk Architecture

Architecture documentation for the AsyncClientOptions type/interface in async.ts from the typescript-sdk codebase.

Entity Profile

Source Code

src/async.ts lines 38–74

export interface AsyncClientOptions {
  /**
   * Maximum time to wait for a job to complete (in milliseconds).
   * Default: 900000 (15 minutes)
   */
  timeoutMs?: number;

  /**
   * Default retry interval when server doesn't specify (in milliseconds).
   * Default: 10000 (10 seconds)
   */
  defaultRetryIntervalMs?: number;

  /**
   * Maximum number of polling attempts.
   * Default: 90
   */
  maxPollingAttempts?: number;

  /**
   * Callback for polling progress updates.
   * Useful for showing progress indicators in UIs.
   */
  onPollingProgress?: (status: PollingProgress) => void;

  /**
   * Function to generate idempotency keys.
   * Default: crypto.randomUUID() or fallback
   */
  generateIdempotencyKey?: () => string;

  /**
   * AbortSignal for cancelling the polling operation.
   * When aborted, throws an AbortError.
   */
  signal?: AbortSignal;
}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free