@atproto/pds 0.4.20 → 0.4.22
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +15 -0
- package/dist/api/app/bsky/actor/index.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/index.js +0 -6
- package/dist/api/app/bsky/actor/index.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +1 -3
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/index.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/index.js +0 -20
- package/dist/api/app/bsky/feed/index.js.map +1 -1
- package/dist/api/app/bsky/index.d.ts.map +1 -1
- package/dist/api/app/bsky/index.js +0 -6
- package/dist/api/app/bsky/index.js.map +1 -1
- package/dist/api/app/bsky/notification/index.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/index.js +0 -6
- package/dist/api/app/bsky/notification/index.js.map +1 -1
- package/dist/api/com/atproto/index.d.ts.map +1 -1
- package/dist/api/com/atproto/index.js +0 -2
- package/dist/api/com/atproto/index.js.map +1 -1
- package/dist/api/com/atproto/repo/getRecord.js +1 -1
- package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +1 -1
- package/dist/context.d.ts +3 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +30 -0
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -45
- package/dist/index.js.map +1 -1
- package/dist/lexicon/index.d.ts +59 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +164 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +907 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +932 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +7 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +11 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/chat/bsky/actor/declaration.d.ts +11 -0
- package/dist/lexicon/types/chat/bsky/actor/declaration.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/declaration.js +17 -0
- package/dist/lexicon/types/chat/bsky/actor/declaration.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/defs.d.ts +21 -0
- package/dist/lexicon/types/chat/bsky/actor/defs.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/defs.js +16 -0
- package/dist/lexicon/types/chat/bsky/actor/defs.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/deleteAccount.d.ts +33 -0
- package/dist/lexicon/types/chat/bsky/actor/deleteAccount.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/deleteAccount.js +3 -0
- package/dist/lexicon/types/chat/bsky/actor/deleteAccount.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/exportAccountData.d.ts +32 -0
- package/dist/lexicon/types/chat/bsky/actor/exportAccountData.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/actor/exportAccountData.js +3 -0
- package/dist/lexicon/types/chat/bsky/actor/exportAccountData.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts +109 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.js +106 -0
- package/dist/lexicon/types/chat/bsky/convo/defs.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/deleteMessageForSelf.d.ts +39 -0
- package/dist/lexicon/types/chat/bsky/convo/deleteMessageForSelf.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/deleteMessageForSelf.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/deleteMessageForSelf.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvo.d.ts +36 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvo.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.d.ts +36 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/getConvoForMembers.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts +40 -0
- package/dist/lexicon/types/chat/bsky/convo/getLog.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getLog.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/getLog.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getMessages.d.ts +42 -0
- package/dist/lexicon/types/chat/bsky/convo/getMessages.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/getMessages.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/getMessages.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/leaveConvo.d.ts +41 -0
- package/dist/lexicon/types/chat/bsky/convo/leaveConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/leaveConvo.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/leaveConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/listConvos.d.ts +38 -0
- package/dist/lexicon/types/chat/bsky/convo/listConvos.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/listConvos.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/listConvos.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/muteConvo.d.ts +41 -0
- package/dist/lexicon/types/chat/bsky/convo/muteConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/muteConvo.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/muteConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessage.d.ts +39 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessage.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessage.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessage.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessageBatch.d.ts +49 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessageBatch.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessageBatch.js +16 -0
- package/dist/lexicon/types/chat/bsky/convo/sendMessageBatch.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/unmuteConvo.d.ts +41 -0
- package/dist/lexicon/types/chat/bsky/convo/unmuteConvo.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/unmuteConvo.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/unmuteConvo.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/updateRead.d.ts +42 -0
- package/dist/lexicon/types/chat/bsky/convo/updateRead.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/convo/updateRead.js +3 -0
- package/dist/lexicon/types/chat/bsky/convo/updateRead.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getActorMetadata.d.ts +47 -0
- package/dist/lexicon/types/chat/bsky/moderation/getActorMetadata.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getActorMetadata.js +16 -0
- package/dist/lexicon/types/chat/bsky/moderation/getActorMetadata.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getMessageContext.d.ts +41 -0
- package/dist/lexicon/types/chat/bsky/moderation/getMessageContext.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/getMessageContext.js +3 -0
- package/dist/lexicon/types/chat/bsky/moderation/getMessageContext.js.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/updateActorAccess.d.ts +31 -0
- package/dist/lexicon/types/chat/bsky/moderation/updateActorAccess.d.ts.map +1 -0
- package/dist/lexicon/types/chat/bsky/moderation/updateActorAccess.js +3 -0
- package/dist/lexicon/types/chat/bsky/moderation/updateActorAccess.js.map +1 -0
- package/dist/pipethrough.d.ts +12 -22
- package/dist/pipethrough.d.ts.map +1 -1
- package/dist/pipethrough.js +159 -81
- package/dist/pipethrough.js.map +1 -1
- package/package.json +5 -5
- package/src/api/app/bsky/actor/index.ts +0 -6
- package/src/api/app/bsky/feed/getFeed.ts +1 -3
- package/src/api/app/bsky/feed/index.ts +0 -20
- package/src/api/app/bsky/index.ts +0 -6
- package/src/api/app/bsky/notification/index.ts +0 -7
- package/src/api/com/atproto/index.ts +0 -2
- package/src/api/com/atproto/repo/getRecord.ts +1 -1
- package/src/api/index.ts +0 -2
- package/src/context.ts +34 -1
- package/src/index.ts +27 -51
- package/src/lexicon/index.ts +254 -0
- package/src/lexicon/lexicons.ts +933 -0
- package/src/lexicon/types/app/bsky/actor/defs.ts +20 -0
- package/src/lexicon/types/chat/bsky/actor/declaration.ts +25 -0
- package/src/lexicon/types/chat/bsky/actor/defs.ts +34 -0
- package/src/lexicon/types/chat/bsky/actor/deleteAccount.ts +42 -0
- package/src/lexicon/types/chat/bsky/actor/exportAccountData.ts +38 -0
- package/src/lexicon/types/chat/bsky/convo/defs.ts +215 -0
- package/src/lexicon/types/chat/bsky/convo/deleteMessageForSelf.ts +48 -0
- package/src/lexicon/types/chat/bsky/convo/getConvo.ts +46 -0
- package/src/lexicon/types/chat/bsky/convo/getConvoForMembers.ts +46 -0
- package/src/lexicon/types/chat/bsky/convo/getLog.ts +53 -0
- package/src/lexicon/types/chat/bsky/convo/getMessages.ts +53 -0
- package/src/lexicon/types/chat/bsky/convo/leaveConvo.ts +50 -0
- package/src/lexicon/types/chat/bsky/convo/listConvos.ts +48 -0
- package/src/lexicon/types/chat/bsky/convo/muteConvo.ts +50 -0
- package/src/lexicon/types/chat/bsky/convo/sendMessage.ts +48 -0
- package/src/lexicon/types/chat/bsky/convo/sendMessageBatch.ts +68 -0
- package/src/lexicon/types/chat/bsky/convo/unmuteConvo.ts +50 -0
- package/src/lexicon/types/chat/bsky/convo/updateRead.ts +51 -0
- package/src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts +67 -0
- package/src/lexicon/types/chat/bsky/moderation/getMessageContext.ts +52 -0
- package/src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts +40 -0
- package/src/pipethrough.ts +184 -114
- package/dist/api/app/bsky/actor/getSuggestions.d.ts +0 -4
- package/dist/api/app/bsky/actor/getSuggestions.d.ts.map +0 -1
- package/dist/api/app/bsky/actor/getSuggestions.js +0 -19
- package/dist/api/app/bsky/actor/getSuggestions.js.map +0 -1
- package/dist/api/app/bsky/actor/searchActors.d.ts +0 -4
- package/dist/api/app/bsky/actor/searchActors.d.ts.map +0 -1
- package/dist/api/app/bsky/actor/searchActors.js +0 -17
- package/dist/api/app/bsky/actor/searchActors.js.map +0 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts +0 -4
- package/dist/api/app/bsky/actor/searchActorsTypeahead.d.ts.map +0 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js +0 -17
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +0 -1
- package/dist/api/app/bsky/feed/getActorFeeds.d.ts +0 -4
- package/dist/api/app/bsky/feed/getActorFeeds.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getActorFeeds.js +0 -17
- package/dist/api/app/bsky/feed/getActorFeeds.js.map +0 -1
- package/dist/api/app/bsky/feed/getFeedGenerator.d.ts +0 -4
- package/dist/api/app/bsky/feed/getFeedGenerator.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getFeedGenerator.js +0 -17
- package/dist/api/app/bsky/feed/getFeedGenerator.js.map +0 -1
- package/dist/api/app/bsky/feed/getFeedGenerators.d.ts +0 -4
- package/dist/api/app/bsky/feed/getFeedGenerators.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getFeedGenerators.js +0 -17
- package/dist/api/app/bsky/feed/getFeedGenerators.js.map +0 -1
- package/dist/api/app/bsky/feed/getLikes.d.ts +0 -4
- package/dist/api/app/bsky/feed/getLikes.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getLikes.js +0 -17
- package/dist/api/app/bsky/feed/getLikes.js.map +0 -1
- package/dist/api/app/bsky/feed/getListFeed.d.ts +0 -4
- package/dist/api/app/bsky/feed/getListFeed.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getListFeed.js +0 -17
- package/dist/api/app/bsky/feed/getListFeed.js.map +0 -1
- package/dist/api/app/bsky/feed/getPosts.d.ts +0 -4
- package/dist/api/app/bsky/feed/getPosts.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getPosts.js +0 -17
- package/dist/api/app/bsky/feed/getPosts.js.map +0 -1
- package/dist/api/app/bsky/feed/getRepostedBy.d.ts +0 -4
- package/dist/api/app/bsky/feed/getRepostedBy.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getRepostedBy.js +0 -17
- package/dist/api/app/bsky/feed/getRepostedBy.js.map +0 -1
- package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts +0 -4
- package/dist/api/app/bsky/feed/getSuggestedFeeds.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/getSuggestedFeeds.js +0 -17
- package/dist/api/app/bsky/feed/getSuggestedFeeds.js.map +0 -1
- package/dist/api/app/bsky/feed/searchPosts.d.ts +0 -4
- package/dist/api/app/bsky/feed/searchPosts.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/searchPosts.js +0 -17
- package/dist/api/app/bsky/feed/searchPosts.js.map +0 -1
- package/dist/api/app/bsky/feed/sendInteractions.d.ts +0 -4
- package/dist/api/app/bsky/feed/sendInteractions.d.ts.map +0 -1
- package/dist/api/app/bsky/feed/sendInteractions.js +0 -14
- package/dist/api/app/bsky/feed/sendInteractions.js.map +0 -1
- package/dist/api/app/bsky/graph/getBlocks.d.ts +0 -4
- package/dist/api/app/bsky/graph/getBlocks.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getBlocks.js +0 -17
- package/dist/api/app/bsky/graph/getBlocks.js.map +0 -1
- package/dist/api/app/bsky/graph/getFollowers.d.ts +0 -4
- package/dist/api/app/bsky/graph/getFollowers.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getFollowers.js +0 -17
- package/dist/api/app/bsky/graph/getFollowers.js.map +0 -1
- package/dist/api/app/bsky/graph/getFollows.d.ts +0 -4
- package/dist/api/app/bsky/graph/getFollows.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getFollows.js +0 -17
- package/dist/api/app/bsky/graph/getFollows.js.map +0 -1
- package/dist/api/app/bsky/graph/getList.d.ts +0 -4
- package/dist/api/app/bsky/graph/getList.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getList.js +0 -17
- package/dist/api/app/bsky/graph/getList.js.map +0 -1
- package/dist/api/app/bsky/graph/getListBlocks.d.ts +0 -4
- package/dist/api/app/bsky/graph/getListBlocks.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getListBlocks.js +0 -17
- package/dist/api/app/bsky/graph/getListBlocks.js.map +0 -1
- package/dist/api/app/bsky/graph/getListMutes.d.ts +0 -4
- package/dist/api/app/bsky/graph/getListMutes.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getListMutes.js +0 -17
- package/dist/api/app/bsky/graph/getListMutes.js.map +0 -1
- package/dist/api/app/bsky/graph/getLists.d.ts +0 -4
- package/dist/api/app/bsky/graph/getLists.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getLists.js +0 -17
- package/dist/api/app/bsky/graph/getLists.js.map +0 -1
- package/dist/api/app/bsky/graph/getMutes.d.ts +0 -4
- package/dist/api/app/bsky/graph/getMutes.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getMutes.js +0 -17
- package/dist/api/app/bsky/graph/getMutes.js.map +0 -1
- package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts +0 -4
- package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.js +0 -17
- package/dist/api/app/bsky/graph/getSuggestedFollowsByActor.js.map +0 -1
- package/dist/api/app/bsky/graph/index.d.ts +0 -4
- package/dist/api/app/bsky/graph/index.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/index.js +0 -35
- package/dist/api/app/bsky/graph/index.js.map +0 -1
- package/dist/api/app/bsky/graph/muteActor.d.ts +0 -4
- package/dist/api/app/bsky/graph/muteActor.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/muteActor.js +0 -14
- package/dist/api/app/bsky/graph/muteActor.js.map +0 -1
- package/dist/api/app/bsky/graph/muteActorList.d.ts +0 -4
- package/dist/api/app/bsky/graph/muteActorList.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/muteActorList.js +0 -14
- package/dist/api/app/bsky/graph/muteActorList.js.map +0 -1
- package/dist/api/app/bsky/graph/unmuteActor.d.ts +0 -4
- package/dist/api/app/bsky/graph/unmuteActor.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/unmuteActor.js +0 -14
- package/dist/api/app/bsky/graph/unmuteActor.js.map +0 -1
- package/dist/api/app/bsky/graph/unmuteActorList.d.ts +0 -4
- package/dist/api/app/bsky/graph/unmuteActorList.d.ts.map +0 -1
- package/dist/api/app/bsky/graph/unmuteActorList.js +0 -14
- package/dist/api/app/bsky/graph/unmuteActorList.js.map +0 -1
- package/dist/api/app/bsky/labeler/getServices.d.ts +0 -4
- package/dist/api/app/bsky/labeler/getServices.d.ts.map +0 -1
- package/dist/api/app/bsky/labeler/getServices.js +0 -14
- package/dist/api/app/bsky/labeler/getServices.js.map +0 -1
- package/dist/api/app/bsky/labeler/index.d.ts +0 -4
- package/dist/api/app/bsky/labeler/index.d.ts.map +0 -1
- package/dist/api/app/bsky/labeler/index.js +0 -11
- package/dist/api/app/bsky/labeler/index.js.map +0 -1
- package/dist/api/app/bsky/notification/getUnreadCount.d.ts +0 -4
- package/dist/api/app/bsky/notification/getUnreadCount.d.ts.map +0 -1
- package/dist/api/app/bsky/notification/getUnreadCount.js +0 -17
- package/dist/api/app/bsky/notification/getUnreadCount.js.map +0 -1
- package/dist/api/app/bsky/notification/listNotifications.d.ts +0 -4
- package/dist/api/app/bsky/notification/listNotifications.d.ts.map +0 -1
- package/dist/api/app/bsky/notification/listNotifications.js +0 -17
- package/dist/api/app/bsky/notification/listNotifications.js.map +0 -1
- package/dist/api/app/bsky/notification/updateSeen.d.ts +0 -4
- package/dist/api/app/bsky/notification/updateSeen.d.ts.map +0 -1
- package/dist/api/app/bsky/notification/updateSeen.js +0 -14
- package/dist/api/app/bsky/notification/updateSeen.js.map +0 -1
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts +0 -4
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.d.ts.map +0 -1
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js +0 -18
- package/dist/api/app/bsky/unspecced/getPopularFeedGenerators.js.map +0 -1
- package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts +0 -4
- package/dist/api/app/bsky/unspecced/getTaggedSuggestions.d.ts.map +0 -1
- package/dist/api/app/bsky/unspecced/getTaggedSuggestions.js +0 -18
- package/dist/api/app/bsky/unspecced/getTaggedSuggestions.js.map +0 -1
- package/dist/api/app/bsky/unspecced/index.d.ts +0 -4
- package/dist/api/app/bsky/unspecced/index.d.ts.map +0 -1
- package/dist/api/app/bsky/unspecced/index.js +0 -14
- package/dist/api/app/bsky/unspecced/index.js.map +0 -1
- package/dist/api/com/atproto/moderation/createReport.d.ts +0 -4
- package/dist/api/com/atproto/moderation/createReport.d.ts.map +0 -1
- package/dist/api/com/atproto/moderation/createReport.js +0 -14
- package/dist/api/com/atproto/moderation/createReport.js.map +0 -1
- package/dist/api/com/atproto/moderation/index.d.ts +0 -4
- package/dist/api/com/atproto/moderation/index.d.ts.map +0 -1
- package/dist/api/com/atproto/moderation/index.js +0 -11
- package/dist/api/com/atproto/moderation/index.js.map +0 -1
- package/dist/api/tools/ozone/communication/createTemplate.d.ts +0 -4
- package/dist/api/tools/ozone/communication/createTemplate.d.ts.map +0 -1
- package/dist/api/tools/ozone/communication/createTemplate.js +0 -14
- package/dist/api/tools/ozone/communication/createTemplate.js.map +0 -1
- package/dist/api/tools/ozone/communication/deleteTemplate.d.ts +0 -4
- package/dist/api/tools/ozone/communication/deleteTemplate.d.ts.map +0 -1
- package/dist/api/tools/ozone/communication/deleteTemplate.js +0 -14
- package/dist/api/tools/ozone/communication/deleteTemplate.js.map +0 -1
- package/dist/api/tools/ozone/communication/index.d.ts +0 -4
- package/dist/api/tools/ozone/communication/index.d.ts.map +0 -1
- package/dist/api/tools/ozone/communication/index.js +0 -17
- package/dist/api/tools/ozone/communication/index.js.map +0 -1
- package/dist/api/tools/ozone/communication/listTemplates.d.ts +0 -4
- package/dist/api/tools/ozone/communication/listTemplates.d.ts.map +0 -1
- package/dist/api/tools/ozone/communication/listTemplates.js +0 -14
- package/dist/api/tools/ozone/communication/listTemplates.js.map +0 -1
- package/dist/api/tools/ozone/communication/updateTemplate.d.ts +0 -4
- package/dist/api/tools/ozone/communication/updateTemplate.d.ts.map +0 -1
- package/dist/api/tools/ozone/communication/updateTemplate.js +0 -14
- package/dist/api/tools/ozone/communication/updateTemplate.js.map +0 -1
- package/dist/api/tools/ozone/index.d.ts +0 -4
- package/dist/api/tools/ozone/index.d.ts.map +0 -1
- package/dist/api/tools/ozone/index.js +0 -13
- package/dist/api/tools/ozone/index.js.map +0 -1
- package/dist/api/tools/ozone/moderation/emitEvent.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/emitEvent.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/emitEvent.js +0 -14
- package/dist/api/tools/ozone/moderation/emitEvent.js.map +0 -1
- package/dist/api/tools/ozone/moderation/getEvent.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/getEvent.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/getEvent.js +0 -14
- package/dist/api/tools/ozone/moderation/getEvent.js.map +0 -1
- package/dist/api/tools/ozone/moderation/getRecord.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/getRecord.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/getRecord.js +0 -14
- package/dist/api/tools/ozone/moderation/getRecord.js.map +0 -1
- package/dist/api/tools/ozone/moderation/getRepo.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/getRepo.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/getRepo.js +0 -14
- package/dist/api/tools/ozone/moderation/getRepo.js.map +0 -1
- package/dist/api/tools/ozone/moderation/index.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/index.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/index.js +0 -23
- package/dist/api/tools/ozone/moderation/index.js.map +0 -1
- package/dist/api/tools/ozone/moderation/queryEvents.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/queryEvents.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/queryEvents.js +0 -14
- package/dist/api/tools/ozone/moderation/queryEvents.js.map +0 -1
- package/dist/api/tools/ozone/moderation/queryStatuses.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/queryStatuses.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/queryStatuses.js +0 -14
- package/dist/api/tools/ozone/moderation/queryStatuses.js.map +0 -1
- package/dist/api/tools/ozone/moderation/searchRepos.d.ts +0 -4
- package/dist/api/tools/ozone/moderation/searchRepos.d.ts.map +0 -1
- package/dist/api/tools/ozone/moderation/searchRepos.js +0 -14
- package/dist/api/tools/ozone/moderation/searchRepos.js.map +0 -1
- package/src/api/app/bsky/actor/getSuggestions.ts +0 -17
- package/src/api/app/bsky/actor/searchActors.ts +0 -15
- package/src/api/app/bsky/actor/searchActorsTypeahead.ts +0 -15
- package/src/api/app/bsky/feed/getActorFeeds.ts +0 -15
- package/src/api/app/bsky/feed/getFeedGenerator.ts +0 -15
- package/src/api/app/bsky/feed/getFeedGenerators.ts +0 -15
- package/src/api/app/bsky/feed/getLikes.ts +0 -15
- package/src/api/app/bsky/feed/getListFeed.ts +0 -15
- package/src/api/app/bsky/feed/getPosts.ts +0 -15
- package/src/api/app/bsky/feed/getRepostedBy.ts +0 -15
- package/src/api/app/bsky/feed/getSuggestedFeeds.ts +0 -15
- package/src/api/app/bsky/feed/searchPosts.ts +0 -15
- package/src/api/app/bsky/feed/sendInteractions.ts +0 -13
- package/src/api/app/bsky/graph/getBlocks.ts +0 -15
- package/src/api/app/bsky/graph/getFollowers.ts +0 -15
- package/src/api/app/bsky/graph/getFollows.ts +0 -15
- package/src/api/app/bsky/graph/getList.ts +0 -15
- package/src/api/app/bsky/graph/getListBlocks.ts +0 -15
- package/src/api/app/bsky/graph/getListMutes.ts +0 -15
- package/src/api/app/bsky/graph/getLists.ts +0 -15
- package/src/api/app/bsky/graph/getMutes.ts +0 -15
- package/src/api/app/bsky/graph/getSuggestedFollowsByActor.ts +0 -15
- package/src/api/app/bsky/graph/index.ts +0 -31
- package/src/api/app/bsky/graph/muteActor.ts +0 -13
- package/src/api/app/bsky/graph/muteActorList.ts +0 -13
- package/src/api/app/bsky/graph/unmuteActor.ts +0 -13
- package/src/api/app/bsky/graph/unmuteActorList.ts +0 -13
- package/src/api/app/bsky/labeler/getServices.ts +0 -13
- package/src/api/app/bsky/labeler/index.ts +0 -7
- package/src/api/app/bsky/notification/getUnreadCount.ts +0 -15
- package/src/api/app/bsky/notification/listNotifications.ts +0 -15
- package/src/api/app/bsky/notification/updateSeen.ts +0 -13
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +0 -16
- package/src/api/app/bsky/unspecced/getTaggedSuggestions.ts +0 -16
- package/src/api/app/bsky/unspecced/index.ts +0 -10
- package/src/api/com/atproto/moderation/createReport.ts +0 -13
- package/src/api/com/atproto/moderation/index.ts +0 -7
- package/src/api/tools/ozone/communication/createTemplate.ts +0 -13
- package/src/api/tools/ozone/communication/deleteTemplate.ts +0 -13
- package/src/api/tools/ozone/communication/index.ts +0 -13
- package/src/api/tools/ozone/communication/listTemplates.ts +0 -13
- package/src/api/tools/ozone/communication/updateTemplate.ts +0 -13
- package/src/api/tools/ozone/index.ts +0 -9
- package/src/api/tools/ozone/moderation/emitEvent.ts +0 -13
- package/src/api/tools/ozone/moderation/getEvent.ts +0 -13
- package/src/api/tools/ozone/moderation/getRecord.ts +0 -13
- package/src/api/tools/ozone/moderation/getRepo.ts +0 -13
- package/src/api/tools/ozone/moderation/index.ts +0 -19
- package/src/api/tools/ozone/moderation/queryEvents.ts +0 -13
- package/src/api/tools/ozone/moderation/queryStatuses.ts +0 -13
- package/src/api/tools/ozone/moderation/searchRepos.ts +0 -13
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.validateMetadata = exports.isMetadata = void 0;
|
4
|
+
const lexicons_1 = require("../../../../lexicons");
|
5
|
+
const util_1 = require("../../../../util");
|
6
|
+
function isMetadata(v) {
|
7
|
+
return ((0, util_1.isObj)(v) &&
|
8
|
+
(0, util_1.hasProp)(v, '$type') &&
|
9
|
+
v.$type === 'chat.bsky.moderation.getActorMetadata#metadata');
|
10
|
+
}
|
11
|
+
exports.isMetadata = isMetadata;
|
12
|
+
function validateMetadata(v) {
|
13
|
+
return lexicons_1.lexicons.validate('chat.bsky.moderation.getActorMetadata#metadata', v);
|
14
|
+
}
|
15
|
+
exports.validateMetadata = validateMetadata;
|
16
|
+
//# sourceMappingURL=getActorMetadata.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getActorMetadata.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/moderation/getActorMetadata.ts"],"names":[],"mappings":";;;AAKA,mDAA+C;AAC/C,2CAAiD;AAkDjD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,KAAK,KAAK,gDAAgD,CAC7D,CAAA;AACH,CAAC;AAND,gCAMC;AAED,SAAgB,gBAAgB,CAAC,CAAU;IACzC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,gDAAgD,EAAE,CAAC,CAAC,CAAA;AAC/E,CAAC;AAFD,4CAEC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express';
|
5
|
+
import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
|
6
|
+
import * as ChatBskyConvoDefs from '../convo/defs';
|
7
|
+
export interface QueryParams {
|
8
|
+
messageId: string;
|
9
|
+
before: number;
|
10
|
+
after: number;
|
11
|
+
}
|
12
|
+
export type InputSchema = undefined;
|
13
|
+
export interface OutputSchema {
|
14
|
+
messages: (ChatBskyConvoDefs.MessageView | ChatBskyConvoDefs.DeletedMessageView | {
|
15
|
+
$type: string;
|
16
|
+
[k: string]: unknown;
|
17
|
+
})[];
|
18
|
+
[k: string]: unknown;
|
19
|
+
}
|
20
|
+
export type HandlerInput = undefined;
|
21
|
+
export interface HandlerSuccess {
|
22
|
+
encoding: 'application/json';
|
23
|
+
body: OutputSchema;
|
24
|
+
headers?: {
|
25
|
+
[key: string]: string;
|
26
|
+
};
|
27
|
+
}
|
28
|
+
export interface HandlerError {
|
29
|
+
status: number;
|
30
|
+
message?: string;
|
31
|
+
}
|
32
|
+
export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
|
33
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
34
|
+
auth: HA;
|
35
|
+
params: QueryParams;
|
36
|
+
input: HandlerInput;
|
37
|
+
req: express.Request;
|
38
|
+
res: express.Response;
|
39
|
+
};
|
40
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
41
|
+
//# sourceMappingURL=getMessageContext.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getMessageContext.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/moderation/getMessageContext.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAA;AAElD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,CACN,iBAAiB,CAAC,WAAW,GAC7B,iBAAiB,CAAC,kBAAkB,GACpC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAC1C,EAAE,CAAA;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getMessageContext.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/moderation/getMessageContext.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
/**
|
2
|
+
* GENERATED CODE - DO NOT MODIFY
|
3
|
+
*/
|
4
|
+
import express from 'express';
|
5
|
+
import { HandlerAuth } from '@atproto/xrpc-server';
|
6
|
+
export interface QueryParams {
|
7
|
+
}
|
8
|
+
export interface InputSchema {
|
9
|
+
actor: string;
|
10
|
+
allowAccess: boolean;
|
11
|
+
ref?: string;
|
12
|
+
[k: string]: unknown;
|
13
|
+
}
|
14
|
+
export interface HandlerInput {
|
15
|
+
encoding: 'application/json';
|
16
|
+
body: InputSchema;
|
17
|
+
}
|
18
|
+
export interface HandlerError {
|
19
|
+
status: number;
|
20
|
+
message?: string;
|
21
|
+
}
|
22
|
+
export type HandlerOutput = HandlerError | void;
|
23
|
+
export type HandlerReqCtx<HA extends HandlerAuth = never> = {
|
24
|
+
auth: HA;
|
25
|
+
params: QueryParams;
|
26
|
+
input: HandlerInput;
|
27
|
+
req: express.Request;
|
28
|
+
res: express.Response;
|
29
|
+
};
|
30
|
+
export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
|
31
|
+
//# sourceMappingURL=updateActorAccess.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateActorAccess.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAK7B,OAAO,EAAE,WAAW,EAAsB,MAAM,sBAAsB,CAAA;AAEtE,MAAM,WAAW,WAAW;CAAG;AAE/B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAA;AAC/C,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"updateActorAccess.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/chat/bsky/moderation/updateActorAccess.ts"],"names":[],"mappings":""}
|
package/dist/pipethrough.d.ts
CHANGED
@@ -1,37 +1,27 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
/// <reference types="node" />
|
3
3
|
import express from 'express';
|
4
|
-
import {
|
5
|
-
import { HandlerPipeThrough } from '@atproto/xrpc-server';
|
4
|
+
import { CatchallHandler, HandlerPipeThrough } from '@atproto/xrpc-server';
|
6
5
|
import AppContext from './context';
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
export declare const pipethroughProcedure: (ctx: AppContext, req: express.Request, body: LexValue, requester?: string, audOverride?: string) => Promise<{
|
16
|
-
encoding: string;
|
17
|
-
buffer: ArrayBuffer;
|
18
|
-
headers: Record<string, string>;
|
6
|
+
export declare const proxyHandler: (ctx: AppContext) => CatchallHandler;
|
7
|
+
export declare const pipethrough: (ctx: AppContext, req: express.Request, requester: string | null, audOverride?: string) => Promise<HandlerPipeThrough>;
|
8
|
+
export declare const formatUrlAndAud: (ctx: AppContext, req: express.Request, audOverride?: string) => Promise<{
|
9
|
+
url: URL;
|
10
|
+
aud: string;
|
11
|
+
}>;
|
12
|
+
export declare const formatHeaders: (ctx: AppContext, req: express.Request, aud: string, requester: string | null) => Promise<{
|
13
|
+
authorization?: string;
|
19
14
|
}>;
|
20
15
|
export declare const parseProxyHeader: (ctx: AppContext, req: express.Request) => Promise<{
|
21
16
|
did: string;
|
22
17
|
serviceUrl: string;
|
23
18
|
} | undefined>;
|
24
|
-
export declare const
|
25
|
-
|
26
|
-
|
27
|
-
authorization?: string;
|
28
|
-
};
|
29
|
-
}>;
|
30
|
-
export declare const doProxy: (url: URL, reqInit: RequestInit) => Promise<{
|
19
|
+
export declare const makeRequest: (url: URL, reqInit: RequestInit) => Promise<Response>;
|
20
|
+
export declare const pipeProxyRes: (upstreamRes: Response, ownRes: express.Response) => Promise<void>;
|
21
|
+
export declare const parseProxyRes: (res: Response) => Promise<{
|
31
22
|
encoding: string;
|
32
23
|
buffer: ArrayBuffer;
|
33
24
|
headers: Record<string, string>;
|
34
25
|
}>;
|
35
26
|
export declare const parseRes: <T>(nsid: string, res: HandlerPipeThrough) => T;
|
36
|
-
export {};
|
37
27
|
//# sourceMappingURL=pipethrough.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.d.ts","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"pipethrough.d.ts","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAM7B,OAAO,EACL,eAAe,EACf,kBAAkB,EAEnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,UAAU,MAAM,WAAW,CAAA;AAElC,eAAO,MAAM,YAAY,QACjB,UAAU,KAAG,eAclB,CAAA;AAEH,eAAO,MAAM,WAAW,QACjB,UAAU,OACV,eAAe,aACT,MAAM,GAAG,IAAI,gBACV,MAAM,KACnB,QAAQ,kBAAkB,CAM5B,CAAA;AAYD,eAAO,MAAM,eAAe,QACrB,UAAU,OACV,eAAe,gBACN,MAAM,KACnB,QAAQ;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAanC,CAAA;AAED,eAAO,MAAM,aAAa,QACnB,UAAU,OACV,eAAe,OACf,MAAM,aACA,MAAM,GAAG,IAAI,KACvB,QAAQ;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAYpC,CAAA;AA6BD,eAAO,MAAM,gBAAgB,QACtB,UAAU,OACV,eAAe,KACnB,QAAQ;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAgBzD,CAAA;AAKD,eAAO,MAAM,WAAW,QACjB,GAAG,WACC,WAAW,KACnB,QAAQ,QAAQ,CAoBlB,CAAA;AAYD,eAAO,MAAM,YAAY,gBACV,QAAQ,UACb,gBAAgB,kBAwBzB,CAAA;AAED,eAAO,MAAM,aAAa,QAAe,QAAQ;;;;EAWhD,CAAA;AA8BD,eAAO,MAAM,QAAQ,YAAa,MAAM,OAAO,kBAAkB,KAAG,CAKnE,CAAA"}
|
package/dist/pipethrough.js
CHANGED
@@ -26,82 +26,51 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
27
|
};
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.parseRes = exports.
|
29
|
+
exports.parseRes = exports.parseProxyRes = exports.pipeProxyRes = exports.makeRequest = exports.parseProxyHeader = exports.formatHeaders = exports.formatUrlAndAud = exports.pipethrough = exports.proxyHandler = void 0;
|
30
30
|
const ui8 = __importStar(require("uint8arrays"));
|
31
31
|
const node_net_1 = __importDefault(require("node:net"));
|
32
|
+
const node_stream_1 = __importDefault(require("node:stream"));
|
32
33
|
const lexicon_1 = require("@atproto/lexicon");
|
33
34
|
const xrpc_server_1 = require("@atproto/xrpc-server");
|
34
35
|
const xrpc_1 = require("@atproto/xrpc");
|
35
36
|
const lexicons_1 = require("./lexicon/lexicons");
|
36
37
|
const logger_1 = require("./logger");
|
37
38
|
const common_1 = require("@atproto/common");
|
38
|
-
const
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
case lexicons_1.ids.ToolsOzoneModerationGetRecord:
|
48
|
-
case lexicons_1.ids.ToolsOzoneModerationGetRepo:
|
49
|
-
case lexicons_1.ids.ToolsOzoneModerationQueryEvents:
|
50
|
-
case lexicons_1.ids.ToolsOzoneModerationQueryStatuses:
|
51
|
-
case lexicons_1.ids.ToolsOzoneModerationSearchRepos:
|
52
|
-
return ctx.cfg.modService;
|
53
|
-
case lexicons_1.ids.ComAtprotoModerationCreateReport:
|
54
|
-
return ctx.cfg.reportService;
|
55
|
-
default:
|
56
|
-
return ctx.cfg.bskyAppView;
|
39
|
+
const proxyHandler = (ctx) => async (req, res, next) => {
|
40
|
+
try {
|
41
|
+
const { url, aud } = await (0, exports.formatUrlAndAud)(ctx, req);
|
42
|
+
const auth = await ctx.authVerifier.access({ req });
|
43
|
+
const headers = await (0, exports.formatHeaders)(ctx, req, aud, auth.credentials.did);
|
44
|
+
const body = node_stream_1.default.Readable.toWeb(req);
|
45
|
+
const reqInit = formatReqInit(req, headers, body);
|
46
|
+
const proxyRes = await (0, exports.makeRequest)(url, reqInit);
|
47
|
+
await (0, exports.pipeProxyRes)(proxyRes, res);
|
57
48
|
}
|
49
|
+
catch (err) {
|
50
|
+
return next(err);
|
51
|
+
}
|
52
|
+
return next();
|
58
53
|
};
|
59
|
-
|
60
|
-
|
61
|
-
const
|
62
|
-
|
63
|
-
|
64
|
-
|
54
|
+
exports.proxyHandler = proxyHandler;
|
55
|
+
const pipethrough = async (ctx, req, requester, audOverride) => {
|
56
|
+
const { url, aud } = await (0, exports.formatUrlAndAud)(ctx, req, audOverride);
|
57
|
+
const headers = await (0, exports.formatHeaders)(ctx, req, aud, requester);
|
58
|
+
const reqInit = formatReqInit(req, headers);
|
59
|
+
const res = await (0, exports.makeRequest)(url, reqInit);
|
60
|
+
return (0, exports.parseProxyRes)(res);
|
65
61
|
};
|
66
62
|
exports.pipethrough = pipethrough;
|
67
|
-
|
68
|
-
|
69
|
-
const reqInit = {
|
70
|
-
method: 'post',
|
71
|
-
headers,
|
72
|
-
body: new TextEncoder().encode((0, lexicon_1.stringifyLex)(body)),
|
73
|
-
duplex: 'half',
|
74
|
-
};
|
75
|
-
return (0, exports.doProxy)(url, reqInit);
|
76
|
-
};
|
77
|
-
exports.pipethroughProcedure = pipethroughProcedure;
|
78
|
-
const parseProxyHeader = async (ctx, req) => {
|
79
|
-
const proxyTo = req.header('atproto-proxy');
|
80
|
-
if (!proxyTo)
|
81
|
-
return;
|
82
|
-
const [did, serviceId] = proxyTo.split('#');
|
83
|
-
if (!serviceId) {
|
84
|
-
throw new xrpc_server_1.InvalidRequestError('no service id specified');
|
85
|
-
}
|
86
|
-
const didDoc = await ctx.idResolver.did.resolve(did);
|
87
|
-
if (!didDoc) {
|
88
|
-
throw new xrpc_server_1.InvalidRequestError('could not resolve proxy did');
|
89
|
-
}
|
90
|
-
const serviceUrl = (0, common_1.getServiceEndpoint)(didDoc, { id: `#${serviceId}` });
|
91
|
-
if (!serviceUrl) {
|
92
|
-
throw new xrpc_server_1.InvalidRequestError('could not resolve proxy did service url');
|
93
|
-
}
|
94
|
-
return { did, serviceUrl };
|
95
|
-
};
|
96
|
-
exports.parseProxyHeader = parseProxyHeader;
|
63
|
+
// Request setup/formatting
|
64
|
+
// -------------------
|
97
65
|
const REQ_HEADERS_TO_FORWARD = [
|
98
66
|
'accept-language',
|
99
67
|
'content-type',
|
100
68
|
'atproto-accept-labelers',
|
69
|
+
'x-bsky-topics',
|
101
70
|
];
|
102
|
-
const
|
71
|
+
const formatUrlAndAud = async (ctx, req, audOverride) => {
|
103
72
|
const proxyTo = await (0, exports.parseProxyHeader)(ctx, req);
|
104
|
-
const defaultProxy = defaultService(ctx, req
|
73
|
+
const defaultProxy = defaultService(ctx, req);
|
105
74
|
const serviceUrl = proxyTo?.serviceUrl ?? defaultProxy?.url;
|
106
75
|
const aud = audOverride ?? proxyTo?.did ?? defaultProxy?.did;
|
107
76
|
if (!serviceUrl || !aud) {
|
@@ -111,52 +80,168 @@ const createUrlAndHeaders = async (ctx, req, requester, audOverride, options) =>
|
|
111
80
|
if (!ctx.cfg.service.devMode && !isSafeUrl(url)) {
|
112
81
|
throw new xrpc_server_1.InvalidRequestError(`Invalid service url: ${url.toString()}`);
|
113
82
|
}
|
83
|
+
return { url, aud };
|
84
|
+
};
|
85
|
+
exports.formatUrlAndAud = formatUrlAndAud;
|
86
|
+
const formatHeaders = async (ctx, req, aud, requester) => {
|
114
87
|
const headers = requester
|
115
88
|
? (await ctx.serviceAuthHeaders(requester, aud)).headers
|
116
89
|
: {};
|
117
|
-
const allowedHeaders = REQ_HEADERS_TO_FORWARD.concat(options?.reqHeadersToForward ?? []);
|
118
90
|
// forward select headers to upstream services
|
119
|
-
for (const header of
|
91
|
+
for (const header of REQ_HEADERS_TO_FORWARD) {
|
120
92
|
const val = req.headers[header];
|
121
93
|
if (val) {
|
122
94
|
headers[header] = val;
|
123
95
|
}
|
124
96
|
}
|
125
|
-
return
|
97
|
+
return headers;
|
98
|
+
};
|
99
|
+
exports.formatHeaders = formatHeaders;
|
100
|
+
const formatReqInit = (req, headers, body) => {
|
101
|
+
if (req.method === 'GET') {
|
102
|
+
return {
|
103
|
+
method: 'get',
|
104
|
+
headers,
|
105
|
+
};
|
106
|
+
}
|
107
|
+
else if (req.method === 'HEAD') {
|
108
|
+
return {
|
109
|
+
method: 'head',
|
110
|
+
headers,
|
111
|
+
};
|
112
|
+
}
|
113
|
+
else if (req.method === 'POST') {
|
114
|
+
return {
|
115
|
+
method: 'post',
|
116
|
+
headers,
|
117
|
+
body,
|
118
|
+
duplex: 'half',
|
119
|
+
};
|
120
|
+
}
|
121
|
+
else {
|
122
|
+
throw new xrpc_server_1.InvalidRequestError('Method not found');
|
123
|
+
}
|
124
|
+
};
|
125
|
+
const parseProxyHeader = async (ctx, req) => {
|
126
|
+
const proxyTo = req.header('atproto-proxy');
|
127
|
+
if (!proxyTo)
|
128
|
+
return;
|
129
|
+
const [did, serviceId] = proxyTo.split('#');
|
130
|
+
if (!serviceId) {
|
131
|
+
throw new xrpc_server_1.InvalidRequestError('no service id specified');
|
132
|
+
}
|
133
|
+
const didDoc = await ctx.idResolver.did.resolve(did);
|
134
|
+
if (!didDoc) {
|
135
|
+
throw new xrpc_server_1.InvalidRequestError('could not resolve proxy did');
|
136
|
+
}
|
137
|
+
const serviceUrl = (0, common_1.getServiceEndpoint)(didDoc, { id: `#${serviceId}` });
|
138
|
+
if (!serviceUrl) {
|
139
|
+
throw new xrpc_server_1.InvalidRequestError('could not resolve proxy did service url');
|
140
|
+
}
|
141
|
+
return { did, serviceUrl };
|
126
142
|
};
|
127
|
-
exports.
|
128
|
-
|
143
|
+
exports.parseProxyHeader = parseProxyHeader;
|
144
|
+
// Sending request
|
145
|
+
// -------------------
|
146
|
+
const makeRequest = async (url, reqInit) => {
|
129
147
|
let res;
|
130
|
-
let buffer;
|
131
148
|
try {
|
132
149
|
res = await fetch(url, reqInit);
|
133
|
-
buffer = await res.arrayBuffer();
|
134
150
|
}
|
135
151
|
catch (err) {
|
136
152
|
logger_1.httpLogger.warn({ err }, 'pipethrough network error');
|
137
153
|
throw new xrpc_1.XRPCError(xrpc_1.ResponseType.UpstreamFailure);
|
138
154
|
}
|
139
155
|
if (res.status !== xrpc_1.ResponseType.Success) {
|
140
|
-
const
|
156
|
+
const arrBuffer = await readArrayBufferRes(res);
|
157
|
+
const ui8Buffer = new Uint8Array(arrBuffer);
|
141
158
|
const errInfo = safeParseJson(ui8.toString(ui8Buffer, 'utf8'));
|
142
159
|
throw new xrpc_1.XRPCError(res.status, safeString(errInfo?.['error']), safeString(errInfo?.['message']), simpleHeaders(res.headers));
|
143
160
|
}
|
144
|
-
|
145
|
-
const resHeaders = makeResHeaders(res);
|
146
|
-
return { encoding, buffer, headers: resHeaders };
|
161
|
+
return res;
|
147
162
|
};
|
148
|
-
exports.
|
163
|
+
exports.makeRequest = makeRequest;
|
164
|
+
// Response parsing/forwarding
|
165
|
+
// -------------------
|
149
166
|
const RES_HEADERS_TO_FORWARD = [
|
150
|
-
'
|
167
|
+
'content-type',
|
151
168
|
'content-language',
|
169
|
+
'atproto-repo-rev',
|
152
170
|
'atproto-content-labelers',
|
153
171
|
];
|
154
|
-
const
|
155
|
-
const
|
172
|
+
const pipeProxyRes = async (upstreamRes, ownRes) => {
|
173
|
+
for (const headerName of RES_HEADERS_TO_FORWARD) {
|
174
|
+
const headerVal = upstreamRes.headers.get(headerName);
|
175
|
+
if (headerVal) {
|
176
|
+
ownRes.setHeader(headerName, headerVal);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
if (upstreamRes.body) {
|
180
|
+
const contentLength = upstreamRes.headers.get('content-length');
|
181
|
+
const contentEncoding = upstreamRes.headers.get('content-encoding');
|
182
|
+
if (contentLength && (!contentEncoding || contentEncoding === 'identity')) {
|
183
|
+
ownRes.setHeader('content-length', contentLength);
|
184
|
+
}
|
185
|
+
else {
|
186
|
+
ownRes.setHeader('transfer-encoding', 'chunked');
|
187
|
+
}
|
188
|
+
ownRes.status(200);
|
189
|
+
const resStream = node_stream_1.default.Readable.fromWeb(upstreamRes.body);
|
190
|
+
await node_stream_1.default.promises.pipeline(resStream, ownRes);
|
191
|
+
}
|
192
|
+
else {
|
193
|
+
ownRes.status(200).end();
|
194
|
+
}
|
195
|
+
};
|
196
|
+
exports.pipeProxyRes = pipeProxyRes;
|
197
|
+
const parseProxyRes = async (res) => {
|
198
|
+
const buffer = await readArrayBufferRes(res);
|
199
|
+
const encoding = res.headers.get('content-type') ?? 'application/json';
|
200
|
+
const resHeaders = RES_HEADERS_TO_FORWARD.reduce((acc, cur) => {
|
156
201
|
acc[cur] = res.headers.get(cur) ?? undefined;
|
157
202
|
return acc;
|
158
203
|
}, {});
|
159
|
-
return (0, common_1.noUndefinedVals)(
|
204
|
+
return { encoding, buffer, headers: (0, common_1.noUndefinedVals)(resHeaders) };
|
205
|
+
};
|
206
|
+
exports.parseProxyRes = parseProxyRes;
|
207
|
+
// Utils
|
208
|
+
// -------------------
|
209
|
+
const defaultService = (ctx, req) => {
|
210
|
+
const nsid = req.originalUrl.split('?')[0].replace('/xrpc/', '');
|
211
|
+
switch (nsid) {
|
212
|
+
case lexicons_1.ids.ToolsOzoneCommunicationCreateTemplate:
|
213
|
+
case lexicons_1.ids.ToolsOzoneCommunicationDeleteTemplate:
|
214
|
+
case lexicons_1.ids.ToolsOzoneCommunicationUpdateTemplate:
|
215
|
+
case lexicons_1.ids.ToolsOzoneCommunicationListTemplates:
|
216
|
+
case lexicons_1.ids.ToolsOzoneModerationEmitEvent:
|
217
|
+
case lexicons_1.ids.ToolsOzoneModerationGetEvent:
|
218
|
+
case lexicons_1.ids.ToolsOzoneModerationGetRecord:
|
219
|
+
case lexicons_1.ids.ToolsOzoneModerationGetRepo:
|
220
|
+
case lexicons_1.ids.ToolsOzoneModerationQueryEvents:
|
221
|
+
case lexicons_1.ids.ToolsOzoneModerationQueryStatuses:
|
222
|
+
case lexicons_1.ids.ToolsOzoneModerationSearchRepos:
|
223
|
+
return ctx.cfg.modService;
|
224
|
+
case lexicons_1.ids.ComAtprotoModerationCreateReport:
|
225
|
+
return ctx.cfg.reportService;
|
226
|
+
default:
|
227
|
+
return ctx.cfg.bskyAppView;
|
228
|
+
}
|
229
|
+
};
|
230
|
+
const parseRes = (nsid, res) => {
|
231
|
+
const buffer = new Uint8Array(res.buffer);
|
232
|
+
const json = safeParseJson(ui8.toString(buffer, 'utf8'));
|
233
|
+
const lex = json && (0, lexicon_1.jsonToLex)(json);
|
234
|
+
return lexicons_1.lexicons.assertValidXrpcOutput(nsid, lex);
|
235
|
+
};
|
236
|
+
exports.parseRes = parseRes;
|
237
|
+
const readArrayBufferRes = async (res) => {
|
238
|
+
try {
|
239
|
+
return await res.arrayBuffer();
|
240
|
+
}
|
241
|
+
catch (err) {
|
242
|
+
logger_1.httpLogger.warn({ err }, 'pipethrough network error');
|
243
|
+
throw new xrpc_1.XRPCError(xrpc_1.ResponseType.UpstreamFailure);
|
244
|
+
}
|
160
245
|
};
|
161
246
|
const isSafeUrl = (url) => {
|
162
247
|
if (url.protocol !== 'https:')
|
@@ -167,13 +252,6 @@ const isSafeUrl = (url) => {
|
|
167
252
|
return false;
|
168
253
|
return true;
|
169
254
|
};
|
170
|
-
const parseRes = (nsid, res) => {
|
171
|
-
const buffer = new Uint8Array(res.buffer);
|
172
|
-
const json = safeParseJson(ui8.toString(buffer, 'utf8'));
|
173
|
-
const lex = json && (0, lexicon_1.jsonToLex)(json);
|
174
|
-
return lexicons_1.lexicons.assertValidXrpcOutput(nsid, lex);
|
175
|
-
};
|
176
|
-
exports.parseRes = parseRes;
|
177
255
|
const safeString = (str) => {
|
178
256
|
return typeof str === 'string' ? str : undefined;
|
179
257
|
};
|
package/dist/pipethrough.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,
|
1
|
+
{"version":3,"file":"pipethrough.js","sourceRoot":"","sources":["../src/pipethrough.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAClC,wDAA0B;AAC1B,8DAAgC;AAEhC,8CAA4C;AAC5C,sDAI6B;AAC7B,wCAAuD;AACvD,iDAAkD;AAClD,qCAAqC;AACrC,4CAAqE;AAG9D,MAAM,YAAY,GACvB,CAAC,GAAe,EAAmB,EAAE,CACrC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;IACvB,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,IAAA,uBAAe,EAAC,GAAG,EAAE,GAAG,CAAC,CAAA;QACpD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;QACnD,MAAM,OAAO,GAAG,MAAM,IAAA,qBAAa,EAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;QACxE,MAAM,IAAI,GAAG,qBAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACvC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;QACjD,MAAM,QAAQ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AC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAC9C,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,UAAU,GAAG,CAAC,GAAW,EAAsB,EAAE;IACrD,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AAClD,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,IAAY,EAAW,EAAE;IAC9C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAG,CAAC,OAAgB,EAA0B,EAAE;IACjE,MAAM,MAAM,GAAG,EAAE,CAAA;IACjB,KAAK,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,OAAO,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAA;IACnB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/pds",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.22",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Reference implementation of atproto Personal Data Server (PDS)",
|
6
6
|
"keywords": [
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"typed-emitter": "^2.1.0",
|
44
44
|
"uint8arrays": "3.0.0",
|
45
45
|
"zod": "^3.21.4",
|
46
|
-
"@atproto/api": "^0.12.
|
46
|
+
"@atproto/api": "^0.12.10",
|
47
47
|
"@atproto/aws": "^0.2.0",
|
48
48
|
"@atproto/common": "^0.4.0",
|
49
49
|
"@atproto/crypto": "^0.4.0",
|
@@ -70,12 +70,12 @@
|
|
70
70
|
"jest": "^28.1.2",
|
71
71
|
"ts-node": "^10.8.2",
|
72
72
|
"ws": "^8.12.0",
|
73
|
-
"@atproto/api": "^0.12.
|
74
|
-
"@atproto/bsky": "^0.0.
|
73
|
+
"@atproto/api": "^0.12.10",
|
74
|
+
"@atproto/bsky": "^0.0.52",
|
75
75
|
"@atproto/lex-cli": "^0.4.0"
|
76
76
|
},
|
77
77
|
"scripts": {
|
78
|
-
"codegen": "lex gen-server ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
78
|
+
"codegen": "lex gen-server ./src/lexicon ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/*",
|
79
79
|
"build": "tsc --build tsconfig.build.json",
|
80
80
|
"postbuild": "node ./build.templates.js",
|
81
81
|
"dev": "node ./build.templates.js --watch",
|
@@ -4,17 +4,11 @@ import AppContext from '../../../../context'
|
|
4
4
|
import getPreferences from './getPreferences'
|
5
5
|
import getProfile from './getProfile'
|
6
6
|
import getProfiles from './getProfiles'
|
7
|
-
import getSuggestions from './getSuggestions'
|
8
7
|
import putPreferences from './putPreferences'
|
9
|
-
import searchActors from './searchActors'
|
10
|
-
import searchActorsTypeahead from './searchActorsTypeahead'
|
11
8
|
|
12
9
|
export default function (server: Server, ctx: AppContext) {
|
13
10
|
getPreferences(server, ctx)
|
14
11
|
getProfile(server, ctx)
|
15
12
|
getProfiles(server, ctx)
|
16
|
-
getSuggestions(server, ctx)
|
17
13
|
putPreferences(server, ctx)
|
18
|
-
searchActors(server, ctx)
|
19
|
-
searchActorsTypeahead(server, ctx)
|
20
14
|
}
|
@@ -16,9 +16,7 @@ export default function (server: Server, ctx: AppContext) {
|
|
16
16
|
{ feed: params.feed },
|
17
17
|
await ctx.appviewAuthHeaders(requester),
|
18
18
|
)
|
19
|
-
return pipethrough(ctx, req, requester, feed.view.did
|
20
|
-
reqHeadersToForward: ['x-bsky-topics'],
|
21
|
-
})
|
19
|
+
return pipethrough(ctx, req, requester, feed.view.did)
|
22
20
|
},
|
23
21
|
})
|
24
22
|
}
|