fork of indigo with slightly nicer lexgen

:sparkles: Add new typedefs from ozone api changes

+159 -6
api/ozone/moderationdefs.go
··· 13 13 "github.com/bluesky-social/indigo/lex/util" 14 14 ) 15 15 16 + // ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. 17 + // 18 + // Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 19 + // 20 + // RECORDTYPE: ModerationDefs_AccountEvent 21 + type ModerationDefs_AccountEvent struct { 22 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountEvent" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` 23 + // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. 24 + Active bool `json:"active" cborgen:"active"` 25 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 26 + Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 27 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 28 + } 29 + 30 + // ModerationDefs_AccountHosting is a "accountHosting" in the tools.ozone.moderation.defs schema. 31 + // 32 + // RECORDTYPE: ModerationDefs_AccountHosting 33 + type ModerationDefs_AccountHosting struct { 34 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountHosting" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` 35 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 36 + DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 37 + DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 38 + ReactivatedAt *string `json:"reactivatedAt,omitempty" cborgen:"reactivatedAt,omitempty"` 39 + Status string `json:"status" cborgen:"status"` 40 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 41 + } 42 + 16 43 // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 17 44 type ModerationDefs_BlobView struct { 18 45 Cid string `json:"cid" cborgen:"cid"` ··· 58 85 } 59 86 } 60 87 88 + // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. 89 + // 90 + // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 91 + // 92 + // RECORDTYPE: ModerationDefs_IdentityEvent 93 + type ModerationDefs_IdentityEvent struct { 94 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#identityEvent" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` 95 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 96 + Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 97 + PdsHost *string `json:"pdsHost,omitempty" cborgen:"pdsHost,omitempty"` 98 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 99 + Tombstone *bool `json:"tombstone,omitempty" cborgen:"tombstone,omitempty"` 100 + } 101 + 61 102 // ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. 62 103 // 63 104 // RECORDTYPE: ModerationDefs_ImageDetails ··· 71 112 // 72 113 // RECORDTYPE: ModerationDefs_ModEventAcknowledge 73 114 type ModerationDefs_ModEventAcknowledge struct { 74 - LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` 75 - Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 115 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` 116 + // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 117 + AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 118 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 76 119 } 77 120 78 121 // ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. ··· 152 195 type ModerationDefs_ModEventMuteReporter struct { 153 196 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` 154 197 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 155 - // durationInHours: Indicates how long the account should remain muted. 156 - DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` 198 + // durationInHours: Indicates how long the account should remain muted. Falsy value here means a permanent mute. 199 + DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 157 200 } 158 201 159 202 // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. ··· 218 261 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 219 262 // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 220 263 DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 264 + // policies: Names/Keywords of the policies that drove the decision. 265 + Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` 221 266 } 222 267 223 268 // ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. ··· 280 325 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 281 326 ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 282 327 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 328 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 329 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 330 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 283 331 } 284 332 285 333 func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { ··· 343 391 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 344 392 return json.Marshal(t.ModerationDefs_ModEventTag) 345 393 } 394 + if t.ModerationDefs_AccountEvent != nil { 395 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 396 + return json.Marshal(t.ModerationDefs_AccountEvent) 397 + } 398 + if t.ModerationDefs_IdentityEvent != nil { 399 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 400 + return json.Marshal(t.ModerationDefs_IdentityEvent) 401 + } 402 + if t.ModerationDefs_RecordEvent != nil { 403 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 404 + return json.Marshal(t.ModerationDefs_RecordEvent) 405 + } 346 406 return nil, fmt.Errorf("cannot marshal empty enum") 347 407 } 348 408 func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { ··· 397 457 case "tools.ozone.moderation.defs#modEventTag": 398 458 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 399 459 return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 460 + case "tools.ozone.moderation.defs#accountEvent": 461 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 462 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 463 + case "tools.ozone.moderation.defs#identityEvent": 464 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 465 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 466 + case "tools.ozone.moderation.defs#recordEvent": 467 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 468 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 400 469 401 470 default: 402 471 return nil ··· 470 539 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 471 540 ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 472 541 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 542 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 543 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 544 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 473 545 } 474 546 475 547 func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { ··· 533 605 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 534 606 return json.Marshal(t.ModerationDefs_ModEventTag) 535 607 } 608 + if t.ModerationDefs_AccountEvent != nil { 609 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 610 + return json.Marshal(t.ModerationDefs_AccountEvent) 611 + } 612 + if t.ModerationDefs_IdentityEvent != nil { 613 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 614 + return json.Marshal(t.ModerationDefs_IdentityEvent) 615 + } 616 + if t.ModerationDefs_RecordEvent != nil { 617 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 618 + return json.Marshal(t.ModerationDefs_RecordEvent) 619 + } 536 620 return nil, fmt.Errorf("cannot marshal empty enum") 537 621 } 538 622 func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { ··· 587 671 case "tools.ozone.moderation.defs#modEventTag": 588 672 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 589 673 return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 674 + case "tools.ozone.moderation.defs#accountEvent": 675 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 676 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 677 + case "tools.ozone.moderation.defs#identityEvent": 678 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 679 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 680 + case "tools.ozone.moderation.defs#recordEvent": 681 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 682 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 590 683 591 684 default: 592 685 return nil ··· 646 739 SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 647 740 } 648 741 742 + // ModerationDefs_RecordEvent is a "recordEvent" in the tools.ozone.moderation.defs schema. 743 + // 744 + // Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 745 + // 746 + // RECORDTYPE: ModerationDefs_RecordEvent 747 + type ModerationDefs_RecordEvent struct { 748 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordEvent" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` 749 + Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 750 + Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 751 + Op string `json:"op" cborgen:"op"` 752 + Timestamp string `json:"timestamp" cborgen:"timestamp"` 753 + } 754 + 755 + // ModerationDefs_RecordHosting is a "recordHosting" in the tools.ozone.moderation.defs schema. 756 + // 757 + // RECORDTYPE: ModerationDefs_RecordHosting 758 + type ModerationDefs_RecordHosting struct { 759 + LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordHosting" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` 760 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 761 + DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 762 + Status string `json:"status" cborgen:"status"` 763 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 764 + } 765 + 649 766 // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. 650 767 // 651 768 // RECORDTYPE: ModerationDefs_RecordView ··· 737 854 // comment: Sticky comment on the subject. 738 855 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 739 856 // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject 740 - CreatedAt string `json:"createdAt" cborgen:"createdAt"` 741 - Id int64 `json:"id" cborgen:"id"` 857 + CreatedAt string `json:"createdAt" cborgen:"createdAt"` 858 + Hosting *ModerationDefs_SubjectStatusView_Hosting `json:"hosting,omitempty" cborgen:"hosting,omitempty"` 859 + Id int64 `json:"id" cborgen:"id"` 742 860 // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 743 861 LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 744 862 LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` ··· 755 873 Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 756 874 // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 757 875 UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 876 + } 877 + 878 + type ModerationDefs_SubjectStatusView_Hosting struct { 879 + ModerationDefs_AccountHosting *ModerationDefs_AccountHosting 880 + ModerationDefs_RecordHosting *ModerationDefs_RecordHosting 881 + } 882 + 883 + func (t *ModerationDefs_SubjectStatusView_Hosting) MarshalJSON() ([]byte, error) { 884 + if t.ModerationDefs_AccountHosting != nil { 885 + t.ModerationDefs_AccountHosting.LexiconTypeID = "tools.ozone.moderation.defs#accountHosting" 886 + return json.Marshal(t.ModerationDefs_AccountHosting) 887 + } 888 + if t.ModerationDefs_RecordHosting != nil { 889 + t.ModerationDefs_RecordHosting.LexiconTypeID = "tools.ozone.moderation.defs#recordHosting" 890 + return json.Marshal(t.ModerationDefs_RecordHosting) 891 + } 892 + return nil, fmt.Errorf("cannot marshal empty enum") 893 + } 894 + func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { 895 + typ, err := util.TypeExtract(b) 896 + if err != nil { 897 + return err 898 + } 899 + 900 + switch typ { 901 + case "tools.ozone.moderation.defs#accountHosting": 902 + t.ModerationDefs_AccountHosting = new(ModerationDefs_AccountHosting) 903 + return json.Unmarshal(b, t.ModerationDefs_AccountHosting) 904 + case "tools.ozone.moderation.defs#recordHosting": 905 + t.ModerationDefs_RecordHosting = new(ModerationDefs_RecordHosting) 906 + return json.Unmarshal(b, t.ModerationDefs_RecordHosting) 907 + 908 + default: 909 + return nil 910 + } 758 911 } 759 912 760 913 type ModerationDefs_SubjectStatusView_Subject struct {
+24
api/ozone/moderationemitEvent.go
··· 37 37 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 38 38 ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 39 39 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 40 + ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 41 + ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 42 + ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 40 43 } 41 44 42 45 func (t *ModerationEmitEvent_Input_Event) MarshalJSON() ([]byte, error) { ··· 96 99 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 97 100 return json.Marshal(t.ModerationDefs_ModEventTag) 98 101 } 102 + if t.ModerationDefs_AccountEvent != nil { 103 + t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 104 + return json.Marshal(t.ModerationDefs_AccountEvent) 105 + } 106 + if t.ModerationDefs_IdentityEvent != nil { 107 + t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 108 + return json.Marshal(t.ModerationDefs_IdentityEvent) 109 + } 110 + if t.ModerationDefs_RecordEvent != nil { 111 + t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 112 + return json.Marshal(t.ModerationDefs_RecordEvent) 113 + } 99 114 return nil, fmt.Errorf("cannot marshal empty enum") 100 115 } 101 116 func (t *ModerationEmitEvent_Input_Event) UnmarshalJSON(b []byte) error { ··· 147 162 case "tools.ozone.moderation.defs#modEventTag": 148 163 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 149 164 return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 165 + case "tools.ozone.moderation.defs#accountEvent": 166 + t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 167 + return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 168 + case "tools.ozone.moderation.defs#identityEvent": 169 + t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 170 + return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 171 + case "tools.ozone.moderation.defs#recordEvent": 172 + t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 173 + return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 150 174 151 175 default: 152 176 return nil
+3 -2
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 // 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 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 25 // createdAfter: Retrieve events created after a given timestamp 26 26 // createdBefore: Retrieve events created before a given timestamp 27 27 // hasComment: If true, only events with comments are returned ··· 31 31 // sortDirection: Sort direction for the events. Defaults to descending order of created at timestamp. 32 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 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 *xrpc.Client, addedLabels []string, addedTags []string, collections []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, subjectType string, types []string) (*ModerationQueryEvents_Output, error) { 34 + func ModerationQueryEvents(ctx context.Context, c *xrpc.Client, 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 35 var out ModerationQueryEvents_Output 36 36 37 37 params := map[string]interface{}{ ··· 46 46 "hasComment": hasComment, 47 47 "includeAllUserRecords": includeAllUserRecords, 48 48 "limit": limit, 49 + "policies": policies, 49 50 "removedLabels": removedLabels, 50 51 "removedTags": removedTags, 51 52 "reportTypes": reportTypes,
+17 -1
api/ozone/moderationqueryStatuses.go
··· 21 21 // appealed: Get subjects in unresolved appealed status 22 22 // collections: If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored. 23 23 // comment: Search subjects by keyword from comments 24 + // hostingDeletedAfter: Search subjects where the associated record/account was deleted after a given timestamp 25 + // hostingDeletedBefore: Search subjects where the associated record/account was deleted before a given timestamp 26 + // hostingStatuses: Search subjects by the status of the associated record/account 27 + // hostingUpdatedAfter: Search subjects where the associated record/account was updated after a given timestamp 28 + // hostingUpdatedBefore: Search subjects where the associated record/account was updated before a given timestamp 24 29 // includeAllUserRecords: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. 25 30 // includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 26 31 // lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 27 32 // onlyMuted: When set to true, only muted subjects and reporters will be returned. 33 + // queueCount: Number of queues being used by moderators. Subjects will be split among all queues. 34 + // queueIndex: Index of the queue to fetch subjects from. Works only when queueCount value is specified. 35 + // queueSeed: A seeder to shuffle/balance the queue items. 28 36 // reportedAfter: Search subjects reported after a given timestamp 29 37 // reportedBefore: Search subjects reported before a given timestamp 30 38 // reviewState: Specify when fetching subjects in a certain state ··· 33 41 // subject: The subject to get the status for. 34 42 // 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. 35 43 // takendown: Get subjects that were taken down 36 - func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, collections []string, comment string, cursor string, excludeTags []string, ignoreSubjects []string, includeAllUserRecords bool, includeMuted bool, lastReviewedBy string, limit int64, onlyMuted bool, 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) { 44 + func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, 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, 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) { 37 45 var out ModerationQueryStatuses_Output 38 46 39 47 params := map[string]interface{}{ ··· 42 50 "comment": comment, 43 51 "cursor": cursor, 44 52 "excludeTags": excludeTags, 53 + "hostingDeletedAfter": hostingDeletedAfter, 54 + "hostingDeletedBefore": hostingDeletedBefore, 55 + "hostingStatuses": hostingStatuses, 56 + "hostingUpdatedAfter": hostingUpdatedAfter, 57 + "hostingUpdatedBefore": hostingUpdatedBefore, 45 58 "ignoreSubjects": ignoreSubjects, 46 59 "includeAllUserRecords": includeAllUserRecords, 47 60 "includeMuted": includeMuted, 48 61 "lastReviewedBy": lastReviewedBy, 49 62 "limit": limit, 50 63 "onlyMuted": onlyMuted, 64 + "queueCount": queueCount, 65 + "queueIndex": queueIndex, 66 + "queueSeed": queueSeed, 51 67 "reportedAfter": reportedAfter, 52 68 "reportedBefore": reportedBefore, 53 69 "reviewState": reviewState,
+23
api/ozone/settingdefs.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.defs 6 + 7 + import ( 8 + "github.com/bluesky-social/indigo/lex/util" 9 + ) 10 + 11 + // SettingDefs_Option is a "option" in the tools.ozone.setting.defs schema. 12 + type SettingDefs_Option struct { 13 + CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 14 + CreatedBy string `json:"createdBy" cborgen:"createdBy"` 15 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 16 + Did string `json:"did" cborgen:"did"` 17 + Key string `json:"key" cborgen:"key"` 18 + LastUpdatedBy string `json:"lastUpdatedBy" cborgen:"lastUpdatedBy"` 19 + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` 20 + Scope string `json:"scope" cborgen:"scope"` 21 + UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 22 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 23 + }
+38
api/ozone/settinglistOptions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.listOptions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SettingListOptions_Output is the output of a tools.ozone.setting.listOptions call. 14 + type SettingListOptions_Output struct { 15 + Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 + Options []*SettingDefs_Option `json:"options" cborgen:"options"` 17 + } 18 + 19 + // SettingListOptions calls the XRPC method "tools.ozone.setting.listOptions". 20 + // 21 + // keys: Filter for only the specified keys. Ignored if prefix is provided 22 + // prefix: Filter keys by prefix 23 + func SettingListOptions(ctx context.Context, c *xrpc.Client, cursor string, keys []string, limit int64, prefix string, scope string) (*SettingListOptions_Output, error) { 24 + var out SettingListOptions_Output 25 + 26 + params := map[string]interface{}{ 27 + "cursor": cursor, 28 + "keys": keys, 29 + "limit": limit, 30 + "prefix": prefix, 31 + "scope": scope, 32 + } 33 + if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.setting.listOptions", params, nil, &out); err != nil { 34 + return nil, err 35 + } 36 + 37 + return &out, nil 38 + }
+31
api/ozone/settingremoveOptions.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.removeOptions 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/xrpc" 11 + ) 12 + 13 + // SettingRemoveOptions_Input is the input argument to a tools.ozone.setting.removeOptions call. 14 + type SettingRemoveOptions_Input struct { 15 + Keys []string `json:"keys" cborgen:"keys"` 16 + Scope string `json:"scope" cborgen:"scope"` 17 + } 18 + 19 + // SettingRemoveOptions_Output is the output of a tools.ozone.setting.removeOptions call. 20 + type SettingRemoveOptions_Output struct { 21 + } 22 + 23 + // SettingRemoveOptions calls the XRPC method "tools.ozone.setting.removeOptions". 24 + func SettingRemoveOptions(ctx context.Context, c *xrpc.Client, input *SettingRemoveOptions_Input) (*SettingRemoveOptions_Output, error) { 25 + var out SettingRemoveOptions_Output 26 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.setting.removeOptions", nil, input, &out); err != nil { 27 + return nil, err 28 + } 29 + 30 + return &out, nil 31 + }
+36
api/ozone/settingupsertOption.go
··· 1 + // Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 + 3 + package ozone 4 + 5 + // schema: tools.ozone.setting.upsertOption 6 + 7 + import ( 8 + "context" 9 + 10 + "github.com/bluesky-social/indigo/lex/util" 11 + "github.com/bluesky-social/indigo/xrpc" 12 + ) 13 + 14 + // SettingUpsertOption_Input is the input argument to a tools.ozone.setting.upsertOption call. 15 + type SettingUpsertOption_Input struct { 16 + Description *string `json:"description,omitempty" cborgen:"description,omitempty"` 17 + Key string `json:"key" cborgen:"key"` 18 + ManagerRole *string `json:"managerRole,omitempty" cborgen:"managerRole,omitempty"` 19 + Scope string `json:"scope" cborgen:"scope"` 20 + Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 21 + } 22 + 23 + // SettingUpsertOption_Output is the output of a tools.ozone.setting.upsertOption call. 24 + type SettingUpsertOption_Output struct { 25 + Option *SettingDefs_Option `json:"option" cborgen:"option"` 26 + } 27 + 28 + // SettingUpsertOption calls the XRPC method "tools.ozone.setting.upsertOption". 29 + func SettingUpsertOption(ctx context.Context, c *xrpc.Client, input *SettingUpsertOption_Input) (*SettingUpsertOption_Output, error) { 30 + var out SettingUpsertOption_Output 31 + if err := c.Do(ctx, xrpc.Procedure, "application/json", "tools.ozone.setting.upsertOption", nil, input, &out); err != nil { 32 + return nil, err 33 + } 34 + 35 + return &out, nil 36 + }