this repo has no description
0
fork

Configure Feed

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

api/atproto: remove now-deprecated lexicons

-1457
-33
api/atproto/admincreateCommunicationTemplate.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.createCommunicationTemplate 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminCreateCommunicationTemplate_Input is the input argument to a com.atproto.admin.createCommunicationTemplate call. 14 - type AdminCreateCommunicationTemplate_Input struct { 15 - // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 - ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 17 - // createdBy: DID of the user who is creating the template. 18 - CreatedBy *string `json:"createdBy,omitempty" cborgen:"createdBy,omitempty"` 19 - // name: Name of the template. 20 - Name string `json:"name" cborgen:"name"` 21 - // subject: Subject of the message, used in emails. 22 - Subject string `json:"subject" cborgen:"subject"` 23 - } 24 - 25 - // AdminCreateCommunicationTemplate calls the XRPC method "com.atproto.admin.createCommunicationTemplate". 26 - func AdminCreateCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminCreateCommunicationTemplate_Input) (*AdminDefs_CommunicationTemplateView, error) { 27 - var out AdminDefs_CommunicationTemplateView 28 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.createCommunicationTemplate", nil, input, &out); err != nil { 29 - return nil, err 30 - } 31 - 32 - return &out, nil 33 - }
-782
api/atproto/admindefs.go
··· 5 5 // schema: com.atproto.admin.defs 6 6 7 7 import ( 8 - "encoding/json" 9 - "fmt" 10 - 11 8 "github.com/bluesky-social/indigo/lex/util" 12 9 ) 13 10 ··· 25 22 RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords,omitempty" cborgen:"relatedRecords,omitempty"` 26 23 } 27 24 28 - // AdminDefs_BlobView is a "blobView" in the com.atproto.admin.defs schema. 29 - type AdminDefs_BlobView struct { 30 - Cid string `json:"cid" cborgen:"cid"` 31 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 32 - Details *AdminDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"` 33 - MimeType string `json:"mimeType" cborgen:"mimeType"` 34 - Moderation *AdminDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"` 35 - Size int64 `json:"size" cborgen:"size"` 36 - } 37 - 38 - type AdminDefs_BlobView_Details struct { 39 - AdminDefs_ImageDetails *AdminDefs_ImageDetails 40 - AdminDefs_VideoDetails *AdminDefs_VideoDetails 41 - } 42 - 43 - func (t *AdminDefs_BlobView_Details) MarshalJSON() ([]byte, error) { 44 - if t.AdminDefs_ImageDetails != nil { 45 - t.AdminDefs_ImageDetails.LexiconTypeID = "com.atproto.admin.defs#imageDetails" 46 - return json.Marshal(t.AdminDefs_ImageDetails) 47 - } 48 - if t.AdminDefs_VideoDetails != nil { 49 - t.AdminDefs_VideoDetails.LexiconTypeID = "com.atproto.admin.defs#videoDetails" 50 - return json.Marshal(t.AdminDefs_VideoDetails) 51 - } 52 - return nil, fmt.Errorf("cannot marshal empty enum") 53 - } 54 - func (t *AdminDefs_BlobView_Details) UnmarshalJSON(b []byte) error { 55 - typ, err := util.TypeExtract(b) 56 - if err != nil { 57 - return err 58 - } 59 - 60 - switch typ { 61 - case "com.atproto.admin.defs#imageDetails": 62 - t.AdminDefs_ImageDetails = new(AdminDefs_ImageDetails) 63 - return json.Unmarshal(b, t.AdminDefs_ImageDetails) 64 - case "com.atproto.admin.defs#videoDetails": 65 - t.AdminDefs_VideoDetails = new(AdminDefs_VideoDetails) 66 - return json.Unmarshal(b, t.AdminDefs_VideoDetails) 67 - 68 - default: 69 - return nil 70 - } 71 - } 72 - 73 - // AdminDefs_CommunicationTemplateView is a "communicationTemplateView" in the com.atproto.admin.defs schema. 74 - type AdminDefs_CommunicationTemplateView struct { 75 - // contentMarkdown: Subject of the message, used in emails. 76 - ContentMarkdown string `json:"contentMarkdown" cborgen:"contentMarkdown"` 77 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 78 - Disabled bool `json:"disabled" cborgen:"disabled"` 79 - Id string `json:"id" cborgen:"id"` 80 - // lastUpdatedBy: DID of the user who last updated the template. 81 - LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` 82 - // name: Name of the template. 83 - Name string `json:"name" cborgen:"name"` 84 - // subject: Content of the template, can contain markdown and variable placeholders. 85 - Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 86 - UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 87 - } 88 - 89 - // AdminDefs_ImageDetails is a "imageDetails" in the com.atproto.admin.defs schema. 90 - // 91 - // RECORDTYPE: AdminDefs_ImageDetails 92 - type AdminDefs_ImageDetails struct { 93 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#imageDetails" cborgen:"$type,const=com.atproto.admin.defs#imageDetails"` 94 - Height int64 `json:"height" cborgen:"height"` 95 - Width int64 `json:"width" cborgen:"width"` 96 - } 97 - 98 - // AdminDefs_ModEventAcknowledge is a "modEventAcknowledge" in the com.atproto.admin.defs schema. 99 - // 100 - // RECORDTYPE: AdminDefs_ModEventAcknowledge 101 - type AdminDefs_ModEventAcknowledge struct { 102 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventAcknowledge" cborgen:"$type,const=com.atproto.admin.defs#modEventAcknowledge"` 103 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 104 - } 105 - 106 - // AdminDefs_ModEventComment is a "modEventComment" in the com.atproto.admin.defs schema. 107 - // 108 - // # Add a comment to a subject 109 - // 110 - // RECORDTYPE: AdminDefs_ModEventComment 111 - type AdminDefs_ModEventComment struct { 112 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventComment" cborgen:"$type,const=com.atproto.admin.defs#modEventComment"` 113 - Comment string `json:"comment" cborgen:"comment"` 114 - // sticky: Make the comment persistent on the subject 115 - Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` 116 - } 117 - 118 - // AdminDefs_ModEventEmail is a "modEventEmail" in the com.atproto.admin.defs schema. 119 - // 120 - // # Keep a log of outgoing email to a user 121 - // 122 - // RECORDTYPE: AdminDefs_ModEventEmail 123 - type AdminDefs_ModEventEmail struct { 124 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventEmail" cborgen:"$type,const=com.atproto.admin.defs#modEventEmail"` 125 - // comment: Additional comment about the outgoing comm. 126 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 127 - // content: The content of the email sent to the user. 128 - Content *string `json:"content,omitempty" cborgen:"content,omitempty"` 129 - // subjectLine: The subject line of the email sent to the user. 130 - SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` 131 - } 132 - 133 - // AdminDefs_ModEventEscalate is a "modEventEscalate" in the com.atproto.admin.defs schema. 134 - // 135 - // RECORDTYPE: AdminDefs_ModEventEscalate 136 - type AdminDefs_ModEventEscalate struct { 137 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventEscalate" cborgen:"$type,const=com.atproto.admin.defs#modEventEscalate"` 138 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 139 - } 140 - 141 - // AdminDefs_ModEventLabel is a "modEventLabel" in the com.atproto.admin.defs schema. 142 - // 143 - // Apply/Negate labels on a subject 144 - // 145 - // RECORDTYPE: AdminDefs_ModEventLabel 146 - type AdminDefs_ModEventLabel struct { 147 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventLabel" cborgen:"$type,const=com.atproto.admin.defs#modEventLabel"` 148 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 149 - CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` 150 - NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` 151 - } 152 - 153 - // AdminDefs_ModEventMute is a "modEventMute" in the com.atproto.admin.defs schema. 154 - // 155 - // # Mute incoming reports on a subject 156 - // 157 - // RECORDTYPE: AdminDefs_ModEventMute 158 - type AdminDefs_ModEventMute struct { 159 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventMute" cborgen:"$type,const=com.atproto.admin.defs#modEventMute"` 160 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 161 - // durationInHours: Indicates how long the subject should remain muted. 162 - DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` 163 - } 164 - 165 - // AdminDefs_ModEventReport is a "modEventReport" in the com.atproto.admin.defs schema. 166 - // 167 - // # Report a subject 168 - // 169 - // RECORDTYPE: AdminDefs_ModEventReport 170 - type AdminDefs_ModEventReport struct { 171 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventReport" cborgen:"$type,const=com.atproto.admin.defs#modEventReport"` 172 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 173 - ReportType *string `json:"reportType" cborgen:"reportType"` 174 - } 175 - 176 - // AdminDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the com.atproto.admin.defs schema. 177 - // 178 - // # Resolve appeal on a subject 179 - // 180 - // RECORDTYPE: AdminDefs_ModEventResolveAppeal 181 - type AdminDefs_ModEventResolveAppeal struct { 182 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventResolveAppeal" cborgen:"$type,const=com.atproto.admin.defs#modEventResolveAppeal"` 183 - // comment: Describe resolution. 184 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 185 - } 186 - 187 - // AdminDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the com.atproto.admin.defs schema. 188 - // 189 - // # Revert take down action on a subject 190 - // 191 - // RECORDTYPE: AdminDefs_ModEventReverseTakedown 192 - type AdminDefs_ModEventReverseTakedown struct { 193 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventReverseTakedown" cborgen:"$type,const=com.atproto.admin.defs#modEventReverseTakedown"` 194 - // comment: Describe reasoning behind the reversal. 195 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 196 - } 197 - 198 - // AdminDefs_ModEventTag is a "modEventTag" in the com.atproto.admin.defs schema. 199 - // 200 - // Add/Remove a tag on a subject 201 - // 202 - // RECORDTYPE: AdminDefs_ModEventTag 203 - type AdminDefs_ModEventTag struct { 204 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventTag" cborgen:"$type,const=com.atproto.admin.defs#modEventTag"` 205 - // add: Tags to be added to the subject. If already exists, won't be duplicated. 206 - Add []string `json:"add" cborgen:"add"` 207 - // comment: Additional comment about added/removed tags. 208 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 209 - // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. 210 - Remove []string `json:"remove" cborgen:"remove"` 211 - } 212 - 213 - // AdminDefs_ModEventTakedown is a "modEventTakedown" in the com.atproto.admin.defs schema. 214 - // 215 - // # Take down a subject permanently or temporarily 216 - // 217 - // RECORDTYPE: AdminDefs_ModEventTakedown 218 - type AdminDefs_ModEventTakedown struct { 219 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventTakedown" cborgen:"$type,const=com.atproto.admin.defs#modEventTakedown"` 220 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 221 - // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 222 - DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 223 - } 224 - 225 - // AdminDefs_ModEventUnmute is a "modEventUnmute" in the com.atproto.admin.defs schema. 226 - // 227 - // # Unmute action on a subject 228 - // 229 - // RECORDTYPE: AdminDefs_ModEventUnmute 230 - type AdminDefs_ModEventUnmute struct { 231 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#modEventUnmute" cborgen:"$type,const=com.atproto.admin.defs#modEventUnmute"` 232 - // comment: Describe reasoning behind the reversal. 233 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 234 - } 235 - 236 - // AdminDefs_ModEventView is a "modEventView" in the com.atproto.admin.defs schema. 237 - type AdminDefs_ModEventView struct { 238 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 239 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 240 - CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"` 241 - Event *AdminDefs_ModEventView_Event `json:"event" cborgen:"event"` 242 - Id int64 `json:"id" cborgen:"id"` 243 - Subject *AdminDefs_ModEventView_Subject `json:"subject" cborgen:"subject"` 244 - SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` 245 - SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"` 246 - } 247 - 248 - // AdminDefs_ModEventViewDetail is a "modEventViewDetail" in the com.atproto.admin.defs schema. 249 - type AdminDefs_ModEventViewDetail struct { 250 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 251 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 252 - Event *AdminDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 253 - Id int64 `json:"id" cborgen:"id"` 254 - Subject *AdminDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 255 - SubjectBlobs []*AdminDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 256 - } 257 - 258 - type AdminDefs_ModEventViewDetail_Event struct { 259 - AdminDefs_ModEventTakedown *AdminDefs_ModEventTakedown 260 - AdminDefs_ModEventReverseTakedown *AdminDefs_ModEventReverseTakedown 261 - AdminDefs_ModEventComment *AdminDefs_ModEventComment 262 - AdminDefs_ModEventReport *AdminDefs_ModEventReport 263 - AdminDefs_ModEventLabel *AdminDefs_ModEventLabel 264 - AdminDefs_ModEventAcknowledge *AdminDefs_ModEventAcknowledge 265 - AdminDefs_ModEventEscalate *AdminDefs_ModEventEscalate 266 - AdminDefs_ModEventMute *AdminDefs_ModEventMute 267 - AdminDefs_ModEventEmail *AdminDefs_ModEventEmail 268 - AdminDefs_ModEventResolveAppeal *AdminDefs_ModEventResolveAppeal 269 - } 270 - 271 - func (t *AdminDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { 272 - if t.AdminDefs_ModEventTakedown != nil { 273 - t.AdminDefs_ModEventTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventTakedown" 274 - return json.Marshal(t.AdminDefs_ModEventTakedown) 275 - } 276 - if t.AdminDefs_ModEventReverseTakedown != nil { 277 - t.AdminDefs_ModEventReverseTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventReverseTakedown" 278 - return json.Marshal(t.AdminDefs_ModEventReverseTakedown) 279 - } 280 - if t.AdminDefs_ModEventComment != nil { 281 - t.AdminDefs_ModEventComment.LexiconTypeID = "com.atproto.admin.defs#modEventComment" 282 - return json.Marshal(t.AdminDefs_ModEventComment) 283 - } 284 - if t.AdminDefs_ModEventReport != nil { 285 - t.AdminDefs_ModEventReport.LexiconTypeID = "com.atproto.admin.defs#modEventReport" 286 - return json.Marshal(t.AdminDefs_ModEventReport) 287 - } 288 - if t.AdminDefs_ModEventLabel != nil { 289 - t.AdminDefs_ModEventLabel.LexiconTypeID = "com.atproto.admin.defs#modEventLabel" 290 - return json.Marshal(t.AdminDefs_ModEventLabel) 291 - } 292 - if t.AdminDefs_ModEventAcknowledge != nil { 293 - t.AdminDefs_ModEventAcknowledge.LexiconTypeID = "com.atproto.admin.defs#modEventAcknowledge" 294 - return json.Marshal(t.AdminDefs_ModEventAcknowledge) 295 - } 296 - if t.AdminDefs_ModEventEscalate != nil { 297 - t.AdminDefs_ModEventEscalate.LexiconTypeID = "com.atproto.admin.defs#modEventEscalate" 298 - return json.Marshal(t.AdminDefs_ModEventEscalate) 299 - } 300 - if t.AdminDefs_ModEventMute != nil { 301 - t.AdminDefs_ModEventMute.LexiconTypeID = "com.atproto.admin.defs#modEventMute" 302 - return json.Marshal(t.AdminDefs_ModEventMute) 303 - } 304 - if t.AdminDefs_ModEventEmail != nil { 305 - t.AdminDefs_ModEventEmail.LexiconTypeID = "com.atproto.admin.defs#modEventEmail" 306 - return json.Marshal(t.AdminDefs_ModEventEmail) 307 - } 308 - if t.AdminDefs_ModEventResolveAppeal != nil { 309 - t.AdminDefs_ModEventResolveAppeal.LexiconTypeID = "com.atproto.admin.defs#modEventResolveAppeal" 310 - return json.Marshal(t.AdminDefs_ModEventResolveAppeal) 311 - } 312 - return nil, fmt.Errorf("cannot marshal empty enum") 313 - } 314 - func (t *AdminDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { 315 - typ, err := util.TypeExtract(b) 316 - if err != nil { 317 - return err 318 - } 319 - 320 - switch typ { 321 - case "com.atproto.admin.defs#modEventTakedown": 322 - t.AdminDefs_ModEventTakedown = new(AdminDefs_ModEventTakedown) 323 - return json.Unmarshal(b, t.AdminDefs_ModEventTakedown) 324 - case "com.atproto.admin.defs#modEventReverseTakedown": 325 - t.AdminDefs_ModEventReverseTakedown = new(AdminDefs_ModEventReverseTakedown) 326 - return json.Unmarshal(b, t.AdminDefs_ModEventReverseTakedown) 327 - case "com.atproto.admin.defs#modEventComment": 328 - t.AdminDefs_ModEventComment = new(AdminDefs_ModEventComment) 329 - return json.Unmarshal(b, t.AdminDefs_ModEventComment) 330 - case "com.atproto.admin.defs#modEventReport": 331 - t.AdminDefs_ModEventReport = new(AdminDefs_ModEventReport) 332 - return json.Unmarshal(b, t.AdminDefs_ModEventReport) 333 - case "com.atproto.admin.defs#modEventLabel": 334 - t.AdminDefs_ModEventLabel = new(AdminDefs_ModEventLabel) 335 - return json.Unmarshal(b, t.AdminDefs_ModEventLabel) 336 - case "com.atproto.admin.defs#modEventAcknowledge": 337 - t.AdminDefs_ModEventAcknowledge = new(AdminDefs_ModEventAcknowledge) 338 - return json.Unmarshal(b, t.AdminDefs_ModEventAcknowledge) 339 - case "com.atproto.admin.defs#modEventEscalate": 340 - t.AdminDefs_ModEventEscalate = new(AdminDefs_ModEventEscalate) 341 - return json.Unmarshal(b, t.AdminDefs_ModEventEscalate) 342 - case "com.atproto.admin.defs#modEventMute": 343 - t.AdminDefs_ModEventMute = new(AdminDefs_ModEventMute) 344 - return json.Unmarshal(b, t.AdminDefs_ModEventMute) 345 - case "com.atproto.admin.defs#modEventEmail": 346 - t.AdminDefs_ModEventEmail = new(AdminDefs_ModEventEmail) 347 - return json.Unmarshal(b, t.AdminDefs_ModEventEmail) 348 - case "com.atproto.admin.defs#modEventResolveAppeal": 349 - t.AdminDefs_ModEventResolveAppeal = new(AdminDefs_ModEventResolveAppeal) 350 - return json.Unmarshal(b, t.AdminDefs_ModEventResolveAppeal) 351 - 352 - default: 353 - return nil 354 - } 355 - } 356 - 357 - type AdminDefs_ModEventViewDetail_Subject struct { 358 - AdminDefs_RepoView *AdminDefs_RepoView 359 - AdminDefs_RepoViewNotFound *AdminDefs_RepoViewNotFound 360 - AdminDefs_RecordView *AdminDefs_RecordView 361 - AdminDefs_RecordViewNotFound *AdminDefs_RecordViewNotFound 362 - } 363 - 364 - func (t *AdminDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { 365 - if t.AdminDefs_RepoView != nil { 366 - t.AdminDefs_RepoView.LexiconTypeID = "com.atproto.admin.defs#repoView" 367 - return json.Marshal(t.AdminDefs_RepoView) 368 - } 369 - if t.AdminDefs_RepoViewNotFound != nil { 370 - t.AdminDefs_RepoViewNotFound.LexiconTypeID = "com.atproto.admin.defs#repoViewNotFound" 371 - return json.Marshal(t.AdminDefs_RepoViewNotFound) 372 - } 373 - if t.AdminDefs_RecordView != nil { 374 - t.AdminDefs_RecordView.LexiconTypeID = "com.atproto.admin.defs#recordView" 375 - return json.Marshal(t.AdminDefs_RecordView) 376 - } 377 - if t.AdminDefs_RecordViewNotFound != nil { 378 - t.AdminDefs_RecordViewNotFound.LexiconTypeID = "com.atproto.admin.defs#recordViewNotFound" 379 - return json.Marshal(t.AdminDefs_RecordViewNotFound) 380 - } 381 - return nil, fmt.Errorf("cannot marshal empty enum") 382 - } 383 - func (t *AdminDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { 384 - typ, err := util.TypeExtract(b) 385 - if err != nil { 386 - return err 387 - } 388 - 389 - switch typ { 390 - case "com.atproto.admin.defs#repoView": 391 - t.AdminDefs_RepoView = new(AdminDefs_RepoView) 392 - return json.Unmarshal(b, t.AdminDefs_RepoView) 393 - case "com.atproto.admin.defs#repoViewNotFound": 394 - t.AdminDefs_RepoViewNotFound = new(AdminDefs_RepoViewNotFound) 395 - return json.Unmarshal(b, t.AdminDefs_RepoViewNotFound) 396 - case "com.atproto.admin.defs#recordView": 397 - t.AdminDefs_RecordView = new(AdminDefs_RecordView) 398 - return json.Unmarshal(b, t.AdminDefs_RecordView) 399 - case "com.atproto.admin.defs#recordViewNotFound": 400 - t.AdminDefs_RecordViewNotFound = new(AdminDefs_RecordViewNotFound) 401 - return json.Unmarshal(b, t.AdminDefs_RecordViewNotFound) 402 - 403 - default: 404 - return nil 405 - } 406 - } 407 - 408 - type AdminDefs_ModEventView_Event struct { 409 - AdminDefs_ModEventTakedown *AdminDefs_ModEventTakedown 410 - AdminDefs_ModEventReverseTakedown *AdminDefs_ModEventReverseTakedown 411 - AdminDefs_ModEventComment *AdminDefs_ModEventComment 412 - AdminDefs_ModEventReport *AdminDefs_ModEventReport 413 - AdminDefs_ModEventLabel *AdminDefs_ModEventLabel 414 - AdminDefs_ModEventAcknowledge *AdminDefs_ModEventAcknowledge 415 - AdminDefs_ModEventEscalate *AdminDefs_ModEventEscalate 416 - AdminDefs_ModEventMute *AdminDefs_ModEventMute 417 - AdminDefs_ModEventEmail *AdminDefs_ModEventEmail 418 - AdminDefs_ModEventResolveAppeal *AdminDefs_ModEventResolveAppeal 419 - } 420 - 421 - func (t *AdminDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { 422 - if t.AdminDefs_ModEventTakedown != nil { 423 - t.AdminDefs_ModEventTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventTakedown" 424 - return json.Marshal(t.AdminDefs_ModEventTakedown) 425 - } 426 - if t.AdminDefs_ModEventReverseTakedown != nil { 427 - t.AdminDefs_ModEventReverseTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventReverseTakedown" 428 - return json.Marshal(t.AdminDefs_ModEventReverseTakedown) 429 - } 430 - if t.AdminDefs_ModEventComment != nil { 431 - t.AdminDefs_ModEventComment.LexiconTypeID = "com.atproto.admin.defs#modEventComment" 432 - return json.Marshal(t.AdminDefs_ModEventComment) 433 - } 434 - if t.AdminDefs_ModEventReport != nil { 435 - t.AdminDefs_ModEventReport.LexiconTypeID = "com.atproto.admin.defs#modEventReport" 436 - return json.Marshal(t.AdminDefs_ModEventReport) 437 - } 438 - if t.AdminDefs_ModEventLabel != nil { 439 - t.AdminDefs_ModEventLabel.LexiconTypeID = "com.atproto.admin.defs#modEventLabel" 440 - return json.Marshal(t.AdminDefs_ModEventLabel) 441 - } 442 - if t.AdminDefs_ModEventAcknowledge != nil { 443 - t.AdminDefs_ModEventAcknowledge.LexiconTypeID = "com.atproto.admin.defs#modEventAcknowledge" 444 - return json.Marshal(t.AdminDefs_ModEventAcknowledge) 445 - } 446 - if t.AdminDefs_ModEventEscalate != nil { 447 - t.AdminDefs_ModEventEscalate.LexiconTypeID = "com.atproto.admin.defs#modEventEscalate" 448 - return json.Marshal(t.AdminDefs_ModEventEscalate) 449 - } 450 - if t.AdminDefs_ModEventMute != nil { 451 - t.AdminDefs_ModEventMute.LexiconTypeID = "com.atproto.admin.defs#modEventMute" 452 - return json.Marshal(t.AdminDefs_ModEventMute) 453 - } 454 - if t.AdminDefs_ModEventEmail != nil { 455 - t.AdminDefs_ModEventEmail.LexiconTypeID = "com.atproto.admin.defs#modEventEmail" 456 - return json.Marshal(t.AdminDefs_ModEventEmail) 457 - } 458 - if t.AdminDefs_ModEventResolveAppeal != nil { 459 - t.AdminDefs_ModEventResolveAppeal.LexiconTypeID = "com.atproto.admin.defs#modEventResolveAppeal" 460 - return json.Marshal(t.AdminDefs_ModEventResolveAppeal) 461 - } 462 - return nil, fmt.Errorf("cannot marshal empty enum") 463 - } 464 - func (t *AdminDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { 465 - typ, err := util.TypeExtract(b) 466 - if err != nil { 467 - return err 468 - } 469 - 470 - switch typ { 471 - case "com.atproto.admin.defs#modEventTakedown": 472 - t.AdminDefs_ModEventTakedown = new(AdminDefs_ModEventTakedown) 473 - return json.Unmarshal(b, t.AdminDefs_ModEventTakedown) 474 - case "com.atproto.admin.defs#modEventReverseTakedown": 475 - t.AdminDefs_ModEventReverseTakedown = new(AdminDefs_ModEventReverseTakedown) 476 - return json.Unmarshal(b, t.AdminDefs_ModEventReverseTakedown) 477 - case "com.atproto.admin.defs#modEventComment": 478 - t.AdminDefs_ModEventComment = new(AdminDefs_ModEventComment) 479 - return json.Unmarshal(b, t.AdminDefs_ModEventComment) 480 - case "com.atproto.admin.defs#modEventReport": 481 - t.AdminDefs_ModEventReport = new(AdminDefs_ModEventReport) 482 - return json.Unmarshal(b, t.AdminDefs_ModEventReport) 483 - case "com.atproto.admin.defs#modEventLabel": 484 - t.AdminDefs_ModEventLabel = new(AdminDefs_ModEventLabel) 485 - return json.Unmarshal(b, t.AdminDefs_ModEventLabel) 486 - case "com.atproto.admin.defs#modEventAcknowledge": 487 - t.AdminDefs_ModEventAcknowledge = new(AdminDefs_ModEventAcknowledge) 488 - return json.Unmarshal(b, t.AdminDefs_ModEventAcknowledge) 489 - case "com.atproto.admin.defs#modEventEscalate": 490 - t.AdminDefs_ModEventEscalate = new(AdminDefs_ModEventEscalate) 491 - return json.Unmarshal(b, t.AdminDefs_ModEventEscalate) 492 - case "com.atproto.admin.defs#modEventMute": 493 - t.AdminDefs_ModEventMute = new(AdminDefs_ModEventMute) 494 - return json.Unmarshal(b, t.AdminDefs_ModEventMute) 495 - case "com.atproto.admin.defs#modEventEmail": 496 - t.AdminDefs_ModEventEmail = new(AdminDefs_ModEventEmail) 497 - return json.Unmarshal(b, t.AdminDefs_ModEventEmail) 498 - case "com.atproto.admin.defs#modEventResolveAppeal": 499 - t.AdminDefs_ModEventResolveAppeal = new(AdminDefs_ModEventResolveAppeal) 500 - return json.Unmarshal(b, t.AdminDefs_ModEventResolveAppeal) 501 - 502 - default: 503 - return nil 504 - } 505 - } 506 - 507 - type AdminDefs_ModEventView_Subject struct { 508 - AdminDefs_RepoRef *AdminDefs_RepoRef 509 - RepoStrongRef *RepoStrongRef 510 - } 511 - 512 - func (t *AdminDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { 513 - if t.AdminDefs_RepoRef != nil { 514 - t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 515 - return json.Marshal(t.AdminDefs_RepoRef) 516 - } 517 - if t.RepoStrongRef != nil { 518 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 519 - return json.Marshal(t.RepoStrongRef) 520 - } 521 - return nil, fmt.Errorf("cannot marshal empty enum") 522 - } 523 - func (t *AdminDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { 524 - typ, err := util.TypeExtract(b) 525 - if err != nil { 526 - return err 527 - } 528 - 529 - switch typ { 530 - case "com.atproto.admin.defs#repoRef": 531 - t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 532 - return json.Unmarshal(b, t.AdminDefs_RepoRef) 533 - case "com.atproto.repo.strongRef": 534 - t.RepoStrongRef = new(RepoStrongRef) 535 - return json.Unmarshal(b, t.RepoStrongRef) 536 - 537 - default: 538 - return nil 539 - } 540 - } 541 - 542 - // AdminDefs_Moderation is a "moderation" in the com.atproto.admin.defs schema. 543 - type AdminDefs_Moderation struct { 544 - SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 545 - } 546 - 547 - // AdminDefs_ModerationDetail is a "moderationDetail" in the com.atproto.admin.defs schema. 548 - type AdminDefs_ModerationDetail struct { 549 - SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 550 - } 551 - 552 - // AdminDefs_RecordView is a "recordView" in the com.atproto.admin.defs schema. 553 - // 554 - // RECORDTYPE: AdminDefs_RecordView 555 - type AdminDefs_RecordView struct { 556 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#recordView" cborgen:"$type,const=com.atproto.admin.defs#recordView"` 557 - BlobCids []string `json:"blobCids" cborgen:"blobCids"` 558 - Cid string `json:"cid" cborgen:"cid"` 559 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 560 - Moderation *AdminDefs_Moderation `json:"moderation" cborgen:"moderation"` 561 - Repo *AdminDefs_RepoView `json:"repo" cborgen:"repo"` 562 - Uri string `json:"uri" cborgen:"uri"` 563 - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 564 - } 565 - 566 - // AdminDefs_RecordViewDetail is a "recordViewDetail" in the com.atproto.admin.defs schema. 567 - type AdminDefs_RecordViewDetail struct { 568 - Blobs []*AdminDefs_BlobView `json:"blobs" cborgen:"blobs"` 569 - Cid string `json:"cid" cborgen:"cid"` 570 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 571 - Labels []*LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 572 - Moderation *AdminDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 573 - Repo *AdminDefs_RepoView `json:"repo" cborgen:"repo"` 574 - Uri string `json:"uri" cborgen:"uri"` 575 - Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 576 - } 577 - 578 - // AdminDefs_RecordViewNotFound is a "recordViewNotFound" in the com.atproto.admin.defs schema. 579 - // 580 - // RECORDTYPE: AdminDefs_RecordViewNotFound 581 - type AdminDefs_RecordViewNotFound struct { 582 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#recordViewNotFound" cborgen:"$type,const=com.atproto.admin.defs#recordViewNotFound"` 583 - Uri string `json:"uri" cborgen:"uri"` 584 - } 585 - 586 25 // AdminDefs_RepoBlobRef is a "repoBlobRef" in the com.atproto.admin.defs schema. 587 26 // 588 27 // RECORDTYPE: AdminDefs_RepoBlobRef ··· 601 40 Did string `json:"did" cborgen:"did"` 602 41 } 603 42 604 - // AdminDefs_RepoView is a "repoView" in the com.atproto.admin.defs schema. 605 - // 606 - // RECORDTYPE: AdminDefs_RepoView 607 - type AdminDefs_RepoView struct { 608 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoView" cborgen:"$type,const=com.atproto.admin.defs#repoView"` 609 - Did string `json:"did" cborgen:"did"` 610 - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 611 - Handle string `json:"handle" cborgen:"handle"` 612 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 613 - InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 614 - InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 615 - InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 616 - Moderation *AdminDefs_Moderation `json:"moderation" cborgen:"moderation"` 617 - RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 618 - } 619 - 620 - // AdminDefs_RepoViewDetail is a "repoViewDetail" in the com.atproto.admin.defs schema. 621 - type AdminDefs_RepoViewDetail struct { 622 - Did string `json:"did" cborgen:"did"` 623 - Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 624 - EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` 625 - Handle string `json:"handle" cborgen:"handle"` 626 - IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 627 - InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 628 - InvitedBy *ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 629 - Invites []*ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` 630 - InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 631 - Labels []*LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 632 - Moderation *AdminDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 633 - RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 634 - } 635 - 636 - // AdminDefs_RepoViewNotFound is a "repoViewNotFound" in the com.atproto.admin.defs schema. 637 - // 638 - // RECORDTYPE: AdminDefs_RepoViewNotFound 639 - type AdminDefs_RepoViewNotFound struct { 640 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#repoViewNotFound" cborgen:"$type,const=com.atproto.admin.defs#repoViewNotFound"` 641 - Did string `json:"did" cborgen:"did"` 642 - } 643 - 644 - // AdminDefs_ReportView is a "reportView" in the com.atproto.admin.defs schema. 645 - type AdminDefs_ReportView struct { 646 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 647 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 648 - Id int64 `json:"id" cborgen:"id"` 649 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 650 - ReportedBy string `json:"reportedBy" cborgen:"reportedBy"` 651 - ResolvedByActionIds []int64 `json:"resolvedByActionIds" cborgen:"resolvedByActionIds"` 652 - Subject *AdminDefs_ReportView_Subject `json:"subject" cborgen:"subject"` 653 - SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 654 - } 655 - 656 - // AdminDefs_ReportViewDetail is a "reportViewDetail" in the com.atproto.admin.defs schema. 657 - type AdminDefs_ReportViewDetail struct { 658 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 659 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 660 - Id int64 `json:"id" cborgen:"id"` 661 - ReasonType *string `json:"reasonType" cborgen:"reasonType"` 662 - ReportedBy string `json:"reportedBy" cborgen:"reportedBy"` 663 - ResolvedByActions []*AdminDefs_ModEventView `json:"resolvedByActions" cborgen:"resolvedByActions"` 664 - Subject *AdminDefs_ReportViewDetail_Subject `json:"subject" cborgen:"subject"` 665 - SubjectStatus *AdminDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 666 - } 667 - 668 - type AdminDefs_ReportViewDetail_Subject struct { 669 - AdminDefs_RepoView *AdminDefs_RepoView 670 - AdminDefs_RepoViewNotFound *AdminDefs_RepoViewNotFound 671 - AdminDefs_RecordView *AdminDefs_RecordView 672 - AdminDefs_RecordViewNotFound *AdminDefs_RecordViewNotFound 673 - } 674 - 675 - func (t *AdminDefs_ReportViewDetail_Subject) MarshalJSON() ([]byte, error) { 676 - if t.AdminDefs_RepoView != nil { 677 - t.AdminDefs_RepoView.LexiconTypeID = "com.atproto.admin.defs#repoView" 678 - return json.Marshal(t.AdminDefs_RepoView) 679 - } 680 - if t.AdminDefs_RepoViewNotFound != nil { 681 - t.AdminDefs_RepoViewNotFound.LexiconTypeID = "com.atproto.admin.defs#repoViewNotFound" 682 - return json.Marshal(t.AdminDefs_RepoViewNotFound) 683 - } 684 - if t.AdminDefs_RecordView != nil { 685 - t.AdminDefs_RecordView.LexiconTypeID = "com.atproto.admin.defs#recordView" 686 - return json.Marshal(t.AdminDefs_RecordView) 687 - } 688 - if t.AdminDefs_RecordViewNotFound != nil { 689 - t.AdminDefs_RecordViewNotFound.LexiconTypeID = "com.atproto.admin.defs#recordViewNotFound" 690 - return json.Marshal(t.AdminDefs_RecordViewNotFound) 691 - } 692 - return nil, fmt.Errorf("cannot marshal empty enum") 693 - } 694 - func (t *AdminDefs_ReportViewDetail_Subject) UnmarshalJSON(b []byte) error { 695 - typ, err := util.TypeExtract(b) 696 - if err != nil { 697 - return err 698 - } 699 - 700 - switch typ { 701 - case "com.atproto.admin.defs#repoView": 702 - t.AdminDefs_RepoView = new(AdminDefs_RepoView) 703 - return json.Unmarshal(b, t.AdminDefs_RepoView) 704 - case "com.atproto.admin.defs#repoViewNotFound": 705 - t.AdminDefs_RepoViewNotFound = new(AdminDefs_RepoViewNotFound) 706 - return json.Unmarshal(b, t.AdminDefs_RepoViewNotFound) 707 - case "com.atproto.admin.defs#recordView": 708 - t.AdminDefs_RecordView = new(AdminDefs_RecordView) 709 - return json.Unmarshal(b, t.AdminDefs_RecordView) 710 - case "com.atproto.admin.defs#recordViewNotFound": 711 - t.AdminDefs_RecordViewNotFound = new(AdminDefs_RecordViewNotFound) 712 - return json.Unmarshal(b, t.AdminDefs_RecordViewNotFound) 713 - 714 - default: 715 - return nil 716 - } 717 - } 718 - 719 - type AdminDefs_ReportView_Subject struct { 720 - AdminDefs_RepoRef *AdminDefs_RepoRef 721 - RepoStrongRef *RepoStrongRef 722 - } 723 - 724 - func (t *AdminDefs_ReportView_Subject) MarshalJSON() ([]byte, error) { 725 - if t.AdminDefs_RepoRef != nil { 726 - t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 727 - return json.Marshal(t.AdminDefs_RepoRef) 728 - } 729 - if t.RepoStrongRef != nil { 730 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 731 - return json.Marshal(t.RepoStrongRef) 732 - } 733 - return nil, fmt.Errorf("cannot marshal empty enum") 734 - } 735 - func (t *AdminDefs_ReportView_Subject) UnmarshalJSON(b []byte) error { 736 - typ, err := util.TypeExtract(b) 737 - if err != nil { 738 - return err 739 - } 740 - 741 - switch typ { 742 - case "com.atproto.admin.defs#repoRef": 743 - t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 744 - return json.Unmarshal(b, t.AdminDefs_RepoRef) 745 - case "com.atproto.repo.strongRef": 746 - t.RepoStrongRef = new(RepoStrongRef) 747 - return json.Unmarshal(b, t.RepoStrongRef) 748 - 749 - default: 750 - return nil 751 - } 752 - } 753 - 754 43 // AdminDefs_StatusAttr is a "statusAttr" in the com.atproto.admin.defs schema. 755 44 type AdminDefs_StatusAttr struct { 756 45 Applied bool `json:"applied" cborgen:"applied"` 757 46 Ref *string `json:"ref,omitempty" cborgen:"ref,omitempty"` 758 47 } 759 - 760 - // AdminDefs_SubjectStatusView is a "subjectStatusView" in the com.atproto.admin.defs schema. 761 - type AdminDefs_SubjectStatusView struct { 762 - // 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. 763 - Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 764 - // comment: Sticky comment on the subject. 765 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 766 - // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject 767 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 768 - Id int64 `json:"id" cborgen:"id"` 769 - // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 770 - LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 771 - LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 772 - LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 773 - LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 774 - MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 775 - ReviewState *string `json:"reviewState" cborgen:"reviewState"` 776 - Subject *AdminDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 777 - SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 778 - SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 779 - SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 780 - Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 781 - Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 782 - // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 783 - UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 784 - } 785 - 786 - type AdminDefs_SubjectStatusView_Subject struct { 787 - AdminDefs_RepoRef *AdminDefs_RepoRef 788 - RepoStrongRef *RepoStrongRef 789 - } 790 - 791 - func (t *AdminDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { 792 - if t.AdminDefs_RepoRef != nil { 793 - t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 794 - return json.Marshal(t.AdminDefs_RepoRef) 795 - } 796 - if t.RepoStrongRef != nil { 797 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 798 - return json.Marshal(t.RepoStrongRef) 799 - } 800 - return nil, fmt.Errorf("cannot marshal empty enum") 801 - } 802 - func (t *AdminDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { 803 - typ, err := util.TypeExtract(b) 804 - if err != nil { 805 - return err 806 - } 807 - 808 - switch typ { 809 - case "com.atproto.admin.defs#repoRef": 810 - t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 811 - return json.Unmarshal(b, t.AdminDefs_RepoRef) 812 - case "com.atproto.repo.strongRef": 813 - t.RepoStrongRef = new(RepoStrongRef) 814 - return json.Unmarshal(b, t.RepoStrongRef) 815 - 816 - default: 817 - return nil 818 - } 819 - } 820 - 821 - // AdminDefs_VideoDetails is a "videoDetails" in the com.atproto.admin.defs schema. 822 - // 823 - // RECORDTYPE: AdminDefs_VideoDetails 824 - type AdminDefs_VideoDetails struct { 825 - LexiconTypeID string `json:"$type,const=com.atproto.admin.defs#videoDetails" cborgen:"$type,const=com.atproto.admin.defs#videoDetails"` 826 - Height int64 `json:"height" cborgen:"height"` 827 - Length int64 `json:"length" cborgen:"length"` 828 - Width int64 `json:"width" cborgen:"width"` 829 - }
-25
api/atproto/admindeleteCommunicationTemplate.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.deleteCommunicationTemplate 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminDeleteCommunicationTemplate_Input is the input argument to a com.atproto.admin.deleteCommunicationTemplate call. 14 - type AdminDeleteCommunicationTemplate_Input struct { 15 - Id string `json:"id" cborgen:"id"` 16 - } 17 - 18 - // AdminDeleteCommunicationTemplate calls the XRPC method "com.atproto.admin.deleteCommunicationTemplate". 19 - func AdminDeleteCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminDeleteCommunicationTemplate_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.deleteCommunicationTemplate", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }
-174
api/atproto/adminemitModerationEvent.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.emitModerationEvent 6 - 7 - import ( 8 - "context" 9 - "encoding/json" 10 - "fmt" 11 - 12 - "github.com/bluesky-social/indigo/lex/util" 13 - "github.com/bluesky-social/indigo/xrpc" 14 - ) 15 - 16 - // AdminEmitModerationEvent_Input is the input argument to a com.atproto.admin.emitModerationEvent call. 17 - type AdminEmitModerationEvent_Input struct { 18 - CreatedBy string `json:"createdBy" cborgen:"createdBy"` 19 - Event *AdminEmitModerationEvent_Input_Event `json:"event" cborgen:"event"` 20 - Subject *AdminEmitModerationEvent_Input_Subject `json:"subject" cborgen:"subject"` 21 - SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 22 - } 23 - 24 - type AdminEmitModerationEvent_Input_Event struct { 25 - AdminDefs_ModEventTakedown *AdminDefs_ModEventTakedown 26 - AdminDefs_ModEventAcknowledge *AdminDefs_ModEventAcknowledge 27 - AdminDefs_ModEventEscalate *AdminDefs_ModEventEscalate 28 - AdminDefs_ModEventComment *AdminDefs_ModEventComment 29 - AdminDefs_ModEventLabel *AdminDefs_ModEventLabel 30 - AdminDefs_ModEventReport *AdminDefs_ModEventReport 31 - AdminDefs_ModEventMute *AdminDefs_ModEventMute 32 - AdminDefs_ModEventReverseTakedown *AdminDefs_ModEventReverseTakedown 33 - AdminDefs_ModEventUnmute *AdminDefs_ModEventUnmute 34 - AdminDefs_ModEventEmail *AdminDefs_ModEventEmail 35 - AdminDefs_ModEventTag *AdminDefs_ModEventTag 36 - } 37 - 38 - func (t *AdminEmitModerationEvent_Input_Event) MarshalJSON() ([]byte, error) { 39 - if t.AdminDefs_ModEventTakedown != nil { 40 - t.AdminDefs_ModEventTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventTakedown" 41 - return json.Marshal(t.AdminDefs_ModEventTakedown) 42 - } 43 - if t.AdminDefs_ModEventAcknowledge != nil { 44 - t.AdminDefs_ModEventAcknowledge.LexiconTypeID = "com.atproto.admin.defs#modEventAcknowledge" 45 - return json.Marshal(t.AdminDefs_ModEventAcknowledge) 46 - } 47 - if t.AdminDefs_ModEventEscalate != nil { 48 - t.AdminDefs_ModEventEscalate.LexiconTypeID = "com.atproto.admin.defs#modEventEscalate" 49 - return json.Marshal(t.AdminDefs_ModEventEscalate) 50 - } 51 - if t.AdminDefs_ModEventComment != nil { 52 - t.AdminDefs_ModEventComment.LexiconTypeID = "com.atproto.admin.defs#modEventComment" 53 - return json.Marshal(t.AdminDefs_ModEventComment) 54 - } 55 - if t.AdminDefs_ModEventLabel != nil { 56 - t.AdminDefs_ModEventLabel.LexiconTypeID = "com.atproto.admin.defs#modEventLabel" 57 - return json.Marshal(t.AdminDefs_ModEventLabel) 58 - } 59 - if t.AdminDefs_ModEventReport != nil { 60 - t.AdminDefs_ModEventReport.LexiconTypeID = "com.atproto.admin.defs#modEventReport" 61 - return json.Marshal(t.AdminDefs_ModEventReport) 62 - } 63 - if t.AdminDefs_ModEventMute != nil { 64 - t.AdminDefs_ModEventMute.LexiconTypeID = "com.atproto.admin.defs#modEventMute" 65 - return json.Marshal(t.AdminDefs_ModEventMute) 66 - } 67 - if t.AdminDefs_ModEventReverseTakedown != nil { 68 - t.AdminDefs_ModEventReverseTakedown.LexiconTypeID = "com.atproto.admin.defs#modEventReverseTakedown" 69 - return json.Marshal(t.AdminDefs_ModEventReverseTakedown) 70 - } 71 - if t.AdminDefs_ModEventUnmute != nil { 72 - t.AdminDefs_ModEventUnmute.LexiconTypeID = "com.atproto.admin.defs#modEventUnmute" 73 - return json.Marshal(t.AdminDefs_ModEventUnmute) 74 - } 75 - if t.AdminDefs_ModEventEmail != nil { 76 - t.AdminDefs_ModEventEmail.LexiconTypeID = "com.atproto.admin.defs#modEventEmail" 77 - return json.Marshal(t.AdminDefs_ModEventEmail) 78 - } 79 - if t.AdminDefs_ModEventTag != nil { 80 - t.AdminDefs_ModEventTag.LexiconTypeID = "com.atproto.admin.defs#modEventTag" 81 - return json.Marshal(t.AdminDefs_ModEventTag) 82 - } 83 - return nil, fmt.Errorf("cannot marshal empty enum") 84 - } 85 - func (t *AdminEmitModerationEvent_Input_Event) UnmarshalJSON(b []byte) error { 86 - typ, err := util.TypeExtract(b) 87 - if err != nil { 88 - return err 89 - } 90 - 91 - switch typ { 92 - case "com.atproto.admin.defs#modEventTakedown": 93 - t.AdminDefs_ModEventTakedown = new(AdminDefs_ModEventTakedown) 94 - return json.Unmarshal(b, t.AdminDefs_ModEventTakedown) 95 - case "com.atproto.admin.defs#modEventAcknowledge": 96 - t.AdminDefs_ModEventAcknowledge = new(AdminDefs_ModEventAcknowledge) 97 - return json.Unmarshal(b, t.AdminDefs_ModEventAcknowledge) 98 - case "com.atproto.admin.defs#modEventEscalate": 99 - t.AdminDefs_ModEventEscalate = new(AdminDefs_ModEventEscalate) 100 - return json.Unmarshal(b, t.AdminDefs_ModEventEscalate) 101 - case "com.atproto.admin.defs#modEventComment": 102 - t.AdminDefs_ModEventComment = new(AdminDefs_ModEventComment) 103 - return json.Unmarshal(b, t.AdminDefs_ModEventComment) 104 - case "com.atproto.admin.defs#modEventLabel": 105 - t.AdminDefs_ModEventLabel = new(AdminDefs_ModEventLabel) 106 - return json.Unmarshal(b, t.AdminDefs_ModEventLabel) 107 - case "com.atproto.admin.defs#modEventReport": 108 - t.AdminDefs_ModEventReport = new(AdminDefs_ModEventReport) 109 - return json.Unmarshal(b, t.AdminDefs_ModEventReport) 110 - case "com.atproto.admin.defs#modEventMute": 111 - t.AdminDefs_ModEventMute = new(AdminDefs_ModEventMute) 112 - return json.Unmarshal(b, t.AdminDefs_ModEventMute) 113 - case "com.atproto.admin.defs#modEventReverseTakedown": 114 - t.AdminDefs_ModEventReverseTakedown = new(AdminDefs_ModEventReverseTakedown) 115 - return json.Unmarshal(b, t.AdminDefs_ModEventReverseTakedown) 116 - case "com.atproto.admin.defs#modEventUnmute": 117 - t.AdminDefs_ModEventUnmute = new(AdminDefs_ModEventUnmute) 118 - return json.Unmarshal(b, t.AdminDefs_ModEventUnmute) 119 - case "com.atproto.admin.defs#modEventEmail": 120 - t.AdminDefs_ModEventEmail = new(AdminDefs_ModEventEmail) 121 - return json.Unmarshal(b, t.AdminDefs_ModEventEmail) 122 - case "com.atproto.admin.defs#modEventTag": 123 - t.AdminDefs_ModEventTag = new(AdminDefs_ModEventTag) 124 - return json.Unmarshal(b, t.AdminDefs_ModEventTag) 125 - 126 - default: 127 - return nil 128 - } 129 - } 130 - 131 - type AdminEmitModerationEvent_Input_Subject struct { 132 - AdminDefs_RepoRef *AdminDefs_RepoRef 133 - RepoStrongRef *RepoStrongRef 134 - } 135 - 136 - func (t *AdminEmitModerationEvent_Input_Subject) MarshalJSON() ([]byte, error) { 137 - if t.AdminDefs_RepoRef != nil { 138 - t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 139 - return json.Marshal(t.AdminDefs_RepoRef) 140 - } 141 - if t.RepoStrongRef != nil { 142 - t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 143 - return json.Marshal(t.RepoStrongRef) 144 - } 145 - return nil, fmt.Errorf("cannot marshal empty enum") 146 - } 147 - func (t *AdminEmitModerationEvent_Input_Subject) UnmarshalJSON(b []byte) error { 148 - typ, err := util.TypeExtract(b) 149 - if err != nil { 150 - return err 151 - } 152 - 153 - switch typ { 154 - case "com.atproto.admin.defs#repoRef": 155 - t.AdminDefs_RepoRef = new(AdminDefs_RepoRef) 156 - return json.Unmarshal(b, t.AdminDefs_RepoRef) 157 - case "com.atproto.repo.strongRef": 158 - t.RepoStrongRef = new(RepoStrongRef) 159 - return json.Unmarshal(b, t.RepoStrongRef) 160 - 161 - default: 162 - return nil 163 - } 164 - } 165 - 166 - // AdminEmitModerationEvent calls the XRPC method "com.atproto.admin.emitModerationEvent". 167 - func AdminEmitModerationEvent(ctx context.Context, c *xrpc.Client, input *AdminEmitModerationEvent_Input) (*AdminDefs_ModEventView, error) { 168 - var out AdminDefs_ModEventView 169 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.emitModerationEvent", nil, input, &out); err != nil { 170 - return nil, err 171 - } 172 - 173 - return &out, nil 174 - }
-25
api/atproto/admingetModerationEvent.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.getModerationEvent 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminGetModerationEvent calls the XRPC method "com.atproto.admin.getModerationEvent". 14 - func AdminGetModerationEvent(ctx context.Context, c *xrpc.Client, id int64) (*AdminDefs_ModEventViewDetail, error) { 15 - var out AdminDefs_ModEventViewDetail 16 - 17 - params := map[string]interface{}{ 18 - "id": id, 19 - } 20 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getModerationEvent", params, nil, &out); err != nil { 21 - return nil, err 22 - } 23 - 24 - return &out, nil 25 - }
-26
api/atproto/admingetRecord.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.getRecord 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminGetRecord calls the XRPC method "com.atproto.admin.getRecord". 14 - func AdminGetRecord(ctx context.Context, c *xrpc.Client, cid string, uri string) (*AdminDefs_RecordViewDetail, error) { 15 - var out AdminDefs_RecordViewDetail 16 - 17 - params := map[string]interface{}{ 18 - "cid": cid, 19 - "uri": uri, 20 - } 21 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getRecord", params, nil, &out); err != nil { 22 - return nil, err 23 - } 24 - 25 - return &out, nil 26 - }
-25
api/atproto/admingetRepo.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.getRepo 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminGetRepo calls the XRPC method "com.atproto.admin.getRepo". 14 - func AdminGetRepo(ctx context.Context, c *xrpc.Client, did string) (*AdminDefs_RepoViewDetail, error) { 15 - var out AdminDefs_RepoViewDetail 16 - 17 - params := map[string]interface{}{ 18 - "did": did, 19 - } 20 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.getRepo", params, nil, &out); err != nil { 21 - return nil, err 22 - } 23 - 24 - return &out, nil 25 - }
-26
api/atproto/adminlistCommunicationTemplates.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.listCommunicationTemplates 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminListCommunicationTemplates_Output is the output of a com.atproto.admin.listCommunicationTemplates call. 14 - type AdminListCommunicationTemplates_Output struct { 15 - CommunicationTemplates []*AdminDefs_CommunicationTemplateView `json:"communicationTemplates" cborgen:"communicationTemplates"` 16 - } 17 - 18 - // AdminListCommunicationTemplates calls the XRPC method "com.atproto.admin.listCommunicationTemplates". 19 - func AdminListCommunicationTemplates(ctx context.Context, c *xrpc.Client) (*AdminListCommunicationTemplates_Output, error) { 20 - var out AdminListCommunicationTemplates_Output 21 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.listCommunicationTemplates", nil, nil, &out); err != nil { 22 - return nil, err 23 - } 24 - 25 - return &out, nil 26 - }
-58
api/atproto/adminqueryModerationEvents.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.queryModerationEvents 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminQueryModerationEvents_Output is the output of a com.atproto.admin.queryModerationEvents call. 14 - type AdminQueryModerationEvents_Output struct { 15 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 - Events []*AdminDefs_ModEventView `json:"events" cborgen:"events"` 17 - } 18 - 19 - // AdminQueryModerationEvents calls the XRPC method "com.atproto.admin.queryModerationEvents". 20 - // 21 - // addedLabels: If specified, only events where all of these labels were added are returned 22 - // addedTags: If specified, only events where all of these tags were added are returned 23 - // comment: If specified, only events with comments containing the keyword are returned 24 - // createdAfter: Retrieve events created after a given timestamp 25 - // createdBefore: Retrieve events created before a given timestamp 26 - // hasComment: If true, only events with comments are returned 27 - // includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) owned by the did are returned 28 - // removedLabels: If specified, only events where all of these labels were removed are returned 29 - // removedTags: If specified, only events where all of these tags were removed are returned 30 - // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 31 - // types: The types of events (fully qualified string in the format of com.atproto.admin#modEvent<name>) to filter by. If not specified, all events are returned. 32 - 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) { 33 - var out AdminQueryModerationEvents_Output 34 - 35 - params := map[string]interface{}{ 36 - "addedLabels": addedLabels, 37 - "addedTags": addedTags, 38 - "comment": comment, 39 - "createdAfter": createdAfter, 40 - "createdBefore": createdBefore, 41 - "createdBy": createdBy, 42 - "cursor": cursor, 43 - "hasComment": hasComment, 44 - "includeAllUserRecords": includeAllUserRecords, 45 - "limit": limit, 46 - "removedLabels": removedLabels, 47 - "removedTags": removedTags, 48 - "reportTypes": reportTypes, 49 - "sortDirection": sortDirection, 50 - "subject": subject, 51 - "types": types, 52 - } 53 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.queryModerationEvents", params, nil, &out); err != nil { 54 - return nil, err 55 - } 56 - 57 - return &out, nil 58 - }
-59
api/atproto/adminqueryModerationStatuses.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.queryModerationStatuses 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminQueryModerationStatuses_Output is the output of a com.atproto.admin.queryModerationStatuses call. 14 - type AdminQueryModerationStatuses_Output struct { 15 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 - SubjectStatuses []*AdminDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"` 17 - } 18 - 19 - // AdminQueryModerationStatuses calls the XRPC method "com.atproto.admin.queryModerationStatuses". 20 - // 21 - // appealed: Get subjects in unresolved appealed status 22 - // comment: Search subjects by keyword from comments 23 - // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 24 - // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 25 - // reportedAfter: Search subjects reported after a given timestamp 26 - // reportedBefore: Search subjects reported before a given timestamp 27 - // reviewState: Specify when fetching subjects in a certain state 28 - // reviewedAfter: Search subjects reviewed after a given timestamp 29 - // reviewedBefore: Search subjects reviewed before a given timestamp 30 - // takendown: Get subjects that were taken down 31 - func 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) { 32 - var out AdminQueryModerationStatuses_Output 33 - 34 - params := map[string]interface{}{ 35 - "appealed": appealed, 36 - "comment": comment, 37 - "cursor": cursor, 38 - "excludeTags": excludeTags, 39 - "ignoreSubjects": ignoreSubjects, 40 - "includeMuted": includeMuted, 41 - "lastReviewedBy": lastReviewedBy, 42 - "limit": limit, 43 - "reportedAfter": reportedAfter, 44 - "reportedBefore": reportedBefore, 45 - "reviewState": reviewState, 46 - "reviewedAfter": reviewedAfter, 47 - "reviewedBefore": reviewedBefore, 48 - "sortDirection": sortDirection, 49 - "sortField": sortField, 50 - "subject": subject, 51 - "tags": tags, 52 - "takendown": takendown, 53 - } 54 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.queryModerationStatuses", params, nil, &out); err != nil { 55 - return nil, err 56 - } 57 - 58 - return &out, nil 59 - }
-36
api/atproto/adminsearchRepos.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.searchRepos 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminSearchRepos_Output is the output of a com.atproto.admin.searchRepos call. 14 - type AdminSearchRepos_Output struct { 15 - Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 - Repos []*AdminDefs_RepoView `json:"repos" cborgen:"repos"` 17 - } 18 - 19 - // AdminSearchRepos calls the XRPC method "com.atproto.admin.searchRepos". 20 - // 21 - // term: DEPRECATED: use 'q' instead 22 - func AdminSearchRepos(ctx context.Context, c *xrpc.Client, cursor string, limit int64, q string, term string) (*AdminSearchRepos_Output, error) { 23 - var out AdminSearchRepos_Output 24 - 25 - params := map[string]interface{}{ 26 - "cursor": cursor, 27 - "limit": limit, 28 - "q": q, 29 - "term": term, 30 - } 31 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.admin.searchRepos", params, nil, &out); err != nil { 32 - return nil, err 33 - } 34 - 35 - return &out, nil 36 - }
-36
api/atproto/adminupdateCommunicationTemplate.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.admin.updateCommunicationTemplate 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // AdminUpdateCommunicationTemplate_Input is the input argument to a com.atproto.admin.updateCommunicationTemplate call. 14 - type AdminUpdateCommunicationTemplate_Input struct { 15 - // contentMarkdown: Content of the template, markdown supported, can contain variable placeholders. 16 - ContentMarkdown *string `json:"contentMarkdown,omitempty" cborgen:"contentMarkdown,omitempty"` 17 - Disabled *bool `json:"disabled,omitempty" cborgen:"disabled,omitempty"` 18 - // id: ID of the template to be updated. 19 - Id string `json:"id" cborgen:"id"` 20 - // name: Name of the template. 21 - Name *string `json:"name,omitempty" cborgen:"name,omitempty"` 22 - // subject: Subject of the message, used in emails. 23 - Subject *string `json:"subject,omitempty" cborgen:"subject,omitempty"` 24 - // updatedBy: DID of the user who is updating the template. 25 - UpdatedBy *string `json:"updatedBy,omitempty" cborgen:"updatedBy,omitempty"` 26 - } 27 - 28 - // AdminUpdateCommunicationTemplate calls the XRPC method "com.atproto.admin.updateCommunicationTemplate". 29 - func AdminUpdateCommunicationTemplate(ctx context.Context, c *xrpc.Client, input *AdminUpdateCommunicationTemplate_Input) (*AdminDefs_CommunicationTemplateView, error) { 30 - var out AdminDefs_CommunicationTemplateView 31 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.admin.updateCommunicationTemplate", nil, input, &out); err != nil { 32 - return nil, err 33 - } 34 - 35 - return &out, nil 36 - }
-28
api/atproto/reporebaseRepo.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.repo.rebaseRepo 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // RepoRebaseRepo_Input is the input argument to a com.atproto.repo.rebaseRepo call. 14 - type RepoRebaseRepo_Input struct { 15 - // repo: The handle or DID of the repo. 16 - Repo string `json:"repo" cborgen:"repo"` 17 - // swapCommit: Compare and swap with the previous commit by cid. 18 - SwapCommit *string `json:"swapCommit,omitempty" cborgen:"swapCommit,omitempty"` 19 - } 20 - 21 - // RepoRebaseRepo calls the XRPC method "com.atproto.repo.rebaseRepo". 22 - func RepoRebaseRepo(ctx context.Context, c *xrpc.Client, input *RepoRebaseRepo_Input) error { 23 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.repo.rebaseRepo", nil, input, nil); err != nil { 24 - return err 25 - } 26 - 27 - return nil 28 - }
-36
api/atproto/syncgetCommitPath.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.sync.getCommitPath 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // SyncGetCommitPath_Output is the output of a com.atproto.sync.getCommitPath call. 14 - type SyncGetCommitPath_Output struct { 15 - Commits []string `json:"commits" cborgen:"commits"` 16 - } 17 - 18 - // SyncGetCommitPath calls the XRPC method "com.atproto.sync.getCommitPath". 19 - // 20 - // did: The DID of the repo. 21 - // earliest: The earliest commit to start from 22 - // latest: The most recent commit 23 - func SyncGetCommitPath(ctx context.Context, c *xrpc.Client, did string, earliest string, latest string) (*SyncGetCommitPath_Output, error) { 24 - var out SyncGetCommitPath_Output 25 - 26 - params := map[string]interface{}{ 27 - "did": did, 28 - "earliest": earliest, 29 - "latest": latest, 30 - } 31 - if err := c.Do(ctx, xrpc.Query, "", "com.atproto.sync.getCommitPath", params, nil, &out); err != nil { 32 - return nil, err 33 - } 34 - 35 - return &out, nil 36 - }
-27
api/atproto/temppushBlob.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.temp.pushBlob 6 - 7 - import ( 8 - "context" 9 - "io" 10 - 11 - "github.com/bluesky-social/indigo/xrpc" 12 - ) 13 - 14 - // TempPushBlob calls the XRPC method "com.atproto.temp.pushBlob". 15 - // 16 - // did: The DID of the repo. 17 - func TempPushBlob(ctx context.Context, c *xrpc.Client, input io.Reader, did string) error { 18 - 19 - params := map[string]interface{}{ 20 - "did": did, 21 - } 22 - if err := c.Do(ctx, xrpc.Procedure, "*/*", "com.atproto.temp.pushBlob", params, input, nil); err != nil { 23 - return err 24 - } 25 - 26 - return nil 27 - }
-36
api/atproto/temptransferAccount.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.temp.transferAccount 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // TempTransferAccount_Input is the input argument to a com.atproto.temp.transferAccount call. 14 - type TempTransferAccount_Input struct { 15 - Did string `json:"did" cborgen:"did"` 16 - Handle string `json:"handle" cborgen:"handle"` 17 - PlcOp interface{} `json:"plcOp" cborgen:"plcOp"` 18 - } 19 - 20 - // TempTransferAccount_Output is the output of a com.atproto.temp.transferAccount call. 21 - type TempTransferAccount_Output struct { 22 - AccessJwt string `json:"accessJwt" cborgen:"accessJwt"` 23 - Did string `json:"did" cborgen:"did"` 24 - Handle string `json:"handle" cborgen:"handle"` 25 - RefreshJwt string `json:"refreshJwt" cborgen:"refreshJwt"` 26 - } 27 - 28 - // TempTransferAccount calls the XRPC method "com.atproto.temp.transferAccount". 29 - func TempTransferAccount(ctx context.Context, c *xrpc.Client, input *TempTransferAccount_Input) (*TempTransferAccount_Output, error) { 30 - var out TempTransferAccount_Output 31 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.transferAccount", nil, input, &out); err != nil { 32 - return nil, err 33 - } 34 - 35 - return &out, nil 36 - }
-25
api/atproto/tempupgradeRepoVersion.go
··· 1 - // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 - 3 - package atproto 4 - 5 - // schema: com.atproto.temp.upgradeRepoVersion 6 - 7 - import ( 8 - "context" 9 - 10 - "github.com/bluesky-social/indigo/xrpc" 11 - ) 12 - 13 - // TempUpgradeRepoVersion_Input is the input argument to a com.atproto.temp.upgradeRepoVersion call. 14 - type TempUpgradeRepoVersion_Input struct { 15 - Did string `json:"did" cborgen:"did"` 16 - } 17 - 18 - // TempUpgradeRepoVersion calls the XRPC method "com.atproto.temp.upgradeRepoVersion". 19 - func TempUpgradeRepoVersion(ctx context.Context, c *xrpc.Client, input *TempUpgradeRepoVersion_Input) error { 20 - if err := c.Do(ctx, xrpc.Procedure, "application/json", "com.atproto.temp.upgradeRepoVersion", nil, input, nil); err != nil { 21 - return err 22 - } 23 - 24 - return nil 25 - }