this repo has no description
0
fork

Configure Feed

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

api/ozone: new tools.ozone.* namespace Lexicons

+1211
+33
api/ozone/communicationcreateTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.createTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationCreateTemplate_Input is the input argument to a tools.ozone.communication.createTemplate call. 14 + type CommunicationCreateTemplate_Input struct { 15 + // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 + ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 17 + // createdBy: DID of the user who is creating the template. 18 + CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"` 19 + // name: Name of the template. 20 + Name string `json:"name" cborgen:"name"` 21 + // subject: Subject of the message, used in emails. 22 + Subject string `json:"subject" cborgen:"subject"` 23 + } 24 + 25 + // CommunicationCreateTemplate calls the XRPC method "tools.ozone.communication.createTemplate". 26 + func CommunicationCreateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationCreateTemplate_Input) (*CommunicationDefs_TemplateView, error) { 27 + var out CommunicationDefs_TemplateView 28 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.createTemplate", nil, input, &out); err != nil { 29 + return nil, err 30 + } 31 + 32 + return &out, nil 33 + }
+21
api/ozone/communicationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.defs 6 + 7 + // CommunicationDefs_TemplateView is a "templateView" in the tools.ozone.communication.defs schema. 8 + type CommunicationDefs_TemplateView struct { 9 + // contentMarkdown: Subject of the message, used in emails. 10 + ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 11 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 12 + Disabled bool `json:"disabled" cborgen:"disabled"` 13 + Id string `json:"id" cborgen:"id"` 14 + // lastUpdatedBy: DID of the user who last updated the template. 15 + LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` 16 + // name: Name of the template. 17 + Name string `json:"name" cborgen:"name"` 18 + // subject: Content of the template, can contain markdown and variable placeholders. 19 + Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 20 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 21 + }
+25
api/ozone/communicationdeleteTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.deleteTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationDeleteTemplate_Input is the input argument to a tools.ozone.communication.deleteTemplate call. 14 + type CommunicationDeleteTemplate_Input struct { 15 + Id string `json:"id" cborgen:"id"` 16 + } 17 + 18 + // CommunicationDeleteTemplate calls the XRPC method "tools.ozone.communication.deleteTemplate". 19 + func CommunicationDeleteTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationDeleteTemplate_Input) error { 20 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.deleteTemplate", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+26
api/ozone/communicationlistTemplates.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.listTemplates 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationListTemplates_Output is the output of a tools.ozone.communication.listTemplates call. 14 + type CommunicationListTemplates_Output struct { 15 + CommunicationTemplates []*CommunicationDefs_TemplateView `json:"communicationTemplates" cborgen:"communicationTemplates"` 16 + } 17 + 18 + // CommunicationListTemplates calls the XRPC method "tools.ozone.communication.listTemplates". 19 + func CommunicationListTemplates(ctx context.Context, c *xrpc.Client) (*CommunicationListTemplates_Output, error) { 20 + var out CommunicationListTemplates_Output 21 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.communication.listTemplates", nil, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+36
api/ozone/communicationupdateTemplate.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.communication.updateTemplate 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // CommunicationUpdateTemplate_Input is the input argument to a tools.ozone.communication.updateTemplate call. 14 + type CommunicationUpdateTemplate_Input struct { 15 + // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 + ContentMarkdown *string `json:"contentMarkdown,omitempty" cborgen:"contentMarkdown,omitempty"` 17 + Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` 18 + // id: ID of the template to be updated. 19 + Id string `json:"id" cborgen:"id"` 20 + // name: Name of the template. 21 + Name *string `json:"name,omitempty" cborgen:"name,omitempty"` 22 + // subject: Subject of the message, used in emails. 23 + Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 24 + // updatedBy: DID of the user who is updating the template. 25 + UpdatedBy *string `json:"updatedBy,omitempty" cborgen:"updatedBy,omitempty"` 26 + } 27 + 28 + // CommunicationUpdateTemplate calls the XRPC method "tools.ozone.communication.updateTemplate". 29 + func CommunicationUpdateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationUpdateTemplate_Input) (*CommunicationDefs_TemplateView, error) { 30 + var out CommunicationDefs_TemplateView 31 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.updateTemplate", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+666
api/ozone/moderationdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.defs 6 + 7 + import ( 8 + "encoding/json" 9 + "fmt" 10 + 11 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 16 + type ModerationDefs_BlobView struct { 17 + Cid string `json:"cid" cborgen:"cid"` 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + Details *ModerationDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"` 20 + MimeType string `json:"mimeType" cborgen:"mimeType"` 21 + Moderation *ModerationDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"` 22 + Size int64 `json:"size" cborgen:"size"` 23 + } 24 + 25 + type ModerationDefs_BlobView_Details struct { 26 + ModerationDefs_ImageDetails *ModerationDefs_ImageDetails 27 + ModerationDefs_VideoDetails *ModerationDefs_VideoDetails 28 + } 29 + 30 + func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) { 31 + if t.ModerationDefs_ImageDetails != nil { 32 + t.ModerationDefs_ImageDetails.LexiconTypeID = "tools.ozone.moderation.defs#imageDetails" 33 + return json.Marshal(t.ModerationDefs_ImageDetails) 34 + } 35 + if t.ModerationDefs_VideoDetails != nil { 36 + t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails" 37 + return json.Marshal(t.ModerationDefs_VideoDetails) 38 + } 39 + return nil, fmt.Errorf("cannot marshal empty enum") 40 + } 41 + func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { 42 + typ, err := util.TypeExtract(b) 43 + if err != nil { 44 + return err 45 + } 46 + 47 + switch typ { 48 + case "tools.ozone.moderation.defs#imageDetails": 49 + t.ModerationDefs_ImageDetails = new(ModerationDefs_ImageDetails) 50 + return json.Unmarshal(b, t.ModerationDefs_ImageDetails) 51 + case "tools.ozone.moderation.defs#videoDetails": 52 + t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails) 53 + return json.Unmarshal(b, t.ModerationDefs_VideoDetails) 54 + 55 + default: 56 + return nil 57 + } 58 + } 59 + 60 + // ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. 61 + // 62 + // RECORDTYPE: ModerationDefs_ImageDetails 63 + type ModerationDefs_ImageDetails struct { 64 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#imageDetails" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` 65 + Height int64 `json:"height" cborgen:"height"` 66 + Width int64 `json:"width" cborgen:"width"` 67 + } 68 + 69 + // ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema. 70 + // 71 + // RECORDTYPE: ModerationDefs_ModEventAcknowledge 72 + type ModerationDefs_ModEventAcknowledge struct { 73 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` 74 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 75 + } 76 + 77 + // ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. 78 + // 79 + // # Add a comment to a subject 80 + // 81 + // RECORDTYPE: ModerationDefs_ModEventComment 82 + type ModerationDefs_ModEventComment struct { 83 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventComment" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` 84 + Comment string `json:"comment" cborgen:"comment"` 85 + // sticky: Make the comment persistent on the subject 86 + Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` 87 + } 88 + 89 + // ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema. 90 + // 91 + // # Keep a log of outgoing email to a user 92 + // 93 + // RECORDTYPE: ModerationDefs_ModEventEmail 94 + type ModerationDefs_ModEventEmail struct { 95 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEmail" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` 96 + // comment: Additional comment about the outgoing comm. 97 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 98 + // content: The content of the email sent to the user. 99 + Content *string `json:"content,omitempty" cborgen:"content,omitempty"` 100 + // subjectLine: The subject line of the email sent to the user. 101 + SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` 102 + } 103 + 104 + // ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema. 105 + // 106 + // RECORDTYPE: ModerationDefs_ModEventEscalate 107 + type ModerationDefs_ModEventEscalate struct { 108 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEscalate" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` 109 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 110 + } 111 + 112 + // ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema. 113 + // 114 + // Apply/Negate labels on a subject 115 + // 116 + // RECORDTYPE: ModerationDefs_ModEventLabel 117 + type ModerationDefs_ModEventLabel struct { 118 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` 119 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 120 + CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` 121 + NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` 122 + } 123 + 124 + // ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema. 125 + // 126 + // # Mute incoming reports on a subject 127 + // 128 + // RECORDTYPE: ModerationDefs_ModEventMute 129 + type ModerationDefs_ModEventMute struct { 130 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` 131 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 132 + // durationInHours: Indicates how long the subject should remain muted. 133 + DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` 134 + } 135 + 136 + // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. 137 + // 138 + // # Report a subject 139 + // 140 + // RECORDTYPE: ModerationDefs_ModEventReport 141 + type ModerationDefs_ModEventReport struct { 142 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReport" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` 143 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 144 + ReportType *string `json:"reportType" cborgen:"reportType"` 145 + } 146 + 147 + // ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema. 148 + // 149 + // # Resolve appeal on a subject 150 + // 151 + // RECORDTYPE: ModerationDefs_ModEventResolveAppeal 152 + type ModerationDefs_ModEventResolveAppeal struct { 153 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` 154 + // comment: Describe resolution. 155 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 156 + } 157 + 158 + // ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema. 159 + // 160 + // # Revert take down action on a subject 161 + // 162 + // RECORDTYPE: ModerationDefs_ModEventReverseTakedown 163 + type ModerationDefs_ModEventReverseTakedown struct { 164 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` 165 + // comment: Describe reasoning behind the reversal. 166 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 167 + } 168 + 169 + // ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema. 170 + // 171 + // Add/Remove a tag on a subject 172 + // 173 + // RECORDTYPE: ModerationDefs_ModEventTag 174 + type ModerationDefs_ModEventTag struct { 175 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTag" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` 176 + // add: Tags to be added to the subject. If already exists, won't be duplicated. 177 + Add []string `json:"add" cborgen:"add"` 178 + // comment: Additional comment about added/removed tags. 179 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 180 + // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. 181 + Remove []string `json:"remove" cborgen:"remove"` 182 + } 183 + 184 + // ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema. 185 + // 186 + // # Take down a subject permanently or temporarily 187 + // 188 + // RECORDTYPE: ModerationDefs_ModEventTakedown 189 + type ModerationDefs_ModEventTakedown struct { 190 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` 191 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 192 + // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 193 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 194 + } 195 + 196 + // ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. 197 + // 198 + // # Unmute action on a subject 199 + // 200 + // RECORDTYPE: ModerationDefs_ModEventUnmute 201 + type ModerationDefs_ModEventUnmute struct { 202 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` 203 + // comment: Describe reasoning behind the reversal. 204 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 205 + } 206 + 207 + // ModerationDefs_ModEventView is a "modEventView" in the tools.ozone.moderation.defs schema. 208 + type ModerationDefs_ModEventView struct { 209 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 210 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 211 + CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"` 212 + Event *ModerationDefs_ModEventView_Event `json:"event" cborgen:"event"` 213 + Id int64 `json:"id" cborgen:"id"` 214 + Subject *ModerationDefs_ModEventView_Subject `json:"subject" cborgen:"subject"` 215 + SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` 216 + SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"` 217 + } 218 + 219 + // ModerationDefs_ModEventViewDetail is a "modEventViewDetail" in the tools.ozone.moderation.defs schema. 220 + type ModerationDefs_ModEventViewDetail struct { 221 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 222 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 223 + Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 224 + Id int64 `json:"id" cborgen:"id"` 225 + Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 226 + SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 227 + } 228 + 229 + type ModerationDefs_ModEventViewDetail_Event struct { 230 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 231 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 232 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 233 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 234 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 235 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 236 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 237 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 238 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 239 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 240 + } 241 + 242 + func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { 243 + if t.ModerationDefs_ModEventTakedown != nil { 244 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 245 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 246 + } 247 + if t.ModerationDefs_ModEventReverseTakedown != nil { 248 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 249 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 250 + } 251 + if t.ModerationDefs_ModEventComment != nil { 252 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 253 + return json.Marshal(t.ModerationDefs_ModEventComment) 254 + } 255 + if t.ModerationDefs_ModEventReport != nil { 256 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 257 + return json.Marshal(t.ModerationDefs_ModEventReport) 258 + } 259 + if t.ModerationDefs_ModEventLabel != nil { 260 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 261 + return json.Marshal(t.ModerationDefs_ModEventLabel) 262 + } 263 + if t.ModerationDefs_ModEventAcknowledge != nil { 264 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 265 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 266 + } 267 + if t.ModerationDefs_ModEventEscalate != nil { 268 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 269 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 270 + } 271 + if t.ModerationDefs_ModEventMute != nil { 272 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 273 + return json.Marshal(t.ModerationDefs_ModEventMute) 274 + } 275 + if t.ModerationDefs_ModEventEmail != nil { 276 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 277 + return json.Marshal(t.ModerationDefs_ModEventEmail) 278 + } 279 + if t.ModerationDefs_ModEventResolveAppeal != nil { 280 + t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 281 + return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 282 + } 283 + return nil, fmt.Errorf("cannot marshal empty enum") 284 + } 285 + func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { 286 + typ, err := util.TypeExtract(b) 287 + if err != nil { 288 + return err 289 + } 290 + 291 + switch typ { 292 + case "tools.ozone.moderation.defs#modEventTakedown": 293 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 294 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 295 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 296 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 297 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 298 + case "tools.ozone.moderation.defs#modEventComment": 299 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 300 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 301 + case "tools.ozone.moderation.defs#modEventReport": 302 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 303 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 304 + case "tools.ozone.moderation.defs#modEventLabel": 305 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 306 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 307 + case "tools.ozone.moderation.defs#modEventAcknowledge": 308 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 309 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 310 + case "tools.ozone.moderation.defs#modEventEscalate": 311 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 312 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 313 + case "tools.ozone.moderation.defs#modEventMute": 314 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 315 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 316 + case "tools.ozone.moderation.defs#modEventEmail": 317 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 318 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 319 + case "tools.ozone.moderation.defs#modEventResolveAppeal": 320 + t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 321 + return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 322 + 323 + default: 324 + return nil 325 + } 326 + } 327 + 328 + type ModerationDefs_ModEventViewDetail_Subject struct { 329 + ModerationDefs_RepoView *ModerationDefs_RepoView 330 + ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 331 + ModerationDefs_RecordView *ModerationDefs_RecordView 332 + ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound 333 + } 334 + 335 + func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { 336 + if t.ModerationDefs_RepoView != nil { 337 + t.ModerationDefs_RepoView.LexiconTypeID = "tools.ozone.moderation.defs#repoView" 338 + return json.Marshal(t.ModerationDefs_RepoView) 339 + } 340 + if t.ModerationDefs_RepoViewNotFound != nil { 341 + t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 342 + return json.Marshal(t.ModerationDefs_RepoViewNotFound) 343 + } 344 + if t.ModerationDefs_RecordView != nil { 345 + t.ModerationDefs_RecordView.LexiconTypeID = "tools.ozone.moderation.defs#recordView" 346 + return json.Marshal(t.ModerationDefs_RecordView) 347 + } 348 + if t.ModerationDefs_RecordViewNotFound != nil { 349 + t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" 350 + return json.Marshal(t.ModerationDefs_RecordViewNotFound) 351 + } 352 + return nil, fmt.Errorf("cannot marshal empty enum") 353 + } 354 + func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { 355 + typ, err := util.TypeExtract(b) 356 + if err != nil { 357 + return err 358 + } 359 + 360 + switch typ { 361 + case "tools.ozone.moderation.defs#repoView": 362 + t.ModerationDefs_RepoView = new(ModerationDefs_RepoView) 363 + return json.Unmarshal(b, t.ModerationDefs_RepoView) 364 + case "tools.ozone.moderation.defs#repoViewNotFound": 365 + t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 366 + return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 367 + case "tools.ozone.moderation.defs#recordView": 368 + t.ModerationDefs_RecordView = new(ModerationDefs_RecordView) 369 + return json.Unmarshal(b, t.ModerationDefs_RecordView) 370 + case "tools.ozone.moderation.defs#recordViewNotFound": 371 + t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) 372 + return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) 373 + 374 + default: 375 + return nil 376 + } 377 + } 378 + 379 + type ModerationDefs_ModEventView_Event struct { 380 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 381 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 382 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 383 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 384 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 385 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 386 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 387 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 388 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 389 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 390 + } 391 + 392 + func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { 393 + if t.ModerationDefs_ModEventTakedown != nil { 394 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 395 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 396 + } 397 + if t.ModerationDefs_ModEventReverseTakedown != nil { 398 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 399 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 400 + } 401 + if t.ModerationDefs_ModEventComment != nil { 402 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 403 + return json.Marshal(t.ModerationDefs_ModEventComment) 404 + } 405 + if t.ModerationDefs_ModEventReport != nil { 406 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 407 + return json.Marshal(t.ModerationDefs_ModEventReport) 408 + } 409 + if t.ModerationDefs_ModEventLabel != nil { 410 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 411 + return json.Marshal(t.ModerationDefs_ModEventLabel) 412 + } 413 + if t.ModerationDefs_ModEventAcknowledge != nil { 414 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 415 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 416 + } 417 + if t.ModerationDefs_ModEventEscalate != nil { 418 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 419 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 420 + } 421 + if t.ModerationDefs_ModEventMute != nil { 422 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 423 + return json.Marshal(t.ModerationDefs_ModEventMute) 424 + } 425 + if t.ModerationDefs_ModEventEmail != nil { 426 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 427 + return json.Marshal(t.ModerationDefs_ModEventEmail) 428 + } 429 + if t.ModerationDefs_ModEventResolveAppeal != nil { 430 + t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 431 + return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 432 + } 433 + return nil, fmt.Errorf("cannot marshal empty enum") 434 + } 435 + func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { 436 + typ, err := util.TypeExtract(b) 437 + if err != nil { 438 + return err 439 + } 440 + 441 + switch typ { 442 + case "tools.ozone.moderation.defs#modEventTakedown": 443 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 444 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 445 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 446 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 447 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 448 + case "tools.ozone.moderation.defs#modEventComment": 449 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 450 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 451 + case "tools.ozone.moderation.defs#modEventReport": 452 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 453 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 454 + case "tools.ozone.moderation.defs#modEventLabel": 455 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 456 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 457 + case "tools.ozone.moderation.defs#modEventAcknowledge": 458 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 459 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 460 + case "tools.ozone.moderation.defs#modEventEscalate": 461 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 462 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 463 + case "tools.ozone.moderation.defs#modEventMute": 464 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 465 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 466 + case "tools.ozone.moderation.defs#modEventEmail": 467 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 468 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 469 + case "tools.ozone.moderation.defs#modEventResolveAppeal": 470 + t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 471 + return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 472 + 473 + default: 474 + return nil 475 + } 476 + } 477 + 478 + type ModerationDefs_ModEventView_Subject struct { 479 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 480 + RepoStrongRef *comatprototypes.RepoStrongRef 481 + } 482 + 483 + func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { 484 + if t.AdminDefs_RepoRef != nil { 485 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 486 + return json.Marshal(t.AdminDefs_RepoRef) 487 + } 488 + if t.RepoStrongRef != nil { 489 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 490 + return json.Marshal(t.RepoStrongRef) 491 + } 492 + return nil, fmt.Errorf("cannot marshal empty enum") 493 + } 494 + func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { 495 + typ, err := util.TypeExtract(b) 496 + if err != nil { 497 + return err 498 + } 499 + 500 + switch typ { 501 + case "com.atproto.admin.defs#repoRef": 502 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 503 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 504 + case "com.atproto.repo.strongRef": 505 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 506 + return json.Unmarshal(b, t.RepoStrongRef) 507 + 508 + default: 509 + return nil 510 + } 511 + } 512 + 513 + // ModerationDefs_Moderation is a "moderation" in the tools.ozone.moderation.defs schema. 514 + type ModerationDefs_Moderation struct { 515 + SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 516 + } 517 + 518 + // ModerationDefs_ModerationDetail is a "moderationDetail" in the tools.ozone.moderation.defs schema. 519 + type ModerationDefs_ModerationDetail struct { 520 + SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 521 + } 522 + 523 + // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. 524 + // 525 + // RECORDTYPE: ModerationDefs_RecordView 526 + type ModerationDefs_RecordView struct { 527 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordView" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` 528 + BlobCids []string `json:"blobCids" cborgen:"blobCids"` 529 + Cid string `json:"cid" cborgen:"cid"` 530 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 531 + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 532 + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 533 + Uri string `json:"uri" cborgen:"uri"` 534 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 535 + } 536 + 537 + // ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. 538 + type ModerationDefs_RecordViewDetail struct { 539 + Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` 540 + Cid string `json:"cid" cborgen:"cid"` 541 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 542 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 543 + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 544 + Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 545 + Uri string `json:"uri" cborgen:"uri"` 546 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 547 + } 548 + 549 + // ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. 550 + // 551 + // RECORDTYPE: ModerationDefs_RecordViewNotFound 552 + type ModerationDefs_RecordViewNotFound struct { 553 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` 554 + Uri string `json:"uri" cborgen:"uri"` 555 + } 556 + 557 + // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. 558 + // 559 + // RECORDTYPE: ModerationDefs_RepoView 560 + type ModerationDefs_RepoView struct { 561 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoView" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` 562 + Did string `json:"did" cborgen:"did"` 563 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 564 + Handle string `json:"handle" cborgen:"handle"` 565 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 566 + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 567 + InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 568 + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 569 + Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 570 + RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 571 + } 572 + 573 + // ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. 574 + type ModerationDefs_RepoViewDetail struct { 575 + Did string `json:"did" cborgen:"did"` 576 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 577 + EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` 578 + Handle string `json:"handle" cborgen:"handle"` 579 + IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 580 + InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 581 + InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 582 + Invites []*comatprototypes.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` 583 + InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 584 + Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 585 + Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 586 + RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 587 + } 588 + 589 + // ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. 590 + // 591 + // RECORDTYPE: ModerationDefs_RepoViewNotFound 592 + type ModerationDefs_RepoViewNotFound struct { 593 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` 594 + Did string `json:"did" cborgen:"did"` 595 + } 596 + 597 + // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. 598 + type ModerationDefs_SubjectStatusView struct { 599 + // appealed: True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. 600 + Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 601 + // comment: Sticky comment on the subject. 602 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 603 + // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject 604 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 605 + Id int64 `json:"id" cborgen:"id"` 606 + // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 607 + LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 608 + LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 609 + LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 610 + LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 611 + MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 612 + ReviewState *string `json:"reviewState" cborgen:"reviewState"` 613 + Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 614 + SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 615 + SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 616 + SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 617 + Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 618 + Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 619 + // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 620 + UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 621 + } 622 + 623 + type ModerationDefs_SubjectStatusView_Subject struct { 624 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 625 + RepoStrongRef *comatprototypes.RepoStrongRef 626 + } 627 + 628 + func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { 629 + if t.AdminDefs_RepoRef != nil { 630 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 631 + return json.Marshal(t.AdminDefs_RepoRef) 632 + } 633 + if t.RepoStrongRef != nil { 634 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 635 + return json.Marshal(t.RepoStrongRef) 636 + } 637 + return nil, fmt.Errorf("cannot marshal empty enum") 638 + } 639 + func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { 640 + typ, err := util.TypeExtract(b) 641 + if err != nil { 642 + return err 643 + } 644 + 645 + switch typ { 646 + case "com.atproto.admin.defs#repoRef": 647 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 648 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 649 + case "com.atproto.repo.strongRef": 650 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 651 + return json.Unmarshal(b, t.RepoStrongRef) 652 + 653 + default: 654 + return nil 655 + } 656 + } 657 + 658 + // ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema. 659 + // 660 + // RECORDTYPE: ModerationDefs_VideoDetails 661 + type ModerationDefs_VideoDetails struct { 662 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#videoDetails" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` 663 + Height int64 `json:"height" cborgen:"height"` 664 + Length int64 `json:"length" cborgen:"length"` 665 + Width int64 `json:"width" cborgen:"width"` 666 + }
+175
api/ozone/moderationemitEvent.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.emitEvent 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + comatprototypes "github.com/bluesky-social/indigo/api/atproto" 13 + "github.com/bluesky-social/indigo/lex/util" 14 + "github.com/bluesky-social/indigo/xrpc" 15 + ) 16 + 17 + // ModerationEmitEvent_Input is the input argument to a tools.ozone.moderation.emitEvent call. 18 + type ModerationEmitEvent_Input struct { 19 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 20 + Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"` 21 + Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"` 22 + SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 23 + } 24 + 25 + type ModerationEmitEvent_Input_Event struct { 26 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 27 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 28 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 29 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 30 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 31 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 32 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 33 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 34 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 35 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 36 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 37 + } 38 + 39 + func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { 40 + if t.ModerationDefs_ModEventTakedown != nil { 41 + t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 42 + return json.Marshal(t.ModerationDefs_ModEventTakedown) 43 + } 44 + if t.ModerationDefs_ModEventAcknowledge != nil { 45 + t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 46 + return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 47 + } 48 + if t.ModerationDefs_ModEventEscalate != nil { 49 + t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 50 + return json.Marshal(t.ModerationDefs_ModEventEscalate) 51 + } 52 + if t.ModerationDefs_ModEventComment != nil { 53 + t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 54 + return json.Marshal(t.ModerationDefs_ModEventComment) 55 + } 56 + if t.ModerationDefs_ModEventLabel != nil { 57 + t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 58 + return json.Marshal(t.ModerationDefs_ModEventLabel) 59 + } 60 + if t.ModerationDefs_ModEventReport != nil { 61 + t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 62 + return json.Marshal(t.ModerationDefs_ModEventReport) 63 + } 64 + if t.ModerationDefs_ModEventMute != nil { 65 + t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 66 + return json.Marshal(t.ModerationDefs_ModEventMute) 67 + } 68 + if t.ModerationDefs_ModEventReverseTakedown != nil { 69 + t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 70 + return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 71 + } 72 + if t.ModerationDefs_ModEventUnmute != nil { 73 + t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 74 + return json.Marshal(t.ModerationDefs_ModEventUnmute) 75 + } 76 + if t.ModerationDefs_ModEventEmail != nil { 77 + t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 78 + return json.Marshal(t.ModerationDefs_ModEventEmail) 79 + } 80 + if t.ModerationDefs_ModEventTag != nil { 81 + t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 82 + return json.Marshal(t.ModerationDefs_ModEventTag) 83 + } 84 + return nil, fmt.Errorf("cannot marshal empty enum") 85 + } 86 + func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { 87 + typ, err := util.TypeExtract(b) 88 + if err != nil { 89 + return err 90 + } 91 + 92 + switch typ { 93 + case "tools.ozone.moderation.defs#modEventTakedown": 94 + t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 95 + return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 96 + case "tools.ozone.moderation.defs#modEventAcknowledge": 97 + t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 98 + return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 99 + case "tools.ozone.moderation.defs#modEventEscalate": 100 + t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 101 + return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 102 + case "tools.ozone.moderation.defs#modEventComment": 103 + t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 104 + return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 105 + case "tools.ozone.moderation.defs#modEventLabel": 106 + t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 107 + return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 108 + case "tools.ozone.moderation.defs#modEventReport": 109 + t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 110 + return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 111 + case "tools.ozone.moderation.defs#modEventMute": 112 + t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 113 + return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 114 + case "tools.ozone.moderation.defs#modEventReverseTakedown": 115 + t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 116 + return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 117 + case "tools.ozone.moderation.defs#modEventUnmute": 118 + t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 119 + return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 120 + case "tools.ozone.moderation.defs#modEventEmail": 121 + t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 122 + return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 123 + case "tools.ozone.moderation.defs#modEventTag": 124 + t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 125 + return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 126 + 127 + default: 128 + return nil 129 + } 130 + } 131 + 132 + type ModerationEmitEvent_Input_Subject struct { 133 + AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 134 + RepoStrongRef *comatprototypes.RepoStrongRef 135 + } 136 + 137 + func (t *ModerationEmitEvent_Input_Subject) MarshalJSON() ([]byte, error) { 138 + if t.AdminDefs_RepoRef != nil { 139 + t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 140 + return json.Marshal(t.AdminDefs_RepoRef) 141 + } 142 + if t.RepoStrongRef != nil { 143 + t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 144 + return json.Marshal(t.RepoStrongRef) 145 + } 146 + return nil, fmt.Errorf("cannot marshal empty enum") 147 + } 148 + func (t *ModerationEmitEvent_Input_Subject) UnmarshalJSON(b []byte) error { 149 + typ, err := util.TypeExtract(b) 150 + if err != nil { 151 + return err 152 + } 153 + 154 + switch typ { 155 + case "com.atproto.admin.defs#repoRef": 156 + t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 157 + return json.Unmarshal(b, t.AdminDefs_RepoRef) 158 + case "com.atproto.repo.strongRef": 159 + t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 160 + return json.Unmarshal(b, t.RepoStrongRef) 161 + 162 + default: 163 + return nil 164 + } 165 + } 166 + 167 + // ModerationEmitEvent calls the XRPC method "tools.ozone.moderation.emitEvent". 168 + func ModerationEmitEvent(ctx context.Context, c *xrpc.Client, input *ModerationEmitEvent_Input) (*ModerationDefs_ModEventView, error) { 169 + var out ModerationDefs_ModEventView 170 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.moderation.emitEvent", nil, input, &out); err != nil { 171 + return nil, err 172 + } 173 + 174 + return &out, nil 175 + }
+25
api/ozone/moderationgetEvent.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getEvent 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetEvent calls the XRPC method "tools.ozone.moderation.getEvent". 14 + func ModerationGetEvent(ctx context.Context, c *xrpc.Client, id int64) (*ModerationDefs_ModEventViewDetail, error) { 15 + var out ModerationDefs_ModEventViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "id": id, 19 + } 20 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+26
api/ozone/moderationgetRecord.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRecord 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetRecord calls the XRPC method "tools.ozone.moderation.getRecord". 14 + func ModerationGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) { 15 + var out ModerationDefs_RecordViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "cid": cid, 19 + "uri": uri, 20 + } 21 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil { 22 + return nil, err 23 + } 24 + 25 + return &out, nil 26 + }
+25
api/ozone/moderationgetRepo.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.getRepo 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationGetRepo calls the XRPC method "tools.ozone.moderation.getRepo". 14 + func ModerationGetRepo(ctx context.Context, c *xrpc.Client, did string) (*ModerationDefs_RepoViewDetail, error) { 15 + var out ModerationDefs_RepoViewDetail 16 + 17 + params := map[string]interface{}{ 18 + "did": did, 19 + } 20 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil { 21 + return nil, err 22 + } 23 + 24 + return &out, nil 25 + }
+58
api/ozone/moderationqueryEvents.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.queryEvents 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationQueryEvents_Output is the output of a tools.ozone.moderation.queryEvents call. 14 + type ModerationQueryEvents_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Events []*ModerationDefs_ModEventView `json:"events" cborgen:"events"` 17 + } 18 + 19 + // ModerationQueryEvents calls the XRPC method "tools.ozone.moderation.queryEvents". 20 + // 21 + // addedLabels: If specified, only events where all of these labels were added are returned 22 + // addedTags: If specified, only events where all of these tags were added are returned 23 + // comment: If specified, only events with comments containing the keyword are returned 24 + // createdAfter: Retrieve events created after a given timestamp 25 + // createdBefore: Retrieve events created before a given timestamp 26 + // hasComment: If true, only events with comments are returned 27 + // includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) owned by the did are returned 28 + // removedLabels: If specified, only events where all of these labels were removed are returned 29 + // removedTags: If specified, only events where all of these tags were removed are returned 30 + // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 31 + // 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. 32 + func ModerationQueryEvents(ctx context.Context, c *xrpc.Client, addedLabels []string, addedTags []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, types []string) (*ModerationQueryEvents_Output, error) { 33 + var out ModerationQueryEvents_Output 34 + 35 + params := map[string]interface{}{ 36 + "addedLabels": addedLabels, 37 + "addedTags": addedTags, 38 + "comment": comment, 39 + "createdAfter": createdAfter, 40 + "createdBefore": createdBefore, 41 + "createdBy": createdBy, 42 + "cursor": cursor, 43 + "hasComment": hasComment, 44 + "includeAllUserRecords": includeAllUserRecords, 45 + "limit": limit, 46 + "removedLabels": removedLabels, 47 + "removedTags": removedTags, 48 + "reportTypes": reportTypes, 49 + "sortDirection": sortDirection, 50 + "subject": subject, 51 + "types": types, 52 + } 53 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil { 54 + return nil, err 55 + } 56 + 57 + return &out, nil 58 + }
+59
api/ozone/moderationqueryStatuses.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.queryStatuses 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call. 14 + type ModerationQueryStatuses_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + SubjectStatuses []*ModerationDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"` 17 + } 18 + 19 + // ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses". 20 + // 21 + // appealed: Get subjects in unresolved appealed status 22 + // comment: Search subjects by keyword from comments 23 + // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 24 + // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 25 + // reportedAfter: Search subjects reported after a given timestamp 26 + // reportedBefore: Search subjects reported before a given timestamp 27 + // reviewState: Specify when fetching subjects in a certain state 28 + // reviewedAfter: Search subjects reviewed after a given timestamp 29 + // reviewedBefore: Search subjects reviewed before a given timestamp 30 + // takendown: Get subjects that were taken down 31 + func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, comment string, cursor string, excludeTags []string, ignoreSubjects []string, includeMuted bool, lastReviewedBy string, limit int64, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 32 + var out ModerationQueryStatuses_Output 33 + 34 + params := map[string]interface{}{ 35 + "appealed": appealed, 36 + "comment": comment, 37 + "cursor": cursor, 38 + "excludeTags": excludeTags, 39 + "ignoreSubjects": ignoreSubjects, 40 + "includeMuted": includeMuted, 41 + "lastReviewedBy": lastReviewedBy, 42 + "limit": limit, 43 + "reportedAfter": reportedAfter, 44 + "reportedBefore": reportedBefore, 45 + "reviewState": reviewState, 46 + "reviewedAfter": reviewedAfter, 47 + "reviewedBefore": reviewedBefore, 48 + "sortDirection": sortDirection, 49 + "sortField": sortField, 50 + "subject": subject, 51 + "tags": tags, 52 + "takendown": takendown, 53 + } 54 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { 55 + return nil, err 56 + } 57 + 58 + return &out, nil 59 + }
+36
api/ozone/moderationsearchRepos.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.searchRepos 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // ModerationSearchRepos_Output is the output of a tools.ozone.moderation.searchRepos call. 14 + type ModerationSearchRepos_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Repos []*ModerationDefs_RepoView `json:"repos" cborgen:"repos"` 17 + } 18 + 19 + // ModerationSearchRepos calls the XRPC method "tools.ozone.moderation.searchRepos". 20 + // 21 + // term: DEPRECATED: use 'q' instead 22 + func ModerationSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) { 23 + var out ModerationSearchRepos_Output 24 + 25 + params := map[string]interface{}{ 26 + "cursor": cursor, 27 + "limit": limit, 28 + "q": q, 29 + "term": term, 30 + } 31 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }