Reference
How the reference works
Reference pages for every public entry point of the @streamsy packages.
The guides show how to use Streamsy. The reference describes each public export of @streamsy/core, @streamsy/projection, @streamsy/storage, and @streamsy/serve, organised by package and topic.
@streamsy/core
| Page | Entry point | Exports |
|---|---|---|
| Streamsy | @streamsy/core | The stream class factories, group, Wildcard, and the class types |
| Wake streams | @streamsy/core | Streamsy.wake, followWake, wakeActions, and the wake types |
| StreamAddress | @streamsy/core | The addresses, the collections, and the State changes and control messages |
| Producer | @streamsy/core | Producer.next and Producer.Position |
| DurableState | @streamsy/core | upsert, remove, changes, materialized, materialize, and their types |
| Options and results | @streamsy/core | The options of create, append, and read, and their results |
| Toolkit types | @streamsy/core | Batch, the fold and decide types, and the failure unions |
| Errors | @streamsy/core | The protocol errors, the error unions, and isProtocolError |
| Faults | @streamsy/core | The storage, transport, and codec faults, and their guards |
| Ids and offsets | @streamsy/core | StreamId, Offset, ProducerId, ZERO_OFFSET, and compare |
| Storage contract | @streamsy/core | Storage, StorageCapabilities, CommitBoundary, the mutations, and their results |
| MemoryStorage | @streamsy/core | MemoryStorage.layer, layerProtocol, and Options |
| Stream records | @streamsy/core | StreamRecord, StoredMessage, RecordPatch, and the other stored values |
| Http | @streamsy/core, @streamsy/core/http | Http.routes, Http.app, Http.read, and the shutdown signal |
| RemoteStreams | @streamsy/core/remote | RemoteStreams.layer, layerProtocol, Options, and TransportFault |
| Protocol | @streamsy/core/protocol | Protocol, StreamsReader, StreamsWriter, Reader, Writer, and routes |
| Streams | @streamsy/core/protocol | The Streams functions on an address, and their options, results, and failures |
| StreamRoute | @streamsy/core/protocol | The route functions and types |
| Testing | @streamsy/core/testing | StorageContract, faultyStorage, layerTest, StreamsTest, and expectFailureTag |
@streamsy/projection
| Page | Entry point | Exports |
|---|---|---|
| Projection constructors | @streamsy/projection | Projection.fold, process, emit, mapAccum, mapAccumBatch, and wake |
| Projection runners | @streamsy/projection | The runners, the reads, the helpers, and ProjectionWakeup |
| Declarations and state | @streamsy/projection | Declaration, CurrentProjection, DecideSpec, and the state and step types |
| Units and progress | @streamsy/projection | Slice, Entry, Unit, Range, the results, and the runner options |
| Commit | @streamsy/projection | The Commit namespace, the handler results, HandlerFailed, and Transaction |
| CheckpointStore | @streamsy/projection, @streamsy/projection/checkpoint | CheckpointStore, CheckpointRecord, fromStore, recordKey, and the key types |
| Faults and retry | @streamsy/projection | ProjectionFault and ProjectionRetry |
@streamsy/storage
| Page | Entry point | Exports |
|---|---|---|
| SqlStorage | @streamsy/storage | SqlStorage.layer, layerProtocol, clientLayer, Options, and the defaults |
| BunStorage | @streamsy/storage/bun | BunStorage.layer, layerProtocol, and Options |
| DurableObjectStorage | @streamsy/storage/durable-object | DurableObjectStorage.layer, layerProtocol, Options, and the default long-poll timeout |
@streamsy/serve
| Page | Entry point | Exports |
|---|---|---|
| Serve | @streamsy/serve | The route and response functions, layer, teardown, and their options |
| Serve errors | @streamsy/serve | The Serve error classes, ServeError, and PublicErrorSchema |
| Contract | @streamsy/serve/contract | Canonical JSON, fingerprints and ETags, header names, and public error bodies |
| Bun | @streamsy/serve/bun | The Bun listener, its options, and its defaults |
| Node | @streamsy/serve/node | The Node listener, its options, and its defaults |
| Deno | @streamsy/serve/deno | The Deno listener, its options and defaults, and nodeSqliteCompat |
| Cloudflare | @streamsy/serve/cloudflare | Worker routing, Durable Object hosts, placement, wakeups, and object links |
| Alchemy | @streamsy/serve/alchemy | Effect routing, object transports, handlers, and the shared Cloudflare exports |