Dummy

← Back to module

JSDoc

Classes

CoreClient

class

Minimal API client for the core module.

class CoreClient
Members

options

property
options: ClientOptions

constructor

constructor
constructor(options: ClientOptions): CoreClient

request

method

Perform a JSON request and return a typed result.

<T>(input: RequestInput): Promise<RequestResult<T>>

Functions

createCoreClient

function

Create a new client instance.

createCoreClient(options: ClientOptions): CoreClient

helloCore

function

Convenience greeting for quick smoke testing.

helloCore(name: string, excited?: boolean): string

Types

HttpMethod

type

Supported HTTP methods for client requests.

type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE"

ClientOptions

type

Configuration for creating a Core client.

type ClientOptions = {
  /**
   * Base URL for API requests (for example, "https://api.example.com").
   */
  baseUrl: string;
  /**
   * Optional API key for authenticated requests.
   */
  apiKey?: string;
  /**
   * Request timeout in milliseconds.
   */
  timeoutMs?: number;
}

RequestInput

type

Input shape for a request.

type RequestInput = {
  /**
   * Path to append to the base URL (for example, "/v1/health").
   */
  path: string;
  /**
   * HTTP method to use.
   */
  method?: HttpMethod;
  /**
   * Optional JSON-serializable body.
   */
  body?: unknown;
}

RequestResult

type

Result of a request.

type RequestResult = RequestResult<T>

Constants

moduleId

const
const moduleId: "core"