interface PubSubSdkModule

Declares the constructors used from the real GCP Pub/Sub SDK so the adapter can build a domain port. This is NOT an SDK-shaped structural facade — it names only what the adapter actually uses.

Properties

PubSub: new (options: { projectId: string; credentials?: unknown; }) => { topic(topicName: string): { publishMessage(message: { data: Uint8Array; attributes?: Record<string, string>; }): Promise<string>; createSubscription(subscriptionName: string): Promise<unknown[]>; }; subscription(subscriptionName: string): { on(
event: "message",
handler: (msg: { ack: () => void; nack: () => void; data: Uint8Array; id: string; publishTime?: Date; attributes?: Record<string, string>; }) => void
): void; on(
event: "error",
handler: (err: unknown) => void
): void; close(): Promise<void>; delete(): Promise<void>; }
; close(): Promise<void>; }

Usage

import { type PubSubSdkModule } from "messaging-plugin/src/index.ts";