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

package tangled

// schema: sh.tangled.repo.getPulls

import (
	"context"

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

const (
	RepoGetPullsNSID = "sh.tangled.repo.getPulls"
)

// RepoGetPulls_Output is the output of a sh.tangled.repo.getPulls call.
type RepoGetPulls_Output struct {
	Items []*RepoGetPulls_RecordView `json:"items" cborgen:"items"`
}

// RepoGetPulls_RecordView is a "recordView" in the sh.tangled.repo.getPulls schema.
type RepoGetPulls_RecordView struct {
	Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"`
	Uri string  `json:"uri" cborgen:"uri"`
	// value: Embedded sh.tangled.repo.pull record.
	Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"`
}

// RepoGetPulls calls the XRPC method "sh.tangled.repo.getPulls".
//
// pulls: AT-URIs of the sh.tangled.repo.pull records to fetch. At most 50 per request.
func RepoGetPulls(ctx context.Context, c util.LexClient, pulls []string) (*RepoGetPulls_Output, error) {
	var out RepoGetPulls_Output

	params := map[string]interface{}{}
	params["pulls"] = pulls
	if err := c.LexDo(ctx, util.Query, "", "sh.tangled.repo.getPulls", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
