// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package ozone

// schema: tools.ozone.moderation.queryStatuses

import (
	"context"

	"github.com/bluesky-social/indigo/xrpc"
)

// ModerationQueryStatuses_Output is the output of a tools.ozone.moderation.queryStatuses call.
type ModerationQueryStatuses_Output struct {
	Cursor          *string                             `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	SubjectStatuses []*ModerationDefs_SubjectStatusView `json:"subjectStatuses" cborgen:"subjectStatuses"`
}

// ModerationQueryStatuses calls the XRPC method "tools.ozone.moderation.queryStatuses".
//
// appealed: Get subjects in unresolved appealed status
// comment: Search subjects by keyword from comments
// includeAllUserRecords: All subjects belonging to the account specified in the 'subject' param will be returned.
// includeMuted: By default, we don't include muted subjects in the results. Set this to true to include them.
// lastReviewedBy: Get all subject statuses that were reviewed by a specific moderator
// onlyMuted: When set to true, only muted subjects and reporters will be returned.
// reportedAfter: Search subjects reported after a given timestamp
// reportedBefore: Search subjects reported before a given timestamp
// reviewState: Specify when fetching subjects in a certain state
// reviewedAfter: Search subjects reviewed after a given timestamp
// reviewedBefore: Search subjects reviewed before a given timestamp
// subject: The subject to get the status for.
// takendown: Get subjects that were taken down
func ModerationQueryStatuses(ctx context.Context, c *xrpc.Client, appealed bool, 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, tags []string, takendown bool) (*ModerationQueryStatuses_Output, error) {
	var out ModerationQueryStatuses_Output

	params := map[string]interface{}{
		"appealed":              appealed,
		"comment":               comment,
		"cursor":                cursor,
		"excludeTags":           excludeTags,
		"ignoreSubjects":        ignoreSubjects,
		"includeAllUserRecords": includeAllUserRecords,
		"includeMuted":          includeMuted,
		"lastReviewedBy":        lastReviewedBy,
		"limit":                 limit,
		"onlyMuted":             onlyMuted,
		"reportedAfter":         reportedAfter,
		"reportedBefore":        reportedBefore,
		"reviewState":           reviewState,
		"reviewedAfter":         reviewedAfter,
		"reviewedBefore":        reviewedBefore,
		"sortDirection":         sortDirection,
		"sortField":             sortField,
		"subject":               subject,
		"tags":                  tags,
		"takendown":             takendown,
	}
	if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.moderation.queryStatuses", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
