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

package ozone

// schema: tools.ozone.safelink.queryEvents

import (
	"context"

	"github.com/bluesky-social/indigo/lex/util"
)

// SafelinkQueryEvents_Input is the input argument to a tools.ozone.safelink.queryEvents call.
type SafelinkQueryEvents_Input struct {
	// cursor: Cursor for pagination
	Cursor *string `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	// limit: Maximum number of results to return
	Limit *int64 `json:"limit,omitempty" cborgen:"limit,omitempty"`
	// patternType: Filter by pattern type
	PatternType *string `json:"patternType,omitempty" cborgen:"patternType,omitempty"`
	// sortDirection: Sort direction
	SortDirection *string `json:"sortDirection,omitempty" cborgen:"sortDirection,omitempty"`
	// urls: Filter by specific URLs or domains
	Urls []string `json:"urls,omitempty" cborgen:"urls,omitempty"`
}

// SafelinkQueryEvents_Output is the output of a tools.ozone.safelink.queryEvents call.
type SafelinkQueryEvents_Output struct {
	// cursor: Next cursor for pagination. Only present if there are more results.
	Cursor *string               `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	Events []*SafelinkDefs_Event `json:"events" cborgen:"events"`
}

// SafelinkQueryEvents calls the XRPC method "tools.ozone.safelink.queryEvents".
func SafelinkQueryEvents(ctx context.Context, c util.LexClient, input *SafelinkQueryEvents_Input) (*SafelinkQueryEvents_Output, error) {
	var out SafelinkQueryEvents_Output
	if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.safelink.queryEvents", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
