atproto
atproto copied to clipboard
Missing types for PostView.Record in @atproto/api
Interface for PostView
has an empty object as the properties on record
.
Closest type I can find is this? https://github.com/bluesky-social/atproto/blob/0b70f50eb44bf6a936115f0e24690a42585b69a6/packages/api/src/client/types/app/bsky/feed/post.ts#L15-L29 but seems it's for creating records not viewing them
I'm struggling with this also.
Reading https://github.com/bluesky-social/atproto/issues/999#issuecomment-1538905166 though it seems like this is mostly on purpose. It's down to the application to validate and narrow this object to something more specific. It should really be typed as Record<string, unknown>
though.
Yes that should probably be an open union with a ref to app.bsky.feed.post
See my comment here as well: https://github.com/bluesky-social/atproto/issues/999#issuecomment-1577769209