this repo has no description
0
fork

Configure Feed

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

lexgen 2025-10-20 (#1177)

This is to get things sycnhronized with upstream `atproto` repo while
preparing for lexgen workflow updates.

authored by

bnewbold and committed by
GitHub
19eba1eb 1e8718ae

+657 -65
+32
api/atproto/tempdereferenceScope.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.dereferenceScope 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // TempDereferenceScope_Output is the output of a com.atproto.temp.dereferenceScope call. 14 + type TempDereferenceScope_Output struct { 15 + // scope: The full oauth permission scope 16 + Scope string `json:"scope" cborgen:"scope"` 17 + } 18 + 19 + // TempDereferenceScope calls the XRPC method "com.atproto.temp.dereferenceScope". 20 + // 21 + // scope: The scope reference (starts with 'ref:') 22 + func TempDereferenceScope(ctx context.Context, c util.LexClient, scope string) (*TempDereferenceScope_Output, error) { 23 + var out TempDereferenceScope_Output 24 + 25 + params := map[string]interface{}{} 26 + params["scope"] = scope 27 + if err := c.LexDo(ctx, util.Query, "", "com.atproto.temp.dereferenceScope", params, nil, &out); err != nil { 28 + return nil, err 29 + } 30 + 31 + return &out, nil 32 + }
+25
api/atproto/temprevokeAccountCredentials.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package atproto 4 + 5 + // schema: com.atproto.temp.revokeAccountCredentials 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // TempRevokeAccountCredentials_Input is the input argument to a com.atproto.temp.revokeAccountCredentials call. 14 + type TempRevokeAccountCredentials_Input struct { 15 + Account string `json:"account" cborgen:"account"` 16 + } 17 + 18 + // TempRevokeAccountCredentials calls the XRPC method "com.atproto.temp.revokeAccountCredentials". 19 + func TempRevokeAccountCredentials(ctx context.Context, c util.LexClient, input *TempRevokeAccountCredentials_Input) error { 20 + if err := c.LexDo(ctx, util.Procedure, "application/json", "com.atproto.temp.revokeAccountCredentials", nil, input, nil); err != nil { 21 + return err 22 + } 23 + 24 + return nil 25 + }
+4
api/bsky/actordefs.go
··· 408 408 Handle string `json:"handle" cborgen:"handle"` 409 409 IndexedAt *string `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"` 410 410 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 411 + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` 411 412 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 412 413 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 413 414 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` ··· 422 423 DisplayName *string `json:"displayName,omitempty" cborgen:"displayName,omitempty"` 423 424 Handle string `json:"handle" cborgen:"handle"` 424 425 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 426 + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` 425 427 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 426 428 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 427 429 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` ··· 444 446 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 445 447 PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` 446 448 PostsCount *int64 `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"` 449 + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` 447 450 Status *ActorDefs_StatusView `json:"status,omitempty" cborgen:"status,omitempty"` 448 451 Verification *ActorDefs_VerificationState `json:"verification,omitempty" cborgen:"verification,omitempty"` 449 452 Viewer *ActorDefs_ViewerState `json:"viewer,omitempty" cborgen:"viewer,omitempty"` 453 + Website *string `json:"website,omitempty" cborgen:"website,omitempty"` 450 454 } 451 455 452 456 // ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema.
+3
api/bsky/actorprofile.go
··· 33 33 // labels: Self-label values, specific to the Bluesky application, on the overall account. 34 34 Labels *ActorProfile_Labels `json:"labels,omitempty" cborgen:"labels,omitempty"` 35 35 PinnedPost *comatprototypes.RepoStrongRef `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"` 36 + // pronouns: Free-form pronouns text. 37 + Pronouns *string `json:"pronouns,omitempty" cborgen:"pronouns,omitempty"` 38 + Website *string `json:"website,omitempty" cborgen:"website,omitempty"` 36 39 } 37 40 38 41 // Self-label values, specific to the Bluesky application, on the overall account.
+115 -1
api/bsky/cbor_gen.go
··· 2185 2185 } 2186 2186 2187 2187 cw := cbg.NewCborWriter(w) 2188 - fieldCount := 9 2188 + fieldCount := 11 2189 2189 2190 2190 if t.Avatar == nil { 2191 2191 fieldCount-- ··· 2216 2216 } 2217 2217 2218 2218 if t.PinnedPost == nil { 2219 + fieldCount-- 2220 + } 2221 + 2222 + if t.Pronouns == nil { 2223 + fieldCount-- 2224 + } 2225 + 2226 + if t.Website == nil { 2219 2227 fieldCount-- 2220 2228 } 2221 2229 ··· 2296 2304 2297 2305 if err := t.Labels.MarshalCBOR(cw); err != nil { 2298 2306 return err 2307 + } 2308 + } 2309 + 2310 + // t.Website (string) (string) 2311 + if t.Website != nil { 2312 + 2313 + if len("website") > 1000000 { 2314 + return xerrors.Errorf("Value in field \"website\" was too long") 2315 + } 2316 + 2317 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("website"))); err != nil { 2318 + return err 2319 + } 2320 + if _, err := cw.WriteString(string("website")); err != nil { 2321 + return err 2322 + } 2323 + 2324 + if t.Website == nil { 2325 + if _, err := cw.Write(cbg.CborNull); err != nil { 2326 + return err 2327 + } 2328 + } else { 2329 + if len(*t.Website) > 1000000 { 2330 + return xerrors.Errorf("Value in field t.Website was too long") 2331 + } 2332 + 2333 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Website))); err != nil { 2334 + return err 2335 + } 2336 + if _, err := cw.WriteString(string(*t.Website)); err != nil { 2337 + return err 2338 + } 2339 + } 2340 + } 2341 + 2342 + // t.Pronouns (string) (string) 2343 + if t.Pronouns != nil { 2344 + 2345 + if len("pronouns") > 1000000 { 2346 + return xerrors.Errorf("Value in field \"pronouns\" was too long") 2347 + } 2348 + 2349 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("pronouns"))); err != nil { 2350 + return err 2351 + } 2352 + if _, err := cw.WriteString(string("pronouns")); err != nil { 2353 + return err 2354 + } 2355 + 2356 + if t.Pronouns == nil { 2357 + if _, err := cw.Write(cbg.CborNull); err != nil { 2358 + return err 2359 + } 2360 + } else { 2361 + if len(*t.Pronouns) > 1000000 { 2362 + return xerrors.Errorf("Value in field t.Pronouns was too long") 2363 + } 2364 + 2365 + if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(*t.Pronouns))); err != nil { 2366 + return err 2367 + } 2368 + if _, err := cw.WriteString(string(*t.Pronouns)); err != nil { 2369 + return err 2370 + } 2299 2371 } 2300 2372 } 2301 2373 ··· 2546 2618 } 2547 2619 } 2548 2620 2621 + } 2622 + // t.Website (string) (string) 2623 + case "website": 2624 + 2625 + { 2626 + b, err := cr.ReadByte() 2627 + if err != nil { 2628 + return err 2629 + } 2630 + if b != cbg.CborNull[0] { 2631 + if err := cr.UnreadByte(); err != nil { 2632 + return err 2633 + } 2634 + 2635 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 2636 + if err != nil { 2637 + return err 2638 + } 2639 + 2640 + t.Website = (*string)(&sval) 2641 + } 2642 + } 2643 + // t.Pronouns (string) (string) 2644 + case "pronouns": 2645 + 2646 + { 2647 + b, err := cr.ReadByte() 2648 + if err != nil { 2649 + return err 2650 + } 2651 + if b != cbg.CborNull[0] { 2652 + if err := cr.UnreadByte(); err != nil { 2653 + return err 2654 + } 2655 + 2656 + sval, err := cbg.ReadStringWithMax(cr, 1000000) 2657 + if err != nil { 2658 + return err 2659 + } 2660 + 2661 + t.Pronouns = (*string)(&sval) 2662 + } 2549 2663 } 2550 2664 // t.CreatedAt (string) (string) 2551 2665 case "createdAt":
+31
api/bsky/unspeccedgetOnboardingSuggestedStarterPacks.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacks 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // UnspeccedGetOnboardingSuggestedStarterPacks_Output is the output of a app.bsky.unspecced.getOnboardingSuggestedStarterPacks call. 14 + type UnspeccedGetOnboardingSuggestedStarterPacks_Output struct { 15 + StarterPacks []*GraphDefs_StarterPackView `json:"starterPacks" cborgen:"starterPacks"` 16 + } 17 + 18 + // UnspeccedGetOnboardingSuggestedStarterPacks calls the XRPC method "app.bsky.unspecced.getOnboardingSuggestedStarterPacks". 19 + func UnspeccedGetOnboardingSuggestedStarterPacks(ctx context.Context, c util.LexClient, limit int64) (*UnspeccedGetOnboardingSuggestedStarterPacks_Output, error) { 20 + var out UnspeccedGetOnboardingSuggestedStarterPacks_Output 21 + 22 + params := map[string]interface{}{} 23 + if limit != 0 { 24 + params["limit"] = limit 25 + } 26 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", params, nil, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+36
api/bsky/unspeccedgetOnboardingSuggestedStarterPacksSkeleton.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output is the output of a app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton call. 14 + type UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output struct { 15 + StarterPacks []string `json:"starterPacks" cborgen:"starterPacks"` 16 + } 17 + 18 + // UnspeccedGetOnboardingSuggestedStarterPacksSkeleton calls the XRPC method "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton". 19 + // 20 + // viewer: DID of the account making the request (not included for public/unauthenticated queries). 21 + func UnspeccedGetOnboardingSuggestedStarterPacksSkeleton(ctx context.Context, c util.LexClient, limit int64, viewer string) (*UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output, error) { 22 + var out UnspeccedGetOnboardingSuggestedStarterPacksSkeleton_Output 23 + 24 + params := map[string]interface{}{} 25 + if limit != 0 { 26 + params["limit"] = limit 27 + } 28 + if viewer != "" { 29 + params["viewer"] = viewer 30 + } 31 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", params, nil, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }
+44
api/ozone/moderationcancelScheduledActions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.cancelScheduledActions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ModerationCancelScheduledActions_CancellationResults is a "cancellationResults" in the tools.ozone.moderation.cancelScheduledActions schema. 14 + type ModerationCancelScheduledActions_CancellationResults struct { 15 + // failed: DIDs for which cancellation failed with error details 16 + Failed []*ModerationCancelScheduledActions_FailedCancellation `json:"failed" cborgen:"failed"` 17 + // succeeded: DIDs for which all pending scheduled actions were successfully cancelled 18 + Succeeded []string `json:"succeeded" cborgen:"succeeded"` 19 + } 20 + 21 + // ModerationCancelScheduledActions_FailedCancellation is a "failedCancellation" in the tools.ozone.moderation.cancelScheduledActions schema. 22 + type ModerationCancelScheduledActions_FailedCancellation struct { 23 + Did string `json:"did" cborgen:"did"` 24 + Error string `json:"error" cborgen:"error"` 25 + ErrorCode *string `json:"errorCode,omitempty" cborgen:"errorCode,omitempty"` 26 + } 27 + 28 + // ModerationCancelScheduledActions_Input is the input argument to a tools.ozone.moderation.cancelScheduledActions call. 29 + type ModerationCancelScheduledActions_Input struct { 30 + // comment: Optional comment describing the reason for cancellation 31 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 32 + // subjects: Array of DID subjects to cancel scheduled actions for 33 + Subjects []string `json:"subjects" cborgen:"subjects"` 34 + } 35 + 36 + // ModerationCancelScheduledActions calls the XRPC method "tools.ozone.moderation.cancelScheduledActions". 37 + func ModerationCancelScheduledActions(ctx context.Context, c util.LexClient, input *ModerationCancelScheduledActions_Input) (*ModerationCancelScheduledActions_CancellationResults, error) { 38 + var out ModerationCancelScheduledActions_CancellationResults 39 + if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.cancelScheduledActions", nil, input, &out); err != nil { 40 + return nil, err 41 + } 42 + 43 + return &out, nil 44 + }
+160 -42
api/ozone/moderationdefs.go
··· 137 137 } 138 138 } 139 139 140 + // ModerationDefs_CancelScheduledTakedownEvent is a "cancelScheduledTakedownEvent" in the tools.ozone.moderation.defs schema. 141 + // 142 + // Logs cancellation of a scheduled takedown action for an account. 143 + // 144 + // RECORDTYPE: ModerationDefs_CancelScheduledTakedownEvent 145 + type ModerationDefs_CancelScheduledTakedownEvent struct { 146 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent" cborgen:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent"` 147 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 148 + } 149 + 140 150 // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. 141 151 // 142 152 // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. ··· 377 387 } 378 388 379 389 type ModerationDefs_ModEventViewDetail_Event struct { 380 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 381 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 382 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 383 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 384 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 385 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 386 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 387 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 388 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 389 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 390 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 391 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 392 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 393 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 394 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 395 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 396 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 397 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 398 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 399 - ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 400 - ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 390 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 391 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 392 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 393 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 394 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 395 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 396 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 397 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 398 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 399 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 400 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 401 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 402 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 403 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 404 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 405 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 406 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 407 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 408 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 409 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 410 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 411 + ModerationDefs_RevokeAccountCredentialsEvent *ModerationDefs_RevokeAccountCredentialsEvent 412 + ModerationDefs_ScheduleTakedownEvent *ModerationDefs_ScheduleTakedownEvent 413 + ModerationDefs_CancelScheduledTakedownEvent *ModerationDefs_CancelScheduledTakedownEvent 401 414 } 402 415 403 416 func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { ··· 485 498 t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 486 499 return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 487 500 } 501 + if t.ModerationDefs_RevokeAccountCredentialsEvent != nil { 502 + t.ModerationDefs_RevokeAccountCredentialsEvent.LexiconTypeID = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent" 503 + return json.Marshal(t.ModerationDefs_RevokeAccountCredentialsEvent) 504 + } 505 + if t.ModerationDefs_ScheduleTakedownEvent != nil { 506 + t.ModerationDefs_ScheduleTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#scheduleTakedownEvent" 507 + return json.Marshal(t.ModerationDefs_ScheduleTakedownEvent) 508 + } 509 + if t.ModerationDefs_CancelScheduledTakedownEvent != nil { 510 + t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" 511 + return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) 512 + } 488 513 return nil, fmt.Errorf("cannot marshal empty enum") 489 514 } 490 515 func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { ··· 557 582 case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 558 583 t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 559 584 return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 585 + case "tools.ozone.moderation.defs#revokeAccountCredentialsEvent": 586 + t.ModerationDefs_RevokeAccountCredentialsEvent = new(ModerationDefs_RevokeAccountCredentialsEvent) 587 + return json.Unmarshal(b, t.ModerationDefs_RevokeAccountCredentialsEvent) 588 + case "tools.ozone.moderation.defs#scheduleTakedownEvent": 589 + t.ModerationDefs_ScheduleTakedownEvent = new(ModerationDefs_ScheduleTakedownEvent) 590 + return json.Unmarshal(b, t.ModerationDefs_ScheduleTakedownEvent) 591 + case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": 592 + t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) 593 + return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) 560 594 561 595 default: 562 596 return nil ··· 615 649 } 616 650 617 651 type ModerationDefs_ModEventView_Event struct { 618 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 619 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 620 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 621 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 622 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 623 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 624 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 625 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 626 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 627 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 628 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 629 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 630 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 631 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 632 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 633 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 634 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 635 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 636 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 637 - ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 638 - ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 652 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 653 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 654 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 655 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 656 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 657 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 658 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 659 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 660 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 661 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 662 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 663 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 664 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 665 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 666 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 667 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 668 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 669 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 670 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 671 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 672 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 673 + ModerationDefs_RevokeAccountCredentialsEvent *ModerationDefs_RevokeAccountCredentialsEvent 674 + ModerationDefs_ScheduleTakedownEvent *ModerationDefs_ScheduleTakedownEvent 675 + ModerationDefs_CancelScheduledTakedownEvent *ModerationDefs_CancelScheduledTakedownEvent 639 676 } 640 677 641 678 func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { ··· 723 760 t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 724 761 return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 725 762 } 763 + if t.ModerationDefs_RevokeAccountCredentialsEvent != nil { 764 + t.ModerationDefs_RevokeAccountCredentialsEvent.LexiconTypeID = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent" 765 + return json.Marshal(t.ModerationDefs_RevokeAccountCredentialsEvent) 766 + } 767 + if t.ModerationDefs_ScheduleTakedownEvent != nil { 768 + t.ModerationDefs_ScheduleTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#scheduleTakedownEvent" 769 + return json.Marshal(t.ModerationDefs_ScheduleTakedownEvent) 770 + } 771 + if t.ModerationDefs_CancelScheduledTakedownEvent != nil { 772 + t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" 773 + return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) 774 + } 726 775 return nil, fmt.Errorf("cannot marshal empty enum") 727 776 } 728 777 func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { ··· 795 844 case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 796 845 t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 797 846 return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 847 + case "tools.ozone.moderation.defs#revokeAccountCredentialsEvent": 848 + t.ModerationDefs_RevokeAccountCredentialsEvent = new(ModerationDefs_RevokeAccountCredentialsEvent) 849 + return json.Unmarshal(b, t.ModerationDefs_RevokeAccountCredentialsEvent) 850 + case "tools.ozone.moderation.defs#scheduleTakedownEvent": 851 + t.ModerationDefs_ScheduleTakedownEvent = new(ModerationDefs_ScheduleTakedownEvent) 852 + return json.Unmarshal(b, t.ModerationDefs_ScheduleTakedownEvent) 853 + case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": 854 + t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) 855 + return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) 798 856 799 857 default: 800 858 return nil ··· 1013 1071 TakendownAccountCount int64 `json:"takendownAccountCount" cborgen:"takendownAccountCount"` 1014 1072 // takendownRecordCount: The total number of records taken down as a result of the user's reports. 1015 1073 TakendownRecordCount int64 `json:"takendownRecordCount" cborgen:"takendownRecordCount"` 1074 + } 1075 + 1076 + // ModerationDefs_RevokeAccountCredentialsEvent is a "revokeAccountCredentialsEvent" in the tools.ozone.moderation.defs schema. 1077 + // 1078 + // Account credentials revocation by moderators. Only works on DID subjects. 1079 + // 1080 + // RECORDTYPE: ModerationDefs_RevokeAccountCredentialsEvent 1081 + type ModerationDefs_RevokeAccountCredentialsEvent struct { 1082 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent" cborgen:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent"` 1083 + // comment: Comment describing the reason for the revocation. 1084 + Comment string `json:"comment" cborgen:"comment"` 1085 + } 1086 + 1087 + // ModerationDefs_ScheduleTakedownEvent is a "scheduleTakedownEvent" in the tools.ozone.moderation.defs schema. 1088 + // 1089 + // Logs a scheduled takedown action for an account. 1090 + // 1091 + // RECORDTYPE: ModerationDefs_ScheduleTakedownEvent 1092 + type ModerationDefs_ScheduleTakedownEvent struct { 1093 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent" cborgen:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent"` 1094 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 1095 + ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` 1096 + ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` 1097 + ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"` 1098 + } 1099 + 1100 + // ModerationDefs_ScheduledActionView is a "scheduledActionView" in the tools.ozone.moderation.defs schema. 1101 + // 1102 + // View of a scheduled moderation action 1103 + type ModerationDefs_ScheduledActionView struct { 1104 + // action: Type of action to be executed 1105 + Action string `json:"action" cborgen:"action"` 1106 + // createdAt: When the scheduled action was created 1107 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 1108 + // createdBy: DID of the user who created this scheduled action 1109 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 1110 + // did: Subject DID for the action 1111 + Did string `json:"did" cborgen:"did"` 1112 + // eventData: Serialized event object that will be propagated to the event when performed 1113 + EventData *util.LexiconTypeDecoder `json:"eventData,omitempty" cborgen:"eventData,omitempty"` 1114 + // executeAfter: Earliest time to execute the action (for randomized scheduling) 1115 + ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` 1116 + // executeAt: Exact time to execute the action 1117 + ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` 1118 + // executeUntil: Latest time to execute the action (for randomized scheduling) 1119 + ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"` 1120 + // executionEventId: ID of the moderation event created when action was successfully executed 1121 + ExecutionEventId *int64 `json:"executionEventId,omitempty" cborgen:"executionEventId,omitempty"` 1122 + // id: Auto-incrementing row ID 1123 + Id int64 `json:"id" cborgen:"id"` 1124 + // lastExecutedAt: When the action was last attempted to be executed 1125 + LastExecutedAt *string `json:"lastExecutedAt,omitempty" cborgen:"lastExecutedAt,omitempty"` 1126 + // lastFailureReason: Reason for the last execution failure 1127 + LastFailureReason *string `json:"lastFailureReason,omitempty" cborgen:"lastFailureReason,omitempty"` 1128 + // randomizeExecution: Whether execution time should be randomized within the specified range 1129 + RandomizeExecution *bool `json:"randomizeExecution,omitempty" cborgen:"randomizeExecution,omitempty"` 1130 + // status: Current status of the scheduled action 1131 + Status string `json:"status" cborgen:"status"` 1132 + // updatedAt: When the scheduled action was last updated 1133 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 1016 1134 } 1017 1135 1018 1136 // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema.
+45 -21
api/ozone/moderationemitEvent.go
··· 25 25 } 26 26 27 27 type ModerationEmitEvent_Input_Event struct { 28 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 29 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 30 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 31 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 32 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 33 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 34 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 35 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 36 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 37 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 38 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 39 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 40 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 41 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 42 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 43 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 44 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 45 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 46 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 47 - ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 48 - ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 28 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 29 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 30 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 31 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 32 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 33 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 34 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 35 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 36 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 37 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 38 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 39 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 40 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 41 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 42 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 43 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 44 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 45 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 46 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 47 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 48 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 49 + ModerationDefs_RevokeAccountCredentialsEvent *ModerationDefs_RevokeAccountCredentialsEvent 50 + ModerationDefs_ScheduleTakedownEvent *ModerationDefs_ScheduleTakedownEvent 51 + ModerationDefs_CancelScheduledTakedownEvent *ModerationDefs_CancelScheduledTakedownEvent 49 52 } 50 53 51 54 func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { ··· 133 136 t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 134 137 return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 135 138 } 139 + if t.ModerationDefs_RevokeAccountCredentialsEvent != nil { 140 + t.ModerationDefs_RevokeAccountCredentialsEvent.LexiconTypeID = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent" 141 + return json.Marshal(t.ModerationDefs_RevokeAccountCredentialsEvent) 142 + } 143 + if t.ModerationDefs_ScheduleTakedownEvent != nil { 144 + t.ModerationDefs_ScheduleTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#scheduleTakedownEvent" 145 + return json.Marshal(t.ModerationDefs_ScheduleTakedownEvent) 146 + } 147 + if t.ModerationDefs_CancelScheduledTakedownEvent != nil { 148 + t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" 149 + return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) 150 + } 136 151 return nil, fmt.Errorf("cannot marshal empty enum") 137 152 } 138 153 func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { ··· 205 220 case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 206 221 t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 207 222 return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 223 + case "tools.ozone.moderation.defs#revokeAccountCredentialsEvent": 224 + t.ModerationDefs_RevokeAccountCredentialsEvent = new(ModerationDefs_RevokeAccountCredentialsEvent) 225 + return json.Unmarshal(b, t.ModerationDefs_RevokeAccountCredentialsEvent) 226 + case "tools.ozone.moderation.defs#scheduleTakedownEvent": 227 + t.ModerationDefs_ScheduleTakedownEvent = new(ModerationDefs_ScheduleTakedownEvent) 228 + return json.Unmarshal(b, t.ModerationDefs_ScheduleTakedownEvent) 229 + case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": 230 + t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) 231 + return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) 208 232 209 233 default: 210 234 return nil
+44
api/ozone/moderationlistScheduledActions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.listScheduledActions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // ModerationListScheduledActions_Input is the input argument to a tools.ozone.moderation.listScheduledActions call. 14 + type ModerationListScheduledActions_Input struct { 15 + // cursor: Cursor for pagination 16 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 17 + // endsBefore: Filter actions scheduled to execute before this time 18 + EndsBefore *string `json:"endsBefore,omitempty" cborgen:"endsBefore,omitempty"` 19 + // limit: Maximum number of results to return 20 + Limit *int64 `json:"limit,omitempty" cborgen:"limit,omitempty"` 21 + // startsAfter: Filter actions scheduled to execute after this time 22 + StartsAfter *string `json:"startsAfter,omitempty" cborgen:"startsAfter,omitempty"` 23 + // statuses: Filter actions by status 24 + Statuses []string `json:"statuses" cborgen:"statuses"` 25 + // subjects: Filter actions for specific DID subjects 26 + Subjects []string `json:"subjects,omitempty" cborgen:"subjects,omitempty"` 27 + } 28 + 29 + // ModerationListScheduledActions_Output is the output of a tools.ozone.moderation.listScheduledActions call. 30 + type ModerationListScheduledActions_Output struct { 31 + Actions []*ModerationDefs_ScheduledActionView `json:"actions" cborgen:"actions"` 32 + // cursor: Cursor for next page of results 33 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 34 + } 35 + 36 + // ModerationListScheduledActions calls the XRPC method "tools.ozone.moderation.listScheduledActions". 37 + func ModerationListScheduledActions(ctx context.Context, c util.LexClient, input *ModerationListScheduledActions_Input) (*ModerationListScheduledActions_Output, error) { 38 + var out ModerationListScheduledActions_Output 39 + if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.listScheduledActions", nil, input, &out); err != nil { 40 + return nil, err 41 + } 42 + 43 + return &out, nil 44 + }
+5 -1
api/ozone/moderationqueryEvents.go
··· 21 21 // addedLabels: If specified, only events where all of these labels were added are returned 22 22 // addedTags: If specified, only events where all of these tags were added are returned 23 23 // ageAssuranceState: If specified, only events where the age assurance state matches the given value are returned 24 + // batchId: If specified, only events where the batchId matches the given value are returned 24 25 // collections: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 25 26 // comment: If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition. 26 27 // createdAfter: Retrieve events created after a given timestamp ··· 33 34 // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 34 35 // subjectType: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored. 35 36 // types: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned. 36 - func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { 37 + func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, ageAssuranceState string, batchId string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, modTool []string, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { 37 38 var out ModerationQueryEvents_Output 38 39 39 40 params := map[string]interface{}{} ··· 45 46 } 46 47 if ageAssuranceState != "" { 47 48 params["ageAssuranceState"] = ageAssuranceState 49 + } 50 + if batchId != "" { 51 + params["batchId"] = batchId 48 52 } 49 53 if len(collections) != 0 { 50 54 params["collections"] = collections
+102
api/ozone/moderationscheduleAction.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.moderation.scheduleAction 6 + 7 + import ( 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + 12 + "github.com/bluesky-social/indigo/lex/util" 13 + ) 14 + 15 + // ModerationScheduleAction_FailedScheduling is a "failedScheduling" in the tools.ozone.moderation.scheduleAction schema. 16 + type ModerationScheduleAction_FailedScheduling struct { 17 + Error string `json:"error" cborgen:"error"` 18 + ErrorCode *string `json:"errorCode,omitempty" cborgen:"errorCode,omitempty"` 19 + Subject string `json:"subject" cborgen:"subject"` 20 + } 21 + 22 + // ModerationScheduleAction_Input is the input argument to a tools.ozone.moderation.scheduleAction call. 23 + type ModerationScheduleAction_Input struct { 24 + Action *ModerationScheduleAction_Input_Action `json:"action" cborgen:"action"` 25 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 26 + // modTool: This will be propagated to the moderation event when it is applied 27 + ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` 28 + Scheduling *ModerationScheduleAction_SchedulingConfig `json:"scheduling" cborgen:"scheduling"` 29 + // subjects: Array of DID subjects to schedule the action for 30 + Subjects []string `json:"subjects" cborgen:"subjects"` 31 + } 32 + 33 + type ModerationScheduleAction_Input_Action struct { 34 + ModerationScheduleAction_Takedown *ModerationScheduleAction_Takedown 35 + } 36 + 37 + func (t *ModerationScheduleAction_Input_Action) MarshalJSON() ([]byte, error) { 38 + if t.ModerationScheduleAction_Takedown != nil { 39 + t.ModerationScheduleAction_Takedown.LexiconTypeID = "tools.ozone.moderation.scheduleAction#takedown" 40 + return json.Marshal(t.ModerationScheduleAction_Takedown) 41 + } 42 + return nil, fmt.Errorf("cannot marshal empty enum") 43 + } 44 + func (t *ModerationScheduleAction_Input_Action) UnmarshalJSON(b []byte) error { 45 + typ, err := util.TypeExtract(b) 46 + if err != nil { 47 + return err 48 + } 49 + 50 + switch typ { 51 + case "tools.ozone.moderation.scheduleAction#takedown": 52 + t.ModerationScheduleAction_Takedown = new(ModerationScheduleAction_Takedown) 53 + return json.Unmarshal(b, t.ModerationScheduleAction_Takedown) 54 + 55 + default: 56 + return nil 57 + } 58 + } 59 + 60 + // ModerationScheduleAction_ScheduledActionResults is a "scheduledActionResults" in the tools.ozone.moderation.scheduleAction schema. 61 + type ModerationScheduleAction_ScheduledActionResults struct { 62 + Failed []*ModerationScheduleAction_FailedScheduling `json:"failed" cborgen:"failed"` 63 + Succeeded []string `json:"succeeded" cborgen:"succeeded"` 64 + } 65 + 66 + // ModerationScheduleAction_SchedulingConfig is a "schedulingConfig" in the tools.ozone.moderation.scheduleAction schema. 67 + // 68 + // Configuration for when the action should be executed 69 + type ModerationScheduleAction_SchedulingConfig struct { 70 + // executeAfter: Earliest time to execute the action (for randomized scheduling) 71 + ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` 72 + // executeAt: Exact time to execute the action 73 + ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` 74 + // executeUntil: Latest time to execute the action (for randomized scheduling) 75 + ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"` 76 + } 77 + 78 + // ModerationScheduleAction_Takedown is a "takedown" in the tools.ozone.moderation.scheduleAction schema. 79 + // 80 + // # Schedule a takedown action 81 + // 82 + // RECORDTYPE: ModerationScheduleAction_Takedown 83 + type ModerationScheduleAction_Takedown struct { 84 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.scheduleAction#takedown" cborgen:"$type,const=tools.ozone.moderation.scheduleAction#takedown"` 85 + // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 86 + AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 87 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 88 + // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 89 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 90 + // policies: Names/Keywords of the policies that drove the decision. 91 + Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` 92 + } 93 + 94 + // ModerationScheduleAction calls the XRPC method "tools.ozone.moderation.scheduleAction". 95 + func ModerationScheduleAction(ctx context.Context, c util.LexClient, input *ModerationScheduleAction_Input) (*ModerationScheduleAction_ScheduledActionResults, error) { 96 + var out ModerationScheduleAction_ScheduledActionResults 97 + if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.moderation.scheduleAction", nil, input, &out); err != nil { 98 + return nil, err 99 + } 100 + 101 + return &out, nil 102 + }
+5
api/ozone/reportdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.report.defs
+1
automod/consumer/ozone.go
··· 61 61 nil, // addedLabels []string 62 62 nil, // addedTags []string 63 63 "", // ageAssuranceState 64 + "", // batchId string 64 65 nil, // collections []string 65 66 "", // comment string 66 67 since.String(), // createdAfter string
+2
automod/engine/persisthelpers.go
··· 174 174 nil, // addedLabels []string 175 175 nil, // addedTags []string 176 176 "", // ageAssuranceState 177 + "", // batchId string 177 178 nil, // collections []string 178 179 "", // comment string 179 180 "", // createdAfter string ··· 258 259 nil, // addedLabels []string 259 260 nil, // addedTags []string 260 261 "", // ageAssuranceState 262 + "", // batchId string 261 263 nil, // collections []string 262 264 "", // comment string 263 265 "", // createdAfter string
+1
cmd/beemo/notify_reports.go
··· 74 74 nil, // addedLabels []string 75 75 nil, // addedTags []string 76 76 "", // ageAssuranceState 77 + "", // batchId string 77 78 nil, // collections []string 78 79 "", // comment string 79 80 "", // createdAfter string
+2
cmd/gosky/admin.go
··· 396 396 nil, // addedLabels []string 397 397 nil, // addedTags []string 398 398 "", // ageAssuranceState 399 + "", // batchId string 399 400 nil, // collections []string 400 401 "", // comment string 401 402 "", // createdAfter string ··· 713 714 nil, // addedLabels []string 714 715 nil, // addedTags []string 715 716 "", // ageAssuranceState 717 + "", // batchId string 716 718 nil, // collections []string 717 719 "", // comment string 718 720 "", // createdAfter string