Creates a new ApiClient instance.
Configuration options for the client.
Aborts all shared reply-topic readers. Call when the client is no longer needed; pending publishWithResult callers will time out.
Gets the schema for a specific method.
The name of the service.
The name of the method.
The type of schema to retrieve (e.g., "request" or "response").
A promise resolving to the GetMethodSchemaResponse.
Invokes a method on a backend service using raw protobuf bytes.
The name of the target service.
The name of the method to invoke.
The serialized protobuf request data as Uint8Array.
A promise resolving to the InvokeResponse.
Invokes a method on a backend service using JSON request/response data. This is the recommended method for most use cases.
The name of the target service.
The name of the method to invoke.
The JSON serialized request data as string.
A promise resolving to the InvokeJsonResponse.
Lists all methods available for a specific service.
The name of the service to query.
A promise resolving to the ListMethodsResponse containing method information.
Lists all available services registered with the gateway.
A promise resolving to the ListServicesResponse containing service names.
Publishes a CloudEvent to a topic via the Pubsub service.
The topic name.
The CloudEvent message to publish.
A promise resolving to the PublishResponse.
Publishes to a topic and waits for a correlated response on a reply topic. Implements the request-reply pattern over pub/sub using correlation IDs, via the shared per-reply-topic reader started by ensureReplyReader (see its documentation for why the stream is shared rather than per call).
The topic to publish the request to. *
The CloudEvent message to publish. *
The topic to listen for responses on. *
Optionalopts: { correlationId?: string; timeout?: number }Options: timeout (ms, default 30000), correlationId. *
A promise resolving to the matching SubscribeResponse. *
Subscribes to a single pub/sub topic via the Pubsub service.
The topic name.
An async iterable yielding SubscribeResponse messages.
Subscribes to multiple pub/sub topics via the Pubsub service.
List of topic names to subscribe to.
An async iterable yielding SubscribeResponse messages.
API client for interacting with the Virtufin Gateway service. Provides service discovery, method invocation, and event subscription capabilities.