Interfaces · @purista/base-http-bridge

HttpEventBridgeClient

Adapter contract between HttpEventBridge and a sidecar or platform HTTP API.

Signature

HttpEventBridgeClient.ts typescript
interface HttpEventBridgeClient

Properties

6 entries

getApiPathForCommand

Property

Source
getApiPathForCommand.ts typescript
getApiPathForCommand: (address: EBMessageAddress, metadata: { expose: { contentEncodingRequest: string; contentEncodingResponse: string; contentTypeRequest: string; contentTypeResponse: string; deprecated: boolean; inputPayload: SchemaObject; ... } & { http: { method: unknown | unknown | unknown | unknown | unknown; mode: unknown | unknown; openApi: { additionalStatusCodes: unknown; description: unknown; isSecure: unknown; operationId: unknown; query: unknown; summary: unknown; ... }; path: string; stream: { documentationUrl: unknown; mode: unknown; protocol: unknown } } } }) => string

Generates the public HTTP projection path declared by command metadata.

getInternalPathForCommand

Property

Source
getInternalPathForCommand.ts typescript
getInternalPathForCommand: (address: EBMessageAddress) => string

Generates the internal POST path for a full PURISTA command message.

getInternalPathForSubscription

Property

Source
getInternalPathForSubscription.ts typescript
getInternalPathForSubscription: (address: EBMessageAddress) => string

Generates the internal POST path for subscription delivery.

invoke

Property

Source
invoke.ts typescript
invoke: (command: { contentEncoding: string; contentType: string; correlationId: string; eventName: string; id: string; messageType: Command; ... }, headers?: Record<string, string>, timeout?: number) => Promise<CommandResponse>

Invokes a command through the sidecar/platform HTTP API.

isSidecarAvailable

Property

Source
isSidecarAvailable.ts typescript
isSidecarAvailable: () => Promise<boolean>

Checks whether the sidecar or platform API is available for outgoing traffic.

sendEvent

Property

Source
sendEvent.ts typescript
sendEvent: (message: EBMessage, headers?: Record<string, string>) => Promise<void>

Publishes an event message to the underlying event transport.