···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.createCommunicationTemplate
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminCreateCommunicationTemplate_Input is the input argument to a com.atproto.admin.createCommunicationTemplate call.
1414-type AdminCreateCommunicationTemplate_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-// AdminCreateCommunicationTemplate calls the XRPC method "com.atproto.admin.createCommunicationTemplate".
2626-func AdminCreateCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminCreateCommunicationTemplate_Input) (*AdminDefs_CommunicationTemplateView, error) {
2727- var out AdminDefs_CommunicationTemplateView
2828- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.createCommunicationTemplate", nil, input, &out); err != nil {
2929- return nil, err
3030- }
3131-3232- return &out, nil
3333-}
-782
api/atproto/admindefs.go
···55// schema: com.atproto.admin.defs
6677import (
88- "encoding/json"
99- "fmt"
1010-118 "github.com/bluesky-social/indigo/lex/util"
129)
1310···2522 RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords,omitempty" cborgen:"relatedRecords,omitempty"`
2623}
27242828-// AdminDefs_BlobView is a "blobView" in the com.atproto.admin.defs schema.
2929-type AdminDefs_BlobView struct {
3030- Cid string `json:"cid" cborgen:"cid"`
3131- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
3232- Details *AdminDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"`
3333- MimeType string `json:"mimeType" cborgen:"mimeType"`
3434- Moderation *AdminDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"`
3535- Size int64 `json:"size" cborgen:"size"`
3636-}
3737-3838-type AdminDefs_BlobView_Details struct {
3939- AdminDefs_ImageDetails *AdminDefs_ImageDetails
4040- AdminDefs_VideoDetails *AdminDefs_VideoDetails
4141-}
4242-4343-func (t *AdminDefs_BlobView_Details) MarshalJSON() ([]byte, error) {
4444- if t.AdminDefs_ImageDetails != nil {
4545- t.AdminDefs_ImageDetails.LexiconTypeID = "com.atproto.admin.defs#imageDetails"
4646- return json.Marshal(t.AdminDefs_ImageDetails)
4747- }
4848- if t.AdminDefs_VideoDetails != nil {
4949- t.AdminDefs_VideoDetails.LexiconTypeID = "com.atproto.admin.defs#videoDetails"
5050- return json.Marshal(t.AdminDefs_VideoDetails)
5151- }
5252- return nil, fmt.Errorf("cannot marshal empty enum")
5353-}
5454-func (t *AdminDefs_BlobView_Details) UnmarshalJSON(b []byte) error {
5555- typ, err := util.TypeExtract(b)
5656- if err != nil {
5757- return err
5858- }
5959-6060- switch typ {
6161- case "com.atproto.admin.defs#imageDetails":
6262- t.AdminDefs_ImageDetails = new(AdminDefs_ImageDetails)
6363- return json.Unmarshal(b, t.AdminDefs_ImageDetails)
6464- case "com.atproto.admin.defs#videoDetails":
6565- t.AdminDefs_VideoDetails = new(AdminDefs_VideoDetails)
6666- return json.Unmarshal(b, t.AdminDefs_VideoDetails)
6767-6868- default:
6969- return nil
7070- }
7171-}
7272-7373-// AdminDefs_CommunicationTemplateView is a "communicationTemplateView" in the com.atproto.admin.defs schema.
7474-type AdminDefs_CommunicationTemplateView struct {
7575- // contentMarkdown: Subject of the message, used in emails.
7676- ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"`
7777- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
7878- Disabled bool `json:"disabled" cborgen:"disabled"`
7979- Id string `json:"id" cborgen:"id"`
8080- // lastUpdatedBy: DID of the user who last updated the template.
8181- LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"`
8282- // name: Name of the template.
8383- Name string `json:"name" cborgen:"name"`
8484- // subject: Content of the template, can contain markdown and variable placeholders.
8585- Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"`
8686- UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"`
8787-}
8888-8989-// AdminDefs_ImageDetails is a "imageDetails" in the com.atproto.admin.defs schema.
9090-//
9191-// RECORDTYPE: AdminDefs_ImageDetails
9292-type AdminDefs_ImageDetails struct {
9393- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#imageDetails" cborgen:"$type,const=com.atproto.admin.defs#imageDetails"`
9494- Height int64 `json:"height" cborgen:"height"`
9595- Width int64 `json:"width" cborgen:"width"`
9696-}
9797-9898-// AdminDefs_ModEventAcknowledge is a "modEventAcknowledge" in the com.atproto.admin.defs schema.
9999-//
100100-// RECORDTYPE: AdminDefs_ModEventAcknowledge
101101-type AdminDefs_ModEventAcknowledge struct {
102102- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventAcknowledge" cborgen:"$type,const=com.atproto.admin.defs#modEventAcknowledge"`
103103- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
104104-}
105105-106106-// AdminDefs_ModEventComment is a "modEventComment" in the com.atproto.admin.defs schema.
107107-//
108108-// # Add a comment to a subject
109109-//
110110-// RECORDTYPE: AdminDefs_ModEventComment
111111-type AdminDefs_ModEventComment struct {
112112- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventComment" cborgen:"$type,const=com.atproto.admin.defs#modEventComment"`
113113- Comment string `json:"comment" cborgen:"comment"`
114114- // sticky: Make the comment persistent on the subject
115115- Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"`
116116-}
117117-118118-// AdminDefs_ModEventEmail is a "modEventEmail" in the com.atproto.admin.defs schema.
119119-//
120120-// # Keep a log of outgoing email to a user
121121-//
122122-// RECORDTYPE: AdminDefs_ModEventEmail
123123-type AdminDefs_ModEventEmail struct {
124124- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventEmail" cborgen:"$type,const=com.atproto.admin.defs#modEventEmail"`
125125- // comment: Additional comment about the outgoing comm.
126126- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
127127- // content: The content of the email sent to the user.
128128- Content *string `json:"content,omitempty" cborgen:"content,omitempty"`
129129- // subjectLine: The subject line of the email sent to the user.
130130- SubjectLine string `json:"subjectLine" cborgen:"subjectLine"`
131131-}
132132-133133-// AdminDefs_ModEventEscalate is a "modEventEscalate" in the com.atproto.admin.defs schema.
134134-//
135135-// RECORDTYPE: AdminDefs_ModEventEscalate
136136-type AdminDefs_ModEventEscalate struct {
137137- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventEscalate" cborgen:"$type,const=com.atproto.admin.defs#modEventEscalate"`
138138- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
139139-}
140140-141141-// AdminDefs_ModEventLabel is a "modEventLabel" in the com.atproto.admin.defs schema.
142142-//
143143-// Apply/Negate labels on a subject
144144-//
145145-// RECORDTYPE: AdminDefs_ModEventLabel
146146-type AdminDefs_ModEventLabel struct {
147147- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventLabel" cborgen:"$type,const=com.atproto.admin.defs#modEventLabel"`
148148- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
149149- CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"`
150150- NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"`
151151-}
152152-153153-// AdminDefs_ModEventMute is a "modEventMute" in the com.atproto.admin.defs schema.
154154-//
155155-// # Mute incoming reports on a subject
156156-//
157157-// RECORDTYPE: AdminDefs_ModEventMute
158158-type AdminDefs_ModEventMute struct {
159159- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventMute" cborgen:"$type,const=com.atproto.admin.defs#modEventMute"`
160160- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
161161- // durationInHours: Indicates how long the subject should remain muted.
162162- DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"`
163163-}
164164-165165-// AdminDefs_ModEventReport is a "modEventReport" in the com.atproto.admin.defs schema.
166166-//
167167-// # Report a subject
168168-//
169169-// RECORDTYPE: AdminDefs_ModEventReport
170170-type AdminDefs_ModEventReport struct {
171171- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventReport" cborgen:"$type,const=com.atproto.admin.defs#modEventReport"`
172172- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
173173- ReportType *string `json:"reportType" cborgen:"reportType"`
174174-}
175175-176176-// AdminDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the com.atproto.admin.defs schema.
177177-//
178178-// # Resolve appeal on a subject
179179-//
180180-// RECORDTYPE: AdminDefs_ModEventResolveAppeal
181181-type AdminDefs_ModEventResolveAppeal struct {
182182- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventResolveAppeal" cborgen:"$type,const=com.atproto.admin.defs#modEventResolveAppeal"`
183183- // comment: Describe resolution.
184184- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
185185-}
186186-187187-// AdminDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the com.atproto.admin.defs schema.
188188-//
189189-// # Revert take down action on a subject
190190-//
191191-// RECORDTYPE: AdminDefs_ModEventReverseTakedown
192192-type AdminDefs_ModEventReverseTakedown struct {
193193- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventReverseTakedown" cborgen:"$type,const=com.atproto.admin.defs#modEventReverseTakedown"`
194194- // comment: Describe reasoning behind the reversal.
195195- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
196196-}
197197-198198-// AdminDefs_ModEventTag is a "modEventTag" in the com.atproto.admin.defs schema.
199199-//
200200-// Add/Remove a tag on a subject
201201-//
202202-// RECORDTYPE: AdminDefs_ModEventTag
203203-type AdminDefs_ModEventTag struct {
204204- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventTag" cborgen:"$type,const=com.atproto.admin.defs#modEventTag"`
205205- // add: Tags to be added to the subject. If already exists, won't be duplicated.
206206- Add []string `json:"add" cborgen:"add"`
207207- // comment: Additional comment about added/removed tags.
208208- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
209209- // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.
210210- Remove []string `json:"remove" cborgen:"remove"`
211211-}
212212-213213-// AdminDefs_ModEventTakedown is a "modEventTakedown" in the com.atproto.admin.defs schema.
214214-//
215215-// # Take down a subject permanently or temporarily
216216-//
217217-// RECORDTYPE: AdminDefs_ModEventTakedown
218218-type AdminDefs_ModEventTakedown struct {
219219- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventTakedown" cborgen:"$type,const=com.atproto.admin.defs#modEventTakedown"`
220220- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
221221- // durationInHours: Indicates how long the takedown should be in effect before automatically expiring.
222222- DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"`
223223-}
224224-225225-// AdminDefs_ModEventUnmute is a "modEventUnmute" in the com.atproto.admin.defs schema.
226226-//
227227-// # Unmute action on a subject
228228-//
229229-// RECORDTYPE: AdminDefs_ModEventUnmute
230230-type AdminDefs_ModEventUnmute struct {
231231- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventUnmute" cborgen:"$type,const=com.atproto.admin.defs#modEventUnmute"`
232232- // comment: Describe reasoning behind the reversal.
233233- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
234234-}
235235-236236-// AdminDefs_ModEventView is a "modEventView" in the com.atproto.admin.defs schema.
237237-type AdminDefs_ModEventView struct {
238238- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
239239- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
240240- CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"`
241241- Event *AdminDefs_ModEventView_Event `json:"event" cborgen:"event"`
242242- Id int64 `json:"id" cborgen:"id"`
243243- Subject *AdminDefs_ModEventView_Subject `json:"subject" cborgen:"subject"`
244244- SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"`
245245- SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"`
246246-}
247247-248248-// AdminDefs_ModEventViewDetail is a "modEventViewDetail" in the com.atproto.admin.defs schema.
249249-type AdminDefs_ModEventViewDetail struct {
250250- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
251251- CreatedBy string `json:"createdBy" cborgen:"createdBy"`
252252- Event *AdminDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"`
253253- Id int64 `json:"id" cborgen:"id"`
254254- Subject *AdminDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"`
255255- SubjectBlobs []*AdminDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"`
256256-}
257257-258258-type AdminDefs_ModEventViewDetail_Event struct {
259259- AdminDefs_ModEventTakedown *AdminDefs_ModEventTakedown
260260- AdminDefs_ModEventReverseTakedown *AdminDefs_ModEventReverseTakedown
261261- AdminDefs_ModEventComment *AdminDefs_ModEventComment
262262- AdminDefs_ModEventReport *AdminDefs_ModEventReport
263263- AdminDefs_ModEventLabel *AdminDefs_ModEventLabel
264264- AdminDefs_ModEventAcknowledge *AdminDefs_ModEventAcknowledge
265265- AdminDefs_ModEventEscalate *AdminDefs_ModEventEscalate
266266- AdminDefs_ModEventMute *AdminDefs_ModEventMute
267267- AdminDefs_ModEventEmail *AdminDefs_ModEventEmail
268268- AdminDefs_ModEventResolveAppeal *AdminDefs_ModEventResolveAppeal
269269-}
270270-271271-func (t *AdminDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) {
272272- if t.AdminDefs_ModEventTakedown != nil {
273273- t.AdminDefs_ModEventTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventTakedown"
274274- return json.Marshal(t.AdminDefs_ModEventTakedown)
275275- }
276276- if t.AdminDefs_ModEventReverseTakedown != nil {
277277- t.AdminDefs_ModEventReverseTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventReverseTakedown"
278278- return json.Marshal(t.AdminDefs_ModEventReverseTakedown)
279279- }
280280- if t.AdminDefs_ModEventComment != nil {
281281- t.AdminDefs_ModEventComment.LexiconTypeID = "com.atproto.admin.defs#modEventComment"
282282- return json.Marshal(t.AdminDefs_ModEventComment)
283283- }
284284- if t.AdminDefs_ModEventReport != nil {
285285- t.AdminDefs_ModEventReport.LexiconTypeID = "com.atproto.admin.defs#modEventReport"
286286- return json.Marshal(t.AdminDefs_ModEventReport)
287287- }
288288- if t.AdminDefs_ModEventLabel != nil {
289289- t.AdminDefs_ModEventLabel.LexiconTypeID = "com.atproto.admin.defs#modEventLabel"
290290- return json.Marshal(t.AdminDefs_ModEventLabel)
291291- }
292292- if t.AdminDefs_ModEventAcknowledge != nil {
293293- t.AdminDefs_ModEventAcknowledge.LexiconTypeID = "com.atproto.admin.defs#modEventAcknowledge"
294294- return json.Marshal(t.AdminDefs_ModEventAcknowledge)
295295- }
296296- if t.AdminDefs_ModEventEscalate != nil {
297297- t.AdminDefs_ModEventEscalate.LexiconTypeID = "com.atproto.admin.defs#modEventEscalate"
298298- return json.Marshal(t.AdminDefs_ModEventEscalate)
299299- }
300300- if t.AdminDefs_ModEventMute != nil {
301301- t.AdminDefs_ModEventMute.LexiconTypeID = "com.atproto.admin.defs#modEventMute"
302302- return json.Marshal(t.AdminDefs_ModEventMute)
303303- }
304304- if t.AdminDefs_ModEventEmail != nil {
305305- t.AdminDefs_ModEventEmail.LexiconTypeID = "com.atproto.admin.defs#modEventEmail"
306306- return json.Marshal(t.AdminDefs_ModEventEmail)
307307- }
308308- if t.AdminDefs_ModEventResolveAppeal != nil {
309309- t.AdminDefs_ModEventResolveAppeal.LexiconTypeID = "com.atproto.admin.defs#modEventResolveAppeal"
310310- return json.Marshal(t.AdminDefs_ModEventResolveAppeal)
311311- }
312312- return nil, fmt.Errorf("cannot marshal empty enum")
313313-}
314314-func (t *AdminDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error {
315315- typ, err := util.TypeExtract(b)
316316- if err != nil {
317317- return err
318318- }
319319-320320- switch typ {
321321- case "com.atproto.admin.defs#modEventTakedown":
322322- t.AdminDefs_ModEventTakedown = new(AdminDefs_ModEventTakedown)
323323- return json.Unmarshal(b, t.AdminDefs_ModEventTakedown)
324324- case "com.atproto.admin.defs#modEventReverseTakedown":
325325- t.AdminDefs_ModEventReverseTakedown = new(AdminDefs_ModEventReverseTakedown)
326326- return json.Unmarshal(b, t.AdminDefs_ModEventReverseTakedown)
327327- case "com.atproto.admin.defs#modEventComment":
328328- t.AdminDefs_ModEventComment = new(AdminDefs_ModEventComment)
329329- return json.Unmarshal(b, t.AdminDefs_ModEventComment)
330330- case "com.atproto.admin.defs#modEventReport":
331331- t.AdminDefs_ModEventReport = new(AdminDefs_ModEventReport)
332332- return json.Unmarshal(b, t.AdminDefs_ModEventReport)
333333- case "com.atproto.admin.defs#modEventLabel":
334334- t.AdminDefs_ModEventLabel = new(AdminDefs_ModEventLabel)
335335- return json.Unmarshal(b, t.AdminDefs_ModEventLabel)
336336- case "com.atproto.admin.defs#modEventAcknowledge":
337337- t.AdminDefs_ModEventAcknowledge = new(AdminDefs_ModEventAcknowledge)
338338- return json.Unmarshal(b, t.AdminDefs_ModEventAcknowledge)
339339- case "com.atproto.admin.defs#modEventEscalate":
340340- t.AdminDefs_ModEventEscalate = new(AdminDefs_ModEventEscalate)
341341- return json.Unmarshal(b, t.AdminDefs_ModEventEscalate)
342342- case "com.atproto.admin.defs#modEventMute":
343343- t.AdminDefs_ModEventMute = new(AdminDefs_ModEventMute)
344344- return json.Unmarshal(b, t.AdminDefs_ModEventMute)
345345- case "com.atproto.admin.defs#modEventEmail":
346346- t.AdminDefs_ModEventEmail = new(AdminDefs_ModEventEmail)
347347- return json.Unmarshal(b, t.AdminDefs_ModEventEmail)
348348- case "com.atproto.admin.defs#modEventResolveAppeal":
349349- t.AdminDefs_ModEventResolveAppeal = new(AdminDefs_ModEventResolveAppeal)
350350- return json.Unmarshal(b, t.AdminDefs_ModEventResolveAppeal)
351351-352352- default:
353353- return nil
354354- }
355355-}
356356-357357-type AdminDefs_ModEventViewDetail_Subject struct {
358358- AdminDefs_RepoView *AdminDefs_RepoView
359359- AdminDefs_RepoViewNotFound *AdminDefs_RepoViewNotFound
360360- AdminDefs_RecordView *AdminDefs_RecordView
361361- AdminDefs_RecordViewNotFound *AdminDefs_RecordViewNotFound
362362-}
363363-364364-func (t *AdminDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) {
365365- if t.AdminDefs_RepoView != nil {
366366- t.AdminDefs_RepoView.LexiconTypeID = "com.atproto.admin.defs#repoView"
367367- return json.Marshal(t.AdminDefs_RepoView)
368368- }
369369- if t.AdminDefs_RepoViewNotFound != nil {
370370- t.AdminDefs_RepoViewNotFound.LexiconTypeID = "com.atproto.admin.defs#repoViewNotFound"
371371- return json.Marshal(t.AdminDefs_RepoViewNotFound)
372372- }
373373- if t.AdminDefs_RecordView != nil {
374374- t.AdminDefs_RecordView.LexiconTypeID = "com.atproto.admin.defs#recordView"
375375- return json.Marshal(t.AdminDefs_RecordView)
376376- }
377377- if t.AdminDefs_RecordViewNotFound != nil {
378378- t.AdminDefs_RecordViewNotFound.LexiconTypeID = "com.atproto.admin.defs#recordViewNotFound"
379379- return json.Marshal(t.AdminDefs_RecordViewNotFound)
380380- }
381381- return nil, fmt.Errorf("cannot marshal empty enum")
382382-}
383383-func (t *AdminDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error {
384384- typ, err := util.TypeExtract(b)
385385- if err != nil {
386386- return err
387387- }
388388-389389- switch typ {
390390- case "com.atproto.admin.defs#repoView":
391391- t.AdminDefs_RepoView = new(AdminDefs_RepoView)
392392- return json.Unmarshal(b, t.AdminDefs_RepoView)
393393- case "com.atproto.admin.defs#repoViewNotFound":
394394- t.AdminDefs_RepoViewNotFound = new(AdminDefs_RepoViewNotFound)
395395- return json.Unmarshal(b, t.AdminDefs_RepoViewNotFound)
396396- case "com.atproto.admin.defs#recordView":
397397- t.AdminDefs_RecordView = new(AdminDefs_RecordView)
398398- return json.Unmarshal(b, t.AdminDefs_RecordView)
399399- case "com.atproto.admin.defs#recordViewNotFound":
400400- t.AdminDefs_RecordViewNotFound = new(AdminDefs_RecordViewNotFound)
401401- return json.Unmarshal(b, t.AdminDefs_RecordViewNotFound)
402402-403403- default:
404404- return nil
405405- }
406406-}
407407-408408-type AdminDefs_ModEventView_Event struct {
409409- AdminDefs_ModEventTakedown *AdminDefs_ModEventTakedown
410410- AdminDefs_ModEventReverseTakedown *AdminDefs_ModEventReverseTakedown
411411- AdminDefs_ModEventComment *AdminDefs_ModEventComment
412412- AdminDefs_ModEventReport *AdminDefs_ModEventReport
413413- AdminDefs_ModEventLabel *AdminDefs_ModEventLabel
414414- AdminDefs_ModEventAcknowledge *AdminDefs_ModEventAcknowledge
415415- AdminDefs_ModEventEscalate *AdminDefs_ModEventEscalate
416416- AdminDefs_ModEventMute *AdminDefs_ModEventMute
417417- AdminDefs_ModEventEmail *AdminDefs_ModEventEmail
418418- AdminDefs_ModEventResolveAppeal *AdminDefs_ModEventResolveAppeal
419419-}
420420-421421-func (t *AdminDefs_ModEventView_Event) MarshalJSON() ([]byte, error) {
422422- if t.AdminDefs_ModEventTakedown != nil {
423423- t.AdminDefs_ModEventTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventTakedown"
424424- return json.Marshal(t.AdminDefs_ModEventTakedown)
425425- }
426426- if t.AdminDefs_ModEventReverseTakedown != nil {
427427- t.AdminDefs_ModEventReverseTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventReverseTakedown"
428428- return json.Marshal(t.AdminDefs_ModEventReverseTakedown)
429429- }
430430- if t.AdminDefs_ModEventComment != nil {
431431- t.AdminDefs_ModEventComment.LexiconTypeID = "com.atproto.admin.defs#modEventComment"
432432- return json.Marshal(t.AdminDefs_ModEventComment)
433433- }
434434- if t.AdminDefs_ModEventReport != nil {
435435- t.AdminDefs_ModEventReport.LexiconTypeID = "com.atproto.admin.defs#modEventReport"
436436- return json.Marshal(t.AdminDefs_ModEventReport)
437437- }
438438- if t.AdminDefs_ModEventLabel != nil {
439439- t.AdminDefs_ModEventLabel.LexiconTypeID = "com.atproto.admin.defs#modEventLabel"
440440- return json.Marshal(t.AdminDefs_ModEventLabel)
441441- }
442442- if t.AdminDefs_ModEventAcknowledge != nil {
443443- t.AdminDefs_ModEventAcknowledge.LexiconTypeID = "com.atproto.admin.defs#modEventAcknowledge"
444444- return json.Marshal(t.AdminDefs_ModEventAcknowledge)
445445- }
446446- if t.AdminDefs_ModEventEscalate != nil {
447447- t.AdminDefs_ModEventEscalate.LexiconTypeID = "com.atproto.admin.defs#modEventEscalate"
448448- return json.Marshal(t.AdminDefs_ModEventEscalate)
449449- }
450450- if t.AdminDefs_ModEventMute != nil {
451451- t.AdminDefs_ModEventMute.LexiconTypeID = "com.atproto.admin.defs#modEventMute"
452452- return json.Marshal(t.AdminDefs_ModEventMute)
453453- }
454454- if t.AdminDefs_ModEventEmail != nil {
455455- t.AdminDefs_ModEventEmail.LexiconTypeID = "com.atproto.admin.defs#modEventEmail"
456456- return json.Marshal(t.AdminDefs_ModEventEmail)
457457- }
458458- if t.AdminDefs_ModEventResolveAppeal != nil {
459459- t.AdminDefs_ModEventResolveAppeal.LexiconTypeID = "com.atproto.admin.defs#modEventResolveAppeal"
460460- return json.Marshal(t.AdminDefs_ModEventResolveAppeal)
461461- }
462462- return nil, fmt.Errorf("cannot marshal empty enum")
463463-}
464464-func (t *AdminDefs_ModEventView_Event) UnmarshalJSON(b []byte) error {
465465- typ, err := util.TypeExtract(b)
466466- if err != nil {
467467- return err
468468- }
469469-470470- switch typ {
471471- case "com.atproto.admin.defs#modEventTakedown":
472472- t.AdminDefs_ModEventTakedown = new(AdminDefs_ModEventTakedown)
473473- return json.Unmarshal(b, t.AdminDefs_ModEventTakedown)
474474- case "com.atproto.admin.defs#modEventReverseTakedown":
475475- t.AdminDefs_ModEventReverseTakedown = new(AdminDefs_ModEventReverseTakedown)
476476- return json.Unmarshal(b, t.AdminDefs_ModEventReverseTakedown)
477477- case "com.atproto.admin.defs#modEventComment":
478478- t.AdminDefs_ModEventComment = new(AdminDefs_ModEventComment)
479479- return json.Unmarshal(b, t.AdminDefs_ModEventComment)
480480- case "com.atproto.admin.defs#modEventReport":
481481- t.AdminDefs_ModEventReport = new(AdminDefs_ModEventReport)
482482- return json.Unmarshal(b, t.AdminDefs_ModEventReport)
483483- case "com.atproto.admin.defs#modEventLabel":
484484- t.AdminDefs_ModEventLabel = new(AdminDefs_ModEventLabel)
485485- return json.Unmarshal(b, t.AdminDefs_ModEventLabel)
486486- case "com.atproto.admin.defs#modEventAcknowledge":
487487- t.AdminDefs_ModEventAcknowledge = new(AdminDefs_ModEventAcknowledge)
488488- return json.Unmarshal(b, t.AdminDefs_ModEventAcknowledge)
489489- case "com.atproto.admin.defs#modEventEscalate":
490490- t.AdminDefs_ModEventEscalate = new(AdminDefs_ModEventEscalate)
491491- return json.Unmarshal(b, t.AdminDefs_ModEventEscalate)
492492- case "com.atproto.admin.defs#modEventMute":
493493- t.AdminDefs_ModEventMute = new(AdminDefs_ModEventMute)
494494- return json.Unmarshal(b, t.AdminDefs_ModEventMute)
495495- case "com.atproto.admin.defs#modEventEmail":
496496- t.AdminDefs_ModEventEmail = new(AdminDefs_ModEventEmail)
497497- return json.Unmarshal(b, t.AdminDefs_ModEventEmail)
498498- case "com.atproto.admin.defs#modEventResolveAppeal":
499499- t.AdminDefs_ModEventResolveAppeal = new(AdminDefs_ModEventResolveAppeal)
500500- return json.Unmarshal(b, t.AdminDefs_ModEventResolveAppeal)
501501-502502- default:
503503- return nil
504504- }
505505-}
506506-507507-type AdminDefs_ModEventView_Subject struct {
508508- AdminDefs_RepoRef *AdminDefs_RepoRef
509509- RepoStrongRef *RepoStrongRef
510510-}
511511-512512-func (t *AdminDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) {
513513- if t.AdminDefs_RepoRef != nil {
514514- t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef"
515515- return json.Marshal(t.AdminDefs_RepoRef)
516516- }
517517- if t.RepoStrongRef != nil {
518518- t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
519519- return json.Marshal(t.RepoStrongRef)
520520- }
521521- return nil, fmt.Errorf("cannot marshal empty enum")
522522-}
523523-func (t *AdminDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error {
524524- typ, err := util.TypeExtract(b)
525525- if err != nil {
526526- return err
527527- }
528528-529529- switch typ {
530530- case "com.atproto.admin.defs#repoRef":
531531- t.AdminDefs_RepoRef = new(AdminDefs_RepoRef)
532532- return json.Unmarshal(b, t.AdminDefs_RepoRef)
533533- case "com.atproto.repo.strongRef":
534534- t.RepoStrongRef = new(RepoStrongRef)
535535- return json.Unmarshal(b, t.RepoStrongRef)
536536-537537- default:
538538- return nil
539539- }
540540-}
541541-542542-// AdminDefs_Moderation is a "moderation" in the com.atproto.admin.defs schema.
543543-type AdminDefs_Moderation struct {
544544- SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"`
545545-}
546546-547547-// AdminDefs_ModerationDetail is a "moderationDetail" in the com.atproto.admin.defs schema.
548548-type AdminDefs_ModerationDetail struct {
549549- SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"`
550550-}
551551-552552-// AdminDefs_RecordView is a "recordView" in the com.atproto.admin.defs schema.
553553-//
554554-// RECORDTYPE: AdminDefs_RecordView
555555-type AdminDefs_RecordView struct {
556556- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#recordView" cborgen:"$type,const=com.atproto.admin.defs#recordView"`
557557- BlobCids []string `json:"blobCids" cborgen:"blobCids"`
558558- Cid string `json:"cid" cborgen:"cid"`
559559- IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
560560- Moderation *AdminDefs_Moderation `json:"moderation" cborgen:"moderation"`
561561- Repo *AdminDefs_RepoView `json:"repo" cborgen:"repo"`
562562- Uri string `json:"uri" cborgen:"uri"`
563563- Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
564564-}
565565-566566-// AdminDefs_RecordViewDetail is a "recordViewDetail" in the com.atproto.admin.defs schema.
567567-type AdminDefs_RecordViewDetail struct {
568568- Blobs []*AdminDefs_BlobView `json:"blobs" cborgen:"blobs"`
569569- Cid string `json:"cid" cborgen:"cid"`
570570- IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
571571- Labels []*LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
572572- Moderation *AdminDefs_ModerationDetail `json:"moderation" cborgen:"moderation"`
573573- Repo *AdminDefs_RepoView `json:"repo" cborgen:"repo"`
574574- Uri string `json:"uri" cborgen:"uri"`
575575- Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
576576-}
577577-578578-// AdminDefs_RecordViewNotFound is a "recordViewNotFound" in the com.atproto.admin.defs schema.
579579-//
580580-// RECORDTYPE: AdminDefs_RecordViewNotFound
581581-type AdminDefs_RecordViewNotFound struct {
582582- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#recordViewNotFound" cborgen:"$type,const=com.atproto.admin.defs#recordViewNotFound"`
583583- Uri string `json:"uri" cborgen:"uri"`
584584-}
585585-58625// AdminDefs_RepoBlobRef is a "repoBlobRef" in the com.atproto.admin.defs schema.
58726//
58827// RECORDTYPE: AdminDefs_RepoBlobRef
···60140 Did string `json:"did" cborgen:"did"`
60241}
60342604604-// AdminDefs_RepoView is a "repoView" in the com.atproto.admin.defs schema.
605605-//
606606-// RECORDTYPE: AdminDefs_RepoView
607607-type AdminDefs_RepoView struct {
608608- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoView" cborgen:"$type,const=com.atproto.admin.defs#repoView"`
609609- Did string `json:"did" cborgen:"did"`
610610- Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
611611- Handle string `json:"handle" cborgen:"handle"`
612612- IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
613613- InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"`
614614- InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"`
615615- InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"`
616616- Moderation *AdminDefs_Moderation `json:"moderation" cborgen:"moderation"`
617617- RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"`
618618-}
619619-620620-// AdminDefs_RepoViewDetail is a "repoViewDetail" in the com.atproto.admin.defs schema.
621621-type AdminDefs_RepoViewDetail struct {
622622- Did string `json:"did" cborgen:"did"`
623623- Email *string `json:"email,omitempty" cborgen:"email,omitempty"`
624624- EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"`
625625- Handle string `json:"handle" cborgen:"handle"`
626626- IndexedAt string `json:"indexedAt" cborgen:"indexedAt"`
627627- InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"`
628628- InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"`
629629- Invites []*ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"`
630630- InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"`
631631- Labels []*LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
632632- Moderation *AdminDefs_ModerationDetail `json:"moderation" cborgen:"moderation"`
633633- RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"`
634634-}
635635-636636-// AdminDefs_RepoViewNotFound is a "repoViewNotFound" in the com.atproto.admin.defs schema.
637637-//
638638-// RECORDTYPE: AdminDefs_RepoViewNotFound
639639-type AdminDefs_RepoViewNotFound struct {
640640- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoViewNotFound" cborgen:"$type,const=com.atproto.admin.defs#repoViewNotFound"`
641641- Did string `json:"did" cborgen:"did"`
642642-}
643643-644644-// AdminDefs_ReportView is a "reportView" in the com.atproto.admin.defs schema.
645645-type AdminDefs_ReportView struct {
646646- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
647647- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
648648- Id int64 `json:"id" cborgen:"id"`
649649- ReasonType *string `json:"reasonType" cborgen:"reasonType"`
650650- ReportedBy string `json:"reportedBy" cborgen:"reportedBy"`
651651- ResolvedByActionIds []int64 `json:"resolvedByActionIds" cborgen:"resolvedByActionIds"`
652652- Subject *AdminDefs_ReportView_Subject `json:"subject" cborgen:"subject"`
653653- SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"`
654654-}
655655-656656-// AdminDefs_ReportViewDetail is a "reportViewDetail" in the com.atproto.admin.defs schema.
657657-type AdminDefs_ReportViewDetail struct {
658658- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
659659- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
660660- Id int64 `json:"id" cborgen:"id"`
661661- ReasonType *string `json:"reasonType" cborgen:"reasonType"`
662662- ReportedBy string `json:"reportedBy" cborgen:"reportedBy"`
663663- ResolvedByActions []*AdminDefs_ModEventView `json:"resolvedByActions" cborgen:"resolvedByActions"`
664664- Subject *AdminDefs_ReportViewDetail_Subject `json:"subject" cborgen:"subject"`
665665- SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"`
666666-}
667667-668668-type AdminDefs_ReportViewDetail_Subject struct {
669669- AdminDefs_RepoView *AdminDefs_RepoView
670670- AdminDefs_RepoViewNotFound *AdminDefs_RepoViewNotFound
671671- AdminDefs_RecordView *AdminDefs_RecordView
672672- AdminDefs_RecordViewNotFound *AdminDefs_RecordViewNotFound
673673-}
674674-675675-func (t *AdminDefs_ReportViewDetail_Subject) MarshalJSON() ([]byte, error) {
676676- if t.AdminDefs_RepoView != nil {
677677- t.AdminDefs_RepoView.LexiconTypeID = "com.atproto.admin.defs#repoView"
678678- return json.Marshal(t.AdminDefs_RepoView)
679679- }
680680- if t.AdminDefs_RepoViewNotFound != nil {
681681- t.AdminDefs_RepoViewNotFound.LexiconTypeID = "com.atproto.admin.defs#repoViewNotFound"
682682- return json.Marshal(t.AdminDefs_RepoViewNotFound)
683683- }
684684- if t.AdminDefs_RecordView != nil {
685685- t.AdminDefs_RecordView.LexiconTypeID = "com.atproto.admin.defs#recordView"
686686- return json.Marshal(t.AdminDefs_RecordView)
687687- }
688688- if t.AdminDefs_RecordViewNotFound != nil {
689689- t.AdminDefs_RecordViewNotFound.LexiconTypeID = "com.atproto.admin.defs#recordViewNotFound"
690690- return json.Marshal(t.AdminDefs_RecordViewNotFound)
691691- }
692692- return nil, fmt.Errorf("cannot marshal empty enum")
693693-}
694694-func (t *AdminDefs_ReportViewDetail_Subject) UnmarshalJSON(b []byte) error {
695695- typ, err := util.TypeExtract(b)
696696- if err != nil {
697697- return err
698698- }
699699-700700- switch typ {
701701- case "com.atproto.admin.defs#repoView":
702702- t.AdminDefs_RepoView = new(AdminDefs_RepoView)
703703- return json.Unmarshal(b, t.AdminDefs_RepoView)
704704- case "com.atproto.admin.defs#repoViewNotFound":
705705- t.AdminDefs_RepoViewNotFound = new(AdminDefs_RepoViewNotFound)
706706- return json.Unmarshal(b, t.AdminDefs_RepoViewNotFound)
707707- case "com.atproto.admin.defs#recordView":
708708- t.AdminDefs_RecordView = new(AdminDefs_RecordView)
709709- return json.Unmarshal(b, t.AdminDefs_RecordView)
710710- case "com.atproto.admin.defs#recordViewNotFound":
711711- t.AdminDefs_RecordViewNotFound = new(AdminDefs_RecordViewNotFound)
712712- return json.Unmarshal(b, t.AdminDefs_RecordViewNotFound)
713713-714714- default:
715715- return nil
716716- }
717717-}
718718-719719-type AdminDefs_ReportView_Subject struct {
720720- AdminDefs_RepoRef *AdminDefs_RepoRef
721721- RepoStrongRef *RepoStrongRef
722722-}
723723-724724-func (t *AdminDefs_ReportView_Subject) MarshalJSON() ([]byte, error) {
725725- if t.AdminDefs_RepoRef != nil {
726726- t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef"
727727- return json.Marshal(t.AdminDefs_RepoRef)
728728- }
729729- if t.RepoStrongRef != nil {
730730- t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
731731- return json.Marshal(t.RepoStrongRef)
732732- }
733733- return nil, fmt.Errorf("cannot marshal empty enum")
734734-}
735735-func (t *AdminDefs_ReportView_Subject) UnmarshalJSON(b []byte) error {
736736- typ, err := util.TypeExtract(b)
737737- if err != nil {
738738- return err
739739- }
740740-741741- switch typ {
742742- case "com.atproto.admin.defs#repoRef":
743743- t.AdminDefs_RepoRef = new(AdminDefs_RepoRef)
744744- return json.Unmarshal(b, t.AdminDefs_RepoRef)
745745- case "com.atproto.repo.strongRef":
746746- t.RepoStrongRef = new(RepoStrongRef)
747747- return json.Unmarshal(b, t.RepoStrongRef)
748748-749749- default:
750750- return nil
751751- }
752752-}
753753-75443// AdminDefs_StatusAttr is a "statusAttr" in the com.atproto.admin.defs schema.
75544type AdminDefs_StatusAttr struct {
75645 Applied bool `json:"applied" cborgen:"applied"`
75746 Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"`
75847}
759759-760760-// AdminDefs_SubjectStatusView is a "subjectStatusView" in the com.atproto.admin.defs schema.
761761-type AdminDefs_SubjectStatusView struct {
762762- // 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.
763763- Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"`
764764- // comment: Sticky comment on the subject.
765765- Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"`
766766- // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject
767767- CreatedAt string `json:"createdAt" cborgen:"createdAt"`
768768- Id int64 `json:"id" cborgen:"id"`
769769- // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action
770770- LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"`
771771- LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"`
772772- LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"`
773773- LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"`
774774- MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"`
775775- ReviewState *string `json:"reviewState" cborgen:"reviewState"`
776776- Subject *AdminDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"`
777777- SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"`
778778- SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"`
779779- SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"`
780780- Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"`
781781- Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"`
782782- // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject
783783- UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"`
784784-}
785785-786786-type AdminDefs_SubjectStatusView_Subject struct {
787787- AdminDefs_RepoRef *AdminDefs_RepoRef
788788- RepoStrongRef *RepoStrongRef
789789-}
790790-791791-func (t *AdminDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) {
792792- if t.AdminDefs_RepoRef != nil {
793793- t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef"
794794- return json.Marshal(t.AdminDefs_RepoRef)
795795- }
796796- if t.RepoStrongRef != nil {
797797- t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef"
798798- return json.Marshal(t.RepoStrongRef)
799799- }
800800- return nil, fmt.Errorf("cannot marshal empty enum")
801801-}
802802-func (t *AdminDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error {
803803- typ, err := util.TypeExtract(b)
804804- if err != nil {
805805- return err
806806- }
807807-808808- switch typ {
809809- case "com.atproto.admin.defs#repoRef":
810810- t.AdminDefs_RepoRef = new(AdminDefs_RepoRef)
811811- return json.Unmarshal(b, t.AdminDefs_RepoRef)
812812- case "com.atproto.repo.strongRef":
813813- t.RepoStrongRef = new(RepoStrongRef)
814814- return json.Unmarshal(b, t.RepoStrongRef)
815815-816816- default:
817817- return nil
818818- }
819819-}
820820-821821-// AdminDefs_VideoDetails is a "videoDetails" in the com.atproto.admin.defs schema.
822822-//
823823-// RECORDTYPE: AdminDefs_VideoDetails
824824-type AdminDefs_VideoDetails struct {
825825- LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#videoDetails" cborgen:"$type,const=com.atproto.admin.defs#videoDetails"`
826826- Height int64 `json:"height" cborgen:"height"`
827827- Length int64 `json:"length" cborgen:"length"`
828828- Width int64 `json:"width" cborgen:"width"`
829829-}
-25
api/atproto/admindeleteCommunicationTemplate.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.deleteCommunicationTemplate
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminDeleteCommunicationTemplate_Input is the input argument to a com.atproto.admin.deleteCommunicationTemplate call.
1414-type AdminDeleteCommunicationTemplate_Input struct {
1515- Id string `json:"id" cborgen:"id"`
1616-}
1717-1818-// AdminDeleteCommunicationTemplate calls the XRPC method "com.atproto.admin.deleteCommunicationTemplate".
1919-func AdminDeleteCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminDeleteCommunicationTemplate_Input) error {
2020- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.deleteCommunicationTemplate", nil, input, nil); err != nil {
2121- return err
2222- }
2323-2424- return nil
2525-}
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.getModerationEvent
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminGetModerationEvent calls the XRPC method "com.atproto.admin.getModerationEvent".
1414-func AdminGetModerationEvent(ctx context.Context, c *xrpc.Client, id int64) (*AdminDefs_ModEventViewDetail, error) {
1515- var out AdminDefs_ModEventViewDetail
1616-1717- params := map[string]interface{}{
1818- "id": id,
1919- }
2020- if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getModerationEvent", params, nil, &out); err != nil {
2121- return nil, err
2222- }
2323-2424- return &out, nil
2525-}
-26
api/atproto/admingetRecord.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.getRecord
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminGetRecord calls the XRPC method "com.atproto.admin.getRecord".
1414-func AdminGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*AdminDefs_RecordViewDetail, error) {
1515- var out AdminDefs_RecordViewDetail
1616-1717- params := map[string]interface{}{
1818- "cid": cid,
1919- "uri": uri,
2020- }
2121- if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getRecord", params, nil, &out); err != nil {
2222- return nil, err
2323- }
2424-2525- return &out, nil
2626-}
-25
api/atproto/admingetRepo.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.getRepo
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminGetRepo calls the XRPC method "com.atproto.admin.getRepo".
1414-func AdminGetRepo(ctx context.Context, c *xrpc.Client, did string) (*AdminDefs_RepoViewDetail, error) {
1515- var out AdminDefs_RepoViewDetail
1616-1717- params := map[string]interface{}{
1818- "did": did,
1919- }
2020- if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getRepo", params, nil, &out); err != nil {
2121- return nil, err
2222- }
2323-2424- return &out, nil
2525-}
-26
api/atproto/adminlistCommunicationTemplates.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.listCommunicationTemplates
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminListCommunicationTemplates_Output is the output of a com.atproto.admin.listCommunicationTemplates call.
1414-type AdminListCommunicationTemplates_Output struct {
1515- CommunicationTemplates []*AdminDefs_CommunicationTemplateView `json:"communicationTemplates" cborgen:"communicationTemplates"`
1616-}
1717-1818-// AdminListCommunicationTemplates calls the XRPC method "com.atproto.admin.listCommunicationTemplates".
1919-func AdminListCommunicationTemplates(ctx context.Context, c *xrpc.Client) (*AdminListCommunicationTemplates_Output, error) {
2020- var out AdminListCommunicationTemplates_Output
2121- if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.listCommunicationTemplates", nil, nil, &out); err != nil {
2222- return nil, err
2323- }
2424-2525- return &out, nil
2626-}
-58
api/atproto/adminqueryModerationEvents.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.queryModerationEvents
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminQueryModerationEvents_Output is the output of a com.atproto.admin.queryModerationEvents call.
1414-type AdminQueryModerationEvents_Output struct {
1515- Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616- Events []*AdminDefs_ModEventView `json:"events" cborgen:"events"`
1717-}
1818-1919-// AdminQueryModerationEvents calls the XRPC method "com.atproto.admin.queryModerationEvents".
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 com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned.
3232-func AdminQueryModerationEvents(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) (*AdminQueryModerationEvents_Output, error) {
3333- var out AdminQueryModerationEvents_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, "", "com.atproto.admin.queryModerationEvents", params, nil, &out); err != nil {
5454- return nil, err
5555- }
5656-5757- return &out, nil
5858-}
-59
api/atproto/adminqueryModerationStatuses.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.queryModerationStatuses
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminQueryModerationStatuses_Output is the output of a com.atproto.admin.queryModerationStatuses call.
1414-type AdminQueryModerationStatuses_Output struct {
1515- Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616- SubjectStatuses []*AdminDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"`
1717-}
1818-1919-// AdminQueryModerationStatuses calls the XRPC method "com.atproto.admin.queryModerationStatuses".
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 AdminQueryModerationStatuses(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) (*AdminQueryModerationStatuses_Output, error) {
3232- var out AdminQueryModerationStatuses_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, "", "com.atproto.admin.queryModerationStatuses", params, nil, &out); err != nil {
5555- return nil, err
5656- }
5757-5858- return &out, nil
5959-}
-36
api/atproto/adminsearchRepos.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.searchRepos
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminSearchRepos_Output is the output of a com.atproto.admin.searchRepos call.
1414-type AdminSearchRepos_Output struct {
1515- Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
1616- Repos []*AdminDefs_RepoView `json:"repos" cborgen:"repos"`
1717-}
1818-1919-// AdminSearchRepos calls the XRPC method "com.atproto.admin.searchRepos".
2020-//
2121-// term: DEPRECATED: use 'q' instead
2222-func AdminSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*AdminSearchRepos_Output, error) {
2323- var out AdminSearchRepos_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, "", "com.atproto.admin.searchRepos", params, nil, &out); err != nil {
3232- return nil, err
3333- }
3434-3535- return &out, nil
3636-}
-36
api/atproto/adminupdateCommunicationTemplate.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.admin.updateCommunicationTemplate
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// AdminUpdateCommunicationTemplate_Input is the input argument to a com.atproto.admin.updateCommunicationTemplate call.
1414-type AdminUpdateCommunicationTemplate_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-// AdminUpdateCommunicationTemplate calls the XRPC method "com.atproto.admin.updateCommunicationTemplate".
2929-func AdminUpdateCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminUpdateCommunicationTemplate_Input) (*AdminDefs_CommunicationTemplateView, error) {
3030- var out AdminDefs_CommunicationTemplateView
3131- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateCommunicationTemplate", nil, input, &out); err != nil {
3232- return nil, err
3333- }
3434-3535- return &out, nil
3636-}
-28
api/atproto/reporebaseRepo.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.repo.rebaseRepo
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// RepoRebaseRepo_Input is the input argument to a com.atproto.repo.rebaseRepo call.
1414-type RepoRebaseRepo_Input struct {
1515- // repo: The handle or DID of the repo.
1616- Repo string `json:"repo" cborgen:"repo"`
1717- // swapCommit: Compare and swap with the previous commit by cid.
1818- SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"`
1919-}
2020-2121-// RepoRebaseRepo calls the XRPC method "com.atproto.repo.rebaseRepo".
2222-func RepoRebaseRepo(ctx context.Context, c *xrpc.Client, input *RepoRebaseRepo_Input) error {
2323- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.rebaseRepo", nil, input, nil); err != nil {
2424- return err
2525- }
2626-2727- return nil
2828-}
-36
api/atproto/syncgetCommitPath.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.sync.getCommitPath
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// SyncGetCommitPath_Output is the output of a com.atproto.sync.getCommitPath call.
1414-type SyncGetCommitPath_Output struct {
1515- Commits []string `json:"commits" cborgen:"commits"`
1616-}
1717-1818-// SyncGetCommitPath calls the XRPC method "com.atproto.sync.getCommitPath".
1919-//
2020-// did: The DID of the repo.
2121-// earliest: The earliest commit to start from
2222-// latest: The most recent commit
2323-func SyncGetCommitPath(ctx context.Context, c *xrpc.Client, did string, earliest string, latest string) (*SyncGetCommitPath_Output, error) {
2424- var out SyncGetCommitPath_Output
2525-2626- params := map[string]interface{}{
2727- "did": did,
2828- "earliest": earliest,
2929- "latest": latest,
3030- }
3131- if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCommitPath", params, nil, &out); err != nil {
3232- return nil, err
3333- }
3434-3535- return &out, nil
3636-}
-27
api/atproto/temppushBlob.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.temp.pushBlob
66-77-import (
88- "context"
99- "io"
1010-1111- "github.com/bluesky-social/indigo/xrpc"
1212-)
1313-1414-// TempPushBlob calls the XRPC method "com.atproto.temp.pushBlob".
1515-//
1616-// did: The DID of the repo.
1717-func TempPushBlob(ctx context.Context, c *xrpc.Client, input io.Reader, did string) error {
1818-1919- params := map[string]interface{}{
2020- "did": did,
2121- }
2222- if err := c.Do(ctx, xrpc.Procedure, "*/*", "com.atproto.temp.pushBlob", params, input, nil); err != nil {
2323- return err
2424- }
2525-2626- return nil
2727-}
-36
api/atproto/temptransferAccount.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.temp.transferAccount
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// TempTransferAccount_Input is the input argument to a com.atproto.temp.transferAccount call.
1414-type TempTransferAccount_Input struct {
1515- Did string `json:"did" cborgen:"did"`
1616- Handle string `json:"handle" cborgen:"handle"`
1717- PlcOp interface{} `json:"plcOp" cborgen:"plcOp"`
1818-}
1919-2020-// TempTransferAccount_Output is the output of a com.atproto.temp.transferAccount call.
2121-type TempTransferAccount_Output struct {
2222- AccessJwt string `json:"accessJwt" cborgen:"accessJwt"`
2323- Did string `json:"did" cborgen:"did"`
2424- Handle string `json:"handle" cborgen:"handle"`
2525- RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"`
2626-}
2727-2828-// TempTransferAccount calls the XRPC method "com.atproto.temp.transferAccount".
2929-func TempTransferAccount(ctx context.Context, c *xrpc.Client, input *TempTransferAccount_Input) (*TempTransferAccount_Output, error) {
3030- var out TempTransferAccount_Output
3131- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.transferAccount", nil, input, &out); err != nil {
3232- return nil, err
3333- }
3434-3535- return &out, nil
3636-}
-25
api/atproto/tempupgradeRepoVersion.go
···11-// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.
22-33-package atproto
44-55-// schema: com.atproto.temp.upgradeRepoVersion
66-77-import (
88- "context"
99-1010- "github.com/bluesky-social/indigo/xrpc"
1111-)
1212-1313-// TempUpgradeRepoVersion_Input is the input argument to a com.atproto.temp.upgradeRepoVersion call.
1414-type TempUpgradeRepoVersion_Input struct {
1515- Did string `json:"did" cborgen:"did"`
1616-}
1717-1818-// TempUpgradeRepoVersion calls the XRPC method "com.atproto.temp.upgradeRepoVersion".
1919-func TempUpgradeRepoVersion(ctx context.Context, c *xrpc.Client, input *TempUpgradeRepoVersion_Input) error {
2020- if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.upgradeRepoVersion", nil, input, nil); err != nil {
2121- return err
2222- }
2323-2424- return nil
2525-}