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

package chat

// schema: chat.bsky.convo.listConvos

import (
	"context"

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

// ConvoListConvos_Output is the output of a chat.bsky.convo.listConvos call.
type ConvoListConvos_Output struct {
	Convos []*ConvoDefs_ConvoView `json:"convos" cborgen:"convos"`
	Cursor *string                `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
}

// ConvoListConvos calls the XRPC method "chat.bsky.convo.listConvos".
func ConvoListConvos(ctx context.Context, c *xrpc.Client, cursor string, limit int64) (*ConvoListConvos_Output, error) {
	var out ConvoListConvos_Output

	params := map[string]interface{}{
		"cursor": cursor,
		"limit":  limit,
	}
	if err := c.Do(ctx, xrpc.Query, "", "chat.bsky.convo.listConvos", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
