diff --git a/api/tangled/tempformatPatch.go b/api/tangled/tempformatPatch.go new file mode 100644 index 00000000..e7d40361 --- /dev/null +++ b/api/tangled/tempformatPatch.go @@ -0,0 +1,33 @@ +// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. + +package tangled + +// schema: sh.tangled.git.temp.formatPatch + +import ( + "bytes" + "context" + + "github.com/bluesky-social/indigo/lex/util" +) + +const ( + GitTempFormatPatchNSID = "sh.tangled.git.temp.formatPatch" +) + +// GitTempFormatPatch calls the XRPC method "sh.tangled.git.temp.formatPatch". +// +// repo: DID of the repository +func GitTempFormatPatch(ctx context.Context, c util.LexClient, from string, repo string, to string) ([]byte, error) { + buf := new(bytes.Buffer) + + params := map[string]interface{}{} + params["from"] = from + params["repo"] = repo + params["to"] = to + if err := c.LexDo(ctx, util.Query, "", "sh.tangled.git.temp.formatPatch", params, nil, buf); err != nil { + return nil, err + } + + return buf.Bytes(), nil +} diff --git a/lexicons/git/temp/formatPatch.json b/lexicons/git/temp/formatPatch.json new file mode 100644 index 00000000..8d3d1a14 --- /dev/null +++ b/lexicons/git/temp/formatPatch.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "sh.tangled.git.temp.formatPatch", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": ["repo", "from", "to"], + "properties": { + "repo": { + "type": "string", + "format": "did", + "description": "DID of the repository" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + } + }, + "output": { + "encoding": "*/*" + }, + "errors": [ + { + "name": "RepoNotFound", + "description": "Repository not found or access denied" + }, + { + "name": "RevisionNotFound", + "description": "One or both revisions not found" + }, + { + "name": "InvalidRequest", + "description": "Invalid request parameters" + } + ] + } + } +}