// 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/xrpc"
)

// 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 *xrpc.Client, actor string) (*ModerationGetActorMetadata_Output, error) {
	var out ModerationGetActorMetadata_Output

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

	return &out, nil
}
