Update APIs

This commit is contained in:
Eric Bailey
2025-05-25 13:05:32 -05:00
parent da4afb78d0
commit ef3baf8368
6 changed files with 42 additions and 73 deletions
-15
View File
@@ -1,5 +1,4 @@
import {
APP_BSKY_UNSPECCED,
type AppBskyFeedDefs,
AppBskyFeedPost,
AppBskyFeedThreadgate,
@@ -7,22 +6,8 @@ import {
AtUri,
} from '@atproto/api'
import {type PostThreadParams} from '#/state/queries/usePostThread/types'
import * as bsky from '#/types/bsky'
export function mapSortOptionsToSortID(sort: PostThreadParams['sort']) {
switch (sort) {
case 'top':
return APP_BSKY_UNSPECCED.GetPostThreadV2Top
case 'oldest':
return APP_BSKY_UNSPECCED.GetPostThreadV2Oldest
case 'newest':
return APP_BSKY_UNSPECCED.GetPostThreadV2Newest
default:
return APP_BSKY_UNSPECCED.GetPostThreadV2Top
}
}
export function getThreadgateRecord(
view: AppBskyUnspeccedGetPostThreadV2.OutputSchema['threadgate'],
) {