fork of indigo with slightly nicer lexgen
fork

Configure Feed

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

update chat.bsky lexgen

+313 -23
+33
api/chat/convoaddReaction.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.addReaction 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoAddReaction_Input is the input argument to a chat.bsky.convo.addReaction call. 14 + type ConvoAddReaction_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId string `json:"messageId" cborgen:"messageId"` 17 + Value string `json:"value" cborgen:"value"` 18 + } 19 + 20 + // ConvoAddReaction_Output is the output of a chat.bsky.convo.addReaction call. 21 + type ConvoAddReaction_Output struct { 22 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 23 + } 24 + 25 + // ConvoAddReaction calls the XRPC method "chat.bsky.convo.addReaction". 26 + func ConvoAddReaction(ctx context.Context, c *xrpc.Client, input *ConvoAddReaction_Input) (*ConvoAddReaction_Output, error) { 27 + var out ConvoAddReaction_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.addReaction", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+170 -18
api/chat/convodefs.go
··· 14 14 15 15 // ConvoDefs_ConvoView is a "convoView" in the chat.bsky.convo.defs schema. 16 16 type ConvoDefs_ConvoView struct { 17 - Id string `json:"id" cborgen:"id"` 18 - LastMessage *ConvoDefs_ConvoView_LastMessage `json:"lastMessage,omitempty" cborgen:"lastMessage,omitempty"` 19 - Members []*ActorDefs_ProfileViewBasic `json:"members" cborgen:"members"` 20 - Muted bool `json:"muted" cborgen:"muted"` 21 - Rev string `json:"rev" cborgen:"rev"` 22 - Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 23 - UnreadCount int64 `json:"unreadCount" cborgen:"unreadCount"` 17 + Id string `json:"id" cborgen:"id"` 18 + LastMessage *ConvoDefs_ConvoView_LastMessage `json:"lastMessage,omitempty" cborgen:"lastMessage,omitempty"` 19 + LastReaction *ConvoDefs_ConvoView_LastReaction `json:"lastReaction,omitempty" cborgen:"lastReaction,omitempty"` 20 + Members []*ActorDefs_ProfileViewBasic `json:"members" cborgen:"members"` 21 + Muted bool `json:"muted" cborgen:"muted"` 22 + Rev string `json:"rev" cborgen:"rev"` 23 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 24 + UnreadCount int64 `json:"unreadCount" cborgen:"unreadCount"` 24 25 } 25 26 26 27 type ConvoDefs_ConvoView_LastMessage struct { ··· 58 59 } 59 60 } 60 61 62 + type ConvoDefs_ConvoView_LastReaction struct { 63 + ConvoDefs_MessageAndReactionView *ConvoDefs_MessageAndReactionView 64 + } 65 + 66 + func (t *ConvoDefs_ConvoView_LastReaction) MarshalJSON() ([]byte, error) { 67 + if t.ConvoDefs_MessageAndReactionView != nil { 68 + t.ConvoDefs_MessageAndReactionView.LexiconTypeID = "chat.bsky.convo.defs#messageAndReactionView" 69 + return json.Marshal(t.ConvoDefs_MessageAndReactionView) 70 + } 71 + return nil, fmt.Errorf("cannot marshal empty enum") 72 + } 73 + func (t *ConvoDefs_ConvoView_LastReaction) UnmarshalJSON(b []byte) error { 74 + typ, err := util.TypeExtract(b) 75 + if err != nil { 76 + return err 77 + } 78 + 79 + switch typ { 80 + case "chat.bsky.convo.defs#messageAndReactionView": 81 + t.ConvoDefs_MessageAndReactionView = new(ConvoDefs_MessageAndReactionView) 82 + return json.Unmarshal(b, t.ConvoDefs_MessageAndReactionView) 83 + 84 + default: 85 + return nil 86 + } 87 + } 88 + 61 89 // ConvoDefs_DeletedMessageView is a "deletedMessageView" in the chat.bsky.convo.defs schema. 62 90 // 63 91 // RECORDTYPE: ConvoDefs_DeletedMessageView ··· 78 106 Rev string `json:"rev" cborgen:"rev"` 79 107 } 80 108 109 + // ConvoDefs_LogAddReaction is a "logAddReaction" in the chat.bsky.convo.defs schema. 110 + // 111 + // RECORDTYPE: ConvoDefs_LogAddReaction 112 + type ConvoDefs_LogAddReaction struct { 113 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAddReaction" cborgen:"$type,const=chat.bsky.convo.defs#logAddReaction"` 114 + ConvoId string `json:"convoId" cborgen:"convoId"` 115 + Message *ConvoDefs_LogAddReaction_Message `json:"message" cborgen:"message"` 116 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 117 + Rev string `json:"rev" cborgen:"rev"` 118 + } 119 + 120 + type ConvoDefs_LogAddReaction_Message struct { 121 + ConvoDefs_MessageView *ConvoDefs_MessageView 122 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 123 + } 124 + 125 + func (t *ConvoDefs_LogAddReaction_Message) MarshalJSON() ([]byte, error) { 126 + if t.ConvoDefs_MessageView != nil { 127 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 128 + return json.Marshal(t.ConvoDefs_MessageView) 129 + } 130 + if t.ConvoDefs_DeletedMessageView != nil { 131 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 132 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 133 + } 134 + return nil, fmt.Errorf("cannot marshal empty enum") 135 + } 136 + func (t *ConvoDefs_LogAddReaction_Message) UnmarshalJSON(b []byte) error { 137 + typ, err := util.TypeExtract(b) 138 + if err != nil { 139 + return err 140 + } 141 + 142 + switch typ { 143 + case "chat.bsky.convo.defs#messageView": 144 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 145 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 146 + case "chat.bsky.convo.defs#deletedMessageView": 147 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 148 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 149 + 150 + default: 151 + return nil 152 + } 153 + } 154 + 81 155 // ConvoDefs_LogBeginConvo is a "logBeginConvo" in the chat.bsky.convo.defs schema. 82 156 // 83 157 // RECORDTYPE: ConvoDefs_LogBeginConvo ··· 187 261 } 188 262 189 263 // ConvoDefs_LogMuteConvo is a "logMuteConvo" in the chat.bsky.convo.defs schema. 264 + // 265 + // RECORDTYPE: ConvoDefs_LogMuteConvo 190 266 type ConvoDefs_LogMuteConvo struct { 191 - ConvoId string `json:"convoId" cborgen:"convoId"` 192 - Rev string `json:"rev" cborgen:"rev"` 267 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logMuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logMuteConvo"` 268 + ConvoId string `json:"convoId" cborgen:"convoId"` 269 + Rev string `json:"rev" cborgen:"rev"` 193 270 } 194 271 195 272 // ConvoDefs_LogReadMessage is a "logReadMessage" in the chat.bsky.convo.defs schema. 273 + // 274 + // RECORDTYPE: ConvoDefs_LogReadMessage 196 275 type ConvoDefs_LogReadMessage struct { 197 - ConvoId string `json:"convoId" cborgen:"convoId"` 198 - Message *ConvoDefs_LogReadMessage_Message `json:"message" cborgen:"message"` 199 - Rev string `json:"rev" cborgen:"rev"` 276 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logReadMessage" cborgen:"$type,const=chat.bsky.convo.defs#logReadMessage"` 277 + ConvoId string `json:"convoId" cborgen:"convoId"` 278 + Message *ConvoDefs_LogReadMessage_Message `json:"message" cborgen:"message"` 279 + Rev string `json:"rev" cborgen:"rev"` 200 280 } 201 281 202 282 type ConvoDefs_LogReadMessage_Message struct { ··· 234 314 } 235 315 } 236 316 317 + // ConvoDefs_LogRemoveReaction is a "logRemoveReaction" in the chat.bsky.convo.defs schema. 318 + // 319 + // RECORDTYPE: ConvoDefs_LogRemoveReaction 320 + type ConvoDefs_LogRemoveReaction struct { 321 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logRemoveReaction" cborgen:"$type,const=chat.bsky.convo.defs#logRemoveReaction"` 322 + ConvoId string `json:"convoId" cborgen:"convoId"` 323 + Message *ConvoDefs_LogRemoveReaction_Message `json:"message" cborgen:"message"` 324 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 325 + Rev string `json:"rev" cborgen:"rev"` 326 + } 327 + 328 + type ConvoDefs_LogRemoveReaction_Message struct { 329 + ConvoDefs_MessageView *ConvoDefs_MessageView 330 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 331 + } 332 + 333 + func (t *ConvoDefs_LogRemoveReaction_Message) MarshalJSON() ([]byte, error) { 334 + if t.ConvoDefs_MessageView != nil { 335 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 336 + return json.Marshal(t.ConvoDefs_MessageView) 337 + } 338 + if t.ConvoDefs_DeletedMessageView != nil { 339 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 340 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 341 + } 342 + return nil, fmt.Errorf("cannot marshal empty enum") 343 + } 344 + func (t *ConvoDefs_LogRemoveReaction_Message) UnmarshalJSON(b []byte) error { 345 + typ, err := util.TypeExtract(b) 346 + if err != nil { 347 + return err 348 + } 349 + 350 + switch typ { 351 + case "chat.bsky.convo.defs#messageView": 352 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 353 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 354 + case "chat.bsky.convo.defs#deletedMessageView": 355 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 356 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 357 + 358 + default: 359 + return nil 360 + } 361 + } 362 + 237 363 // ConvoDefs_LogUnmuteConvo is a "logUnmuteConvo" in the chat.bsky.convo.defs schema. 364 + // 365 + // RECORDTYPE: ConvoDefs_LogUnmuteConvo 238 366 type ConvoDefs_LogUnmuteConvo struct { 239 - ConvoId string `json:"convoId" cborgen:"convoId"` 240 - Rev string `json:"rev" cborgen:"rev"` 367 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logUnmuteConvo" cborgen:"$type,const=chat.bsky.convo.defs#logUnmuteConvo"` 368 + ConvoId string `json:"convoId" cborgen:"convoId"` 369 + Rev string `json:"rev" cborgen:"rev"` 370 + } 371 + 372 + // ConvoDefs_MessageAndReactionView is a "messageAndReactionView" in the chat.bsky.convo.defs schema. 373 + // 374 + // RECORDTYPE: ConvoDefs_MessageAndReactionView 375 + type ConvoDefs_MessageAndReactionView struct { 376 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#messageAndReactionView" cborgen:"$type,const=chat.bsky.convo.defs#messageAndReactionView"` 377 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 378 + Reaction *ConvoDefs_ReactionView `json:"reaction" cborgen:"reaction"` 241 379 } 242 380 243 381 // ConvoDefs_MessageInput is the input argument to a chat.bsky.convo.defs call. ··· 294 432 // facets: Annotations of text (mentions, URLs, hashtags, etc) 295 433 Facets []*appbskytypes.RichtextFacet `json:"facets,omitempty" cborgen:"facets,omitempty"` 296 434 Id string `json:"id" cborgen:"id"` 297 - Rev string `json:"rev" cborgen:"rev"` 298 - Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` 299 - SentAt string `json:"sentAt" cborgen:"sentAt"` 300 - Text string `json:"text" cborgen:"text"` 435 + // reactions: Reactions to this message, in ascending order of creation time. 436 + Reactions []*ConvoDefs_ReactionView `json:"reactions,omitempty" cborgen:"reactions,omitempty"` 437 + Rev string `json:"rev" cborgen:"rev"` 438 + Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` 439 + SentAt string `json:"sentAt" cborgen:"sentAt"` 440 + Text string `json:"text" cborgen:"text"` 301 441 } 302 442 303 443 // ConvoDefs_MessageViewSender is a "messageViewSender" in the chat.bsky.convo.defs schema. ··· 331 471 return nil 332 472 } 333 473 } 474 + 475 + // ConvoDefs_ReactionView is a "reactionView" in the chat.bsky.convo.defs schema. 476 + type ConvoDefs_ReactionView struct { 477 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 478 + Sender *ConvoDefs_ReactionViewSender `json:"sender" cborgen:"sender"` 479 + Value string `json:"value" cborgen:"value"` 480 + } 481 + 482 + // ConvoDefs_ReactionViewSender is a "reactionViewSender" in the chat.bsky.convo.defs schema. 483 + type ConvoDefs_ReactionViewSender struct { 484 + Did string `json:"did" cborgen:"did"` 485 + }
+45 -5
api/chat/convogetLog.go
··· 20 20 } 21 21 22 22 type ConvoGetLog_Output_Logs_Elem struct { 23 - ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 24 - ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 25 - ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 26 - ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 27 - ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage 23 + ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 24 + ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 25 + ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 26 + ConvoDefs_LogMuteConvo *ConvoDefs_LogMuteConvo 27 + ConvoDefs_LogUnmuteConvo *ConvoDefs_LogUnmuteConvo 28 + ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 29 + ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage 30 + ConvoDefs_LogReadMessage *ConvoDefs_LogReadMessage 31 + ConvoDefs_LogAddReaction *ConvoDefs_LogAddReaction 32 + ConvoDefs_LogRemoveReaction *ConvoDefs_LogRemoveReaction 28 33 } 29 34 30 35 func (t *ConvoGetLog_Output_Logs_Elem) MarshalJSON() ([]byte, error) { ··· 40 45 t.ConvoDefs_LogLeaveConvo.LexiconTypeID = "chat.bsky.convo.defs#logLeaveConvo" 41 46 return json.Marshal(t.ConvoDefs_LogLeaveConvo) 42 47 } 48 + if t.ConvoDefs_LogMuteConvo != nil { 49 + t.ConvoDefs_LogMuteConvo.LexiconTypeID = "chat.bsky.convo.defs#logMuteConvo" 50 + return json.Marshal(t.ConvoDefs_LogMuteConvo) 51 + } 52 + if t.ConvoDefs_LogUnmuteConvo != nil { 53 + t.ConvoDefs_LogUnmuteConvo.LexiconTypeID = "chat.bsky.convo.defs#logUnmuteConvo" 54 + return json.Marshal(t.ConvoDefs_LogUnmuteConvo) 55 + } 43 56 if t.ConvoDefs_LogCreateMessage != nil { 44 57 t.ConvoDefs_LogCreateMessage.LexiconTypeID = "chat.bsky.convo.defs#logCreateMessage" 45 58 return json.Marshal(t.ConvoDefs_LogCreateMessage) ··· 48 61 t.ConvoDefs_LogDeleteMessage.LexiconTypeID = "chat.bsky.convo.defs#logDeleteMessage" 49 62 return json.Marshal(t.ConvoDefs_LogDeleteMessage) 50 63 } 64 + if t.ConvoDefs_LogReadMessage != nil { 65 + t.ConvoDefs_LogReadMessage.LexiconTypeID = "chat.bsky.convo.defs#logReadMessage" 66 + return json.Marshal(t.ConvoDefs_LogReadMessage) 67 + } 68 + if t.ConvoDefs_LogAddReaction != nil { 69 + t.ConvoDefs_LogAddReaction.LexiconTypeID = "chat.bsky.convo.defs#logAddReaction" 70 + return json.Marshal(t.ConvoDefs_LogAddReaction) 71 + } 72 + if t.ConvoDefs_LogRemoveReaction != nil { 73 + t.ConvoDefs_LogRemoveReaction.LexiconTypeID = "chat.bsky.convo.defs#logRemoveReaction" 74 + return json.Marshal(t.ConvoDefs_LogRemoveReaction) 75 + } 51 76 return nil, fmt.Errorf("cannot marshal empty enum") 52 77 } 53 78 func (t *ConvoGetLog_Output_Logs_Elem) UnmarshalJSON(b []byte) error { ··· 66 91 case "chat.bsky.convo.defs#logLeaveConvo": 67 92 t.ConvoDefs_LogLeaveConvo = new(ConvoDefs_LogLeaveConvo) 68 93 return json.Unmarshal(b, t.ConvoDefs_LogLeaveConvo) 94 + case "chat.bsky.convo.defs#logMuteConvo": 95 + t.ConvoDefs_LogMuteConvo = new(ConvoDefs_LogMuteConvo) 96 + return json.Unmarshal(b, t.ConvoDefs_LogMuteConvo) 97 + case "chat.bsky.convo.defs#logUnmuteConvo": 98 + t.ConvoDefs_LogUnmuteConvo = new(ConvoDefs_LogUnmuteConvo) 99 + return json.Unmarshal(b, t.ConvoDefs_LogUnmuteConvo) 69 100 case "chat.bsky.convo.defs#logCreateMessage": 70 101 t.ConvoDefs_LogCreateMessage = new(ConvoDefs_LogCreateMessage) 71 102 return json.Unmarshal(b, t.ConvoDefs_LogCreateMessage) 72 103 case "chat.bsky.convo.defs#logDeleteMessage": 73 104 t.ConvoDefs_LogDeleteMessage = new(ConvoDefs_LogDeleteMessage) 74 105 return json.Unmarshal(b, t.ConvoDefs_LogDeleteMessage) 106 + case "chat.bsky.convo.defs#logReadMessage": 107 + t.ConvoDefs_LogReadMessage = new(ConvoDefs_LogReadMessage) 108 + return json.Unmarshal(b, t.ConvoDefs_LogReadMessage) 109 + case "chat.bsky.convo.defs#logAddReaction": 110 + t.ConvoDefs_LogAddReaction = new(ConvoDefs_LogAddReaction) 111 + return json.Unmarshal(b, t.ConvoDefs_LogAddReaction) 112 + case "chat.bsky.convo.defs#logRemoveReaction": 113 + t.ConvoDefs_LogRemoveReaction = new(ConvoDefs_LogRemoveReaction) 114 + return json.Unmarshal(b, t.ConvoDefs_LogRemoveReaction) 75 115 76 116 default: 77 117 return nil
+33
api/chat/convoremoveReaction.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.removeReaction 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoRemoveReaction_Input is the input argument to a chat.bsky.convo.removeReaction call. 14 + type ConvoRemoveReaction_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + MessageId string `json:"messageId" cborgen:"messageId"` 17 + Value string `json:"value" cborgen:"value"` 18 + } 19 + 20 + // ConvoRemoveReaction_Output is the output of a chat.bsky.convo.removeReaction call. 21 + type ConvoRemoveReaction_Output struct { 22 + Message *ConvoDefs_MessageView `json:"message" cborgen:"message"` 23 + } 24 + 25 + // ConvoRemoveReaction calls the XRPC method "chat.bsky.convo.removeReaction". 26 + func ConvoRemoveReaction(ctx context.Context, c *xrpc.Client, input *ConvoRemoveReaction_Input) (*ConvoRemoveReaction_Output, error) { 27 + var out ConvoRemoveReaction_Output 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.removeReaction", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+32
api/chat/convoupdateAllRead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.updateAllRead 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoUpdateAllRead_Input is the input argument to a chat.bsky.convo.updateAllRead call. 14 + type ConvoUpdateAllRead_Input struct { 15 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 16 + } 17 + 18 + // ConvoUpdateAllRead_Output is the output of a chat.bsky.convo.updateAllRead call. 19 + type ConvoUpdateAllRead_Output struct { 20 + // updatedCount: The count of updated convos. 21 + UpdatedCount int64 `json:"updatedCount" cborgen:"updatedCount"` 22 + } 23 + 24 + // ConvoUpdateAllRead calls the XRPC method "chat.bsky.convo.updateAllRead". 25 + func ConvoUpdateAllRead(ctx context.Context, c *xrpc.Client, input *ConvoUpdateAllRead_Input) (*ConvoUpdateAllRead_Output, error) { 26 + var out ConvoUpdateAllRead_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.updateAllRead", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }