package tangled // schema: sh.tangled.repo.unrecordChanges import ( "context" "github.com/bluesky-social/indigo/lex/util" ) const ( RepoUnrecordChangesNSID = "sh.tangled.repo.unrecordChanges" ) // RepoUnrecordChanges_Input is the input argument to a sh.tangled.repo.unrecordChanges call. type RepoUnrecordChanges_Input struct { // changes: List of change hashes to unrecord Changes []string `json:"changes" cborgen:"changes"` // channel: Target channel to unrecord changes from (optional) Channel string `json:"channel,omitempty" cborgen:"channel,omitempty"` // repo: Repository identifier in format 'did:plc:.../repoName' Repo string `json:"repo" cborgen:"repo"` } // RepoUnrecordChanges_Output is the output of a sh.tangled.repo.unrecordChanges call. type RepoUnrecordChanges_Output struct { // unrecorded: List of successfully unrecorded change hashes Unrecorded []string `json:"unrecorded" cborgen:"unrecorded"` // failed: List of changes that failed to unrecord Failed []*RepoUnrecordChanges_Output_Failed_Elem `json:"failed,omitempty" cborgen:"failed,omitempty"` } type RepoUnrecordChanges_Output_Failed_Elem struct { Error string `json:"error" cborgen:"error"` Hash string `json:"hash" cborgen:"hash"` } // RepoUnrecordChanges calls the XRPC method "sh.tangled.repo.unrecordChanges". func RepoUnrecordChanges(ctx context.Context, c util.LexClient, input *RepoUnrecordChanges_Input) (*RepoUnrecordChanges_Output, error) { var out RepoUnrecordChanges_Output if err := c.LexDo(ctx, util.Procedure, "application/json", "sh.tangled.repo.unrecordChanges", nil, input, &out); err != nil { return nil, err } return &out, nil }