This repository has no description
0

Configure Feed

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

codegen

+1780 -46
+36
api/atproto/lexiconresolveLexicon.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: com.atproto.lexicon.resolveLexicon 4 + 5 + package atproto 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // LexiconResolveLexicon_Output is the output of a com.atproto.lexicon.resolveLexicon call. 14 + type LexiconResolveLexicon_Output struct { 15 + // cid: The CID of the lexicon schema record. 16 + Cid string `json:"cid" cborgen:"cid"` 17 + // schema: The resolved lexicon schema record. 18 + Schema *LexiconSchema `json:"schema" cborgen:"schema"` 19 + // uri: The AT-URI of the lexicon schema record. 20 + Uri string `json:"uri" cborgen:"uri"` 21 + } 22 + 23 + // LexiconResolveLexicon calls the XRPC method "com.atproto.lexicon.resolveLexicon". 24 + // 25 + // nsid: The lexicon NSID to resolve. 26 + func LexiconResolveLexicon(ctx context.Context, c lexutil.LexClient, nsid string) (*LexiconResolveLexicon_Output, error) { 27 + var out LexiconResolveLexicon_Output 28 + 29 + params := map[string]interface{}{} 30 + params["nsid"] = nsid 31 + if err := c.LexDo(ctx, lexutil.Query, "", "com.atproto.lexicon.resolveLexicon", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+1 -1
api/atproto/servergetServiceAuth.go
··· 17 17 18 18 // ServerGetServiceAuth calls the XRPC method "com.atproto.server.getServiceAuth". 19 19 // 20 - // aud: The DID of the service that the token will be used to authenticate with 20 + // aud: The DID or `did#serviceId` reference of the service that the token will be used to authenticate with. 21 21 // exp: The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope. 22 22 // lxm: Lexicon (XRPC) method to bind the requested token to 23 23 func ServerGetServiceAuth(ctx context.Context, c lexutil.LexClient, aud string, exp int64, lxm string) (*ServerGetServiceAuth_Output, error) {
+9 -6
api/atproto/serverrefreshSession.go
··· 12 12 13 13 // ServerRefreshSession_Output is the output of a com.atproto.server.refreshSession call. 14 14 type ServerRefreshSession_Output struct { 15 - AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 16 - Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 17 - Did string `json:"did" cborgen:"did"` 18 - DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 19 - Handle string `json:"handle" cborgen:"handle"` 20 - RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 15 + AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 16 + Active *bool `json:"active,omitempty" cborgen:"active,omitempty"` 17 + Did string `json:"did" cborgen:"did"` 18 + DidDoc *interface{} `json:"didDoc,omitempty" cborgen:"didDoc,omitempty"` 19 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 20 + EmailAuthFactor *bool `json:"emailAuthFactor,omitempty" cborgen:"emailAuthFactor,omitempty"` 21 + EmailConfirmed *bool `json:"emailConfirmed,omitempty" cborgen:"emailConfirmed,omitempty"` 22 + Handle string `json:"handle" cborgen:"handle"` 23 + RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 21 24 // status: Hosting status of the account. If not specified, then assume 'active'. 22 25 Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 23 26 }
+4 -2
api/bsky/embedexternal.go
··· 48 48 49 49 // EmbedExternal_ViewExternal is a "viewExternal" in the app.bsky.embed.external schema. 50 50 type EmbedExternal_ViewExternal struct { 51 + // associatedProfiles: Profiles of the owners of the Atmosphere records that backed this view. 52 + AssociatedProfiles []*ActorDefs_ProfileViewBasic `json:"associatedProfiles,omitempty" cborgen:"associatedProfiles,omitempty"` 51 53 // associatedRefs: StrongRefs (uri+cid) of the Atmosphere records that backed this view. 52 54 AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` 53 55 // createdAt: When the external content was created, if available. Example: a publication date, for an article. ··· 72 74 // icon: Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View. 73 75 Icon *string `json:"icon,omitempty" cborgen:"icon,omitempty"` 74 76 Theme *EmbedExternal_ViewExternalSourceTheme `json:"theme,omitempty" cborgen:"theme,omitempty"` 75 - Title *string `json:"title,omitempty" cborgen:"title,omitempty"` 77 + Title string `json:"title" cborgen:"title"` 76 78 // uri: URI of the source, if available. Example: the https:// URL of a site.standard.publication record. 77 - Uri *string `json:"uri,omitempty" cborgen:"uri,omitempty"` 79 + Uri string `json:"uri" cborgen:"uri"` 78 80 } 79 81 80 82 // EmbedExternal_ViewExternalSourceTheme is a "viewExternalSourceTheme" in the app.bsky.embed.external schema.
+1 -1
api/bsky/embedgetEmbedExternalView.go
··· 16 16 AssociatedRecords []*lexutil.LexiconTypeDecoder `json:"associatedRecords,omitempty" cborgen:"associatedRecords,omitempty"` 17 17 // associatedRefs: StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs. 18 18 AssociatedRefs []*comatproto.RepoStrongRef `json:"associatedRefs,omitempty" cborgen:"associatedRefs,omitempty"` 19 - // view: Hydrated view of the embed. Present whenever at least one record was hydrated. `view.external.title` and `view.external.description` may be empty strings when the resolved records didn't supply them; clients should treat that as 'no enrichment for this field.' 19 + // view: Hydrated view of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required `viewExternal` fields. Omitted alongside the rest of the response when no records resolved or validation failed. 20 20 View *EmbedExternal_View `json:"view,omitempty" cborgen:"view,omitempty"` 21 21 } 22 22
+130
api/chat/cbor_gen.go
··· 206 206 207 207 return nil 208 208 } 209 + func (t *EmbedJoinLink) MarshalCBOR(w io.Writer) error { 210 + if t == nil { 211 + _, err := w.Write(cbg.CborNull) 212 + return err 213 + } 214 + 215 + cw := cbg.NewCborWriter(w) 216 + 217 + if _, err := cw.Write([]byte{162}); err != nil { 218 + return err 219 + } 220 + 221 + // t.Code (string) (string) 222 + if len("code") > 1000000 { 223 + return xerrors.Errorf("Value in field \"code\" was too long") 224 + } 225 + 226 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("code"))); err != nil { 227 + return err 228 + } 229 + if _, err := cw.WriteString(string("code")); err != nil { 230 + return err 231 + } 232 + 233 + if len(t.Code) > 1000000 { 234 + return xerrors.Errorf("Value in field t.Code was too long") 235 + } 236 + 237 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Code))); err != nil { 238 + return err 239 + } 240 + if _, err := cw.WriteString(string(t.Code)); err != nil { 241 + return err 242 + } 243 + 244 + // t.LexiconTypeID (string) (string) 245 + if len("$type") > 1000000 { 246 + return xerrors.Errorf("Value in field \"$type\" was too long") 247 + } 248 + 249 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("$type"))); err != nil { 250 + return err 251 + } 252 + if _, err := cw.WriteString(string("$type")); err != nil { 253 + return err 254 + } 255 + 256 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("chat.bsky.embed.joinLink"))); err != nil { 257 + return err 258 + } 259 + if _, err := cw.WriteString(string("chat.bsky.embed.joinLink")); err != nil { 260 + return err 261 + } 262 + return nil 263 + } 264 + 265 + func (t *EmbedJoinLink) UnmarshalCBOR(r io.Reader) (err error) { 266 + *t = EmbedJoinLink{} 267 + 268 + cr := cbg.NewCborReader(r) 269 + 270 + maj, extra, err := cr.ReadHeader() 271 + if err != nil { 272 + return err 273 + } 274 + defer func() { 275 + if err == io.EOF { 276 + err = io.ErrUnexpectedEOF 277 + } 278 + }() 279 + 280 + if maj != cbg.MajMap { 281 + return fmt.Errorf("cbor input should be of type map") 282 + } 283 + 284 + if extra > cbg.MaxLength { 285 + return fmt.Errorf("EmbedJoinLink: map struct too large (%d)", extra) 286 + } 287 + 288 + n := extra 289 + 290 + nameBuf := make([]byte, 5) 291 + for i := uint64(0); i < n; i++ { 292 + nameLen, ok, err := cbg.ReadFullStringIntoBuf(cr, nameBuf, 1000000) 293 + if err != nil { 294 + return err 295 + } 296 + 297 + if !ok { 298 + // Field doesn't exist on this type, so ignore it 299 + if err := cbg.ScanForLinks(cr, func(cid.Cid) {}); err != nil { 300 + return err 301 + } 302 + continue 303 + } 304 + 305 + switch string(nameBuf[:nameLen]) { 306 + // t.Code (string) (string) 307 + case "code": 308 + 309 + { 310 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 311 + if err != nil { 312 + return err 313 + } 314 + 315 + t.Code = string(sval) 316 + } 317 + // t.LexiconTypeID (string) (string) 318 + case "$type": 319 + 320 + { 321 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 322 + if err != nil { 323 + return err 324 + } 325 + 326 + t.LexiconTypeID = string(sval) 327 + } 328 + 329 + default: 330 + // Field doesn't exist on this type, so ignore it 331 + if err := cbg.ScanForLinks(r, func(cid.Cid) {}); err != nil { 332 + return err 333 + } 334 + } 335 + } 336 + 337 + return nil 338 + }
+53 -5
api/chat/convodefs.go
··· 14 14 15 15 // ConvoDefs_ConvoRef is a "convoRef" in the chat.bsky.convo.defs schema. 16 16 type ConvoDefs_ConvoRef struct { 17 - ConvoId string `json:"convoId" cborgen:"convoId"` 18 - Did string `json:"did" cborgen:"did"` 17 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#convoRef"` 18 + ConvoId string `json:"convoId" cborgen:"convoId"` 19 + Did string `json:"did" cborgen:"did"` 19 20 } 20 21 21 22 // ConvoDefs_ConvoView is a "convoView" in the chat.bsky.convo.defs schema. ··· 174 175 MemberLimit int64 `json:"memberLimit" cborgen:"memberLimit"` 175 176 // name: The display name of the group conversation. 176 177 Name string `json:"name" cborgen:"name"` 178 + // unreadJoinRequestCount: The number of unread join requests for the group conversation. Only present for the owner. 179 + UnreadJoinRequestCount *int64 `json:"unreadJoinRequestCount,omitempty" cborgen:"unreadJoinRequestCount,omitempty"` 177 180 } 178 181 179 182 // ConvoDefs_LogAcceptConvo is a "logAcceptConvo" in the chat.bsky.convo.defs schema. ··· 496 499 497 500 // ConvoDefs_LogOutgoingJoinRequest is a "logOutgoingJoinRequest" in the chat.bsky.convo.defs schema. 498 501 // 499 - // [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the viewer. 502 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the requester. Only requester actor gets this. 500 503 type ConvoDefs_LogOutgoingJoinRequest struct { 501 504 LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logOutgoingJoinRequest"` 502 505 ConvoId string `json:"convoId" cborgen:"convoId"` ··· 556 559 } 557 560 } 558 561 562 + // ConvoDefs_LogReadJoinRequests is a "logReadJoinRequests" in the chat.bsky.convo.defs schema. 563 + // 564 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the group owner marked join requests as read. Only the owner gets this. 565 + type ConvoDefs_LogReadJoinRequests struct { 566 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logReadJoinRequests"` 567 + ConvoId string `json:"convoId" cborgen:"convoId"` 568 + Rev string `json:"rev" cborgen:"rev"` 569 + } 570 + 559 571 // ConvoDefs_LogReadMessage is a "logReadMessage" in the chat.bsky.convo.defs schema. 560 572 // 561 573 // DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message. ··· 703 715 Rev string `json:"rev" cborgen:"rev"` 704 716 } 705 717 718 + // ConvoDefs_LogWithdrawIncomingJoinRequest is a "logWithdrawIncomingJoinRequest" in the chat.bsky.convo.defs schema. 719 + // 720 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a prospective member withdrew their join request. Only the owner gets this. 721 + type ConvoDefs_LogWithdrawIncomingJoinRequest struct { 722 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logWithdrawIncomingJoinRequest"` 723 + ConvoId string `json:"convoId" cborgen:"convoId"` 724 + // member: Prospective member who withdrew their join request. 725 + Member *ActorDefs_ProfileViewBasic `json:"member" cborgen:"member"` 726 + Rev string `json:"rev" cborgen:"rev"` 727 + } 728 + 729 + // ConvoDefs_LogWithdrawOutgoingJoinRequest is a "logWithdrawOutgoingJoinRequest" in the chat.bsky.convo.defs schema. 730 + // 731 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating the viewer withdrew their own join request. Only requester actor gets this. 732 + type ConvoDefs_LogWithdrawOutgoingJoinRequest struct { 733 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#logWithdrawOutgoingJoinRequest"` 734 + ConvoId string `json:"convoId" cborgen:"convoId"` 735 + Rev string `json:"rev" cborgen:"rev"` 736 + } 737 + 706 738 // ConvoDefs_MessageAndReactionView is a "messageAndReactionView" in the chat.bsky.convo.defs schema. 707 739 type ConvoDefs_MessageAndReactionView struct { 708 740 LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.convo.defs#messageAndReactionView"` ··· 719 751 } 720 752 721 753 type ConvoDefs_MessageInput_Embed struct { 722 - EmbedRecord *appbsky.EmbedRecord 754 + EmbedRecord *appbsky.EmbedRecord 755 + EmbedJoinLink *EmbedJoinLink 723 756 } 724 757 725 758 func (t *ConvoDefs_MessageInput_Embed) MarshalJSON() ([]byte, error) { ··· 727 760 t.EmbedRecord.LexiconTypeID = "app.bsky.embed.record" 728 761 return json.Marshal(t.EmbedRecord) 729 762 } 763 + if t.EmbedJoinLink != nil { 764 + t.EmbedJoinLink.LexiconTypeID = "chat.bsky.embed.joinLink" 765 + return json.Marshal(t.EmbedJoinLink) 766 + } 730 767 return nil, fmt.Errorf("can not marshal empty union as JSON") 731 768 } 732 769 ··· 740 777 case "app.bsky.embed.record": 741 778 t.EmbedRecord = new(appbsky.EmbedRecord) 742 779 return json.Unmarshal(b, t.EmbedRecord) 780 + case "chat.bsky.embed.joinLink": 781 + t.EmbedJoinLink = new(EmbedJoinLink) 782 + return json.Unmarshal(b, t.EmbedJoinLink) 743 783 default: 744 784 return nil 745 785 } ··· 774 814 } 775 815 776 816 type ConvoDefs_MessageView_Embed struct { 777 - EmbedRecord_View *appbsky.EmbedRecord_View 817 + EmbedRecord_View *appbsky.EmbedRecord_View 818 + EmbedJoinLink_View *EmbedJoinLink_View 778 819 } 779 820 780 821 func (t *ConvoDefs_MessageView_Embed) MarshalJSON() ([]byte, error) { ··· 782 823 t.EmbedRecord_View.LexiconTypeID = "app.bsky.embed.record#view" 783 824 return json.Marshal(t.EmbedRecord_View) 784 825 } 826 + if t.EmbedJoinLink_View != nil { 827 + t.EmbedJoinLink_View.LexiconTypeID = "chat.bsky.embed.joinLink#view" 828 + return json.Marshal(t.EmbedJoinLink_View) 829 + } 785 830 return nil, fmt.Errorf("can not marshal empty union as JSON") 786 831 } 787 832 ··· 795 840 case "app.bsky.embed.record#view": 796 841 t.EmbedRecord_View = new(appbsky.EmbedRecord_View) 797 842 return json.Unmarshal(b, t.EmbedRecord_View) 843 + case "chat.bsky.embed.joinLink#view": 844 + t.EmbedJoinLink_View = new(EmbedJoinLink_View) 845 + return json.Unmarshal(b, t.EmbedJoinLink_View) 798 846 default: 799 847 return nil 800 848 }
+51 -27
api/chat/convogetLog.go
··· 19 19 } 20 20 21 21 type ConvoGetLog_Output_Logs_Elem struct { 22 - ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 23 - ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 24 - ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 25 - ConvoDefs_LogMuteConvo *ConvoDefs_LogMuteConvo 26 - ConvoDefs_LogUnmuteConvo *ConvoDefs_LogUnmuteConvo 27 - ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 28 - ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage 29 - ConvoDefs_LogReadMessage *ConvoDefs_LogReadMessage 30 - ConvoDefs_LogAddReaction *ConvoDefs_LogAddReaction 31 - ConvoDefs_LogRemoveReaction *ConvoDefs_LogRemoveReaction 32 - ConvoDefs_LogReadConvo *ConvoDefs_LogReadConvo 33 - ConvoDefs_LogAddMember *ConvoDefs_LogAddMember 34 - ConvoDefs_LogRemoveMember *ConvoDefs_LogRemoveMember 35 - ConvoDefs_LogMemberJoin *ConvoDefs_LogMemberJoin 36 - ConvoDefs_LogMemberLeave *ConvoDefs_LogMemberLeave 37 - ConvoDefs_LogLockConvo *ConvoDefs_LogLockConvo 38 - ConvoDefs_LogUnlockConvo *ConvoDefs_LogUnlockConvo 39 - ConvoDefs_LogLockConvoPermanently *ConvoDefs_LogLockConvoPermanently 40 - ConvoDefs_LogEditGroup *ConvoDefs_LogEditGroup 41 - ConvoDefs_LogCreateJoinLink *ConvoDefs_LogCreateJoinLink 42 - ConvoDefs_LogEditJoinLink *ConvoDefs_LogEditJoinLink 43 - ConvoDefs_LogEnableJoinLink *ConvoDefs_LogEnableJoinLink 44 - ConvoDefs_LogDisableJoinLink *ConvoDefs_LogDisableJoinLink 45 - ConvoDefs_LogIncomingJoinRequest *ConvoDefs_LogIncomingJoinRequest 46 - ConvoDefs_LogApproveJoinRequest *ConvoDefs_LogApproveJoinRequest 47 - ConvoDefs_LogRejectJoinRequest *ConvoDefs_LogRejectJoinRequest 48 - ConvoDefs_LogOutgoingJoinRequest *ConvoDefs_LogOutgoingJoinRequest 22 + ConvoDefs_LogBeginConvo *ConvoDefs_LogBeginConvo 23 + ConvoDefs_LogAcceptConvo *ConvoDefs_LogAcceptConvo 24 + ConvoDefs_LogLeaveConvo *ConvoDefs_LogLeaveConvo 25 + ConvoDefs_LogMuteConvo *ConvoDefs_LogMuteConvo 26 + ConvoDefs_LogUnmuteConvo *ConvoDefs_LogUnmuteConvo 27 + ConvoDefs_LogCreateMessage *ConvoDefs_LogCreateMessage 28 + ConvoDefs_LogDeleteMessage *ConvoDefs_LogDeleteMessage 29 + ConvoDefs_LogReadMessage *ConvoDefs_LogReadMessage 30 + ConvoDefs_LogAddReaction *ConvoDefs_LogAddReaction 31 + ConvoDefs_LogRemoveReaction *ConvoDefs_LogRemoveReaction 32 + ConvoDefs_LogReadConvo *ConvoDefs_LogReadConvo 33 + ConvoDefs_LogAddMember *ConvoDefs_LogAddMember 34 + ConvoDefs_LogRemoveMember *ConvoDefs_LogRemoveMember 35 + ConvoDefs_LogMemberJoin *ConvoDefs_LogMemberJoin 36 + ConvoDefs_LogMemberLeave *ConvoDefs_LogMemberLeave 37 + ConvoDefs_LogLockConvo *ConvoDefs_LogLockConvo 38 + ConvoDefs_LogUnlockConvo *ConvoDefs_LogUnlockConvo 39 + ConvoDefs_LogLockConvoPermanently *ConvoDefs_LogLockConvoPermanently 40 + ConvoDefs_LogEditGroup *ConvoDefs_LogEditGroup 41 + ConvoDefs_LogCreateJoinLink *ConvoDefs_LogCreateJoinLink 42 + ConvoDefs_LogEditJoinLink *ConvoDefs_LogEditJoinLink 43 + ConvoDefs_LogEnableJoinLink *ConvoDefs_LogEnableJoinLink 44 + ConvoDefs_LogDisableJoinLink *ConvoDefs_LogDisableJoinLink 45 + ConvoDefs_LogIncomingJoinRequest *ConvoDefs_LogIncomingJoinRequest 46 + ConvoDefs_LogApproveJoinRequest *ConvoDefs_LogApproveJoinRequest 47 + ConvoDefs_LogRejectJoinRequest *ConvoDefs_LogRejectJoinRequest 48 + ConvoDefs_LogOutgoingJoinRequest *ConvoDefs_LogOutgoingJoinRequest 49 + ConvoDefs_LogWithdrawIncomingJoinRequest *ConvoDefs_LogWithdrawIncomingJoinRequest 50 + ConvoDefs_LogWithdrawOutgoingJoinRequest *ConvoDefs_LogWithdrawOutgoingJoinRequest 51 + ConvoDefs_LogReadJoinRequests *ConvoDefs_LogReadJoinRequests 49 52 } 50 53 51 54 func (t *ConvoGetLog_Output_Logs_Elem) MarshalJSON() ([]byte, error) { ··· 157 160 t.ConvoDefs_LogOutgoingJoinRequest.LexiconTypeID = "chat.bsky.convo.defs#logOutgoingJoinRequest" 158 161 return json.Marshal(t.ConvoDefs_LogOutgoingJoinRequest) 159 162 } 163 + if t.ConvoDefs_LogWithdrawIncomingJoinRequest != nil { 164 + t.ConvoDefs_LogWithdrawIncomingJoinRequest.LexiconTypeID = "chat.bsky.convo.defs#logWithdrawIncomingJoinRequest" 165 + return json.Marshal(t.ConvoDefs_LogWithdrawIncomingJoinRequest) 166 + } 167 + if t.ConvoDefs_LogWithdrawOutgoingJoinRequest != nil { 168 + t.ConvoDefs_LogWithdrawOutgoingJoinRequest.LexiconTypeID = "chat.bsky.convo.defs#logWithdrawOutgoingJoinRequest" 169 + return json.Marshal(t.ConvoDefs_LogWithdrawOutgoingJoinRequest) 170 + } 171 + if t.ConvoDefs_LogReadJoinRequests != nil { 172 + t.ConvoDefs_LogReadJoinRequests.LexiconTypeID = "chat.bsky.convo.defs#logReadJoinRequests" 173 + return json.Marshal(t.ConvoDefs_LogReadJoinRequests) 174 + } 160 175 return nil, fmt.Errorf("can not marshal empty union as JSON") 161 176 } 162 177 ··· 248 263 case "chat.bsky.convo.defs#logOutgoingJoinRequest": 249 264 t.ConvoDefs_LogOutgoingJoinRequest = new(ConvoDefs_LogOutgoingJoinRequest) 250 265 return json.Unmarshal(b, t.ConvoDefs_LogOutgoingJoinRequest) 266 + case "chat.bsky.convo.defs#logWithdrawIncomingJoinRequest": 267 + t.ConvoDefs_LogWithdrawIncomingJoinRequest = new(ConvoDefs_LogWithdrawIncomingJoinRequest) 268 + return json.Unmarshal(b, t.ConvoDefs_LogWithdrawIncomingJoinRequest) 269 + case "chat.bsky.convo.defs#logWithdrawOutgoingJoinRequest": 270 + t.ConvoDefs_LogWithdrawOutgoingJoinRequest = new(ConvoDefs_LogWithdrawOutgoingJoinRequest) 271 + return json.Unmarshal(b, t.ConvoDefs_LogWithdrawOutgoingJoinRequest) 272 + case "chat.bsky.convo.defs#logReadJoinRequests": 273 + t.ConvoDefs_LogReadJoinRequests = new(ConvoDefs_LogReadJoinRequests) 274 + return json.Unmarshal(b, t.ConvoDefs_LogReadJoinRequests) 251 275 default: 252 276 return nil 253 277 }
+26
api/chat/embedjoinLink.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.embed.joinLink 4 + 5 + package chat 6 + 7 + import ( 8 + lexutil "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + func init() { 12 + lexutil.RegisterType("chat.bsky.embed.joinLink#main", &EmbedJoinLink{}) 13 + } 14 + 15 + // EmbedJoinLink is a "main" in the chat.bsky.embed.joinLink schema. 16 + type EmbedJoinLink struct { 17 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.embed.joinLink"` 18 + // code: The join link code. 19 + Code string `json:"code" cborgen:"code"` 20 + } 21 + 22 + // EmbedJoinLink_View is a "view" in the chat.bsky.embed.joinLink schema. 23 + type EmbedJoinLink_View struct { 24 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.embed.joinLink#view"` 25 + JoinLinkPreview *GroupDefs_JoinLinkPreviewView `json:"joinLinkPreview" cborgen:"joinLinkPreview"` 26 + }
+30
api/chat/groupupdateJoinRequestsRead.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.group.updateJoinRequestsRead 4 + 5 + package chat 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // GroupUpdateJoinRequestsRead_Input is the input argument to a chat.bsky.group.updateJoinRequestsRead call. 14 + type GroupUpdateJoinRequestsRead_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // GroupUpdateJoinRequestsRead_Output is the output of a chat.bsky.group.updateJoinRequestsRead call. 19 + type GroupUpdateJoinRequestsRead_Output struct { 20 + } 21 + 22 + // GroupUpdateJoinRequestsRead calls the XRPC method "chat.bsky.group.updateJoinRequestsRead". 23 + func GroupUpdateJoinRequestsRead(ctx context.Context, c lexutil.LexClient, input *GroupUpdateJoinRequestsRead_Input) (*GroupUpdateJoinRequestsRead_Output, error) { 24 + var out GroupUpdateJoinRequestsRead_Output 25 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.group.updateJoinRequestsRead", nil, input, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+30
api/chat/groupwithdrawJoinRequest.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.group.withdrawJoinRequest 4 + 5 + package chat 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // GroupWithdrawJoinRequest_Input is the input argument to a chat.bsky.group.withdrawJoinRequest call. 14 + type GroupWithdrawJoinRequest_Input struct { 15 + ConvoId string `json:"convoId" cborgen:"convoId"` 16 + } 17 + 18 + // GroupWithdrawJoinRequest_Output is the output of a chat.bsky.group.withdrawJoinRequest call. 19 + type GroupWithdrawJoinRequest_Output struct { 20 + } 21 + 22 + // GroupWithdrawJoinRequest calls the XRPC method "chat.bsky.group.withdrawJoinRequest". 23 + func GroupWithdrawJoinRequest(ctx context.Context, c lexutil.LexClient, input *GroupWithdrawJoinRequest_Input) (*GroupWithdrawJoinRequest_Output, error) { 24 + var out GroupWithdrawJoinRequest_Output 25 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "chat.bsky.group.withdrawJoinRequest", nil, input, &out); err != nil { 26 + return nil, err 27 + } 28 + 29 + return &out, nil 30 + }
+84
api/chat/moderationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.moderation.defs 4 + 5 + package chat 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + lexutil "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + // ModerationDefs_ConvoView is a "convoView" in the chat.bsky.moderation.defs schema. 15 + // 16 + // [NOTE: This is under active development and should be considered unstable while this note is here]. A view of a conversation for moderation purposes. Unlike chat.bsky.convo.defs#convoView, it does not include viewer-specific data (such as muted, unreadCount, status, lastMessage, lastReaction), since the requester is a moderator and not a member of the conversation. The member list is not included; use chat.bsky.moderation.getConvoMembers to list members. 17 + type ModerationDefs_ConvoView struct { 18 + Id string `json:"id" cborgen:"id"` 19 + // kind: Union field that has data specific to different kinds of convos. 20 + Kind *ModerationDefs_ConvoView_Kind `json:"kind,omitempty" cborgen:"kind,omitempty"` 21 + Rev string `json:"rev" cborgen:"rev"` 22 + } 23 + 24 + // Union field that has data specific to different kinds of convos. 25 + type ModerationDefs_ConvoView_Kind struct { 26 + ModerationDefs_DirectConvo *ModerationDefs_DirectConvo 27 + ModerationDefs_GroupConvo *ModerationDefs_GroupConvo 28 + } 29 + 30 + func (t *ModerationDefs_ConvoView_Kind) MarshalJSON() ([]byte, error) { 31 + if t.ModerationDefs_DirectConvo != nil { 32 + t.ModerationDefs_DirectConvo.LexiconTypeID = "chat.bsky.moderation.defs#directConvo" 33 + return json.Marshal(t.ModerationDefs_DirectConvo) 34 + } 35 + if t.ModerationDefs_GroupConvo != nil { 36 + t.ModerationDefs_GroupConvo.LexiconTypeID = "chat.bsky.moderation.defs#groupConvo" 37 + return json.Marshal(t.ModerationDefs_GroupConvo) 38 + } 39 + return nil, fmt.Errorf("can not marshal empty union as JSON") 40 + } 41 + 42 + func (t *ModerationDefs_ConvoView_Kind) UnmarshalJSON(b []byte) error { 43 + typ, err := lexutil.TypeExtract(b) 44 + if err != nil { 45 + return err 46 + } 47 + 48 + switch typ { 49 + case "chat.bsky.moderation.defs#directConvo": 50 + t.ModerationDefs_DirectConvo = new(ModerationDefs_DirectConvo) 51 + return json.Unmarshal(b, t.ModerationDefs_DirectConvo) 52 + case "chat.bsky.moderation.defs#groupConvo": 53 + t.ModerationDefs_GroupConvo = new(ModerationDefs_GroupConvo) 54 + return json.Unmarshal(b, t.ModerationDefs_GroupConvo) 55 + default: 56 + return nil 57 + } 58 + } 59 + 60 + // ModerationDefs_DirectConvo is a "directConvo" in the chat.bsky.moderation.defs schema. 61 + // 62 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Data specific to a direct conversation, for moderation purposes. 63 + type ModerationDefs_DirectConvo struct { 64 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.moderation.defs#directConvo"` 65 + } 66 + 67 + // ModerationDefs_GroupConvo is a "groupConvo" in the chat.bsky.moderation.defs schema. 68 + // 69 + // [NOTE: This is under active development and should be considered unstable while this note is here]. Data specific to a group conversation, for moderation purposes. Unlike chat.bsky.convo.defs#groupConvo, it does not include viewer-specific data (such as unreadJoinRequestCount), since the requester is a moderator and not a member of the conversation. 70 + type ModerationDefs_GroupConvo struct { 71 + LexiconTypeID string `json:"$type" cborgen:"$type,const=chat.bsky.moderation.defs#groupConvo"` 72 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 73 + JoinLink *GroupDefs_JoinLinkView `json:"joinLink,omitempty" cborgen:"joinLink,omitempty"` 74 + // joinRequestCount: The total number of pending join requests for the group conversation. This information is only visible to the owner and to moderators. Capped at 21. 75 + JoinRequestCount int64 `json:"joinRequestCount" cborgen:"joinRequestCount"` 76 + // lockStatus: The lock status of the conversation. 77 + LockStatus *string `json:"lockStatus" cborgen:"lockStatus"` 78 + // memberCount: The total number of members in the group conversation. 79 + MemberCount int64 `json:"memberCount" cborgen:"memberCount"` 80 + // memberLimit: The maximum number of members allowed in the group conversation. 81 + MemberLimit int64 `json:"memberLimit" cborgen:"memberLimit"` 82 + // name: The display name of the group conversation. 83 + Name string `json:"name" cborgen:"name"` 84 + }
+29
api/chat/moderationgetConvo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.moderation.getConvo 4 + 5 + package chat 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ModerationGetConvo_Output is the output of a chat.bsky.moderation.getConvo call. 14 + type ModerationGetConvo_Output struct { 15 + Convo *ModerationDefs_ConvoView `json:"convo" cborgen:"convo"` 16 + } 17 + 18 + // ModerationGetConvo calls the XRPC method "chat.bsky.moderation.getConvo". 19 + func ModerationGetConvo(ctx context.Context, c lexutil.LexClient, convoId string) (*ModerationGetConvo_Output, error) { 20 + var out ModerationGetConvo_Output 21 + 22 + params := map[string]interface{}{} 23 + params["convoId"] = convoId 24 + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.moderation.getConvo", params, nil, &out); err != nil { 25 + return nil, err 26 + } 27 + 28 + return &out, nil 29 + }
+36
api/chat/moderationgetConvoMembers.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: chat.bsky.moderation.getConvoMembers 4 + 5 + package chat 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ModerationGetConvoMembers_Output is the output of a chat.bsky.moderation.getConvoMembers call. 14 + type ModerationGetConvoMembers_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Members []*ActorDefs_ProfileViewBasic `json:"members" cborgen:"members"` 17 + } 18 + 19 + // ModerationGetConvoMembers calls the XRPC method "chat.bsky.moderation.getConvoMembers". 20 + func ModerationGetConvoMembers(ctx context.Context, c lexutil.LexClient, convoId string, cursor string, limit int64) (*ModerationGetConvoMembers_Output, error) { 21 + var out ModerationGetConvoMembers_Output 22 + 23 + params := map[string]interface{}{} 24 + params["convoId"] = convoId 25 + if cursor != "" { 26 + params["cursor"] = cursor 27 + } 28 + if limit != 0 { 29 + params["limit"] = limit 30 + } 31 + if err := c.LexDo(ctx, lexutil.Query, "", "chat.bsky.moderation.getConvoMembers", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+12
api/chat/moderationsubscribeModEvents.go
··· 222 222 // updateType: What changed. 223 223 UpdateType string `json:"updateType" cborgen:"updateType"` 224 224 } 225 + 226 + // ModerationSubscribeModEvents_EventRateLimitExceeded is a "eventRateLimitExceeded" in the chat.bsky.moderation.subscribeModEvents schema. 227 + // 228 + // Fired when a user exceeds a rate limit. 229 + type ModerationSubscribeModEvents_EventRateLimitExceeded struct { 230 + // actorDid: The DID of the user who hit the rate limit. 231 + ActorDid string `json:"actorDid" cborgen:"actorDid"` 232 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 233 + // endpoint: The NSID of the endpoint that was rate limited. 234 + Endpoint string `json:"endpoint" cborgen:"endpoint"` 235 + Rev string `json:"rev" cborgen:"rev"` 236 + }
+33
api/ozone/moderationdefs.go
··· 166 166 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 167 167 } 168 168 169 + // ModerationDefs_ConvoView is a "convoView" in the tools.ozone.moderation.defs schema. 170 + type ModerationDefs_ConvoView struct { 171 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#convoView"` 172 + ConvoId string `json:"convoId" cborgen:"convoId"` 173 + Did string `json:"did" cborgen:"did"` 174 + } 175 + 169 176 // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. 170 177 // 171 178 // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. ··· 325 332 Add []string `json:"add" cborgen:"add"` 326 333 // comment: Additional comment about added/removed tags. 327 334 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 335 + // durationInHours: Indicates how long the tags being added should remain before automatically being removed. Only applies to tags being added. 336 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 328 337 // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. 329 338 Remove []string `json:"remove" cborgen:"remove"` 330 339 } ··· 617 626 ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 618 627 ModerationDefs_RecordView *ModerationDefs_RecordView 619 628 ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound 629 + ModerationDefs_ConvoView *ModerationDefs_ConvoView 620 630 } 621 631 622 632 func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { ··· 636 646 t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" 637 647 return json.Marshal(t.ModerationDefs_RecordViewNotFound) 638 648 } 649 + if t.ModerationDefs_ConvoView != nil { 650 + t.ModerationDefs_ConvoView.LexiconTypeID = "tools.ozone.moderation.defs#convoView" 651 + return json.Marshal(t.ModerationDefs_ConvoView) 652 + } 639 653 return nil, fmt.Errorf("can not marshal empty union as JSON") 640 654 } 641 655 ··· 658 672 case "tools.ozone.moderation.defs#recordViewNotFound": 659 673 t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) 660 674 return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) 675 + case "tools.ozone.moderation.defs#convoView": 676 + t.ModerationDefs_ConvoView = new(ModerationDefs_ConvoView) 677 + return json.Unmarshal(b, t.ModerationDefs_ConvoView) 661 678 default: 662 679 return nil 663 680 } ··· 886 903 AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef 887 904 RepoStrongRef *comatproto.RepoStrongRef 888 905 ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef 906 + ConvoDefs_ConvoRef *chatbsky.ConvoDefs_ConvoRef 889 907 } 890 908 891 909 func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { ··· 901 919 t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" 902 920 return json.Marshal(t.ConvoDefs_MessageRef) 903 921 } 922 + if t.ConvoDefs_ConvoRef != nil { 923 + t.ConvoDefs_ConvoRef.LexiconTypeID = "chat.bsky.convo.defs#convoRef" 924 + return json.Marshal(t.ConvoDefs_ConvoRef) 925 + } 904 926 return nil, fmt.Errorf("can not marshal empty union as JSON") 905 927 } 906 928 ··· 920 942 case "chat.bsky.convo.defs#messageRef": 921 943 t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) 922 944 return json.Unmarshal(b, t.ConvoDefs_MessageRef) 945 + case "chat.bsky.convo.defs#convoRef": 946 + t.ConvoDefs_ConvoRef = new(chatbsky.ConvoDefs_ConvoRef) 947 + return json.Unmarshal(b, t.ConvoDefs_ConvoRef) 923 948 default: 924 949 return nil 925 950 } ··· 1215 1240 AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef 1216 1241 RepoStrongRef *comatproto.RepoStrongRef 1217 1242 ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef 1243 + ConvoDefs_ConvoRef *chatbsky.ConvoDefs_ConvoRef 1218 1244 } 1219 1245 1220 1246 func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { ··· 1230 1256 t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" 1231 1257 return json.Marshal(t.ConvoDefs_MessageRef) 1232 1258 } 1259 + if t.ConvoDefs_ConvoRef != nil { 1260 + t.ConvoDefs_ConvoRef.LexiconTypeID = "chat.bsky.convo.defs#convoRef" 1261 + return json.Marshal(t.ConvoDefs_ConvoRef) 1262 + } 1233 1263 return nil, fmt.Errorf("can not marshal empty union as JSON") 1234 1264 } 1235 1265 ··· 1249 1279 case "chat.bsky.convo.defs#messageRef": 1250 1280 t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) 1251 1281 return json.Unmarshal(b, t.ConvoDefs_MessageRef) 1282 + case "chat.bsky.convo.defs#convoRef": 1283 + t.ConvoDefs_ConvoRef = new(chatbsky.ConvoDefs_ConvoRef) 1284 + return json.Unmarshal(b, t.ConvoDefs_ConvoRef) 1252 1285 default: 1253 1286 return nil 1254 1287 }
+18 -2
api/ozone/moderationemitEvent.go
··· 18 18 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 19 19 Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"` 20 20 // externalId: An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject. 21 - ExternalId *string `json:"externalId,omitempty" cborgen:"externalId,omitempty"` 22 - ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` 21 + ExternalId *string `json:"externalId,omitempty" cborgen:"externalId,omitempty"` 22 + ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` 23 + // reportAction: Optional report-level targeting. If provided, this event will be linked to specific reports and reporters may be notified. 24 + ReportAction *ModerationEmitEvent_ReportAction `json:"reportAction,omitempty" cborgen:"reportAction,omitempty"` 23 25 Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"` 24 26 SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 25 27 } ··· 276 278 default: 277 279 return nil 278 280 } 281 + } 282 + 283 + // ModerationEmitEvent_ReportAction is a "reportAction" in the tools.ozone.moderation.emitEvent schema. 284 + // 285 + // Target specific reports when emitting a moderation event 286 + type ModerationEmitEvent_ReportAction struct { 287 + // all: Target ALL reports on the subject 288 + All *bool `json:"all,omitempty" cborgen:"all,omitempty"` 289 + // ids: Target specific report IDs 290 + Ids []int64 `json:"ids,omitempty" cborgen:"ids,omitempty"` 291 + // note: Note to send to reporter(s) when actioning their report 292 + Note *string `json:"note,omitempty" cborgen:"note,omitempty"` 293 + // types: Target reports matching these report types on the subject (fully qualified NSIDs) 294 + Types []string `json:"types,omitempty" cborgen:"types,omitempty"` 279 295 } 280 296 281 297 // ModerationEmitEvent calls the XRPC method "tools.ozone.moderation.emitEvent".
+1 -1
api/ozone/moderationqueryEvents.go
··· 32 32 // removedLabels: If specified, only events where all of these labels were removed are returned 33 33 // removedTags: If specified, only events where all of these tags were removed are returned 34 34 // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 35 - // subjectType: If specified, only events where the subject is 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. 35 + // subjectType: If specified, only events where the subject is of the given type (account, record, or conversation) 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. 36 36 // types: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned. 37 37 // withStrike: If specified, only events where strikeCount value is set are returned. 38 38 func ModerationQueryEvents(ctx context.Context, c lexutil.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, batchId string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string, withStrike bool) (*ModerationQueryEvents_Output, error) {
+1 -1
api/ozone/moderationqueryStatuses.go
··· 45 45 // reviewedAfter: Search subjects reviewed after a given timestamp 46 46 // reviewedBefore: Search subjects reviewed before a given timestamp 47 47 // subject: The subject to get the status for. 48 - // 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. 48 + // subjectType: If specified, subjects of the given type (account, record, or conversation) 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. 49 49 // takendown: Get subjects that were taken down 50 50 func ModerationQueryStatuses(ctx context.Context, c lexutil.LexClient, ageAssuranceState string, 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, minPriorityScore int64, minReportedRecordsCount int64, minStrikeCount 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) { 51 51 var out ModerationQueryStatuses_Output
+29
api/ozone/queueassignModerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.assignModerator 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueAssignModerator_Input is the input argument to a tools.ozone.queue.assignModerator call. 14 + type QueueAssignModerator_Input struct { 15 + // did: DID to be assigned. 16 + Did string `json:"did" cborgen:"did"` 17 + // queueId: The ID of the queue to assign the user to. 18 + QueueId int64 `json:"queueId" cborgen:"queueId"` 19 + } 20 + 21 + // QueueAssignModerator calls the XRPC method "tools.ozone.queue.assignModerator". 22 + func QueueAssignModerator(ctx context.Context, c lexutil.LexClient, input *QueueAssignModerator_Input) (*QueueDefs_AssignmentView, error) { 23 + var out QueueDefs_AssignmentView 24 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.assignModerator", nil, input, &out); err != nil { 25 + return nil, err 26 + } 27 + 28 + return &out, nil 29 + }
+40
api/ozone/queuecreateQueue.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.createQueue 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueCreateQueue_Input is the input argument to a tools.ozone.queue.createQueue call. 14 + type QueueCreateQueue_Input struct { 15 + // collection: Collection name for record subjects. Required if subjectTypes includes 'record'. 16 + Collection *string `json:"collection,omitempty" cborgen:"collection,omitempty"` 17 + // description: Optional description of the queue 18 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 19 + // name: Display name for the queue (must be unique) 20 + Name string `json:"name" cborgen:"name"` 21 + // reportTypes: Report reason types (fully qualified NSIDs) 22 + ReportTypes []string `json:"reportTypes" cborgen:"reportTypes"` 23 + // subjectTypes: Subject types this queue accepts 24 + SubjectTypes []string `json:"subjectTypes" cborgen:"subjectTypes"` 25 + } 26 + 27 + // QueueCreateQueue_Output is the output of a tools.ozone.queue.createQueue call. 28 + type QueueCreateQueue_Output struct { 29 + Queue *QueueDefs_QueueView `json:"queue" cborgen:"queue"` 30 + } 31 + 32 + // QueueCreateQueue calls the XRPC method "tools.ozone.queue.createQueue". 33 + func QueueCreateQueue(ctx context.Context, c lexutil.LexClient, input *QueueCreateQueue_Input) (*QueueCreateQueue_Output, error) { 34 + var out QueueCreateQueue_Output 35 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.createQueue", nil, input, &out); err != nil { 36 + return nil, err 37 + } 38 + 39 + return &out, nil 40 + }
+60
api/ozone/queuedefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.defs 4 + 5 + package ozone 6 + 7 + // QueueDefs_AssignmentView is a "assignmentView" in the tools.ozone.queue.defs schema. 8 + type QueueDefs_AssignmentView struct { 9 + Did string `json:"did" cborgen:"did"` 10 + EndAt *string `json:"endAt,omitempty" cborgen:"endAt,omitempty"` 11 + Id int64 `json:"id" cborgen:"id"` 12 + // moderator: The moderator assigned to this queue 13 + Moderator *TeamDefs_Member `json:"moderator,omitempty" cborgen:"moderator,omitempty"` 14 + Queue *QueueDefs_QueueView `json:"queue" cborgen:"queue"` 15 + StartAt string `json:"startAt" cborgen:"startAt"` 16 + } 17 + 18 + // QueueDefs_QueueStats is a "queueStats" in the tools.ozone.queue.defs schema. 19 + type QueueDefs_QueueStats struct { 20 + // actionRate: Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. Absent when inboundCount is 0. 21 + ActionRate *int64 `json:"actionRate,omitempty" cborgen:"actionRate,omitempty"` 22 + // actionedCount: Number of reports in 'closed' status 23 + ActionedCount *int64 `json:"actionedCount,omitempty" cborgen:"actionedCount,omitempty"` 24 + // avgHandlingTimeSec: Average time in seconds from report creation to close, for reports closed in this period. 25 + AvgHandlingTimeSec *int64 `json:"avgHandlingTimeSec,omitempty" cborgen:"avgHandlingTimeSec,omitempty"` 26 + // escalatedCount: Number of reports in 'escalated' status 27 + EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 28 + // inboundCount: Reports received in this queue in the last 24 hours. 29 + InboundCount *int64 `json:"inboundCount,omitempty" cborgen:"inboundCount,omitempty"` 30 + // lastUpdated: When these statistics were last computed 31 + LastUpdated *string `json:"lastUpdated,omitempty" cborgen:"lastUpdated,omitempty"` 32 + // pendingCount: Number of reports in 'open' status 33 + PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 34 + } 35 + 36 + // QueueDefs_QueueView is a "queueView" in the tools.ozone.queue.defs schema. 37 + type QueueDefs_QueueView struct { 38 + // collection: Collection name for record subjects (e.g., 'app.bsky.feed.post') 39 + Collection *string `json:"collection,omitempty" cborgen:"collection,omitempty"` 40 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 41 + // createdBy: DID of moderator who created this queue 42 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 43 + // deletedAt: When the queue was deleted, if applicable 44 + DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 45 + // description: Optional description of the queue 46 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 47 + // enabled: Whether this queue is currently active 48 + Enabled bool `json:"enabled" cborgen:"enabled"` 49 + // id: Queue ID 50 + Id int64 `json:"id" cborgen:"id"` 51 + // name: Display name of the queue 52 + Name string `json:"name" cborgen:"name"` 53 + // reportTypes: Report reason types this queue accepts (fully qualified NSIDs) 54 + ReportTypes []string `json:"reportTypes" cborgen:"reportTypes"` 55 + // stats: Statistics about this queue 56 + Stats *QueueDefs_QueueStats `json:"stats" cborgen:"stats"` 57 + // subjectTypes: Subject types this queue accepts. 58 + SubjectTypes []string `json:"subjectTypes" cborgen:"subjectTypes"` 59 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 60 + }
+36
api/ozone/queuedeleteQueue.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.deleteQueue 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueDeleteQueue_Input is the input argument to a tools.ozone.queue.deleteQueue call. 14 + type QueueDeleteQueue_Input struct { 15 + // migrateToQueueId: Optional: migrate all reports to this queue. If not specified, reports will be set to unassigned (-1). 16 + MigrateToQueueId *int64 `json:"migrateToQueueId,omitempty" cborgen:"migrateToQueueId,omitempty"` 17 + // queueId: ID of the queue to delete 18 + QueueId int64 `json:"queueId" cborgen:"queueId"` 19 + } 20 + 21 + // QueueDeleteQueue_Output is the output of a tools.ozone.queue.deleteQueue call. 22 + type QueueDeleteQueue_Output struct { 23 + Deleted bool `json:"deleted" cborgen:"deleted"` 24 + // reportsMigrated: Number of reports that were migrated (if migration occurred) 25 + ReportsMigrated *int64 `json:"reportsMigrated,omitempty" cborgen:"reportsMigrated,omitempty"` 26 + } 27 + 28 + // QueueDeleteQueue calls the XRPC method "tools.ozone.queue.deleteQueue". 29 + func QueueDeleteQueue(ctx context.Context, c lexutil.LexClient, input *QueueDeleteQueue_Input) (*QueueDeleteQueue_Output, error) { 30 + var out QueueDeleteQueue_Output 31 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.deleteQueue", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+48
api/ozone/queuegetAssignments.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.getAssignments 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueGetAssignments_Output is the output of a tools.ozone.queue.getAssignments call. 14 + type QueueGetAssignments_Output struct { 15 + Assignments []*QueueDefs_AssignmentView `json:"assignments" cborgen:"assignments"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // QueueGetAssignments calls the XRPC method "tools.ozone.queue.getAssignments". 20 + // 21 + // dids: If specified, returns assignments for these moderators only. 22 + // onlyActive: When true, only returns active assignments. 23 + // queueIds: If specified, returns assignments for these queues only. 24 + func QueueGetAssignments(ctx context.Context, c lexutil.LexClient, cursor string, dids []string, limit int64, onlyActive bool, queueIds []int64) (*QueueGetAssignments_Output, error) { 25 + var out QueueGetAssignments_Output 26 + 27 + params := map[string]interface{}{} 28 + if cursor != "" { 29 + params["cursor"] = cursor 30 + } 31 + if len(dids) != 0 { 32 + params["dids"] = dids 33 + } 34 + if limit != 0 { 35 + params["limit"] = limit 36 + } 37 + if onlyActive { 38 + params["onlyActive"] = onlyActive 39 + } 40 + if len(queueIds) != 0 { 41 + params["queueIds"] = queueIds 42 + } 43 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.queue.getAssignments", params, nil, &out); err != nil { 44 + return nil, err 45 + } 46 + 47 + return &out, nil 48 + }
+52
api/ozone/queuelistQueues.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.listQueues 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueListQueues_Output is the output of a tools.ozone.queue.listQueues call. 14 + type QueueListQueues_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Queues []*QueueDefs_QueueView `json:"queues" cborgen:"queues"` 17 + } 18 + 19 + // QueueListQueues calls the XRPC method "tools.ozone.queue.listQueues". 20 + // 21 + // collection: Filter queues by collection name (e.g. 'app.bsky.feed.post'). 22 + // enabled: Filter by enabled status. If not specified, returns all queues. 23 + // reportTypes: Filter queues that handle any of these report reason types. 24 + // subjectType: Filter queues that handle this subject type ('account' or 'record'). 25 + func QueueListQueues(ctx context.Context, c lexutil.LexClient, collection string, cursor string, enabled bool, limit int64, reportTypes []string, subjectType string) (*QueueListQueues_Output, error) { 26 + var out QueueListQueues_Output 27 + 28 + params := map[string]interface{}{} 29 + if collection != "" { 30 + params["collection"] = collection 31 + } 32 + if cursor != "" { 33 + params["cursor"] = cursor 34 + } 35 + if enabled { 36 + params["enabled"] = enabled 37 + } 38 + if limit != 0 { 39 + params["limit"] = limit 40 + } 41 + if len(reportTypes) != 0 { 42 + params["reportTypes"] = reportTypes 43 + } 44 + if subjectType != "" { 45 + params["subjectType"] = subjectType 46 + } 47 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.queue.listQueues", params, nil, &out); err != nil { 48 + return nil, err 49 + } 50 + 51 + return &out, nil 52 + }
+37
api/ozone/queuerouteReports.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.routeReports 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueRouteReports_Input is the input argument to a tools.ozone.queue.routeReports call. 14 + type QueueRouteReports_Input struct { 15 + // endReportId: End of report ID range (inclusive). Difference between start and end must be less than 5,000. 16 + EndReportId int64 `json:"endReportId" cborgen:"endReportId"` 17 + // startReportId: Start of report ID range (inclusive). 18 + StartReportId int64 `json:"startReportId" cborgen:"startReportId"` 19 + } 20 + 21 + // QueueRouteReports_Output is the output of a tools.ozone.queue.routeReports call. 22 + type QueueRouteReports_Output struct { 23 + // assigned: The number of reports assigned to a queue. 24 + Assigned int64 `json:"assigned" cborgen:"assigned"` 25 + // unmatched: The number of reports with no matching queue. 26 + Unmatched int64 `json:"unmatched" cborgen:"unmatched"` 27 + } 28 + 29 + // QueueRouteReports calls the XRPC method "tools.ozone.queue.routeReports". 30 + func QueueRouteReports(ctx context.Context, c lexutil.LexClient, input *QueueRouteReports_Input) (*QueueRouteReports_Output, error) { 31 + var out QueueRouteReports_Output 32 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.routeReports", nil, input, &out); err != nil { 33 + return nil, err 34 + } 35 + 36 + return &out, nil 37 + }
+28
api/ozone/queueunassignModerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.unassignModerator 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueUnassignModerator_Input is the input argument to a tools.ozone.queue.unassignModerator call. 14 + type QueueUnassignModerator_Input struct { 15 + // did: DID to be unassigned. 16 + Did string `json:"did" cborgen:"did"` 17 + // queueId: The ID of the queue to unassign the user from. 18 + QueueId int64 `json:"queueId" cborgen:"queueId"` 19 + } 20 + 21 + // QueueUnassignModerator calls the XRPC method "tools.ozone.queue.unassignModerator". 22 + func QueueUnassignModerator(ctx context.Context, c lexutil.LexClient, input *QueueUnassignModerator_Input) error { 23 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.unassignModerator", nil, input, nil); err != nil { 24 + return err 25 + } 26 + 27 + return nil 28 + }
+38
api/ozone/queueupdateQueue.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.queue.updateQueue 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // QueueUpdateQueue_Input is the input argument to a tools.ozone.queue.updateQueue call. 14 + type QueueUpdateQueue_Input struct { 15 + // description: Optional description of the queue 16 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 17 + // enabled: Enable or disable the queue 18 + Enabled *bool `json:"enabled,omitempty" cborgen:"enabled,omitempty"` 19 + // name: New display name for the queue 20 + Name *string `json:"name,omitempty" cborgen:"name,omitempty"` 21 + // queueId: ID of the queue to update 22 + QueueId int64 `json:"queueId" cborgen:"queueId"` 23 + } 24 + 25 + // QueueUpdateQueue_Output is the output of a tools.ozone.queue.updateQueue call. 26 + type QueueUpdateQueue_Output struct { 27 + Queue *QueueDefs_QueueView `json:"queue" cborgen:"queue"` 28 + } 29 + 30 + // QueueUpdateQueue calls the XRPC method "tools.ozone.queue.updateQueue". 31 + func QueueUpdateQueue(ctx context.Context, c lexutil.LexClient, input *QueueUpdateQueue_Input) (*QueueUpdateQueue_Output, error) { 32 + var out QueueUpdateQueue_Output 33 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.queue.updateQueue", nil, input, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+33
api/ozone/reportassignModerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.assignModerator 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportAssignModerator_Input is the input argument to a tools.ozone.report.assignModerator call. 14 + type ReportAssignModerator_Input struct { 15 + // did: DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator. 16 + Did *string `json:"did,omitempty" cborgen:"did,omitempty"` 17 + // isPermanent: When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report. 18 + IsPermanent *bool `json:"isPermanent,omitempty" cborgen:"isPermanent,omitempty"` 19 + // queueId: Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue. 20 + QueueId *int64 `json:"queueId,omitempty" cborgen:"queueId,omitempty"` 21 + // reportId: The ID of the report to assign. 22 + ReportId int64 `json:"reportId" cborgen:"reportId"` 23 + } 24 + 25 + // ReportAssignModerator calls the XRPC method "tools.ozone.report.assignModerator". 26 + func ReportAssignModerator(ctx context.Context, c lexutil.LexClient, input *ReportAssignModerator_Input) (*ReportDefs_AssignmentView, error) { 27 + var out ReportDefs_AssignmentView 28 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.report.assignModerator", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+110
api/ozone/reportcreateActivity.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.createActivity 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + lexutil "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // ReportCreateActivity_Input is the input argument to a tools.ozone.report.createActivity call. 16 + type ReportCreateActivity_Input struct { 17 + // activity: The type of activity to record. 18 + Activity *ReportCreateActivity_Input_Activity `json:"activity" cborgen:"activity"` 19 + // internalNote: Optional moderator-only note. Not visible to reporters. 20 + InternalNote *string `json:"internalNote,omitempty" cborgen:"internalNote,omitempty"` 21 + // isAutomated: Set true when this activity is triggered by an automated process. Defaults to false. 22 + IsAutomated *bool `json:"isAutomated,omitempty" cborgen:"isAutomated,omitempty"` 23 + // publicNote: Optional public-facing note, potentially visible to the reporter. 24 + PublicNote *string `json:"publicNote,omitempty" cborgen:"publicNote,omitempty"` 25 + // reportId: ID of the report to record activity on 26 + ReportId int64 `json:"reportId" cborgen:"reportId"` 27 + } 28 + 29 + // The type of activity to record. 30 + type ReportCreateActivity_Input_Activity struct { 31 + ReportDefs_QueueActivity *ReportDefs_QueueActivity 32 + ReportDefs_AssignmentActivity *ReportDefs_AssignmentActivity 33 + ReportDefs_EscalationActivity *ReportDefs_EscalationActivity 34 + ReportDefs_CloseActivity *ReportDefs_CloseActivity 35 + ReportDefs_ReopenActivity *ReportDefs_ReopenActivity 36 + ReportDefs_NoteActivity *ReportDefs_NoteActivity 37 + } 38 + 39 + func (t *ReportCreateActivity_Input_Activity) MarshalJSON() ([]byte, error) { 40 + if t.ReportDefs_QueueActivity != nil { 41 + t.ReportDefs_QueueActivity.LexiconTypeID = "tools.ozone.report.defs#queueActivity" 42 + return json.Marshal(t.ReportDefs_QueueActivity) 43 + } 44 + if t.ReportDefs_AssignmentActivity != nil { 45 + t.ReportDefs_AssignmentActivity.LexiconTypeID = "tools.ozone.report.defs#assignmentActivity" 46 + return json.Marshal(t.ReportDefs_AssignmentActivity) 47 + } 48 + if t.ReportDefs_EscalationActivity != nil { 49 + t.ReportDefs_EscalationActivity.LexiconTypeID = "tools.ozone.report.defs#escalationActivity" 50 + return json.Marshal(t.ReportDefs_EscalationActivity) 51 + } 52 + if t.ReportDefs_CloseActivity != nil { 53 + t.ReportDefs_CloseActivity.LexiconTypeID = "tools.ozone.report.defs#closeActivity" 54 + return json.Marshal(t.ReportDefs_CloseActivity) 55 + } 56 + if t.ReportDefs_ReopenActivity != nil { 57 + t.ReportDefs_ReopenActivity.LexiconTypeID = "tools.ozone.report.defs#reopenActivity" 58 + return json.Marshal(t.ReportDefs_ReopenActivity) 59 + } 60 + if t.ReportDefs_NoteActivity != nil { 61 + t.ReportDefs_NoteActivity.LexiconTypeID = "tools.ozone.report.defs#noteActivity" 62 + return json.Marshal(t.ReportDefs_NoteActivity) 63 + } 64 + return nil, fmt.Errorf("can not marshal empty union as JSON") 65 + } 66 + 67 + func (t *ReportCreateActivity_Input_Activity) UnmarshalJSON(b []byte) error { 68 + typ, err := lexutil.TypeExtract(b) 69 + if err != nil { 70 + return err 71 + } 72 + 73 + switch typ { 74 + case "tools.ozone.report.defs#queueActivity": 75 + t.ReportDefs_QueueActivity = new(ReportDefs_QueueActivity) 76 + return json.Unmarshal(b, t.ReportDefs_QueueActivity) 77 + case "tools.ozone.report.defs#assignmentActivity": 78 + t.ReportDefs_AssignmentActivity = new(ReportDefs_AssignmentActivity) 79 + return json.Unmarshal(b, t.ReportDefs_AssignmentActivity) 80 + case "tools.ozone.report.defs#escalationActivity": 81 + t.ReportDefs_EscalationActivity = new(ReportDefs_EscalationActivity) 82 + return json.Unmarshal(b, t.ReportDefs_EscalationActivity) 83 + case "tools.ozone.report.defs#closeActivity": 84 + t.ReportDefs_CloseActivity = new(ReportDefs_CloseActivity) 85 + return json.Unmarshal(b, t.ReportDefs_CloseActivity) 86 + case "tools.ozone.report.defs#reopenActivity": 87 + t.ReportDefs_ReopenActivity = new(ReportDefs_ReopenActivity) 88 + return json.Unmarshal(b, t.ReportDefs_ReopenActivity) 89 + case "tools.ozone.report.defs#noteActivity": 90 + t.ReportDefs_NoteActivity = new(ReportDefs_NoteActivity) 91 + return json.Unmarshal(b, t.ReportDefs_NoteActivity) 92 + default: 93 + return nil 94 + } 95 + } 96 + 97 + // ReportCreateActivity_Output is the output of a tools.ozone.report.createActivity call. 98 + type ReportCreateActivity_Output struct { 99 + Activity *ReportDefs_ReportActivityView `json:"activity" cborgen:"activity"` 100 + } 101 + 102 + // ReportCreateActivity calls the XRPC method "tools.ozone.report.createActivity". 103 + func ReportCreateActivity(ctx context.Context, c lexutil.LexClient, input *ReportCreateActivity_Input) (*ReportCreateActivity_Output, error) { 104 + var out ReportCreateActivity_Output 105 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.report.createActivity", nil, input, &out); err != nil { 106 + return nil, err 107 + } 108 + 109 + return &out, nil 110 + }
+261
api/ozone/reportdefs.go
··· 3 3 // Lexicon schema: tools.ozone.report.defs 4 4 5 5 package ozone 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + lexutil "github.com/bluesky-social/indigo/lex/util" 12 + ) 13 + 14 + // ReportDefs_AssignmentActivity is a "assignmentActivity" in the tools.ozone.report.defs schema. 15 + // 16 + // Activity recording a moderator being assigned to a report. 17 + type ReportDefs_AssignmentActivity struct { 18 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#assignmentActivity"` 19 + // previousStatus: The report's status before this activity. Populated automatically from the report row; not required in input. 20 + PreviousStatus *string `json:"previousStatus,omitempty" cborgen:"previousStatus,omitempty"` 21 + } 22 + 23 + // ReportDefs_AssignmentView is a "assignmentView" in the tools.ozone.report.defs schema. 24 + type ReportDefs_AssignmentView struct { 25 + Did string `json:"did" cborgen:"did"` 26 + EndAt *string `json:"endAt,omitempty" cborgen:"endAt,omitempty"` 27 + Id int64 `json:"id" cborgen:"id"` 28 + // moderator: The moderator assigned to this report 29 + Moderator *TeamDefs_Member `json:"moderator,omitempty" cborgen:"moderator,omitempty"` 30 + Queue *QueueDefs_QueueView `json:"queue,omitempty" cborgen:"queue,omitempty"` 31 + ReportId int64 `json:"reportId" cborgen:"reportId"` 32 + StartAt string `json:"startAt" cborgen:"startAt"` 33 + } 34 + 35 + // ReportDefs_CloseActivity is a "closeActivity" in the tools.ozone.report.defs schema. 36 + // 37 + // Activity recording a report being closed. 38 + type ReportDefs_CloseActivity struct { 39 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#closeActivity"` 40 + // previousStatus: The report's status before this activity. Populated automatically from the report row; not required in input. 41 + PreviousStatus *string `json:"previousStatus,omitempty" cborgen:"previousStatus,omitempty"` 42 + } 43 + 44 + // ReportDefs_EscalationActivity is a "escalationActivity" in the tools.ozone.report.defs schema. 45 + // 46 + // Activity recording a report being escalated. 47 + type ReportDefs_EscalationActivity struct { 48 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#escalationActivity"` 49 + // previousStatus: The report's status before this activity. Populated automatically from the report row; not required in input. 50 + PreviousStatus *string `json:"previousStatus,omitempty" cborgen:"previousStatus,omitempty"` 51 + } 52 + 53 + // ReportDefs_HistoricalStats is a "historicalStats" in the tools.ozone.report.defs schema. 54 + // 55 + // A single daily snapshot of report statistics for a calendar date. 56 + type ReportDefs_HistoricalStats struct { 57 + // actionRate: Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. 58 + ActionRate *int64 `json:"actionRate,omitempty" cborgen:"actionRate,omitempty"` 59 + // actionedCount: Number of reports closed during this day. 60 + ActionedCount *int64 `json:"actionedCount,omitempty" cborgen:"actionedCount,omitempty"` 61 + // avgHandlingTimeSec: Average time in seconds from report creation (or moderator assignment) to close. 62 + AvgHandlingTimeSec *int64 `json:"avgHandlingTimeSec,omitempty" cborgen:"avgHandlingTimeSec,omitempty"` 63 + // computedAt: When this snapshot was last computed. 64 + ComputedAt *string `json:"computedAt,omitempty" cborgen:"computedAt,omitempty"` 65 + // date: The calendar date this snapshot covers (YYYY-MM-DD). 66 + Date string `json:"date" cborgen:"date"` 67 + // escalatedCount: Number of reports escalated during this day. 68 + EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 69 + // inboundCount: Reports received during this day. 70 + InboundCount *int64 `json:"inboundCount,omitempty" cborgen:"inboundCount,omitempty"` 71 + // pendingCount: Number of reports not closed at time of computation. 72 + PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 73 + } 74 + 75 + // ReportDefs_LiveStats is a "liveStats" in the tools.ozone.report.defs schema. 76 + // 77 + // Live statistics for reports for the current calendar day, filterable by queue, moderator, or report type. 78 + type ReportDefs_LiveStats struct { 79 + // actionRate: Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. 80 + ActionRate *int64 `json:"actionRate,omitempty" cborgen:"actionRate,omitempty"` 81 + // actionedCount: Number of reports closed today. 82 + ActionedCount *int64 `json:"actionedCount,omitempty" cborgen:"actionedCount,omitempty"` 83 + // avgHandlingTimeSec: Average time in seconds from report creation (or moderator assignment) to close. 84 + AvgHandlingTimeSec *int64 `json:"avgHandlingTimeSec,omitempty" cborgen:"avgHandlingTimeSec,omitempty"` 85 + // escalatedCount: Number of reports escalated today. 86 + EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 87 + // inboundCount: Reports received today. 88 + InboundCount *int64 `json:"inboundCount,omitempty" cborgen:"inboundCount,omitempty"` 89 + // lastUpdated: When these statistics were last computed. 90 + LastUpdated *string `json:"lastUpdated,omitempty" cborgen:"lastUpdated,omitempty"` 91 + // pendingCount: Number of reports currently not closed. 92 + PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 93 + } 94 + 95 + // ReportDefs_NoteActivity is a "noteActivity" in the tools.ozone.report.defs schema. 96 + // 97 + // Activity recording a note on a report. Use internalNote for moderator-only notes or publicNote for reporter-visible notes (or both). 98 + type ReportDefs_NoteActivity struct { 99 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#noteActivity"` 100 + } 101 + 102 + // ReportDefs_QueueActivity is a "queueActivity" in the tools.ozone.report.defs schema. 103 + // 104 + // Activity recording a report being routed to a queue. 105 + type ReportDefs_QueueActivity struct { 106 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#queueActivity"` 107 + // previousStatus: The report's status before this activity. Populated automatically from the report row; not required in input. 108 + PreviousStatus *string `json:"previousStatus,omitempty" cborgen:"previousStatus,omitempty"` 109 + } 110 + 111 + // ReportDefs_ReopenActivity is a "reopenActivity" in the tools.ozone.report.defs schema. 112 + // 113 + // Activity recording a closed report being reopened. Only valid when the report is in 'closed' status. 114 + type ReportDefs_ReopenActivity struct { 115 + LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.report.defs#reopenActivity"` 116 + // previousStatus: The report's status before this activity. Populated automatically from the report row; not required in input. 117 + PreviousStatus *string `json:"previousStatus,omitempty" cborgen:"previousStatus,omitempty"` 118 + } 119 + 120 + // ReportDefs_ReportActivityView is a "reportActivityView" in the tools.ozone.report.defs schema. 121 + // 122 + // A single activity entry on a report. 123 + type ReportDefs_ReportActivityView struct { 124 + // activity: The typed activity object describing what occurred. 125 + Activity *ReportDefs_ReportActivityView_Activity `json:"activity" cborgen:"activity"` 126 + // createdAt: When this activity was created 127 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 128 + // createdBy: DID of the actor who created this activity, or the service DID for automated activities. 129 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 130 + // id: Activity ID 131 + Id int64 `json:"id" cborgen:"id"` 132 + // internalNote: Optional moderator-only note. Not visible to reporters. 133 + InternalNote *string `json:"internalNote,omitempty" cborgen:"internalNote,omitempty"` 134 + // isAutomated: True if this activity was created by an automated process (e.g. queue router) rather than a direct human action. 135 + IsAutomated bool `json:"isAutomated" cborgen:"isAutomated"` 136 + // meta: Extensible JSON payload for loose activity-specific metadata (e.g. assignmentId). 137 + Meta *interface{} `json:"meta,omitempty" cborgen:"meta,omitempty"` 138 + // moderator: Full member record of the moderator who created this activity 139 + Moderator *TeamDefs_Member `json:"moderator,omitempty" cborgen:"moderator,omitempty"` 140 + // publicNote: Optional public note, potentially visible to the reporter. 141 + PublicNote *string `json:"publicNote,omitempty" cborgen:"publicNote,omitempty"` 142 + // reportId: ID of the report this activity belongs to 143 + ReportId int64 `json:"reportId" cborgen:"reportId"` 144 + } 145 + 146 + // The typed activity object describing what occurred. 147 + type ReportDefs_ReportActivityView_Activity struct { 148 + ReportDefs_QueueActivity *ReportDefs_QueueActivity 149 + ReportDefs_AssignmentActivity *ReportDefs_AssignmentActivity 150 + ReportDefs_EscalationActivity *ReportDefs_EscalationActivity 151 + ReportDefs_CloseActivity *ReportDefs_CloseActivity 152 + ReportDefs_ReopenActivity *ReportDefs_ReopenActivity 153 + ReportDefs_NoteActivity *ReportDefs_NoteActivity 154 + } 155 + 156 + func (t *ReportDefs_ReportActivityView_Activity) MarshalJSON() ([]byte, error) { 157 + if t.ReportDefs_QueueActivity != nil { 158 + t.ReportDefs_QueueActivity.LexiconTypeID = "tools.ozone.report.defs#queueActivity" 159 + return json.Marshal(t.ReportDefs_QueueActivity) 160 + } 161 + if t.ReportDefs_AssignmentActivity != nil { 162 + t.ReportDefs_AssignmentActivity.LexiconTypeID = "tools.ozone.report.defs#assignmentActivity" 163 + return json.Marshal(t.ReportDefs_AssignmentActivity) 164 + } 165 + if t.ReportDefs_EscalationActivity != nil { 166 + t.ReportDefs_EscalationActivity.LexiconTypeID = "tools.ozone.report.defs#escalationActivity" 167 + return json.Marshal(t.ReportDefs_EscalationActivity) 168 + } 169 + if t.ReportDefs_CloseActivity != nil { 170 + t.ReportDefs_CloseActivity.LexiconTypeID = "tools.ozone.report.defs#closeActivity" 171 + return json.Marshal(t.ReportDefs_CloseActivity) 172 + } 173 + if t.ReportDefs_ReopenActivity != nil { 174 + t.ReportDefs_ReopenActivity.LexiconTypeID = "tools.ozone.report.defs#reopenActivity" 175 + return json.Marshal(t.ReportDefs_ReopenActivity) 176 + } 177 + if t.ReportDefs_NoteActivity != nil { 178 + t.ReportDefs_NoteActivity.LexiconTypeID = "tools.ozone.report.defs#noteActivity" 179 + return json.Marshal(t.ReportDefs_NoteActivity) 180 + } 181 + return nil, fmt.Errorf("can not marshal empty union as JSON") 182 + } 183 + 184 + func (t *ReportDefs_ReportActivityView_Activity) UnmarshalJSON(b []byte) error { 185 + typ, err := lexutil.TypeExtract(b) 186 + if err != nil { 187 + return err 188 + } 189 + 190 + switch typ { 191 + case "tools.ozone.report.defs#queueActivity": 192 + t.ReportDefs_QueueActivity = new(ReportDefs_QueueActivity) 193 + return json.Unmarshal(b, t.ReportDefs_QueueActivity) 194 + case "tools.ozone.report.defs#assignmentActivity": 195 + t.ReportDefs_AssignmentActivity = new(ReportDefs_AssignmentActivity) 196 + return json.Unmarshal(b, t.ReportDefs_AssignmentActivity) 197 + case "tools.ozone.report.defs#escalationActivity": 198 + t.ReportDefs_EscalationActivity = new(ReportDefs_EscalationActivity) 199 + return json.Unmarshal(b, t.ReportDefs_EscalationActivity) 200 + case "tools.ozone.report.defs#closeActivity": 201 + t.ReportDefs_CloseActivity = new(ReportDefs_CloseActivity) 202 + return json.Unmarshal(b, t.ReportDefs_CloseActivity) 203 + case "tools.ozone.report.defs#reopenActivity": 204 + t.ReportDefs_ReopenActivity = new(ReportDefs_ReopenActivity) 205 + return json.Unmarshal(b, t.ReportDefs_ReopenActivity) 206 + case "tools.ozone.report.defs#noteActivity": 207 + t.ReportDefs_NoteActivity = new(ReportDefs_NoteActivity) 208 + return json.Unmarshal(b, t.ReportDefs_NoteActivity) 209 + default: 210 + return nil 211 + } 212 + } 213 + 214 + // ReportDefs_ReportAssignment is a "reportAssignment" in the tools.ozone.report.defs schema. 215 + // 216 + // Information about the moderator currently assigned to a report. 217 + type ReportDefs_ReportAssignment struct { 218 + // assignedAt: When the report was assigned 219 + AssignedAt string `json:"assignedAt" cborgen:"assignedAt"` 220 + // did: DID of the assigned moderator 221 + Did string `json:"did" cborgen:"did"` 222 + // moderator: Full member record of the assigned moderator 223 + Moderator *TeamDefs_Member `json:"moderator,omitempty" cborgen:"moderator,omitempty"` 224 + } 225 + 226 + // ReportDefs_ReportView is a "reportView" in the tools.ozone.report.defs schema. 227 + type ReportDefs_ReportView struct { 228 + // actionEventIds: Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first) 229 + ActionEventIds []int64 `json:"actionEventIds,omitempty" cborgen:"actionEventIds,omitempty"` 230 + // actionNote: Note sent to reporter when report was actioned 231 + ActionNote *string `json:"actionNote,omitempty" cborgen:"actionNote,omitempty"` 232 + // actions: Optional: expanded action events 233 + Actions []*ModerationDefs_ModEventView `json:"actions,omitempty" cborgen:"actions,omitempty"` 234 + // assignment: Information about moderator currently assigned to this report (if any) 235 + Assignment *ReportDefs_ReportAssignment `json:"assignment,omitempty" cborgen:"assignment,omitempty"` 236 + // comment: Comment provided by the reporter 237 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 238 + // createdAt: When the report was created 239 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 240 + // eventId: ID of the moderation event that created this report 241 + EventId int64 `json:"eventId" cborgen:"eventId"` 242 + // id: Report ID 243 + Id int64 `json:"id" cborgen:"id"` 244 + // isMuted: Whether this report is muted. A report is muted if the reporter was muted or the subject was muted at the time the report was created. 245 + IsMuted *bool `json:"isMuted,omitempty" cborgen:"isMuted,omitempty"` 246 + // queue: The queue this report is assigned to (if any) 247 + Queue *QueueDefs_QueueView `json:"queue,omitempty" cborgen:"queue,omitempty"` 248 + // queuedAt: When the report was assigned to its current queue 249 + QueuedAt *string `json:"queuedAt,omitempty" cborgen:"queuedAt,omitempty"` 250 + // relatedReportCount: Number of other pending reports on the same subject 251 + RelatedReportCount *int64 `json:"relatedReportCount,omitempty" cborgen:"relatedReportCount,omitempty"` 252 + // reportType: Type of report 253 + ReportType *string `json:"reportType" cborgen:"reportType"` 254 + // reportedBy: DID of the user who made the report 255 + ReportedBy string `json:"reportedBy" cborgen:"reportedBy"` 256 + // reporter: Full subject view of the reporter account 257 + Reporter *ModerationDefs_SubjectView `json:"reporter" cborgen:"reporter"` 258 + // status: Current status of the report 259 + Status string `json:"status" cborgen:"status"` 260 + // subject: The subject that was reported with full details 261 + Subject *ModerationDefs_SubjectView `json:"subject" cborgen:"subject"` 262 + // subjectStatus: Current status of the reported subject 263 + SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 264 + // updatedAt: When the report was last updated 265 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 266 + }
+48
api/ozone/reportgetAssignments.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.getAssignments 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportGetAssignments_Output is the output of a tools.ozone.report.getAssignments call. 14 + type ReportGetAssignments_Output struct { 15 + Assignments []*ReportDefs_AssignmentView `json:"assignments" cborgen:"assignments"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // ReportGetAssignments calls the XRPC method "tools.ozone.report.getAssignments". 20 + // 21 + // dids: If specified, returns assignments for these moderators only. 22 + // onlyActive: When true, only returns active assignments. 23 + // reportIds: If specified, returns assignments for these reports only. 24 + func ReportGetAssignments(ctx context.Context, c lexutil.LexClient, cursor string, dids []string, limit int64, onlyActive bool, reportIds []int64) (*ReportGetAssignments_Output, error) { 25 + var out ReportGetAssignments_Output 26 + 27 + params := map[string]interface{}{} 28 + if cursor != "" { 29 + params["cursor"] = cursor 30 + } 31 + if len(dids) != 0 { 32 + params["dids"] = dids 33 + } 34 + if limit != 0 { 35 + params["limit"] = limit 36 + } 37 + if onlyActive { 38 + params["onlyActive"] = onlyActive 39 + } 40 + if len(reportIds) != 0 { 41 + params["reportIds"] = reportIds 42 + } 43 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getAssignments", params, nil, &out); err != nil { 44 + return nil, err 45 + } 46 + 47 + return &out, nil 48 + }
+58
api/ozone/reportgetHistoricalStats.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.getHistoricalStats 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportGetHistoricalStats_Output is the output of a tools.ozone.report.getHistoricalStats call. 14 + type ReportGetHistoricalStats_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Stats []*ReportDefs_HistoricalStats `json:"stats" cborgen:"stats"` 17 + } 18 + 19 + // ReportGetHistoricalStats calls the XRPC method "tools.ozone.report.getHistoricalStats". 20 + // 21 + // cursor: Pagination cursor. 22 + // endDate: Latest date to include (inclusive). 23 + // limit: Maximum number of entries to return. 24 + // moderatorDid: Filter stats by moderator DID. 25 + // queueId: Filter stats by queue. Use -1 for unqueued reports. 26 + // reportTypes: Filter stats by report types. 27 + // startDate: Earliest date to include (inclusive). 28 + func ReportGetHistoricalStats(ctx context.Context, c lexutil.LexClient, cursor string, endDate string, limit int64, moderatorDid string, queueId int64, reportTypes []string, startDate string) (*ReportGetHistoricalStats_Output, error) { 29 + var out ReportGetHistoricalStats_Output 30 + 31 + params := map[string]interface{}{} 32 + if cursor != "" { 33 + params["cursor"] = cursor 34 + } 35 + if endDate != "" { 36 + params["endDate"] = endDate 37 + } 38 + if limit != 0 { 39 + params["limit"] = limit 40 + } 41 + if moderatorDid != "" { 42 + params["moderatorDid"] = moderatorDid 43 + } 44 + if queueId != 0 { 45 + params["queueId"] = queueId 46 + } 47 + if len(reportTypes) != 0 { 48 + params["reportTypes"] = reportTypes 49 + } 50 + if startDate != "" { 51 + params["startDate"] = startDate 52 + } 53 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getHistoricalStats", params, nil, &out); err != nil { 54 + return nil, err 55 + } 56 + 57 + return &out, nil 58 + }
+28
api/ozone/reportgetLatestReport.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.getLatestReport 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportGetLatestReport_Output is the output of a tools.ozone.report.getLatestReport call. 14 + type ReportGetLatestReport_Output struct { 15 + Report *ReportDefs_ReportView `json:"report" cborgen:"report"` 16 + } 17 + 18 + // ReportGetLatestReport calls the XRPC method "tools.ozone.report.getLatestReport". 19 + func ReportGetLatestReport(ctx context.Context, c lexutil.LexClient) (*ReportGetLatestReport_Output, error) { 20 + var out ReportGetLatestReport_Output 21 + 22 + params := map[string]interface{}{} 23 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getLatestReport", params, nil, &out); err != nil { 24 + return nil, err 25 + } 26 + 27 + return &out, nil 28 + }
+42
api/ozone/reportgetLiveStats.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.getLiveStats 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportGetLiveStats_Output is the output of a tools.ozone.report.getLiveStats call. 14 + type ReportGetLiveStats_Output struct { 15 + // stats: Statistics for the requested filter. 16 + Stats *ReportDefs_LiveStats `json:"stats" cborgen:"stats"` 17 + } 18 + 19 + // ReportGetLiveStats calls the XRPC method "tools.ozone.report.getLiveStats". 20 + // 21 + // moderatorDid: Filter stats by moderator DID. 22 + // queueId: Filter stats by queue. Use -1 for unqueued reports. 23 + // reportTypes: Filter stats by report types. 24 + func ReportGetLiveStats(ctx context.Context, c lexutil.LexClient, moderatorDid string, queueId int64, reportTypes []string) (*ReportGetLiveStats_Output, error) { 25 + var out ReportGetLiveStats_Output 26 + 27 + params := map[string]interface{}{} 28 + if moderatorDid != "" { 29 + params["moderatorDid"] = moderatorDid 30 + } 31 + if queueId != 0 { 32 + params["queueId"] = queueId 33 + } 34 + if len(reportTypes) != 0 { 35 + params["reportTypes"] = reportTypes 36 + } 37 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getLiveStats", params, nil, &out); err != nil { 38 + return nil, err 39 + } 40 + 41 + return &out, nil 42 + }
+26
api/ozone/reportgetReport.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.getReport 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportGetReport calls the XRPC method "tools.ozone.report.getReport". 14 + // 15 + // id: The ID of the report to retrieve. 16 + func ReportGetReport(ctx context.Context, c lexutil.LexClient, id int64) (*ReportDefs_ReportView, error) { 17 + var out ReportDefs_ReportView 18 + 19 + params := map[string]interface{}{} 20 + params["id"] = id 21 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.getReport", params, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+38
api/ozone/reportlistActivities.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.listActivities 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportListActivities_Output is the output of a tools.ozone.report.listActivities call. 14 + type ReportListActivities_Output struct { 15 + Activities []*ReportDefs_ReportActivityView `json:"activities" cborgen:"activities"` 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + } 18 + 19 + // ReportListActivities calls the XRPC method "tools.ozone.report.listActivities". 20 + // 21 + // reportId: ID of the report whose activities to list 22 + func ReportListActivities(ctx context.Context, c lexutil.LexClient, cursor string, limit int64, reportId int64) (*ReportListActivities_Output, error) { 23 + var out ReportListActivities_Output 24 + 25 + params := map[string]interface{}{} 26 + if cursor != "" { 27 + params["cursor"] = cursor 28 + } 29 + if limit != 0 { 30 + params["limit"] = limit 31 + } 32 + params["reportId"] = reportId 33 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.listActivities", params, nil, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+84
api/ozone/reportqueryReports.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.queryReports 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportQueryReports_Output is the output of a tools.ozone.report.queryReports call. 14 + type ReportQueryReports_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Reports []*ReportDefs_ReportView `json:"reports" cborgen:"reports"` 17 + } 18 + 19 + // ReportQueryReports calls the XRPC method "tools.ozone.report.queryReports". 20 + // 21 + // assignedTo: Filter by the DID of the moderator permanently assigned to the report. 22 + // collections: If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 23 + // did: Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects. 24 + // isMuted: Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false. 25 + // queueId: Filter by queue ID. Use -1 for unassigned reports. 26 + // reportTypes: Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>). 27 + // reportedAfter: Retrieve reports created after a given timestamp 28 + // reportedBefore: Retrieve reports created before a given timestamp 29 + // status: Filter by report status. 30 + // subject: Filter by subject DID or AT-URI. 31 + // subjectType: If specified, reports of the given type (account or record) will be returned. 32 + func ReportQueryReports(ctx context.Context, c lexutil.LexClient, assignedTo string, collections []string, cursor string, did string, isMuted bool, limit int64, queueId int64, reportTypes []string, reportedAfter string, reportedBefore string, sortDirection string, sortField string, status string, subject string, subjectType string) (*ReportQueryReports_Output, error) { 33 + var out ReportQueryReports_Output 34 + 35 + params := map[string]interface{}{} 36 + if assignedTo != "" { 37 + params["assignedTo"] = assignedTo 38 + } 39 + if len(collections) != 0 { 40 + params["collections"] = collections 41 + } 42 + if cursor != "" { 43 + params["cursor"] = cursor 44 + } 45 + if did != "" { 46 + params["did"] = did 47 + } 48 + if isMuted { 49 + params["isMuted"] = isMuted 50 + } 51 + if limit != 0 { 52 + params["limit"] = limit 53 + } 54 + if queueId != 0 { 55 + params["queueId"] = queueId 56 + } 57 + if len(reportTypes) != 0 { 58 + params["reportTypes"] = reportTypes 59 + } 60 + if reportedAfter != "" { 61 + params["reportedAfter"] = reportedAfter 62 + } 63 + if reportedBefore != "" { 64 + params["reportedBefore"] = reportedBefore 65 + } 66 + if sortDirection != "" { 67 + params["sortDirection"] = sortDirection 68 + } 69 + if sortField != "" { 70 + params["sortField"] = sortField 71 + } 72 + params["status"] = status 73 + if subject != "" { 74 + params["subject"] = subject 75 + } 76 + if subjectType != "" { 77 + params["subjectType"] = subjectType 78 + } 79 + if err := c.LexDo(ctx, lexutil.Query, "", "tools.ozone.report.queryReports", params, nil, &out); err != nil { 80 + return nil, err 81 + } 82 + 83 + return &out, nil 84 + }
+36
api/ozone/reportreassignQueue.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.reassignQueue 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportReassignQueue_Input is the input argument to a tools.ozone.report.reassignQueue call. 14 + type ReportReassignQueue_Input struct { 15 + // comment: Optional moderator-only note recorded on the resulting queueActivity as internalNote. 16 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 17 + // queueId: Target queue ID. Use -1 to unassign from any queue. 18 + QueueId int64 `json:"queueId" cborgen:"queueId"` 19 + // reportId: ID of the report to reassign 20 + ReportId int64 `json:"reportId" cborgen:"reportId"` 21 + } 22 + 23 + // ReportReassignQueue_Output is the output of a tools.ozone.report.reassignQueue call. 24 + type ReportReassignQueue_Output struct { 25 + Report *ReportDefs_ReportView `json:"report" cborgen:"report"` 26 + } 27 + 28 + // ReportReassignQueue calls the XRPC method "tools.ozone.report.reassignQueue". 29 + func ReportReassignQueue(ctx context.Context, c lexutil.LexClient, input *ReportReassignQueue_Input) (*ReportReassignQueue_Output, error) { 30 + var out ReportReassignQueue_Output 31 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.report.reassignQueue", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+35
api/ozone/reportrefreshStats.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.refreshStats 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportRefreshStats_Input is the input argument to a tools.ozone.report.refreshStats call. 14 + type ReportRefreshStats_Input struct { 15 + // endDate: End date for recomputation, inclusive (YYYY-MM-DD). 16 + EndDate string `json:"endDate" cborgen:"endDate"` 17 + // queueIds: Optional list of queue IDs to recompute. Omit to recompute all groups. 18 + QueueIds []int64 `json:"queueIds,omitempty" cborgen:"queueIds,omitempty"` 19 + // startDate: Start date for recomputation, inclusive (YYYY-MM-DD). 20 + StartDate string `json:"startDate" cborgen:"startDate"` 21 + } 22 + 23 + // ReportRefreshStats_Output is the output of a tools.ozone.report.refreshStats call. 24 + type ReportRefreshStats_Output struct { 25 + } 26 + 27 + // ReportRefreshStats calls the XRPC method "tools.ozone.report.refreshStats". 28 + func ReportRefreshStats(ctx context.Context, c lexutil.LexClient, input *ReportRefreshStats_Input) (*ReportRefreshStats_Output, error) { 29 + var out ReportRefreshStats_Output 30 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.report.refreshStats", nil, input, &out); err != nil { 31 + return nil, err 32 + } 33 + 34 + return &out, nil 35 + }
+27
api/ozone/reportunassignModerator.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + // Lexicon schema: tools.ozone.report.unassignModerator 4 + 5 + package ozone 6 + 7 + import ( 8 + "context" 9 + 10 + lexutil "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ReportUnassignModerator_Input is the input argument to a tools.ozone.report.unassignModerator call. 14 + type ReportUnassignModerator_Input struct { 15 + // reportId: The ID of the report to unassign. 16 + ReportId int64 `json:"reportId" cborgen:"reportId"` 17 + } 18 + 19 + // ReportUnassignModerator calls the XRPC method "tools.ozone.report.unassignModerator". 20 + func ReportUnassignModerator(ctx context.Context, c lexutil.LexClient, input *ReportUnassignModerator_Input) (*ReportDefs_AssignmentView, error) { 21 + var out ReportDefs_AssignmentView 22 + if err := c.LexDo(ctx, lexutil.Procedure, "application/json", "tools.ozone.report.unassignModerator", nil, input, &out); err != nil { 23 + return nil, err 24 + } 25 + 26 + return &out, nil 27 + }
+1
gen/main.go
··· 86 86 87 87 if err := genCfg.WriteMapEncodersToFile("api/chat/cbor_gen.go", "chat", 88 88 chat.ActorDeclaration{}, 89 + chat.EmbedJoinLink{}, 89 90 ); err != nil { 90 91 panic(err) 91 92 }