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

package chat

// schema: chat.bsky.moderation.getActorMetadata

import (
	"context"

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

// ModerationGetActorMetadata_Metadata is a "metadata" in the chat.bsky.moderation.getActorMetadata schema.
type ModerationGetActorMetadata_Metadata struct {
	Convos           int64 `json:"convos" cborgen:"convos"`
	ConvosStarted    int64 `json:"convosStarted" cborgen:"convosStarted"`
	MessagesReceived int64 `json:"messagesReceived" cborgen:"messagesReceived"`
	MessagesSent     int64 `json:"messagesSent" cborgen:"messagesSent"`
}

// ModerationGetActorMetadata_Output is the output of a chat.bsky.moderation.getActorMetadata call.
type ModerationGetActorMetadata_Output struct {
	All   *ModerationGetActorMetadata_Metadata `json:"all" cborgen:"all"`
	Day   *ModerationGetActorMetadata_Metadata `json:"day" cborgen:"day"`
	Month *ModerationGetActorMetadata_Metadata `json:"month" cborgen:"month"`
}

// ModerationGetActorMetadata calls the XRPC method "chat.bsky.moderation.getActorMetadata".
func ModerationGetActorMetadata(ctx context.Context, c util.LexClient, actor string) (*ModerationGetActorMetadata_Output, error) {
	var out ModerationGetActorMetadata_Output

	params := map[string]interface{}{}
	params["actor"] = actor
	if err := c.LexDo(ctx, util.Query, "", "chat.bsky.moderation.getActorMetadata", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
