import type { RetryConfig, S2RequestOptions } from "./common.js"; import type { Client } from "./generated/client/types.gen.js"; import type * as Types from "./types.js"; /** * Basin-scoped helper for listing and configuring streams. * * Access via {@link S2Basin.streams}. Methods inherit the basin's retry configuration. */ export declare class S2Streams { private readonly client; private readonly retryConfig?; constructor(client: Client, retryConfig?: RetryConfig); /** * List streams in the basin. * * @param args.prefix Return streams whose names start with the given prefix * @param args.startAfter Name to start after (for pagination) * @param args.limit Max results (up to 1000) */ list(args?: Types.ListStreamsInput, options?: S2RequestOptions): Promise; /** * List all streams in the basin with automatic pagination. * Returns a lazy async iterable that fetches pages as needed. * * @param args - Optional options: `prefix` to filter by name prefix, `limit` for max results per page, `includeDeleted` to include streams pending deletion * * @example * ```ts * for await (const stream of basin.streams.listAll({ prefix: "events-" })) { * console.log(stream.name); * } * ``` */ listAll(args?: Types.ListAllStreamsInput, options?: S2RequestOptions): AsyncIterable; /** * Create a stream. * * @param args.stream Stream name (1-512 bytes, unique within the basin) * @param args.config Stream configuration (retentionPolicy, storageClass, timestamping, deleteOnEmpty) */ create(args: Types.CreateStreamInput, options?: S2RequestOptions): Promise; /** * Get stream configuration. * * @param args.stream Stream name */ getConfig(args: Types.GetStreamConfigInput, options?: S2RequestOptions): Promise; /** * Delete a stream. * * @param args.stream Stream name */ delete(args: Types.DeleteStreamInput, options?: S2RequestOptions): Promise; /** * Ensure a stream. * * Creates the stream if it doesn't exist, or ensures its config exactly matches the provided * configuration after basin defaults and global defaults are applied. Uses HTTP PUT semantics * and is always idempotent. * * Returns `result: "created"` with the stream info if the stream was newly created, * `result: "updated"` if its config changed, or `result: "noop"` if no write was needed. */ ensure(args: Types.EnsureStreamInput, options?: S2RequestOptions): Promise; /** * Reconfigure a stream. * * @param args Configuration for the stream to reconfigure (including stream name and fields to change) */ reconfigure(args: Types.ReconfigureStreamInput, options?: S2RequestOptions): Promise; } //# sourceMappingURL=streams.d.ts.map