# @purista/base-http-bridge API

Packages from @purista/base-http-bridge

---
Canonical: /handbook/api/modules/_purista_base-http-bridge/
Format: Markdown for agents
---

Package: `@purista/base-http-bridge`

## Signature

```typescript
@purista/base-http-bridge
```

## Members

### Classes

- `class HttpEventBridge<CustomConfig>` — Stores the app value exposed by HttpEventBridge.
Start the bridge before registering services and stop it during graceful shutdown.
Expose only schemas and metadata that are safe for clients to inspect.
Treat this property as runtime state unless the concrete API documents a stronger guarantee.

### Interfaces

- `interface HttpEventBridgeClient` — Adapter contract between HttpEventBridge and a sidecar or platform HTTP API.

### Type Aliases

- `type HttpEventBridgeConfig = void` — Configuration for HTTP event bridges that host PURISTA command/subscription routes.
- `type IHttpEventBridge = { emitMessage: (message: Omit<EBMessage, "id" | "timestamp" | "correlationId">) => Promise<Readonly<unknown>>; isHealthy: () => Promise<boolean> } & EventBridgeBaseClass<HttpEventBridgeConfig>` — Minimal bridge shape required by HTTP route handlers.
- `type RouterFunction = (this: T, c: Context) => Promise<Response>` — Hono route handler bound to an HTTP event bridge instance.

### Variables

- `const puristaVersion: "3.0.1"` — The PURISTA package version embedded in the published runtime build.

### Functions

- `getDefaultHttpEventBridgeConfig(): { apiPrefix: string; commandPayloadAsCloudEvent: boolean; defaultCommandTimeout: number; enableHttpCompression: boolean; enableRestApiExpose: boolean; instanceId: string; ... }`
