this repo has no description
0
fork

Configure Feed

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

lexgen

+179 -20
+5 -4
api/atproto/repoapplyWrites.go
··· 19 19 // 20 20 // RECORDTYPE: RepoApplyWrites_Create 21 21 type RepoApplyWrites_Create struct { 22 - LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#create" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` 23 - Collection string `json:"collection" cborgen:"collection"` 24 - Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` 25 - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 22 + LexiconTypeID string `json:"$type,const=com.atproto.repo.applyWrites#create" cborgen:"$type,const=com.atproto.repo.applyWrites#create"` 23 + Collection string `json:"collection" cborgen:"collection"` 24 + // rkey: NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. 25 + Rkey *string `json:"rkey,omitempty" cborgen:"rkey,omitempty"` 26 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 26 27 } 27 28 28 29 // RepoApplyWrites_CreateResult is a "createResult" in the com.atproto.repo.applyWrites schema.
+26 -12
api/atproto/syncsubscribeRepos.go
··· 26 26 // Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. 27 27 type SyncSubscribeRepos_Commit struct { 28 28 Blobs []util.LexLink `json:"blobs" cborgen:"blobs"` 29 - // blocks: CAR file containing relevant blocks, as a diff since the previous repo state. 29 + // blocks: CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. 30 30 Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` 31 31 // commit: Repo commit object CID. 32 - Commit util.LexLink `json:"commit" cborgen:"commit"` 33 - // prevData 34 - PrevData *util.LexLink `json:"prevData,omitempty" cborgen:"prevData,omitempty"` 35 - Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"` 36 - // prev: DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. 37 - Prev *util.LexLink `json:"prev" cborgen:"prev"` 32 + Commit util.LexLink `json:"commit" cborgen:"commit"` 33 + Ops []*SyncSubscribeRepos_RepoOp `json:"ops" cborgen:"ops"` 34 + // prevData: The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. 35 + PrevData *util.LexLink `json:"prevData,omitempty" cborgen:"prevData,omitempty"` 38 36 // rebase: DEPRECATED -- unused 39 37 Rebase bool `json:"rebase" cborgen:"rebase"` 40 - // repo: The repo this event comes from. 38 + // repo: The repo this event comes from. Note that all other message types name this field 'did'. 41 39 Repo string `json:"repo" cborgen:"repo"` 42 40 // rev: The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. 43 41 Rev string `json:"rev" cborgen:"rev"` ··· 47 45 Since *string `json:"since" cborgen:"since"` 48 46 // time: Timestamp of when this message was originally broadcast. 49 47 Time string `json:"time" cborgen:"time"` 50 - // tooBig: Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. 48 + // tooBig: DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. 51 49 TooBig bool `json:"tooBig" cborgen:"tooBig"` 52 50 } 53 51 ··· 94 92 type SyncSubscribeRepos_RepoOp struct { 95 93 Action string `json:"action" cborgen:"action"` 96 94 // cid: For creates and updates, the new record CID. For deletions, null. 97 - Cid *util.LexLink `json:"cid" cborgen:"cid"` 98 - // prev 95 + Cid *util.LexLink `json:"cid" cborgen:"cid"` 96 + Path string `json:"path" cborgen:"path"` 97 + // prev: For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. 99 98 Prev *util.LexLink `json:"prev,omitempty" cborgen:"prev,omitempty"` 100 - Path string `json:"path" cborgen:"path"` 99 + } 100 + 101 + // SyncSubscribeRepos_Sync is a "sync" in the com.atproto.sync.subscribeRepos schema. 102 + // 103 + // Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. 104 + type SyncSubscribeRepos_Sync struct { 105 + // blocks: CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. 106 + Blocks util.LexBytes `json:"blocks,omitempty" cborgen:"blocks,omitempty"` 107 + // did: The account this repo event corresponds to. Must match that in the commit object. 108 + Did string `json:"did" cborgen:"did"` 109 + // rev: The rev of the commit. This value must match that in the commit object. 110 + Rev string `json:"rev" cborgen:"rev"` 111 + // seq: The stream sequence number of this message. 112 + Seq int64 `json:"seq" cborgen:"seq"` 113 + // time: Timestamp of when this message was originally broadcast. 114 + Time string `json:"time" cborgen:"time"` 101 115 } 102 116 103 117 // SyncSubscribeRepos_Tombstone is a "tombstone" in the com.atproto.sync.subscribeRepos schema.
+32
api/chat/convoacceptConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.acceptConvo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoAcceptConvo_Input is the input argument to a chat.bsky.convo.acceptConvo call. 14 + type ConvoAcceptConvo_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // ConvoAcceptConvo_Output is the output of a chat.bsky.convo.acceptConvo call. 19 + type ConvoAcceptConvo_Output struct { 20 + // rev: Rev when the convo was accepted. If not present, the convo was already accepted. 21 + Rev *string `json:"rev,omitempty" cborgen:"rev,omitempty"` 22 + } 23 + 24 + // ConvoAcceptConvo calls the XRPC method "chat.bsky.convo.acceptConvo". 25 + func ConvoAcceptConvo(ctx context.Context, c *xrpc.Client, input *ConvoAcceptConvo_Input) (*ConvoAcceptConvo_Output, error) { 26 + var out ConvoAcceptConvo_Output 27 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "chat.bsky.convo.acceptConvo", nil, input, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+64 -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"` 22 21 Rev string `json:"rev" cborgen:"rev"` 22 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 23 23 UnreadCount int64 `json:"unreadCount" cborgen:"unreadCount"` 24 24 } 25 25 ··· 67 67 Rev string `json:"rev" cborgen:"rev"` 68 68 Sender *ConvoDefs_MessageViewSender `json:"sender" cborgen:"sender"` 69 69 SentAt string `json:"sentAt" cborgen:"sentAt"` 70 + } 71 + 72 + // ConvoDefs_LogAcceptConvo is a "logAcceptConvo" in the chat.bsky.convo.defs schema. 73 + // 74 + // RECORDTYPE: ConvoDefs_LogAcceptConvo 75 + type ConvoDefs_LogAcceptConvo struct { 76 + LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logAcceptConvo" cborgen:"$type,const=chat.bsky.convo.defs#logAcceptConvo"` 77 + ConvoId string `json:"convoId" cborgen:"convoId"` 78 + Rev string `json:"rev" cborgen:"rev"` 70 79 } 71 80 72 81 // ConvoDefs_LogBeginConvo is a "logBeginConvo" in the chat.bsky.convo.defs schema. ··· 175 184 LexiconTypeID string `json:"$type,const=chat.bsky.convo.defs#logLeaveConvo" cborgen:"$type,const=chat.bsky.convo.defs#logLeaveConvo"` 176 185 ConvoId string `json:"convoId" cborgen:"convoId"` 177 186 Rev string `json:"rev" cborgen:"rev"` 187 + } 188 + 189 + // ConvoDefs_LogMuteConvo is a "logMuteConvo" in the chat.bsky.convo.defs schema. 190 + type ConvoDefs_LogMuteConvo struct { 191 + ConvoId string `json:"convoId" cborgen:"convoId"` 192 + Rev string `json:"rev" cborgen:"rev"` 193 + } 194 + 195 + // ConvoDefs_LogReadMessage is a "logReadMessage" in the chat.bsky.convo.defs schema. 196 + 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"` 200 + } 201 + 202 + type ConvoDefs_LogReadMessage_Message struct { 203 + ConvoDefs_MessageView *ConvoDefs_MessageView 204 + ConvoDefs_DeletedMessageView *ConvoDefs_DeletedMessageView 205 + } 206 + 207 + func (t *ConvoDefs_LogReadMessage_Message) MarshalJSON() ([]byte, error) { 208 + if t.ConvoDefs_MessageView != nil { 209 + t.ConvoDefs_MessageView.LexiconTypeID = "chat.bsky.convo.defs#messageView" 210 + return json.Marshal(t.ConvoDefs_MessageView) 211 + } 212 + if t.ConvoDefs_DeletedMessageView != nil { 213 + t.ConvoDefs_DeletedMessageView.LexiconTypeID = "chat.bsky.convo.defs#deletedMessageView" 214 + return json.Marshal(t.ConvoDefs_DeletedMessageView) 215 + } 216 + return nil, fmt.Errorf("cannot marshal empty enum") 217 + } 218 + func (t *ConvoDefs_LogReadMessage_Message) UnmarshalJSON(b []byte) error { 219 + typ, err := util.TypeExtract(b) 220 + if err != nil { 221 + return err 222 + } 223 + 224 + switch typ { 225 + case "chat.bsky.convo.defs#messageView": 226 + t.ConvoDefs_MessageView = new(ConvoDefs_MessageView) 227 + return json.Unmarshal(b, t.ConvoDefs_MessageView) 228 + case "chat.bsky.convo.defs#deletedMessageView": 229 + t.ConvoDefs_DeletedMessageView = new(ConvoDefs_DeletedMessageView) 230 + return json.Unmarshal(b, t.ConvoDefs_DeletedMessageView) 231 + 232 + default: 233 + return nil 234 + } 235 + } 236 + 237 + // ConvoDefs_LogUnmuteConvo is a "logUnmuteConvo" in the chat.bsky.convo.defs schema. 238 + type ConvoDefs_LogUnmuteConvo struct { 239 + ConvoId string `json:"convoId" cborgen:"convoId"` 240 + Rev string `json:"rev" cborgen:"rev"` 178 241 } 179 242 180 243 // ConvoDefs_MessageInput is the input argument to a chat.bsky.convo.defs call.
+31
api/chat/convogetConvoAvailability.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package chat 4 + 5 + // schema: chat.bsky.convo.getConvoAvailability 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ConvoGetConvoAvailability_Output is the output of a chat.bsky.convo.getConvoAvailability call. 14 + type ConvoGetConvoAvailability_Output struct { 15 + CanChat bool `json:"canChat" cborgen:"canChat"` 16 + Convo *ConvoDefs_ConvoView `json:"convo,omitempty" cborgen:"convo,omitempty"` 17 + } 18 + 19 + // ConvoGetConvoAvailability calls the XRPC method "chat.bsky.convo.getConvoAvailability". 20 + func ConvoGetConvoAvailability(ctx context.Context, c *xrpc.Client, members []string) (*ConvoGetConvoAvailability_Output, error) { 21 + var out ConvoGetConvoAvailability_Output 22 + 23 + params := map[string]interface{}{ 24 + "members": members, 25 + } 26 + if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.getConvoAvailability", params, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+8
api/chat/convogetLog.go
··· 21 21 22 22 type ConvoGetLog_Output_Logs_Elem struct { 23 23 ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 24 + ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 24 25 ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 25 26 ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 26 27 ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage ··· 30 31 if t.ConvoDefs_LogBeginConvo != nil { 31 32 t.ConvoDefs_LogBeginConvo.LexiconTypeID = "chat.bsky.convo.defs#logBeginConvo" 32 33 return json.Marshal(t.ConvoDefs_LogBeginConvo) 34 + } 35 + if t.ConvoDefs_LogAcceptConvo != nil { 36 + t.ConvoDefs_LogAcceptConvo.LexiconTypeID = "chat.bsky.convo.defs#logAcceptConvo" 37 + return json.Marshal(t.ConvoDefs_LogAcceptConvo) 33 38 } 34 39 if t.ConvoDefs_LogLeaveConvo != nil { 35 40 t.ConvoDefs_LogLeaveConvo.LexiconTypeID = "chat.bsky.convo.defs#logLeaveConvo" ··· 55 60 case "chat.bsky.convo.defs#logBeginConvo": 56 61 t.ConvoDefs_LogBeginConvo = new(ConvoDefs_LogBeginConvo) 57 62 return json.Unmarshal(b, t.ConvoDefs_LogBeginConvo) 63 + case "chat.bsky.convo.defs#logAcceptConvo": 64 + t.ConvoDefs_LogAcceptConvo = new(ConvoDefs_LogAcceptConvo) 65 + return json.Unmarshal(b, t.ConvoDefs_LogAcceptConvo) 58 66 case "chat.bsky.convo.defs#logLeaveConvo": 59 67 t.ConvoDefs_LogLeaveConvo = new(ConvoDefs_LogLeaveConvo) 60 68 return json.Unmarshal(b, t.ConvoDefs_LogLeaveConvo)
+5 -3
api/chat/convolistConvos.go
··· 17 17 } 18 18 19 19 // ConvoListConvos calls the XRPC method "chat.bsky.convo.listConvos". 20 - func ConvoListConvos(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*ConvoListConvos_Output, error) { 20 + func ConvoListConvos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, readState string, status string) (*ConvoListConvos_Output, error) { 21 21 var out ConvoListConvos_Output 22 22 23 23 params := map[string]interface{}{ 24 - "cursor": cursor, 25 - "limit": limit, 24 + "cursor": cursor, 25 + "limit": limit, 26 + "readState": readState, 27 + "status": status, 26 28 } 27 29 if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil { 28 30 return nil, err
+8
api/ozone/moderationemitEvent.go
··· 36 36 ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 37 37 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 38 38 ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 39 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 39 40 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 40 41 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 41 42 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent ··· 95 96 if t.ModerationDefs_ModEventEmail != nil { 96 97 t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 97 98 return json.Marshal(t.ModerationDefs_ModEventEmail) 99 + } 100 + if t.ModerationDefs_ModEventDivert != nil { 101 + t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 102 + return json.Marshal(t.ModerationDefs_ModEventDivert) 98 103 } 99 104 if t.ModerationDefs_ModEventTag != nil { 100 105 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" ··· 164 169 case "tools.ozone.moderation.defs#modEventEmail": 165 170 t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 166 171 return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 172 + case "tools.ozone.moderation.defs#modEventDivert": 173 + t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 174 + return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 167 175 case "tools.ozone.moderation.defs#modEventTag": 168 176 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 169 177 return json.Unmarshal(b, t.ModerationDefs_ModEventTag)