Monorepo for Tangled
tangled.org
1{
2 "lexicon": 1,
3 "id": "sh.tangled.repo.listPulls",
4 "defs": {
5 "main": {
6 "type": "query",
7 "parameters": {
8 "type": "params",
9 "required": ["subject"],
10 "properties": {
11 "subject": {
12 "type": "string",
13 "format": "did",
14 "description": "Repo DID to list pulls for"
15 },
16 "author": {
17 "type": "string",
18 "format": "did",
19 "description": "Restrict to pulls authored by this user DID."
20 },
21 "status": {
22 "type": "string",
23 "knownValues": ["open", "closed", "merged"],
24 "description": "Restrict to pulls whose latest derived status matches."
25 },
26 "cursor": {
27 "type": "string",
28 "description": "Pagination cursor"
29 },
30 "limit": {
31 "type": "integer",
32 "minimum": 1,
33 "maximum": 1000,
34 "default": 50
35 },
36 "order": {
37 "type": "string",
38 "knownValues": ["asc", "desc"],
39 "default": "desc",
40 "description": "Sort direction by createdAt."
41 }
42 }
43 },
44 "output": {
45 "encoding": "application/json",
46 "schema": {
47 "type": "object",
48 "required": ["items"],
49 "properties": {
50 "items": {
51 "type": "array",
52 "items": {
53 "type": "ref",
54 "ref": "#pullListItem"
55 }
56 },
57 "cursor": {
58 "type": "string"
59 }
60 }
61 }
62 }
63 },
64 "pullListItem": {
65 "type": "object",
66 "required": ["uri", "value", "state", "commentCount"],
67 "properties": {
68 "uri": {
69 "type": "string",
70 "format": "at-uri"
71 },
72 "cid": {
73 "type": "string",
74 "format": "cid"
75 },
76 "value": {
77 "type": "unknown",
78 "description": "Embedded sh.tangled.repo.pull record"
79 },
80 "state": {
81 "type": "string",
82 "knownValues": ["open", "closed", "merged"],
83 "description": "Latest derived state."
84 },
85 "stateUpdatedAt": {
86 "type": "string",
87 "format": "datetime",
88 "description": "TID-derived timestamp of the latest pull status record."
89 },
90 "commentCount": {
91 "type": "integer",
92 "minimum": 0,
93 "description": "Count of sh.tangled.repo.pull.comment records targeting this pull."
94 }
95 }
96 }
97 }
98}