import type { CommandDefinitionBuilder } from '../CommandDefinitionBuilder/CommandDefinitionBuilder.impl.js'; import type { EventBridge } from '../core/EventBridge/types/EventBridge.js'; import type { QueueBridge } from '../core/QueueBridge/types/QueueBridge.js'; import type { ServiceBuilderTypes } from '../core/types/ServiceBuilderTypes.js'; import type { InstanceConfigType, ServiceBuilder } from '../ServiceBuilder/ServiceBuilder.impl.js'; import type { Infer, InferIn } from '../schema/index.js'; /** * Infer the instance config type from a service builder. * * @group Unit test helper */ export type InferCommandHarnessServiceBuilderConfig = T extends ServiceBuilder ? S : never; /** * Infer the definition config type from a command builder. * * @group Unit test helper */ export type InferCommandBuilderConfig = T extends CommandDefinitionBuilder ? C : never; export type CreateCommandTestHarnessOptions> = InstanceConfigType> & { eventBridge?: EventBridge; queueBridge?: QueueBridge; }; /** * Boot a real service instance and execute one command through the PURISTA runtime. * * Use this helper when you want to test validation, guards, emits, and runtime * wiring instead of calling the command handler directly. * * @group Unit test helper */ export declare const createCommandTestHarness: , TCommandBuilder extends CommandDefinitionBuilder>(serviceBuilder: TServiceBuilder, commandBuilder: TCommandBuilder, options?: CreateCommandTestHarnessOptions) => Promise<{ service: import("../index.js").Service>; eventBridge: EventBridge; stubs: { eventBridge: Record> | undefined; }; run: (input: { payload: InferIn['PayloadSchema']>; parameter: InferIn['ParamsSchema']>; }) => Promise<{ message: Awaited) => Promise> | { id: import("../index.js").EBMessageId; timestamp: number; contentType: import("../index.js").ContentType; contentEncoding: string; traceId?: import("../index.js").TraceId; principalId?: import("../index.js").PrincipalId; tenantId?: import("../index.js").TenantId; eventName?: string; sender: import("../index.js").EBMessageSenderAddress; messageType: import("../index.js").EBMessageType.CommandSuccessResponse; correlationId: import("../index.js").CorrelationId; receiver: import("../index.js").EBMessageSenderAddress; payload: unknown; otp: string; }>>>; result: Infer['OutputSchema']> | undefined; }>; destroy: () => Promise; }>; //# sourceMappingURL=createCommandTestHarness.d.ts.map