Configuration
Client configuration values and config-file helpers.
RuntaConfig
Section titled “RuntaConfig”Selects the API endpoint, credentials, config file, and request timeout.
RuntaConfig declaration
Section titled “RuntaConfig declaration”interface RuntaConfigRuntaConfig properties
Section titled “RuntaConfig properties”| Name | Type | Description |
|---|---|---|
configPath? | string | Configuration file path. |
endpoint? | string | Resolved Runta API endpoint. |
fetch? | (input: URL | RequestInfo, init?: RequestInit) => Promise<Response> | Custom Fetch implementation. |
timeoutMs? | number | Request timeout in milliseconds. |
token? | string | Bearer token used for authentication. |
userAgent? | string | User-Agent header sent with requests. |
DEFAULT_ENDPOINT
Section titled “DEFAULT_ENDPOINT”Default Runta control-plane endpoint.
DEFAULT_ENDPOINT declaration
Section titled “DEFAULT_ENDPOINT declaration”const DEFAULT_ENDPOINT: "https://api.runta.dev"readRuntaConfig
Section titled “readRuntaConfig”Reads endpoint and token values from the Runta TOML config file.
readRuntaConfig signature
Section titled “readRuntaConfig signature”function readRuntaConfig(configPath?: string): { endpoint?: string; token?: string }Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
configPath? | string | Optional | Path to the Runta TOML configuration file. |
Returns
Section titled “Returns”{ endpoint?: string; token?: string }
resolveConfig
Section titled “resolveConfig”Resolves explicit, environment, and config-file client settings.
resolveConfig signature
Section titled “resolveConfig signature”function resolveConfig(input: { configPath?: string; endpoint?: string; token?: string }): ResolvedConfigParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
input | { configPath?: string; endpoint?: string; token?: string } | Required | Explicit client configuration values. |
Returns
Section titled “Returns”ResolvedConfig