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

package tangled

// schema: org.tangled.temp.repo.toggleWebhook

import (
	"context"

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

const (
	TempRepoToggleWebhookNSID = "org.tangled.temp.repo.toggleWebhook"
)

// TempRepoToggleWebhook_Input is the input argument to a org.tangled.temp.repo.toggleWebhook call.
type TempRepoToggleWebhook_Input struct {
	// id: Webhook ID to toggle.
	Id int64 `json:"id" cborgen:"id"`
	// repoDid: DID of the repository as minted by the knot.
	RepoDid string `json:"repoDid" cborgen:"repoDid"`
}

// TempRepoToggleWebhook_Output is the output of a org.tangled.temp.repo.toggleWebhook call.
type TempRepoToggleWebhook_Output struct {
	// active: New active state of the webhook.
	Active bool `json:"active" cborgen:"active"`
}

// TempRepoToggleWebhook calls the XRPC method "org.tangled.temp.repo.toggleWebhook".
func TempRepoToggleWebhook(ctx context.Context, c util.LexClient, input *TempRepoToggleWebhook_Input) (*TempRepoToggleWebhook_Output, error) {
	var out TempRepoToggleWebhook_Output
	if err := c.LexDo(ctx, util.Procedure, "application/json", "org.tangled.temp.repo.toggleWebhook", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
