import type { Duration, SearchAttributeType } from '@temporalio/common'; import type { native } from '@temporalio/core-bridge'; import type { SearchAttributeKey } from '@temporalio/common/lib/search-attributes'; /** * Configuration for the Temporal CLI Dev Server. */ export interface DevServerConfig { type: 'dev-server'; executable?: EphemeralServerExecutable; /** * Sqlite DB filename if persisting or non-persistent if none (default). */ dbFilename?: string; /** * Namespace to use - created at startup. * * @default "default" */ namespace?: string; /** * IP to bind to. * * @default localhost */ ip?: string; /** * Port to listen on; defaults to find a random free port. */ port?: number; /** * Whether to enable the UI. * * @default true if `uiPort` is set; defaults to `false` otherwise. */ ui?: boolean; /** * Port to listen on for the UI; if `ui` is true, defaults to `port + 1000`. */ uiPort?: number; /** * Log format and level * @default { format: "pretty", level" "warn" } */ log?: { format: string; level: string; }; /** * Extra args to pass to the executable command. * * Note that the Dev Server implementation may be changed to another one in the future. Therefore, there is no * guarantee that Dev Server options, and particularly those provided through the `extraArgs` array, will continue to * be supported in the future. */ extraArgs?: string[]; /** * Search attributes to be registered with the dev server. */ searchAttributes?: SearchAttributeKey[]; } /** * Configuration for the time-skipping test server. */ export interface TimeSkippingServerConfig { type: 'time-skipping'; executable?: EphemeralServerExecutable; /** * Optional port to listen on, defaults to find a random free port. */ port?: number; /** * Extra args to pass to the executable command. * * Note that the Test Server implementation may be changed to another one in the future. Therefore, there is * no guarantee that server options, and particularly those provided through the `extraArgs` array, will continue to * be supported in the future. */ extraArgs?: string[]; } /** * Which version of the executable to run. */ export type EphemeralServerExecutable = { type: 'cached-download'; /** * Download destination directory or the system's temp directory if none set. */ downloadDir?: string; /** * Optional version, can be set to a specific server release or "default" or "latest". * * At the time of writing the the server is released as part of the * Java SDK - (https://github.com/temporalio/sdk-java/releases). * * @default "default" - get the best version for the current SDK version. */ version?: string; /** How long to cache the download for. Default to 1 day. */ ttl?: Duration; } | { type: 'existing-path'; /** Path to executable */ path: string; }; /** * @internal */ export declare function toNativeEphemeralServerConfig(server: DevServerConfig | TimeSkippingServerConfig): native.EphemeralServerConfig;