// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. package tangled // schema: sh.tangled.bobbin.awaitRecord import ( "context" "github.com/bluesky-social/indigo/lex/util" ) const ( BobbinAwaitRecordNSID = "sh.tangled.bobbin.awaitRecord" ) // BobbinAwaitRecord_Output is the output of a sh.tangled.bobbin.awaitRecord call. type BobbinAwaitRecord_Output struct { // cid: CID of the revision this result is about. Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` // detail: Opaque error message which can be more detailed than the reason. Detail *string `json:"detail,omitempty" cborgen:"detail,omitempty"` // reason: Why a rejected record will not appear. Reason *string `json:"reason,omitempty" cborgen:"reason,omitempty"` // status: What bobbin did with the record. Status string `json:"status" cborgen:"status"` } // BobbinAwaitRecord calls the XRPC method "sh.tangled.bobbin.awaitRecord". // // cid: CID of the revision that was written, as returned by createRecord, putRecord or applyWrites. Omit it only when awaiting a delete, which has no CID. any other responds with whatever revision of the record settles first. // uri: AT-URI of the record that was written. func BobbinAwaitRecord(ctx context.Context, c util.LexClient, cid string, uri string) (*BobbinAwaitRecord_Output, error) { var out BobbinAwaitRecord_Output params := map[string]interface{}{} if cid != "" { params["cid"] = cid } params["uri"] = uri if err := c.LexDo(ctx, util.Query, "", "sh.tangled.bobbin.awaitRecord", params, nil, &out); err != nil { return nil, err } return &out, nil }