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

package bsky

// schema: app.bsky.graph.getStarterPacksWithMembership

import (
	"context"

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

// GraphGetStarterPacksWithMembership_Output is the output of a app.bsky.graph.getStarterPacksWithMembership call.
type GraphGetStarterPacksWithMembership_Output struct {
	Cursor                     *string                                                         `json:"cursor,omitempty" cborgen:"cursor,omitempty"`
	StarterPacksWithMembership []*GraphGetStarterPacksWithMembership_StarterPackWithMembership `json:"starterPacksWithMembership" cborgen:"starterPacksWithMembership"`
}

// GraphGetStarterPacksWithMembership_StarterPackWithMembership is a "starterPackWithMembership" in the app.bsky.graph.getStarterPacksWithMembership schema.
//
// A starter pack and an optional list item indicating membership of a target user to that starter pack.
type GraphGetStarterPacksWithMembership_StarterPackWithMembership struct {
	ListItem    *GraphDefs_ListItemView    `json:"listItem,omitempty" cborgen:"listItem,omitempty"`
	StarterPack *GraphDefs_StarterPackView `json:"starterPack" cborgen:"starterPack"`
}

// GraphGetStarterPacksWithMembership calls the XRPC method "app.bsky.graph.getStarterPacksWithMembership".
//
// actor: The account (actor) to check for membership.
func GraphGetStarterPacksWithMembership(ctx context.Context, c util.LexClient, actor string, cursor string, limit int64) (*GraphGetStarterPacksWithMembership_Output, error) {
	var out GraphGetStarterPacksWithMembership_Output

	params := map[string]interface{}{}
	params["actor"] = actor
	if cursor != "" {
		params["cursor"] = cursor
	}
	if limit != 0 {
		params["limit"] = limit
	}
	if err := c.LexDo(ctx, util.Query, "", "app.bsky.graph.getStarterPacksWithMembership", params, nil, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
