this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bump lexgen and make empty lexbytes omit in cbor

+289 -18
+26
api/atproto/serverconfirmEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.confirmEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerConfirmEmail_Input is the input argument to a com.atproto.server.confirmEmail call. 14 + type ServerConfirmEmail_Input struct { 15 + Email string `json:"email" cborgen:"email"` 16 + Token string `json:"token" cborgen:"token"` 17 + } 18 + 19 + // ServerConfirmEmail calls the XRPC method "com.atproto.server.confirmEmail". 20 + func ServerConfirmEmail(ctx context.Context, c *xrpc.Client, input *ServerConfirmEmail_Input) error { 21 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.confirmEmail", nil, input, nil); err != nil { 22 + return err 23 + } 24 + 25 + return nil 26 + }
+6 -5
api/atproto/servercreateSession.go
··· 19 19 20 20 // ServerCreateSession_Output is the output of a com.atproto.server.createSession call. 21 21 type ServerCreateSession_Output struct { 22 - AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 23 - Did string `json:"did" cborgen:"did"` 24 - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 25 - Handle string `json:"handle" cborgen:"handle"` 26 - RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 22 + AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 23 + Did string `json:"did" cborgen:"did"` 24 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 25 + EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"` 26 + Handle string `json:"handle" cborgen:"handle"` 27 + RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 27 28 } 28 29 29 30 // ServerCreateSession calls the XRPC method "com.atproto.server.createSession".
+4 -3
api/atproto/servergetSession.go
··· 12 12 13 13 // ServerGetSession_Output is the output of a com.atproto.server.getSession call. 14 14 type ServerGetSession_Output struct { 15 - Did string `json:"did" cborgen:"did"` 16 - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 17 - Handle string `json:"handle" cborgen:"handle"` 15 + Did string `json:"did" cborgen:"did"` 16 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 17 + EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"` 18 + Handle string `json:"handle" cborgen:"handle"` 18 19 } 19 20 20 21 // ServerGetSession calls the XRPC method "com.atproto.server.getSession".
+20
api/atproto/serverrequestEmailConfirmation.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestEmailConfirmation 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestEmailConfirmation calls the XRPC method "com.atproto.server.requestEmailConfirmation". 14 + func ServerRequestEmailConfirmation(ctx context.Context, c *xrpc.Client) error { 15 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.requestEmailConfirmation", nil, nil, nil); err != nil { 16 + return err 17 + } 18 + 19 + return nil 20 + }
+26
api/atproto/serverrequestEmailUpdate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.requestEmailUpdate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerRequestEmailUpdate_Output is the output of a com.atproto.server.requestEmailUpdate call. 14 + type ServerRequestEmailUpdate_Output struct { 15 + TokenRequired bool `json:"tokenRequired" cborgen:"tokenRequired"` 16 + } 17 + 18 + // ServerRequestEmailUpdate calls the XRPC method "com.atproto.server.requestEmailUpdate". 19 + func ServerRequestEmailUpdate(ctx context.Context, c *xrpc.Client) (*ServerRequestEmailUpdate_Output, error) { 20 + var out ServerRequestEmailUpdate_Output 21 + if err := c.Do(ctx, xrpc.Procedure, "", "com.atproto.server.requestEmailUpdate", nil, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+27
api/atproto/serverupdateEmail.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.server.updateEmail 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ServerUpdateEmail_Input is the input argument to a com.atproto.server.updateEmail call. 14 + type ServerUpdateEmail_Input struct { 15 + Email string `json:"email" cborgen:"email"` 16 + // token: Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed. 17 + Token *string `json:"token,omitempty" cborgen:"token,omitempty"` 18 + } 19 + 20 + // ServerUpdateEmail calls the XRPC method "com.atproto.server.updateEmail". 21 + func ServerUpdateEmail(ctx context.Context, c *xrpc.Client, input *ServerUpdateEmail_Input) error { 22 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.server.updateEmail", nil, input, nil); err != nil { 23 + return err 24 + } 25 + 26 + return nil 27 + }
+1 -1
api/atproto/syncsubscribeRepos.go
··· 12 12 type SyncSubscribeRepos_Commit struct { 13 13 Blobs []util.LexLink `json:"blobs" cborgen:"blobs"` 14 14 // blocks: CAR file containing relevant blocks 15 - Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks"` 15 + Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` 16 16 Commit util.LexLink `json:"commit" cborgen:"commit"` 17 17 Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"` 18 18 Prev *util.LexLink `json:"prev" cborgen:"prev"`
+66 -3
api/bsky/actordefs.go
··· 29 29 Visibility string `json:"visibility" cborgen:"visibility"` 30 30 } 31 31 32 + // ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema. 33 + // 34 + // RECORDTYPE: ActorDefs_FeedViewPref 35 + type ActorDefs_FeedViewPref struct { 36 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#feedViewPref" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"` 37 + // feed: The URI of the feed, or an identifier which describes the feed. 38 + Feed string `json:"feed" cborgen:"feed"` 39 + // hideQuotePosts: Hide quote posts in the feed. 40 + HideQuotePosts *bool `json:"hideQuotePosts,omitempty" cborgen:"hideQuotePosts,omitempty"` 41 + // hideReplies: Hide replies in the feed. 42 + HideReplies *bool `json:"hideReplies,omitempty" cborgen:"hideReplies,omitempty"` 43 + // hideRepliesByLikeCount: Hide replies in the feed if they do not have this number of likes. 44 + HideRepliesByLikeCount *int64 `json:"hideRepliesByLikeCount,omitempty" cborgen:"hideRepliesByLikeCount,omitempty"` 45 + // hideRepliesByUnfollowed: Hide replies in the feed if they are not by followed users. 46 + HideRepliesByUnfollowed *bool `json:"hideRepliesByUnfollowed,omitempty" cborgen:"hideRepliesByUnfollowed,omitempty"` 47 + // hideReposts: Hide reposts in the feed. 48 + HideReposts *bool `json:"hideReposts,omitempty" cborgen:"hideReposts,omitempty"` 49 + } 50 + 51 + // ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema. 52 + // 53 + // RECORDTYPE: ActorDefs_PersonalDetailsPref 54 + type ActorDefs_PersonalDetailsPref struct { 55 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#personalDetailsPref" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"` 56 + // birthDate: The birth date of the owner of the account. 57 + BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"` 58 + } 59 + 32 60 type ActorDefs_Preferences_Elem struct { 33 - ActorDefs_AdultContentPref *ActorDefs_AdultContentPref 34 - ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref 35 - ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref 61 + ActorDefs_AdultContentPref *ActorDefs_AdultContentPref 62 + ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref 63 + ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref 64 + ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref 65 + ActorDefs_FeedViewPref *ActorDefs_FeedViewPref 66 + ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref 36 67 } 37 68 38 69 func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) { ··· 48 79 t.ActorDefs_SavedFeedsPref.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" 49 80 return json.Marshal(t.ActorDefs_SavedFeedsPref) 50 81 } 82 + if t.ActorDefs_PersonalDetailsPref != nil { 83 + t.ActorDefs_PersonalDetailsPref.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" 84 + return json.Marshal(t.ActorDefs_PersonalDetailsPref) 85 + } 86 + if t.ActorDefs_FeedViewPref != nil { 87 + t.ActorDefs_FeedViewPref.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" 88 + return json.Marshal(t.ActorDefs_FeedViewPref) 89 + } 90 + if t.ActorDefs_ThreadViewPref != nil { 91 + t.ActorDefs_ThreadViewPref.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" 92 + return json.Marshal(t.ActorDefs_ThreadViewPref) 93 + } 51 94 return nil, fmt.Errorf("cannot marshal empty enum") 52 95 } 53 96 func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error { ··· 66 109 case "app.bsky.actor.defs#savedFeedsPref": 67 110 t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref) 68 111 return json.Unmarshal(b, t.ActorDefs_SavedFeedsPref) 112 + case "app.bsky.actor.defs#personalDetailsPref": 113 + t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref) 114 + return json.Unmarshal(b, t.ActorDefs_PersonalDetailsPref) 115 + case "app.bsky.actor.defs#feedViewPref": 116 + t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref) 117 + return json.Unmarshal(b, t.ActorDefs_FeedViewPref) 118 + case "app.bsky.actor.defs#threadViewPref": 119 + t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref) 120 + return json.Unmarshal(b, t.ActorDefs_ThreadViewPref) 69 121 70 122 default: 71 123 return nil ··· 117 169 LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"` 118 170 Pinned []string `json:"pinned" cborgen:"pinned"` 119 171 Saved []string `json:"saved" cborgen:"saved"` 172 + } 173 + 174 + // ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema. 175 + // 176 + // RECORDTYPE: ActorDefs_ThreadViewPref 177 + type ActorDefs_ThreadViewPref struct { 178 + LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#threadViewPref" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"` 179 + // prioritizeFollowedUsers: Show followed users at the top of all replies. 180 + PrioritizeFollowedUsers *bool `json:"prioritizeFollowedUsers,omitempty" cborgen:"prioritizeFollowedUsers,omitempty"` 181 + // sort: Sorting mode. 182 + Sort *string `json:"sort,omitempty" cborgen:"sort,omitempty"` 120 183 } 121 184 122 185 // ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema.
+15 -5
api/bsky/embedimages.go
··· 17 17 Images []*EmbedImages_Image `json:"images" cborgen:"images"` 18 18 } 19 19 20 + // EmbedImages_AspectRatio is a "aspectRatio" in the app.bsky.embed.images schema. 21 + // 22 + // width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. 23 + type EmbedImages_AspectRatio struct { 24 + Height int64 `json:"height" cborgen:"height"` 25 + Width int64 `json:"width" cborgen:"width"` 26 + } 27 + 20 28 // EmbedImages_Image is a "image" in the app.bsky.embed.images schema. 21 29 type EmbedImages_Image struct { 22 - Alt string `json:"alt" cborgen:"alt"` 23 - Image *util.LexBlob `json:"image" cborgen:"image"` 30 + Alt string `json:"alt" cborgen:"alt"` 31 + AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 32 + Image *util.LexBlob `json:"image" cborgen:"image"` 24 33 } 25 34 26 35 // EmbedImages_View is a "view" in the app.bsky.embed.images schema. ··· 33 42 34 43 // EmbedImages_ViewImage is a "viewImage" in the app.bsky.embed.images schema. 35 44 type EmbedImages_ViewImage struct { 36 - Alt string `json:"alt" cborgen:"alt"` 37 - Fullsize string `json:"fullsize" cborgen:"fullsize"` 38 - Thumb string `json:"thumb" cborgen:"thumb"` 45 + Alt string `json:"alt" cborgen:"alt"` 46 + AspectRatio *EmbedImages_AspectRatio `json:"aspectRatio,omitempty" cborgen:"aspectRatio,omitempty"` 47 + Fullsize string `json:"fullsize" cborgen:"fullsize"` 48 + Thumb string `json:"thumb" cborgen:"thumb"` 39 49 }
+33
api/bsky/feedgetListFeed.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getListFeed 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetListFeed_Output is the output of a app.bsky.feed.getListFeed call. 14 + type FeedGetListFeed_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feed []*FeedDefs_FeedViewPost `json:"feed" cborgen:"feed"` 17 + } 18 + 19 + // FeedGetListFeed calls the XRPC method "app.bsky.feed.getListFeed". 20 + func FeedGetListFeed(ctx context.Context, c *xrpc.Client, cursor string, limit int64, list string) (*FeedGetListFeed_Output, error) { 21 + var out FeedGetListFeed_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + "list": list, 27 + } 28 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getListFeed", params, nil, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+32
api/bsky/feedgetSuggestedFeeds.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.feed.getSuggestedFeeds 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // FeedGetSuggestedFeeds_Output is the output of a app.bsky.feed.getSuggestedFeeds call. 14 + type FeedGetSuggestedFeeds_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Feeds []*FeedDefs_GeneratorView `json:"feeds" cborgen:"feeds"` 17 + } 18 + 19 + // FeedGetSuggestedFeeds calls the XRPC method "app.bsky.feed.getSuggestedFeeds". 20 + func FeedGetSuggestedFeeds(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*FeedGetSuggestedFeeds_Output, error) { 21 + var out FeedGetSuggestedFeeds_Output 22 + 23 + params := map[string]interface{}{ 24 + "cursor": cursor, 25 + "limit": limit, 26 + } 27 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.feed.getSuggestedFeeds", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+2 -1
api/bsky/graphdefs.go
··· 39 39 40 40 // GraphDefs_ListViewerState is a "listViewerState" in the app.bsky.graph.defs schema. 41 41 type GraphDefs_ListViewerState struct { 42 - Muted *bool `json:"muted,omitempty" cborgen:"muted,omitempty"` 42 + Blocked *string `json:"blocked,omitempty" cborgen:"blocked,omitempty"` 43 + Muted *bool `json:"muted,omitempty" cborgen:"muted,omitempty"` 43 44 }
+30
api/bsky/graphgetSuggestedFollowsByActor.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.getSuggestedFollowsByActor 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphGetSuggestedFollowsByActor_Output is the output of a app.bsky.graph.getSuggestedFollowsByActor call. 14 + type GraphGetSuggestedFollowsByActor_Output struct { 15 + Suggestions []*ActorDefs_ProfileView `json:"suggestions" cborgen:"suggestions"` 16 + } 17 + 18 + // GraphGetSuggestedFollowsByActor calls the XRPC method "app.bsky.graph.getSuggestedFollowsByActor". 19 + func GraphGetSuggestedFollowsByActor(ctx context.Context, c *xrpc.Client, actor string) (*GraphGetSuggestedFollowsByActor_Output, error) { 20 + var out GraphGetSuggestedFollowsByActor_Output 21 + 22 + params := map[string]interface{}{ 23 + "actor": actor, 24 + } 25 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.getSuggestedFollowsByActor", params, nil, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+1
lex/gen.go
··· 1258 1258 // be omitempty. 1259 1259 if ptr == "" && tname == "util.LexBytes" { 1260 1260 jsonOmit = ",omitempty" 1261 + cborOmit = ",omitempty" 1261 1262 } 1262 1263 1263 1264 if v.Description != "" {