Interfaces · @purista/base-http-bridge
HttpEventBridgeClient
Adapter contract between HttpEventBridge and a sidecar or platform HTTP API.
Signature
interface HttpEventBridgeClient Properties
6 entries
getApiPathForCommand
Property
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
getInternalPathForCommand: (address: EBMessageAddress) => string Generates the internal POST path for a full PURISTA command message.
getInternalPathForSubscription
Property
getInternalPathForSubscription: (address: EBMessageAddress) => string Generates the internal POST path for subscription delivery.
invoke
Property
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
isSidecarAvailable: () => Promise<boolean> Checks whether the sidecar or platform API is available for outgoing traffic.
sendEvent
Property
sendEvent: (message: EBMessage, headers?: Record<string, string>) => Promise<void> Publishes an event message to the underlying event transport.