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

package ozone

// schema: tools.ozone.verification.revokeVerifications

import (
	"context"

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

// VerificationRevokeVerifications_Input is the input argument to a tools.ozone.verification.revokeVerifications call.
type VerificationRevokeVerifications_Input struct {
	// revokeReason: Reason for revoking the verification. This is optional and can be omitted if not needed.
	RevokeReason *string `json:"revokeReason,omitempty" cborgen:"revokeReason,omitempty"`
	// uris: Array of verification record uris to revoke
	Uris []string `json:"uris" cborgen:"uris"`
}

// VerificationRevokeVerifications_Output is the output of a tools.ozone.verification.revokeVerifications call.
type VerificationRevokeVerifications_Output struct {
	// failedRevocations: List of verification uris that couldn't be revoked, including failure reasons
	FailedRevocations []*VerificationRevokeVerifications_RevokeError `json:"failedRevocations" cborgen:"failedRevocations"`
	// revokedVerifications: List of verification uris successfully revoked
	RevokedVerifications []string `json:"revokedVerifications" cborgen:"revokedVerifications"`
}

// VerificationRevokeVerifications_RevokeError is a "revokeError" in the tools.ozone.verification.revokeVerifications schema.
//
// Error object for failed revocations
type VerificationRevokeVerifications_RevokeError struct {
	// error: Description of the error that occurred during revocation.
	Error string `json:"error" cborgen:"error"`
	// uri: The AT-URI of the verification record that failed to revoke.
	Uri string `json:"uri" cborgen:"uri"`
}

// VerificationRevokeVerifications calls the XRPC method "tools.ozone.verification.revokeVerifications".
func VerificationRevokeVerifications(ctx context.Context, c util.LexClient, input *VerificationRevokeVerifications_Input) (*VerificationRevokeVerifications_Output, error) {
	var out VerificationRevokeVerifications_Output
	if err := c.LexDo(ctx, util.Procedure, "application/json", "tools.ozone.verification.revokeVerifications", nil, input, &out); err != nil {
		return nil, err
	}

	return &out, nil
}
