/** * High-level worker credential lifecycle management. * * Creates an admin client from a connection config, delegates to the * low-level Postgres credential functions, and cleans up the client. * This is the canonical API — `HotMesh` and `Durable` re-export these * as static convenience methods. */ import type { WorkerCredential, WorkerCredentialInfo } from '../stream/providers/postgres/credentials'; import { ProviderConfig, ProvidersConfig } from '../../types/provider'; /** * Provision a scoped Postgres role for a worker router. * * The role can only dequeue/ack/respond on the specified stream * names via SECURITY DEFINER stored procedures — it has **zero * direct table access**. */ export declare function provisionWorkerRole(config: { connection: ProviderConfig | ProvidersConfig; namespace?: string; streamNames: string[]; password?: string; }): Promise; /** * Rotate the password for an existing worker role. */ export declare function rotateWorkerPassword(config: { connection: ProviderConfig | ProvidersConfig; namespace?: string; roleName: string; newPassword?: string; }): Promise<{ password: string; }>; /** * Revoke a worker role by disabling login. The role is not dropped, * preserving the audit trail in the `worker_credentials` table. */ export declare function revokeWorkerRole(config: { connection: ProviderConfig | ProvidersConfig; namespace?: string; roleName: string; }): Promise; /** * List all provisioned worker roles for a namespace. */ export declare function listWorkerRoles(config: { connection: ProviderConfig | ProvidersConfig; namespace?: string; }): Promise; export type { WorkerCredential, WorkerCredentialInfo };