fork of indigo with slightly nicer lexgen
0
fork

Configure Feed

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

make lexgen, then select only AA-related stuff

+251 -63
+6 -4
api/bsky/notificationregisterPush.go
··· 12 13 // NotificationRegisterPush_Input is the input argument to a app.bsky.notification.registerPush call. 14 type NotificationRegisterPush_Input struct { 15 - AppId string `json:"appId" cborgen:"appId"` 16 - Platform string `json:"platform" cborgen:"platform"` 17 - ServiceDid string `json:"serviceDid" cborgen:"serviceDid"` 18 - Token string `json:"token" cborgen:"token"` 19 } 20 21 // NotificationRegisterPush calls the XRPC method "app.bsky.notification.registerPush".
··· 12 13 // NotificationRegisterPush_Input is the input argument to a app.bsky.notification.registerPush call. 14 type NotificationRegisterPush_Input struct { 15 + // ageRestricted: Set to true when the actor is age restricted 16 + AgeRestricted *bool `json:"ageRestricted,omitempty" cborgen:"ageRestricted,omitempty"` 17 + AppId string `json:"appId" cborgen:"appId"` 18 + Platform string `json:"platform" cborgen:"platform"` 19 + ServiceDid string `json:"serviceDid" cborgen:"serviceDid"` 20 + Token string `json:"token" cborgen:"token"` 21 } 22 23 // NotificationRegisterPush calls the XRPC method "app.bsky.notification.registerPush".
+32
api/bsky/unspecceddefs.go
··· 4 5 // schema: app.bsky.unspecced.defs 6 7 // UnspeccedDefs_SkeletonSearchActor is a "skeletonSearchActor" in the app.bsky.unspecced.defs schema. 8 type UnspeccedDefs_SkeletonSearchActor struct { 9 Did string `json:"did" cborgen:"did"`
··· 4 5 // schema: app.bsky.unspecced.defs 6 7 + // UnspeccedDefs_AgeAssuranceEvent is a "ageAssuranceEvent" in the app.bsky.unspecced.defs schema. 8 + // 9 + // Object used to store age assurance data in stash. 10 + type UnspeccedDefs_AgeAssuranceEvent struct { 11 + // attemptId: The unique identifier for this instance of the age assurance flow, in UUID format. 12 + AttemptId string `json:"attemptId" cborgen:"attemptId"` 13 + // completeIp: The IP address used when completing the AA flow. 14 + CompleteIp *string `json:"completeIp,omitempty" cborgen:"completeIp,omitempty"` 15 + // completeUa: The user agent used when completing the AA flow. 16 + CompleteUa *string `json:"completeUa,omitempty" cborgen:"completeUa,omitempty"` 17 + // createdAt: The date and time of this write operation. 18 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 19 + // email: The email used for AA. 20 + Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 21 + // initIp: The IP address used when initiating the AA flow. 22 + InitIp *string `json:"initIp,omitempty" cborgen:"initIp,omitempty"` 23 + // initUa: The user agent used when initiating the AA flow. 24 + InitUa *string `json:"initUa,omitempty" cborgen:"initUa,omitempty"` 25 + // status: The status of the age assurance process. 26 + Status string `json:"status" cborgen:"status"` 27 + } 28 + 29 + // UnspeccedDefs_AgeAssuranceState is a "ageAssuranceState" in the app.bsky.unspecced.defs schema. 30 + // 31 + // The computed state of the age assurance process, returned to the user in question on certain authenticated requests. 32 + type UnspeccedDefs_AgeAssuranceState struct { 33 + // lastInitiatedAt: The timestamp when this state was last updated. 34 + LastInitiatedAt *string `json:"lastInitiatedAt,omitempty" cborgen:"lastInitiatedAt,omitempty"` 35 + // status: The status of the age assurance process. 36 + Status string `json:"status" cborgen:"status"` 37 + } 38 + 39 // UnspeccedDefs_SkeletonSearchActor is a "skeletonSearchActor" in the app.bsky.unspecced.defs schema. 40 type UnspeccedDefs_SkeletonSearchActor struct { 41 Did string `json:"did" cborgen:"did"`
+21
api/bsky/unspeccedgetAgeAssuranceState.go
···
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.getAgeAssuranceState 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // UnspeccedGetAgeAssuranceState calls the XRPC method "app.bsky.unspecced.getAgeAssuranceState". 14 + func UnspeccedGetAgeAssuranceState(ctx context.Context, c util.LexClient) (*UnspeccedDefs_AgeAssuranceState, error) { 15 + var out UnspeccedDefs_AgeAssuranceState 16 + if err := c.LexDo(ctx, util.Query, "", "app.bsky.unspecced.getAgeAssuranceState", nil, nil, &out); err != nil { 17 + return nil, err 18 + } 19 + 20 + return &out, nil 21 + }
+31
api/bsky/unspeccedinitAgeAssurance.go
···
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package bsky 4 + 5 + // schema: app.bsky.unspecced.initAgeAssurance 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + ) 12 + 13 + // UnspeccedInitAgeAssurance_Input is the input argument to a app.bsky.unspecced.initAgeAssurance call. 14 + type UnspeccedInitAgeAssurance_Input struct { 15 + // countryCode: An ISO 3166-1 alpha-2 code of the user's location. 16 + CountryCode string `json:"countryCode" cborgen:"countryCode"` 17 + // email: The user's email address to receive assurance instructions. 18 + Email string `json:"email" cborgen:"email"` 19 + // language: The user's preferred language for communication during the assurance process. 20 + Language string `json:"language" cborgen:"language"` 21 + } 22 + 23 + // UnspeccedInitAgeAssurance calls the XRPC method "app.bsky.unspecced.initAgeAssurance". 24 + func UnspeccedInitAgeAssurance(ctx context.Context, c util.LexClient, input *UnspeccedInitAgeAssurance_Input) (*UnspeccedDefs_AgeAssuranceState, error) { 25 + var out UnspeccedDefs_AgeAssuranceState 26 + if err := c.LexDo(ctx, util.Procedure, "application/json", "app.bsky.unspecced.initAgeAssurance", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+111 -38
api/ozone/moderationdefs.go
··· 56 TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` 57 } 58 59 // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 60 type ModerationDefs_BlobView struct { 61 Cid string `json:"cid" cborgen:"cid"` ··· 334 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 335 Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 336 Id int64 `json:"id" cborgen:"id"` 337 Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 338 SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 339 } 340 341 type ModerationDefs_ModEventViewDetail_Event struct { 342 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 343 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 344 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 345 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 346 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 347 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 348 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 349 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 350 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 351 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 352 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 353 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 354 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 355 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 356 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 357 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 358 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 359 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 360 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 361 } 362 363 func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { ··· 436 if t.ModerationDefs_ModEventPriorityScore != nil { 437 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 438 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 439 } 440 return nil, fmt.Errorf("cannot marshal empty enum") 441 } ··· 503 case "tools.ozone.moderation.defs#modEventPriorityScore": 504 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 505 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 506 507 default: 508 return nil ··· 561 } 562 563 type ModerationDefs_ModEventView_Event struct { 564 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 565 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 566 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 567 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 568 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 569 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 570 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 571 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 572 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 573 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 574 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 575 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 576 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 577 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 578 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 579 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 580 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 581 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 582 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 583 } 584 585 func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { ··· 659 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 660 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 661 } 662 return nil, fmt.Errorf("cannot marshal empty enum") 663 } 664 func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { ··· 725 case "tools.ozone.moderation.defs#modEventPriorityScore": 726 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 727 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 728 729 default: 730 return nil ··· 939 type ModerationDefs_SubjectStatusView struct { 940 // accountStats: Statistics related to the account subject 941 AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` 942 // 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. 943 Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 944 // comment: Sticky comment on the subject.
··· 56 TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` 57 } 58 59 + // ModerationDefs_AgeAssuranceEvent is a "ageAssuranceEvent" in the tools.ozone.moderation.defs schema. 60 + // 61 + // Age assurance info coming directly from users. Only works on DID subjects. 62 + // 63 + // RECORDTYPE: ModerationDefs_AgeAssuranceEvent 64 + type ModerationDefs_AgeAssuranceEvent struct { 65 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent"` 66 + // attemptId: The unique identifier for this instance of the age assurance flow, in UUID format. 67 + AttemptId string `json:"attemptId" cborgen:"attemptId"` 68 + // completeIp: The IP address used when completing the AA flow. 69 + CompleteIp *string `json:"completeIp,omitempty" cborgen:"completeIp,omitempty"` 70 + // completeUa: The user agent used when completing the AA flow. 71 + CompleteUa *string `json:"completeUa,omitempty" cborgen:"completeUa,omitempty"` 72 + // createdAt: The date and time of this write operation. 73 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 74 + // initIp: The IP address used when initiating the AA flow. 75 + InitIp *string `json:"initIp,omitempty" cborgen:"initIp,omitempty"` 76 + // initUa: The user agent used when initiating the AA flow. 77 + InitUa *string `json:"initUa,omitempty" cborgen:"initUa,omitempty"` 78 + // status: The status of the age assurance process. 79 + Status string `json:"status" cborgen:"status"` 80 + } 81 + 82 + // ModerationDefs_AgeAssuranceOverrideEvent is a "ageAssuranceOverrideEvent" in the tools.ozone.moderation.defs schema. 83 + // 84 + // Age assurance status override by moderators. Only works on DID subjects. 85 + // 86 + // RECORDTYPE: ModerationDefs_AgeAssuranceOverrideEvent 87 + type ModerationDefs_AgeAssuranceOverrideEvent struct { 88 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent"` 89 + // comment: Comment describing the reason for the override. 90 + Comment string `json:"comment" cborgen:"comment"` 91 + // status: The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state. 92 + Status string `json:"status" cborgen:"status"` 93 + } 94 + 95 // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 96 type ModerationDefs_BlobView struct { 97 Cid string `json:"cid" cborgen:"cid"` ··· 370 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 371 Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 372 Id int64 `json:"id" cborgen:"id"` 373 + ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` 374 Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 375 SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 376 } 377 378 type ModerationDefs_ModEventViewDetail_Event struct { 379 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 380 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 381 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 382 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 383 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 384 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 385 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 386 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 387 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 388 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 389 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 390 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 391 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 392 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 393 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 394 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 395 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 396 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 397 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 398 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 399 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 400 } 401 402 func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { ··· 475 if t.ModerationDefs_ModEventPriorityScore != nil { 476 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 477 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 478 + } 479 + if t.ModerationDefs_AgeAssuranceEvent != nil { 480 + t.ModerationDefs_AgeAssuranceEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceEvent" 481 + return json.Marshal(t.ModerationDefs_AgeAssuranceEvent) 482 + } 483 + if t.ModerationDefs_AgeAssuranceOverrideEvent != nil { 484 + t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 485 + return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 486 } 487 return nil, fmt.Errorf("cannot marshal empty enum") 488 } ··· 550 case "tools.ozone.moderation.defs#modEventPriorityScore": 551 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 552 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 553 + case "tools.ozone.moderation.defs#ageAssuranceEvent": 554 + t.ModerationDefs_AgeAssuranceEvent = new(ModerationDefs_AgeAssuranceEvent) 555 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceEvent) 556 + case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 557 + t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 558 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 559 560 default: 561 return nil ··· 614 } 615 616 type ModerationDefs_ModEventView_Event struct { 617 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 618 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 619 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 620 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 621 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 622 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 623 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 624 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 625 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 626 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 627 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 628 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 629 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 630 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 631 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 632 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 633 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 634 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 635 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 636 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 637 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 638 } 639 640 func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { ··· 714 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 715 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 716 } 717 + if t.ModerationDefs_AgeAssuranceEvent != nil { 718 + t.ModerationDefs_AgeAssuranceEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceEvent" 719 + return json.Marshal(t.ModerationDefs_AgeAssuranceEvent) 720 + } 721 + if t.ModerationDefs_AgeAssuranceOverrideEvent != nil { 722 + t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 723 + return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 724 + } 725 return nil, fmt.Errorf("cannot marshal empty enum") 726 } 727 func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { ··· 788 case "tools.ozone.moderation.defs#modEventPriorityScore": 789 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 790 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 791 + case "tools.ozone.moderation.defs#ageAssuranceEvent": 792 + t.ModerationDefs_AgeAssuranceEvent = new(ModerationDefs_AgeAssuranceEvent) 793 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceEvent) 794 + case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 795 + t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 796 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 797 798 default: 799 return nil ··· 1008 type ModerationDefs_SubjectStatusView struct { 1009 // accountStats: Statistics related to the account subject 1010 AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` 1011 + // ageAssuranceState: Current age assurance state of the subject. 1012 + AgeAssuranceState *string `json:"ageAssuranceState,omitempty" cborgen:"ageAssuranceState,omitempty"` 1013 + // ageAssuranceUpdatedBy: Whether or not the last successful update to age assurance was made by the user or admin. 1014 + AgeAssuranceUpdatedBy *string `json:"ageAssuranceUpdatedBy,omitempty" cborgen:"ageAssuranceUpdatedBy,omitempty"` 1015 // 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. 1016 Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 1017 // comment: Sticky comment on the subject.
+36 -19
api/ozone/moderationemitEvent.go
··· 17 type ModerationEmitEvent_Input struct { 18 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 19 Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"` 20 Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"` 21 SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 22 } 23 24 type ModerationEmitEvent_Input_Event struct { 25 - ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 26 - ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 27 - ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 28 - ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 29 - ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 30 - ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 31 - ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 32 - ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 33 - ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 34 - ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 35 - ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 36 - ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 37 - ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 38 - ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 39 - ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 40 - ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 41 - ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 42 - ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 43 - ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 44 } 45 46 func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { ··· 120 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 121 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 122 } 123 return nil, fmt.Errorf("cannot marshal empty enum") 124 } 125 func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { ··· 186 case "tools.ozone.moderation.defs#modEventPriorityScore": 187 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 188 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 189 190 default: 191 return nil
··· 17 type ModerationEmitEvent_Input struct { 18 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 19 Event *ModerationEmitEvent_Input_Event `json:"event" cborgen:"event"` 20 + ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` 21 Subject *ModerationEmitEvent_Input_Subject `json:"subject" cborgen:"subject"` 22 SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 23 } 24 25 type ModerationEmitEvent_Input_Event struct { 26 + ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 27 + ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 28 + ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 29 + ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 30 + ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 31 + ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 32 + ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 33 + ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 34 + ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 35 + ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 36 + ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 37 + ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 38 + ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 39 + ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 40 + ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 41 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 42 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 43 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 44 + ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 45 + ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent 46 + ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent 47 } 48 49 func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { ··· 123 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 124 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 125 } 126 + if t.ModerationDefs_AgeAssuranceEvent != nil { 127 + t.ModerationDefs_AgeAssuranceEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceEvent" 128 + return json.Marshal(t.ModerationDefs_AgeAssuranceEvent) 129 + } 130 + if t.ModerationDefs_AgeAssuranceOverrideEvent != nil { 131 + t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" 132 + return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) 133 + } 134 return nil, fmt.Errorf("cannot marshal empty enum") 135 } 136 func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { ··· 197 case "tools.ozone.moderation.defs#modEventPriorityScore": 198 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 199 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 200 + case "tools.ozone.moderation.defs#ageAssuranceEvent": 201 + t.ModerationDefs_AgeAssuranceEvent = new(ModerationDefs_AgeAssuranceEvent) 202 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceEvent) 203 + case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": 204 + t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) 205 + return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) 206 207 default: 208 return nil
+9 -1
api/ozone/moderationqueryEvents.go
··· 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 // 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. 24 // comment: If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition. 25 // createdAfter: Retrieve events created after a given timestamp 26 // createdBefore: Retrieve events created before a given timestamp 27 // hasComment: If true, only events with comments are returned 28 // includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. 29 // removedLabels: If specified, only events where all of these labels were removed are returned 30 // removedTags: If specified, only events where all of these tags were removed are returned 31 // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 32 // 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. 33 // 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. 34 - func ModerationQueryEvents(ctx context.Context, c util.LexClient, addedLabels []string, addedTags []string, collections []string, comment string, createdAfter string, createdBefore string, createdBy string, cursor string, hasComment bool, includeAllUserRecords bool, limit int64, policies []string, removedLabels []string, removedTags []string, reportTypes []string, sortDirection string, subject string, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { 35 var out ModerationQueryEvents_Output 36 37 params := map[string]interface{}{} ··· 41 if len(addedTags) != 0 { 42 params["addedTags"] = addedTags 43 } 44 if len(collections) != 0 { 45 params["collections"] = collections 46 } ··· 67 } 68 if limit != 0 { 69 params["limit"] = limit 70 } 71 if len(policies) != 0 { 72 params["policies"] = policies
··· 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 + // ageAssuranceState: If specified, only events where the age assurance state matches the given value are returned 24 // 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 // comment: If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition. 26 // createdAfter: Retrieve events created after a given timestamp 27 // createdBefore: Retrieve events created before a given timestamp 28 // hasComment: If true, only events with comments are returned 29 // includeAllUserRecords: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned. 30 + // modTool: If specified, only events where the modTool name matches any of the given values are returned 31 // removedLabels: If specified, only events where all of these labels were removed are returned 32 // removedTags: If specified, only events where all of these tags were removed are returned 33 // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 34 // 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 // 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 var out ModerationQueryEvents_Output 38 39 params := map[string]interface{}{} ··· 43 if len(addedTags) != 0 { 44 params["addedTags"] = addedTags 45 } 46 + if ageAssuranceState != "" { 47 + params["ageAssuranceState"] = ageAssuranceState 48 + } 49 if len(collections) != 0 { 50 params["collections"] = collections 51 } ··· 72 } 73 if limit != 0 { 74 params["limit"] = limit 75 + } 76 + if len(modTool) != 0 { 77 + params["modTool"] = modTool 78 } 79 if len(policies) != 0 { 80 params["policies"] = policies
+5 -1
api/ozone/moderationqueryStatuses.go
··· 18 19 // ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses". 20 // 21 // appealed: Get subjects in unresolved appealed status 22 // collections: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 23 // comment: Search subjects by keyword from comments ··· 45 // subject: The subject to get the status for. 46 // subjectType: If specified, subjects 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. 47 // takendown: Get subjects that were taken down 48 - func ModerationQueryStatuses(ctx context.Context, c util.LexClient, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 49 var out ModerationQueryStatuses_Output 50 51 params := map[string]interface{}{} 52 if appealed { 53 params["appealed"] = appealed 54 }
··· 18 19 // ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses". 20 // 21 + // ageAssuranceState: If specified, only subjects with the given age assurance state will be returned. 22 // appealed: Get subjects in unresolved appealed status 23 // collections: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 24 // comment: Search subjects by keyword from comments ··· 46 // subject: The subject to get the status for. 47 // subjectType: If specified, subjects 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. 48 // takendown: Get subjects that were taken down 49 + func ModerationQueryStatuses(ctx context.Context, c util.LexClient, ageAssuranceState string, appealed bool, collections []string, comment string, cursor string, excludeTags []string, hostingDeletedAfter string, hostingDeletedBefore string, hostingStatuses []string, hostingUpdatedAfter string, hostingUpdatedBefore string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, minAccountSuspendCount int64, minPriorityScore int64, minReportedRecordsCount int64, minTakendownRecordsCount int64, onlyMuted bool, queueCount int64, queueIndex int64, queueSeed string, reportedAfter string, reportedBefore string, reviewState string, reviewedAfter string, reviewedBefore string, sortDirection string, sortField string, subject string, subjectType string, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) { 50 var out ModerationQueryStatuses_Output 51 52 params := map[string]interface{}{} 53 + if ageAssuranceState != "" { 54 + params["ageAssuranceState"] = ageAssuranceState 55 + } 56 if appealed { 57 params["appealed"] = appealed 58 }