Skip to content

eric-wien/jetstream-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@vinerima/jetstream-types

Shared Zod schemas and TypeScript types for Bluesky Jetstream events.

Installation

npm install @vinerima/jetstream-types

Requires zod v4 as a peer dependency.

Usage

import { jetstreamPostCreateSchema, jetstreamToPost } from "@vinerima/jetstream-types";

// Validate a raw Jetstream WebSocket message
const parsed = jetstreamPostCreateSchema.parse(rawMessage);

// Convert to a flat Post object
const post = jetstreamToPost(parsed);

Exports

  • jetstreamPostCreateSchema — Zod schema for app.bsky.feed.post create events
  • JetstreamPostCreate — TypeScript type inferred from the schema
  • jetstreamToPost(msg) — Converts a Jetstream event into a flat Post object
  • Post — Interface with uri, cid, authorDid, text, rootUri, rootCid

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors