UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

20 lines (19 loc) 1.26 kB
import { KeyStoreParams, KeyType } from '../../../../modules/key'; import { ILogger } from '../../../logger'; import { SubService } from '../../index'; import { SubscriptionCallback } from '../../../../types/quorum'; import { ProviderClient, ProviderTransaction } from '../../../../types/provider'; import { PostgresClientType } from '../../../../types/postgres'; declare class PostgresSubService extends SubService<PostgresClientType & ProviderClient> { constructor(eventClient: PostgresClientType & ProviderClient, storeClient?: PostgresClientType & ProviderClient); init(namespace: string, appId: string, engineId: string, logger: ILogger): Promise<void>; transact(): ProviderTransaction; mintKey(type: KeyType, params: KeyStoreParams): string; mintSafeKey(type: KeyType, params: KeyStoreParams): [string, string]; subscribe(keyType: KeyType.QUORUM, callback: SubscriptionCallback, appId: string, topic?: string): Promise<void>; unsubscribe(keyType: KeyType.QUORUM, appId: string, topic?: string): Promise<void>; publish(keyType: KeyType.QUORUM, message: Record<string, any>, appId: string, topic?: string): Promise<boolean>; psubscribe(): Promise<void>; punsubscribe(): Promise<void>; } export { PostgresSubService };