import type { END, START } from "../../constants"; /** * Represents an access control list for a stream. */ export interface StreamACL { /** * Roles and users permitted to read the stream. */ readRoles?: string[]; /** * Roles and users permitted to write to the stream. */ writeRoles?: string[]; /** * Roles and users permitted to delete the stream. */ deleteRoles?: string[]; /** * Roles and users permitted to read stream metadata. */ metaReadRoles?: string[]; /** * Roles and users permitted to write stream metadata. */ metaWriteRoles?: string[]; } export interface SystemStreamMetadata { /** * The optional maximum age (in seconds) of events allowed in the stream. */ maxAge?: number; /** * The optional streamPositon from which previous events can be scavenged. * This is used to implement soft-deletion of streams. */ truncateBefore?: typeof START | typeof END | number; /** * The optional amount of time (in seconds) for which the stream head is cacheable. */ cacheControl?: number; /** * The optional ACL for the stream. */ acl?: StreamACL; /** * The optional maximum number of events allowed in the stream. */ maxCount?: number; } export type CustomStreamMetadata = Record; export type StreamMetadata = SystemStreamMetadata & CustomMetadata; export declare const prepareStreamMetadata: (metadata: StreamMetadata) => Record; export declare const readStreamMetadata: (metadata: Record) => StreamMetadata;