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

package tangled

// schema: org.tangled.temp.account.listEmails

import (
	"context"

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

const (
	TempAccountListEmailsNSID = "org.tangled.temp.account.listEmails"
)

// TempAccountListEmails_Email is a "email" in the org.tangled.temp.account.listEmails schema.
type TempAccountListEmails_Email struct {
	// address: Email address.
	Address   string `json:"address" cborgen:"address"`
	CreatedAt string `json:"createdAt" cborgen:"createdAt"`
	// primary: Whether this is the primary email address.
	Primary bool `json:"primary" cborgen:"primary"`
	// verified: Whether the address has been verified.
	Verified bool `json:"verified" cborgen:"verified"`
}

// TempAccountListEmails_Output is the output of a org.tangled.temp.account.listEmails call.
type TempAccountListEmails_Output struct {
	Emails []*TempAccountListEmails_Email `json:"emails" cborgen:"emails"`
}

// TempAccountListEmails calls the XRPC method "org.tangled.temp.account.listEmails".
func TempAccountListEmails(ctx context.Context, c util.LexClient) (*TempAccountListEmails_Output, error) {
	var out TempAccountListEmails_Output
	if err := c.LexDo(ctx, util.Query, "", "org.tangled.temp.account.listEmails", nil, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
