this repo has no description
0
fork

Configure Feed

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

lexgen and cborgen with latest changes

rafael 2ceee232 5e1b3940

+616 -50
+145
api/atproto/cbor_gen.go
··· 19 19 var _ = math.E 20 20 var _ = sort.Sort 21 21 22 + func (t *LexiconSchema) MarshalCBOR(w io.Writer) error { 23 + if t == nil { 24 + _, err := w.Write(cbg.CborNull) 25 + return err 26 + } 27 + 28 + cw := cbg.NewCborWriter(w) 29 + 30 + if _, err := cw.Write([]byte{162}); err != nil { 31 + return err 32 + } 33 + 34 + // t.LexiconTypeID (string) (string) 35 + if len("$type") > 1000000 { 36 + return xerrors.Errorf("Value in field \"$type\" was too long") 37 + } 38 + 39 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil { 40 + return err 41 + } 42 + if _, err := cw.WriteString(string("$type")); err != nil { 43 + return err 44 + } 45 + 46 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("com.atproto.lexicon.schema"))); err != nil { 47 + return err 48 + } 49 + if _, err := cw.WriteString(string("com.atproto.lexicon.schema")); err != nil { 50 + return err 51 + } 52 + 53 + // t.Lexicon (int64) (int64) 54 + if len("lexicon") > 1000000 { 55 + return xerrors.Errorf("Value in field \"lexicon\" was too long") 56 + } 57 + 58 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("lexicon"))); err != nil { 59 + return err 60 + } 61 + if _, err := cw.WriteString(string("lexicon")); err != nil { 62 + return err 63 + } 64 + 65 + if t.Lexicon >= 0 { 66 + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Lexicon)); err != nil { 67 + return err 68 + } 69 + } else { 70 + if err := cw.WriteMajorTypeHeader(cbg.MajNegativeInt, uint64(-t.Lexicon-1)); err != nil { 71 + return err 72 + } 73 + } 74 + 75 + return nil 76 + } 77 + 78 + func (t *LexiconSchema) UnmarshalCBOR(r io.Reader) (err error) { 79 + *t = LexiconSchema{} 80 + 81 + cr := cbg.NewCborReader(r) 82 + 83 + maj, extra, err := cr.ReadHeader() 84 + if err != nil { 85 + return err 86 + } 87 + defer func() { 88 + if err == io.EOF { 89 + err = io.ErrUnexpectedEOF 90 + } 91 + }() 92 + 93 + if maj != cbg.MajMap { 94 + return fmt.Errorf("cbor input should be of type map") 95 + } 96 + 97 + if extra > cbg.MaxLength { 98 + return fmt.Errorf("LexiconSchema: map struct too large (%d)", extra) 99 + } 100 + 101 + n := extra 102 + 103 + nameBuf := make([]byte, 7) 104 + for i := uint64(0); i < n; i++ { 105 + nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000) 106 + if err != nil { 107 + return err 108 + } 109 + 110 + if !ok { 111 + // Field doesn't exist on this type, so ignore it 112 + if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil { 113 + return err 114 + } 115 + continue 116 + } 117 + 118 + switch string(nameBuf[:nameLen]) { 119 + // t.LexiconTypeID (string) (string) 120 + case "$type": 121 + 122 + { 123 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 124 + if err != nil { 125 + return err 126 + } 127 + 128 + t.LexiconTypeID = string(sval) 129 + } 130 + // t.Lexicon (int64) (int64) 131 + case "lexicon": 132 + { 133 + maj, extra, err := cr.ReadHeader() 134 + if err != nil { 135 + return err 136 + } 137 + var extraI int64 138 + switch maj { 139 + case cbg.MajUnsignedInt: 140 + extraI = int64(extra) 141 + if extraI < 0 { 142 + return fmt.Errorf("int64 positive overflow") 143 + } 144 + case cbg.MajNegativeInt: 145 + extraI = int64(extra) 146 + if extraI < 0 { 147 + return fmt.Errorf("int64 negative overflow") 148 + } 149 + extraI = -1 - extraI 150 + default: 151 + return fmt.Errorf("wrong type for int64 field: %d", maj) 152 + } 153 + 154 + t.Lexicon = int64(extraI) 155 + } 156 + 157 + default: 158 + // Field doesn't exist on this type, so ignore it 159 + if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil { 160 + return err 161 + } 162 + } 163 + } 164 + 165 + return nil 166 + } 22 167 func (t *RepoStrongRef) MarshalCBOR(w io.Writer) error { 23 168 if t == nil { 24 169 _, err := w.Write(cbg.CborNull)
+19
api/atproto/lexiconschema.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.lexicon.schema 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + util.RegisterType("com.atproto.lexicon.schema", &LexiconSchema{}) 13 + } // 14 + // RECORDTYPE: LexiconSchema 15 + type LexiconSchema struct { 16 + LexiconTypeID string `json:"$type,const=com.atproto.lexicon.schema" cborgen:"$type,const=com.atproto.lexicon.schema"` 17 + // lexicon: Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system. 18 + Lexicon int64 `json:"lexicon" cborgen:"lexicon"` 19 + }
+2
api/atproto/servercreateSession.go
··· 12 12 13 13 // ServerCreateSession_Input is the input argument to a com.atproto.server.createSession call. 14 14 type ServerCreateSession_Input struct { 15 + // allowTakendown: When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned 16 + AllowTakendown *bool `json:"allowTakendown,omitempty" cborgen:"allowTakendown,omitempty"` 15 17 AuthFactorToken *string `json:"authFactorToken,omitempty" cborgen:"authFactorToken,omitempty"` 16 18 // identifier: Handle or other identifier supported by the server for the authenticating user. 17 19 Identifier string `json:"identifier" cborgen:"identifier"`
+30
api/atproto/tempaddReservedHandle.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.addReservedHandle 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // TempAddReservedHandle_Input is the input argument to a com.atproto.temp.addReservedHandle call. 14 + type TempAddReservedHandle_Input struct { 15 + Handle string `json:"handle" cborgen:"handle"` 16 + } 17 + 18 + // TempAddReservedHandle_Output is the output of a com.atproto.temp.addReservedHandle call. 19 + type TempAddReservedHandle_Output struct { 20 + } 21 + 22 + // TempAddReservedHandle calls the XRPC method "com.atproto.temp.addReservedHandle". 23 + func TempAddReservedHandle(ctx context.Context, c *xrpc.Client, input *TempAddReservedHandle_Input) (*TempAddReservedHandle_Output, error) { 24 + var out TempAddReservedHandle_Output 25 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.addReservedHandle", nil, input, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+2
api/bsky/actorgetSuggestions.go
··· 14 14 type ActorGetSuggestions_Output struct { 15 15 Actors []*ActorDefs_ProfileView `json:"actors" cborgen:"actors"` 16 16 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 17 19 } 18 20 19 21 // ActorGetSuggestions calls the XRPC method "app.bsky.actor.getSuggestions".
+154 -1
api/bsky/cbor_gen.go
··· 4786 4786 } 4787 4787 4788 4788 cw := cbg.NewCborWriter(w) 4789 - fieldCount := 9 4789 + fieldCount := 10 4790 4790 4791 4791 if t.AcceptsInteractions == nil { 4792 4792 fieldCount-- 4793 4793 } 4794 4794 4795 4795 if t.Avatar == nil { 4796 + fieldCount-- 4797 + } 4798 + 4799 + if t.ContentMode == nil { 4796 4800 fieldCount-- 4797 4801 } 4798 4802 ··· 4913 4917 } 4914 4918 if _, err := cw.WriteString(string(t.CreatedAt)); err != nil { 4915 4919 return err 4920 + } 4921 + 4922 + // t.ContentMode (string) (string) 4923 + if t.ContentMode != nil { 4924 + 4925 + if len("contentMode") > 1000000 { 4926 + return xerrors.Errorf("Value in field \"contentMode\" was too long") 4927 + } 4928 + 4929 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("contentMode"))); err != nil { 4930 + return err 4931 + } 4932 + if _, err := cw.WriteString(string("contentMode")); err != nil { 4933 + return err 4934 + } 4935 + 4936 + if t.ContentMode == nil { 4937 + if _, err := cw.Write(cbg.CborNull); err != nil { 4938 + return err 4939 + } 4940 + } else { 4941 + if len(*t.ContentMode) > 1000000 { 4942 + return xerrors.Errorf("Value in field t.ContentMode was too long") 4943 + } 4944 + 4945 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.ContentMode))); err != nil { 4946 + return err 4947 + } 4948 + if _, err := cw.WriteString(string(*t.ContentMode)); err != nil { 4949 + return err 4950 + } 4951 + } 4916 4952 } 4917 4953 4918 4954 // t.Description (string) (string) ··· 5139 5175 } 5140 5176 5141 5177 t.CreatedAt = string(sval) 5178 + } 5179 + // t.ContentMode (string) (string) 5180 + case "contentMode": 5181 + 5182 + { 5183 + b, err := cr.ReadByte() 5184 + if err != nil { 5185 + return err 5186 + } 5187 + if b != cbg.CborNull[0] { 5188 + if err := cr.UnreadByte(); err != nil { 5189 + return err 5190 + } 5191 + 5192 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 5193 + if err != nil { 5194 + return err 5195 + } 5196 + 5197 + t.ContentMode = (*string)(&sval) 5198 + } 5142 5199 } 5143 5200 // t.Description (string) (string) 5144 5201 case "description": ··· 6103 6160 6104 6161 if extra > cbg.MaxLength { 6105 6162 return fmt.Errorf("FeedThreadgate_MentionRule: map struct too large (%d)", extra) 6163 + } 6164 + 6165 + n := extra 6166 + 6167 + nameBuf := make([]byte, 5) 6168 + for i := uint64(0); i < n; i++ { 6169 + nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000) 6170 + if err != nil { 6171 + return err 6172 + } 6173 + 6174 + if !ok { 6175 + // Field doesn't exist on this type, so ignore it 6176 + if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil { 6177 + return err 6178 + } 6179 + continue 6180 + } 6181 + 6182 + switch string(nameBuf[:nameLen]) { 6183 + // t.LexiconTypeID (string) (string) 6184 + case "$type": 6185 + 6186 + { 6187 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 6188 + if err != nil { 6189 + return err 6190 + } 6191 + 6192 + t.LexiconTypeID = string(sval) 6193 + } 6194 + 6195 + default: 6196 + // Field doesn't exist on this type, so ignore it 6197 + if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil { 6198 + return err 6199 + } 6200 + } 6201 + } 6202 + 6203 + return nil 6204 + } 6205 + func (t *FeedThreadgate_FollowerRule) MarshalCBOR(w io.Writer) error { 6206 + if t == nil { 6207 + _, err := w.Write(cbg.CborNull) 6208 + return err 6209 + } 6210 + 6211 + cw := cbg.NewCborWriter(w) 6212 + 6213 + if _, err := cw.Write([]byte{161}); err != nil { 6214 + return err 6215 + } 6216 + 6217 + // t.LexiconTypeID (string) (string) 6218 + if len("$type") > 1000000 { 6219 + return xerrors.Errorf("Value in field \"$type\" was too long") 6220 + } 6221 + 6222 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil { 6223 + return err 6224 + } 6225 + if _, err := cw.WriteString(string("$type")); err != nil { 6226 + return err 6227 + } 6228 + 6229 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("app.bsky.feed.threadgate#followerRule"))); err != nil { 6230 + return err 6231 + } 6232 + if _, err := cw.WriteString(string("app.bsky.feed.threadgate#followerRule")); err != nil { 6233 + return err 6234 + } 6235 + return nil 6236 + } 6237 + 6238 + func (t *FeedThreadgate_FollowerRule) UnmarshalCBOR(r io.Reader) (err error) { 6239 + *t = FeedThreadgate_FollowerRule{} 6240 + 6241 + cr := cbg.NewCborReader(r) 6242 + 6243 + maj, extra, err := cr.ReadHeader() 6244 + if err != nil { 6245 + return err 6246 + } 6247 + defer func() { 6248 + if err == io.EOF { 6249 + err = io.ErrUnexpectedEOF 6250 + } 6251 + }() 6252 + 6253 + if maj != cbg.MajMap { 6254 + return fmt.Errorf("cbor input should be of type map") 6255 + } 6256 + 6257 + if extra > cbg.MaxLength { 6258 + return fmt.Errorf("FeedThreadgate_FollowerRule: map struct too large (%d)", extra) 6106 6259 } 6107 6260 6108 6261 n := extra
+9
api/bsky/feeddefs.go
··· 80 80 AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` 81 81 Avatar *string `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 82 82 Cid string `json:"cid" cborgen:"cid"` 83 + ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` 83 84 Creator *ActorDefs_ProfileView `json:"creator" cborgen:"creator"` 84 85 Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 85 86 DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"` ··· 361 362 Repost string `json:"repost" cborgen:"repost"` 362 363 } 363 364 365 + // FeedDefs_ThreadContext is a "threadContext" in the app.bsky.feed.defs schema. 366 + // 367 + // Metadata about this post within the context of the thread it is in. 368 + type FeedDefs_ThreadContext struct { 369 + RootAuthorLike *string `json:"rootAuthorLike,omitempty" cborgen:"rootAuthorLike,omitempty"` 370 + } 371 + 364 372 // FeedDefs_ThreadViewPost is a "threadViewPost" in the app.bsky.feed.defs schema. 365 373 // 366 374 // RECORDTYPE: FeedDefs_ThreadViewPost ··· 369 377 Parent *FeedDefs_ThreadViewPost_Parent `json:"parent,omitempty" cborgen:"parent,omitempty"` 370 378 Post *FeedDefs_PostView `json:"post" cborgen:"post"` 371 379 Replies []*FeedDefs_ThreadViewPost_Replies_Elem `json:"replies,omitempty" cborgen:"replies,omitempty"` 380 + ThreadContext *FeedDefs_ThreadContext `json:"threadContext,omitempty" cborgen:"threadContext,omitempty"` 372 381 } 373 382 374 383 type FeedDefs_ThreadViewPost_Parent struct {
+1
api/bsky/feedgenerator.go
··· 24 24 // acceptsInteractions: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions 25 25 AcceptsInteractions *bool `json:"acceptsInteractions,omitempty" cborgen:"acceptsInteractions,omitempty"` 26 26 Avatar *util.LexBlob `json:"avatar,omitempty" cborgen:"avatar,omitempty"` 27 + ContentMode *string `json:"contentMode,omitempty" cborgen:"contentMode,omitempty"` 27 28 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 28 29 Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 29 30 DescriptionFacets []*RichtextFacet `json:"descriptionFacets,omitempty" cborgen:"descriptionFacets,omitempty"`
+23
api/bsky/feedthreadgate.go
··· 30 30 31 31 type FeedThreadgate_Allow_Elem struct { 32 32 FeedThreadgate_MentionRule *FeedThreadgate_MentionRule 33 + FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule 33 34 FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule 34 35 FeedThreadgate_ListRule *FeedThreadgate_ListRule 35 36 } ··· 38 39 if t.FeedThreadgate_MentionRule != nil { 39 40 t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" 40 41 return json.Marshal(t.FeedThreadgate_MentionRule) 42 + } 43 + if t.FeedThreadgate_FollowerRule != nil { 44 + t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" 45 + return json.Marshal(t.FeedThreadgate_FollowerRule) 41 46 } 42 47 if t.FeedThreadgate_FollowingRule != nil { 43 48 t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" ··· 59 64 case "app.bsky.feed.threadgate#mentionRule": 60 65 t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 61 66 return json.Unmarshal(b, t.FeedThreadgate_MentionRule) 67 + case "app.bsky.feed.threadgate#followerRule": 68 + t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 69 + return json.Unmarshal(b, t.FeedThreadgate_FollowerRule) 62 70 case "app.bsky.feed.threadgate#followingRule": 63 71 t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 64 72 return json.Unmarshal(b, t.FeedThreadgate_FollowingRule) ··· 80 88 if t.FeedThreadgate_MentionRule != nil { 81 89 return t.FeedThreadgate_MentionRule.MarshalCBOR(w) 82 90 } 91 + if t.FeedThreadgate_FollowerRule != nil { 92 + return t.FeedThreadgate_FollowerRule.MarshalCBOR(w) 93 + } 83 94 if t.FeedThreadgate_FollowingRule != nil { 84 95 return t.FeedThreadgate_FollowingRule.MarshalCBOR(w) 85 96 } ··· 98 109 case "app.bsky.feed.threadgate#mentionRule": 99 110 t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) 100 111 return t.FeedThreadgate_MentionRule.UnmarshalCBOR(bytes.NewReader(b)) 112 + case "app.bsky.feed.threadgate#followerRule": 113 + t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) 114 + return t.FeedThreadgate_FollowerRule.UnmarshalCBOR(bytes.NewReader(b)) 101 115 case "app.bsky.feed.threadgate#followingRule": 102 116 t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) 103 117 return t.FeedThreadgate_FollowingRule.UnmarshalCBOR(bytes.NewReader(b)) ··· 108 122 default: 109 123 return nil 110 124 } 125 + } 126 + 127 + // FeedThreadgate_FollowerRule is a "followerRule" in the app.bsky.feed.threadgate schema. 128 + // 129 + // Allow replies from actors who follow you. 130 + // 131 + // RECORDTYPE: FeedThreadgate_FollowerRule 132 + type FeedThreadgate_FollowerRule struct { 133 + LexiconTypeID string `json:"$type,const=app.bsky.feed.threadgate#followerRule" cborgen:"$type,const=app.bsky.feed.threadgate#followerRule"` 111 134 } 112 135 113 136 // FeedThreadgate_FollowingRule is a "followingRule" in the app.bsky.feed.threadgate schema.
+3 -1
api/bsky/graphgetSuggestedFollowsByActor.go
··· 13 13 // GraphGetSuggestedFollowsByActor_Output is the output of a app.bsky.graph.getSuggestedFollowsByActor call. 14 14 type GraphGetSuggestedFollowsByActor_Output struct { 15 15 // isFallback: If true, response has fallen-back to generic results, and is not scoped using relativeToDid 16 - IsFallback *bool `json:"isFallback,omitempty" cborgen:"isFallback,omitempty"` 16 + IsFallback *bool `json:"isFallback,omitempty" cborgen:"isFallback,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 17 19 Suggestions []*ActorDefs_ProfileView `json:"suggestions" cborgen:"suggestions"` 18 20 } 19 21
+35
api/bsky/graphsearchStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.graph.searchStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // GraphSearchStarterPacks_Output is the output of a app.bsky.graph.searchStarterPacks call. 14 + type GraphSearchStarterPacks_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + StarterPacks []*GraphDefs_StarterPackViewBasic `json:"starterPacks" cborgen:"starterPacks"` 17 + } 18 + 19 + // GraphSearchStarterPacks calls the XRPC method "app.bsky.graph.searchStarterPacks". 20 + // 21 + // q: Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 22 + func GraphSearchStarterPacks(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string) (*GraphSearchStarterPacks_Output, error) { 23 + var out GraphSearchStarterPacks_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "q": q, 29 + } 30 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.graph.searchStarterPacks", params, nil, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+4 -1
api/bsky/notificationlistNotifications.go
··· 35 35 } 36 36 37 37 // NotificationListNotifications calls the XRPC method "app.bsky.notification.listNotifications". 38 - func NotificationListNotifications(ctx context.Context, c *xrpc.Client, cursor string, limit int64, priority bool, seenAt string) (*NotificationListNotifications_Output, error) { 38 + // 39 + // reasons: Notification reasons to include in response. 40 + func NotificationListNotifications(ctx context.Context, c *xrpc.Client, cursor string, limit int64, priority bool, reasons []string, seenAt string) (*NotificationListNotifications_Output, error) { 39 41 var out NotificationListNotifications_Output 40 42 41 43 params := map[string]interface{}{ 42 44 "cursor": cursor, 43 45 "limit": limit, 44 46 "priority": priority, 47 + "reasons": reasons, 45 48 "seenAt": seenAt, 46 49 } 47 50 if err := c.Do(ctx, xrpc.Query, "", "app.bsky.notification.listNotifications", params, nil, &out); err != nil {
+13
api/bsky/unspecceddefs.go
··· 13 13 type UnspeccedDefs_SkeletonSearchPost struct { 14 14 Uri string `json:"uri" cborgen:"uri"` 15 15 } 16 + 17 + // UnspeccedDefs_SkeletonSearchStarterPack is a "skeletonSearchStarterPack" in the app.bsky.unspecced.defs schema. 18 + type UnspeccedDefs_SkeletonSearchStarterPack struct { 19 + Uri string `json:"uri" cborgen:"uri"` 20 + } 21 + 22 + // UnspeccedDefs_TrendingTopic is a "trendingTopic" in the app.bsky.unspecced.defs schema. 23 + type UnspeccedDefs_TrendingTopic struct { 24 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 25 + DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 26 + Link string `json:"link" cborgen:"link"` 27 + Topic string `json:"topic" cborgen:"topic"` 28 + }
+2
api/bsky/unspeccedgetSuggestionsSkeleton.go
··· 14 14 type UnspeccedGetSuggestionsSkeleton_Output struct { 15 15 Actors []*UnspeccedDefs_SkeletonSearchActor `json:"actors" cborgen:"actors"` 16 16 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // recId: Snowflake for this recommendation, use when submitting recommendation events. 18 + RecId *int64 `json:"recId,omitempty" cborgen:"recId,omitempty"` 17 19 // relativeToDid: DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. 18 20 RelativeToDid *string `json:"relativeToDid,omitempty" cborgen:"relativeToDid,omitempty"` 19 21 }
+34
api/bsky/unspeccedgetTrendingTopics.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getTrendingTopics 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedGetTrendingTopics_Output is the output of a app.bsky.unspecced.getTrendingTopics call. 14 + type UnspeccedGetTrendingTopics_Output struct { 15 + Suggested []*UnspeccedDefs_TrendingTopic `json:"suggested" cborgen:"suggested"` 16 + Topics []*UnspeccedDefs_TrendingTopic `json:"topics" cborgen:"topics"` 17 + } 18 + 19 + // UnspeccedGetTrendingTopics calls the XRPC method "app.bsky.unspecced.getTrendingTopics". 20 + // 21 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. 22 + func UnspeccedGetTrendingTopics(ctx context.Context, c *xrpc.Client, limit int64, viewer string) (*UnspeccedGetTrendingTopics_Output, error) { 23 + var out UnspeccedGetTrendingTopics_Output 24 + 25 + params := map[string]interface{}{ 26 + "limit": limit, 27 + "viewer": viewer, 28 + } 29 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.getTrendingTopics", params, nil, &out); err != nil { 30 + return nil, err 31 + } 32 + 33 + return &out, nil 34 + }
+40
api/bsky/unspeccedsearchStarterPacksSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.searchStarterPacksSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // UnspeccedSearchStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.searchStarterPacksSkeleton call. 14 + type UnspeccedSearchStarterPacksSkeleton_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + // hitsTotal: Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. 17 + HitsTotal *int64 `json:"hitsTotal,omitempty" cborgen:"hitsTotal,omitempty"` 18 + StarterPacks []*UnspeccedDefs_SkeletonSearchStarterPack `json:"starterPacks" cborgen:"starterPacks"` 19 + } 20 + 21 + // UnspeccedSearchStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.searchStarterPacksSkeleton". 22 + // 23 + // cursor: Optional pagination mechanism; may not necessarily allow scrolling through entire result set. 24 + // q: Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. 25 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 26 + func UnspeccedSearchStarterPacksSkeleton(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, viewer string) (*UnspeccedSearchStarterPacksSkeleton_Output, error) { 27 + var out UnspeccedSearchStarterPacksSkeleton_Output 28 + 29 + params := map[string]interface{}{ 30 + "cursor": cursor, 31 + "limit": limit, 32 + "q": q, 33 + "viewer": viewer, 34 + } 35 + if err := c.Do(ctx, xrpc.Query, "", "app.bsky.unspecced.searchStarterPacksSkeleton", params, nil, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+1
api/chat/convodefs.go
··· 18 18 LastMessage *ConvoDefs_ConvoView_LastMessage `json:"lastMessage,omitempty" cborgen:"lastMessage,omitempty"` 19 19 Members []*ActorDefs_ProfileViewBasic `json:"members" cborgen:"members"` 20 20 Muted bool `json:"muted" cborgen:"muted"` 21 + Opened *bool `json:"opened,omitempty" cborgen:"opened,omitempty"` 21 22 Rev string `json:"rev" cborgen:"rev"` 22 23 UnreadCount int64 `json:"unreadCount" cborgen:"unreadCount"` 23 24 }
+57 -13
api/ozone/moderationdefs.go
··· 40 40 UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 41 41 } 42 42 43 + // ModerationDefs_AccountStats is a "accountStats" in the tools.ozone.moderation.defs schema. 44 + // 45 + // Statistics about a particular account subject 46 + type ModerationDefs_AccountStats struct { 47 + // appealCount: Total number of appeals against a moderation action on the account 48 + AppealCount *int64 `json:"appealCount,omitempty" cborgen:"appealCount,omitempty"` 49 + // escalateCount: Number of times the account was escalated 50 + EscalateCount *int64 `json:"escalateCount,omitempty" cborgen:"escalateCount,omitempty"` 51 + // reportCount: Total number of reports on the account 52 + ReportCount *int64 `json:"reportCount,omitempty" cborgen:"reportCount,omitempty"` 53 + // suspendCount: Number of times the account was suspended 54 + SuspendCount *int64 `json:"suspendCount,omitempty" cborgen:"suspendCount,omitempty"` 55 + // takedownCount: Number of times the account was taken down 56 + TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` 57 + } 58 + 43 59 // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 44 60 type ModerationDefs_BlobView struct { 45 61 Cid string `json:"cid" cborgen:"cid"` ··· 172 188 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` 173 189 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 174 190 CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` 191 + // durationInHours: Indicates how long the label will remain on the subject. Only applies on labels that are being added. 192 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 175 193 NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` 176 194 } 177 195 ··· 800 818 Uri string `json:"uri" cborgen:"uri"` 801 819 } 802 820 821 + // ModerationDefs_RecordsStats is a "recordsStats" in the tools.ozone.moderation.defs schema. 822 + // 823 + // Statistics about a set of record subject items 824 + type ModerationDefs_RecordsStats struct { 825 + // appealedCount: Number of items that were appealed at least once 826 + AppealedCount *int64 `json:"appealedCount,omitempty" cborgen:"appealedCount,omitempty"` 827 + // escalatedCount: Number of items that were escalated at least once 828 + EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 829 + // pendingCount: Number of item currently in "reviewOpen" or "reviewEscalated" state 830 + PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 831 + // processedCount: Number of item currently in "reviewNone" or "reviewClosed" state 832 + ProcessedCount *int64 `json:"processedCount,omitempty" cborgen:"processedCount,omitempty"` 833 + // reportedCount: Number of items that were reported at least once 834 + ReportedCount *int64 `json:"reportedCount,omitempty" cborgen:"reportedCount,omitempty"` 835 + // subjectCount: Total number of item in the set 836 + SubjectCount *int64 `json:"subjectCount,omitempty" cborgen:"subjectCount,omitempty"` 837 + // takendownCount: Number of item currently taken down 838 + TakendownCount *int64 `json:"takendownCount,omitempty" cborgen:"takendownCount,omitempty"` 839 + // totalReports: Cumulative sum of the number of reports on the items in the set 840 + TotalReports *int64 `json:"totalReports,omitempty" cborgen:"totalReports,omitempty"` 841 + } 842 + 803 843 // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. 804 844 // 805 845 // RECORDTYPE: ModerationDefs_RepoView ··· 849 889 850 890 // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. 851 891 type ModerationDefs_SubjectStatusView struct { 892 + // accountStats: Statistics related to the account subject 893 + AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` 852 894 // appealed: True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. 853 895 Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 854 896 // comment: Sticky comment on the subject. ··· 858 900 Hosting *ModerationDefs_SubjectStatusView_Hosting `json:"hosting,omitempty" cborgen:"hosting,omitempty"` 859 901 Id int64 `json:"id" cborgen:"id"` 860 902 // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 861 - LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 862 - LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 863 - LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 864 - LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 865 - MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` 866 - MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 867 - ReviewState *string `json:"reviewState" cborgen:"reviewState"` 868 - Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 869 - SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 870 - SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 871 - SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 872 - Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 873 - Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 903 + LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 904 + LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 905 + LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 906 + LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 907 + MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` 908 + MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 909 + // recordsStats: Statistics related to the record subjects authored by the subject's account 910 + RecordsStats *ModerationDefs_RecordsStats `json:"recordsStats,omitempty" cborgen:"recordsStats,omitempty"` 911 + ReviewState *string `json:"reviewState" cborgen:"reviewState"` 912 + Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 913 + SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 914 + SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 915 + SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 916 + Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 917 + Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 874 918 // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 875 919 UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 876 920 }
+37 -31
api/ozone/moderationqueryStatuses.go
··· 29 29 // includeAllUserRecords: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. 30 30 // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 31 31 // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 32 + // minAccountSuspendCount: If specified, only subjects that belong to an account that has at least this many suspensions will be returned. 33 + // minReportedRecordsCount: If specified, only subjects that belong to an account that has at least this many reported records will be returned. 34 + // minTakendownRecordsCount: If specified, only subjects that belong to an account that has at least this many taken down records will be returned. 32 35 // onlyMuted: When set to true, only muted subjects and reporters will be returned. 33 36 // queueCount: Number of queues being used by moderators. Subjects will be split among all queues. 34 37 // queueIndex: Index of the queue to fetch subjects from. Works only when queueCount value is specified. ··· 41 44 // subject: The subject to get the status for. 42 45 // subjectType: If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. 43 46 // takendown: Get subjects that were taken down 44 - func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 47 + func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 45 48 var out ModerationQueryStatuses_Output 46 49 47 50 params := map[string]interface{}{ 48 - "appealed": appealed, 49 - "collections": collections, 50 - "comment": comment, 51 - "cursor": cursor, 52 - "excludeTags": excludeTags, 53 - "hostingDeletedAfter": hostingDeletedAfter, 54 - "hostingDeletedBefore": hostingDeletedBefore, 55 - "hostingStatuses": hostingStatuses, 56 - "hostingUpdatedAfter": hostingUpdatedAfter, 57 - "hostingUpdatedBefore": hostingUpdatedBefore, 58 - "ignoreSubjects": ignoreSubjects, 59 - "includeAllUserRecords": includeAllUserRecords, 60 - "includeMuted": includeMuted, 61 - "lastReviewedBy": lastReviewedBy, 62 - "limit": limit, 63 - "onlyMuted": onlyMuted, 64 - "queueCount": queueCount, 65 - "queueIndex": queueIndex, 66 - "queueSeed": queueSeed, 67 - "reportedAfter": reportedAfter, 68 - "reportedBefore": reportedBefore, 69 - "reviewState": reviewState, 70 - "reviewedAfter": reviewedAfter, 71 - "reviewedBefore": reviewedBefore, 72 - "sortDirection": sortDirection, 73 - "sortField": sortField, 74 - "subject": subject, 75 - "subjectType": subjectType, 76 - "tags": tags, 77 - "takendown": takendown, 51 + "appealed": appealed, 52 + "collections": collections, 53 + "comment": comment, 54 + "cursor": cursor, 55 + "excludeTags": excludeTags, 56 + "hostingDeletedAfter": hostingDeletedAfter, 57 + "hostingDeletedBefore": hostingDeletedBefore, 58 + "hostingStatuses": hostingStatuses, 59 + "hostingUpdatedAfter": hostingUpdatedAfter, 60 + "hostingUpdatedBefore": hostingUpdatedBefore, 61 + "ignoreSubjects": ignoreSubjects, 62 + "includeAllUserRecords": includeAllUserRecords, 63 + "includeMuted": includeMuted, 64 + "lastReviewedBy": lastReviewedBy, 65 + "limit": limit, 66 + "minAccountSuspendCount": minAccountSuspendCount, 67 + "minReportedRecordsCount": minReportedRecordsCount, 68 + "minTakendownRecordsCount": minTakendownRecordsCount, 69 + "onlyMuted": onlyMuted, 70 + "queueCount": queueCount, 71 + "queueIndex": queueIndex, 72 + "queueSeed": queueSeed, 73 + "reportedAfter": reportedAfter, 74 + "reportedBefore": reportedBefore, 75 + "reviewState": reviewState, 76 + "reviewedAfter": reviewedAfter, 77 + "reviewedBefore": reviewedBefore, 78 + "sortDirection": sortDirection, 79 + "sortField": sortField, 80 + "subject": subject, 81 + "subjectType": subjectType, 82 + "tags": tags, 83 + "takendown": takendown, 78 84 } 79 85 if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { 80 86 return nil, err
+1 -1
cmd/gosky/bsky.go
··· 335 335 return err 336 336 } 337 337 338 - notifs, err := appbsky.NotificationListNotifications(ctx, xrpcc, "", 50, false, "") 338 + notifs, err := appbsky.NotificationListNotifications(ctx, xrpcc, "", 50, false, nil, "") 339 339 if err != nil { 340 340 return err 341 341 }
+1 -1
fakedata/generators.go
··· 390 390 func BrowseAccount(xrpcc *xrpc.Client, acc *AccountContext) error { 391 391 // fetch notifications 392 392 maxNotif := 50 393 - resp, err := appbsky.NotificationListNotifications(context.TODO(), xrpcc, "", int64(maxNotif), false, "") 393 + resp, err := appbsky.NotificationListNotifications(context.TODO(), xrpcc, "", int64(maxNotif), false, nil, "") 394 394 if err != nil { 395 395 return err 396 396 }
+2
gen/main.go
··· 62 62 bsky.FeedThreadgate{}, 63 63 bsky.FeedThreadgate_ListRule{}, 64 64 bsky.FeedThreadgate_MentionRule{}, 65 + bsky.FeedThreadgate_FollowerRule{}, 65 66 bsky.FeedThreadgate_FollowingRule{}, 66 67 bsky.GraphStarterpack_FeedItem{}, 67 68 bsky.GraphStarterpack{}, ··· 88 89 } 89 90 90 91 if err := genCfg.WriteMapEncodersToFile("api/atproto/cbor_gen.go", "atproto", 92 + atproto.LexiconSchema{}, 91 93 atproto.RepoStrongRef{}, 92 94 atproto.SyncSubscribeRepos_Commit{}, 93 95 atproto.SyncSubscribeRepos_Handle{},
+1 -1
testing/utils.go
··· 471 471 t.Helper() 472 472 473 473 ctx := context.TODO() 474 - resp, err := bsky.NotificationListNotifications(ctx, u.client, "", 100, false, "") 474 + resp, err := bsky.NotificationListNotifications(ctx, u.client, "", 100, false, nil, "") 475 475 if err != nil { 476 476 t.Fatal(err) 477 477 }