fork of indigo with slightly nicer lexgen
at main 7.1 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/lex/util" 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// 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 25// hostingDeletedAfter: Search subjects where the associated record/account was deleted after a given timestamp 26// hostingDeletedBefore: Search subjects where the associated record/account was deleted before a given timestamp 27// hostingStatuses: Search subjects by the status of the associated record/account 28// hostingUpdatedAfter: Search subjects where the associated record/account was updated after a given timestamp 29// hostingUpdatedBefore: Search subjects where the associated record/account was updated before a given timestamp 30// includeAllUserRecords: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned. 31// includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them. 32// lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator 33// minAccountSuspendCount: If specified, only subjects that belong to an account that has at least this many suspensions will be returned. 34// minPriorityScore: If specified, only subjects that have priority score value above the given value will be returned. 35// minReportedRecordsCount: If specified, only subjects that belong to an account that has at least this many reported records will be returned. 36// minTakendownRecordsCount: If specified, only subjects that belong to an account that has at least this many taken down records will be returned. 37// onlyMuted: When set to true, only muted subjects and reporters will be returned. 38// queueCount: Number of queues being used by moderators. Subjects will be split among all queues. 39// queueIndex: Index of the queue to fetch subjects from. Works only when queueCount value is specified. 40// queueSeed: A seeder to shuffle/balance the queue items. 41// reportedAfter: Search subjects reported after a given timestamp 42// reportedBefore: Search subjects reported before a given timestamp 43// reviewState: Specify when fetching subjects in a certain state 44// reviewedAfter: Search subjects reviewed after a given timestamp 45// reviewedBefore: Search subjects reviewed before a given timestamp 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 49func 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 } 59 if len(collections) != 0 { 60 params["collections"] = collections 61 } 62 if comment != "" { 63 params["comment"] = comment 64 } 65 if cursor != "" { 66 params["cursor"] = cursor 67 } 68 if len(excludeTags) != 0 { 69 params["excludeTags"] = excludeTags 70 } 71 if hostingDeletedAfter != "" { 72 params["hostingDeletedAfter"] = hostingDeletedAfter 73 } 74 if hostingDeletedBefore != "" { 75 params["hostingDeletedBefore"] = hostingDeletedBefore 76 } 77 if len(hostingStatuses) != 0 { 78 params["hostingStatuses"] = hostingStatuses 79 } 80 if hostingUpdatedAfter != "" { 81 params["hostingUpdatedAfter"] = hostingUpdatedAfter 82 } 83 if hostingUpdatedBefore != "" { 84 params["hostingUpdatedBefore"] = hostingUpdatedBefore 85 } 86 if len(ignoreSubjects) != 0 { 87 params["ignoreSubjects"] = ignoreSubjects 88 } 89 if includeAllUserRecords { 90 params["includeAllUserRecords"] = includeAllUserRecords 91 } 92 if includeMuted { 93 params["includeMuted"] = includeMuted 94 } 95 if lastReviewedBy != "" { 96 params["lastReviewedBy"] = lastReviewedBy 97 } 98 if limit != 0 { 99 params["limit"] = limit 100 } 101 if minAccountSuspendCount != 0 { 102 params["minAccountSuspendCount"] = minAccountSuspendCount 103 } 104 if minPriorityScore != 0 { 105 params["minPriorityScore"] = minPriorityScore 106 } 107 if minReportedRecordsCount != 0 { 108 params["minReportedRecordsCount"] = minReportedRecordsCount 109 } 110 if minTakendownRecordsCount != 0 { 111 params["minTakendownRecordsCount"] = minTakendownRecordsCount 112 } 113 if onlyMuted { 114 params["onlyMuted"] = onlyMuted 115 } 116 if queueCount != 0 { 117 params["queueCount"] = queueCount 118 } 119 if queueIndex != 0 { 120 params["queueIndex"] = queueIndex 121 } 122 if queueSeed != "" { 123 params["queueSeed"] = queueSeed 124 } 125 if reportedAfter != "" { 126 params["reportedAfter"] = reportedAfter 127 } 128 if reportedBefore != "" { 129 params["reportedBefore"] = reportedBefore 130 } 131 if reviewState != "" { 132 params["reviewState"] = reviewState 133 } 134 if reviewedAfter != "" { 135 params["reviewedAfter"] = reviewedAfter 136 } 137 if reviewedBefore != "" { 138 params["reviewedBefore"] = reviewedBefore 139 } 140 if sortDirection != "" { 141 params["sortDirection"] = sortDirection 142 } 143 if sortField != "" { 144 params["sortField"] = sortField 145 } 146 if subject != "" { 147 params["subject"] = subject 148 } 149 if subjectType != "" { 150 params["subjectType"] = subjectType 151 } 152 if len(tags) != 0 { 153 params["tags"] = tags 154 } 155 if takendown { 156 params["takendown"] = takendown 157 } 158 if err := c.LexDo(ctx, util.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil { 159 return nil, err 160 } 161 162 return &out, nil 163}