-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lexicon: initial social proof lexicons * Social proof (#2548) * Update deactivation through updateSubjectStatus (#2539) * attach hosting status to entryway session responses * integrate account deactivation in with entryway * tidy * tidy * chnageset * update changeset * Version packages (#2546) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * lexicon: initial social proof lexicons * feat: add generated types for social proof * feat: social proof implementation --------- Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Devin Ivy <devinivy@gmail.com> * Rename * Codegen * Implementation, renaming * Remove only * Add depth resolution param, update snaps * Be smart like Devin * Snaps * Revert lock changes * Snaps * Snaps * Snaps * Add changeset * Snaps * Revert lock changes * Add test for basic profile * Add getKnownFollowersEndpoint * Make it zero * Return max of 5 * Remove isNoHosted * Use array and index * Clarify ternary * Remove includeKnownFollowers from views * Revert "Return max of 5" This reverts commit 1a27eb7. * Ope missed a param * Rename view method * Don't return viewer if undefined * Format * Clean up hydrator * Snaps * Update proto, use batch endpoint * Format * Fix proto, codegen * Remove unneeded promise * Move hydrator into route handler * Add hydrationLogger * Handle failures of dataplane getKnownFollowers * Use .at(), defer to params.limit * Create instance of FollowsFollowing for better type support * Support knownFollowers in mergeStates * Add back fat-fingered deleted imports * Filter out blocks * Codegen lex * Naive block filtering * Remove whitespace edits * Update changeset desc * Remove whitespace --------- Co-authored-by: Devin Ivy <devinivy@gmail.com> Co-authored-by: dirkmc <dirkmdev@gmail.com> Co-authored-by: Daniel Holmgren <dtholmgren@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
71e3edc
commit 58abcbd
Showing
33 changed files
with
1,427 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@atproto/api": patch | ||
--- | ||
|
||
Adds "social proof": `knowFollowers` to `ViewerState` for `ProfileViewDetailed` | ||
views and `app.bsky.graph.getKnownFollowers` method for listing known followers | ||
of a given user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "app.bsky.graph.getKnownFollowers", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["actor"], | ||
"properties": { | ||
"actor": { "type": "string", "format": "at-identifier" }, | ||
"limit": { | ||
"type": "integer", | ||
"minimum": 1, | ||
"maximum": 100, | ||
"default": 50 | ||
}, | ||
"cursor": { "type": "string" } | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["subject", "followers"], | ||
"properties": { | ||
"subject": { | ||
"type": "ref", | ||
"ref": "app.bsky.actor.defs#profileView" | ||
}, | ||
"cursor": { "type": "string" }, | ||
"followers": { | ||
"type": "array", | ||
"items": { | ||
"type": "ref", | ||
"ref": "app.bsky.actor.defs#profileView" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* GENERATED CODE - DO NOT MODIFY | ||
*/ | ||
import { Headers, XRPCError } from '@atproto/xrpc' | ||
import { ValidationResult, BlobRef } from '@atproto/lexicon' | ||
import { isObj, hasProp } from '../../../../util' | ||
import { lexicons } from '../../../../lexicons' | ||
import { CID } from 'multiformats/cid' | ||
import * as AppBskyActorDefs from '../actor/defs' | ||
|
||
export interface QueryParams { | ||
actor: string | ||
limit?: number | ||
cursor?: string | ||
} | ||
|
||
export type InputSchema = undefined | ||
|
||
export interface OutputSchema { | ||
subject: AppBskyActorDefs.ProfileView | ||
cursor?: string | ||
followers: AppBskyActorDefs.ProfileView[] | ||
[k: string]: unknown | ||
} | ||
|
||
export interface CallOptions { | ||
headers?: Headers | ||
} | ||
|
||
export interface Response { | ||
success: boolean | ||
headers: Headers | ||
data: OutputSchema | ||
} | ||
|
||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
} | ||
return e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.