A fork of https://github.com/teal-fm/piper
at main 92 lines 6.0 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package ozone 4 5// schema: tools.ozone.moderation.queryStatuses 6 7import ( 8 "context" 9 10 "github.com/bluesky-social/indigo/xrpc" 11) 12 13// ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call. 14type ModerationQueryStatuses_Output struct { 15 Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"` 16 SubjectStatuses []*ModerationDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"` 17} 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 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 29// includeAllUserRecords: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. 30// includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 31// lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 32// minAccountSuspendCount: If specified, only subjects that belong to an account that has at least this many suspensions will be returned. 33// minPriorityScore: If specified, only subjects that have priority score value above the given value will be returned. 34// minReportedRecordsCount: If specified, only subjects that belong to an account that has at least this many reported records will be returned. 35// minTakendownRecordsCount: If specified, only subjects that belong to an account that has at least this many taken down records will be returned. 36// onlyMuted: When set to true, only muted subjects and reporters will be returned. 37// queueCount: Number of queues being used by moderators. Subjects will be split among all queues. 38// queueIndex: Index of the queue to fetch subjects from. Works only when queueCount value is specified. 39// queueSeed: A seeder to shuffle/balance the queue items. 40// reportedAfter: Search subjects reported after a given timestamp 41// reportedBefore: Search subjects reported before a given timestamp 42// reviewState: Specify when fetching subjects in a certain state 43// reviewedAfter: Search subjects reviewed after a given timestamp 44// reviewedBefore: Search subjects reviewed before a given timestamp 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 48func 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, 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 "appealed": appealed, 53 "collections": collections, 54 "comment": comment, 55 "cursor": cursor, 56 "excludeTags": excludeTags, 57 "hostingDeletedAfter": hostingDeletedAfter, 58 "hostingDeletedBefore": hostingDeletedBefore, 59 "hostingStatuses": hostingStatuses, 60 "hostingUpdatedAfter": hostingUpdatedAfter, 61 "hostingUpdatedBefore": hostingUpdatedBefore, 62 "ignoreSubjects": ignoreSubjects, 63 "includeAllUserRecords": includeAllUserRecords, 64 "includeMuted": includeMuted, 65 "lastReviewedBy": lastReviewedBy, 66 "limit": limit, 67 "minAccountSuspendCount": minAccountSuspendCount, 68 "minPriorityScore": minPriorityScore, 69 "minReportedRecordsCount": minReportedRecordsCount, 70 "minTakendownRecordsCount": minTakendownRecordsCount, 71 "onlyMuted": onlyMuted, 72 "queueCount": queueCount, 73 "queueIndex": queueIndex, 74 "queueSeed": queueSeed, 75 "reportedAfter": reportedAfter, 76 "reportedBefore": reportedBefore, 77 "reviewState": reviewState, 78 "reviewedAfter": reviewedAfter, 79 "reviewedBefore": reviewedBefore, 80 "sortDirection": sortDirection, 81 "sortField": sortField, 82 "subject": subject, 83 "subjectType": subjectType, 84 "tags": tags, 85 "takendown": takendown, 86 } 87 if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { 88 return nil, err 89 } 90 91 return &out, nil 92}