Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

web/api: add bobbin / knot xrpc client

Signed-off-by: dawn <dawn@tangled.org>

dawn (Jul 13, 2026, 3:58 PM +0300) c04bcc18 d3bc3874

+9411
+2
web/.prettierignore
··· 5 5 bun.lockb 6 6 7 7 /static/ 8 + 9 + /src/lib/api/lexicons/
+1
web/eslint.config.js
··· 9 9 const gitignorePath = path.resolve(import.meta.dirname, '.gitignore'); 10 10 11 11 export default defineConfig( 12 + { ignores: ['src/lib/api/lexicons/'] }, 12 13 includeIgnoreFile(gitignorePath), 13 14 js.configs.recommended, 14 15 ts.configs.recommended,
+30
web/lex.config.ts
··· 1 + import { defineLexiconConfig } from '@atcute/lex-cli'; 2 + 3 + // generate sh.tangled types; resolve com.atproto refs from @atcute/atproto. 4 + export default defineLexiconConfig({ 5 + formatter: { type: 'prettier' }, 6 + generate: { 7 + outdir: 'src/lib/api/lexicons/', 8 + clean: true, 9 + imports: ['@atcute/atproto'], 10 + files: [ 11 + '../lexicons/*.json', 12 + '../lexicons/actor/**/*.json', 13 + '../lexicons/ci/**/*.json', 14 + '../lexicons/feed/**/*.json', 15 + '../lexicons/git/**/*.json', 16 + '../lexicons/graph/**/*.json', 17 + '../lexicons/issue/**/*.json', 18 + '../lexicons/knot/**/*.json', 19 + '../lexicons/label/**/*.json', 20 + '../lexicons/markup/**/*.json', 21 + '../lexicons/pipeline/**/*.json', 22 + '../lexicons/pulls/**/*.json', 23 + '../lexicons/repo/**/*.json', 24 + '../lexicons/spindle/**/*.json', 25 + '../lexicons/string/**/*.json', 26 + '../lexicons/sync/**/*.json', 27 + '../bobbin/crates/types/lexicons/**/*.json' 28 + ] 29 + } 30 + });
+2
web/package.json
··· 10 10 "preview": "vite preview --host 0.0.0.0", 11 11 "start": "node build", 12 12 "prepare": "svelte-kit sync || echo ''", 13 + "codegen": "lex-cli generate", 13 14 "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 14 15 "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 15 16 "lint": "prettier --check . && eslint .", ··· 20 21 "test:e2e": "playwright test" 21 22 }, 22 23 "devDependencies": { 24 + "@atcute/lex-cli": "3.2.1", 23 25 "@eslint/js": "^10.0.1", 24 26 "@iconify-json/lucide": "^1.2.116", 25 27 "@playwright/test": "^1.60.0",
+168
web/pnpm-lock.yaml
··· 30 30 specifier: ^3.2.2 31 31 version: 3.2.2(tailwind-merge@3.6.0)(tailwindcss@4.3.2) 32 32 devDependencies: 33 + '@atcute/lex-cli': 34 + specifier: 3.2.1 35 + version: 3.2.1(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(prettier@3.9.4)(typescript@6.0.3) 33 36 '@eslint/js': 34 37 specifier: ^10.0.1 35 38 version: 10.0.1(eslint@10.6.0(jiti@2.7.0)) ··· 110 113 peerDependencies: 111 114 '@atcute/lexicons': ^2.0.0 112 115 116 + '@atcute/car@6.0.2': 117 + resolution: {integrity: sha512-6AaLjO0zrFD8R/aK7jwrqHEmLzfVilu/5pv4LAcUjxIYfBrw+nThV2FVLPtA4Jt59tIhjp5tQDP+9sx1eqQp+A==} 118 + peerDependencies: 119 + '@atcute/cbor': ^2.0.0 120 + '@atcute/cid': ^2.0.0 121 + 122 + '@atcute/cbor@2.3.5': 123 + resolution: {integrity: sha512-NvgeibMqtfeD6/4NMTnBwhjyB/F945UdnzeZMEsGb2eXSalOBzutgNmpnBPTj5FiN6Sl9VYhE3qDQfyox+P8aw==} 124 + peerDependencies: 125 + '@atcute/cid': ^2.0.0 126 + 127 + '@atcute/cid@2.4.2': 128 + resolution: {integrity: sha512-Uy48yfyo/hPQXF+XMXWIGomF6v8IvX5ErjozXMV7rlfU3EV7PSVX3J7plJXV6MRC3iI1z3PgTZTS7V0drCQVVw==} 129 + 113 130 '@atcute/client@5.1.1': 114 131 resolution: {integrity: sha512-cn5/Zi/qo37WtQG6gzIC7JPs0RDzX9Z4eaceX45SpKgLZoc3fCFDJcE7C8xsbxBNfjry2T6PmUxWA8obebZsEQ==} 115 132 peerDependencies: 116 133 '@atcute/lexicons': ^2.0.0 134 + 135 + '@atcute/crypto@2.4.2': 136 + resolution: {integrity: sha512-WKVVstCsgGZaaEJFemC6UPh5MtEB2SMU0tiOi744i9T2a6oInJg3VnbTzQsGkyQqqTNC30IHF7//Dwi4hYnu1g==} 117 137 118 138 '@atcute/identity-resolver@2.0.1': 119 139 resolution: {integrity: sha512-0enA9w7XnbbqsZ5Rcl6jXLf7ZZuwFQ9dBmxFq3qOxPHLaCETsqsrQflXDPqiM27TnZwYq8sqCV5D1mFOksggDQ==} ··· 126 146 peerDependencies: 127 147 '@atcute/lexicons': ^2.0.0 128 148 149 + '@atcute/lex-cli@3.2.1': 150 + resolution: {integrity: sha512-uKoQfCdrsdRJQApfe4ENpMrWlRFwd6uTmI5+iJ8cIwv4pUQU13ILwwnFqJE4FqTHzCBGk9Dey4SCiGdQSBvRaw==} 151 + hasBin: true 152 + peerDependencies: 153 + prettier: ^3.8.4 154 + peerDependenciesMeta: 155 + prettier: 156 + optional: true 157 + 158 + '@atcute/lexicon-doc@3.0.1': 159 + resolution: {integrity: sha512-giKTzRo9AqoX8GQMN7vvcaWSC4iHoK9CwA5TZpGD7KQXxJNBrK270QrA6+Ad53yxaqmTjay+3qm+EOux2G7m0A==} 160 + peerDependencies: 161 + '@atcute/lexicons': ^2.0.0 162 + 163 + '@atcute/lexicon-resolver@1.0.1': 164 + resolution: {integrity: sha512-/IXEGEMB3uyYqWSNxsH1V2QIEO/d8TdLeSbdqTv75Bqd3aZqf2Q1Fx/asOE1P9bE0Xz0twnqxW3qQvy2SHGG8Q==} 165 + peerDependencies: 166 + '@atcute/identity': ^2.0.0 167 + '@atcute/identity-resolver': ^2.0.0 168 + '@atcute/lexicon-doc': ^3.0.0 169 + '@atcute/lexicons': ^2.0.0 170 + 129 171 '@atcute/lexicons@2.0.2': 130 172 resolution: {integrity: sha512-ATBADJAy4KQ76NB86BjgYKrRdbDRUo76Cbqna4WIfQAgN105Rcy972MiNKs+BSmcOOM3WakilgTm0CXD4RC0iA==} 131 173 174 + '@atcute/mst@1.0.2': 175 + resolution: {integrity: sha512-fb98Ygs0PjVAOE4WmtMGqi+PS4Y0Jsip4CIkzWBxyIcbfix8kBGQUwZi54k4rKiGfT9qroCY2rlaPFzwkkAFzQ==} 176 + peerDependencies: 177 + '@atcute/cbor': ^2.0.0 178 + '@atcute/cid': ^2.0.0 179 + 132 180 '@atcute/multibase@1.2.4': 133 181 resolution: {integrity: sha512-WeX12hvFZEim6C+cyv7Eqd93w6DzubNWQGmTFBghjsEuXvMe4HbBCYvsti0OUnbA5qLBPlsTyssQUJeLlHCzIw==} 134 182 ··· 147 195 '@atcute/oauth-types@1.0.1': 148 196 resolution: {integrity: sha512-9uFP/nK0PgPDsaNbLArzrCHvTZO1k04cSEX5jZ75W2Jh7Jxbh/CSTenSrad3CZXuX6y6hDquEtl6H/IqLtTmHw==} 149 197 198 + '@atcute/repo@1.0.2': 199 + resolution: {integrity: sha512-fsAuGbagOW52nSFtf/TWBx25A6xpZvzxBk0+S14Bp5sGNq7JoQ0zyu40P7b6+L8b/buB+1ACHPntYsKqCI4Awg==} 200 + peerDependencies: 201 + '@atcute/cbor': ^2.0.0 202 + '@atcute/cid': ^2.0.0 203 + '@atcute/lexicons': ^2.0.0 204 + 150 205 '@atcute/uint8array@1.1.3': 151 206 resolution: {integrity: sha512-2KLcMQHUFtntY3tEjdyqqq1tR9hvPFndluWFCa637QY0cMyvq0fHSnhmZeWaSRIXMCwVDY3TLLWHNOHEWFb11g==} 152 207 ··· 155 210 156 211 '@atcute/util-text@1.3.3': 157 212 resolution: {integrity: sha512-WhedTmg/msFhrdwXw9RjnNcDl8Vmisxl4+Vzyf5k3+8Gj5TKQg72dLSDtBNmNLd61RbHjgfQRBgE0ez6q/jciw==} 213 + 214 + '@atcute/varint@2.0.1': 215 + resolution: {integrity: sha512-reTtgQ1VPGVRcaTohKVb1tUbpvE7MpguoNS0gjhsxDWFY3t1yqWWvwKK6cJodAmePML36JombvgFwfsblir9Jg==} 158 216 159 217 '@emnapi/core@1.11.1': 160 218 resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} ··· 254 312 peerDependencies: 255 313 '@emnapi/core': ^1.7.1 256 314 '@emnapi/runtime': ^1.7.1 315 + 316 + '@noble/secp256k1@3.1.0': 317 + resolution: {integrity: sha512-+F7iS7tUMaNGXcc9X3PjmjvuQnXEuSjCRNzVVA2xAcKXgCaP0dHYz4SFyt4FKNHef7sOP//xihowcySSS7PK9g==} 318 + 319 + '@oomfware/kempt@0.1.4': 320 + resolution: {integrity: sha512-7ik6b58VC17dMX2SZq0LUHaOYupavbtXFA3UxIsAPV2Gc8+HXv9BLJ9Di52zn/8RkDWhoLf0TAcfGYHlnHUiuw==} 321 + 322 + '@optique/core@1.1.1': 323 + resolution: {integrity: sha512-tbZLdH5wEnh8IRG8KTmWPZCKHLmD4bXigoPdzoSUVi+V46qZTNEaTdqtR7EuEwhbPI0KQjLSYRZCxFTdr9OZkA==} 324 + engines: {bun: '>=1.2.0', deno: '>=2.3.0', node: '>=20.0.0'} 325 + 326 + '@optique/run@1.1.1': 327 + resolution: {integrity: sha512-jSZeuiljDEWYkQ67bVDucRknzFVwiSH1j4ho2jFWfcdMMa+WDRSfZA3GZoHA8zKj0Bf6UbJ+FMs/2IReQ0KYNQ==} 328 + engines: {bun: '>=1.2.0', deno: '>=2.3.0', node: '>=20.0.0'} 257 329 258 330 '@oxc-project/types@0.138.0': 259 331 resolution: {integrity: sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==} ··· 1746 1818 dependencies: 1747 1819 '@atcute/lexicons': 2.0.2 1748 1820 1821 + '@atcute/car@6.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)': 1822 + dependencies: 1823 + '@atcute/cbor': 2.3.5(@atcute/cid@2.4.2) 1824 + '@atcute/cid': 2.4.2 1825 + '@atcute/uint8array': 1.1.3 1826 + '@atcute/varint': 2.0.1 1827 + 1828 + '@atcute/cbor@2.3.5(@atcute/cid@2.4.2)': 1829 + dependencies: 1830 + '@atcute/cid': 2.4.2 1831 + '@atcute/multibase': 1.2.4 1832 + '@atcute/uint8array': 1.1.3 1833 + 1834 + '@atcute/cid@2.4.2': 1835 + dependencies: 1836 + '@atcute/multibase': 1.2.4 1837 + '@atcute/uint8array': 1.1.3 1838 + 1749 1839 '@atcute/client@5.1.1(@atcute/lexicons@2.0.2)(typescript@6.0.3)': 1750 1840 dependencies: 1751 1841 '@atcute/identity': 2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1752 1842 '@atcute/lexicons': 2.0.2 1753 1843 transitivePeerDependencies: 1754 1844 - typescript 1845 + 1846 + '@atcute/crypto@2.4.2': 1847 + dependencies: 1848 + '@atcute/multibase': 1.2.4 1849 + '@atcute/uint8array': 1.1.3 1850 + '@noble/secp256k1': 3.1.0 1755 1851 1756 1852 '@atcute/identity-resolver@2.0.1(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3)': 1757 1853 dependencies: ··· 1769 1865 transitivePeerDependencies: 1770 1866 - typescript 1771 1867 1868 + '@atcute/lex-cli@3.2.1(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(prettier@3.9.4)(typescript@6.0.3)': 1869 + dependencies: 1870 + '@atcute/identity': 2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1871 + '@atcute/identity-resolver': 2.0.1(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1872 + '@atcute/lexicon-doc': 3.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1873 + '@atcute/lexicon-resolver': 1.0.1(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(@atcute/identity-resolver@2.0.1(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicon-doc@3.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1874 + '@atcute/lexicons': 2.0.2 1875 + '@oomfware/kempt': 0.1.4 1876 + '@optique/core': 1.1.1 1877 + '@optique/run': 1.1.1 1878 + picocolors: 1.1.1 1879 + valibot: 1.4.2(typescript@6.0.3) 1880 + optionalDependencies: 1881 + prettier: 3.9.4 1882 + transitivePeerDependencies: 1883 + - '@atcute/cbor' 1884 + - '@atcute/cid' 1885 + - typescript 1886 + 1887 + '@atcute/lexicon-doc@3.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3)': 1888 + dependencies: 1889 + '@atcute/identity': 2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1890 + '@atcute/lexicons': 2.0.2 1891 + '@atcute/uint8array': 1.1.3 1892 + '@atcute/util-text': 1.3.3 1893 + valibot: 1.4.2(typescript@6.0.3) 1894 + transitivePeerDependencies: 1895 + - typescript 1896 + 1897 + '@atcute/lexicon-resolver@1.0.1(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(@atcute/identity-resolver@2.0.1(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicon-doc@3.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3)': 1898 + dependencies: 1899 + '@atcute/crypto': 2.4.2 1900 + '@atcute/identity': 2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1901 + '@atcute/identity-resolver': 2.0.1(@atcute/identity@2.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3))(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1902 + '@atcute/lexicon-doc': 3.0.1(@atcute/lexicons@2.0.2)(typescript@6.0.3) 1903 + '@atcute/lexicons': 2.0.2 1904 + '@atcute/repo': 1.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(@atcute/lexicons@2.0.2) 1905 + '@atcute/util-fetch': 2.0.1(typescript@6.0.3) 1906 + valibot: 1.4.2(typescript@6.0.3) 1907 + transitivePeerDependencies: 1908 + - '@atcute/cbor' 1909 + - '@atcute/cid' 1910 + - typescript 1911 + 1772 1912 '@atcute/lexicons@2.0.2': 1773 1913 dependencies: 1774 1914 '@atcute/uint8array': 1.1.3 ··· 1776 1916 '@standard-schema/spec': 1.1.0 1777 1917 esm-env: 1.2.2 1778 1918 1919 + '@atcute/mst@1.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)': 1920 + dependencies: 1921 + '@atcute/cbor': 2.3.5(@atcute/cid@2.4.2) 1922 + '@atcute/cid': 2.4.2 1923 + '@atcute/uint8array': 1.1.3 1924 + 1779 1925 '@atcute/multibase@1.2.4': 1780 1926 dependencies: 1781 1927 '@atcute/uint8array': 1.1.3 ··· 1816 1962 transitivePeerDependencies: 1817 1963 - typescript 1818 1964 1965 + '@atcute/repo@1.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2)(@atcute/lexicons@2.0.2)': 1966 + dependencies: 1967 + '@atcute/car': 6.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2) 1968 + '@atcute/cbor': 2.3.5(@atcute/cid@2.4.2) 1969 + '@atcute/cid': 2.4.2 1970 + '@atcute/crypto': 2.4.2 1971 + '@atcute/lexicons': 2.0.2 1972 + '@atcute/mst': 1.0.2(@atcute/cbor@2.3.5(@atcute/cid@2.4.2))(@atcute/cid@2.4.2) 1973 + '@atcute/uint8array': 1.1.3 1974 + 1819 1975 '@atcute/uint8array@1.1.3': {} 1820 1976 1821 1977 '@atcute/util-fetch@2.0.1(typescript@6.0.3)': ··· 1827 1983 '@atcute/util-text@1.3.3': 1828 1984 dependencies: 1829 1985 unicode-segmenter: 0.14.5 1986 + 1987 + '@atcute/varint@2.0.1': {} 1830 1988 1831 1989 '@emnapi/core@1.11.1': 1832 1990 dependencies: ··· 1931 2089 '@emnapi/runtime': 1.11.1 1932 2090 '@tybys/wasm-util': 0.10.3 1933 2091 optional: true 2092 + 2093 + '@noble/secp256k1@3.1.0': {} 2094 + 2095 + '@oomfware/kempt@0.1.4': {} 2096 + 2097 + '@optique/core@1.1.1': {} 2098 + 2099 + '@optique/run@1.1.1': 2100 + dependencies: 2101 + '@optique/core': 1.1.1 1934 2102 1935 2103 '@oxc-project/types@0.138.0': {} 1936 2104
+60
web/src/lib/api/_request.ts
··· 1 + import { ClientResponseError, isXRPCErrorPayload, type XRPCErrorPayload } from '@atcute/client'; 2 + import type { BobbinContext, QueryValue, XrpcRequestInit } from './client'; 3 + 4 + export const buildUrl = ( 5 + origin: string, 6 + nsid: string, 7 + params?: Record<string, QueryValue> 8 + ): URL => { 9 + const url = new URL(`/xrpc/${nsid}`, `${origin}/`); 10 + if (params) { 11 + for (const [key, value] of Object.entries(params)) { 12 + if (value === undefined) continue; 13 + if (Array.isArray(value)) { 14 + for (const item of value) url.searchParams.append(key, String(item)); 15 + } else { 16 + url.searchParams.set(key, String(value)); 17 + } 18 + } 19 + } 20 + return url; 21 + }; 22 + 23 + export const toResponseError = async (response: Response): Promise<ClientResponseError> => { 24 + let data: XRPCErrorPayload = { error: 'XRPCError', message: response.statusText }; 25 + try { 26 + const body: unknown = await response.json(); 27 + if (isXRPCErrorPayload(body)) data = body; 28 + } catch { 29 + // keep the status-line fallback for non-json bodies. 30 + } 31 + return new ClientResponseError({ status: response.status, headers: response.headers, data }); 32 + }; 33 + 34 + export const jsonGet = async <T>( 35 + ctx: BobbinContext, 36 + nsid: string, 37 + params?: Record<string, QueryValue>, 38 + init?: XrpcRequestInit 39 + ): Promise<T> => { 40 + const response = await ctx.fetch(buildUrl(ctx.serviceUrl, nsid, params), { 41 + headers: { accept: 'application/json', ...init?.headers }, 42 + signal: init?.signal 43 + }); 44 + if (!response.ok) throw await toResponseError(response); 45 + return (await response.json()) as T; 46 + }; 47 + 48 + export const rawGet = async ( 49 + ctx: BobbinContext, 50 + nsid: string, 51 + params?: Record<string, QueryValue>, 52 + init?: XrpcRequestInit 53 + ): Promise<Response> => { 54 + const response = await ctx.fetch(buildUrl(ctx.serviceUrl, nsid, params), { 55 + headers: init?.headers, 56 + signal: init?.signal 57 + }); 58 + if (!response.ok) throw await toResponseError(response); 59 + return response; 60 + };
+109
web/src/lib/api/client.test.ts
··· 1 + import { describe, expect, it, vi, type Mock } from 'vitest'; 2 + import { ClientResponseError, createBobbinClient, type BobbinContext } from './client'; 3 + import { jsonGet, rawGet } from './_request'; 4 + 5 + const jsonResponse = (body: unknown, init: ResponseInit = {}): Response => 6 + new Response(JSON.stringify(body), { 7 + status: 200, 8 + headers: { 'content-type': 'application/json' }, 9 + ...init 10 + }); 11 + 12 + const makeCtx = ( 13 + fetchMock: typeof globalThis.fetch, 14 + serviceUrl = 'https://bobbin.test' 15 + ): BobbinContext => createBobbinClient({ serviceUrl, fetch: fetchMock }); 16 + 17 + const fetchedUrl = (mock: Mock<typeof globalThis.fetch>, n = 0): URL => 18 + new URL(String(mock.mock.calls[n][0])); 19 + 20 + describe('createBobbinClient', () => { 21 + it('normalizes trailing slashes off the service url', () => { 22 + const ctx = makeCtx(vi.fn(), 'https://bobbin.test///'); 23 + expect(ctx.serviceUrl).toBe('https://bobbin.test'); 24 + }); 25 + }); 26 + 27 + describe('jsonGet URL construction', () => { 28 + it('appends an array param as repeated keys', async () => { 29 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(jsonResponse({ ok: 1 })); 30 + await jsonGet(makeCtx(fetchMock), 'sh.tangled.repo.getRepos', { repos: ['a', 'b'] }); 31 + const url = fetchedUrl(fetchMock); 32 + expect(url.searchParams.getAll('repos')).toEqual(['a', 'b']); 33 + expect(url.search).toBe('?repos=a&repos=b'); 34 + }); 35 + 36 + it('omits undefined params entirely', async () => { 37 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(jsonResponse({ ok: 1 })); 38 + await jsonGet(makeCtx(fetchMock), 'sh.tangled.x', { keep: 'yes', drop: undefined }); 39 + const url = fetchedUrl(fetchMock); 40 + expect(url.searchParams.has('drop')).toBe(false); 41 + expect(url.searchParams.get('keep')).toBe('yes'); 42 + }); 43 + 44 + it('resolves the query against the normalized origin', async () => { 45 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(jsonResponse({ ok: 1 })); 46 + await jsonGet(makeCtx(fetchMock, 'https://bobbin.test/'), 'sh.tangled.x', { a: '1' }); 47 + expect(fetchedUrl(fetchMock).href).toBe('https://bobbin.test/xrpc/sh.tangled.x?a=1'); 48 + }); 49 + }); 50 + 51 + describe('jsonGet request headers & signal', () => { 52 + it('sends accept: application/json and merges caller headers + signal', async () => { 53 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(jsonResponse({ ok: 1 })); 54 + const controller = new AbortController(); 55 + await jsonGet(makeCtx(fetchMock), 'sh.tangled.x', undefined, { 56 + headers: { 'x-custom': '1' }, 57 + signal: controller.signal 58 + }); 59 + const init = fetchMock.mock.calls[0][1] as RequestInit; 60 + expect(init.headers).toMatchObject({ accept: 'application/json', 'x-custom': '1' }); 61 + expect(init.signal).toBe(controller.signal); 62 + }); 63 + }); 64 + 65 + describe('jsonGet responses', () => { 66 + it('throws ClientResponseError carrying status + error/description for a JSON error body', async () => { 67 + const fetchMock = vi 68 + .fn<typeof globalThis.fetch>() 69 + .mockResolvedValue( 70 + jsonResponse({ error: 'RecordNotFound', message: 'no such repo' }, { status: 404 }) 71 + ); 72 + const err = await jsonGet(makeCtx(fetchMock), 'sh.tangled.x').catch((e: unknown) => e); 73 + expect(err).toBeInstanceOf(ClientResponseError); 74 + const cre = err as ClientResponseError; 75 + expect(cre.status).toBe(404); 76 + expect(cre.error).toBe('RecordNotFound'); 77 + expect(cre.description).toBe('no such repo'); 78 + }); 79 + 80 + it('falls back to the status line for a non-JSON error body (does not hang)', async () => { 81 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue( 82 + new Response('<html>502 Bad Gateway</html>', { 83 + status: 502, 84 + statusText: 'Bad Gateway' 85 + }) 86 + ); 87 + const err = await jsonGet(makeCtx(fetchMock), 'sh.tangled.x').catch((e: unknown) => e); 88 + expect(err).toBeInstanceOf(ClientResponseError); 89 + const cre = err as ClientResponseError; 90 + expect(cre.status).toBe(502); 91 + expect(cre.error).toBe('XRPCError'); 92 + expect(cre.description).toBe('Bad Gateway'); 93 + }); 94 + }); 95 + 96 + describe('rawGet', () => { 97 + it('throws ClientResponseError on a non-2xx status', async () => { 98 + const fetchMock = vi 99 + .fn<typeof globalThis.fetch>() 100 + .mockResolvedValue( 101 + jsonResponse({ error: 'UpstreamFailed', message: 'knot down' }, { status: 502 }) 102 + ); 103 + const err = await rawGet(makeCtx(fetchMock), 'sh.tangled.repo.archive').catch( 104 + (e: unknown) => e 105 + ); 106 + expect(err).toBeInstanceOf(ClientResponseError); 107 + expect((err as ClientResponseError).status).toBe(502); 108 + }); 109 + });
+31
web/src/lib/api/client.ts
··· 1 + import { Client, simpleFetchHandler } from '@atcute/client'; 2 + 3 + export { ClientResponseError, isXRPCErrorPayload, ok } from '@atcute/client'; 4 + export type { XRPCErrorPayload } from '@atcute/client'; 5 + 6 + // generated lexicons register ambient types; don't import the barrel at runtime. 7 + 8 + export interface BobbinContext { 9 + readonly xrpc: Client; 10 + readonly serviceUrl: string; 11 + readonly fetch: typeof globalThis.fetch; 12 + } 13 + 14 + export interface CreateBobbinOptions { 15 + serviceUrl: string; 16 + fetch?: typeof globalThis.fetch; 17 + } 18 + 19 + export const createBobbinClient = ({ serviceUrl, fetch }: CreateBobbinOptions): BobbinContext => { 20 + const origin = serviceUrl.replace(/\/+$/, ''); 21 + const boundFetch = fetch ?? globalThis.fetch; 22 + const xrpc = new Client({ handler: simpleFetchHandler({ service: origin, fetch: boundFetch }) }); 23 + return { xrpc, serviceUrl: origin, fetch: boundFetch }; 24 + }; 25 + 26 + export type QueryValue = string | number | boolean | readonly (string | number)[] | undefined; 27 + 28 + export interface XrpcRequestInit { 29 + signal?: AbortSignal; 30 + headers?: HeadersInit; 31 + }
+57
web/src/lib/api/count.ts
··· 1 + import type { BobbinContext, XrpcRequestInit } from './client'; 2 + import { jsonGet } from './_request'; 3 + 4 + // count endpoints share { subject } params and { count, distinctAuthors } output. 5 + export type CountName = 6 + | 'sh.tangled.feed.countStars' 7 + | 'sh.tangled.feed.countStarsBy' 8 + | 'sh.tangled.feed.countComments' 9 + | 'sh.tangled.feed.countCommentsBy' 10 + | 'sh.tangled.feed.countReactions' 11 + | 'sh.tangled.feed.countReactionsBy' 12 + | 'sh.tangled.graph.countFollows' 13 + | 'sh.tangled.graph.countFollowsBy' 14 + | 'sh.tangled.graph.countVouches' 15 + | 'sh.tangled.graph.countVouchesBy' 16 + | 'sh.tangled.git.countRefUpdates' 17 + | 'sh.tangled.git.countRefUpdatesBy' 18 + | 'sh.tangled.knot.countKnots' 19 + | 'sh.tangled.knot.countMembers' 20 + | 'sh.tangled.knot.countMembersBy' 21 + | 'sh.tangled.label.countDefinitions' 22 + | 'sh.tangled.label.countOps' 23 + | 'sh.tangled.label.countOpsBy' 24 + | 'sh.tangled.pipeline.countPipelines' 25 + | 'sh.tangled.pipeline.countPipelinesBy' 26 + | 'sh.tangled.pipeline.countStatuses' 27 + | 'sh.tangled.pipeline.countStatusesBy' 28 + | 'sh.tangled.publicKey.countKeys' 29 + | 'sh.tangled.repo.countArtifacts' 30 + | 'sh.tangled.repo.countArtifactsBy' 31 + | 'sh.tangled.repo.countCollaborators' 32 + | 'sh.tangled.repo.countCollaboratorsBy' 33 + | 'sh.tangled.repo.countIssues' 34 + | 'sh.tangled.repo.countIssuesBy' 35 + | 'sh.tangled.repo.countPulls' 36 + | 'sh.tangled.repo.countPullsBy' 37 + | 'sh.tangled.repo.countRepos' 38 + | 'sh.tangled.repo.issue.countStates' 39 + | 'sh.tangled.repo.issue.countStatesBy' 40 + | 'sh.tangled.repo.pull.countStatuses' 41 + | 'sh.tangled.repo.pull.countStatusesBy' 42 + | 'sh.tangled.spindle.countSpindles' 43 + | 'sh.tangled.spindle.countMembers' 44 + | 'sh.tangled.spindle.countMembersBy' 45 + | 'sh.tangled.string.countStrings'; 46 + 47 + export interface CountResult { 48 + count: number; 49 + distinctAuthors: number; 50 + } 51 + 52 + export const count = ( 53 + ctx: BobbinContext, 54 + name: CountName, 55 + subject: string, 56 + init?: XrpcRequestInit 57 + ): Promise<CountResult> => jsonGet<CountResult>(ctx, name, { subject }, init);
+11
web/src/lib/api/coverage.ts
··· 1 + import type { BobbinContext, XrpcRequestInit } from './client'; 2 + import { jsonGet } from './_request'; 3 + 4 + export interface Coverage { 5 + ready: boolean; 6 + eventsProcessed: number; 7 + lastCursor: number; 8 + } 9 + 10 + export const getCoverage = (ctx: BobbinContext, init?: XrpcRequestInit): Promise<Coverage> => 11 + jsonGet<Coverage>(ctx, 'sh.tangled.bobbin.getCoverage', undefined, init);
+100
web/src/lib/api/identity.test.ts
··· 1 + import { describe, expect, it, vi } from 'vitest'; 2 + import { createBobbinClient, type BobbinContext } from './client'; 3 + import { IdentityCache, type MiniDoc } from './identity'; 4 + 5 + const DOC: MiniDoc = { did: 'did:plc:x', handle: 'alice.test' }; 6 + 7 + const docResponse = (doc: MiniDoc): Response => 8 + new Response(JSON.stringify(doc), { 9 + status: 200, 10 + headers: { 'content-type': 'application/json' } 11 + }); 12 + 13 + const makeCtx = (fetchMock: typeof globalThis.fetch): BobbinContext => 14 + createBobbinClient({ serviceUrl: 'https://bobbin.test', fetch: fetchMock }); 15 + 16 + const deferred = <T>(): { promise: Promise<T>; resolve: (value: T) => void } => { 17 + let resolve!: (value: T) => void; 18 + const promise = new Promise<T>((r) => { 19 + resolve = r; 20 + }); 21 + return { promise, resolve }; 22 + }; 23 + 24 + describe('IdentityCache.resolve', () => { 25 + it('fetches on the first miss then serves the cached document', async () => { 26 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(docResponse(DOC)); 27 + const cache = new IdentityCache(makeCtx(fetchMock)); 28 + 29 + const first = await cache.resolve('alice.test'); 30 + const second = await cache.resolve('alice.test'); 31 + 32 + expect(first).toEqual(DOC); 33 + expect(second).toEqual(DOC); 34 + expect(fetchMock).toHaveBeenCalledTimes(1); 35 + expect((fetchMock.mock.calls[0][0] as URL).searchParams.get('identifier')).toBe('alice.test'); 36 + }); 37 + 38 + it('coalesces concurrent misses for the same key into one in-flight fetch', async () => { 39 + const gate = deferred<Response>(); 40 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockReturnValue(gate.promise); 41 + const cache = new IdentityCache(makeCtx(fetchMock)); 42 + 43 + const a = cache.resolve('alice.test'); 44 + const b = cache.resolve('alice.test'); 45 + expect(fetchMock).toHaveBeenCalledTimes(1); 46 + 47 + gate.resolve(docResponse(DOC)); 48 + const [ra, rb] = await Promise.all([a, b]); 49 + expect(ra).toEqual(DOC); 50 + expect(rb).toEqual(DOC); 51 + expect(fetchMock).toHaveBeenCalledTimes(1); 52 + }); 53 + 54 + it('re-fetches after the in-flight promise settles (no permanent stampede lock)', async () => { 55 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(docResponse(DOC)); 56 + const cache = new IdentityCache(makeCtx(fetchMock)); 57 + 58 + await cache.resolve('bob.test'); 59 + fetchMock.mockResolvedValueOnce(docResponse({ did: 'did:plc:y', handle: 'carol.test' })); 60 + await cache.resolve('carol.test'); 61 + expect(fetchMock).toHaveBeenCalledTimes(2); 62 + }); 63 + 64 + it('populates both directions of the index from a resolved document', async () => { 65 + const fetchMock = vi.fn<typeof globalThis.fetch>().mockResolvedValue(docResponse(DOC)); 66 + const cache = new IdentityCache(makeCtx(fetchMock)); 67 + 68 + await cache.resolve('alice.test'); 69 + expect(cache.didFor('alice.test')).toBe('did:plc:x'); 70 + expect(cache.handleFor('did:plc:x')).toBe('alice.test'); 71 + }); 72 + }); 73 + 74 + describe('IdentityCache.prime & map selection', () => { 75 + it('seeds both directions without any fetch', () => { 76 + const fetchMock = vi.fn<typeof globalThis.fetch>(); 77 + const cache = new IdentityCache(makeCtx(fetchMock)); 78 + 79 + cache.prime(DOC); 80 + expect(cache.didFor('alice.test')).toBe('did:plc:x'); 81 + expect(cache.handleFor('did:plc:x')).toBe('alice.test'); 82 + expect(fetchMock).not.toHaveBeenCalled(); 83 + }); 84 + 85 + it('resolves a DID against the did map and a handle against the handle map', async () => { 86 + const fetchMock = vi.fn<typeof globalThis.fetch>(); 87 + const cache = new IdentityCache(makeCtx(fetchMock)); 88 + cache.prime(DOC); 89 + 90 + await expect(cache.resolve('did:plc:x')).resolves.toEqual(DOC); 91 + await expect(cache.resolve('alice.test')).resolves.toEqual(DOC); 92 + expect(fetchMock).not.toHaveBeenCalled(); 93 + 94 + // unknown dids miss the handle map and fetch. 95 + fetchMock.mockResolvedValueOnce(docResponse({ did: 'did:plc:z', handle: 'dan.test' })); 96 + await cache.resolve('did:plc:z'); 97 + expect(fetchMock).toHaveBeenCalledTimes(1); 98 + expect((fetchMock.mock.calls[0][0] as URL).searchParams.get('identifier')).toBe('did:plc:z'); 99 + }); 100 + });
+60
web/src/lib/api/identity.ts
··· 1 + import type { BobbinContext, XrpcRequestInit } from './client'; 2 + import { jsonGet } from './_request'; 3 + 4 + export interface MiniDoc { 5 + did: string; 6 + handle: string; 7 + pds?: string; 8 + avatar?: string; 9 + } 10 + 11 + export const resolveMiniDoc = ( 12 + ctx: BobbinContext, 13 + identifier: string, 14 + init?: XrpcRequestInit 15 + ): Promise<MiniDoc> => 16 + jsonGet<MiniDoc>(ctx, 'com.bad-example.identity.resolveMiniDoc', { identifier }, init); 17 + 18 + // did/handle cache with in-flight de-dupe. 19 + export class IdentityCache { 20 + readonly #ctx: BobbinContext; 21 + readonly #byDid = new Map<string, MiniDoc>(); 22 + readonly #byHandle = new Map<string, MiniDoc>(); 23 + readonly #inflight = new Map<string, Promise<MiniDoc>>(); 24 + 25 + constructor(ctx: BobbinContext) { 26 + this.#ctx = ctx; 27 + } 28 + 29 + prime(doc: MiniDoc): void { 30 + this.#byDid.set(doc.did, doc); 31 + this.#byHandle.set(doc.handle, doc); 32 + } 33 + 34 + didFor(handle: string): string | undefined { 35 + return this.#byHandle.get(handle)?.did; 36 + } 37 + 38 + handleFor(did: string): string | undefined { 39 + return this.#byDid.get(did)?.handle; 40 + } 41 + 42 + resolve(identifier: string, init?: XrpcRequestInit): Promise<MiniDoc> { 43 + const cached = identifier.startsWith('did:') 44 + ? this.#byDid.get(identifier) 45 + : this.#byHandle.get(identifier); 46 + if (cached) return Promise.resolve(cached); 47 + 48 + const existing = this.#inflight.get(identifier); 49 + if (existing) return existing; 50 + 51 + const pending = resolveMiniDoc(this.#ctx, identifier, init) 52 + .then((doc) => { 53 + this.prime(doc); 54 + return doc; 55 + }) 56 + .finally(() => this.#inflight.delete(identifier)); 57 + this.#inflight.set(identifier, pending); 58 + return pending; 59 + } 60 + }
+9
web/src/lib/api/index.ts
··· 1 + export * from './client'; 2 + export * from './pagination'; 3 + export * from './count'; 4 + export * from './records'; 5 + export * as knot from './knot'; 6 + export * from './search'; 7 + export * from './coverage'; 8 + export * from './identity'; 9 + export * from './load';
+26
web/src/lib/api/knot.test.ts
··· 1 + import { describe, expect, it, vi } from 'vitest'; 2 + import * as knot from './knot'; 3 + import { ClientResponseError, createBobbinClient, type BobbinContext } from './client'; 4 + 5 + const jsonResponse = (body: unknown, init: ResponseInit = {}): Response => 6 + new Response(JSON.stringify(body), { 7 + status: 200, 8 + headers: { 'content-type': 'application/json' }, 9 + ...init 10 + }); 11 + 12 + const makeCtx = (fetchMock: typeof globalThis.fetch): BobbinContext => 13 + createBobbinClient({ serviceUrl: 'https://bobbin.test', fetch: fetchMock }); 14 + 15 + describe('knot.archive (binary passthrough)', () => { 16 + it('throws ClientResponseError on a non-2xx archive response', async () => { 17 + const fetchMock = vi 18 + .fn<typeof globalThis.fetch>() 19 + .mockResolvedValue(jsonResponse({ error: 'UpstreamGone' }, { status: 502 })); 20 + const err = await knot 21 + .archive(makeCtx(fetchMock), { repo: 'did:plc:x/r', ref: 'main' }) 22 + .catch((e: unknown) => e); 23 + expect(err).toBeInstanceOf(ClientResponseError); 24 + expect((err as ClientResponseError).status).toBe(502); 25 + }); 26 + });
+94
web/src/lib/api/knot.ts
··· 1 + import type { BobbinContext, QueryValue, XrpcRequestInit } from './client'; 2 + import { jsonGet, rawGet } from './_request'; 3 + import type * as Archive from './lexicons/types/sh/tangled/repo/archive'; 4 + import type * as Blob_ from './lexicons/types/sh/tangled/repo/blob'; 5 + import type * as Branch from './lexicons/types/sh/tangled/repo/branch'; 6 + import type * as Branches from './lexicons/types/sh/tangled/repo/branches'; 7 + import type * as Compare from './lexicons/types/sh/tangled/repo/compare'; 8 + import type * as DescribeRepo from './lexicons/types/sh/tangled/repo/describeRepo'; 9 + import type * as Diff from './lexicons/types/sh/tangled/repo/diff'; 10 + import type * as GetDefaultBranch from './lexicons/types/sh/tangled/repo/getDefaultBranch'; 11 + import type * as Languages from './lexicons/types/sh/tangled/repo/languages'; 12 + import type * as ListSecrets from './lexicons/types/sh/tangled/repo/listSecrets'; 13 + import type * as Log from './lexicons/types/sh/tangled/repo/log'; 14 + import type * as Tag from './lexicons/types/sh/tangled/repo/tag'; 15 + import type * as Tags from './lexicons/types/sh/tangled/repo/tags'; 16 + import type * as Tree from './lexicons/types/sh/tangled/repo/tree'; 17 + 18 + // wrappers for bobbin's knot-proxied repo endpoints. 19 + 20 + const asParams = (params: object): Record<string, QueryValue> => 21 + params as unknown as Record<string, QueryValue>; 22 + 23 + export const tree = (ctx: BobbinContext, params: Tree.$params, init?: XrpcRequestInit) => 24 + jsonGet<Tree.$output>(ctx, 'sh.tangled.repo.tree', asParams(params), init); 25 + 26 + export const blob = (ctx: BobbinContext, params: Blob_.$params, init?: XrpcRequestInit) => 27 + jsonGet<Blob_.$output>(ctx, 'sh.tangled.repo.blob', asParams(params), init); 28 + 29 + export const branch = (ctx: BobbinContext, params: Branch.$params, init?: XrpcRequestInit) => 30 + jsonGet<Branch.$output>(ctx, 'sh.tangled.repo.branch', asParams(params), init); 31 + 32 + export const getDefaultBranch = ( 33 + ctx: BobbinContext, 34 + params: GetDefaultBranch.$params, 35 + init?: XrpcRequestInit 36 + ) => 37 + jsonGet<GetDefaultBranch.$output>( 38 + ctx, 39 + 'sh.tangled.repo.getDefaultBranch', 40 + asParams(params), 41 + init 42 + ); 43 + 44 + export const describeRepo = ( 45 + ctx: BobbinContext, 46 + params: DescribeRepo.$params, 47 + init?: XrpcRequestInit 48 + ) => jsonGet<DescribeRepo.$output>(ctx, 'sh.tangled.repo.describeRepo', asParams(params), init); 49 + 50 + export const languages = (ctx: BobbinContext, params: Languages.$params, init?: XrpcRequestInit) => 51 + jsonGet<Languages.$output>(ctx, 'sh.tangled.repo.languages', asParams(params), init); 52 + 53 + export const listSecrets = ( 54 + ctx: BobbinContext, 55 + params: ListSecrets.$params, 56 + init?: XrpcRequestInit 57 + ) => jsonGet<ListSecrets.$output>(ctx, 'sh.tangled.repo.listSecrets', asParams(params), init); 58 + 59 + // schema-less json passthroughs; callers supply the shape. 60 + 61 + export const log = <T = unknown>(ctx: BobbinContext, params: Log.$params, init?: XrpcRequestInit) => 62 + jsonGet<T>(ctx, 'sh.tangled.repo.log', asParams(params), init); 63 + 64 + export const diff = <T = unknown>( 65 + ctx: BobbinContext, 66 + params: Diff.$params, 67 + init?: XrpcRequestInit 68 + ) => jsonGet<T>(ctx, 'sh.tangled.repo.diff', asParams(params), init); 69 + 70 + export const compare = <T = unknown>( 71 + ctx: BobbinContext, 72 + params: Compare.$params, 73 + init?: XrpcRequestInit 74 + ) => jsonGet<T>(ctx, 'sh.tangled.repo.compare', asParams(params), init); 75 + 76 + export const branches = <T = unknown>( 77 + ctx: BobbinContext, 78 + params: Branches.$params, 79 + init?: XrpcRequestInit 80 + ) => jsonGet<T>(ctx, 'sh.tangled.repo.branches', asParams(params), init); 81 + 82 + export const tags = <T = unknown>( 83 + ctx: BobbinContext, 84 + params: Tags.$params, 85 + init?: XrpcRequestInit 86 + ) => jsonGet<T>(ctx, 'sh.tangled.repo.tags', asParams(params), init); 87 + 88 + export const tag = <T = unknown>(ctx: BobbinContext, params: Tag.$params, init?: XrpcRequestInit) => 89 + jsonGet<T>(ctx, 'sh.tangled.repo.tag', asParams(params), init); 90 + 91 + // raw response for streaming/download. 92 + 93 + export const archive = (ctx: BobbinContext, params: Archive.$params, init?: XrpcRequestInit) => 94 + rawGet(ctx, 'sh.tangled.repo.archive', asParams(params), init);
+131
web/src/lib/api/lexicons/index.ts
··· 1 + export * as ShTangledActorProfile from "./types/sh/tangled/actor/profile.js"; 2 + export * as ShTangledCiCancelPipeline from "./types/sh/tangled/ci/cancelPipeline.js"; 3 + export * as ShTangledCiGetPipeline from "./types/sh/tangled/ci/getPipeline.js"; 4 + export * as ShTangledCiPipeline from "./types/sh/tangled/ci/pipeline.js"; 5 + export * as ShTangledCiQueryPipelines from "./types/sh/tangled/ci/queryPipelines.js"; 6 + export * as ShTangledCiSubscribePipelineLogs from "./types/sh/tangled/ci/subscribePipelineLogs.js"; 7 + export * as ShTangledCiTrigger from "./types/sh/tangled/ci/trigger.js"; 8 + export * as ShTangledCiTriggerPipeline from "./types/sh/tangled/ci/triggerPipeline.js"; 9 + export * as ShTangledFeedComment from "./types/sh/tangled/feed/comment.js"; 10 + export * as ShTangledFeedListComments from "./types/sh/tangled/feed/listComments.js"; 11 + export * as ShTangledFeedListCommentsBy from "./types/sh/tangled/feed/listCommentsBy.js"; 12 + export * as ShTangledFeedListReactions from "./types/sh/tangled/feed/listReactions.js"; 13 + export * as ShTangledFeedListReactionsBy from "./types/sh/tangled/feed/listReactionsBy.js"; 14 + export * as ShTangledFeedListStars from "./types/sh/tangled/feed/listStars.js"; 15 + export * as ShTangledFeedListStarsBy from "./types/sh/tangled/feed/listStarsBy.js"; 16 + export * as ShTangledFeedReaction from "./types/sh/tangled/feed/reaction.js"; 17 + export * as ShTangledFeedStar from "./types/sh/tangled/feed/star.js"; 18 + export * as ShTangledGitListRefUpdates from "./types/sh/tangled/git/listRefUpdates.js"; 19 + export * as ShTangledGitListRefUpdatesBy from "./types/sh/tangled/git/listRefUpdatesBy.js"; 20 + export * as ShTangledGitListRefs from "./types/sh/tangled/git/listRefs.js"; 21 + export * as ShTangledGitRefUpdate from "./types/sh/tangled/git/refUpdate.js"; 22 + export * as ShTangledGitTempAnalyzeMerge from "./types/sh/tangled/git/temp/analyzeMerge.js"; 23 + export * as ShTangledGitTempDefs from "./types/sh/tangled/git/temp/defs.js"; 24 + export * as ShTangledGitTempGetArchive from "./types/sh/tangled/git/temp/getArchive.js"; 25 + export * as ShTangledGitTempGetBlob from "./types/sh/tangled/git/temp/getBlob.js"; 26 + export * as ShTangledGitTempGetBranch from "./types/sh/tangled/git/temp/getBranch.js"; 27 + export * as ShTangledGitTempGetCommit from "./types/sh/tangled/git/temp/getCommit.js"; 28 + export * as ShTangledGitTempGetDiff from "./types/sh/tangled/git/temp/getDiff.js"; 29 + export * as ShTangledGitTempGetEntry from "./types/sh/tangled/git/temp/getEntry.js"; 30 + export * as ShTangledGitTempGetHead from "./types/sh/tangled/git/temp/getHead.js"; 31 + export * as ShTangledGitTempGetTag from "./types/sh/tangled/git/temp/getTag.js"; 32 + export * as ShTangledGitTempGetTree from "./types/sh/tangled/git/temp/getTree.js"; 33 + export * as ShTangledGitTempListBranches from "./types/sh/tangled/git/temp/listBranches.js"; 34 + export * as ShTangledGitTempListCommits from "./types/sh/tangled/git/temp/listCommits.js"; 35 + export * as ShTangledGitTempListLanguages from "./types/sh/tangled/git/temp/listLanguages.js"; 36 + export * as ShTangledGitTempListTags from "./types/sh/tangled/git/temp/listTags.js"; 37 + export * as ShTangledGraphFollow from "./types/sh/tangled/graph/follow.js"; 38 + export * as ShTangledGraphListFollows from "./types/sh/tangled/graph/listFollows.js"; 39 + export * as ShTangledGraphListFollowsBy from "./types/sh/tangled/graph/listFollowsBy.js"; 40 + export * as ShTangledGraphListVouches from "./types/sh/tangled/graph/listVouches.js"; 41 + export * as ShTangledGraphListVouchesBy from "./types/sh/tangled/graph/listVouchesBy.js"; 42 + export * as ShTangledGraphVouch from "./types/sh/tangled/graph/vouch.js"; 43 + export * as ShTangledKnot from "./types/sh/tangled/knot.js"; 44 + export * as ShTangledKnotAddMember from "./types/sh/tangled/knot/addMember.js"; 45 + export * as ShTangledKnotListKeys from "./types/sh/tangled/knot/listKeys.js"; 46 + export * as ShTangledKnotListKnots from "./types/sh/tangled/knot/listKnots.js"; 47 + export * as ShTangledKnotListMembers from "./types/sh/tangled/knot/listMembers.js"; 48 + export * as ShTangledKnotListMembersBy from "./types/sh/tangled/knot/listMembersBy.js"; 49 + export * as ShTangledKnotMember from "./types/sh/tangled/knot/member.js"; 50 + export * as ShTangledKnotRemoveMember from "./types/sh/tangled/knot/removeMember.js"; 51 + export * as ShTangledKnotSubscribeRepos from "./types/sh/tangled/knot/subscribeRepos.js"; 52 + export * as ShTangledKnotVersion from "./types/sh/tangled/knot/version.js"; 53 + export * as ShTangledLabelDefinition from "./types/sh/tangled/label/definition.js"; 54 + export * as ShTangledLabelListDefinitions from "./types/sh/tangled/label/listDefinitions.js"; 55 + export * as ShTangledLabelListOps from "./types/sh/tangled/label/listOps.js"; 56 + export * as ShTangledLabelListOpsBy from "./types/sh/tangled/label/listOpsBy.js"; 57 + export * as ShTangledLabelOp from "./types/sh/tangled/label/op.js"; 58 + export * as ShTangledMarkupMarkdown from "./types/sh/tangled/markup/markdown.js"; 59 + export * as ShTangledOwner from "./types/sh/tangled/owner.js"; 60 + export * as ShTangledPipeline from "./types/sh/tangled/pipeline.js"; 61 + export * as ShTangledPipelineCancelPipeline from "./types/sh/tangled/pipeline/cancelPipeline.js"; 62 + export * as ShTangledPipelineListPipelines from "./types/sh/tangled/pipeline/listPipelines.js"; 63 + export * as ShTangledPipelineListPipelinesBy from "./types/sh/tangled/pipeline/listPipelinesBy.js"; 64 + export * as ShTangledPipelineListStatuses from "./types/sh/tangled/pipeline/listStatuses.js"; 65 + export * as ShTangledPipelineListStatusesBy from "./types/sh/tangled/pipeline/listStatusesBy.js"; 66 + export * as ShTangledPipelineStatus from "./types/sh/tangled/pipeline/status.js"; 67 + export * as ShTangledPublicKey from "./types/sh/tangled/publicKey.js"; 68 + export * as ShTangledPublicKeyListKeys from "./types/sh/tangled/publicKey/listKeys.js"; 69 + export * as ShTangledRepo from "./types/sh/tangled/repo.js"; 70 + export * as ShTangledRepoAddCollaborator from "./types/sh/tangled/repo/addCollaborator.js"; 71 + export * as ShTangledRepoAddSecret from "./types/sh/tangled/repo/addSecret.js"; 72 + export * as ShTangledRepoArchive from "./types/sh/tangled/repo/archive.js"; 73 + export * as ShTangledRepoArtifact from "./types/sh/tangled/repo/artifact.js"; 74 + export * as ShTangledRepoBlob from "./types/sh/tangled/repo/blob.js"; 75 + export * as ShTangledRepoBranch from "./types/sh/tangled/repo/branch.js"; 76 + export * as ShTangledRepoBranches from "./types/sh/tangled/repo/branches.js"; 77 + export * as ShTangledRepoCollaborator from "./types/sh/tangled/repo/collaborator.js"; 78 + export * as ShTangledRepoCompare from "./types/sh/tangled/repo/compare.js"; 79 + export * as ShTangledRepoCreate from "./types/sh/tangled/repo/create.js"; 80 + export * as ShTangledRepoDelete from "./types/sh/tangled/repo/delete.js"; 81 + export * as ShTangledRepoDeleteBranch from "./types/sh/tangled/repo/deleteBranch.js"; 82 + export * as ShTangledRepoDescribeRepo from "./types/sh/tangled/repo/describeRepo.js"; 83 + export * as ShTangledRepoDiff from "./types/sh/tangled/repo/diff.js"; 84 + export * as ShTangledRepoForkStatus from "./types/sh/tangled/repo/forkStatus.js"; 85 + export * as ShTangledRepoForkSync from "./types/sh/tangled/repo/forkSync.js"; 86 + export * as ShTangledRepoGetDefaultBranch from "./types/sh/tangled/repo/getDefaultBranch.js"; 87 + export * as ShTangledRepoHiddenRef from "./types/sh/tangled/repo/hiddenRef.js"; 88 + export * as ShTangledRepoIssue from "./types/sh/tangled/repo/issue.js"; 89 + export * as ShTangledRepoIssueComment from "./types/sh/tangled/repo/issue/comment.js"; 90 + export * as ShTangledRepoIssueListStates from "./types/sh/tangled/repo/issue/listStates.js"; 91 + export * as ShTangledRepoIssueListStatesBy from "./types/sh/tangled/repo/issue/listStatesBy.js"; 92 + export * as ShTangledRepoIssueState from "./types/sh/tangled/repo/issue/state.js"; 93 + export * as ShTangledRepoIssueStateClosed from "./types/sh/tangled/repo/issue/state/closed.js"; 94 + export * as ShTangledRepoIssueStateOpen from "./types/sh/tangled/repo/issue/state/open.js"; 95 + export * as ShTangledRepoLanguages from "./types/sh/tangled/repo/languages.js"; 96 + export * as ShTangledRepoListArtifacts from "./types/sh/tangled/repo/listArtifacts.js"; 97 + export * as ShTangledRepoListArtifactsBy from "./types/sh/tangled/repo/listArtifactsBy.js"; 98 + export * as ShTangledRepoListCollaborators from "./types/sh/tangled/repo/listCollaborators.js"; 99 + export * as ShTangledRepoListCollaboratorsBy from "./types/sh/tangled/repo/listCollaboratorsBy.js"; 100 + export * as ShTangledRepoListIssues from "./types/sh/tangled/repo/listIssues.js"; 101 + export * as ShTangledRepoListIssuesBy from "./types/sh/tangled/repo/listIssuesBy.js"; 102 + export * as ShTangledRepoListPulls from "./types/sh/tangled/repo/listPulls.js"; 103 + export * as ShTangledRepoListPullsBy from "./types/sh/tangled/repo/listPullsBy.js"; 104 + export * as ShTangledRepoListRepos from "./types/sh/tangled/repo/listRepos.js"; 105 + export * as ShTangledRepoListSecrets from "./types/sh/tangled/repo/listSecrets.js"; 106 + export * as ShTangledRepoLog from "./types/sh/tangled/repo/log.js"; 107 + export * as ShTangledRepoMerge from "./types/sh/tangled/repo/merge.js"; 108 + export * as ShTangledRepoMergeCheck from "./types/sh/tangled/repo/mergeCheck.js"; 109 + export * as ShTangledRepoPull from "./types/sh/tangled/repo/pull.js"; 110 + export * as ShTangledRepoPullComment from "./types/sh/tangled/repo/pull/comment.js"; 111 + export * as ShTangledRepoPullListStatuses from "./types/sh/tangled/repo/pull/listStatuses.js"; 112 + export * as ShTangledRepoPullListStatusesBy from "./types/sh/tangled/repo/pull/listStatusesBy.js"; 113 + export * as ShTangledRepoPullStatus from "./types/sh/tangled/repo/pull/status.js"; 114 + export * as ShTangledRepoPullStatusClosed from "./types/sh/tangled/repo/pull/status/closed.js"; 115 + export * as ShTangledRepoPullStatusMerged from "./types/sh/tangled/repo/pull/status/merged.js"; 116 + export * as ShTangledRepoPullStatusOpen from "./types/sh/tangled/repo/pull/status/open.js"; 117 + export * as ShTangledRepoRemoveCollaborator from "./types/sh/tangled/repo/removeCollaborator.js"; 118 + export * as ShTangledRepoRemoveSecret from "./types/sh/tangled/repo/removeSecret.js"; 119 + export * as ShTangledRepoSetDefaultBranch from "./types/sh/tangled/repo/setDefaultBranch.js"; 120 + export * as ShTangledRepoTag from "./types/sh/tangled/repo/tag.js"; 121 + export * as ShTangledRepoTags from "./types/sh/tangled/repo/tags.js"; 122 + export * as ShTangledRepoTree from "./types/sh/tangled/repo/tree.js"; 123 + export * as ShTangledSpindle from "./types/sh/tangled/spindle.js"; 124 + export * as ShTangledSpindleListMembers from "./types/sh/tangled/spindle/listMembers.js"; 125 + export * as ShTangledSpindleListMembersBy from "./types/sh/tangled/spindle/listMembersBy.js"; 126 + export * as ShTangledSpindleListSpindles from "./types/sh/tangled/spindle/listSpindles.js"; 127 + export * as ShTangledSpindleMember from "./types/sh/tangled/spindle/member.js"; 128 + export * as ShTangledString from "./types/sh/tangled/string.js"; 129 + export * as ShTangledStringListStrings from "./types/sh/tangled/string/listStrings.js"; 130 + export * as ShTangledSyncListRepos from "./types/sh/tangled/sync/listRepos.js"; 131 + export * as ShTangledSyncRequestCrawl from "./types/sh/tangled/sync/requestCrawl.js";
+120
web/src/lib/api/lexicons/types/sh/tangled/actor/profile.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.literal("self"), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.actor.profile"), 9 + /** 10 + * Small image to be displayed next to posts from account. AKA, 'profile picture' 11 + * @accept image/png, image/jpeg 12 + * @maxSize 1000000 13 + */ 14 + avatar: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.blob(), [ 16 + /*#__PURE__*/ v.blobSize(1000000), 17 + /*#__PURE__*/ v.blobAccept(["image/png", "image/jpeg"]), 18 + ]), 19 + ), 20 + /** 21 + * Include link to this account on Bluesky. 22 + */ 23 + bluesky: /*#__PURE__*/ v.boolean(), 24 + /** 25 + * Free-form profile description text. 26 + * @maxLength 2560 27 + * @maxGraphemes 256 28 + */ 29 + description: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 31 + /*#__PURE__*/ v.stringLength(0, 2560), 32 + /*#__PURE__*/ v.stringGraphemes(0, 256), 33 + ]), 34 + ), 35 + /** 36 + * @minLength 0 37 + * @maxLength 5 38 + */ 39 + links: /*#__PURE__*/ v.optional( 40 + /*#__PURE__*/ v.constrain( 41 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.genericUriString()), 42 + [/*#__PURE__*/ v.arrayLength(0, 5)], 43 + ), 44 + ), 45 + /** 46 + * Free-form location text. 47 + * @maxLength 400 48 + * @maxGraphemes 40 49 + */ 50 + location: /*#__PURE__*/ v.optional( 51 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 52 + /*#__PURE__*/ v.stringLength(0, 400), 53 + /*#__PURE__*/ v.stringGraphemes(0, 40), 54 + ]), 55 + ), 56 + /** 57 + * Pinned repositories. Values are repo DIDs for repos that have them, or AT-URIs for legacy repos. 58 + * @minLength 0 59 + * @maxLength 6 60 + */ 61 + pinnedRepositories: /*#__PURE__*/ v.optional( 62 + /*#__PURE__*/ v.constrain( 63 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 64 + [/*#__PURE__*/ v.arrayLength(0, 6)], 65 + ), 66 + ), 67 + /** 68 + * A handle the user prefers to be displayed as. 69 + * @maxLength 253 70 + */ 71 + preferredHandle: /*#__PURE__*/ v.optional( 72 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.handleString(), [ 73 + /*#__PURE__*/ v.stringLength(0, 253), 74 + ]), 75 + ), 76 + /** 77 + * Preferred gender pronouns. 78 + * @maxLength 40 79 + */ 80 + pronouns: /*#__PURE__*/ v.optional( 81 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 82 + /*#__PURE__*/ v.stringLength(0, 40), 83 + ]), 84 + ), 85 + /** 86 + * @minLength 0 87 + * @maxLength 2 88 + */ 89 + stats: /*#__PURE__*/ v.optional( 90 + /*#__PURE__*/ v.constrain( 91 + /*#__PURE__*/ v.array( 92 + /*#__PURE__*/ v.literalEnum([ 93 + "closed-issue-count", 94 + "closed-pull-request-count", 95 + "merged-pull-request-count", 96 + "open-issue-count", 97 + "open-pull-request-count", 98 + "repository-count", 99 + "star-count", 100 + ]), 101 + ), 102 + [/*#__PURE__*/ v.arrayLength(0, 2)], 103 + ), 104 + ), 105 + }), 106 + ); 107 + 108 + type main$schematype = typeof _mainSchema; 109 + 110 + export interface mainSchema extends main$schematype {} 111 + 112 + export const mainSchema = _mainSchema as mainSchema; 113 + 114 + export interface Main extends v.InferInput<typeof mainSchema> {} 115 + 116 + declare module "@atcute/lexicons/ambient" { 117 + interface Records { 118 + "sh.tangled.actor.profile": mainSchema; 119 + } 120 + }
+42
web/src/lib/api/lexicons/types/sh/tangled/ci/cancelPipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.ci.cancelPipeline", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * pipeline TID 12 + */ 13 + pipeline: /*#__PURE__*/ v.tidString(), 14 + /** 15 + * git repository DID 16 + */ 17 + repo: /*#__PURE__*/ v.didString(), 18 + /** 19 + * Workflow names to filter. When not provided, entire pipeline will be canceled. 20 + */ 21 + workflows: /*#__PURE__*/ v.optional( 22 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 23 + ), 24 + }), 25 + }, 26 + output: null, 27 + }); 28 + 29 + type main$schematype = typeof _mainSchema; 30 + 31 + export interface mainSchema extends main$schematype {} 32 + 33 + export const mainSchema = _mainSchema as mainSchema; 34 + 35 + export interface $params {} 36 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 37 + 38 + declare module "@atcute/lexicons/ambient" { 39 + interface XRPCProcedures { 40 + "sh.tangled.ci.cancelPipeline": mainSchema; 41 + } 42 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/ci/getPipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledCiPipeline from "./pipeline.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.ci.getPipeline", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Spindle-local pipeline id 10 + */ 11 + pipeline: /*#__PURE__*/ v.tidString(), 12 + }), 13 + output: { 14 + type: "lex", 15 + get schema() { 16 + return ShTangledCiPipeline.mainSchema; 17 + }, 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params extends v.InferInput<mainSchema["params"]> {} 28 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.ci.getPipeline": mainSchema; 33 + } 34 + }
+89
web/src/lib/api/lexicons/types/sh/tangled/ci/pipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import * as ShTangledCiTrigger from "./trigger.js"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.ci.pipeline"), 8 + ), 9 + /** 10 + * Commit Id this pipeline is running on 11 + */ 12 + commit: /*#__PURE__*/ v.string(), 13 + createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 14 + /** 15 + * Spindle-local pipeline id 16 + */ 17 + id: /*#__PURE__*/ v.string(), 18 + /** 19 + * Repository DID 20 + */ 21 + repo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 22 + /** 23 + * Repository DID that the commit was checked out from, if different from repo (e.g. a fork for a fork-based pull request) 24 + */ 25 + sourceRepo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 26 + /** 27 + * Trigger event metadata 28 + */ 29 + get trigger() { 30 + return /*#__PURE__*/ v.variant([ 31 + ShTangledCiTrigger.manualSchema, 32 + ShTangledCiTrigger.pullRequestSchema, 33 + ShTangledCiTrigger.pushSchema, 34 + ]); 35 + }, 36 + /** 37 + * Triggered workflows 38 + * @minLength 1 39 + * @maxLength 50 40 + */ 41 + get workflows() { 42 + return /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(workflowSchema), [ 43 + /*#__PURE__*/ v.arrayLength(1, 50), 44 + ]); 45 + }, 46 + }); 47 + const _workflowSchema = /*#__PURE__*/ v.object({ 48 + $type: /*#__PURE__*/ v.optional( 49 + /*#__PURE__*/ v.literal("sh.tangled.ci.pipeline#workflow"), 50 + ), 51 + error: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 52 + finishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 53 + /** 54 + * Spindle-local workflow id. Unique per pipeline, usually same as name. 55 + */ 56 + id: /*#__PURE__*/ v.string(), 57 + /** 58 + * Name of the workflow 59 + * @minGraphemes 1 60 + * @maxGraphemes 40 61 + */ 62 + name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 63 + /*#__PURE__*/ v.stringGraphemes(1, 40), 64 + ]), 65 + startedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 66 + /** 67 + * Workflow status 68 + */ 69 + status: /*#__PURE__*/ v.literalEnum([ 70 + "cancelled", 71 + "failed", 72 + "pending", 73 + "running", 74 + "success", 75 + "timeout", 76 + ]), 77 + }); 78 + 79 + type main$schematype = typeof _mainSchema; 80 + type workflow$schematype = typeof _workflowSchema; 81 + 82 + export interface mainSchema extends main$schematype {} 83 + export interface workflowSchema extends workflow$schematype {} 84 + 85 + export const mainSchema = _mainSchema as mainSchema; 86 + export const workflowSchema = _workflowSchema as workflowSchema; 87 + 88 + export interface Main extends v.InferInput<typeof mainSchema> {} 89 + export interface Workflow extends v.InferInput<typeof workflowSchema> {}
+63
web/src/lib/api/lexicons/types/sh/tangled/ci/queryPipelines.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledCiPipeline from "./pipeline.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.ci.queryPipelines", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Filter pipelines by commits. When provided, maximum one pipeline per commit id will be returned. 10 + */ 11 + commits: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 13 + ), 14 + /** 15 + * Pagination cursor 16 + */ 17 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 18 + /** 19 + * Maximum number of pipelines to return 20 + * @minimum 1 21 + * @maximum 250 22 + * @default 50 23 + */ 24 + limit: /*#__PURE__*/ v.optional( 25 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 26 + /*#__PURE__*/ v.integerRange(1, 250), 27 + ]), 28 + 50, 29 + ), 30 + /** 31 + * DID of the repository 32 + */ 33 + repo: /*#__PURE__*/ v.didString(), 34 + }), 35 + output: { 36 + type: "lex", 37 + schema: /*#__PURE__*/ v.object({ 38 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 39 + get pipelines() { 40 + return /*#__PURE__*/ v.array(ShTangledCiPipeline.mainSchema); 41 + }, 42 + /** 43 + * Maximum number of pipelines 44 + */ 45 + total: /*#__PURE__*/ v.integer(), 46 + }), 47 + }, 48 + }); 49 + 50 + type main$schematype = typeof _mainSchema; 51 + 52 + export interface mainSchema extends main$schematype {} 53 + 54 + export const mainSchema = _mainSchema as mainSchema; 55 + 56 + export interface $params extends v.InferInput<mainSchema["params"]> {} 57 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 58 + 59 + declare module "@atcute/lexicons/ambient" { 60 + interface XRPCQueries { 61 + "sh.tangled.ci.queryPipelines": mainSchema; 62 + } 63 + }
+95
web/src/lib/api/lexicons/types/sh/tangled/ci/subscribePipelineLogs.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _controlSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.ci.subscribePipelineLogs#control"), 8 + ), 9 + /** 10 + * Step command 11 + */ 12 + command: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 13 + content: /*#__PURE__*/ v.string(), 14 + /** 15 + * Step kind 16 + */ 17 + kind: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.literalEnum(["system", "user"]), 19 + ), 20 + /** 21 + * Step status 22 + */ 23 + status: /*#__PURE__*/ v.optional( 24 + /*#__PURE__*/ v.literalEnum(["end", "start"]), 25 + ), 26 + /** 27 + * Step ID 28 + */ 29 + step: /*#__PURE__*/ v.integer(), 30 + time: /*#__PURE__*/ v.datetimeString(), 31 + /** 32 + * workflow name 33 + */ 34 + workflow: /*#__PURE__*/ v.string(), 35 + }); 36 + const _dataSchema = /*#__PURE__*/ v.object({ 37 + $type: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.literal("sh.tangled.ci.subscribePipelineLogs#data"), 39 + ), 40 + content: /*#__PURE__*/ v.string(), 41 + /** 42 + * Step ID 43 + */ 44 + step: /*#__PURE__*/ v.integer(), 45 + stream: /*#__PURE__*/ v.literalEnum(["stderr", "stdout"]), 46 + time: /*#__PURE__*/ v.datetimeString(), 47 + /** 48 + * workflow name 49 + */ 50 + workflow: /*#__PURE__*/ v.string(), 51 + }); 52 + const _mainSchema = /*#__PURE__*/ v.subscription( 53 + "sh.tangled.ci.subscribePipelineLogs", 54 + { 55 + params: /*#__PURE__*/ v.object({ 56 + /** 57 + * Pipeline ID 58 + */ 59 + pipeline: /*#__PURE__*/ v.tidString(), 60 + /** 61 + * filter logs by specific workflows 62 + */ 63 + workflows: /*#__PURE__*/ v.optional( 64 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 65 + ), 66 + }), 67 + get message() { 68 + return /*#__PURE__*/ v.variant([controlSchema, dataSchema]); 69 + }, 70 + }, 71 + ); 72 + 73 + type control$schematype = typeof _controlSchema; 74 + type data$schematype = typeof _dataSchema; 75 + type main$schematype = typeof _mainSchema; 76 + 77 + export interface controlSchema extends control$schematype {} 78 + export interface dataSchema extends data$schematype {} 79 + export interface mainSchema extends main$schematype {} 80 + 81 + export const controlSchema = _controlSchema as controlSchema; 82 + export const dataSchema = _dataSchema as dataSchema; 83 + export const mainSchema = _mainSchema as mainSchema; 84 + 85 + export interface Control extends v.InferInput<typeof controlSchema> {} 86 + export interface Data extends v.InferInput<typeof dataSchema> {} 87 + 88 + export interface $params extends v.InferInput<mainSchema["params"]> {} 89 + export type $message = v.InferInput<mainSchema["message"]>; 90 + 91 + declare module "@atcute/lexicons/ambient" { 92 + interface XRPCSubscriptions { 93 + "sh.tangled.ci.subscribePipelineLogs": mainSchema; 94 + } 95 + }
+96
web/src/lib/api/lexicons/types/sh/tangled/ci/trigger.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _manualSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional( 6 + /*#__PURE__*/ v.literal("sh.tangled.ci.trigger#manual"), 7 + ), 8 + get inputs() { 9 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(pairSchema)); 10 + }, 11 + /** 12 + * optional ref the SHA was resolved from, for display and TANGLED_REF 13 + */ 14 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 15 + /** 16 + * commit SHA the manual run targets 17 + * @minLength 40 18 + * @maxLength 40 19 + */ 20 + sha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 21 + /*#__PURE__*/ v.stringLength(40, 40), 22 + ]), 23 + /** 24 + * Repository DID to check out code and workflow definitions from, if different from the target repo. 25 + */ 26 + sourceRepo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 27 + }); 28 + const _pairSchema = /*#__PURE__*/ v.object({ 29 + $type: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.literal("sh.tangled.ci.trigger#pair"), 31 + ), 32 + key: /*#__PURE__*/ v.string(), 33 + value: /*#__PURE__*/ v.string(), 34 + }); 35 + const _pullRequestSchema = /*#__PURE__*/ v.object({ 36 + $type: /*#__PURE__*/ v.optional( 37 + /*#__PURE__*/ v.literal("sh.tangled.ci.trigger#pullRequest"), 38 + ), 39 + /** 40 + * AT-URI of the sh.tangled.repo.pull record this run belongs to 41 + */ 42 + pull: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 43 + sourceBranch: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 44 + /** 45 + * Repository DID to check out code and workflow definitions from, if different from the target repo. 46 + */ 47 + sourceRepo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 48 + /** 49 + * @minLength 40 50 + * @maxLength 40 51 + */ 52 + sourceSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 53 + /*#__PURE__*/ v.stringLength(40, 40), 54 + ]), 55 + targetBranch: /*#__PURE__*/ v.string(), 56 + }); 57 + const _pushSchema = /*#__PURE__*/ v.object({ 58 + $type: /*#__PURE__*/ v.optional( 59 + /*#__PURE__*/ v.literal("sh.tangled.ci.trigger#push"), 60 + ), 61 + /** 62 + * @minLength 40 63 + * @maxLength 40 64 + */ 65 + newSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 66 + /*#__PURE__*/ v.stringLength(40, 40), 67 + ]), 68 + /** 69 + * @minLength 40 70 + * @maxLength 40 71 + */ 72 + oldSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 73 + /*#__PURE__*/ v.stringLength(40, 40), 74 + ]), 75 + ref: /*#__PURE__*/ v.string(), 76 + }); 77 + 78 + type manual$schematype = typeof _manualSchema; 79 + type pair$schematype = typeof _pairSchema; 80 + type pullRequest$schematype = typeof _pullRequestSchema; 81 + type push$schematype = typeof _pushSchema; 82 + 83 + export interface manualSchema extends manual$schematype {} 84 + export interface pairSchema extends pair$schematype {} 85 + export interface pullRequestSchema extends pullRequest$schematype {} 86 + export interface pushSchema extends push$schematype {} 87 + 88 + export const manualSchema = _manualSchema as manualSchema; 89 + export const pairSchema = _pairSchema as pairSchema; 90 + export const pullRequestSchema = _pullRequestSchema as pullRequestSchema; 91 + export const pushSchema = _pushSchema as pushSchema; 92 + 93 + export interface Manual extends v.InferInput<typeof manualSchema> {} 94 + export interface Pair extends v.InferInput<typeof pairSchema> {} 95 + export interface PullRequest extends v.InferInput<typeof pullRequestSchema> {} 96 + export interface Push extends v.InferInput<typeof pushSchema> {}
+57
web/src/lib/api/lexicons/types/sh/tangled/ci/triggerPipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledCiTrigger from "./trigger.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.ci.triggerPipeline", { 7 + params: null, 8 + input: { 9 + type: "lex", 10 + schema: /*#__PURE__*/ v.object({ 11 + /** 12 + * Target repository DID. Auth is checked against this repo. 13 + */ 14 + repo: /*#__PURE__*/ v.didString(), 15 + /** 16 + * Trigger metadata for this dispatch. 17 + */ 18 + get trigger() { 19 + return /*#__PURE__*/ v.variant([ 20 + ShTangledCiTrigger.manualSchema, 21 + ShTangledCiTrigger.pullRequestSchema, 22 + ]); 23 + }, 24 + /** 25 + * Workflow names to run. When not provided, every dispatchable workflow is run. 26 + */ 27 + workflows: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 29 + ), 30 + }), 31 + }, 32 + output: { 33 + type: "lex", 34 + schema: /*#__PURE__*/ v.object({ 35 + /** 36 + * AT-URI of the created pipeline 37 + */ 38 + pipeline: /*#__PURE__*/ v.resourceUriString(), 39 + }), 40 + }, 41 + }); 42 + 43 + type main$schematype = typeof _mainSchema; 44 + 45 + export interface mainSchema extends main$schematype {} 46 + 47 + export const mainSchema = _mainSchema as mainSchema; 48 + 49 + export interface $params {} 50 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 51 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 52 + 53 + declare module "@atcute/lexicons/ambient" { 54 + interface XRPCProcedures { 55 + "sh.tangled.ci.triggerPipeline": mainSchema; 56 + } 57 + }
+41
web/src/lib/api/lexicons/types/sh/tangled/feed/comment.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ComAtprotoRepoStrongRef from "@atcute/atproto/types/repo/strongRef"; 5 + import * as ShTangledMarkupMarkdown from "../markup/markdown.js"; 6 + 7 + const _mainSchema = /*#__PURE__*/ v.record( 8 + /*#__PURE__*/ v.tidString(), 9 + /*#__PURE__*/ v.object({ 10 + $type: /*#__PURE__*/ v.literal("sh.tangled.feed.comment"), 11 + get body() { 12 + return /*#__PURE__*/ v.variant([ShTangledMarkupMarkdown.mainSchema]); 13 + }, 14 + createdAt: /*#__PURE__*/ v.datetimeString(), 15 + /** 16 + * optional pull submission round index. required when subject is sh.tangled.repo.pull 17 + * @minimum 0 18 + */ 19 + pullRoundIdx: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 20 + get replyTo() { 21 + return /*#__PURE__*/ v.optional(ComAtprotoRepoStrongRef.mainSchema); 22 + }, 23 + get subject() { 24 + return ComAtprotoRepoStrongRef.mainSchema; 25 + }, 26 + }), 27 + ); 28 + 29 + type main$schematype = typeof _mainSchema; 30 + 31 + export interface mainSchema extends main$schematype {} 32 + 33 + export const mainSchema = _mainSchema as mainSchema; 34 + 35 + export interface Main extends v.InferInput<typeof mainSchema> {} 36 + 37 + declare module "@atcute/lexicons/ambient" { 38 + interface Records { 39 + "sh.tangled.feed.comment": mainSchema; 40 + } 41 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/feed/listComments.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.feed.listComments#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.feed.comment record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listComments", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Record AT-URI the comments are attached to. 43 + */ 44 + subject: /*#__PURE__*/ v.resourceUriString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.feed.listComments": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/feed/listCommentsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledFeedListComments from "./listComments.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listCommentsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose comment authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledFeedListComments.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.feed.listCommentsBy": mainSchema; 59 + } 60 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/feed/listReactions.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.feed.listReactions#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.feed.reaction record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listReactions", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Record AT-URI the reactions target. 43 + */ 44 + subject: /*#__PURE__*/ v.resourceUriString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.feed.listReactions": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/feed/listReactionsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledFeedListReactions from "./listReactions.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listReactionsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose reaction authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledFeedListReactions.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.feed.listReactionsBy": mainSchema; 59 + } 60 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/feed/listStars.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.feed.listStars#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.feed.star record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listStars", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Repo DID to list star edges for. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.feed.listStars": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/feed/listStarsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledFeedListStars from "./listStars.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.feed.listStarsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose star authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledFeedListStars.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.feed.listStarsBy": mainSchema; 59 + } 60 + }
+36
web/src/lib/api/lexicons/types/sh/tangled/feed/reaction.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.feed.reaction"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + reaction: /*#__PURE__*/ v.literalEnum([ 11 + "❤️", 12 + "🎉", 13 + "👀", 14 + "👍", 15 + "👎", 16 + "😆", 17 + "🚀", 18 + "🫤", 19 + ]), 20 + subject: /*#__PURE__*/ v.resourceUriString(), 21 + }), 22 + ); 23 + 24 + type main$schematype = typeof _mainSchema; 25 + 26 + export interface mainSchema extends main$schematype {} 27 + 28 + export const mainSchema = _mainSchema as mainSchema; 29 + 30 + export interface Main extends v.InferInput<typeof mainSchema> {} 31 + 32 + declare module "@atcute/lexicons/ambient" { 33 + interface Records { 34 + "sh.tangled.feed.reaction": mainSchema; 35 + } 36 + }
+48
web/src/lib/api/lexicons/types/sh/tangled/feed/star.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.feed.star"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + get subject() { 11 + return /*#__PURE__*/ v.variant([repoSchema, stringSchema], true); 12 + }, 13 + }), 14 + ); 15 + const _repoSchema = /*#__PURE__*/ v.object({ 16 + $type: /*#__PURE__*/ v.optional( 17 + /*#__PURE__*/ v.literal("sh.tangled.feed.star#repo"), 18 + ), 19 + did: /*#__PURE__*/ v.didString(), 20 + }); 21 + const _stringSchema = /*#__PURE__*/ v.object({ 22 + $type: /*#__PURE__*/ v.optional( 23 + /*#__PURE__*/ v.literal("sh.tangled.feed.star#string"), 24 + ), 25 + uri: /*#__PURE__*/ v.resourceUriString(), 26 + }); 27 + 28 + type main$schematype = typeof _mainSchema; 29 + type repo$schematype = typeof _repoSchema; 30 + type string$schematype = typeof _stringSchema; 31 + 32 + export interface mainSchema extends main$schematype {} 33 + export interface repoSchema extends repo$schematype {} 34 + export interface stringSchema extends string$schematype {} 35 + 36 + export const mainSchema = _mainSchema as mainSchema; 37 + export const repoSchema = _repoSchema as repoSchema; 38 + export const stringSchema = _stringSchema as stringSchema; 39 + 40 + export interface Main extends v.InferInput<typeof mainSchema> {} 41 + export interface Repo extends v.InferInput<typeof repoSchema> {} 42 + export interface String extends v.InferInput<typeof stringSchema> {} 43 + 44 + declare module "@atcute/lexicons/ambient" { 45 + interface Records { 46 + "sh.tangled.feed.star": mainSchema; 47 + } 48 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/git/listRefUpdates.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.listRefUpdates#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.git.refUpdate record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.listRefUpdates", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Repo DID whose ref-update records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.git.listRefUpdates": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/git/listRefUpdatesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitListRefUpdates from "./listRefUpdates.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.listRefUpdatesBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose ref-update authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledGitListRefUpdates.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.git.listRefUpdatesBy": mainSchema; 59 + } 60 + }
+120
web/src/lib/api/lexicons/types/sh/tangled/git/listRefs.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _defaultBranchSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.listRefs#defaultBranch"), 8 + ), 9 + /** 10 + * Commit SHA at the tip of the default branch, for reconciling against a last-known state. Width depends on the repo's git object-format. 11 + * @minLength 40 12 + * @maxLength 128 13 + */ 14 + head: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 16 + /*#__PURE__*/ v.stringLength(40, 128), 17 + ]), 18 + ), 19 + /** 20 + * Default branch ref name that HEAD points at, eg. refs/heads/main. 21 + * @maxLength 2560 22 + * @maxGraphemes 256 23 + */ 24 + ref: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 25 + /*#__PURE__*/ v.stringLength(0, 2560), 26 + /*#__PURE__*/ v.stringGraphemes(0, 256), 27 + ]), 28 + }); 29 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.listRefs", { 30 + params: /*#__PURE__*/ v.object({ 31 + /** 32 + * Pagination cursor 33 + */ 34 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 35 + /** 36 + * Maximum number of refs to return in this page 37 + * @minimum 1 38 + * @maximum 1000 39 + * @default 100 40 + */ 41 + limit: /*#__PURE__*/ v.optional( 42 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 43 + /*#__PURE__*/ v.integerRange(1, 1000), 44 + ]), 45 + 100, 46 + ), 47 + /** 48 + * DID of the git repo as minted by the knot 49 + */ 50 + repo: /*#__PURE__*/ v.didString(), 51 + }), 52 + output: { 53 + type: "lex", 54 + schema: /*#__PURE__*/ v.object({ 55 + /** 56 + * Cursor for the next page, absent when the last page is reached 57 + */ 58 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 59 + get defaultBranch() { 60 + return /*#__PURE__*/ v.optional(defaultBranchSchema); 61 + }, 62 + /** 63 + * @maxLength 1000 64 + */ 65 + get refs() { 66 + return /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(refSchema), [ 67 + /*#__PURE__*/ v.arrayLength(0, 1000), 68 + ]); 69 + }, 70 + }), 71 + }, 72 + }); 73 + const _refSchema = /*#__PURE__*/ v.object({ 74 + $type: /*#__PURE__*/ v.optional( 75 + /*#__PURE__*/ v.literal("sh.tangled.git.listRefs#ref"), 76 + ), 77 + /** 78 + * Full ref name, eg. refs/heads/main or refs/tags/v1.0 79 + * @maxLength 2560 80 + * @maxGraphemes 256 81 + */ 82 + ref: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 83 + /*#__PURE__*/ v.stringLength(0, 2560), 84 + /*#__PURE__*/ v.stringGraphemes(0, 256), 85 + ]), 86 + /** 87 + * Object SHA the ref points at. Width depends on the repo's git object-format. 88 + * @minLength 40 89 + * @maxLength 128 90 + */ 91 + sha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 92 + /*#__PURE__*/ v.stringLength(40, 128), 93 + ]), 94 + }); 95 + 96 + type defaultBranch$schematype = typeof _defaultBranchSchema; 97 + type main$schematype = typeof _mainSchema; 98 + type ref$schematype = typeof _refSchema; 99 + 100 + export interface defaultBranchSchema extends defaultBranch$schematype {} 101 + export interface mainSchema extends main$schematype {} 102 + export interface refSchema extends ref$schematype {} 103 + 104 + export const defaultBranchSchema = _defaultBranchSchema as defaultBranchSchema; 105 + export const mainSchema = _mainSchema as mainSchema; 106 + export const refSchema = _refSchema as refSchema; 107 + 108 + export interface DefaultBranch extends v.InferInput< 109 + typeof defaultBranchSchema 110 + > {} 111 + export interface Ref extends v.InferInput<typeof refSchema> {} 112 + 113 + export interface $params extends v.InferInput<mainSchema["params"]> {} 114 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 115 + 116 + declare module "@atcute/lexicons/ambient" { 117 + interface XRPCQueries { 118 + "sh.tangled.git.listRefs": mainSchema; 119 + } 120 + }
+174
web/src/lib/api/lexicons/types/sh/tangled/git/refUpdate.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _commitCountBreakdownSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.refUpdate#commitCountBreakdown"), 8 + ), 9 + get byEmail() { 10 + return /*#__PURE__*/ v.optional( 11 + /*#__PURE__*/ v.array(individualEmailCommitCountSchema), 12 + ); 13 + }, 14 + }); 15 + const _individualEmailCommitCountSchema = /*#__PURE__*/ v.object({ 16 + $type: /*#__PURE__*/ v.optional( 17 + /*#__PURE__*/ v.literal( 18 + "sh.tangled.git.refUpdate#individualEmailCommitCount", 19 + ), 20 + ), 21 + count: /*#__PURE__*/ v.integer(), 22 + email: /*#__PURE__*/ v.string(), 23 + }); 24 + const _individualLanguageSizeSchema = /*#__PURE__*/ v.object({ 25 + $type: /*#__PURE__*/ v.optional( 26 + /*#__PURE__*/ v.literal("sh.tangled.git.refUpdate#individualLanguageSize"), 27 + ), 28 + lang: /*#__PURE__*/ v.string(), 29 + size: /*#__PURE__*/ v.integer(), 30 + }); 31 + const _langBreakdownSchema = /*#__PURE__*/ v.object({ 32 + $type: /*#__PURE__*/ v.optional( 33 + /*#__PURE__*/ v.literal("sh.tangled.git.refUpdate#langBreakdown"), 34 + ), 35 + get inputs() { 36 + return /*#__PURE__*/ v.optional( 37 + /*#__PURE__*/ v.array(individualLanguageSizeSchema), 38 + ); 39 + }, 40 + }); 41 + const _mainSchema = /*#__PURE__*/ v.record( 42 + /*#__PURE__*/ v.tidString(), 43 + /*#__PURE__*/ v.object({ 44 + $type: /*#__PURE__*/ v.literal("sh.tangled.git.refUpdate"), 45 + /** 46 + * files changed between commits 47 + */ 48 + changedFiles: /*#__PURE__*/ v.optional( 49 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 50 + ), 51 + /** 52 + * did of the user that pushed this ref 53 + */ 54 + committerDid: /*#__PURE__*/ v.didString(), 55 + get meta() { 56 + return metaSchema; 57 + }, 58 + /** 59 + * new SHA of this ref 60 + * @minLength 40 61 + * @maxLength 40 62 + */ 63 + newSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 64 + /*#__PURE__*/ v.stringLength(40, 40), 65 + ]), 66 + /** 67 + * old SHA of this ref 68 + * @minLength 40 69 + * @maxLength 40 70 + */ 71 + oldSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 72 + /*#__PURE__*/ v.stringLength(40, 40), 73 + ]), 74 + /** 75 + * did of the owner of the repo 76 + */ 77 + ownerDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 78 + /** 79 + * push options passed on git-push 80 + * @maxLength 50 81 + */ 82 + pushOptions: /*#__PURE__*/ v.optional( 83 + /*#__PURE__*/ v.constrain( 84 + /*#__PURE__*/ v.array( 85 + /*#__PURE__*/ v.constrain( 86 + /*#__PURE__*/ v.string< 87 + | "ci-skip" 88 + | "ci-verbose" 89 + | "skip-ci" 90 + | "verbose-ci" 91 + | (string & {}) 92 + >(), 93 + [/*#__PURE__*/ v.stringLength(0, 1024)], 94 + ), 95 + ), 96 + [/*#__PURE__*/ v.arrayLength(0, 50)], 97 + ), 98 + ), 99 + /** 100 + * Ref being updated 101 + * @maxLength 2560 102 + * @maxGraphemes 256 103 + */ 104 + ref: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 105 + /*#__PURE__*/ v.stringLength(0, 2560), 106 + /*#__PURE__*/ v.stringGraphemes(0, 256), 107 + ]), 108 + /** 109 + * DID of the repo itself 110 + */ 111 + repo: /*#__PURE__*/ v.didString(), 112 + }), 113 + ); 114 + const _metaSchema = /*#__PURE__*/ v.object({ 115 + $type: /*#__PURE__*/ v.optional( 116 + /*#__PURE__*/ v.literal("sh.tangled.git.refUpdate#meta"), 117 + ), 118 + get commitCount() { 119 + return commitCountBreakdownSchema; 120 + }, 121 + /** 122 + * @default false 123 + */ 124 + isDefaultRef: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), false), 125 + get langBreakdown() { 126 + return /*#__PURE__*/ v.optional(langBreakdownSchema); 127 + }, 128 + }); 129 + 130 + type commitCountBreakdown$schematype = typeof _commitCountBreakdownSchema; 131 + type individualEmailCommitCount$schematype = 132 + typeof _individualEmailCommitCountSchema; 133 + type individualLanguageSize$schematype = typeof _individualLanguageSizeSchema; 134 + type langBreakdown$schematype = typeof _langBreakdownSchema; 135 + type main$schematype = typeof _mainSchema; 136 + type meta$schematype = typeof _metaSchema; 137 + 138 + export interface commitCountBreakdownSchema extends commitCountBreakdown$schematype {} 139 + export interface individualEmailCommitCountSchema extends individualEmailCommitCount$schematype {} 140 + export interface individualLanguageSizeSchema extends individualLanguageSize$schematype {} 141 + export interface langBreakdownSchema extends langBreakdown$schematype {} 142 + export interface mainSchema extends main$schematype {} 143 + export interface metaSchema extends meta$schematype {} 144 + 145 + export const commitCountBreakdownSchema = 146 + _commitCountBreakdownSchema as commitCountBreakdownSchema; 147 + export const individualEmailCommitCountSchema = 148 + _individualEmailCommitCountSchema as individualEmailCommitCountSchema; 149 + export const individualLanguageSizeSchema = 150 + _individualLanguageSizeSchema as individualLanguageSizeSchema; 151 + export const langBreakdownSchema = _langBreakdownSchema as langBreakdownSchema; 152 + export const mainSchema = _mainSchema as mainSchema; 153 + export const metaSchema = _metaSchema as metaSchema; 154 + 155 + export interface CommitCountBreakdown extends v.InferInput< 156 + typeof commitCountBreakdownSchema 157 + > {} 158 + export interface IndividualEmailCommitCount extends v.InferInput< 159 + typeof individualEmailCommitCountSchema 160 + > {} 161 + export interface IndividualLanguageSize extends v.InferInput< 162 + typeof individualLanguageSizeSchema 163 + > {} 164 + export interface LangBreakdown extends v.InferInput< 165 + typeof langBreakdownSchema 166 + > {} 167 + export interface Main extends v.InferInput<typeof mainSchema> {} 168 + export interface Meta extends v.InferInput<typeof metaSchema> {} 169 + 170 + declare module "@atcute/lexicons/ambient" { 171 + interface Records { 172 + "sh.tangled.git.refUpdate": mainSchema; 173 + } 174 + }
+70
web/src/lib/api/lexicons/types/sh/tangled/git/temp/analyzeMerge.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _conflictInfoSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.analyzeMerge#conflictInfo"), 8 + ), 9 + /** 10 + * Name of the conflicted file 11 + */ 12 + filename: /*#__PURE__*/ v.string(), 13 + /** 14 + * Reason for the conflict 15 + */ 16 + reason: /*#__PURE__*/ v.string(), 17 + }); 18 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.analyzeMerge", { 19 + params: /*#__PURE__*/ v.object({ 20 + /** 21 + * Target branch to merge into 22 + */ 23 + branch: /*#__PURE__*/ v.string(), 24 + /** 25 + * Patch or pull request to check for merge conflicts 26 + */ 27 + patch: /*#__PURE__*/ v.string(), 28 + /** 29 + * DID of the repository 30 + */ 31 + repo: /*#__PURE__*/ v.didString(), 32 + }), 33 + output: { 34 + type: "lex", 35 + schema: /*#__PURE__*/ v.object({ 36 + /** 37 + * List of files with merge conflicts 38 + */ 39 + get conflicts() { 40 + return /*#__PURE__*/ v.optional( 41 + /*#__PURE__*/ v.array(conflictInfoSchema), 42 + ); 43 + }, 44 + /** 45 + * Whether the merge has conflicts 46 + */ 47 + is_conflicted: /*#__PURE__*/ v.boolean(), 48 + }), 49 + }, 50 + }); 51 + 52 + type conflictInfo$schematype = typeof _conflictInfoSchema; 53 + type main$schematype = typeof _mainSchema; 54 + 55 + export interface conflictInfoSchema extends conflictInfo$schematype {} 56 + export interface mainSchema extends main$schematype {} 57 + 58 + export const conflictInfoSchema = _conflictInfoSchema as conflictInfoSchema; 59 + export const mainSchema = _mainSchema as mainSchema; 60 + 61 + export interface ConflictInfo extends v.InferInput<typeof conflictInfoSchema> {} 62 + 63 + export interface $params extends v.InferInput<mainSchema["params"]> {} 64 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 65 + 66 + declare module "@atcute/lexicons/ambient" { 67 + interface XRPCQueries { 68 + "sh.tangled.git.temp.analyzeMerge": mainSchema; 69 + } 70 + }
+113
web/src/lib/api/lexicons/types/sh/tangled/git/temp/defs.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _branchSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional( 6 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.defs#branch"), 7 + ), 8 + /** 9 + * hydrated commit object 10 + */ 11 + get commit() { 12 + return commitSchema; 13 + }, 14 + /** 15 + * branch name 16 + */ 17 + name: /*#__PURE__*/ v.string(), 18 + }); 19 + const _commitSchema = /*#__PURE__*/ v.object({ 20 + $type: /*#__PURE__*/ v.optional( 21 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.defs#commit"), 22 + ), 23 + get author() { 24 + return signatureSchema; 25 + }, 26 + get committer() { 27 + return signatureSchema; 28 + }, 29 + get hash() { 30 + return hashSchema; 31 + }, 32 + message: /*#__PURE__*/ v.string(), 33 + get tree() { 34 + return hashSchema; 35 + }, 36 + }); 37 + const _hashSchema = /*#__PURE__*/ v.string(); 38 + const _signatureSchema = /*#__PURE__*/ v.object({ 39 + $type: /*#__PURE__*/ v.optional( 40 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.defs#signature"), 41 + ), 42 + /** 43 + * Person email 44 + */ 45 + email: /*#__PURE__*/ v.string(), 46 + /** 47 + * Person name 48 + */ 49 + name: /*#__PURE__*/ v.string(), 50 + /** 51 + * Timestamp of the signature 52 + */ 53 + when: /*#__PURE__*/ v.datetimeString(), 54 + }); 55 + const _submoduleSchema = /*#__PURE__*/ v.object({ 56 + $type: /*#__PURE__*/ v.optional( 57 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.defs#submodule"), 58 + ), 59 + /** 60 + * Branch to track in the submodule 61 + */ 62 + branch: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 63 + /** 64 + * Submodule name 65 + */ 66 + name: /*#__PURE__*/ v.string(), 67 + /** 68 + * Submodule repository URL 69 + */ 70 + url: /*#__PURE__*/ v.string(), 71 + }); 72 + const _tagSchema = /*#__PURE__*/ v.object({ 73 + $type: /*#__PURE__*/ v.optional( 74 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.defs#tag"), 75 + ), 76 + message: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 77 + /** 78 + * tag name 79 + */ 80 + name: /*#__PURE__*/ v.string(), 81 + get tagger() { 82 + return signatureSchema; 83 + }, 84 + target: /*#__PURE__*/ v.unknown(), 85 + }); 86 + 87 + type branch$schematype = typeof _branchSchema; 88 + type commit$schematype = typeof _commitSchema; 89 + type hash$schematype = typeof _hashSchema; 90 + type signature$schematype = typeof _signatureSchema; 91 + type submodule$schematype = typeof _submoduleSchema; 92 + type tag$schematype = typeof _tagSchema; 93 + 94 + export interface branchSchema extends branch$schematype {} 95 + export interface commitSchema extends commit$schematype {} 96 + export interface hashSchema extends hash$schematype {} 97 + export interface signatureSchema extends signature$schematype {} 98 + export interface submoduleSchema extends submodule$schematype {} 99 + export interface tagSchema extends tag$schematype {} 100 + 101 + export const branchSchema = _branchSchema as branchSchema; 102 + export const commitSchema = _commitSchema as commitSchema; 103 + export const hashSchema = _hashSchema as hashSchema; 104 + export const signatureSchema = _signatureSchema as signatureSchema; 105 + export const submoduleSchema = _submoduleSchema as submoduleSchema; 106 + export const tagSchema = _tagSchema as tagSchema; 107 + 108 + export interface Branch extends v.InferInput<typeof branchSchema> {} 109 + export interface Commit extends v.InferInput<typeof commitSchema> {} 110 + export type Hash = v.InferInput<typeof hashSchema>; 111 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 112 + export interface Submodule extends v.InferInput<typeof submoduleSchema> {} 113 + export interface Tag extends v.InferInput<typeof tagSchema> {}
+52
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getArchive.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getArchive", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Archive format 9 + * @default "tar.gz" 10 + */ 11 + format: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.literalEnum([ 13 + "tar", 14 + "tar.bz2", 15 + "tar.gz", 16 + "tar.xz", 17 + "zip", 18 + ]), 19 + "tar.gz", 20 + ), 21 + /** 22 + * Prefix for files in the archive 23 + */ 24 + prefix: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 25 + /** 26 + * Git reference (branch, tag, or commit SHA) 27 + */ 28 + ref: /*#__PURE__*/ v.string(), 29 + /** 30 + * DID of the repository 31 + */ 32 + repo: /*#__PURE__*/ v.didString(), 33 + }), 34 + output: { 35 + type: "blob", 36 + }, 37 + }); 38 + 39 + type main$schematype = typeof _mainSchema; 40 + 41 + export interface mainSchema extends main$schematype {} 42 + 43 + export const mainSchema = _mainSchema as mainSchema; 44 + 45 + export interface $params extends v.InferInput<mainSchema["params"]> {} 46 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 47 + 48 + declare module "@atcute/lexicons/ambient" { 49 + interface XRPCQueries { 50 + "sh.tangled.git.temp.getArchive": mainSchema; 51 + } 52 + }
+39
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getBlob.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getBlob", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Path within the repository tree 9 + */ 10 + path: /*#__PURE__*/ v.string(), 11 + /** 12 + * Git reference (branch, tag, or commit SHA) 13 + * @default "HEAD" 14 + */ 15 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "HEAD"), 16 + /** 17 + * DID of the repository 18 + */ 19 + repo: /*#__PURE__*/ v.didString(), 20 + }), 21 + output: { 22 + type: "blob", 23 + }, 24 + }); 25 + 26 + type main$schematype = typeof _mainSchema; 27 + 28 + export interface mainSchema extends main$schematype {} 29 + 30 + export const mainSchema = _mainSchema as mainSchema; 31 + 32 + export interface $params extends v.InferInput<mainSchema["params"]> {} 33 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 34 + 35 + declare module "@atcute/lexicons/ambient" { 36 + interface XRPCQueries { 37 + "sh.tangled.git.temp.getBlob": mainSchema; 38 + } 39 + }
+56
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getBranch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitTempDefs from "./defs.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getBranch", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Branch name to get information for 10 + */ 11 + name: /*#__PURE__*/ v.string(), 12 + /** 13 + * DID of the repository 14 + */ 15 + repo: /*#__PURE__*/ v.didString(), 16 + }), 17 + output: { 18 + type: "lex", 19 + schema: /*#__PURE__*/ v.object({ 20 + get author() { 21 + return /*#__PURE__*/ v.optional(ShTangledGitTempDefs.signatureSchema); 22 + }, 23 + /** 24 + * Latest commit hash on this branch 25 + */ 26 + hash: /*#__PURE__*/ v.string(), 27 + /** 28 + * Latest commit message 29 + */ 30 + message: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 31 + /** 32 + * Branch name 33 + */ 34 + name: /*#__PURE__*/ v.string(), 35 + /** 36 + * Timestamp of latest commit 37 + */ 38 + when: /*#__PURE__*/ v.datetimeString(), 39 + }), 40 + }, 41 + }); 42 + 43 + type main$schematype = typeof _mainSchema; 44 + 45 + export interface mainSchema extends main$schematype {} 46 + 47 + export const mainSchema = _mainSchema as mainSchema; 48 + 49 + export interface $params extends v.InferInput<mainSchema["params"]> {} 50 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 51 + 52 + declare module "@atcute/lexicons/ambient" { 53 + interface XRPCQueries { 54 + "sh.tangled.git.temp.getBranch": mainSchema; 55 + } 56 + }
+38
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getCommit.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitTempDefs from "./defs.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getCommit", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * reference name to resolve 10 + */ 11 + ref: /*#__PURE__*/ v.string(), 12 + /** 13 + * DID of the repository 14 + */ 15 + repo: /*#__PURE__*/ v.didString(), 16 + }), 17 + output: { 18 + type: "lex", 19 + get schema() { 20 + return ShTangledGitTempDefs.commitSchema; 21 + }, 22 + }, 23 + }); 24 + 25 + type main$schematype = typeof _mainSchema; 26 + 27 + export interface mainSchema extends main$schematype {} 28 + 29 + export const mainSchema = _mainSchema as mainSchema; 30 + 31 + export interface $params extends v.InferInput<mainSchema["params"]> {} 32 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 33 + 34 + declare module "@atcute/lexicons/ambient" { 35 + interface XRPCQueries { 36 + "sh.tangled.git.temp.getCommit": mainSchema; 37 + } 38 + }
+38
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getDiff.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getDiff", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * DID of the repository 9 + */ 10 + repo: /*#__PURE__*/ v.didString(), 11 + /** 12 + * First revision (commit, branch, or tag) 13 + */ 14 + rev1: /*#__PURE__*/ v.string(), 15 + /** 16 + * Second revision (commit, branch, or tag) 17 + */ 18 + rev2: /*#__PURE__*/ v.string(), 19 + }), 20 + output: { 21 + type: "blob", 22 + }, 23 + }); 24 + 25 + type main$schematype = typeof _mainSchema; 26 + 27 + export interface mainSchema extends main$schematype {} 28 + 29 + export const mainSchema = _mainSchema as mainSchema; 30 + 31 + export interface $params extends v.InferInput<mainSchema["params"]> {} 32 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 33 + 34 + declare module "@atcute/lexicons/ambient" { 35 + interface XRPCQueries { 36 + "sh.tangled.git.temp.getDiff": mainSchema; 37 + } 38 + }
+68
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getEntry.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitTempDefs from "./defs.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getEntry", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * path of the entity 10 + */ 11 + path: /*#__PURE__*/ v.string(), 12 + /** 13 + * Git revision (branch, tag, or commit id) 14 + * @default "HEAD" 15 + */ 16 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "HEAD"), 17 + /** 18 + * DID of the repository 19 + */ 20 + repo: /*#__PURE__*/ v.didString(), 21 + }), 22 + output: { 23 + type: "lex", 24 + schema: /*#__PURE__*/ v.object({ 25 + get lastCommit() { 26 + return /*#__PURE__*/ v.optional(ShTangledGitTempDefs.commitSchema); 27 + }, 28 + mode: /*#__PURE__*/ v.literalEnum([ 29 + "0040000", 30 + "0100644", 31 + "0100664", 32 + "0100755", 33 + "0120000", 34 + "0160000", 35 + ]), 36 + /** 37 + * The file name 38 + */ 39 + name: /*#__PURE__*/ v.string(), 40 + oid: /*#__PURE__*/ v.string(), 41 + /** 42 + * Blob size 43 + */ 44 + size: /*#__PURE__*/ v.integer(), 45 + /** 46 + * Submodule information if path is a submodule 47 + */ 48 + get submodule() { 49 + return /*#__PURE__*/ v.optional(ShTangledGitTempDefs.submoduleSchema); 50 + }, 51 + }), 52 + }, 53 + }); 54 + 55 + type main$schematype = typeof _mainSchema; 56 + 57 + export interface mainSchema extends main$schematype {} 58 + 59 + export const mainSchema = _mainSchema as mainSchema; 60 + 61 + export interface $params extends v.InferInput<mainSchema["params"]> {} 62 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 63 + 64 + declare module "@atcute/lexicons/ambient" { 65 + interface XRPCQueries { 66 + "sh.tangled.git.temp.getEntry": mainSchema; 67 + } 68 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getHead.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitTempDefs from "./defs.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getHead", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * DID of the repository 10 + */ 11 + repo: /*#__PURE__*/ v.didString(), 12 + }), 13 + output: { 14 + type: "lex", 15 + get schema() { 16 + return ShTangledGitTempDefs.branchSchema; 17 + }, 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params extends v.InferInput<mainSchema["params"]> {} 28 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.git.temp.getHead": mainSchema; 33 + } 34 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getTag.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getTag", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * DID of the repository 9 + */ 10 + repo: /*#__PURE__*/ v.didString(), 11 + /** 12 + * Name of tag, such as v1.3.0 13 + */ 14 + tag: /*#__PURE__*/ v.string(), 15 + }), 16 + output: { 17 + type: "blob", 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params extends v.InferInput<mainSchema["params"]> {} 28 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.git.temp.getTag": mainSchema; 33 + } 34 + }
+152
web/src/lib/api/lexicons/types/sh/tangled/git/temp/getTree.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _lastCommitSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.getTree#lastCommit"), 8 + ), 9 + get author() { 10 + return /*#__PURE__*/ v.optional(signatureSchema); 11 + }, 12 + /** 13 + * Commit hash 14 + */ 15 + hash: /*#__PURE__*/ v.string(), 16 + /** 17 + * Commit message 18 + */ 19 + message: /*#__PURE__*/ v.string(), 20 + /** 21 + * Commit timestamp 22 + */ 23 + when: /*#__PURE__*/ v.datetimeString(), 24 + }); 25 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.getTree", { 26 + params: /*#__PURE__*/ v.object({ 27 + /** 28 + * Path within the repository tree 29 + * @default "" 30 + */ 31 + path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), ""), 32 + /** 33 + * Git reference (branch, tag, or commit SHA) 34 + */ 35 + ref: /*#__PURE__*/ v.string(), 36 + /** 37 + * DID of the repository 38 + */ 39 + repo: /*#__PURE__*/ v.didString(), 40 + }), 41 + output: { 42 + type: "lex", 43 + schema: /*#__PURE__*/ v.object({ 44 + /** 45 + * Parent directory path 46 + */ 47 + dotdot: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 48 + get files() { 49 + return /*#__PURE__*/ v.array(treeEntrySchema); 50 + }, 51 + get lastCommit() { 52 + return /*#__PURE__*/ v.optional(lastCommitSchema); 53 + }, 54 + /** 55 + * The parent path in the tree 56 + */ 57 + parent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 58 + /** 59 + * Readme for this file tree 60 + */ 61 + get readme() { 62 + return /*#__PURE__*/ v.optional(readmeSchema); 63 + }, 64 + /** 65 + * The git reference used 66 + */ 67 + ref: /*#__PURE__*/ v.string(), 68 + }), 69 + }, 70 + }); 71 + const _readmeSchema = /*#__PURE__*/ v.object({ 72 + $type: /*#__PURE__*/ v.optional( 73 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.getTree#readme"), 74 + ), 75 + /** 76 + * Contents of the readme file 77 + */ 78 + contents: /*#__PURE__*/ v.string(), 79 + /** 80 + * Name of the readme file 81 + */ 82 + filename: /*#__PURE__*/ v.string(), 83 + }); 84 + const _signatureSchema = /*#__PURE__*/ v.object({ 85 + $type: /*#__PURE__*/ v.optional( 86 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.getTree#signature"), 87 + ), 88 + /** 89 + * Author email 90 + */ 91 + email: /*#__PURE__*/ v.string(), 92 + /** 93 + * Author name 94 + */ 95 + name: /*#__PURE__*/ v.string(), 96 + /** 97 + * Author timestamp 98 + */ 99 + when: /*#__PURE__*/ v.datetimeString(), 100 + }); 101 + const _treeEntrySchema = /*#__PURE__*/ v.object({ 102 + $type: /*#__PURE__*/ v.optional( 103 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.getTree#treeEntry"), 104 + ), 105 + get last_commit() { 106 + return /*#__PURE__*/ v.optional(lastCommitSchema); 107 + }, 108 + /** 109 + * File mode 110 + */ 111 + mode: /*#__PURE__*/ v.string(), 112 + /** 113 + * Relative file or directory name 114 + */ 115 + name: /*#__PURE__*/ v.string(), 116 + /** 117 + * File size in bytes 118 + */ 119 + size: /*#__PURE__*/ v.integer(), 120 + }); 121 + 122 + type lastCommit$schematype = typeof _lastCommitSchema; 123 + type main$schematype = typeof _mainSchema; 124 + type readme$schematype = typeof _readmeSchema; 125 + type signature$schematype = typeof _signatureSchema; 126 + type treeEntry$schematype = typeof _treeEntrySchema; 127 + 128 + export interface lastCommitSchema extends lastCommit$schematype {} 129 + export interface mainSchema extends main$schematype {} 130 + export interface readmeSchema extends readme$schematype {} 131 + export interface signatureSchema extends signature$schematype {} 132 + export interface treeEntrySchema extends treeEntry$schematype {} 133 + 134 + export const lastCommitSchema = _lastCommitSchema as lastCommitSchema; 135 + export const mainSchema = _mainSchema as mainSchema; 136 + export const readmeSchema = _readmeSchema as readmeSchema; 137 + export const signatureSchema = _signatureSchema as signatureSchema; 138 + export const treeEntrySchema = _treeEntrySchema as treeEntrySchema; 139 + 140 + export interface LastCommit extends v.InferInput<typeof lastCommitSchema> {} 141 + export interface Readme extends v.InferInput<typeof readmeSchema> {} 142 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 143 + export interface TreeEntry extends v.InferInput<typeof treeEntrySchema> {} 144 + 145 + export interface $params extends v.InferInput<mainSchema["params"]> {} 146 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 147 + 148 + declare module "@atcute/lexicons/ambient" { 149 + interface XRPCQueries { 150 + "sh.tangled.git.temp.getTree": mainSchema; 151 + } 152 + }
+46
web/src/lib/api/lexicons/types/sh/tangled/git/temp/listBranches.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.listBranches", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of branches to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * DID of the repository 25 + */ 26 + repo: /*#__PURE__*/ v.didString(), 27 + }), 28 + output: { 29 + type: "blob", 30 + }, 31 + }); 32 + 33 + type main$schematype = typeof _mainSchema; 34 + 35 + export interface mainSchema extends main$schematype {} 36 + 37 + export const mainSchema = _mainSchema as mainSchema; 38 + 39 + export interface $params extends v.InferInput<mainSchema["params"]> {} 40 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 41 + 42 + declare module "@atcute/lexicons/ambient" { 43 + interface XRPCQueries { 44 + "sh.tangled.git.temp.listBranches": mainSchema; 45 + } 46 + }
+50
web/src/lib/api/lexicons/types/sh/tangled/git/temp/listCommits.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.listCommits", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor (commit SHA) 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of commits to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Git reference (branch, tag, or commit SHA) 25 + */ 26 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 27 + /** 28 + * DID of the repository 29 + */ 30 + repo: /*#__PURE__*/ v.didString(), 31 + }), 32 + output: { 33 + type: "blob", 34 + }, 35 + }); 36 + 37 + type main$schematype = typeof _mainSchema; 38 + 39 + export interface mainSchema extends main$schematype {} 40 + 41 + export const mainSchema = _mainSchema as mainSchema; 42 + 43 + export interface $params extends v.InferInput<mainSchema["params"]> {} 44 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 45 + 46 + declare module "@atcute/lexicons/ambient" { 47 + interface XRPCQueries { 48 + "sh.tangled.git.temp.listCommits": mainSchema; 49 + } 50 + }
+66
web/src/lib/api/lexicons/types/sh/tangled/git/temp/listLanguages.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _languageSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.git.temp.listLanguages#language"), 8 + ), 9 + /** 10 + * Programming language name 11 + */ 12 + name: /*#__PURE__*/ v.string(), 13 + /** 14 + * Total size of files in this language (bytes) 15 + */ 16 + size: /*#__PURE__*/ v.integer(), 17 + }); 18 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.listLanguages", { 19 + params: /*#__PURE__*/ v.object({ 20 + /** 21 + * Git reference (branch, tag, or commit SHA) 22 + * @default "HEAD" 23 + */ 24 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "HEAD"), 25 + /** 26 + * DID of the repository 27 + */ 28 + repo: /*#__PURE__*/ v.didString(), 29 + }), 30 + output: { 31 + type: "lex", 32 + schema: /*#__PURE__*/ v.object({ 33 + get languages() { 34 + return /*#__PURE__*/ v.array(languageSchema); 35 + }, 36 + /** 37 + * The git reference used 38 + */ 39 + ref: /*#__PURE__*/ v.string(), 40 + /** 41 + * Total size of all analyzed files in bytes 42 + */ 43 + total: /*#__PURE__*/ v.integer(), 44 + }), 45 + }, 46 + }); 47 + 48 + type language$schematype = typeof _languageSchema; 49 + type main$schematype = typeof _mainSchema; 50 + 51 + export interface languageSchema extends language$schematype {} 52 + export interface mainSchema extends main$schematype {} 53 + 54 + export const languageSchema = _languageSchema as languageSchema; 55 + export const mainSchema = _mainSchema as mainSchema; 56 + 57 + export interface Language extends v.InferInput<typeof languageSchema> {} 58 + 59 + export interface $params extends v.InferInput<mainSchema["params"]> {} 60 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 61 + 62 + declare module "@atcute/lexicons/ambient" { 63 + interface XRPCQueries { 64 + "sh.tangled.git.temp.listLanguages": mainSchema; 65 + } 66 + }
+46
web/src/lib/api/lexicons/types/sh/tangled/git/temp/listTags.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.git.temp.listTags", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of tags to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * DID of the repository 25 + */ 26 + repo: /*#__PURE__*/ v.didString(), 27 + }), 28 + output: { 29 + type: "blob", 30 + }, 31 + }); 32 + 33 + type main$schematype = typeof _mainSchema; 34 + 35 + export interface mainSchema extends main$schematype {} 36 + 37 + export const mainSchema = _mainSchema as mainSchema; 38 + 39 + export interface $params extends v.InferInput<mainSchema["params"]> {} 40 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 41 + 42 + declare module "@atcute/lexicons/ambient" { 43 + interface XRPCQueries { 44 + "sh.tangled.git.temp.listTags": mainSchema; 45 + } 46 + }
+26
web/src/lib/api/lexicons/types/sh/tangled/graph/follow.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.graph.follow"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + subject: /*#__PURE__*/ v.didString(), 11 + }), 12 + ); 13 + 14 + type main$schematype = typeof _mainSchema; 15 + 16 + export interface mainSchema extends main$schematype {} 17 + 18 + export const mainSchema = _mainSchema as mainSchema; 19 + 20 + export interface Main extends v.InferInput<typeof mainSchema> {} 21 + 22 + declare module "@atcute/lexicons/ambient" { 23 + interface Records { 24 + "sh.tangled.graph.follow": mainSchema; 25 + } 26 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/graph/listFollows.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.graph.listFollows#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.graph.follow record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.graph.listFollows", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Followee DID whose inbound follows to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.graph.listFollows": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/graph/listFollowsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGraphListFollows from "./listFollows.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.graph.listFollowsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose follow authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledGraphListFollows.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.graph.listFollowsBy": mainSchema; 59 + } 60 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/graph/listVouches.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.graph.listVouches#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.graph.vouch record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.graph.listVouches", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Vouchee DID whose inbound vouches to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.graph.listVouches": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/graph/listVouchesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGraphListVouches from "./listVouches.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.graph.listVouchesBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose vouch authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledGraphListVouches.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.graph.listVouchesBy": mainSchema; 59 + } 60 + }
+54
web/src/lib/api/lexicons/types/sh/tangled/graph/vouch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.graph.vouch"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + /** 11 + * Optional list of ATURIs serving as evidence for this vouch (ex. issues, PRs) 12 + * @maxLength 10 13 + */ 14 + evidences: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain( 16 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 17 + [/*#__PURE__*/ v.arrayLength(0, 10)], 18 + ), 19 + ), 20 + /** 21 + * Whether this user is being vouched for or denounced 22 + * @default "vouch" 23 + */ 24 + kind: /*#__PURE__*/ v.optional( 25 + /*#__PURE__*/ v.literalEnum(["denounce", "vouch"]), 26 + "vouch", 27 + ), 28 + /** 29 + * The reason for this vouch/denouncement 30 + * @maxLength 2560 31 + * @maxGraphemes 256 32 + */ 33 + reason: /*#__PURE__*/ v.optional( 34 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 35 + /*#__PURE__*/ v.stringLength(0, 2560), 36 + /*#__PURE__*/ v.stringGraphemes(0, 256), 37 + ]), 38 + ), 39 + }), 40 + ); 41 + 42 + type main$schematype = typeof _mainSchema; 43 + 44 + export interface mainSchema extends main$schematype {} 45 + 46 + export const mainSchema = _mainSchema as mainSchema; 47 + 48 + export interface Main extends v.InferInput<typeof mainSchema> {} 49 + 50 + declare module "@atcute/lexicons/ambient" { 51 + interface Records { 52 + "sh.tangled.graph.vouch": mainSchema; 53 + } 54 + }
+25
web/src/lib/api/lexicons/types/sh/tangled/knot.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.knot"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + }), 11 + ); 12 + 13 + type main$schematype = typeof _mainSchema; 14 + 15 + export interface mainSchema extends main$schematype {} 16 + 17 + export const mainSchema = _mainSchema as mainSchema; 18 + 19 + export interface Main extends v.InferInput<typeof mainSchema> {} 20 + 21 + declare module "@atcute/lexicons/ambient" { 22 + interface Records { 23 + "sh.tangled.knot": mainSchema; 24 + } 25 + }
+32
web/src/lib/api/lexicons/types/sh/tangled/knot/addMember.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.knot.addMember", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * DID of the member to add 12 + */ 13 + subject: /*#__PURE__*/ v.didString(), 14 + }), 15 + }, 16 + output: null, 17 + }); 18 + 19 + type main$schematype = typeof _mainSchema; 20 + 21 + export interface mainSchema extends main$schematype {} 22 + 23 + export const mainSchema = _mainSchema as mainSchema; 24 + 25 + export interface $params {} 26 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 27 + 28 + declare module "@atcute/lexicons/ambient" { 29 + interface XRPCProcedures { 30 + "sh.tangled.knot.addMember": mainSchema; 31 + } 32 + }
+76
web/src/lib/api/lexicons/types/sh/tangled/knot/listKeys.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.knot.listKeys", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of keys to return 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 100 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 100, 22 + ), 23 + }), 24 + output: { 25 + type: "lex", 26 + schema: /*#__PURE__*/ v.object({ 27 + /** 28 + * Pagination cursor for next page 29 + */ 30 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 31 + get keys() { 32 + return /*#__PURE__*/ v.array(publicKeySchema); 33 + }, 34 + }), 35 + }, 36 + }); 37 + const _publicKeySchema = /*#__PURE__*/ v.object({ 38 + $type: /*#__PURE__*/ v.optional( 39 + /*#__PURE__*/ v.literal("sh.tangled.knot.listKeys#publicKey"), 40 + ), 41 + /** 42 + * Key upload timestamp 43 + */ 44 + createdAt: /*#__PURE__*/ v.datetimeString(), 45 + /** 46 + * DID associated with the public key 47 + */ 48 + did: /*#__PURE__*/ v.didString(), 49 + /** 50 + * Public key contents 51 + * @maxLength 4096 52 + */ 53 + key: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 54 + /*#__PURE__*/ v.stringLength(0, 4096), 55 + ]), 56 + }); 57 + 58 + type main$schematype = typeof _mainSchema; 59 + type publicKey$schematype = typeof _publicKeySchema; 60 + 61 + export interface mainSchema extends main$schematype {} 62 + export interface publicKeySchema extends publicKey$schematype {} 63 + 64 + export const mainSchema = _mainSchema as mainSchema; 65 + export const publicKeySchema = _publicKeySchema as publicKeySchema; 66 + 67 + export interface PublicKey extends v.InferInput<typeof publicKeySchema> {} 68 + 69 + export interface $params extends v.InferInput<mainSchema["params"]> {} 70 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 71 + 72 + declare module "@atcute/lexicons/ambient" { 73 + interface XRPCQueries { 74 + "sh.tangled.knot.listKeys": mainSchema; 75 + } 76 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/knot/listKnots.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.knot.listKnots#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.knot record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.knot.listKnots", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Owner DID whose knot records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.knot.listKnots": mainSchema; 74 + } 75 + }
+89
web/src/lib/api/lexicons/types/sh/tangled/knot/listMembers.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.knot.listMembers#listItem"), 8 + ), 9 + /** 10 + * DID that added this member 11 + */ 12 + addedBy: /*#__PURE__*/ v.didString(), 13 + /** 14 + * Optional record CID for record-backed indexers 15 + */ 16 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 17 + /** 18 + * When the member was added 19 + */ 20 + createdAt: /*#__PURE__*/ v.datetimeString(), 21 + /** 22 + * DID of the member 23 + */ 24 + subject: /*#__PURE__*/ v.didString(), 25 + /** 26 + * Optional record AT-URI for record-backed indexers 27 + */ 28 + uri: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 29 + }); 30 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.knot.listMembers", { 31 + params: /*#__PURE__*/ v.object({ 32 + /** 33 + * Pagination cursor 34 + */ 35 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 36 + /** 37 + * @minimum 1 38 + * @maximum 1000 39 + * @default 50 40 + */ 41 + limit: /*#__PURE__*/ v.optional( 42 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 43 + /*#__PURE__*/ v.integerRange(1, 1000), 44 + ]), 45 + 50, 46 + ), 47 + /** 48 + * Sort direction by createdAt. 49 + * @default "desc" 50 + */ 51 + order: /*#__PURE__*/ v.optional( 52 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 53 + "desc", 54 + ), 55 + /** 56 + * Knot identifier whose member records to list. 57 + */ 58 + subject: /*#__PURE__*/ v.string(), 59 + }), 60 + output: { 61 + type: "lex", 62 + schema: /*#__PURE__*/ v.object({ 63 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 64 + get items() { 65 + return /*#__PURE__*/ v.array(listItemSchema); 66 + }, 67 + }), 68 + }, 69 + }); 70 + 71 + type listItem$schematype = typeof _listItemSchema; 72 + type main$schematype = typeof _mainSchema; 73 + 74 + export interface listItemSchema extends listItem$schematype {} 75 + export interface mainSchema extends main$schematype {} 76 + 77 + export const listItemSchema = _listItemSchema as listItemSchema; 78 + export const mainSchema = _mainSchema as mainSchema; 79 + 80 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 81 + 82 + export interface $params extends v.InferInput<mainSchema["params"]> {} 83 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 84 + 85 + declare module "@atcute/lexicons/ambient" { 86 + interface XRPCQueries { 87 + "sh.tangled.knot.listMembers": mainSchema; 88 + } 89 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/knot/listMembersBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledKnotListMembers from "./listMembers.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.knot.listMembersBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose knot-member authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledKnotListMembers.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.knot.listMembersBy": mainSchema; 59 + } 60 + }
+30
web/src/lib/api/lexicons/types/sh/tangled/knot/member.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.knot.member"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + /** 11 + * domain that this member now belongs to 12 + */ 13 + domain: /*#__PURE__*/ v.string(), 14 + subject: /*#__PURE__*/ v.didString(), 15 + }), 16 + ); 17 + 18 + type main$schematype = typeof _mainSchema; 19 + 20 + export interface mainSchema extends main$schematype {} 21 + 22 + export const mainSchema = _mainSchema as mainSchema; 23 + 24 + export interface Main extends v.InferInput<typeof mainSchema> {} 25 + 26 + declare module "@atcute/lexicons/ambient" { 27 + interface Records { 28 + "sh.tangled.knot.member": mainSchema; 29 + } 30 + }
+32
web/src/lib/api/lexicons/types/sh/tangled/knot/removeMember.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.knot.removeMember", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * DID of the member to remove 12 + */ 13 + subject: /*#__PURE__*/ v.didString(), 14 + }), 15 + }, 16 + output: null, 17 + }); 18 + 19 + type main$schematype = typeof _mainSchema; 20 + 21 + export interface mainSchema extends main$schematype {} 22 + 23 + export const mainSchema = _mainSchema as mainSchema; 24 + 25 + export interface $params {} 26 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 27 + 28 + declare module "@atcute/lexicons/ambient" { 29 + interface XRPCProcedures { 30 + "sh.tangled.knot.removeMember": mainSchema; 31 + } 32 + }
+90
web/src/lib/api/lexicons/types/sh/tangled/knot/subscribeRepos.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledGitRefUpdate from "../git/refUpdate.js"; 5 + 6 + const _gitSync1Schema = /*#__PURE__*/ v.object({ 7 + $type: /*#__PURE__*/ v.optional( 8 + /*#__PURE__*/ v.literal("sh.tangled.knot.subscribeRepos#gitSync1"), 9 + ), 10 + /** 11 + * Repository DID identifier 12 + */ 13 + did: /*#__PURE__*/ v.didString(), 14 + /** 15 + * The stream sequence number of this message. 16 + */ 17 + seq: /*#__PURE__*/ v.integer(), 18 + }); 19 + const _gitSync2Schema = /*#__PURE__*/ v.object({ 20 + $type: /*#__PURE__*/ v.optional( 21 + /*#__PURE__*/ v.literal("sh.tangled.knot.subscribeRepos#gitSync2"), 22 + ), 23 + /** 24 + * Repository AT-URI identifier 25 + */ 26 + repo: /*#__PURE__*/ v.resourceUriString(), 27 + /** 28 + * The stream sequence number of this message. 29 + */ 30 + seq: /*#__PURE__*/ v.integer(), 31 + }); 32 + const _identitySchema = /*#__PURE__*/ v.object({ 33 + $type: /*#__PURE__*/ v.optional( 34 + /*#__PURE__*/ v.literal("sh.tangled.knot.subscribeRepos#identity"), 35 + ), 36 + /** 37 + * Repository DID identifier 38 + */ 39 + did: /*#__PURE__*/ v.didString(), 40 + /** 41 + * The stream sequence number of this message. 42 + */ 43 + seq: /*#__PURE__*/ v.integer(), 44 + time: /*#__PURE__*/ v.datetimeString(), 45 + }); 46 + const _mainSchema = /*#__PURE__*/ v.subscription( 47 + "sh.tangled.knot.subscribeRepos", 48 + { 49 + params: /*#__PURE__*/ v.object({ 50 + /** 51 + * The last known event seq number to backfill from. 52 + */ 53 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 54 + }), 55 + get message() { 56 + return /*#__PURE__*/ v.variant([ 57 + ShTangledGitRefUpdate.mainSchema, 58 + identitySchema, 59 + ]); 60 + }, 61 + }, 62 + ); 63 + 64 + type gitSync1$schematype = typeof _gitSync1Schema; 65 + type gitSync2$schematype = typeof _gitSync2Schema; 66 + type identity$schematype = typeof _identitySchema; 67 + type main$schematype = typeof _mainSchema; 68 + 69 + export interface gitSync1Schema extends gitSync1$schematype {} 70 + export interface gitSync2Schema extends gitSync2$schematype {} 71 + export interface identitySchema extends identity$schematype {} 72 + export interface mainSchema extends main$schematype {} 73 + 74 + export const gitSync1Schema = _gitSync1Schema as gitSync1Schema; 75 + export const gitSync2Schema = _gitSync2Schema as gitSync2Schema; 76 + export const identitySchema = _identitySchema as identitySchema; 77 + export const mainSchema = _mainSchema as mainSchema; 78 + 79 + export interface GitSync1 extends v.InferInput<typeof gitSync1Schema> {} 80 + export interface GitSync2 extends v.InferInput<typeof gitSync2Schema> {} 81 + export interface Identity extends v.InferInput<typeof identitySchema> {} 82 + 83 + export interface $params extends v.InferInput<mainSchema["params"]> {} 84 + export type $message = v.InferInput<mainSchema["message"]>; 85 + 86 + declare module "@atcute/lexicons/ambient" { 87 + interface XRPCSubscriptions { 88 + "sh.tangled.knot.subscribeRepos": mainSchema; 89 + } 90 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/knot/version.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.knot.version", { 6 + params: null, 7 + output: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Protocol capability tokens this knot implements, such as knot-acl. Knots that omit this field are treated as legacy. 12 + */ 13 + capabilities: /*#__PURE__*/ v.optional( 14 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 15 + ), 16 + version: /*#__PURE__*/ v.string(), 17 + }), 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params {} 28 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.knot.version": mainSchema; 33 + } 34 + }
+74
web/src/lib/api/lexicons/types/sh/tangled/label/definition.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.label.definition"), 9 + /** 10 + * The hex value for the background color for the label. Appviews may choose to respect this. 11 + */ 12 + color: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 13 + createdAt: /*#__PURE__*/ v.datetimeString(), 14 + /** 15 + * Whether this label can be repeated for a given entity, eg.: [reviewer:foo, reviewer:bar] 16 + */ 17 + multiple: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 18 + /** 19 + * The display name of this label. 20 + * @minGraphemes 1 21 + * @maxGraphemes 40 22 + */ 23 + name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 24 + /*#__PURE__*/ v.stringGraphemes(1, 40), 25 + ]), 26 + /** 27 + * The areas of the repo this label may apply to, eg.: sh.tangled.repo.issue. Appviews may choose to respect this. 28 + */ 29 + scope: /*#__PURE__*/ v.array(/*#__PURE__*/ v.nsidString()), 30 + /** 31 + * The type definition of this label. Appviews may allow sorting for certain types. 32 + */ 33 + get valueType() { 34 + return valueTypeSchema; 35 + }, 36 + }), 37 + ); 38 + const _valueTypeSchema = /*#__PURE__*/ v.object({ 39 + $type: /*#__PURE__*/ v.optional( 40 + /*#__PURE__*/ v.literal("sh.tangled.label.definition#valueType"), 41 + ), 42 + /** 43 + * Closed set of values that this label can take. 44 + */ 45 + enum: /*#__PURE__*/ v.optional( 46 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 47 + ), 48 + /** 49 + * An optional constraint that can be applied on string concrete types. 50 + */ 51 + format: /*#__PURE__*/ v.literalEnum(["any", "did", "nsid"]), 52 + /** 53 + * The concrete type of this label's value. 54 + */ 55 + type: /*#__PURE__*/ v.literalEnum(["boolean", "integer", "null", "string"]), 56 + }); 57 + 58 + type main$schematype = typeof _mainSchema; 59 + type valueType$schematype = typeof _valueTypeSchema; 60 + 61 + export interface mainSchema extends main$schematype {} 62 + export interface valueTypeSchema extends valueType$schematype {} 63 + 64 + export const mainSchema = _mainSchema as mainSchema; 65 + export const valueTypeSchema = _valueTypeSchema as valueTypeSchema; 66 + 67 + export interface Main extends v.InferInput<typeof mainSchema> {} 68 + export interface ValueType extends v.InferInput<typeof valueTypeSchema> {} 69 + 70 + declare module "@atcute/lexicons/ambient" { 71 + interface Records { 72 + "sh.tangled.label.definition": mainSchema; 73 + } 74 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/label/listDefinitions.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.label.listDefinitions#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.label.definition record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.label.listDefinitions", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Scope identifier whose label definitions to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.label.listDefinitions": mainSchema; 74 + } 75 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/label/listOps.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.label.listOps#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.label.op record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.label.listOps", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Scope identifier whose label op records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.label.listOps": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/label/listOpsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledLabelListOps from "./listOps.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.label.listOpsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose label-op authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledLabelListOps.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.label.listOpsBy": mainSchema; 59 + } 60 + }
+52
web/src/lib/api/lexicons/types/sh/tangled/label/op.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.label.op"), 9 + get add() { 10 + return /*#__PURE__*/ v.array(operandSchema); 11 + }, 12 + get delete() { 13 + return /*#__PURE__*/ v.array(operandSchema); 14 + }, 15 + performedAt: /*#__PURE__*/ v.datetimeString(), 16 + /** 17 + * The subject (task, pull or discussion) of this label. Appviews may apply a `scope` check and refuse this op. 18 + */ 19 + subject: /*#__PURE__*/ v.resourceUriString(), 20 + }), 21 + ); 22 + const _operandSchema = /*#__PURE__*/ v.object({ 23 + $type: /*#__PURE__*/ v.optional( 24 + /*#__PURE__*/ v.literal("sh.tangled.label.op#operand"), 25 + ), 26 + /** 27 + * ATURI to the label definition 28 + */ 29 + key: /*#__PURE__*/ v.resourceUriString(), 30 + /** 31 + * Stringified value of the label. This is first unstringed by appviews and then interpreted as a concrete value. 32 + */ 33 + value: /*#__PURE__*/ v.string(), 34 + }); 35 + 36 + type main$schematype = typeof _mainSchema; 37 + type operand$schematype = typeof _operandSchema; 38 + 39 + export interface mainSchema extends main$schematype {} 40 + export interface operandSchema extends operand$schematype {} 41 + 42 + export const mainSchema = _mainSchema as mainSchema; 43 + export const operandSchema = _operandSchema as operandSchema; 44 + 45 + export interface Main extends v.InferInput<typeof mainSchema> {} 46 + export interface Operand extends v.InferInput<typeof operandSchema> {} 47 + 48 + declare module "@atcute/lexicons/ambient" { 49 + interface Records { 50 + "sh.tangled.label.op": mainSchema; 51 + } 52 + }
+35
web/src/lib/api/lexicons/types/sh/tangled/markup/markdown.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional( 6 + /*#__PURE__*/ v.literal("sh.tangled.markup.markdown"), 7 + ), 8 + /** 9 + * list of blobs referenced in markdown 10 + */ 11 + blobs: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.array( 13 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.blob(), [ 14 + /*#__PURE__*/ v.blobSize(1000000), 15 + /*#__PURE__*/ v.blobAccept(["image/*"]), 16 + ]), 17 + ), 18 + ), 19 + /** 20 + * Original Markdown before post-processing. Used to restore original input on edit. 21 + */ 22 + original: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 23 + /** 24 + * Final post-processed markdown content that will be rendered 25 + */ 26 + text: /*#__PURE__*/ v.string(), 27 + }); 28 + 29 + type main$schematype = typeof _mainSchema; 30 + 31 + export interface mainSchema extends main$schematype {} 32 + 33 + export const mainSchema = _mainSchema as mainSchema; 34 + 35 + export interface Main extends v.InferInput<typeof mainSchema> {}
+28
web/src/lib/api/lexicons/types/sh/tangled/owner.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.owner", { 6 + params: null, 7 + output: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + owner: /*#__PURE__*/ v.didString(), 11 + }), 12 + }, 13 + }); 14 + 15 + type main$schematype = typeof _mainSchema; 16 + 17 + export interface mainSchema extends main$schematype {} 18 + 19 + export const mainSchema = _mainSchema as mainSchema; 20 + 21 + export interface $params {} 22 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 23 + 24 + declare module "@atcute/lexicons/ambient" { 25 + interface XRPCQueries { 26 + "sh.tangled.owner": mainSchema; 27 + } 28 + }
+194
web/src/lib/api/lexicons/types/sh/tangled/pipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _cloneOptsSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#cloneOpts"), 8 + ), 9 + depth: /*#__PURE__*/ v.integer(), 10 + skip: /*#__PURE__*/ v.boolean(), 11 + submodules: /*#__PURE__*/ v.boolean(), 12 + tags: /*#__PURE__*/ v.boolean(), 13 + }); 14 + const _mainSchema = /*#__PURE__*/ v.record( 15 + /*#__PURE__*/ v.tidString(), 16 + /*#__PURE__*/ v.object({ 17 + $type: /*#__PURE__*/ v.literal("sh.tangled.pipeline"), 18 + get triggerMetadata() { 19 + return triggerMetadataSchema; 20 + }, 21 + get workflows() { 22 + return /*#__PURE__*/ v.array(workflowSchema); 23 + }, 24 + }), 25 + ); 26 + const _manualTriggerDataSchema = /*#__PURE__*/ v.object({ 27 + $type: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#manualTriggerData"), 29 + ), 30 + get inputs() { 31 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(pairSchema)); 32 + }, 33 + /** 34 + * optional ref the SHA was resolved from, for display and TANGLED_REF 35 + */ 36 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 37 + /** 38 + * commit SHA the manual run targets 39 + * @minLength 40 40 + * @maxLength 40 41 + */ 42 + sha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 43 + /*#__PURE__*/ v.stringLength(40, 40), 44 + ]), 45 + }); 46 + const _pairSchema = /*#__PURE__*/ v.object({ 47 + $type: /*#__PURE__*/ v.optional( 48 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#pair"), 49 + ), 50 + key: /*#__PURE__*/ v.string(), 51 + value: /*#__PURE__*/ v.string(), 52 + }); 53 + const _pullRequestTriggerDataSchema = /*#__PURE__*/ v.object({ 54 + $type: /*#__PURE__*/ v.optional( 55 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#pullRequestTriggerData"), 56 + ), 57 + /** 58 + * AT-URI of the sh.tangled.repo.pull record this run belongs to 59 + */ 60 + pull: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 61 + sourceBranch: /*#__PURE__*/ v.string(), 62 + /** 63 + * @minLength 40 64 + * @maxLength 40 65 + */ 66 + sourceSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 67 + /*#__PURE__*/ v.stringLength(40, 40), 68 + ]), 69 + targetBranch: /*#__PURE__*/ v.string(), 70 + }); 71 + const _pushTriggerDataSchema = /*#__PURE__*/ v.object({ 72 + $type: /*#__PURE__*/ v.optional( 73 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#pushTriggerData"), 74 + ), 75 + /** 76 + * @minLength 40 77 + * @maxLength 40 78 + */ 79 + newSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 80 + /*#__PURE__*/ v.stringLength(40, 40), 81 + ]), 82 + /** 83 + * @minLength 40 84 + * @maxLength 40 85 + */ 86 + oldSha: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 87 + /*#__PURE__*/ v.stringLength(40, 40), 88 + ]), 89 + ref: /*#__PURE__*/ v.string(), 90 + }); 91 + const _triggerMetadataSchema = /*#__PURE__*/ v.object({ 92 + $type: /*#__PURE__*/ v.optional( 93 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#triggerMetadata"), 94 + ), 95 + kind: /*#__PURE__*/ v.literalEnum(["manual", "pull_request", "push"]), 96 + get manual() { 97 + return /*#__PURE__*/ v.optional(manualTriggerDataSchema); 98 + }, 99 + get pullRequest() { 100 + return /*#__PURE__*/ v.optional(pullRequestTriggerDataSchema); 101 + }, 102 + get push() { 103 + return /*#__PURE__*/ v.optional(pushTriggerDataSchema); 104 + }, 105 + get repo() { 106 + return triggerRepoSchema; 107 + }, 108 + /** 109 + * Repository DID that code and workflow definitions are checked out from, when different from repo (e.g. a fork's commit for a fork-based manual trigger). If absent, source uses repo itself. 110 + */ 111 + sourceRepo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 112 + }); 113 + const _triggerRepoSchema = /*#__PURE__*/ v.object({ 114 + $type: /*#__PURE__*/ v.optional( 115 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#triggerRepo"), 116 + ), 117 + defaultBranch: /*#__PURE__*/ v.string(), 118 + did: /*#__PURE__*/ v.didString(), 119 + knot: /*#__PURE__*/ v.string(), 120 + repo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 121 + /** 122 + * DID of the repo itself 123 + */ 124 + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 125 + }); 126 + const _workflowSchema = /*#__PURE__*/ v.object({ 127 + $type: /*#__PURE__*/ v.optional( 128 + /*#__PURE__*/ v.literal("sh.tangled.pipeline#workflow"), 129 + ), 130 + get clone() { 131 + return cloneOptsSchema; 132 + }, 133 + engine: /*#__PURE__*/ v.string(), 134 + name: /*#__PURE__*/ v.string(), 135 + raw: /*#__PURE__*/ v.string(), 136 + }); 137 + 138 + type cloneOpts$schematype = typeof _cloneOptsSchema; 139 + type main$schematype = typeof _mainSchema; 140 + type manualTriggerData$schematype = typeof _manualTriggerDataSchema; 141 + type pair$schematype = typeof _pairSchema; 142 + type pullRequestTriggerData$schematype = typeof _pullRequestTriggerDataSchema; 143 + type pushTriggerData$schematype = typeof _pushTriggerDataSchema; 144 + type triggerMetadata$schematype = typeof _triggerMetadataSchema; 145 + type triggerRepo$schematype = typeof _triggerRepoSchema; 146 + type workflow$schematype = typeof _workflowSchema; 147 + 148 + export interface cloneOptsSchema extends cloneOpts$schematype {} 149 + export interface mainSchema extends main$schematype {} 150 + export interface manualTriggerDataSchema extends manualTriggerData$schematype {} 151 + export interface pairSchema extends pair$schematype {} 152 + export interface pullRequestTriggerDataSchema extends pullRequestTriggerData$schematype {} 153 + export interface pushTriggerDataSchema extends pushTriggerData$schematype {} 154 + export interface triggerMetadataSchema extends triggerMetadata$schematype {} 155 + export interface triggerRepoSchema extends triggerRepo$schematype {} 156 + export interface workflowSchema extends workflow$schematype {} 157 + 158 + export const cloneOptsSchema = _cloneOptsSchema as cloneOptsSchema; 159 + export const mainSchema = _mainSchema as mainSchema; 160 + export const manualTriggerDataSchema = 161 + _manualTriggerDataSchema as manualTriggerDataSchema; 162 + export const pairSchema = _pairSchema as pairSchema; 163 + export const pullRequestTriggerDataSchema = 164 + _pullRequestTriggerDataSchema as pullRequestTriggerDataSchema; 165 + export const pushTriggerDataSchema = 166 + _pushTriggerDataSchema as pushTriggerDataSchema; 167 + export const triggerMetadataSchema = 168 + _triggerMetadataSchema as triggerMetadataSchema; 169 + export const triggerRepoSchema = _triggerRepoSchema as triggerRepoSchema; 170 + export const workflowSchema = _workflowSchema as workflowSchema; 171 + 172 + export interface CloneOpts extends v.InferInput<typeof cloneOptsSchema> {} 173 + export interface Main extends v.InferInput<typeof mainSchema> {} 174 + export interface ManualTriggerData extends v.InferInput< 175 + typeof manualTriggerDataSchema 176 + > {} 177 + export interface Pair extends v.InferInput<typeof pairSchema> {} 178 + export interface PullRequestTriggerData extends v.InferInput< 179 + typeof pullRequestTriggerDataSchema 180 + > {} 181 + export interface PushTriggerData extends v.InferInput< 182 + typeof pushTriggerDataSchema 183 + > {} 184 + export interface TriggerMetadata extends v.InferInput< 185 + typeof triggerMetadataSchema 186 + > {} 187 + export interface TriggerRepo extends v.InferInput<typeof triggerRepoSchema> {} 188 + export interface Workflow extends v.InferInput<typeof workflowSchema> {} 189 + 190 + declare module "@atcute/lexicons/ambient" { 191 + interface Records { 192 + "sh.tangled.pipeline": mainSchema; 193 + } 194 + }
+43
web/src/lib/api/lexicons/types/sh/tangled/pipeline/cancelPipeline.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure( 6 + "sh.tangled.pipeline.cancelPipeline", 7 + { 8 + params: null, 9 + input: { 10 + type: "lex", 11 + schema: /*#__PURE__*/ v.object({ 12 + /** 13 + * pipeline at-uri 14 + */ 15 + pipeline: /*#__PURE__*/ v.resourceUriString(), 16 + /** 17 + * repo at-uri, spindle can't resolve repo from pipeline at-uri yet 18 + */ 19 + repo: /*#__PURE__*/ v.resourceUriString(), 20 + /** 21 + * workflow name 22 + */ 23 + workflow: /*#__PURE__*/ v.string(), 24 + }), 25 + }, 26 + output: null, 27 + }, 28 + ); 29 + 30 + type main$schematype = typeof _mainSchema; 31 + 32 + export interface mainSchema extends main$schematype {} 33 + 34 + export const mainSchema = _mainSchema as mainSchema; 35 + 36 + export interface $params {} 37 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 38 + 39 + declare module "@atcute/lexicons/ambient" { 40 + interface XRPCProcedures { 41 + "sh.tangled.pipeline.cancelPipeline": mainSchema; 42 + } 43 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/pipeline/listPipelines.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.pipeline.listPipelines#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.pipeline record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.pipeline.listPipelines", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Repo or spindle identifier whose pipeline records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.pipeline.listPipelines": mainSchema; 74 + } 75 + }
+65
web/src/lib/api/lexicons/types/sh/tangled/pipeline/listPipelinesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledPipelineListPipelines from "./listPipelines.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query( 7 + "sh.tangled.pipeline.listPipelinesBy", 8 + { 9 + params: /*#__PURE__*/ v.object({ 10 + /** 11 + * Pagination cursor 12 + */ 13 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * @minimum 1 16 + * @maximum 1000 17 + * @default 50 18 + */ 19 + limit: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 21 + /*#__PURE__*/ v.integerRange(1, 1000), 22 + ]), 23 + 50, 24 + ), 25 + /** 26 + * Sort direction by createdAt. 27 + * @default "desc" 28 + */ 29 + order: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 31 + "desc", 32 + ), 33 + /** 34 + * Actor DID whose pipeline authorings to list. 35 + */ 36 + subject: /*#__PURE__*/ v.didString(), 37 + }), 38 + output: { 39 + type: "lex", 40 + schema: /*#__PURE__*/ v.object({ 41 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + get items() { 43 + return /*#__PURE__*/ v.array( 44 + ShTangledPipelineListPipelines.listItemSchema, 45 + ); 46 + }, 47 + }), 48 + }, 49 + }, 50 + ); 51 + 52 + type main$schematype = typeof _mainSchema; 53 + 54 + export interface mainSchema extends main$schematype {} 55 + 56 + export const mainSchema = _mainSchema as mainSchema; 57 + 58 + export interface $params extends v.InferInput<mainSchema["params"]> {} 59 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 60 + 61 + declare module "@atcute/lexicons/ambient" { 62 + interface XRPCQueries { 63 + "sh.tangled.pipeline.listPipelinesBy": mainSchema; 64 + } 65 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/pipeline/listStatuses.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.pipeline.listStatuses#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.pipeline.status record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.pipeline.listStatuses", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Pipeline AT-URI whose status records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.resourceUriString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.pipeline.listStatuses": mainSchema; 74 + } 75 + }
+65
web/src/lib/api/lexicons/types/sh/tangled/pipeline/listStatusesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledPipelineListStatuses from "./listStatuses.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query( 7 + "sh.tangled.pipeline.listStatusesBy", 8 + { 9 + params: /*#__PURE__*/ v.object({ 10 + /** 11 + * Pagination cursor 12 + */ 13 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * @minimum 1 16 + * @maximum 1000 17 + * @default 50 18 + */ 19 + limit: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 21 + /*#__PURE__*/ v.integerRange(1, 1000), 22 + ]), 23 + 50, 24 + ), 25 + /** 26 + * Sort direction by createdAt. 27 + * @default "desc" 28 + */ 29 + order: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 31 + "desc", 32 + ), 33 + /** 34 + * Actor DID whose pipeline-status authorings to list. 35 + */ 36 + subject: /*#__PURE__*/ v.didString(), 37 + }), 38 + output: { 39 + type: "lex", 40 + schema: /*#__PURE__*/ v.object({ 41 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + get items() { 43 + return /*#__PURE__*/ v.array( 44 + ShTangledPipelineListStatuses.listItemSchema, 45 + ); 46 + }, 47 + }), 48 + }, 49 + }, 50 + ); 51 + 52 + type main$schematype = typeof _mainSchema; 53 + 54 + export interface mainSchema extends main$schematype {} 55 + 56 + export const mainSchema = _mainSchema as mainSchema; 57 + 58 + export interface $params extends v.InferInput<mainSchema["params"]> {} 59 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 60 + 61 + declare module "@atcute/lexicons/ambient" { 62 + interface XRPCQueries { 63 + "sh.tangled.pipeline.listStatusesBy": mainSchema; 64 + } 65 + }
+55
web/src/lib/api/lexicons/types/sh/tangled/pipeline/status.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.pipeline.status"), 9 + /** 10 + * time of creation of this status update 11 + */ 12 + createdAt: /*#__PURE__*/ v.datetimeString(), 13 + /** 14 + * error message if failed 15 + */ 16 + error: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 17 + /** 18 + * exit code if failed 19 + */ 20 + exitCode: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 21 + /** 22 + * ATURI of the pipeline 23 + */ 24 + pipeline: /*#__PURE__*/ v.resourceUriString(), 25 + /** 26 + * status of the workflow 27 + */ 28 + status: /*#__PURE__*/ v.literalEnum([ 29 + "cancelled", 30 + "failed", 31 + "pending", 32 + "running", 33 + "success", 34 + "timeout", 35 + ]), 36 + /** 37 + * name of the workflow within this pipeline 38 + */ 39 + workflow: /*#__PURE__*/ v.resourceUriString(), 40 + }), 41 + ); 42 + 43 + type main$schematype = typeof _mainSchema; 44 + 45 + export interface mainSchema extends main$schematype {} 46 + 47 + export const mainSchema = _mainSchema as mainSchema; 48 + 49 + export interface Main extends v.InferInput<typeof mainSchema> {} 50 + 51 + declare module "@atcute/lexicons/ambient" { 52 + interface Records { 53 + "sh.tangled.pipeline.status": mainSchema; 54 + } 55 + }
+39
web/src/lib/api/lexicons/types/sh/tangled/publicKey.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.publicKey"), 9 + /** 10 + * key upload timestamp 11 + */ 12 + createdAt: /*#__PURE__*/ v.datetimeString(), 13 + /** 14 + * public key contents 15 + * @maxLength 4096 16 + */ 17 + key: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 18 + /*#__PURE__*/ v.stringLength(0, 4096), 19 + ]), 20 + /** 21 + * human-readable name for this key 22 + */ 23 + name: /*#__PURE__*/ v.string(), 24 + }), 25 + ); 26 + 27 + type main$schematype = typeof _mainSchema; 28 + 29 + export interface mainSchema extends main$schematype {} 30 + 31 + export const mainSchema = _mainSchema as mainSchema; 32 + 33 + export interface Main extends v.InferInput<typeof mainSchema> {} 34 + 35 + declare module "@atcute/lexicons/ambient" { 36 + interface Records { 37 + "sh.tangled.publicKey": mainSchema; 38 + } 39 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/publicKey/listKeys.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.publicKey.listKeys#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.publicKey record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.publicKey.listKeys", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Owner DID whose public-key records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.publicKey.listKeys": mainSchema; 74 + } 75 + }
+78
web/src/lib/api/lexicons/types/sh/tangled/repo.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + /** 11 + * @minGraphemes 1 12 + * @maxGraphemes 140 13 + */ 14 + description: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 16 + /*#__PURE__*/ v.stringGraphemes(1, 140), 17 + ]), 18 + ), 19 + /** 20 + * knot where the repo was created 21 + */ 22 + knot: /*#__PURE__*/ v.string(), 23 + /** 24 + * List of labels that this repo subscribes to 25 + */ 26 + labels: /*#__PURE__*/ v.optional( 27 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 28 + ), 29 + /** 30 + * Cosmetic name of the repo. 31 + */ 32 + name: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 33 + /** 34 + * DID of the repo itself, if assigned 35 + */ 36 + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 37 + /** 38 + * source of the repo 39 + */ 40 + source: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 41 + /** 42 + * CI runner to send jobs to and receive results from 43 + */ 44 + spindle: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 45 + /** 46 + * Topics related to the repo 47 + * @maxLength 50 48 + */ 49 + topics: /*#__PURE__*/ v.optional( 50 + /*#__PURE__*/ v.constrain( 51 + /*#__PURE__*/ v.array( 52 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 53 + /*#__PURE__*/ v.stringLength(1, 50), 54 + ]), 55 + ), 56 + [/*#__PURE__*/ v.arrayLength(0, 50)], 57 + ), 58 + ), 59 + /** 60 + * Any URI related to the repo 61 + */ 62 + website: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 63 + }), 64 + ); 65 + 66 + type main$schematype = typeof _mainSchema; 67 + 68 + export interface mainSchema extends main$schematype {} 69 + 70 + export const mainSchema = _mainSchema as mainSchema; 71 + 72 + export interface Main extends v.InferInput<typeof mainSchema> {} 73 + 74 + declare module "@atcute/lexicons/ambient" { 75 + interface Records { 76 + "sh.tangled.repo": mainSchema; 77 + } 78 + }
+39
web/src/lib/api/lexicons/types/sh/tangled/repo/addCollaborator.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure( 6 + "sh.tangled.repo.addCollaborator", 7 + { 8 + params: null, 9 + input: { 10 + type: "lex", 11 + schema: /*#__PURE__*/ v.object({ 12 + /** 13 + * DID of the repository to add the collaborator to 14 + */ 15 + repo: /*#__PURE__*/ v.didString(), 16 + /** 17 + * DID of the collaborator to add 18 + */ 19 + subject: /*#__PURE__*/ v.didString(), 20 + }), 21 + }, 22 + output: null, 23 + }, 24 + ); 25 + 26 + type main$schematype = typeof _mainSchema; 27 + 28 + export interface mainSchema extends main$schematype {} 29 + 30 + export const mainSchema = _mainSchema as mainSchema; 31 + 32 + export interface $params {} 33 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 34 + 35 + declare module "@atcute/lexicons/ambient" { 36 + interface XRPCProcedures { 37 + "sh.tangled.repo.addCollaborator": mainSchema; 38 + } 39 + }
+43
web/src/lib/api/lexicons/types/sh/tangled/repo/addSecret.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.addSecret", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * @minLength 1 12 + * @maxLength 50 13 + */ 14 + key: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 15 + /*#__PURE__*/ v.stringLength(1, 50), 16 + ]), 17 + repo: /*#__PURE__*/ v.resourceUriString(), 18 + /** 19 + * @minLength 1 20 + * @maxLength 200 21 + */ 22 + value: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 23 + /*#__PURE__*/ v.stringLength(1, 200), 24 + ]), 25 + }), 26 + }, 27 + output: null, 28 + }); 29 + 30 + type main$schematype = typeof _mainSchema; 31 + 32 + export interface mainSchema extends main$schematype {} 33 + 34 + export const mainSchema = _mainSchema as mainSchema; 35 + 36 + export interface $params {} 37 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 38 + 39 + declare module "@atcute/lexicons/ambient" { 40 + interface XRPCProcedures { 41 + "sh.tangled.repo.addSecret": mainSchema; 42 + } 43 + }
+52
web/src/lib/api/lexicons/types/sh/tangled/repo/archive.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.archive", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Archive format 9 + * @default "tar.gz" 10 + */ 11 + format: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.literalEnum([ 13 + "tar", 14 + "tar.bz2", 15 + "tar.gz", 16 + "tar.xz", 17 + "zip", 18 + ]), 19 + "tar.gz", 20 + ), 21 + /** 22 + * Prefix for files in the archive 23 + */ 24 + prefix: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 25 + /** 26 + * Git reference (branch, tag, or commit SHA) 27 + */ 28 + ref: /*#__PURE__*/ v.string(), 29 + /** 30 + * Repository identifier in format 'did:plc:.../repoName' 31 + */ 32 + repo: /*#__PURE__*/ v.string(), 33 + }), 34 + output: { 35 + type: "blob", 36 + }, 37 + }); 38 + 39 + type main$schematype = typeof _mainSchema; 40 + 41 + export interface mainSchema extends main$schematype {} 42 + 43 + export const mainSchema = _mainSchema as mainSchema; 44 + 45 + export interface $params extends v.InferInput<mainSchema["params"]> {} 46 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 47 + 48 + declare module "@atcute/lexicons/ambient" { 49 + interface XRPCQueries { 50 + "sh.tangled.repo.archive": mainSchema; 51 + } 52 + }
+52
web/src/lib/api/lexicons/types/sh/tangled/repo/artifact.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.artifact"), 9 + /** 10 + * the artifact 11 + * @maxSize 52428800 12 + */ 13 + artifact: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.blob(), [ 14 + /*#__PURE__*/ v.blobSize(52428800), 15 + ]), 16 + /** 17 + * time of creation of this artifact 18 + */ 19 + createdAt: /*#__PURE__*/ v.datetimeString(), 20 + /** 21 + * name of the artifact 22 + */ 23 + name: /*#__PURE__*/ v.string(), 24 + /** 25 + * repo that this artifact is being uploaded to 26 + */ 27 + repo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 28 + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 29 + /** 30 + * hash of the tag object that this artifact is attached to (only annotated tags are supported) 31 + * @minLength 20 32 + * @maxLength 20 33 + */ 34 + tag: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.bytes(), [ 35 + /*#__PURE__*/ v.bytesSize(20, 20), 36 + ]), 37 + }), 38 + ); 39 + 40 + type main$schematype = typeof _mainSchema; 41 + 42 + export interface mainSchema extends main$schematype {} 43 + 44 + export const mainSchema = _mainSchema as mainSchema; 45 + 46 + export interface Main extends v.InferInput<typeof mainSchema> {} 47 + 48 + declare module "@atcute/lexicons/ambient" { 49 + interface Records { 50 + "sh.tangled.repo.artifact": mainSchema; 51 + } 52 + }
+152
web/src/lib/api/lexicons/types/sh/tangled/repo/blob.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _lastCommitSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.blob#lastCommit"), 8 + ), 9 + get author() { 10 + return /*#__PURE__*/ v.optional(signatureSchema); 11 + }, 12 + /** 13 + * Commit hash 14 + */ 15 + hash: /*#__PURE__*/ v.string(), 16 + /** 17 + * Commit message 18 + */ 19 + message: /*#__PURE__*/ v.string(), 20 + /** 21 + * Commit timestamp 22 + */ 23 + when: /*#__PURE__*/ v.datetimeString(), 24 + }); 25 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.blob", { 26 + params: /*#__PURE__*/ v.object({ 27 + /** 28 + * Path to the file within the repository 29 + */ 30 + path: /*#__PURE__*/ v.string(), 31 + /** 32 + * Return raw file content instead of JSON response 33 + * @default false 34 + */ 35 + raw: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), false), 36 + /** 37 + * Git reference (branch, tag, or commit SHA) 38 + */ 39 + ref: /*#__PURE__*/ v.string(), 40 + /** 41 + * DID of the repository 42 + */ 43 + repo: /*#__PURE__*/ v.didString(), 44 + }), 45 + output: { 46 + type: "lex", 47 + schema: /*#__PURE__*/ v.object({ 48 + /** 49 + * File content (base64 encoded for binary files) 50 + */ 51 + content: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 52 + /** 53 + * Content encoding 54 + */ 55 + encoding: /*#__PURE__*/ v.optional( 56 + /*#__PURE__*/ v.literalEnum(["base64", "utf-8"]), 57 + ), 58 + fileTooLarge: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 59 + /** 60 + * Whether the file is binary 61 + */ 62 + isBinary: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 63 + get lastCommit() { 64 + return /*#__PURE__*/ v.optional(lastCommitSchema); 65 + }, 66 + /** 67 + * MIME type of the file 68 + */ 69 + mimeType: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 70 + /** 71 + * The file path 72 + */ 73 + path: /*#__PURE__*/ v.string(), 74 + /** 75 + * The git reference used 76 + */ 77 + ref: /*#__PURE__*/ v.string(), 78 + /** 79 + * File size in bytes 80 + */ 81 + size: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 82 + /** 83 + * Submodule information if path is a submodule 84 + */ 85 + get submodule() { 86 + return /*#__PURE__*/ v.optional(submoduleSchema); 87 + }, 88 + }), 89 + }, 90 + }); 91 + const _signatureSchema = /*#__PURE__*/ v.object({ 92 + $type: /*#__PURE__*/ v.optional( 93 + /*#__PURE__*/ v.literal("sh.tangled.repo.blob#signature"), 94 + ), 95 + /** 96 + * Author email 97 + */ 98 + email: /*#__PURE__*/ v.string(), 99 + /** 100 + * Author name 101 + */ 102 + name: /*#__PURE__*/ v.string(), 103 + /** 104 + * Author timestamp 105 + */ 106 + when: /*#__PURE__*/ v.datetimeString(), 107 + }); 108 + const _submoduleSchema = /*#__PURE__*/ v.object({ 109 + $type: /*#__PURE__*/ v.optional( 110 + /*#__PURE__*/ v.literal("sh.tangled.repo.blob#submodule"), 111 + ), 112 + /** 113 + * Branch to track in the submodule 114 + */ 115 + branch: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 116 + /** 117 + * Submodule name 118 + */ 119 + name: /*#__PURE__*/ v.string(), 120 + /** 121 + * Submodule repository URL 122 + */ 123 + url: /*#__PURE__*/ v.string(), 124 + }); 125 + 126 + type lastCommit$schematype = typeof _lastCommitSchema; 127 + type main$schematype = typeof _mainSchema; 128 + type signature$schematype = typeof _signatureSchema; 129 + type submodule$schematype = typeof _submoduleSchema; 130 + 131 + export interface lastCommitSchema extends lastCommit$schematype {} 132 + export interface mainSchema extends main$schematype {} 133 + export interface signatureSchema extends signature$schematype {} 134 + export interface submoduleSchema extends submodule$schematype {} 135 + 136 + export const lastCommitSchema = _lastCommitSchema as lastCommitSchema; 137 + export const mainSchema = _mainSchema as mainSchema; 138 + export const signatureSchema = _signatureSchema as signatureSchema; 139 + export const submoduleSchema = _submoduleSchema as submoduleSchema; 140 + 141 + export interface LastCommit extends v.InferInput<typeof lastCommitSchema> {} 142 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 143 + export interface Submodule extends v.InferInput<typeof submoduleSchema> {} 144 + 145 + export interface $params extends v.InferInput<mainSchema["params"]> {} 146 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 147 + 148 + declare module "@atcute/lexicons/ambient" { 149 + interface XRPCQueries { 150 + "sh.tangled.repo.blob": mainSchema; 151 + } 152 + }
+85
web/src/lib/api/lexicons/types/sh/tangled/repo/branch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.branch", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Branch name to get information for 9 + */ 10 + name: /*#__PURE__*/ v.string(), 11 + /** 12 + * Repository identifier in format 'did:plc:.../repoName' 13 + */ 14 + repo: /*#__PURE__*/ v.string(), 15 + }), 16 + output: { 17 + type: "lex", 18 + schema: /*#__PURE__*/ v.object({ 19 + get author() { 20 + return /*#__PURE__*/ v.optional(signatureSchema); 21 + }, 22 + /** 23 + * Latest commit hash on this branch 24 + */ 25 + hash: /*#__PURE__*/ v.string(), 26 + /** 27 + * Whether this is the default branch 28 + */ 29 + isDefault: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 30 + /** 31 + * Latest commit message 32 + */ 33 + message: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 34 + /** 35 + * Branch name 36 + */ 37 + name: /*#__PURE__*/ v.string(), 38 + /** 39 + * Short commit hash 40 + */ 41 + shortHash: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + /** 43 + * Timestamp of latest commit 44 + */ 45 + when: /*#__PURE__*/ v.datetimeString(), 46 + }), 47 + }, 48 + }); 49 + const _signatureSchema = /*#__PURE__*/ v.object({ 50 + $type: /*#__PURE__*/ v.optional( 51 + /*#__PURE__*/ v.literal("sh.tangled.repo.branch#signature"), 52 + ), 53 + /** 54 + * Author email 55 + */ 56 + email: /*#__PURE__*/ v.string(), 57 + /** 58 + * Author name 59 + */ 60 + name: /*#__PURE__*/ v.string(), 61 + /** 62 + * Author timestamp 63 + */ 64 + when: /*#__PURE__*/ v.datetimeString(), 65 + }); 66 + 67 + type main$schematype = typeof _mainSchema; 68 + type signature$schematype = typeof _signatureSchema; 69 + 70 + export interface mainSchema extends main$schematype {} 71 + export interface signatureSchema extends signature$schematype {} 72 + 73 + export const mainSchema = _mainSchema as mainSchema; 74 + export const signatureSchema = _signatureSchema as signatureSchema; 75 + 76 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 77 + 78 + export interface $params extends v.InferInput<mainSchema["params"]> {} 79 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 80 + 81 + declare module "@atcute/lexicons/ambient" { 82 + interface XRPCQueries { 83 + "sh.tangled.repo.branch": mainSchema; 84 + } 85 + }
+46
web/src/lib/api/lexicons/types/sh/tangled/repo/branches.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.branches", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of branches to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Repository identifier in format 'did:plc:.../repoName' 25 + */ 26 + repo: /*#__PURE__*/ v.string(), 27 + }), 28 + output: { 29 + type: "blob", 30 + }, 31 + }); 32 + 33 + type main$schematype = typeof _mainSchema; 34 + 35 + export interface mainSchema extends main$schematype {} 36 + 37 + export const mainSchema = _mainSchema as mainSchema; 38 + 39 + export interface $params extends v.InferInput<mainSchema["params"]> {} 40 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 41 + 42 + declare module "@atcute/lexicons/ambient" { 43 + interface XRPCQueries { 44 + "sh.tangled.repo.branches": mainSchema; 45 + } 46 + }
+30
web/src/lib/api/lexicons/types/sh/tangled/repo/collaborator.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.collaborator"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + /** 11 + * repo DID to add this user to 12 + */ 13 + repo: /*#__PURE__*/ v.didString(), 14 + subject: /*#__PURE__*/ v.didString(), 15 + }), 16 + ); 17 + 18 + type main$schematype = typeof _mainSchema; 19 + 20 + export interface mainSchema extends main$schematype {} 21 + 22 + export const mainSchema = _mainSchema as mainSchema; 23 + 24 + export interface Main extends v.InferInput<typeof mainSchema> {} 25 + 26 + declare module "@atcute/lexicons/ambient" { 27 + interface Records { 28 + "sh.tangled.repo.collaborator": mainSchema; 29 + } 30 + }
+38
web/src/lib/api/lexicons/types/sh/tangled/repo/compare.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.compare", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Repository identifier in format 'did:plc:.../repoName' 9 + */ 10 + repo: /*#__PURE__*/ v.string(), 11 + /** 12 + * First revision (commit, branch, or tag) 13 + */ 14 + rev1: /*#__PURE__*/ v.string(), 15 + /** 16 + * Second revision (commit, branch, or tag) 17 + */ 18 + rev2: /*#__PURE__*/ v.string(), 19 + }), 20 + output: { 21 + type: "blob", 22 + }, 23 + }); 24 + 25 + type main$schematype = typeof _mainSchema; 26 + 27 + export interface mainSchema extends main$schematype {} 28 + 29 + export const mainSchema = _mainSchema as mainSchema; 30 + 31 + export interface $params extends v.InferInput<mainSchema["params"]> {} 32 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 33 + 34 + declare module "@atcute/lexicons/ambient" { 35 + interface XRPCQueries { 36 + "sh.tangled.repo.compare": mainSchema; 37 + } 38 + }
+54
web/src/lib/api/lexicons/types/sh/tangled/repo/create.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.create", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Default branch to push to 12 + */ 13 + defaultBranch: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * Name of the repository 16 + */ 17 + name: /*#__PURE__*/ v.string(), 18 + /** 19 + * Optional user-provided did:web to use as the repo identity instead of minting a did:plc. 20 + */ 21 + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 22 + /** 23 + * Rkey of the repository record 24 + */ 25 + rkey: /*#__PURE__*/ v.string(), 26 + /** 27 + * A source URL to clone from, populate this when forking or importing a repository. 28 + */ 29 + source: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 30 + }), 31 + }, 32 + output: { 33 + type: "lex", 34 + schema: /*#__PURE__*/ v.object({ 35 + repoDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 36 + }), 37 + }, 38 + }); 39 + 40 + type main$schematype = typeof _mainSchema; 41 + 42 + export interface mainSchema extends main$schematype {} 43 + 44 + export const mainSchema = _mainSchema as mainSchema; 45 + 46 + export interface $params {} 47 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 48 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 49 + 50 + declare module "@atcute/lexicons/ambient" { 51 + interface XRPCProcedures { 52 + "sh.tangled.repo.create": mainSchema; 53 + } 54 + }
+40
web/src/lib/api/lexicons/types/sh/tangled/repo/delete.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.delete", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * DID of the repository owner 12 + */ 13 + did: /*#__PURE__*/ v.didString(), 14 + /** 15 + * Name of the repository to delete 16 + */ 17 + name: /*#__PURE__*/ v.string(), 18 + /** 19 + * Rkey of the repository record 20 + */ 21 + rkey: /*#__PURE__*/ v.string(), 22 + }), 23 + }, 24 + output: null, 25 + }); 26 + 27 + type main$schematype = typeof _mainSchema; 28 + 29 + export interface mainSchema extends main$schematype {} 30 + 31 + export const mainSchema = _mainSchema as mainSchema; 32 + 33 + export interface $params {} 34 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 35 + 36 + declare module "@atcute/lexicons/ambient" { 37 + interface XRPCProcedures { 38 + "sh.tangled.repo.delete": mainSchema; 39 + } 40 + }
+30
web/src/lib/api/lexicons/types/sh/tangled/repo/deleteBranch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.deleteBranch", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + branch: /*#__PURE__*/ v.string(), 11 + repo: /*#__PURE__*/ v.resourceUriString(), 12 + }), 13 + }, 14 + output: null, 15 + }); 16 + 17 + type main$schematype = typeof _mainSchema; 18 + 19 + export interface mainSchema extends main$schematype {} 20 + 21 + export const mainSchema = _mainSchema as mainSchema; 22 + 23 + export interface $params {} 24 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 25 + 26 + declare module "@atcute/lexicons/ambient" { 27 + interface XRPCProcedures { 28 + "sh.tangled.repo.deleteBranch": mainSchema; 29 + } 30 + }
+41
web/src/lib/api/lexicons/types/sh/tangled/repo/describeRepo.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.describeRepo", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * DID of the git repo as minted by the knot 9 + */ 10 + repoDid: /*#__PURE__*/ v.didString(), 11 + }), 12 + output: { 13 + type: "lex", 14 + schema: /*#__PURE__*/ v.object({ 15 + /** 16 + * DID of the current owner according to the knot. 17 + */ 18 + ownerDid: /*#__PURE__*/ v.didString(), 19 + repoDid: /*#__PURE__*/ v.didString(), 20 + /** 21 + * Current rkey of the sh.tangled.repo record tracked by this knot 22 + */ 23 + rkey: /*#__PURE__*/ v.recordKeyString(), 24 + }), 25 + }, 26 + }); 27 + 28 + type main$schematype = typeof _mainSchema; 29 + 30 + export interface mainSchema extends main$schematype {} 31 + 32 + export const mainSchema = _mainSchema as mainSchema; 33 + 34 + export interface $params extends v.InferInput<mainSchema["params"]> {} 35 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 36 + 37 + declare module "@atcute/lexicons/ambient" { 38 + interface XRPCQueries { 39 + "sh.tangled.repo.describeRepo": mainSchema; 40 + } 41 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/repo/diff.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.diff", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Git reference (branch, tag, or commit SHA) 9 + */ 10 + ref: /*#__PURE__*/ v.string(), 11 + /** 12 + * Repository identifier in format 'did:plc:.../repoName' 13 + */ 14 + repo: /*#__PURE__*/ v.string(), 15 + }), 16 + output: { 17 + type: "blob", 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params extends v.InferInput<mainSchema["params"]> {} 28 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.repo.diff": mainSchema; 33 + } 34 + }
+57
web/src/lib/api/lexicons/types/sh/tangled/repo/forkStatus.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.forkStatus", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Branch to check status for 12 + */ 13 + branch: /*#__PURE__*/ v.string(), 14 + /** 15 + * DID of the fork owner 16 + */ 17 + did: /*#__PURE__*/ v.didString(), 18 + /** 19 + * Hidden ref to use for comparison 20 + */ 21 + hiddenRef: /*#__PURE__*/ v.string(), 22 + /** 23 + * Name of the forked repository 24 + */ 25 + name: /*#__PURE__*/ v.string(), 26 + /** 27 + * Source repository URL 28 + */ 29 + source: /*#__PURE__*/ v.string(), 30 + }), 31 + }, 32 + output: { 33 + type: "lex", 34 + schema: /*#__PURE__*/ v.object({ 35 + /** 36 + * Fork status: 0=UpToDate, 1=FastForwardable, 2=Conflict, 3=MissingBranch 37 + */ 38 + status: /*#__PURE__*/ v.integer(), 39 + }), 40 + }, 41 + }); 42 + 43 + type main$schematype = typeof _mainSchema; 44 + 45 + export interface mainSchema extends main$schematype {} 46 + 47 + export const mainSchema = _mainSchema as mainSchema; 48 + 49 + export interface $params {} 50 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 51 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 52 + 53 + declare module "@atcute/lexicons/ambient" { 54 + interface XRPCProcedures { 55 + "sh.tangled.repo.forkStatus": mainSchema; 56 + } 57 + }
+44
web/src/lib/api/lexicons/types/sh/tangled/repo/forkSync.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.forkSync", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Branch to sync 12 + */ 13 + branch: /*#__PURE__*/ v.string(), 14 + /** 15 + * DID of the fork owner 16 + */ 17 + did: /*#__PURE__*/ v.didString(), 18 + /** 19 + * Name of the forked repository 20 + */ 21 + name: /*#__PURE__*/ v.string(), 22 + /** 23 + * AT-URI of the source repository 24 + */ 25 + source: /*#__PURE__*/ v.resourceUriString(), 26 + }), 27 + }, 28 + output: null, 29 + }); 30 + 31 + type main$schematype = typeof _mainSchema; 32 + 33 + export interface mainSchema extends main$schematype {} 34 + 35 + export const mainSchema = _mainSchema as mainSchema; 36 + 37 + export interface $params {} 38 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 39 + 40 + declare module "@atcute/lexicons/ambient" { 41 + interface XRPCProcedures { 42 + "sh.tangled.repo.forkSync": mainSchema; 43 + } 44 + }
+77
web/src/lib/api/lexicons/types/sh/tangled/repo/getDefaultBranch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.getDefaultBranch", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Repository identifier in format 'did:plc:.../repoName' 9 + */ 10 + repo: /*#__PURE__*/ v.string(), 11 + }), 12 + output: { 13 + type: "lex", 14 + schema: /*#__PURE__*/ v.object({ 15 + get author() { 16 + return /*#__PURE__*/ v.optional(signatureSchema); 17 + }, 18 + /** 19 + * Latest commit hash on default branch 20 + */ 21 + hash: /*#__PURE__*/ v.string(), 22 + /** 23 + * Latest commit message 24 + */ 25 + message: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 26 + /** 27 + * Default branch name 28 + */ 29 + name: /*#__PURE__*/ v.string(), 30 + /** 31 + * Short commit hash 32 + */ 33 + shortHash: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 34 + /** 35 + * Timestamp of latest commit 36 + */ 37 + when: /*#__PURE__*/ v.datetimeString(), 38 + }), 39 + }, 40 + }); 41 + const _signatureSchema = /*#__PURE__*/ v.object({ 42 + $type: /*#__PURE__*/ v.optional( 43 + /*#__PURE__*/ v.literal("sh.tangled.repo.getDefaultBranch#signature"), 44 + ), 45 + /** 46 + * Author email 47 + */ 48 + email: /*#__PURE__*/ v.string(), 49 + /** 50 + * Author name 51 + */ 52 + name: /*#__PURE__*/ v.string(), 53 + /** 54 + * Author timestamp 55 + */ 56 + when: /*#__PURE__*/ v.datetimeString(), 57 + }); 58 + 59 + type main$schematype = typeof _mainSchema; 60 + type signature$schematype = typeof _signatureSchema; 61 + 62 + export interface mainSchema extends main$schematype {} 63 + export interface signatureSchema extends signature$schematype {} 64 + 65 + export const mainSchema = _mainSchema as mainSchema; 66 + export const signatureSchema = _signatureSchema as signatureSchema; 67 + 68 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 69 + 70 + export interface $params extends v.InferInput<mainSchema["params"]> {} 71 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 72 + 73 + declare module "@atcute/lexicons/ambient" { 74 + interface XRPCQueries { 75 + "sh.tangled.repo.getDefaultBranch": mainSchema; 76 + } 77 + }
+57
web/src/lib/api/lexicons/types/sh/tangled/repo/hiddenRef.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.hiddenRef", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Fork reference name 12 + */ 13 + forkRef: /*#__PURE__*/ v.string(), 14 + /** 15 + * Remote reference name 16 + */ 17 + remoteRef: /*#__PURE__*/ v.string(), 18 + /** 19 + * AT-URI of the repository 20 + */ 21 + repo: /*#__PURE__*/ v.resourceUriString(), 22 + }), 23 + }, 24 + output: { 25 + type: "lex", 26 + schema: /*#__PURE__*/ v.object({ 27 + /** 28 + * Error message if creation failed 29 + */ 30 + error: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 31 + /** 32 + * The created hidden ref name 33 + */ 34 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 35 + /** 36 + * Whether the hidden ref was created successfully 37 + */ 38 + success: /*#__PURE__*/ v.boolean(), 39 + }), 40 + }, 41 + }); 42 + 43 + type main$schematype = typeof _mainSchema; 44 + 45 + export interface mainSchema extends main$schematype {} 46 + 47 + export const mainSchema = _mainSchema as mainSchema; 48 + 49 + export interface $params {} 50 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 51 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 52 + 53 + declare module "@atcute/lexicons/ambient" { 54 + interface XRPCProcedures { 55 + "sh.tangled.repo.hiddenRef": mainSchema; 56 + } 57 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/repo/issue.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.issue"), 9 + body: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 10 + createdAt: /*#__PURE__*/ v.datetimeString(), 11 + mentions: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 13 + ), 14 + references: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 16 + ), 17 + repo: /*#__PURE__*/ v.didString(), 18 + title: /*#__PURE__*/ v.string(), 19 + }), 20 + ); 21 + 22 + type main$schematype = typeof _mainSchema; 23 + 24 + export interface mainSchema extends main$schematype {} 25 + 26 + export const mainSchema = _mainSchema as mainSchema; 27 + 28 + export interface Main extends v.InferInput<typeof mainSchema> {} 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface Records { 32 + "sh.tangled.repo.issue": mainSchema; 33 + } 34 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/comment.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.issue.comment"), 9 + body: /*#__PURE__*/ v.string(), 10 + createdAt: /*#__PURE__*/ v.datetimeString(), 11 + issue: /*#__PURE__*/ v.resourceUriString(), 12 + mentions: /*#__PURE__*/ v.optional( 13 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 14 + ), 15 + references: /*#__PURE__*/ v.optional( 16 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 17 + ), 18 + replyTo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 19 + }), 20 + ); 21 + 22 + type main$schematype = typeof _mainSchema; 23 + 24 + export interface mainSchema extends main$schematype {} 25 + 26 + export const mainSchema = _mainSchema as mainSchema; 27 + 28 + export interface Main extends v.InferInput<typeof mainSchema> {} 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface Records { 32 + "sh.tangled.repo.issue.comment": mainSchema; 33 + } 34 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/listStates.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.issue.listStates#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.repo.issue.state record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.issue.listStates", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Issue AT-URI whose state records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.resourceUriString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.repo.issue.listStates": mainSchema; 74 + } 75 + }
+65
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/listStatesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoIssueListStates from "./listStates.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query( 7 + "sh.tangled.repo.issue.listStatesBy", 8 + { 9 + params: /*#__PURE__*/ v.object({ 10 + /** 11 + * Pagination cursor 12 + */ 13 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * @minimum 1 16 + * @maximum 1000 17 + * @default 50 18 + */ 19 + limit: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 21 + /*#__PURE__*/ v.integerRange(1, 1000), 22 + ]), 23 + 50, 24 + ), 25 + /** 26 + * Sort direction by createdAt. 27 + * @default "desc" 28 + */ 29 + order: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 31 + "desc", 32 + ), 33 + /** 34 + * Actor DID whose issue-state authorings to list. 35 + */ 36 + subject: /*#__PURE__*/ v.didString(), 37 + }), 38 + output: { 39 + type: "lex", 40 + schema: /*#__PURE__*/ v.object({ 41 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + get items() { 43 + return /*#__PURE__*/ v.array( 44 + ShTangledRepoIssueListStates.listItemSchema, 45 + ); 46 + }, 47 + }), 48 + }, 49 + }, 50 + ); 51 + 52 + type main$schematype = typeof _mainSchema; 53 + 54 + export interface mainSchema extends main$schematype {} 55 + 56 + export const mainSchema = _mainSchema as mainSchema; 57 + 58 + export interface $params extends v.InferInput<mainSchema["params"]> {} 59 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 60 + 61 + declare module "@atcute/lexicons/ambient" { 62 + interface XRPCQueries { 63 + "sh.tangled.repo.issue.listStatesBy": mainSchema; 64 + } 65 + }
+38
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/state.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.issue.state"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + issue: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * state of the issue 13 + * @default "sh.tangled.repo.issue.state.open" 14 + */ 15 + state: /*#__PURE__*/ v.optional( 16 + /*#__PURE__*/ v.string< 17 + | "sh.tangled.repo.issue.state.closed" 18 + | "sh.tangled.repo.issue.state.open" 19 + | (string & {}) 20 + >(), 21 + "sh.tangled.repo.issue.state.open", 22 + ), 23 + }), 24 + ); 25 + 26 + type main$schematype = typeof _mainSchema; 27 + 28 + export interface mainSchema extends main$schematype {} 29 + 30 + export const mainSchema = _mainSchema as mainSchema; 31 + 32 + export interface Main extends v.InferInput<typeof mainSchema> {} 33 + 34 + declare module "@atcute/lexicons/ambient" { 35 + interface Records { 36 + "sh.tangled.repo.issue.state": mainSchema; 37 + } 38 + }
+14
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/state/closed.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.literal( 5 + "sh.tangled.repo.issue.state.closed", 6 + ); 7 + 8 + type main$schematype = typeof _mainSchema; 9 + 10 + export interface mainSchema extends main$schematype {} 11 + 12 + export const mainSchema = _mainSchema as mainSchema; 13 + 14 + export type Main = v.InferInput<typeof mainSchema>;
+12
web/src/lib/api/lexicons/types/sh/tangled/repo/issue/state/open.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.literal("sh.tangled.repo.issue.state.open"); 5 + 6 + type main$schematype = typeof _mainSchema; 7 + 8 + export interface mainSchema extends main$schematype {} 9 + 10 + export const mainSchema = _mainSchema as mainSchema; 11 + 12 + export type Main = v.InferInput<typeof mainSchema>;
+88
web/src/lib/api/lexicons/types/sh/tangled/repo/languages.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _languageSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.languages#language"), 8 + ), 9 + /** 10 + * Hex color code for this language 11 + */ 12 + color: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 13 + /** 14 + * File extensions associated with this language 15 + */ 16 + extensions: /*#__PURE__*/ v.optional( 17 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.string()), 18 + ), 19 + /** 20 + * Number of files in this language 21 + */ 22 + fileCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 23 + /** 24 + * Programming language name 25 + */ 26 + name: /*#__PURE__*/ v.string(), 27 + /** 28 + * Percentage of total codebase (0-100) 29 + */ 30 + percentage: /*#__PURE__*/ v.integer(), 31 + /** 32 + * Total size of files in this language (bytes) 33 + */ 34 + size: /*#__PURE__*/ v.integer(), 35 + }); 36 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.languages", { 37 + params: /*#__PURE__*/ v.object({ 38 + /** 39 + * Git reference (branch, tag, or commit SHA) 40 + * @default "HEAD" 41 + */ 42 + ref: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), "HEAD"), 43 + /** 44 + * Repository identifier in format 'did:plc:.../repoName' 45 + */ 46 + repo: /*#__PURE__*/ v.string(), 47 + }), 48 + output: { 49 + type: "lex", 50 + schema: /*#__PURE__*/ v.object({ 51 + get languages() { 52 + return /*#__PURE__*/ v.array(languageSchema); 53 + }, 54 + /** 55 + * The git reference used 56 + */ 57 + ref: /*#__PURE__*/ v.string(), 58 + /** 59 + * Total number of files analyzed 60 + */ 61 + totalFiles: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 62 + /** 63 + * Total size of all analyzed files in bytes 64 + */ 65 + totalSize: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 66 + }), 67 + }, 68 + }); 69 + 70 + type language$schematype = typeof _languageSchema; 71 + type main$schematype = typeof _mainSchema; 72 + 73 + export interface languageSchema extends language$schematype {} 74 + export interface mainSchema extends main$schematype {} 75 + 76 + export const languageSchema = _languageSchema as languageSchema; 77 + export const mainSchema = _mainSchema as mainSchema; 78 + 79 + export interface Language extends v.InferInput<typeof languageSchema> {} 80 + 81 + export interface $params extends v.InferInput<mainSchema["params"]> {} 82 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 83 + 84 + declare module "@atcute/lexicons/ambient" { 85 + interface XRPCQueries { 86 + "sh.tangled.repo.languages": mainSchema; 87 + } 88 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/repo/listArtifacts.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.listArtifacts#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.repo.artifact record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listArtifacts", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Repo or release identifier whose artifacts to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.repo.listArtifacts": mainSchema; 74 + } 75 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/repo/listArtifactsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoListArtifacts from "./listArtifacts.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listArtifactsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose artifact authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array(ShTangledRepoListArtifacts.listItemSchema); 42 + }, 43 + }), 44 + }, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params extends v.InferInput<mainSchema["params"]> {} 54 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCQueries { 58 + "sh.tangled.repo.listArtifactsBy": mainSchema; 59 + } 60 + }
+89
web/src/lib/api/lexicons/types/sh/tangled/repo/listCollaborators.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.listCollaborators#listItem"), 8 + ), 9 + /** 10 + * DID that added this collaborator 11 + */ 12 + addedBy: /*#__PURE__*/ v.didString(), 13 + /** 14 + * Optional record CID for record-backed indexers 15 + */ 16 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 17 + /** 18 + * When the collaborator was added 19 + */ 20 + createdAt: /*#__PURE__*/ v.datetimeString(), 21 + /** 22 + * DID of the collaborator 23 + */ 24 + subject: /*#__PURE__*/ v.didString(), 25 + /** 26 + * Optional record AT-URI for record-backed indexers 27 + */ 28 + uri: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 29 + }); 30 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listCollaborators", { 31 + params: /*#__PURE__*/ v.object({ 32 + /** 33 + * Pagination cursor 34 + */ 35 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 36 + /** 37 + * @minimum 1 38 + * @maximum 1000 39 + * @default 50 40 + */ 41 + limit: /*#__PURE__*/ v.optional( 42 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 43 + /*#__PURE__*/ v.integerRange(1, 1000), 44 + ]), 45 + 50, 46 + ), 47 + /** 48 + * Sort direction by createdAt. 49 + * @default "desc" 50 + */ 51 + order: /*#__PURE__*/ v.optional( 52 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 53 + "desc", 54 + ), 55 + /** 56 + * Repo DID whose collaborator records to list. 57 + */ 58 + subject: /*#__PURE__*/ v.didString(), 59 + }), 60 + output: { 61 + type: "lex", 62 + schema: /*#__PURE__*/ v.object({ 63 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 64 + get items() { 65 + return /*#__PURE__*/ v.array(listItemSchema); 66 + }, 67 + }), 68 + }, 69 + }); 70 + 71 + type listItem$schematype = typeof _listItemSchema; 72 + type main$schematype = typeof _mainSchema; 73 + 74 + export interface listItemSchema extends listItem$schematype {} 75 + export interface mainSchema extends main$schematype {} 76 + 77 + export const listItemSchema = _listItemSchema as listItemSchema; 78 + export const mainSchema = _mainSchema as mainSchema; 79 + 80 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 81 + 82 + export interface $params extends v.InferInput<mainSchema["params"]> {} 83 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 84 + 85 + declare module "@atcute/lexicons/ambient" { 86 + interface XRPCQueries { 87 + "sh.tangled.repo.listCollaborators": mainSchema; 88 + } 89 + }
+65
web/src/lib/api/lexicons/types/sh/tangled/repo/listCollaboratorsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoListCollaborators from "./listCollaborators.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query( 7 + "sh.tangled.repo.listCollaboratorsBy", 8 + { 9 + params: /*#__PURE__*/ v.object({ 10 + /** 11 + * Pagination cursor 12 + */ 13 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * @minimum 1 16 + * @maximum 1000 17 + * @default 50 18 + */ 19 + limit: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 21 + /*#__PURE__*/ v.integerRange(1, 1000), 22 + ]), 23 + 50, 24 + ), 25 + /** 26 + * Sort direction by createdAt. 27 + * @default "desc" 28 + */ 29 + order: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 31 + "desc", 32 + ), 33 + /** 34 + * Actor DID whose collaborator authorings to list. 35 + */ 36 + subject: /*#__PURE__*/ v.didString(), 37 + }), 38 + output: { 39 + type: "lex", 40 + schema: /*#__PURE__*/ v.object({ 41 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + get items() { 43 + return /*#__PURE__*/ v.array( 44 + ShTangledRepoListCollaborators.listItemSchema, 45 + ); 46 + }, 47 + }), 48 + }, 49 + }, 50 + ); 51 + 52 + type main$schematype = typeof _mainSchema; 53 + 54 + export interface mainSchema extends main$schematype {} 55 + 56 + export const mainSchema = _mainSchema as mainSchema; 57 + 58 + export interface $params extends v.InferInput<mainSchema["params"]> {} 59 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 60 + 61 + declare module "@atcute/lexicons/ambient" { 62 + interface XRPCQueries { 63 + "sh.tangled.repo.listCollaboratorsBy": mainSchema; 64 + } 65 + }
+100
web/src/lib/api/lexicons/types/sh/tangled/repo/listIssues.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _issueListItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.listIssues#issueListItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + /** 11 + * Count of sh.tangled.repo.issue.comment records targeting this issue. 12 + * @minimum 0 13 + */ 14 + commentCount: /*#__PURE__*/ v.integer(), 15 + /** 16 + * Latest derived state. 17 + */ 18 + state: /*#__PURE__*/ v.string<"closed" | "open" | (string & {})>(), 19 + /** 20 + * TID-derived timestamp of the latest state record. 21 + */ 22 + stateUpdatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 23 + uri: /*#__PURE__*/ v.resourceUriString(), 24 + /** 25 + * Embedded sh.tangled.repo.issue record 26 + */ 27 + value: /*#__PURE__*/ v.unknown(), 28 + }); 29 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listIssues", { 30 + params: /*#__PURE__*/ v.object({ 31 + /** 32 + * Restrict to issues authored by this user DID. 33 + */ 34 + author: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 35 + /** 36 + * Pagination cursor 37 + */ 38 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 39 + /** 40 + * @minimum 1 41 + * @maximum 1000 42 + * @default 50 43 + */ 44 + limit: /*#__PURE__*/ v.optional( 45 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 46 + /*#__PURE__*/ v.integerRange(1, 1000), 47 + ]), 48 + 50, 49 + ), 50 + /** 51 + * Sort direction by createdAt. 52 + * @default "desc" 53 + */ 54 + order: /*#__PURE__*/ v.optional( 55 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 56 + "desc", 57 + ), 58 + /** 59 + * Restrict to issues whose latest derived state matches. 60 + */ 61 + state: /*#__PURE__*/ v.optional( 62 + /*#__PURE__*/ v.string<"closed" | "open" | (string & {})>(), 63 + ), 64 + /** 65 + * Repo DID to list issues for 66 + */ 67 + subject: /*#__PURE__*/ v.didString(), 68 + }), 69 + output: { 70 + type: "lex", 71 + schema: /*#__PURE__*/ v.object({ 72 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 73 + get items() { 74 + return /*#__PURE__*/ v.array(issueListItemSchema); 75 + }, 76 + }), 77 + }, 78 + }); 79 + 80 + type issueListItem$schematype = typeof _issueListItemSchema; 81 + type main$schematype = typeof _mainSchema; 82 + 83 + export interface issueListItemSchema extends issueListItem$schematype {} 84 + export interface mainSchema extends main$schematype {} 85 + 86 + export const issueListItemSchema = _issueListItemSchema as issueListItemSchema; 87 + export const mainSchema = _mainSchema as mainSchema; 88 + 89 + export interface IssueListItem extends v.InferInput< 90 + typeof issueListItemSchema 91 + > {} 92 + 93 + export interface $params extends v.InferInput<mainSchema["params"]> {} 94 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 95 + 96 + declare module "@atcute/lexicons/ambient" { 97 + interface XRPCQueries { 98 + "sh.tangled.repo.listIssues": mainSchema; 99 + } 100 + }
+68
web/src/lib/api/lexicons/types/sh/tangled/repo/listIssuesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoListIssues from "./listIssues.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listIssuesBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Restrict to issues whose latest derived state matches. 33 + */ 34 + state: /*#__PURE__*/ v.optional( 35 + /*#__PURE__*/ v.string<"closed" | "open" | (string & {})>(), 36 + ), 37 + /** 38 + * Actor DID whose issue authorings to list 39 + */ 40 + subject: /*#__PURE__*/ v.didString(), 41 + }), 42 + output: { 43 + type: "lex", 44 + schema: /*#__PURE__*/ v.object({ 45 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 46 + get items() { 47 + return /*#__PURE__*/ v.array( 48 + ShTangledRepoListIssues.issueListItemSchema, 49 + ); 50 + }, 51 + }), 52 + }, 53 + }); 54 + 55 + type main$schematype = typeof _mainSchema; 56 + 57 + export interface mainSchema extends main$schematype {} 58 + 59 + export const mainSchema = _mainSchema as mainSchema; 60 + 61 + export interface $params extends v.InferInput<mainSchema["params"]> {} 62 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 63 + 64 + declare module "@atcute/lexicons/ambient" { 65 + interface XRPCQueries { 66 + "sh.tangled.repo.listIssuesBy": mainSchema; 67 + } 68 + }
+98
web/src/lib/api/lexicons/types/sh/tangled/repo/listPulls.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listPulls", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Restrict to pulls authored by this user DID. 9 + */ 10 + author: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 11 + /** 12 + * Pagination cursor 13 + */ 14 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 15 + /** 16 + * @minimum 1 17 + * @maximum 1000 18 + * @default 50 19 + */ 20 + limit: /*#__PURE__*/ v.optional( 21 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 22 + /*#__PURE__*/ v.integerRange(1, 1000), 23 + ]), 24 + 50, 25 + ), 26 + /** 27 + * Sort direction by createdAt. 28 + * @default "desc" 29 + */ 30 + order: /*#__PURE__*/ v.optional( 31 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 32 + "desc", 33 + ), 34 + /** 35 + * Restrict to pulls whose latest derived status matches. 36 + */ 37 + status: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"closed" | "merged" | "open" | (string & {})>(), 39 + ), 40 + /** 41 + * Repo DID to list pulls for 42 + */ 43 + subject: /*#__PURE__*/ v.didString(), 44 + }), 45 + output: { 46 + type: "lex", 47 + schema: /*#__PURE__*/ v.object({ 48 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 49 + get items() { 50 + return /*#__PURE__*/ v.array(pullListItemSchema); 51 + }, 52 + }), 53 + }, 54 + }); 55 + const _pullListItemSchema = /*#__PURE__*/ v.object({ 56 + $type: /*#__PURE__*/ v.optional( 57 + /*#__PURE__*/ v.literal("sh.tangled.repo.listPulls#pullListItem"), 58 + ), 59 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 60 + /** 61 + * Count of sh.tangled.repo.pull.comment records targeting this pull. 62 + * @minimum 0 63 + */ 64 + commentCount: /*#__PURE__*/ v.integer(), 65 + /** 66 + * Latest derived state. 67 + */ 68 + state: /*#__PURE__*/ v.string<"closed" | "merged" | "open" | (string & {})>(), 69 + /** 70 + * TID-derived timestamp of the latest pull status record. 71 + */ 72 + stateUpdatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 73 + uri: /*#__PURE__*/ v.resourceUriString(), 74 + /** 75 + * Embedded sh.tangled.repo.pull record 76 + */ 77 + value: /*#__PURE__*/ v.unknown(), 78 + }); 79 + 80 + type main$schematype = typeof _mainSchema; 81 + type pullListItem$schematype = typeof _pullListItemSchema; 82 + 83 + export interface mainSchema extends main$schematype {} 84 + export interface pullListItemSchema extends pullListItem$schematype {} 85 + 86 + export const mainSchema = _mainSchema as mainSchema; 87 + export const pullListItemSchema = _pullListItemSchema as pullListItemSchema; 88 + 89 + export interface PullListItem extends v.InferInput<typeof pullListItemSchema> {} 90 + 91 + export interface $params extends v.InferInput<mainSchema["params"]> {} 92 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 93 + 94 + declare module "@atcute/lexicons/ambient" { 95 + interface XRPCQueries { 96 + "sh.tangled.repo.listPulls": mainSchema; 97 + } 98 + }
+66
web/src/lib/api/lexicons/types/sh/tangled/repo/listPullsBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoListPulls from "./listPulls.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listPullsBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Restrict to pulls whose latest derived status matches. 33 + */ 34 + status: /*#__PURE__*/ v.optional( 35 + /*#__PURE__*/ v.string<"closed" | "merged" | "open" | (string & {})>(), 36 + ), 37 + /** 38 + * Actor DID whose pull authorings to list 39 + */ 40 + subject: /*#__PURE__*/ v.didString(), 41 + }), 42 + output: { 43 + type: "lex", 44 + schema: /*#__PURE__*/ v.object({ 45 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 46 + get items() { 47 + return /*#__PURE__*/ v.array(ShTangledRepoListPulls.pullListItemSchema); 48 + }, 49 + }), 50 + }, 51 + }); 52 + 53 + type main$schematype = typeof _mainSchema; 54 + 55 + export interface mainSchema extends main$schematype {} 56 + 57 + export const mainSchema = _mainSchema as mainSchema; 58 + 59 + export interface $params extends v.InferInput<mainSchema["params"]> {} 60 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 61 + 62 + declare module "@atcute/lexicons/ambient" { 63 + interface XRPCQueries { 64 + "sh.tangled.repo.listPullsBy": mainSchema; 65 + } 66 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/repo/listRepos.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.listRepos#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.repo record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listRepos", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Owner DID whose repo records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.repo.listRepos": mainSchema; 74 + } 75 + }
+52
web/src/lib/api/lexicons/types/sh/tangled/repo/listSecrets.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.listSecrets", { 6 + params: /*#__PURE__*/ v.object({ 7 + repo: /*#__PURE__*/ v.resourceUriString(), 8 + }), 9 + output: { 10 + type: "lex", 11 + schema: /*#__PURE__*/ v.object({ 12 + get secrets() { 13 + return /*#__PURE__*/ v.array(secretSchema); 14 + }, 15 + }), 16 + }, 17 + }); 18 + const _secretSchema = /*#__PURE__*/ v.object({ 19 + $type: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.literal("sh.tangled.repo.listSecrets#secret"), 21 + ), 22 + createdAt: /*#__PURE__*/ v.datetimeString(), 23 + createdBy: /*#__PURE__*/ v.didString(), 24 + /** 25 + * @minLength 1 26 + * @maxLength 50 27 + */ 28 + key: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 29 + /*#__PURE__*/ v.stringLength(1, 50), 30 + ]), 31 + repo: /*#__PURE__*/ v.resourceUriString(), 32 + }); 33 + 34 + type main$schematype = typeof _mainSchema; 35 + type secret$schematype = typeof _secretSchema; 36 + 37 + export interface mainSchema extends main$schematype {} 38 + export interface secretSchema extends secret$schematype {} 39 + 40 + export const mainSchema = _mainSchema as mainSchema; 41 + export const secretSchema = _secretSchema as secretSchema; 42 + 43 + export interface Secret extends v.InferInput<typeof secretSchema> {} 44 + 45 + export interface $params extends v.InferInput<mainSchema["params"]> {} 46 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 47 + 48 + declare module "@atcute/lexicons/ambient" { 49 + interface XRPCQueries { 50 + "sh.tangled.repo.listSecrets": mainSchema; 51 + } 52 + }
+55
web/src/lib/api/lexicons/types/sh/tangled/repo/log.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.log", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor (commit SHA) 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of commits to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Path to filter commits by 25 + * @default "" 26 + */ 27 + path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), ""), 28 + /** 29 + * Git reference (branch, tag, or commit SHA) 30 + */ 31 + ref: /*#__PURE__*/ v.string(), 32 + /** 33 + * Repository identifier in format 'did:plc:.../repoName' 34 + */ 35 + repo: /*#__PURE__*/ v.string(), 36 + }), 37 + output: { 38 + type: "blob", 39 + }, 40 + }); 41 + 42 + type main$schematype = typeof _mainSchema; 43 + 44 + export interface mainSchema extends main$schematype {} 45 + 46 + export const mainSchema = _mainSchema as mainSchema; 47 + 48 + export interface $params extends v.InferInput<mainSchema["params"]> {} 49 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 50 + 51 + declare module "@atcute/lexicons/ambient" { 52 + interface XRPCQueries { 53 + "sh.tangled.repo.log": mainSchema; 54 + } 55 + }
+60
web/src/lib/api/lexicons/types/sh/tangled/repo/merge.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.merge", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * Author email for the merge commit 12 + */ 13 + authorEmail: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * Author name for the merge commit 16 + */ 17 + authorName: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 18 + /** 19 + * Target branch to merge into 20 + */ 21 + branch: /*#__PURE__*/ v.string(), 22 + /** 23 + * Additional commit message body 24 + */ 25 + commitBody: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 26 + /** 27 + * Merge commit message 28 + */ 29 + commitMessage: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 30 + /** 31 + * DID of the repository owner 32 + */ 33 + did: /*#__PURE__*/ v.didString(), 34 + /** 35 + * Name of the repository 36 + */ 37 + name: /*#__PURE__*/ v.string(), 38 + /** 39 + * Patch content to merge 40 + */ 41 + patch: /*#__PURE__*/ v.string(), 42 + }), 43 + }, 44 + output: null, 45 + }); 46 + 47 + type main$schematype = typeof _mainSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + 51 + export const mainSchema = _mainSchema as mainSchema; 52 + 53 + export interface $params {} 54 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 55 + 56 + declare module "@atcute/lexicons/ambient" { 57 + interface XRPCProcedures { 58 + "sh.tangled.repo.merge": mainSchema; 59 + } 60 + }
+87
web/src/lib/api/lexicons/types/sh/tangled/repo/mergeCheck.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _conflictInfoSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.mergeCheck#conflictInfo"), 8 + ), 9 + /** 10 + * Name of the conflicted file 11 + */ 12 + filename: /*#__PURE__*/ v.string(), 13 + /** 14 + * Reason for the conflict 15 + */ 16 + reason: /*#__PURE__*/ v.string(), 17 + }); 18 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.mergeCheck", { 19 + params: null, 20 + input: { 21 + type: "lex", 22 + schema: /*#__PURE__*/ v.object({ 23 + /** 24 + * Target branch to merge into 25 + */ 26 + branch: /*#__PURE__*/ v.string(), 27 + /** 28 + * DID of the repository owner 29 + */ 30 + did: /*#__PURE__*/ v.didString(), 31 + /** 32 + * Name of the repository 33 + */ 34 + name: /*#__PURE__*/ v.string(), 35 + /** 36 + * Patch or pull request to check for merge conflicts 37 + */ 38 + patch: /*#__PURE__*/ v.string(), 39 + }), 40 + }, 41 + output: { 42 + type: "lex", 43 + schema: /*#__PURE__*/ v.object({ 44 + /** 45 + * List of files with merge conflicts 46 + */ 47 + get conflicts() { 48 + return /*#__PURE__*/ v.optional( 49 + /*#__PURE__*/ v.array(conflictInfoSchema), 50 + ); 51 + }, 52 + /** 53 + * Error message if check failed 54 + */ 55 + error: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 56 + /** 57 + * Whether the merge has conflicts 58 + */ 59 + is_conflicted: /*#__PURE__*/ v.boolean(), 60 + /** 61 + * Additional message about the merge check 62 + */ 63 + message: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 64 + }), 65 + }, 66 + }); 67 + 68 + type conflictInfo$schematype = typeof _conflictInfoSchema; 69 + type main$schematype = typeof _mainSchema; 70 + 71 + export interface conflictInfoSchema extends conflictInfo$schematype {} 72 + export interface mainSchema extends main$schematype {} 73 + 74 + export const conflictInfoSchema = _conflictInfoSchema as conflictInfoSchema; 75 + export const mainSchema = _mainSchema as mainSchema; 76 + 77 + export interface ConflictInfo extends v.InferInput<typeof conflictInfoSchema> {} 78 + 79 + export interface $params {} 80 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 81 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 82 + 83 + declare module "@atcute/lexicons/ambient" { 84 + interface XRPCProcedures { 85 + "sh.tangled.repo.mergeCheck": mainSchema; 86 + } 87 + }
+81
web/src/lib/api/lexicons/types/sh/tangled/repo/pull.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.pull"), 9 + body: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 10 + createdAt: /*#__PURE__*/ v.datetimeString(), 11 + dependentOn: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 12 + mentions: /*#__PURE__*/ v.optional( 13 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 14 + ), 15 + references: /*#__PURE__*/ v.optional( 16 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 17 + ), 18 + get rounds() { 19 + return /*#__PURE__*/ v.array(roundSchema); 20 + }, 21 + get source() { 22 + return /*#__PURE__*/ v.optional(sourceSchema); 23 + }, 24 + get target() { 25 + return targetSchema; 26 + }, 27 + title: /*#__PURE__*/ v.string(), 28 + }), 29 + ); 30 + const _roundSchema = /*#__PURE__*/ v.object({ 31 + $type: /*#__PURE__*/ v.optional( 32 + /*#__PURE__*/ v.literal("sh.tangled.repo.pull#round"), 33 + ), 34 + createdAt: /*#__PURE__*/ v.datetimeString(), 35 + /** 36 + * @accept application/gzip 37 + */ 38 + patchBlob: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.blob(), [ 39 + /*#__PURE__*/ v.blobAccept(["application/gzip"]), 40 + ]), 41 + }); 42 + const _sourceSchema = /*#__PURE__*/ v.object({ 43 + $type: /*#__PURE__*/ v.optional( 44 + /*#__PURE__*/ v.literal("sh.tangled.repo.pull#source"), 45 + ), 46 + branch: /*#__PURE__*/ v.string(), 47 + repo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.didString()), 48 + }); 49 + const _targetSchema = /*#__PURE__*/ v.object({ 50 + $type: /*#__PURE__*/ v.optional( 51 + /*#__PURE__*/ v.literal("sh.tangled.repo.pull#target"), 52 + ), 53 + branch: /*#__PURE__*/ v.string(), 54 + repo: /*#__PURE__*/ v.didString(), 55 + }); 56 + 57 + type main$schematype = typeof _mainSchema; 58 + type round$schematype = typeof _roundSchema; 59 + type source$schematype = typeof _sourceSchema; 60 + type target$schematype = typeof _targetSchema; 61 + 62 + export interface mainSchema extends main$schematype {} 63 + export interface roundSchema extends round$schematype {} 64 + export interface sourceSchema extends source$schematype {} 65 + export interface targetSchema extends target$schematype {} 66 + 67 + export const mainSchema = _mainSchema as mainSchema; 68 + export const roundSchema = _roundSchema as roundSchema; 69 + export const sourceSchema = _sourceSchema as sourceSchema; 70 + export const targetSchema = _targetSchema as targetSchema; 71 + 72 + export interface Main extends v.InferInput<typeof mainSchema> {} 73 + export interface Round extends v.InferInput<typeof roundSchema> {} 74 + export interface Source extends v.InferInput<typeof sourceSchema> {} 75 + export interface Target extends v.InferInput<typeof targetSchema> {} 76 + 77 + declare module "@atcute/lexicons/ambient" { 78 + interface Records { 79 + "sh.tangled.repo.pull": mainSchema; 80 + } 81 + }
+33
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/comment.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.pull.comment"), 9 + body: /*#__PURE__*/ v.string(), 10 + createdAt: /*#__PURE__*/ v.datetimeString(), 11 + mentions: /*#__PURE__*/ v.optional( 12 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 13 + ), 14 + pull: /*#__PURE__*/ v.resourceUriString(), 15 + references: /*#__PURE__*/ v.optional( 16 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 17 + ), 18 + }), 19 + ); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface Main extends v.InferInput<typeof mainSchema> {} 28 + 29 + declare module "@atcute/lexicons/ambient" { 30 + interface Records { 31 + "sh.tangled.repo.pull.comment": mainSchema; 32 + } 33 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/listStatuses.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.pull.listStatuses#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.repo.pull.status record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.pull.listStatuses", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Pull AT-URI whose status records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.resourceUriString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.repo.pull.listStatuses": mainSchema; 74 + } 75 + }
+65
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/listStatusesBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledRepoPullListStatuses from "./listStatuses.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query( 7 + "sh.tangled.repo.pull.listStatusesBy", 8 + { 9 + params: /*#__PURE__*/ v.object({ 10 + /** 11 + * Pagination cursor 12 + */ 13 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 14 + /** 15 + * @minimum 1 16 + * @maximum 1000 17 + * @default 50 18 + */ 19 + limit: /*#__PURE__*/ v.optional( 20 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 21 + /*#__PURE__*/ v.integerRange(1, 1000), 22 + ]), 23 + 50, 24 + ), 25 + /** 26 + * Sort direction by createdAt. 27 + * @default "desc" 28 + */ 29 + order: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 31 + "desc", 32 + ), 33 + /** 34 + * Actor DID whose pull-status authorings to list. 35 + */ 36 + subject: /*#__PURE__*/ v.didString(), 37 + }), 38 + output: { 39 + type: "lex", 40 + schema: /*#__PURE__*/ v.object({ 41 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 42 + get items() { 43 + return /*#__PURE__*/ v.array( 44 + ShTangledRepoPullListStatuses.listItemSchema, 45 + ); 46 + }, 47 + }), 48 + }, 49 + }, 50 + ); 51 + 52 + type main$schematype = typeof _mainSchema; 53 + 54 + export interface mainSchema extends main$schematype {} 55 + 56 + export const mainSchema = _mainSchema as mainSchema; 57 + 58 + export interface $params extends v.InferInput<mainSchema["params"]> {} 59 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 60 + 61 + declare module "@atcute/lexicons/ambient" { 62 + interface XRPCQueries { 63 + "sh.tangled.repo.pull.listStatusesBy": mainSchema; 64 + } 65 + }
+39
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/status.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.repo.pull.status"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + pull: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * status of the pull request 13 + * @default "sh.tangled.repo.pull.status.open" 14 + */ 15 + status: /*#__PURE__*/ v.optional( 16 + /*#__PURE__*/ v.string< 17 + | "sh.tangled.repo.pull.status.closed" 18 + | "sh.tangled.repo.pull.status.merged" 19 + | "sh.tangled.repo.pull.status.open" 20 + | (string & {}) 21 + >(), 22 + "sh.tangled.repo.pull.status.open", 23 + ), 24 + }), 25 + ); 26 + 27 + type main$schematype = typeof _mainSchema; 28 + 29 + export interface mainSchema extends main$schematype {} 30 + 31 + export const mainSchema = _mainSchema as mainSchema; 32 + 33 + export interface Main extends v.InferInput<typeof mainSchema> {} 34 + 35 + declare module "@atcute/lexicons/ambient" { 36 + interface Records { 37 + "sh.tangled.repo.pull.status": mainSchema; 38 + } 39 + }
+14
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/status/closed.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.literal( 5 + "sh.tangled.repo.pull.status.closed", 6 + ); 7 + 8 + type main$schematype = typeof _mainSchema; 9 + 10 + export interface mainSchema extends main$schematype {} 11 + 12 + export const mainSchema = _mainSchema as mainSchema; 13 + 14 + export type Main = v.InferInput<typeof mainSchema>;
+14
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/status/merged.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.literal( 5 + "sh.tangled.repo.pull.status.merged", 6 + ); 7 + 8 + type main$schematype = typeof _mainSchema; 9 + 10 + export interface mainSchema extends main$schematype {} 11 + 12 + export const mainSchema = _mainSchema as mainSchema; 13 + 14 + export type Main = v.InferInput<typeof mainSchema>;
+12
web/src/lib/api/lexicons/types/sh/tangled/repo/pull/status/open.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _mainSchema = /*#__PURE__*/ v.literal("sh.tangled.repo.pull.status.open"); 5 + 6 + type main$schematype = typeof _mainSchema; 7 + 8 + export interface mainSchema extends main$schematype {} 9 + 10 + export const mainSchema = _mainSchema as mainSchema; 11 + 12 + export type Main = v.InferInput<typeof mainSchema>;
+39
web/src/lib/api/lexicons/types/sh/tangled/repo/removeCollaborator.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure( 6 + "sh.tangled.repo.removeCollaborator", 7 + { 8 + params: null, 9 + input: { 10 + type: "lex", 11 + schema: /*#__PURE__*/ v.object({ 12 + /** 13 + * DID of the repository to remove the collaborator from 14 + */ 15 + repo: /*#__PURE__*/ v.didString(), 16 + /** 17 + * DID of the collaborator to remove 18 + */ 19 + subject: /*#__PURE__*/ v.didString(), 20 + }), 21 + }, 22 + output: null, 23 + }, 24 + ); 25 + 26 + type main$schematype = typeof _mainSchema; 27 + 28 + export interface mainSchema extends main$schematype {} 29 + 30 + export const mainSchema = _mainSchema as mainSchema; 31 + 32 + export interface $params {} 33 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 34 + 35 + declare module "@atcute/lexicons/ambient" { 36 + interface XRPCProcedures { 37 + "sh.tangled.repo.removeCollaborator": mainSchema; 38 + } 39 + }
+36
web/src/lib/api/lexicons/types/sh/tangled/repo/removeSecret.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.repo.removeSecret", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * @minLength 1 12 + * @maxLength 50 13 + */ 14 + key: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 15 + /*#__PURE__*/ v.stringLength(1, 50), 16 + ]), 17 + repo: /*#__PURE__*/ v.resourceUriString(), 18 + }), 19 + }, 20 + output: null, 21 + }); 22 + 23 + type main$schematype = typeof _mainSchema; 24 + 25 + export interface mainSchema extends main$schematype {} 26 + 27 + export const mainSchema = _mainSchema as mainSchema; 28 + 29 + export interface $params {} 30 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 31 + 32 + declare module "@atcute/lexicons/ambient" { 33 + interface XRPCProcedures { 34 + "sh.tangled.repo.removeSecret": mainSchema; 35 + } 36 + }
+33
web/src/lib/api/lexicons/types/sh/tangled/repo/setDefaultBranch.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure( 6 + "sh.tangled.repo.setDefaultBranch", 7 + { 8 + params: null, 9 + input: { 10 + type: "lex", 11 + schema: /*#__PURE__*/ v.object({ 12 + defaultBranch: /*#__PURE__*/ v.string(), 13 + repo: /*#__PURE__*/ v.resourceUriString(), 14 + }), 15 + }, 16 + output: null, 17 + }, 18 + ); 19 + 20 + type main$schematype = typeof _mainSchema; 21 + 22 + export interface mainSchema extends main$schematype {} 23 + 24 + export const mainSchema = _mainSchema as mainSchema; 25 + 26 + export interface $params {} 27 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 28 + 29 + declare module "@atcute/lexicons/ambient" { 30 + interface XRPCProcedures { 31 + "sh.tangled.repo.setDefaultBranch": mainSchema; 32 + } 33 + }
+34
web/src/lib/api/lexicons/types/sh/tangled/repo/tag.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.tag", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Repository identifier in format 'did:plc:.../repoName' 9 + */ 10 + repo: /*#__PURE__*/ v.string(), 11 + /** 12 + * Name of tag, such as v1.3.0 13 + */ 14 + tag: /*#__PURE__*/ v.string(), 15 + }), 16 + output: { 17 + type: "blob", 18 + }, 19 + }); 20 + 21 + type main$schematype = typeof _mainSchema; 22 + 23 + export interface mainSchema extends main$schematype {} 24 + 25 + export const mainSchema = _mainSchema as mainSchema; 26 + 27 + export interface $params extends v.InferInput<mainSchema["params"]> {} 28 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 29 + 30 + declare module "@atcute/lexicons/ambient" { 31 + interface XRPCQueries { 32 + "sh.tangled.repo.tag": mainSchema; 33 + } 34 + }
+46
web/src/lib/api/lexicons/types/sh/tangled/repo/tags.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.tags", { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * Maximum number of tags to return 13 + * @minimum 1 14 + * @maximum 100 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 100), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Repository identifier in format 'did:plc:.../repoName' 25 + */ 26 + repo: /*#__PURE__*/ v.string(), 27 + }), 28 + output: { 29 + type: "blob", 30 + }, 31 + }); 32 + 33 + type main$schematype = typeof _mainSchema; 34 + 35 + export interface mainSchema extends main$schematype {} 36 + 37 + export const mainSchema = _mainSchema as mainSchema; 38 + 39 + export interface $params extends v.InferInput<mainSchema["params"]> {} 40 + export type $output = v.InferXRPCBodyInput<mainSchema["output"]>; 41 + 42 + declare module "@atcute/lexicons/ambient" { 43 + interface XRPCQueries { 44 + "sh.tangled.repo.tags": mainSchema; 45 + } 46 + }
+152
web/src/lib/api/lexicons/types/sh/tangled/repo/tree.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _lastCommitSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.repo.tree#lastCommit"), 8 + ), 9 + get author() { 10 + return /*#__PURE__*/ v.optional(signatureSchema); 11 + }, 12 + /** 13 + * Commit hash 14 + */ 15 + hash: /*#__PURE__*/ v.string(), 16 + /** 17 + * Commit message 18 + */ 19 + message: /*#__PURE__*/ v.string(), 20 + /** 21 + * Commit timestamp 22 + */ 23 + when: /*#__PURE__*/ v.datetimeString(), 24 + }); 25 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.repo.tree", { 26 + params: /*#__PURE__*/ v.object({ 27 + /** 28 + * Path within the repository tree 29 + * @default "" 30 + */ 31 + path: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string(), ""), 32 + /** 33 + * Git reference (branch, tag, or commit SHA) 34 + */ 35 + ref: /*#__PURE__*/ v.string(), 36 + /** 37 + * Repository identifier in format 'did:plc:.../repoName' 38 + */ 39 + repo: /*#__PURE__*/ v.string(), 40 + }), 41 + output: { 42 + type: "lex", 43 + schema: /*#__PURE__*/ v.object({ 44 + /** 45 + * Parent directory path 46 + */ 47 + dotdot: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 48 + get files() { 49 + return /*#__PURE__*/ v.array(treeEntrySchema); 50 + }, 51 + get lastCommit() { 52 + return /*#__PURE__*/ v.optional(lastCommitSchema); 53 + }, 54 + /** 55 + * The parent path in the tree 56 + */ 57 + parent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 58 + /** 59 + * Readme for this file tree 60 + */ 61 + get readme() { 62 + return /*#__PURE__*/ v.optional(readmeSchema); 63 + }, 64 + /** 65 + * The git reference used 66 + */ 67 + ref: /*#__PURE__*/ v.string(), 68 + }), 69 + }, 70 + }); 71 + const _readmeSchema = /*#__PURE__*/ v.object({ 72 + $type: /*#__PURE__*/ v.optional( 73 + /*#__PURE__*/ v.literal("sh.tangled.repo.tree#readme"), 74 + ), 75 + /** 76 + * Contents of the readme file 77 + */ 78 + contents: /*#__PURE__*/ v.string(), 79 + /** 80 + * Name of the readme file 81 + */ 82 + filename: /*#__PURE__*/ v.string(), 83 + }); 84 + const _signatureSchema = /*#__PURE__*/ v.object({ 85 + $type: /*#__PURE__*/ v.optional( 86 + /*#__PURE__*/ v.literal("sh.tangled.repo.tree#signature"), 87 + ), 88 + /** 89 + * Author email 90 + */ 91 + email: /*#__PURE__*/ v.string(), 92 + /** 93 + * Author name 94 + */ 95 + name: /*#__PURE__*/ v.string(), 96 + /** 97 + * Author timestamp 98 + */ 99 + when: /*#__PURE__*/ v.datetimeString(), 100 + }); 101 + const _treeEntrySchema = /*#__PURE__*/ v.object({ 102 + $type: /*#__PURE__*/ v.optional( 103 + /*#__PURE__*/ v.literal("sh.tangled.repo.tree#treeEntry"), 104 + ), 105 + get last_commit() { 106 + return /*#__PURE__*/ v.optional(lastCommitSchema); 107 + }, 108 + /** 109 + * File mode 110 + */ 111 + mode: /*#__PURE__*/ v.string(), 112 + /** 113 + * Relative file or directory name 114 + */ 115 + name: /*#__PURE__*/ v.string(), 116 + /** 117 + * File size in bytes 118 + */ 119 + size: /*#__PURE__*/ v.integer(), 120 + }); 121 + 122 + type lastCommit$schematype = typeof _lastCommitSchema; 123 + type main$schematype = typeof _mainSchema; 124 + type readme$schematype = typeof _readmeSchema; 125 + type signature$schematype = typeof _signatureSchema; 126 + type treeEntry$schematype = typeof _treeEntrySchema; 127 + 128 + export interface lastCommitSchema extends lastCommit$schematype {} 129 + export interface mainSchema extends main$schematype {} 130 + export interface readmeSchema extends readme$schematype {} 131 + export interface signatureSchema extends signature$schematype {} 132 + export interface treeEntrySchema extends treeEntry$schematype {} 133 + 134 + export const lastCommitSchema = _lastCommitSchema as lastCommitSchema; 135 + export const mainSchema = _mainSchema as mainSchema; 136 + export const readmeSchema = _readmeSchema as readmeSchema; 137 + export const signatureSchema = _signatureSchema as signatureSchema; 138 + export const treeEntrySchema = _treeEntrySchema as treeEntrySchema; 139 + 140 + export interface LastCommit extends v.InferInput<typeof lastCommitSchema> {} 141 + export interface Readme extends v.InferInput<typeof readmeSchema> {} 142 + export interface Signature extends v.InferInput<typeof signatureSchema> {} 143 + export interface TreeEntry extends v.InferInput<typeof treeEntrySchema> {} 144 + 145 + export interface $params extends v.InferInput<mainSchema["params"]> {} 146 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 147 + 148 + declare module "@atcute/lexicons/ambient" { 149 + interface XRPCQueries { 150 + "sh.tangled.repo.tree": mainSchema; 151 + } 152 + }
+25
web/src/lib/api/lexicons/types/sh/tangled/spindle.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.spindle"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + }), 11 + ); 12 + 13 + type main$schematype = typeof _mainSchema; 14 + 15 + export interface mainSchema extends main$schematype {} 16 + 17 + export const mainSchema = _mainSchema as mainSchema; 18 + 19 + export interface Main extends v.InferInput<typeof mainSchema> {} 20 + 21 + declare module "@atcute/lexicons/ambient" { 22 + interface Records { 23 + "sh.tangled.spindle": mainSchema; 24 + } 25 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/spindle/listMembers.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.spindle.listMembers#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.spindle.member record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.spindle.listMembers", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Spindle identifier whose member records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.spindle.listMembers": mainSchema; 74 + } 75 + }
+62
web/src/lib/api/lexicons/types/sh/tangled/spindle/listMembersBy.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + import * as ShTangledSpindleListMembers from "./listMembers.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.spindle.listMembersBy", { 7 + params: /*#__PURE__*/ v.object({ 8 + /** 9 + * Pagination cursor 10 + */ 11 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + /** 13 + * @minimum 1 14 + * @maximum 1000 15 + * @default 50 16 + */ 17 + limit: /*#__PURE__*/ v.optional( 18 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 19 + /*#__PURE__*/ v.integerRange(1, 1000), 20 + ]), 21 + 50, 22 + ), 23 + /** 24 + * Sort direction by createdAt. 25 + * @default "desc" 26 + */ 27 + order: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 29 + "desc", 30 + ), 31 + /** 32 + * Actor DID whose spindle-member authorings to list. 33 + */ 34 + subject: /*#__PURE__*/ v.didString(), 35 + }), 36 + output: { 37 + type: "lex", 38 + schema: /*#__PURE__*/ v.object({ 39 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 40 + get items() { 41 + return /*#__PURE__*/ v.array( 42 + ShTangledSpindleListMembers.listItemSchema, 43 + ); 44 + }, 45 + }), 46 + }, 47 + }); 48 + 49 + type main$schematype = typeof _mainSchema; 50 + 51 + export interface mainSchema extends main$schematype {} 52 + 53 + export const mainSchema = _mainSchema as mainSchema; 54 + 55 + export interface $params extends v.InferInput<mainSchema["params"]> {} 56 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 57 + 58 + declare module "@atcute/lexicons/ambient" { 59 + interface XRPCQueries { 60 + "sh.tangled.spindle.listMembersBy": mainSchema; 61 + } 62 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/spindle/listSpindles.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.spindle.listSpindles#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.spindle record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.spindle.listSpindles", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Owner DID whose spindle records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.didString(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.spindle.listSpindles": mainSchema; 74 + } 75 + }
+30
web/src/lib/api/lexicons/types/sh/tangled/spindle/member.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.spindle.member"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + /** 11 + * spindle instance that the subject is now a member of 12 + */ 13 + instance: /*#__PURE__*/ v.string(), 14 + subject: /*#__PURE__*/ v.didString(), 15 + }), 16 + ); 17 + 18 + type main$schematype = typeof _mainSchema; 19 + 20 + export interface mainSchema extends main$schematype {} 21 + 22 + export const mainSchema = _mainSchema as mainSchema; 23 + 24 + export interface Main extends v.InferInput<typeof mainSchema> {} 25 + 26 + declare module "@atcute/lexicons/ambient" { 27 + interface Records { 28 + "sh.tangled.spindle.member": mainSchema; 29 + } 30 + }
+44
web/src/lib/api/lexicons/types/sh/tangled/string.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.record( 6 + /*#__PURE__*/ v.tidString(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal("sh.tangled.string"), 9 + /** 10 + * @minGraphemes 1 11 + */ 12 + contents: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 13 + /*#__PURE__*/ v.stringGraphemes(1), 14 + ]), 15 + createdAt: /*#__PURE__*/ v.datetimeString(), 16 + /** 17 + * @maxGraphemes 280 18 + */ 19 + description: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 20 + /*#__PURE__*/ v.stringGraphemes(0, 280), 21 + ]), 22 + /** 23 + * @minGraphemes 1 24 + * @maxGraphemes 140 25 + */ 26 + filename: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 27 + /*#__PURE__*/ v.stringGraphemes(1, 140), 28 + ]), 29 + }), 30 + ); 31 + 32 + type main$schematype = typeof _mainSchema; 33 + 34 + export interface mainSchema extends main$schematype {} 35 + 36 + export const mainSchema = _mainSchema as mainSchema; 37 + 38 + export interface Main extends v.InferInput<typeof mainSchema> {} 39 + 40 + declare module "@atcute/lexicons/ambient" { 41 + interface Records { 42 + "sh.tangled.string": mainSchema; 43 + } 44 + }
+75
web/src/lib/api/lexicons/types/sh/tangled/string/listStrings.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _listItemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.string.listStrings#listItem"), 8 + ), 9 + cid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.cidString()), 10 + uri: /*#__PURE__*/ v.resourceUriString(), 11 + /** 12 + * Embedded sh.tangled.string record 13 + */ 14 + value: /*#__PURE__*/ v.unknown(), 15 + }); 16 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.string.listStrings", { 17 + params: /*#__PURE__*/ v.object({ 18 + /** 19 + * Pagination cursor 20 + */ 21 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 22 + /** 23 + * @minimum 1 24 + * @maximum 1000 25 + * @default 50 26 + */ 27 + limit: /*#__PURE__*/ v.optional( 28 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 29 + /*#__PURE__*/ v.integerRange(1, 1000), 30 + ]), 31 + 50, 32 + ), 33 + /** 34 + * Sort direction by createdAt. 35 + * @default "desc" 36 + */ 37 + order: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 39 + "desc", 40 + ), 41 + /** 42 + * Scope identifier whose string records to list. 43 + */ 44 + subject: /*#__PURE__*/ v.string(), 45 + }), 46 + output: { 47 + type: "lex", 48 + schema: /*#__PURE__*/ v.object({ 49 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 50 + get items() { 51 + return /*#__PURE__*/ v.array(listItemSchema); 52 + }, 53 + }), 54 + }, 55 + }); 56 + 57 + type listItem$schematype = typeof _listItemSchema; 58 + type main$schematype = typeof _mainSchema; 59 + 60 + export interface listItemSchema extends listItem$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + 63 + export const listItemSchema = _listItemSchema as listItemSchema; 64 + export const mainSchema = _mainSchema as mainSchema; 65 + 66 + export interface ListItem extends v.InferInput<typeof listItemSchema> {} 67 + 68 + export interface $params extends v.InferInput<mainSchema["params"]> {} 69 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 70 + 71 + declare module "@atcute/lexicons/ambient" { 72 + interface XRPCQueries { 73 + "sh.tangled.string.listStrings": mainSchema; 74 + } 75 + }
+113
web/src/lib/api/lexicons/types/sh/tangled/sync/listRepos.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _defaultBranchSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional( 7 + /*#__PURE__*/ v.literal("sh.tangled.sync.listRepos#defaultBranch"), 8 + ), 9 + /** 10 + * Commit SHA at the tip of the default branch, for reconciling against a last-known state. Width depends on the repo's git object-format. 11 + * @minLength 40 12 + * @maxLength 128 13 + */ 14 + head: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 16 + /*#__PURE__*/ v.stringLength(40, 128), 17 + ]), 18 + ), 19 + /** 20 + * Default branch ref name, eg. refs/heads/main. 21 + * @maxLength 2560 22 + * @maxGraphemes 256 23 + */ 24 + ref: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 25 + /*#__PURE__*/ v.stringLength(0, 2560), 26 + /*#__PURE__*/ v.stringGraphemes(0, 256), 27 + ]), 28 + }); 29 + const _mainSchema = /*#__PURE__*/ v.query("sh.tangled.sync.listRepos", { 30 + params: /*#__PURE__*/ v.object({ 31 + /** 32 + * Pagination cursor 33 + */ 34 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 35 + /** 36 + * @minimum 1 37 + * @maximum 1000 38 + * @default 50 39 + */ 40 + limit: /*#__PURE__*/ v.optional( 41 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [ 42 + /*#__PURE__*/ v.integerRange(1, 1000), 43 + ]), 44 + 50, 45 + ), 46 + /** 47 + * Sort direction over the service's repo listing order. 48 + * @default "desc" 49 + */ 50 + order: /*#__PURE__*/ v.optional( 51 + /*#__PURE__*/ v.string<"asc" | "desc" | (string & {})>(), 52 + "desc", 53 + ), 54 + }), 55 + output: { 56 + type: "lex", 57 + schema: /*#__PURE__*/ v.object({ 58 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 59 + /** 60 + * @maxLength 1000 61 + */ 62 + get repos() { 63 + return /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(repoSchema), [ 64 + /*#__PURE__*/ v.arrayLength(0, 1000), 65 + ]); 66 + }, 67 + }), 68 + }, 69 + }); 70 + const _repoSchema = /*#__PURE__*/ v.object({ 71 + $type: /*#__PURE__*/ v.optional( 72 + /*#__PURE__*/ v.literal("sh.tangled.sync.listRepos#repo"), 73 + ), 74 + get defaultBranch() { 75 + return /*#__PURE__*/ v.optional(defaultBranchSchema); 76 + }, 77 + /** 78 + * DID of the git repo as minted by the knot 79 + */ 80 + repo: /*#__PURE__*/ v.didString(), 81 + /** 82 + * Serving status of the repo according to the knot. 83 + */ 84 + status: /*#__PURE__*/ v.string< 85 + "active" | "archived" | "disabled" | (string & {}) 86 + >(), 87 + }); 88 + 89 + type defaultBranch$schematype = typeof _defaultBranchSchema; 90 + type main$schematype = typeof _mainSchema; 91 + type repo$schematype = typeof _repoSchema; 92 + 93 + export interface defaultBranchSchema extends defaultBranch$schematype {} 94 + export interface mainSchema extends main$schematype {} 95 + export interface repoSchema extends repo$schematype {} 96 + 97 + export const defaultBranchSchema = _defaultBranchSchema as defaultBranchSchema; 98 + export const mainSchema = _mainSchema as mainSchema; 99 + export const repoSchema = _repoSchema as repoSchema; 100 + 101 + export interface DefaultBranch extends v.InferInput< 102 + typeof defaultBranchSchema 103 + > {} 104 + export interface Repo extends v.InferInput<typeof repoSchema> {} 105 + 106 + export interface $params extends v.InferInput<mainSchema["params"]> {} 107 + export interface $output extends v.InferXRPCBodyInput<mainSchema["output"]> {} 108 + 109 + declare module "@atcute/lexicons/ambient" { 110 + interface XRPCQueries { 111 + "sh.tangled.sync.listRepos": mainSchema; 112 + } 113 + }
+36
web/src/lib/api/lexicons/types/sh/tangled/sync/requestCrawl.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + import type {} from "@atcute/lexicons/ambient"; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure("sh.tangled.sync.requestCrawl", { 6 + params: null, 7 + input: { 8 + type: "lex", 9 + schema: /*#__PURE__*/ v.object({ 10 + /** 11 + * specific repository to ensure crawling 12 + */ 13 + ensureRepo: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 14 + /** 15 + * Hostname of the current service (eg, Knot) that is requesting to be crawled. 16 + */ 17 + hostname: /*#__PURE__*/ v.string(), 18 + }), 19 + }, 20 + output: null, 21 + }); 22 + 23 + type main$schematype = typeof _mainSchema; 24 + 25 + export interface mainSchema extends main$schematype {} 26 + 27 + export const mainSchema = _mainSchema as mainSchema; 28 + 29 + export interface $params {} 30 + export interface $input extends v.InferXRPCBodyInput<mainSchema["input"]> {} 31 + 32 + declare module "@atcute/lexicons/ambient" { 33 + interface XRPCProcedures { 34 + "sh.tangled.sync.requestCrawl": mainSchema; 35 + } 36 + }
+122
web/src/lib/api/load.test.ts
··· 1 + import { describe, expect, it, vi } from 'vitest'; 2 + import { ClientResponseError } from './client'; 3 + import { createRequestCache, httpStatusFor, parallel, toHttpError } from './load'; 4 + 5 + const cre = (status: number, error: string, message?: string): ClientResponseError => 6 + new ClientResponseError({ status, data: { error, message } }); 7 + 8 + describe('httpStatusFor', () => { 9 + it('passes through an in-band XRPC status', () => { 10 + expect(httpStatusFor(cre(404, 'RecordNotFound'))).toBe(404); 11 + }); 12 + 13 + it('prefers an in-band status over the error-name mapping', () => { 14 + // status 503 is in [400,599] so it wins even though the name maps to 404. 15 + expect(httpStatusFor(cre(503, 'RecordNotFound'))).toBe(503); 16 + }); 17 + 18 + it('maps the error name when the status is out of the 400-599 band', () => { 19 + expect(httpStatusFor(cre(200, 'RecordNotFound'))).toBe(404); 20 + expect(httpStatusFor(cre(200, 'InvalidRequest'))).toBe(400); 21 + expect(httpStatusFor(cre(200, 'UpstreamFailed'))).toBe(502); 22 + expect(httpStatusFor(cre(200, 'UpstreamGone'))).toBe(502); 23 + expect(httpStatusFor(cre(200, 'InvalidRecord'))).toBe(502); 24 + expect(httpStatusFor(cre(200, 'Overloaded'))).toBe(503); 25 + expect(httpStatusFor(cre(200, 'SomethingElse'))).toBe(500); 26 + }); 27 + 28 + it('maps any non-XRPC cause to 500', () => { 29 + expect(httpStatusFor(new Error('boom'))).toBe(500); 30 + expect(httpStatusFor('a string')).toBe(500); 31 + expect(httpStatusFor(undefined)).toBe(500); 32 + expect(httpStatusFor({ status: 404 })).toBe(500); 33 + }); 34 + }); 35 + 36 + describe('toHttpError', () => { 37 + it('throws a SvelteKit error with the mapped status and the XRPC description', () => { 38 + let thrown: unknown; 39 + try { 40 + toHttpError(cre(404, 'RecordNotFound', 'no such repo')); 41 + } catch (e) { 42 + thrown = e; 43 + } 44 + expect(thrown).toMatchObject({ status: 404, body: { message: 'no such repo' } }); 45 + }); 46 + 47 + it('falls back to the error name when the description is absent', () => { 48 + let thrown: unknown; 49 + try { 50 + toHttpError(cre(200, 'Overloaded')); 51 + } catch (e) { 52 + thrown = e; 53 + } 54 + expect(thrown).toMatchObject({ status: 503, body: { message: 'Overloaded' } }); 55 + }); 56 + 57 + it('uses the fallback message + 500 for a non-XRPC cause', () => { 58 + let thrown: unknown; 59 + try { 60 + toHttpError(new Error('boom'), 'could not load'); 61 + } catch (e) { 62 + thrown = e; 63 + } 64 + expect(thrown).toMatchObject({ status: 500, body: { message: 'could not load' } }); 65 + }); 66 + }); 67 + 68 + describe('parallel', () => { 69 + it('preserves key/value pairing regardless of settle order', async () => { 70 + // deferred across a few microtasks (no real timer) so it settles after `fast`. 71 + const slow = Promise.resolve() 72 + .then(() => Promise.resolve()) 73 + .then(() => 'slow'); 74 + const result = await parallel({ fast: Promise.resolve('fast'), slow }); 75 + expect(result).toEqual({ fast: 'fast', slow: 'slow' }); 76 + }); 77 + 78 + it('resolves to an empty object for no tasks', async () => { 79 + await expect(parallel({})).resolves.toEqual({}); 80 + }); 81 + 82 + it('rejects if any input promise rejects', async () => { 83 + await expect( 84 + parallel({ a: Promise.resolve(1), b: Promise.reject(new Error('boom')) }) 85 + ).rejects.toThrow('boom'); 86 + }); 87 + }); 88 + 89 + describe('createRequestCache', () => { 90 + it('invokes the loader once per key and shares the value', async () => { 91 + const cache = createRequestCache(); 92 + const load = vi.fn(async () => 42); 93 + 94 + const first = await cache.run('k', load); 95 + const second = await cache.run('k', load); 96 + 97 + expect(first).toBe(42); 98 + expect(second).toBe(42); 99 + expect(load).toHaveBeenCalledTimes(1); 100 + }); 101 + 102 + it('shares one in-flight promise for concurrent same-key calls', () => { 103 + const cache = createRequestCache(); 104 + const load = vi.fn(async () => 'v'); 105 + 106 + const a = cache.run('k', load); 107 + const b = cache.run('k', load); 108 + 109 + expect(a).toBe(b); 110 + expect(load).toHaveBeenCalledTimes(1); 111 + }); 112 + 113 + it('runs distinct keys independently', async () => { 114 + const cache = createRequestCache(); 115 + const load = vi.fn(async (key: string) => key.toUpperCase()); 116 + 117 + await cache.run('a', () => load('a')); 118 + await cache.run('b', () => load('b')); 119 + 120 + expect(load).toHaveBeenCalledTimes(2); 121 + }); 122 + });
+60
web/src/lib/api/load.ts
··· 1 + import { error, type NumericRange } from '@sveltejs/kit'; 2 + import { ClientResponseError } from './client'; 3 + 4 + export const httpStatusFor = (cause: unknown): number => { 5 + if (cause instanceof ClientResponseError) { 6 + if (cause.status >= 400 && cause.status <= 599) return cause.status; 7 + switch (cause.error) { 8 + case 'RecordNotFound': 9 + return 404; 10 + case 'InvalidRequest': 11 + return 400; 12 + case 'UpstreamFailed': 13 + case 'UpstreamGone': 14 + case 'InvalidRecord': 15 + return 502; 16 + case 'Overloaded': 17 + return 503; 18 + default: 19 + return 500; 20 + } 21 + } 22 + return 500; 23 + }; 24 + 25 + export const toHttpError = (cause: unknown, fallbackMessage = 'Request failed'): never => { 26 + const status = httpStatusFor(cause) as NumericRange<400, 599>; 27 + const message = 28 + cause instanceof ClientResponseError ? (cause.description ?? cause.error) : fallbackMessage; 29 + throw error(status, message); 30 + }; 31 + 32 + export const parallel = async <T extends Record<string, Promise<unknown>>>( 33 + tasks: T 34 + ): Promise<{ [K in keyof T]: Awaited<T[K]> }> => { 35 + const keys = Object.keys(tasks) as (keyof T)[]; 36 + const values = await Promise.all(keys.map((key) => tasks[key])); 37 + const out = {} as { [K in keyof T]: Awaited<T[K]> }; 38 + keys.forEach((key, index) => { 39 + out[key] = values[index] as Awaited<T[keyof T]>; 40 + }); 41 + return out; 42 + }; 43 + 44 + // per-request promise de-dupe cache. 45 + export interface RequestCache { 46 + run<T>(key: string, load: () => Promise<T>): Promise<T>; 47 + } 48 + 49 + export const createRequestCache = (): RequestCache => { 50 + const entries = new Map<string, Promise<unknown>>(); 51 + return { 52 + run<T>(key: string, load: () => Promise<T>): Promise<T> { 53 + const existing = entries.get(key) as Promise<T> | undefined; 54 + if (existing) return existing; 55 + const pending = load(); 56 + entries.set(key, pending); 57 + return pending; 58 + } 59 + }; 60 + };
+106
web/src/lib/api/pagination.test.ts
··· 1 + import { describe, expect, it, vi, type Mock } from 'vitest'; 2 + import { createBobbinClient, type BobbinContext } from './client'; 3 + import { collect, pages, paginateBy } from './pagination'; 4 + 5 + const NAME = 'sh.tangled.feed.listStars'; 6 + const PARAMS = { subject: 'did:plc:x' } as const; 7 + 8 + interface Page { 9 + items: readonly { uri: string }[]; 10 + cursor?: string; 11 + } 12 + 13 + const pageResponse = (page: Page): Response => 14 + new Response(JSON.stringify(page), { 15 + status: 200, 16 + headers: { 'content-type': 'application/json' } 17 + }); 18 + 19 + const makeCtx = (fetchMock: typeof globalThis.fetch): BobbinContext => 20 + createBobbinClient({ serviceUrl: 'https://bobbin.test', fetch: fetchMock }); 21 + 22 + const cursorOf = (mock: Mock<typeof globalThis.fetch>, n: number): string | null => 23 + new URL(String(mock.mock.calls[n][0])).searchParams.get('cursor'); 24 + 25 + const threePageFetch = (): Mock<typeof globalThis.fetch> => 26 + vi 27 + .fn<typeof globalThis.fetch>() 28 + .mockResolvedValueOnce(pageResponse({ items: [{ uri: 'a' }, { uri: 'b' }], cursor: 'c1' })) 29 + .mockResolvedValueOnce(pageResponse({ items: [{ uri: 'c' }], cursor: 'c2' })) 30 + .mockResolvedValueOnce(pageResponse({ items: [{ uri: 'd' }] })); 31 + 32 + describe('pages / items / collect follow the cursor', () => { 33 + it('pages() yields every page then stops when a page omits the cursor', async () => { 34 + const fetchMock = threePageFetch(); 35 + const seen: Page[] = []; 36 + for await (const p of pages(makeCtx(fetchMock), NAME, PARAMS)) seen.push(p as Page); 37 + expect(fetchMock).toHaveBeenCalledTimes(3); 38 + expect(seen.map((p) => p.cursor)).toEqual(['c1', 'c2', undefined]); 39 + expect(cursorOf(fetchMock, 0)).toBeNull(); 40 + expect(cursorOf(fetchMock, 1)).toBe('c1'); 41 + expect(cursorOf(fetchMock, 2)).toBe('c2'); 42 + }); 43 + }); 44 + 45 + describe('pagination caps', () => { 46 + it('maxPages caps the number of network round-trips even with unbounded cursors', async () => { 47 + const fetchMock = vi 48 + .fn<typeof globalThis.fetch>() 49 + .mockImplementation(async () => pageResponse({ items: [{ uri: 'x' }], cursor: 'always' })); 50 + const out = await collect(makeCtx(fetchMock), NAME, PARAMS, { maxPages: 2 }); 51 + expect(fetchMock).toHaveBeenCalledTimes(2); 52 + expect(out).toHaveLength(2); 53 + }); 54 + 55 + it('collect({ max }) caps items mid-page without fetching the next page', async () => { 56 + const fetchMock = vi 57 + .fn<typeof globalThis.fetch>() 58 + .mockResolvedValueOnce( 59 + pageResponse({ items: [{ uri: 'a' }, { uri: 'b' }, { uri: 'c' }], cursor: 'c1' }) 60 + ); 61 + const out = await collect(makeCtx(fetchMock), NAME, PARAMS, { max: 2 }); 62 + expect(out).toEqual([{ uri: 'a' }, { uri: 'b' }]); 63 + expect(fetchMock).toHaveBeenCalledTimes(1); 64 + }); 65 + }); 66 + 67 + describe('paginateBy', () => { 68 + it('treats cursor: null as the end of the stream', async () => { 69 + const load = vi.fn(async () => ({ 70 + items: [1, 2] as const, 71 + cursor: null 72 + })); 73 + const out: number[] = []; 74 + for await (const n of paginateBy(load)) out.push(n); 75 + expect(out).toEqual([1, 2]); 76 + expect(load).toHaveBeenCalledTimes(1); 77 + }); 78 + 79 + it('follows a string cursor and forwards it to the loader', async () => { 80 + const load = vi 81 + .fn< 82 + ( 83 + cursor: string | undefined 84 + ) => Promise<{ items: readonly number[]; cursor?: string | null }> 85 + >() 86 + .mockResolvedValueOnce({ items: [1], cursor: 'p2' }) 87 + .mockResolvedValueOnce({ items: [2], cursor: undefined }); 88 + const out: number[] = []; 89 + for await (const n of paginateBy(load)) out.push(n); 90 + expect(out).toEqual([1, 2]); 91 + expect(load).toHaveBeenCalledTimes(2); 92 + expect(load.mock.calls[0][0]).toBeUndefined(); 93 + expect(load.mock.calls[1][0]).toBe('p2'); 94 + }); 95 + 96 + it('maxPages caps loader invocations', async () => { 97 + const load = vi.fn(async () => ({ 98 + items: [0], 99 + cursor: 'always' 100 + })); 101 + const out: number[] = []; 102 + for await (const n of paginateBy(load, { maxPages: 3 })) out.push(n); 103 + expect(load).toHaveBeenCalledTimes(3); 104 + expect(out).toHaveLength(3); 105 + }); 106 + });
+121
web/src/lib/api/pagination.ts
··· 1 + import type { XRPCQueries } from '@atcute/lexicons/ambient'; 2 + import type { 3 + InferInput, 4 + InferOutput, 5 + ObjectSchema, 6 + XRPCLexBodyParam 7 + } from '@atcute/lexicons/validations'; 8 + import { ok, type BobbinContext, type XrpcRequestInit } from './client'; 9 + 10 + export type QueryOutput<TName extends keyof XRPCQueries> = 11 + XRPCQueries[TName]['output'] extends XRPCLexBodyParam 12 + ? InferOutput<XRPCQueries[TName]['output']['schema']> 13 + : never; 14 + 15 + export type QueryParams<TName extends keyof XRPCQueries> = 16 + XRPCQueries[TName]['params'] extends ObjectSchema 17 + ? InferInput<XRPCQueries[TName]['params']> 18 + : Record<string, never>; 19 + 20 + type CursorPage = { items: readonly unknown[]; cursor?: string }; 21 + 22 + // registered queries whose output is an { items, cursor? } page. 23 + export type PaginatedQuery = { 24 + [K in keyof XRPCQueries]: QueryOutput<K> extends CursorPage ? K : never; 25 + }[keyof XRPCQueries]; 26 + 27 + export type PageItem<TName extends PaginatedQuery> = 28 + QueryOutput<TName> extends { items: readonly (infer I)[] } ? I : never; 29 + 30 + export type PageParams<TName extends PaginatedQuery> = Omit<QueryParams<TName>, 'cursor'>; 31 + 32 + export interface PaginateOptions extends XrpcRequestInit { 33 + /** stop after this many network round-trips. */ 34 + maxPages?: number; 35 + } 36 + 37 + const requestPage = <TName extends PaginatedQuery>( 38 + ctx: BobbinContext, 39 + name: TName, 40 + params: PageParams<TName> & { cursor?: string }, 41 + init?: XrpcRequestInit 42 + ): Promise<QueryOutput<TName>> => 43 + ok( 44 + ctx.xrpc.get(name, { 45 + params, 46 + signal: init?.signal, 47 + headers: init?.headers 48 + } as never) 49 + ) as Promise<QueryOutput<TName>>; 50 + export const fetchPage = <TName extends PaginatedQuery>( 51 + ctx: BobbinContext, 52 + name: TName, 53 + params: PageParams<TName> & { cursor?: string }, 54 + init?: XrpcRequestInit 55 + ): Promise<QueryOutput<TName>> => requestPage(ctx, name, params, init); 56 + 57 + export async function* pages<TName extends PaginatedQuery>( 58 + ctx: BobbinContext, 59 + name: TName, 60 + params: PageParams<TName>, 61 + options: PaginateOptions = {} 62 + ): AsyncGenerator<QueryOutput<TName>, void, unknown> { 63 + let cursor: string | undefined; 64 + let seen = 0; 65 + do { 66 + const data = await requestPage( 67 + ctx, 68 + name, 69 + { ...params, cursor } as PageParams<TName> & { cursor?: string }, 70 + options 71 + ); 72 + yield data; 73 + cursor = (data as CursorPage).cursor; 74 + if (options.maxPages && ++seen >= options.maxPages) break; 75 + } while (cursor); 76 + } 77 + 78 + export async function* items<TName extends PaginatedQuery>( 79 + ctx: BobbinContext, 80 + name: TName, 81 + params: PageParams<TName>, 82 + options: PaginateOptions = {} 83 + ): AsyncGenerator<PageItem<TName>, void, unknown> { 84 + for await (const data of pages(ctx, name, params, options)) { 85 + for (const item of (data as CursorPage).items) yield item as PageItem<TName>; 86 + } 87 + } 88 + 89 + export interface CollectOptions extends PaginateOptions { 90 + /** stop once this many items are gathered. */ 91 + max?: number; 92 + } 93 + 94 + export const collect = async <TName extends PaginatedQuery>( 95 + ctx: BobbinContext, 96 + name: TName, 97 + params: PageParams<TName>, 98 + options: CollectOptions = {} 99 + ): Promise<PageItem<TName>[]> => { 100 + const out: PageItem<TName>[] = []; 101 + for await (const item of items(ctx, name, params, options)) { 102 + out.push(item); 103 + if (options.max && out.length >= options.max) break; 104 + } 105 + return out; 106 + }; 107 + 108 + // cursor walker for schema-less list endpoints. 109 + export async function* paginateBy<T>( 110 + load: (cursor: string | undefined) => Promise<{ items: readonly T[]; cursor?: string | null }>, 111 + options: { maxPages?: number } = {} 112 + ): AsyncGenerator<T, void, unknown> { 113 + let cursor: string | undefined; 114 + let seen = 0; 115 + do { 116 + const page = await load(cursor); 117 + for (const item of page.items) yield item; 118 + cursor = page.cursor ?? undefined; 119 + if (options.maxPages && ++seen >= options.maxPages) break; 120 + } while (cursor); 121 + }
+56
web/src/lib/api/records.ts
··· 1 + import type { BobbinContext, XrpcRequestInit } from './client'; 2 + import { jsonGet } from './_request'; 3 + import type * as ShTangledActorProfile from './lexicons/types/sh/tangled/actor/profile'; 4 + import type * as ShTangledRepo from './lexicons/types/sh/tangled/repo'; 5 + import type * as ShTangledRepoIssue from './lexicons/types/sh/tangled/repo/issue'; 6 + import type * as ShTangledRepoPull from './lexicons/types/sh/tangled/repo/pull'; 7 + 8 + /** getRecord-shaped view returned by the hydrated single-record `get*` endpoints. */ 9 + export interface RecordView<V> { 10 + uri: string; 11 + cid?: string; 12 + value: V; 13 + } 14 + 15 + /** Envelope returned by the bulk `get*s` endpoints (no cursor — inputs are explicit uris). */ 16 + export interface RecordList<V> { 17 + items: RecordView<V>[]; 18 + } 19 + 20 + export type RepoRecord = ShTangledRepo.Main; 21 + export type ProfileRecord = ShTangledActorProfile.Main; 22 + export type IssueRecord = ShTangledRepoIssue.Main; 23 + export type PullRecord = ShTangledRepoPull.Main; 24 + 25 + /** Max uris accepted per bulk request (mirrors bobbin's BULK_LIMIT). */ 26 + export const BULK_LIMIT = 50; 27 + 28 + export const getRepo = (ctx: BobbinContext, repo: string, init?: XrpcRequestInit) => 29 + jsonGet<RecordView<RepoRecord>>(ctx, 'sh.tangled.repo.getRepo', { repo }, init); 30 + 31 + export const getRepoByRepoDid = (ctx: BobbinContext, repoDid: string, init?: XrpcRequestInit) => 32 + jsonGet<RecordView<RepoRecord>>(ctx, 'sh.tangled.repo.getRepoByRepoDid', { repoDid }, init); 33 + 34 + export const getProfile = (ctx: BobbinContext, actor: string, init?: XrpcRequestInit) => 35 + jsonGet<RecordView<ProfileRecord>>(ctx, 'sh.tangled.actor.getProfile', { actor }, init); 36 + 37 + export const getIssue = (ctx: BobbinContext, issue: string, init?: XrpcRequestInit) => 38 + jsonGet<RecordView<IssueRecord>>(ctx, 'sh.tangled.repo.getIssue', { issue }, init); 39 + 40 + export const getPull = (ctx: BobbinContext, pull: string, init?: XrpcRequestInit) => 41 + jsonGet<RecordView<PullRecord>>(ctx, 'sh.tangled.repo.getPull', { pull }, init); 42 + 43 + export const getRepos = (ctx: BobbinContext, repos: readonly string[], init?: XrpcRequestInit) => 44 + jsonGet<RecordList<RepoRecord>>(ctx, 'sh.tangled.repo.getRepos', { repos }, init); 45 + 46 + export const getProfiles = ( 47 + ctx: BobbinContext, 48 + actors: readonly string[], 49 + init?: XrpcRequestInit 50 + ) => jsonGet<RecordList<ProfileRecord>>(ctx, 'sh.tangled.actor.getProfiles', { actors }, init); 51 + 52 + export const getIssues = (ctx: BobbinContext, issues: readonly string[], init?: XrpcRequestInit) => 53 + jsonGet<RecordList<IssueRecord>>(ctx, 'sh.tangled.repo.getIssues', { issues }, init); 54 + 55 + export const getPulls = (ctx: BobbinContext, pulls: readonly string[], init?: XrpcRequestInit) => 56 + jsonGet<RecordList<PullRecord>>(ctx, 'sh.tangled.repo.getPulls', { pulls }, init);
+48
web/src/lib/api/search.ts
··· 1 + import type { BobbinContext, XrpcRequestInit } from './client'; 2 + import { jsonGet } from './_request'; 3 + import { paginateBy } from './pagination'; 4 + 5 + export interface SearchHit { 6 + uri: string; 7 + cid?: string; 8 + nsid: string; 9 + score: number; 10 + /** the indexed record; shape varies by `nsid`. */ 11 + value: unknown; 12 + } 13 + 14 + export interface SearchPage { 15 + hits: SearchHit[]; 16 + cursor: string | null; 17 + } 18 + 19 + export interface SearchParams { 20 + q: string; 21 + nsid?: string; 22 + author?: string; 23 + repo?: string; 24 + since?: string; 25 + until?: string; 26 + cursor?: string; 27 + limit?: number; 28 + } 29 + 30 + /** One page of full-text search hits. */ 31 + export const search = (ctx: BobbinContext, params: SearchParams, init?: XrpcRequestInit) => 32 + jsonGet<SearchPage>(ctx, 'sh.tangled.search.query', { ...params }, init); 33 + 34 + export interface SearchAllOptions extends XrpcRequestInit { 35 + maxPages?: number; 36 + } 37 + 38 + /** Async-iterate every search hit across cursor pages. */ 39 + export async function* searchAll( 40 + ctx: BobbinContext, 41 + params: Omit<SearchParams, 'cursor'>, 42 + options: SearchAllOptions = {} 43 + ): AsyncGenerator<SearchHit, void, unknown> { 44 + yield* paginateBy<SearchHit>(async (cursor) => { 45 + const page = await search(ctx, { ...params, cursor }, options); 46 + return { items: page.hits, cursor: page.cursor }; 47 + }, options); 48 + }
+5
web/src/lib/server/bobbin.ts
··· 1 + import { createBobbinClient, type BobbinContext } from '$lib/api/client'; 2 + import { getConfig } from './config'; 3 + 4 + export const serverBobbin = (event: { fetch: typeof globalThis.fetch }): BobbinContext => 5 + createBobbinClient({ serviceUrl: getConfig().bobbinUrl, fetch: event.fetch });