···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.communication.createTemplate
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// CommunicationCreateTemplate_Input is the input argument to a tools.ozone.communication.createTemplate call.
1414+type CommunicationCreateTemplate_Input struct {
1515+ // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders.
1616+ ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"`
1717+ // createdBy: DID of the user who is creating the template.
1818+ CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"`
1919+ // name: Name of the template.
2020+ Name string `json:"name" cborgen:"name"`
2121+ // subject: Subject of the message, used in emails.
2222+ Subject string `json:"subject" cborgen:"subject"`
2323+}
2424+2525+// CommunicationCreateTemplate calls the XRPC method "tools.ozone.communication.createTemplate".
2626+func CommunicationCreateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationCreateTemplate_Input) (*CommunicationDefs_TemplateView, error) {
2727+ var out CommunicationDefs_TemplateView
2828+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.createTemplate", nil, input, &out); err != nil {
2929+ return nil, err
3030+ }
3131+3232+ return &out, nil
3333+}
+21
api/ozone/communicationdefs.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.communication.defs
66+77+// CommunicationDefs_TemplateView is a "templateView" in the tools.ozone.communication.defs schema.
88+type CommunicationDefs_TemplateView struct {
99+ // contentMarkdown: Subject of the message, used in emails.
1010+ ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"`
1111+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
1212+ Disabled bool `json:"disabled" cborgen:"disabled"`
1313+ Id string `json:"id" cborgen:"id"`
1414+ // lastUpdatedBy: DID of the user who last updated the template.
1515+ LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"`
1616+ // name: Name of the template.
1717+ Name string `json:"name" cborgen:"name"`
1818+ // subject: Content of the template, can contain markdown and variable placeholders.
1919+ Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"`
2020+ UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"`
2121+}
+25
api/ozone/communicationdeleteTemplate.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.communication.deleteTemplate
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// CommunicationDeleteTemplate_Input is the input argument to a tools.ozone.communication.deleteTemplate call.
1414+type CommunicationDeleteTemplate_Input struct {
1515+ Id string `json:"id" cborgen:"id"`
1616+}
1717+1818+// CommunicationDeleteTemplate calls the XRPC method "tools.ozone.communication.deleteTemplate".
1919+func CommunicationDeleteTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationDeleteTemplate_Input) error {
2020+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.deleteTemplate", nil, input, nil); err != nil {
2121+ return err
2222+ }
2323+2424+ return nil
2525+}
+26
api/ozone/communicationlistTemplates.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.communication.listTemplates
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// CommunicationListTemplates_Output is the output of a tools.ozone.communication.listTemplates call.
1414+type CommunicationListTemplates_Output struct {
1515+ CommunicationTemplates []*CommunicationDefs_TemplateView `json:"communicationTemplates" cborgen:"communicationTemplates"`
1616+}
1717+1818+// CommunicationListTemplates calls the XRPC method "tools.ozone.communication.listTemplates".
1919+func CommunicationListTemplates(ctx context.Context, c *xrpc.Client) (*CommunicationListTemplates_Output, error) {
2020+ var out CommunicationListTemplates_Output
2121+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.communication.listTemplates", nil, nil, &out); err != nil {
2222+ return nil, err
2323+ }
2424+2525+ return &out, nil
2626+}
+36
api/ozone/communicationupdateTemplate.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.communication.updateTemplate
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// CommunicationUpdateTemplate_Input is the input argument to a tools.ozone.communication.updateTemplate call.
1414+type CommunicationUpdateTemplate_Input struct {
1515+ // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders.
1616+ ContentMarkdown *string `json:"contentMarkdown,omitempty" cborgen:"contentMarkdown,omitempty"`
1717+ Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"`
1818+ // id: ID of the template to be updated.
1919+ Id string `json:"id" cborgen:"id"`
2020+ // name: Name of the template.
2121+ Name *string `json:"name,omitempty" cborgen:"name,omitempty"`
2222+ // subject: Subject of the message, used in emails.
2323+ Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"`
2424+ // updatedBy: DID of the user who is updating the template.
2525+ UpdatedBy *string `json:"updatedBy,omitempty" cborgen:"updatedBy,omitempty"`
2626+}
2727+2828+// CommunicationUpdateTemplate calls the XRPC method "tools.ozone.communication.updateTemplate".
2929+func CommunicationUpdateTemplate(ctx context.Context, c *xrpc.Client, input *CommunicationUpdateTemplate_Input) (*CommunicationDefs_TemplateView, error) {
3030+ var out CommunicationDefs_TemplateView
3131+ if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.communication.updateTemplate", nil, input, &out); err != nil {
3232+ return nil, err
3333+ }
3434+3535+ return &out, nil
3636+}
+666
api/ozone/moderationdefs.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.defs
66+77+import (
88+ "encoding/json"
99+ "fmt"
1010+1111+ comatprototypes "github.com/bluesky-social/indigo/api/atproto"
1212+ "github.com/bluesky-social/indigo/lex/util"
1313+)
1414+1515+// ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema.
1616+type ModerationDefs_BlobView struct {
1717+ Cid string `json:"cid" cborgen:"cid"`
1818+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
1919+ Details *ModerationDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"`
2020+ MimeType string `json:"mimeType" cborgen:"mimeType"`
2121+ Moderation *ModerationDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"`
2222+ Size int64 `json:"size" cborgen:"size"`
2323+}
2424+2525+type ModerationDefs_BlobView_Details struct {
2626+ ModerationDefs_ImageDetails *ModerationDefs_ImageDetails
2727+ ModerationDefs_VideoDetails *ModerationDefs_VideoDetails
2828+}
2929+3030+func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) {
3131+ if t.ModerationDefs_ImageDetails != nil {
3232+ t.ModerationDefs_ImageDetails.LexiconTypeID = "tools.ozone.moderation.defs#imageDetails"
3333+ return json.Marshal(t.ModerationDefs_ImageDetails)
3434+ }
3535+ if t.ModerationDefs_VideoDetails != nil {
3636+ t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails"
3737+ return json.Marshal(t.ModerationDefs_VideoDetails)
3838+ }
3939+ return nil, fmt.Errorf("cannot marshal empty enum")
4040+}
4141+func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error {
4242+ typ, err := util.TypeExtract(b)
4343+ if err != nil {
4444+ return err
4545+ }
4646+4747+ switch typ {
4848+ case "tools.ozone.moderation.defs#imageDetails":
4949+ t.ModerationDefs_ImageDetails = new(ModerationDefs_ImageDetails)
5050+ return json.Unmarshal(b, t.ModerationDefs_ImageDetails)
5151+ case "tools.ozone.moderation.defs#videoDetails":
5252+ t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails)
5353+ return json.Unmarshal(b, t.ModerationDefs_VideoDetails)
5454+5555+ default:
5656+ return nil
5757+ }
5858+}
5959+6060+// ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema.
6161+//
6262+// RECORDTYPE: ModerationDefs_ImageDetails
6363+type ModerationDefs_ImageDetails struct {
6464+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#imageDetails" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"`
6565+ Height int64 `json:"height" cborgen:"height"`
6666+ Width int64 `json:"width" cborgen:"width"`
6767+}
6868+6969+// ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema.
7070+//
7171+// RECORDTYPE: ModerationDefs_ModEventAcknowledge
7272+type ModerationDefs_ModEventAcknowledge struct {
7373+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"`
7474+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
7575+}
7676+7777+// ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema.
7878+//
7979+// # Add a comment to a subject
8080+//
8181+// RECORDTYPE: ModerationDefs_ModEventComment
8282+type ModerationDefs_ModEventComment struct {
8383+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventComment" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"`
8484+ Comment string `json:"comment" cborgen:"comment"`
8585+ // sticky: Make the comment persistent on the subject
8686+ Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"`
8787+}
8888+8989+// ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema.
9090+//
9191+// # Keep a log of outgoing email to a user
9292+//
9393+// RECORDTYPE: ModerationDefs_ModEventEmail
9494+type ModerationDefs_ModEventEmail struct {
9595+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEmail" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"`
9696+ // comment: Additional comment about the outgoing comm.
9797+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
9898+ // content: The content of the email sent to the user.
9999+ Content *string `json:"content,omitempty" cborgen:"content,omitempty"`
100100+ // subjectLine: The subject line of the email sent to the user.
101101+ SubjectLine string `json:"subjectLine" cborgen:"subjectLine"`
102102+}
103103+104104+// ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema.
105105+//
106106+// RECORDTYPE: ModerationDefs_ModEventEscalate
107107+type ModerationDefs_ModEventEscalate struct {
108108+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEscalate" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"`
109109+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
110110+}
111111+112112+// ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema.
113113+//
114114+// Apply/Negate labels on a subject
115115+//
116116+// RECORDTYPE: ModerationDefs_ModEventLabel
117117+type ModerationDefs_ModEventLabel struct {
118118+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"`
119119+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
120120+ CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"`
121121+ NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"`
122122+}
123123+124124+// ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema.
125125+//
126126+// # Mute incoming reports on a subject
127127+//
128128+// RECORDTYPE: ModerationDefs_ModEventMute
129129+type ModerationDefs_ModEventMute struct {
130130+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"`
131131+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
132132+ // durationInHours: Indicates how long the subject should remain muted.
133133+ DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"`
134134+}
135135+136136+// ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema.
137137+//
138138+// # Report a subject
139139+//
140140+// RECORDTYPE: ModerationDefs_ModEventReport
141141+type ModerationDefs_ModEventReport struct {
142142+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReport" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"`
143143+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
144144+ ReportType *string `json:"reportType" cborgen:"reportType"`
145145+}
146146+147147+// ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema.
148148+//
149149+// # Resolve appeal on a subject
150150+//
151151+// RECORDTYPE: ModerationDefs_ModEventResolveAppeal
152152+type ModerationDefs_ModEventResolveAppeal struct {
153153+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"`
154154+ // comment: Describe resolution.
155155+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
156156+}
157157+158158+// ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema.
159159+//
160160+// # Revert take down action on a subject
161161+//
162162+// RECORDTYPE: ModerationDefs_ModEventReverseTakedown
163163+type ModerationDefs_ModEventReverseTakedown struct {
164164+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"`
165165+ // comment: Describe reasoning behind the reversal.
166166+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
167167+}
168168+169169+// ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema.
170170+//
171171+// Add/Remove a tag on a subject
172172+//
173173+// RECORDTYPE: ModerationDefs_ModEventTag
174174+type ModerationDefs_ModEventTag struct {
175175+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTag" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"`
176176+ // add: Tags to be added to the subject. If already exists, won't be duplicated.
177177+ Add []string `json:"add" cborgen:"add"`
178178+ // comment: Additional comment about added/removed tags.
179179+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
180180+ // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.
181181+ Remove []string `json:"remove" cborgen:"remove"`
182182+}
183183+184184+// ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema.
185185+//
186186+// # Take down a subject permanently or temporarily
187187+//
188188+// RECORDTYPE: ModerationDefs_ModEventTakedown
189189+type ModerationDefs_ModEventTakedown struct {
190190+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"`
191191+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
192192+ // durationInHours: Indicates how long the takedown should be in effect before automatically expiring.
193193+ DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
194194+}
195195+196196+// ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema.
197197+//
198198+// # Unmute action on a subject
199199+//
200200+// RECORDTYPE: ModerationDefs_ModEventUnmute
201201+type ModerationDefs_ModEventUnmute struct {
202202+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"`
203203+ // comment: Describe reasoning behind the reversal.
204204+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
205205+}
206206+207207+// ModerationDefs_ModEventView is a "modEventView" in the tools.ozone.moderation.defs schema.
208208+type ModerationDefs_ModEventView struct {
209209+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
210210+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
211211+ CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"`
212212+ Event *ModerationDefs_ModEventView_Event `json:"event" cborgen:"event"`
213213+ Id int64 `json:"id" cborgen:"id"`
214214+ Subject *ModerationDefs_ModEventView_Subject `json:"subject" cborgen:"subject"`
215215+ SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"`
216216+ SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"`
217217+}
218218+219219+// ModerationDefs_ModEventViewDetail is a "modEventViewDetail" in the tools.ozone.moderation.defs schema.
220220+type ModerationDefs_ModEventViewDetail struct {
221221+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
222222+ CreatedBy string `json:"createdBy" cborgen:"createdBy"`
223223+ Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"`
224224+ Id int64 `json:"id" cborgen:"id"`
225225+ Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"`
226226+ SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"`
227227+}
228228+229229+type ModerationDefs_ModEventViewDetail_Event struct {
230230+ ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown
231231+ ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown
232232+ ModerationDefs_ModEventComment *ModerationDefs_ModEventComment
233233+ ModerationDefs_ModEventReport *ModerationDefs_ModEventReport
234234+ ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel
235235+ ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge
236236+ ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate
237237+ ModerationDefs_ModEventMute *ModerationDefs_ModEventMute
238238+ ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail
239239+ ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal
240240+}
241241+242242+func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) {
243243+ if t.ModerationDefs_ModEventTakedown != nil {
244244+ t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown"
245245+ return json.Marshal(t.ModerationDefs_ModEventTakedown)
246246+ }
247247+ if t.ModerationDefs_ModEventReverseTakedown != nil {
248248+ t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown"
249249+ return json.Marshal(t.ModerationDefs_ModEventReverseTakedown)
250250+ }
251251+ if t.ModerationDefs_ModEventComment != nil {
252252+ t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment"
253253+ return json.Marshal(t.ModerationDefs_ModEventComment)
254254+ }
255255+ if t.ModerationDefs_ModEventReport != nil {
256256+ t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport"
257257+ return json.Marshal(t.ModerationDefs_ModEventReport)
258258+ }
259259+ if t.ModerationDefs_ModEventLabel != nil {
260260+ t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel"
261261+ return json.Marshal(t.ModerationDefs_ModEventLabel)
262262+ }
263263+ if t.ModerationDefs_ModEventAcknowledge != nil {
264264+ t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge"
265265+ return json.Marshal(t.ModerationDefs_ModEventAcknowledge)
266266+ }
267267+ if t.ModerationDefs_ModEventEscalate != nil {
268268+ t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate"
269269+ return json.Marshal(t.ModerationDefs_ModEventEscalate)
270270+ }
271271+ if t.ModerationDefs_ModEventMute != nil {
272272+ t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute"
273273+ return json.Marshal(t.ModerationDefs_ModEventMute)
274274+ }
275275+ if t.ModerationDefs_ModEventEmail != nil {
276276+ t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail"
277277+ return json.Marshal(t.ModerationDefs_ModEventEmail)
278278+ }
279279+ if t.ModerationDefs_ModEventResolveAppeal != nil {
280280+ t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal"
281281+ return json.Marshal(t.ModerationDefs_ModEventResolveAppeal)
282282+ }
283283+ return nil, fmt.Errorf("cannot marshal empty enum")
284284+}
285285+func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error {
286286+ typ, err := util.TypeExtract(b)
287287+ if err != nil {
288288+ return err
289289+ }
290290+291291+ switch typ {
292292+ case "tools.ozone.moderation.defs#modEventTakedown":
293293+ t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown)
294294+ return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown)
295295+ case "tools.ozone.moderation.defs#modEventReverseTakedown":
296296+ t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown)
297297+ return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown)
298298+ case "tools.ozone.moderation.defs#modEventComment":
299299+ t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment)
300300+ return json.Unmarshal(b, t.ModerationDefs_ModEventComment)
301301+ case "tools.ozone.moderation.defs#modEventReport":
302302+ t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport)
303303+ return json.Unmarshal(b, t.ModerationDefs_ModEventReport)
304304+ case "tools.ozone.moderation.defs#modEventLabel":
305305+ t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel)
306306+ return json.Unmarshal(b, t.ModerationDefs_ModEventLabel)
307307+ case "tools.ozone.moderation.defs#modEventAcknowledge":
308308+ t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge)
309309+ return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge)
310310+ case "tools.ozone.moderation.defs#modEventEscalate":
311311+ t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate)
312312+ return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate)
313313+ case "tools.ozone.moderation.defs#modEventMute":
314314+ t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute)
315315+ return json.Unmarshal(b, t.ModerationDefs_ModEventMute)
316316+ case "tools.ozone.moderation.defs#modEventEmail":
317317+ t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail)
318318+ return json.Unmarshal(b, t.ModerationDefs_ModEventEmail)
319319+ case "tools.ozone.moderation.defs#modEventResolveAppeal":
320320+ t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal)
321321+ return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal)
322322+323323+ default:
324324+ return nil
325325+ }
326326+}
327327+328328+type ModerationDefs_ModEventViewDetail_Subject struct {
329329+ ModerationDefs_RepoView *ModerationDefs_RepoView
330330+ ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound
331331+ ModerationDefs_RecordView *ModerationDefs_RecordView
332332+ ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound
333333+}
334334+335335+func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) {
336336+ if t.ModerationDefs_RepoView != nil {
337337+ t.ModerationDefs_RepoView.LexiconTypeID = "tools.ozone.moderation.defs#repoView"
338338+ return json.Marshal(t.ModerationDefs_RepoView)
339339+ }
340340+ if t.ModerationDefs_RepoViewNotFound != nil {
341341+ t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound"
342342+ return json.Marshal(t.ModerationDefs_RepoViewNotFound)
343343+ }
344344+ if t.ModerationDefs_RecordView != nil {
345345+ t.ModerationDefs_RecordView.LexiconTypeID = "tools.ozone.moderation.defs#recordView"
346346+ return json.Marshal(t.ModerationDefs_RecordView)
347347+ }
348348+ if t.ModerationDefs_RecordViewNotFound != nil {
349349+ t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound"
350350+ return json.Marshal(t.ModerationDefs_RecordViewNotFound)
351351+ }
352352+ return nil, fmt.Errorf("cannot marshal empty enum")
353353+}
354354+func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error {
355355+ typ, err := util.TypeExtract(b)
356356+ if err != nil {
357357+ return err
358358+ }
359359+360360+ switch typ {
361361+ case "tools.ozone.moderation.defs#repoView":
362362+ t.ModerationDefs_RepoView = new(ModerationDefs_RepoView)
363363+ return json.Unmarshal(b, t.ModerationDefs_RepoView)
364364+ case "tools.ozone.moderation.defs#repoViewNotFound":
365365+ t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound)
366366+ return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound)
367367+ case "tools.ozone.moderation.defs#recordView":
368368+ t.ModerationDefs_RecordView = new(ModerationDefs_RecordView)
369369+ return json.Unmarshal(b, t.ModerationDefs_RecordView)
370370+ case "tools.ozone.moderation.defs#recordViewNotFound":
371371+ t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound)
372372+ return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound)
373373+374374+ default:
375375+ return nil
376376+ }
377377+}
378378+379379+type ModerationDefs_ModEventView_Event struct {
380380+ ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown
381381+ ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown
382382+ ModerationDefs_ModEventComment *ModerationDefs_ModEventComment
383383+ ModerationDefs_ModEventReport *ModerationDefs_ModEventReport
384384+ ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel
385385+ ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge
386386+ ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate
387387+ ModerationDefs_ModEventMute *ModerationDefs_ModEventMute
388388+ ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail
389389+ ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal
390390+}
391391+392392+func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) {
393393+ if t.ModerationDefs_ModEventTakedown != nil {
394394+ t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown"
395395+ return json.Marshal(t.ModerationDefs_ModEventTakedown)
396396+ }
397397+ if t.ModerationDefs_ModEventReverseTakedown != nil {
398398+ t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown"
399399+ return json.Marshal(t.ModerationDefs_ModEventReverseTakedown)
400400+ }
401401+ if t.ModerationDefs_ModEventComment != nil {
402402+ t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment"
403403+ return json.Marshal(t.ModerationDefs_ModEventComment)
404404+ }
405405+ if t.ModerationDefs_ModEventReport != nil {
406406+ t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport"
407407+ return json.Marshal(t.ModerationDefs_ModEventReport)
408408+ }
409409+ if t.ModerationDefs_ModEventLabel != nil {
410410+ t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel"
411411+ return json.Marshal(t.ModerationDefs_ModEventLabel)
412412+ }
413413+ if t.ModerationDefs_ModEventAcknowledge != nil {
414414+ t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge"
415415+ return json.Marshal(t.ModerationDefs_ModEventAcknowledge)
416416+ }
417417+ if t.ModerationDefs_ModEventEscalate != nil {
418418+ t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate"
419419+ return json.Marshal(t.ModerationDefs_ModEventEscalate)
420420+ }
421421+ if t.ModerationDefs_ModEventMute != nil {
422422+ t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute"
423423+ return json.Marshal(t.ModerationDefs_ModEventMute)
424424+ }
425425+ if t.ModerationDefs_ModEventEmail != nil {
426426+ t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail"
427427+ return json.Marshal(t.ModerationDefs_ModEventEmail)
428428+ }
429429+ if t.ModerationDefs_ModEventResolveAppeal != nil {
430430+ t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal"
431431+ return json.Marshal(t.ModerationDefs_ModEventResolveAppeal)
432432+ }
433433+ return nil, fmt.Errorf("cannot marshal empty enum")
434434+}
435435+func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error {
436436+ typ, err := util.TypeExtract(b)
437437+ if err != nil {
438438+ return err
439439+ }
440440+441441+ switch typ {
442442+ case "tools.ozone.moderation.defs#modEventTakedown":
443443+ t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown)
444444+ return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown)
445445+ case "tools.ozone.moderation.defs#modEventReverseTakedown":
446446+ t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown)
447447+ return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown)
448448+ case "tools.ozone.moderation.defs#modEventComment":
449449+ t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment)
450450+ return json.Unmarshal(b, t.ModerationDefs_ModEventComment)
451451+ case "tools.ozone.moderation.defs#modEventReport":
452452+ t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport)
453453+ return json.Unmarshal(b, t.ModerationDefs_ModEventReport)
454454+ case "tools.ozone.moderation.defs#modEventLabel":
455455+ t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel)
456456+ return json.Unmarshal(b, t.ModerationDefs_ModEventLabel)
457457+ case "tools.ozone.moderation.defs#modEventAcknowledge":
458458+ t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge)
459459+ return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge)
460460+ case "tools.ozone.moderation.defs#modEventEscalate":
461461+ t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate)
462462+ return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate)
463463+ case "tools.ozone.moderation.defs#modEventMute":
464464+ t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute)
465465+ return json.Unmarshal(b, t.ModerationDefs_ModEventMute)
466466+ case "tools.ozone.moderation.defs#modEventEmail":
467467+ t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail)
468468+ return json.Unmarshal(b, t.ModerationDefs_ModEventEmail)
469469+ case "tools.ozone.moderation.defs#modEventResolveAppeal":
470470+ t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal)
471471+ return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal)
472472+473473+ default:
474474+ return nil
475475+ }
476476+}
477477+478478+type ModerationDefs_ModEventView_Subject struct {
479479+ AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef
480480+ RepoStrongRef *comatprototypes.RepoStrongRef
481481+}
482482+483483+func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) {
484484+ if t.AdminDefs_RepoRef != nil {
485485+ t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef"
486486+ return json.Marshal(t.AdminDefs_RepoRef)
487487+ }
488488+ if t.RepoStrongRef != nil {
489489+ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
490490+ return json.Marshal(t.RepoStrongRef)
491491+ }
492492+ return nil, fmt.Errorf("cannot marshal empty enum")
493493+}
494494+func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error {
495495+ typ, err := util.TypeExtract(b)
496496+ if err != nil {
497497+ return err
498498+ }
499499+500500+ switch typ {
501501+ case "com.atproto.admin.defs#repoRef":
502502+ t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef)
503503+ return json.Unmarshal(b, t.AdminDefs_RepoRef)
504504+ case "com.atproto.repo.strongRef":
505505+ t.RepoStrongRef = new(comatprototypes.RepoStrongRef)
506506+ return json.Unmarshal(b, t.RepoStrongRef)
507507+508508+ default:
509509+ return nil
510510+ }
511511+}
512512+513513+// ModerationDefs_Moderation is a "moderation" in the tools.ozone.moderation.defs schema.
514514+type ModerationDefs_Moderation struct {
515515+ SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"`
516516+}
517517+518518+// ModerationDefs_ModerationDetail is a "moderationDetail" in the tools.ozone.moderation.defs schema.
519519+type ModerationDefs_ModerationDetail struct {
520520+ SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"`
521521+}
522522+523523+// ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema.
524524+//
525525+// RECORDTYPE: ModerationDefs_RecordView
526526+type ModerationDefs_RecordView struct {
527527+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordView" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"`
528528+ BlobCids []string `json:"blobCids" cborgen:"blobCids"`
529529+ Cid string `json:"cid" cborgen:"cid"`
530530+ IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
531531+ Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"`
532532+ Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"`
533533+ Uri string `json:"uri" cborgen:"uri"`
534534+ Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
535535+}
536536+537537+// ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema.
538538+type ModerationDefs_RecordViewDetail struct {
539539+ Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"`
540540+ Cid string `json:"cid" cborgen:"cid"`
541541+ IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
542542+ Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
543543+ Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"`
544544+ Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"`
545545+ Uri string `json:"uri" cborgen:"uri"`
546546+ Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
547547+}
548548+549549+// ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema.
550550+//
551551+// RECORDTYPE: ModerationDefs_RecordViewNotFound
552552+type ModerationDefs_RecordViewNotFound struct {
553553+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"`
554554+ Uri string `json:"uri" cborgen:"uri"`
555555+}
556556+557557+// ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema.
558558+//
559559+// RECORDTYPE: ModerationDefs_RepoView
560560+type ModerationDefs_RepoView struct {
561561+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoView" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"`
562562+ Did string `json:"did" cborgen:"did"`
563563+ Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
564564+ Handle string `json:"handle" cborgen:"handle"`
565565+ IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
566566+ InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"`
567567+ InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"`
568568+ InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"`
569569+ Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"`
570570+ RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"`
571571+}
572572+573573+// ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema.
574574+type ModerationDefs_RepoViewDetail struct {
575575+ Did string `json:"did" cborgen:"did"`
576576+ Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
577577+ EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"`
578578+ Handle string `json:"handle" cborgen:"handle"`
579579+ IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
580580+ InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"`
581581+ InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"`
582582+ Invites []*comatprototypes.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"`
583583+ InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"`
584584+ Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
585585+ Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"`
586586+ RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"`
587587+}
588588+589589+// ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema.
590590+//
591591+// RECORDTYPE: ModerationDefs_RepoViewNotFound
592592+type ModerationDefs_RepoViewNotFound struct {
593593+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"`
594594+ Did string `json:"did" cborgen:"did"`
595595+}
596596+597597+// ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema.
598598+type ModerationDefs_SubjectStatusView struct {
599599+ // 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.
600600+ Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"`
601601+ // comment: Sticky comment on the subject.
602602+ Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
603603+ // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject
604604+ CreatedAt string `json:"createdAt" cborgen:"createdAt"`
605605+ Id int64 `json:"id" cborgen:"id"`
606606+ // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action
607607+ LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"`
608608+ LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"`
609609+ LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"`
610610+ LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"`
611611+ MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"`
612612+ ReviewState *string `json:"reviewState" cborgen:"reviewState"`
613613+ Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"`
614614+ SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"`
615615+ SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"`
616616+ SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"`
617617+ Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"`
618618+ Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"`
619619+ // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject
620620+ UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"`
621621+}
622622+623623+type ModerationDefs_SubjectStatusView_Subject struct {
624624+ AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef
625625+ RepoStrongRef *comatprototypes.RepoStrongRef
626626+}
627627+628628+func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) {
629629+ if t.AdminDefs_RepoRef != nil {
630630+ t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef"
631631+ return json.Marshal(t.AdminDefs_RepoRef)
632632+ }
633633+ if t.RepoStrongRef != nil {
634634+ t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
635635+ return json.Marshal(t.RepoStrongRef)
636636+ }
637637+ return nil, fmt.Errorf("cannot marshal empty enum")
638638+}
639639+func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error {
640640+ typ, err := util.TypeExtract(b)
641641+ if err != nil {
642642+ return err
643643+ }
644644+645645+ switch typ {
646646+ case "com.atproto.admin.defs#repoRef":
647647+ t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef)
648648+ return json.Unmarshal(b, t.AdminDefs_RepoRef)
649649+ case "com.atproto.repo.strongRef":
650650+ t.RepoStrongRef = new(comatprototypes.RepoStrongRef)
651651+ return json.Unmarshal(b, t.RepoStrongRef)
652652+653653+ default:
654654+ return nil
655655+ }
656656+}
657657+658658+// ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema.
659659+//
660660+// RECORDTYPE: ModerationDefs_VideoDetails
661661+type ModerationDefs_VideoDetails struct {
662662+ LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#videoDetails" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"`
663663+ Height int64 `json:"height" cborgen:"height"`
664664+ Length int64 `json:"length" cborgen:"length"`
665665+ Width int64 `json:"width" cborgen:"width"`
666666+}
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.getEvent
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationGetEvent calls the XRPC method "tools.ozone.moderation.getEvent".
1414+func ModerationGetEvent(ctx context.Context, c *xrpc.Client, id int64) (*ModerationDefs_ModEventViewDetail, error) {
1515+ var out ModerationDefs_ModEventViewDetail
1616+1717+ params := map[string]interface{}{
1818+ "id": id,
1919+ }
2020+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getEvent", params, nil, &out); err != nil {
2121+ return nil, err
2222+ }
2323+2424+ return &out, nil
2525+}
+26
api/ozone/moderationgetRecord.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.getRecord
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationGetRecord calls the XRPC method "tools.ozone.moderation.getRecord".
1414+func ModerationGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*ModerationDefs_RecordViewDetail, error) {
1515+ var out ModerationDefs_RecordViewDetail
1616+1717+ params := map[string]interface{}{
1818+ "cid": cid,
1919+ "uri": uri,
2020+ }
2121+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRecord", params, nil, &out); err != nil {
2222+ return nil, err
2323+ }
2424+2525+ return &out, nil
2626+}
+25
api/ozone/moderationgetRepo.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.getRepo
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationGetRepo calls the XRPC method "tools.ozone.moderation.getRepo".
1414+func ModerationGetRepo(ctx context.Context, c *xrpc.Client, did string) (*ModerationDefs_RepoViewDetail, error) {
1515+ var out ModerationDefs_RepoViewDetail
1616+1717+ params := map[string]interface{}{
1818+ "did": did,
1919+ }
2020+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.getRepo", params, nil, &out); err != nil {
2121+ return nil, err
2222+ }
2323+2424+ return &out, nil
2525+}
+58
api/ozone/moderationqueryEvents.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.queryEvents
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationQueryEvents_Output is the output of a tools.ozone.moderation.queryEvents call.
1414+type ModerationQueryEvents_Output struct {
1515+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616+ Events []*ModerationDefs_ModEventView `json:"events" cborgen:"events"`
1717+}
1818+1919+// ModerationQueryEvents calls the XRPC method "tools.ozone.moderation.queryEvents".
2020+//
2121+// addedLabels: If specified, only events where all of these labels were added are returned
2222+// addedTags: If specified, only events where all of these tags were added are returned
2323+// comment: If specified, only events with comments containing the keyword are returned
2424+// createdAfter: Retrieve events created after a given timestamp
2525+// createdBefore: Retrieve events created before a given timestamp
2626+// hasComment: If true, only events with comments are returned
2727+// includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) owned by the did are returned
2828+// removedLabels: If specified, only events where all of these labels were removed are returned
2929+// removedTags: If specified, only events where all of these tags were removed are returned
3030+// sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp.
3131+// 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.
3232+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) {
3333+ var out ModerationQueryEvents_Output
3434+3535+ params := map[string]interface{}{
3636+ "addedLabels": addedLabels,
3737+ "addedTags": addedTags,
3838+ "comment": comment,
3939+ "createdAfter": createdAfter,
4040+ "createdBefore": createdBefore,
4141+ "createdBy": createdBy,
4242+ "cursor": cursor,
4343+ "hasComment": hasComment,
4444+ "includeAllUserRecords": includeAllUserRecords,
4545+ "limit": limit,
4646+ "removedLabels": removedLabels,
4747+ "removedTags": removedTags,
4848+ "reportTypes": reportTypes,
4949+ "sortDirection": sortDirection,
5050+ "subject": subject,
5151+ "types": types,
5252+ }
5353+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryEvents", params, nil, &out); err != nil {
5454+ return nil, err
5555+ }
5656+5757+ return &out, nil
5858+}
+59
api/ozone/moderationqueryStatuses.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.queryStatuses
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call.
1414+type ModerationQueryStatuses_Output struct {
1515+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616+ SubjectStatuses []*ModerationDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"`
1717+}
1818+1919+// ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses".
2020+//
2121+// appealed: Get subjects in unresolved appealed status
2222+// comment: Search subjects by keyword from comments
2323+// includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them.
2424+// lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator
2525+// reportedAfter: Search subjects reported after a given timestamp
2626+// reportedBefore: Search subjects reported before a given timestamp
2727+// reviewState: Specify when fetching subjects in a certain state
2828+// reviewedAfter: Search subjects reviewed after a given timestamp
2929+// reviewedBefore: Search subjects reviewed before a given timestamp
3030+// takendown: Get subjects that were taken down
3131+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) {
3232+ var out ModerationQueryStatuses_Output
3333+3434+ params := map[string]interface{}{
3535+ "appealed": appealed,
3636+ "comment": comment,
3737+ "cursor": cursor,
3838+ "excludeTags": excludeTags,
3939+ "ignoreSubjects": ignoreSubjects,
4040+ "includeMuted": includeMuted,
4141+ "lastReviewedBy": lastReviewedBy,
4242+ "limit": limit,
4343+ "reportedAfter": reportedAfter,
4444+ "reportedBefore": reportedBefore,
4545+ "reviewState": reviewState,
4646+ "reviewedAfter": reviewedAfter,
4747+ "reviewedBefore": reviewedBefore,
4848+ "sortDirection": sortDirection,
4949+ "sortField": sortField,
5050+ "subject": subject,
5151+ "tags": tags,
5252+ "takendown": takendown,
5353+ }
5454+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil {
5555+ return nil, err
5656+ }
5757+5858+ return &out, nil
5959+}
+36
api/ozone/moderationsearchRepos.go
···11+// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22+33+package ozone
44+55+// schema: tools.ozone.moderation.searchRepos
66+77+import (
88+ "context"
99+1010+ "github.com/bluesky-social/indigo/xrpc"
1111+)
1212+1313+// ModerationSearchRepos_Output is the output of a tools.ozone.moderation.searchRepos call.
1414+type ModerationSearchRepos_Output struct {
1515+ Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616+ Repos []*ModerationDefs_RepoView `json:"repos" cborgen:"repos"`
1717+}
1818+1919+// ModerationSearchRepos calls the XRPC method "tools.ozone.moderation.searchRepos".
2020+//
2121+// term: DEPRECATED: use 'q' instead
2222+func ModerationSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*ModerationSearchRepos_Output, error) {
2323+ var out ModerationSearchRepos_Output
2424+2525+ params := map[string]interface{}{
2626+ "cursor": cursor,
2727+ "limit": limit,
2828+ "q": q,
2929+ "term": term,
3030+ }
3131+ if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.searchRepos", params, nil, &out); err != nil {
3232+ return nil, err
3333+ }
3434+3535+ return &out, nil
3636+}