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

package ozone

// schema: tools.ozone.signature.findRelatedAccounts

import (
	"context"

	comatprototypes "github.com/bluesky-social/indigo/api/atproto"
	"github.com/bluesky-social/indigo/xrpc"
)

// SignatureFindRelatedAccounts_Output is the output of a tools.ozone.signature.findRelatedAccounts call.
type SignatureFindRelatedAccounts_Output struct {
	Accounts []*SignatureFindRelatedAccounts_RelatedAccount `json:"accounts" cborgen:"accounts"`
	Cursor   *string                                        `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
}

// SignatureFindRelatedAccounts_RelatedAccount is a "relatedAccount" in the tools.ozone.signature.findRelatedAccounts schema.
type SignatureFindRelatedAccounts_RelatedAccount struct {
	Account      *comatprototypes.AdminDefs_AccountView `json:"account" cborgen:"account"`
	Similarities []*SignatureDefs_SigDetail             `json:"similarities,omitempty" cborgen:"similarities,omitempty"`
}

// SignatureFindRelatedAccounts calls the XRPC method "tools.ozone.signature.findRelatedAccounts".
func SignatureFindRelatedAccounts(ctx context.Context, c *xrpc.Client, cursor string, did string, limit int64) (*SignatureFindRelatedAccounts_Output, error) {
	var out SignatureFindRelatedAccounts_Output

	params := map[string]interface{}{
		"cursor": cursor,
		"did":    did,
		"limit":  limit,
	}
	if err := c.Do(ctx, xrpc.Query, "", "tools.ozone.signature.findRelatedAccounts", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
