Music streaming on ATProto!
14
fork

Configure Feed

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

refactor(lexicons): use atcute for codegen

+600 -41
+3
.gitignore
··· 23 23 # Vite 24 24 vite.config.js.timestamp-* 25 25 vite.config.ts.timestamp-* 26 + 27 + # Nix 28 + result
+8 -30
bun.lock
··· 42 42 "packages/lexicons": { 43 43 "name": "@comet/lexicons", 44 44 "dependencies": { 45 - "@atproto/lexicon": "^0.4.11", 45 + "@atcute/lex-cli": "^2.0.2", 46 + "@atcute/lexicons": "^1.0.3", 46 47 }, 47 48 "devDependencies": { 48 - "@atproto/lex-cli": "^0.8.1", 49 49 "@types/bun": "latest", 50 50 }, 51 51 "peerDependencies": { ··· 56 56 "packages": { 57 57 "@ampproject/remapping": ["@ampproject/remapping@2.3.0", "", { "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw=="], 58 58 59 - "@atproto/common-web": ["@atproto/common-web@0.4.2", "", { "dependencies": { "graphemer": "^1.4.0", "multiformats": "^9.9.0", "uint8arrays": "3.0.0", "zod": "^3.23.8" } }, "sha512-vrXwGNoFGogodjQvJDxAeP3QbGtawgZute2ed1XdRO0wMixLk3qewtikZm06H259QDJVu6voKC5mubml+WgQUw=="], 59 + "@atcute/lex-cli": ["@atcute/lex-cli@2.0.2", "", { "dependencies": { "@atcute/lexicon-doc": "^1.0.1", "@badrap/valita": "^0.4.4", "@externdefs/collider": "^0.3.0", "picocolors": "^1.1.1", "prettier": "^3.5.3" }, "bin": { "lex-cli": "cli.mjs" } }, "sha512-GdudG2F4FKgFLdE7pB+aj2JOprCHkjlYtG1/rJriHKUZ5CPPfhd8A/+xMXaf9qoNqtyK4L7G3GYpd2PnS9bF8Q=="], 60 60 61 - "@atproto/lex-cli": ["@atproto/lex-cli@0.8.1", "", { "dependencies": { "@atproto/lexicon": "^0.4.11", "@atproto/syntax": "^0.4.0", "chalk": "^4.1.2", "commander": "^9.4.0", "prettier": "^3.2.5", "ts-morph": "^24.0.0", "yesno": "^0.4.0", "zod": "^3.23.8" }, "bin": { "lex": "dist/index.js" } }, "sha512-0Ns6kX46gum2jU8bpvWCSVqoYhjmJrOGR/NLfLHgPbJtBlyxMGQAxqpy1x6zOi6SkkRGWYhHvRfr5J8lTHbxjA=="], 61 + "@atcute/lexicon-doc": ["@atcute/lexicon-doc@1.0.1", "", { "dependencies": { "@badrap/valita": "^0.4.4" } }, "sha512-BcuCN8aPXP1QfVAy6B6SXDiNMD0Whqsp4QhFShVpOdGjZIRbSxlRaTkY1rT3peNZy5zi1U5y1LlqGdoXa79wVg=="], 62 62 63 - "@atproto/lexicon": ["@atproto/lexicon@0.4.11", "", { "dependencies": { "@atproto/common-web": "^0.4.2", "@atproto/syntax": "^0.4.0", "iso-datestring-validator": "^2.2.2", "multiformats": "^9.9.0", "zod": "^3.23.8" } }, "sha512-btefdnvNz2Ao2I+qbmj0F06HC8IlrM/IBz6qOBS50r0S6uDf5tOO+Mv2tSVdimFkdzyDdLtBI1sV36ONxz2cOw=="], 63 + "@atcute/lexicons": ["@atcute/lexicons@1.0.3", "", { "dependencies": { "esm-env": "^1.2.2" } }, "sha512-R4xa3AMD+uMNn67/Nly0ohieT+vuN2qeV8Oq/mkpb0O3pFTuG7IkhXEGIXVnFY6I/NEQGhWB1FjHYpgRyL35Pw=="], 64 64 65 - "@atproto/syntax": ["@atproto/syntax@0.4.0", "", {}, "sha512-b9y5ceHS8YKOfP3mdKmwAx5yVj9294UN7FG2XzP6V5aKUdFazEYRnR9m5n5ZQFKa3GNvz7de9guZCJ/sUTcOAA=="], 65 + "@badrap/valita": ["@badrap/valita@0.4.4", "", {}, "sha512-GEhUCk9c4XbNxi+0YZHZsV4fYNd6HejfWuN4Ti4c02DauX+LyX5WY1Y3WfyZ8Pxxl0zqhs+MLtW98cMh86vv6g=="], 66 66 67 67 "@comet/lexicons": ["@comet/lexicons@workspace:packages/lexicons"], 68 68 ··· 135 135 "@eslint/object-schema": ["@eslint/object-schema@2.1.6", "", {}, "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA=="], 136 136 137 137 "@eslint/plugin-kit": ["@eslint/plugin-kit@0.3.1", "", { "dependencies": { "@eslint/core": "^0.14.0", "levn": "^0.4.1" } }, "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w=="], 138 + 139 + "@externdefs/collider": ["@externdefs/collider@0.3.0", "", { "peerDependencies": { "@badrap/valita": "^0.4.4" } }, "sha512-x5CpeZ4c8n+1wMFthUMWSQKqCGcQo52/Qbda5ES+JFRRg/D8Ep6/JOvUUq5HExFuv/wW+6UYG2U/mXzw0IAd8Q=="], 138 140 139 141 "@floating-ui/core": ["@floating-ui/core@1.7.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.9" } }, "sha512-FRdBLykrPPA6P76GGGqlex/e7fbe0F1ykgxHYNXQsH/iTEtjMj/f9bpY5oQqbjt5VgZvgz/uKXbGuROijh3VLA=="], 140 142 ··· 258 260 259 261 "@tailwindcss/vite": ["@tailwindcss/vite@4.1.7", "", { "dependencies": { "@tailwindcss/node": "4.1.7", "@tailwindcss/oxide": "4.1.7", "tailwindcss": "4.1.7" }, "peerDependencies": { "vite": "^5.2.0 || ^6" } }, "sha512-tYa2fO3zDe41I7WqijyVbRd8oWT0aEID1Eokz5hMT6wShLIHj3yvwj9XbfuloHP9glZ6H+aG2AN/+ZrxJ1Y5RQ=="], 260 262 261 - "@ts-morph/common": ["@ts-morph/common@0.25.0", "", { "dependencies": { "minimatch": "^9.0.4", "path-browserify": "^1.0.1", "tinyglobby": "^0.2.9" } }, "sha512-kMnZz+vGGHi4GoHnLmMhGNjm44kGtKUXGnOvrKmMwAuvNjM/PgKVGfUnL7IDvK7Jb2QQ82jq3Zmp04Gy+r3Dkg=="], 262 - 263 263 "@types/bun": ["@types/bun@1.2.13", "", { "dependencies": { "bun-types": "1.2.13" } }, "sha512-u6vXep/i9VBxoJl3GjZsl/BFIsvML8DfVDO0RYLEwtSZSp981kEO1V5NwRcO1CPJ7AmvpbnDCiMKo3JvbDEjAg=="], 264 264 265 265 "@types/cookie": ["@types/cookie@0.6.0", "", {}, "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="], ··· 320 320 321 321 "clsx": ["clsx@2.1.1", "", {}, "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=="], 322 322 323 - "code-block-writer": ["code-block-writer@13.0.3", "", {}, "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg=="], 324 - 325 323 "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], 326 324 327 325 "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], 328 326 329 327 "comet": ["comet@workspace:apps/frontend"], 330 328 331 - "commander": ["commander@9.5.0", "", {}, "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="], 332 - 333 329 "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], 334 330 335 331 "cookie": ["cookie@0.6.0", "", {}, "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw=="], ··· 432 428 433 429 "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], 434 430 435 - "iso-datestring-validator": ["iso-datestring-validator@2.2.2", "", {}, "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA=="], 436 - 437 431 "jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="], 438 432 439 433 "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], ··· 501 495 "mrmime": ["mrmime@2.0.1", "", {}, "sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ=="], 502 496 503 497 "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], 504 - 505 - "multiformats": ["multiformats@9.9.0", "", {}, "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="], 506 498 507 499 "nanoid": ["nanoid@3.3.11", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w=="], 508 500 ··· 516 508 517 509 "parent-module": ["parent-module@1.0.1", "", { "dependencies": { "callsites": "^3.0.0" } }, "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g=="], 518 510 519 - "path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="], 520 - 521 511 "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], 522 512 523 513 "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], ··· 604 594 605 595 "ts-api-utils": ["ts-api-utils@2.1.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ=="], 606 596 607 - "ts-morph": ["ts-morph@24.0.0", "", { "dependencies": { "@ts-morph/common": "~0.25.0", "code-block-writer": "^13.0.3" } }, "sha512-2OAOg/Ob5yx9Et7ZX4CvTCc0UFoZHwLEJ+dpDPSUi5TgwwlTlX47w+iFRrEwzUZwYACjq83cgjS/Da50Ga37uw=="], 608 - 609 597 "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], 610 598 611 599 "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], ··· 614 602 615 603 "typescript-eslint": ["typescript-eslint@8.32.1", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.32.1", "@typescript-eslint/parser": "8.32.1", "@typescript-eslint/utils": "8.32.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg=="], 616 604 617 - "uint8arrays": ["uint8arrays@3.0.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA=="], 618 - 619 605 "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], 620 606 621 607 "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], ··· 634 620 635 621 "yaml": ["yaml@1.10.2", "", {}, "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="], 636 622 637 - "yesno": ["yesno@0.4.0", "", {}, "sha512-tdBxmHvbXPBKYIg81bMCB7bVeDmHkRzk5rVJyYYXurwKkHq/MCd8rz4HSJUP7hW0H2NlXiq8IFiWvYKEHhlotA=="], 638 - 639 623 "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], 640 624 641 625 "zimmerframe": ["zimmerframe@1.1.2", "", {}, "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w=="], 642 - 643 - "zod": ["zod@3.24.4", "", {}, "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg=="], 644 626 645 627 "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], 646 628 ··· 660 642 661 643 "@tailwindcss/oxide-wasm32-wasi/tslib": ["tslib@2.8.1", "", { "bundled": true }, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], 662 644 663 - "@ts-morph/common/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], 664 - 665 645 "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.4", "", {}, "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A=="], 666 646 667 647 "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], ··· 669 649 "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], 670 650 671 651 "micromatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], 672 - 673 - "@ts-morph/common/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], 674 652 675 653 "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], 676 654 }
+2 -1
package.json
··· 13 13 "private": true, 14 14 "scripts": { 15 15 "format": "prettier --write .", 16 - "lint": "prettier --check . && eslint ." 16 + "lint": "prettier --check . && eslint .", 17 + "lexicons": "bun --filter @comet/lexicons generate" 17 18 }, 18 19 "type": "module", 19 20 "workspaces": [
-3
packages/lexicons/gen.sh
··· 1 - #!/usr/bin/env zsh 2 - # Temp solution because Bun's shell glob is broken? 3 - lex gen-server --yes ./src ./defs/**/*
+6
packages/lexicons/lex-cli.config.js
··· 1 + import { defineLexiconConfig } from "@atcute/lex-cli"; 2 + 3 + export default defineLexiconConfig({ 4 + files: ["./defs/sh/comet/v0/**/*.json"], 5 + outdir: "./src", 6 + });
+7 -7
packages/lexicons/package.json
··· 1 1 { 2 2 "name": "@comet/lexicons", 3 3 "module": "index.ts", 4 - "type": "module", 5 - "private": true, 6 - "scripts": { 7 - "generate": "zsh gen.sh" 8 - }, 9 4 "devDependencies": { 10 - "@atproto/lex-cli": "^0.8.1", 5 + "@atcute/lex-cli": "^2.0.2", 11 6 "@types/bun": "latest" 12 7 }, 13 8 "peerDependencies": { 14 9 "typescript": "^5" 15 10 }, 11 + "private": true, 12 + "scripts": { 13 + "generate": "lex-cli generate -c ./lex-cli.config.js" 14 + }, 15 + "type": "module", 16 16 "dependencies": { 17 - "@atproto/lexicon": "^0.4.11" 17 + "@atcute/lexicons": "^1.0.3" 18 18 } 19 19 }
+10
packages/lexicons/src/index.ts
··· 1 + export * as ShCometV0ActorGetProfile from "./types/sh/comet/v0/actor/getProfile.js"; 2 + export * as ShCometV0ActorProfile from "./types/sh/comet/v0/actor/profile.js"; 3 + export * as ShCometV0FeedComment from "./types/sh/comet/v0/feed/comment.js"; 4 + export * as ShCometV0FeedDefs from "./types/sh/comet/v0/feed/defs.js"; 5 + export * as ShCometV0FeedLike from "./types/sh/comet/v0/feed/like.js"; 6 + export * as ShCometV0FeedPlay from "./types/sh/comet/v0/feed/play.js"; 7 + export * as ShCometV0FeedPlaylist from "./types/sh/comet/v0/feed/playlist.js"; 8 + export * as ShCometV0FeedRepost from "./types/sh/comet/v0/feed/repost.js"; 9 + export * as ShCometV0FeedTrack from "./types/sh/comet/v0/feed/track.js"; 10 + export * as ShCometV0RichtextFacet from "./types/sh/comet/v0/richtext/facet.js";
+28
packages/lexicons/src/types/sh/comet/v0/actor/getProfile.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 ShCometV0ActorProfile from "./profile.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query("sh.comet.v0.actor.getProfile", { 7 + params: /*#__PURE__*/ v.object({ 8 + actor: /*#__PURE__*/ v.actorIdentifierString(), 9 + }), 10 + output: { 11 + type: "lex", 12 + get schema() { 13 + return ShCometV0ActorProfile.viewSchema; 14 + }, 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 + declare module "@atcute/lexicons/ambient" { 25 + interface XRPCQueries { 26 + "sh.comet.v0.actor.getProfile": mainSchema; 27 + } 28 + }
+120
packages/lexicons/src/types/sh/comet/v0/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 + import * as ShCometV0RichtextFacet from "../richtext/facet.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.record( 7 + /*#__PURE__*/ v.literal("self"), 8 + /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.literal("sh.comet.v0.actor.profile"), 10 + avatar: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 11 + banner: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 12 + createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 13 + description: /*#__PURE__*/ v.optional( 14 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 15 + /*#__PURE__*/ v.stringLength(0, 2560), 16 + /*#__PURE__*/ v.stringGraphemes(0, 256), 17 + ]), 18 + ), 19 + get descriptionFacets() { 20 + return /*#__PURE__*/ v.optional(ShCometV0RichtextFacet.mainSchema); 21 + }, 22 + displayName: /*#__PURE__*/ v.optional( 23 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 24 + /*#__PURE__*/ v.stringLength(0, 640), 25 + /*#__PURE__*/ v.stringGraphemes(0, 64), 26 + ]), 27 + ), 28 + featuredItems: /*#__PURE__*/ v.optional( 29 + /*#__PURE__*/ v.constrain( 30 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 31 + [/*#__PURE__*/ v.arrayLength(0, 5)], 32 + ), 33 + ), 34 + }), 35 + ); 36 + const _viewSchema = /*#__PURE__*/ v.object({ 37 + $type: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.literal("sh.comet.v0.actor.profile#view"), 39 + ), 40 + avatar: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 41 + createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 42 + description: /*#__PURE__*/ v.optional( 43 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 44 + /*#__PURE__*/ v.stringLength(0, 2560), 45 + /*#__PURE__*/ v.stringGraphemes(0, 256), 46 + ]), 47 + ), 48 + get descriptionFacets() { 49 + return /*#__PURE__*/ v.optional(ShCometV0RichtextFacet.mainSchema); 50 + }, 51 + did: /*#__PURE__*/ v.didString(), 52 + displayName: /*#__PURE__*/ v.optional( 53 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 54 + /*#__PURE__*/ v.stringLength(0, 640), 55 + /*#__PURE__*/ v.stringGraphemes(0, 64), 56 + ]), 57 + ), 58 + handle: /*#__PURE__*/ v.handleString(), 59 + indexedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 60 + viewer: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), 61 + }); 62 + const _viewFullSchema = /*#__PURE__*/ v.object({ 63 + $type: /*#__PURE__*/ v.optional( 64 + /*#__PURE__*/ v.literal("sh.comet.v0.actor.profile#viewFull"), 65 + ), 66 + avatar: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 67 + banner: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 68 + createdAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 69 + description: /*#__PURE__*/ v.optional( 70 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 71 + /*#__PURE__*/ v.stringLength(0, 2560), 72 + /*#__PURE__*/ v.stringGraphemes(0, 256), 73 + ]), 74 + ), 75 + get descriptionFacets() { 76 + return /*#__PURE__*/ v.optional(ShCometV0RichtextFacet.mainSchema); 77 + }, 78 + did: /*#__PURE__*/ v.didString(), 79 + displayName: /*#__PURE__*/ v.optional( 80 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 81 + /*#__PURE__*/ v.stringLength(0, 640), 82 + /*#__PURE__*/ v.stringGraphemes(0, 64), 83 + ]), 84 + ), 85 + featuredItems: /*#__PURE__*/ v.optional( 86 + /*#__PURE__*/ v.constrain( 87 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 88 + [/*#__PURE__*/ v.arrayLength(0, 5)], 89 + ), 90 + ), 91 + followersCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 92 + followsCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 93 + handle: /*#__PURE__*/ v.handleString(), 94 + indexedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 95 + playlistsCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 96 + tracksCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 97 + viewer: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.unknown()), 98 + }); 99 + 100 + type main$schematype = typeof _mainSchema; 101 + type view$schematype = typeof _viewSchema; 102 + type viewFull$schematype = typeof _viewFullSchema; 103 + 104 + export interface mainSchema extends main$schematype {} 105 + export interface viewSchema extends view$schematype {} 106 + export interface viewFullSchema extends viewFull$schematype {} 107 + 108 + export const mainSchema = _mainSchema as mainSchema; 109 + export const viewSchema = _viewSchema as viewSchema; 110 + export const viewFullSchema = _viewFullSchema as viewFullSchema; 111 + 112 + export interface Main extends v.InferInput<typeof mainSchema> {} 113 + export interface View extends v.InferInput<typeof viewSchema> {} 114 + export interface ViewFull extends v.InferInput<typeof viewFullSchema> {} 115 + 116 + declare module "@atcute/lexicons/ambient" { 117 + interface Records { 118 + "sh.comet.v0.actor.profile": mainSchema; 119 + } 120 + }
+43
packages/lexicons/src/types/sh/comet/v0/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 ShCometV0RichtextFacet from "../richtext/facet.js"; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.record( 7 + /*#__PURE__*/ v.tidString(), 8 + /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.literal("sh.comet.v0.feed.comment"), 10 + createdAt: /*#__PURE__*/ v.datetimeString(), 11 + get facets() { 12 + return /*#__PURE__*/ v.optional( 13 + /*#__PURE__*/ v.array(ShCometV0RichtextFacet.mainSchema), 14 + ); 15 + }, 16 + langs: /*#__PURE__*/ v.optional( 17 + /*#__PURE__*/ v.constrain( 18 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.languageCodeString()), 19 + [/*#__PURE__*/ v.arrayLength(0, 3)], 20 + ), 21 + ), 22 + reply: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 23 + subject: /*#__PURE__*/ v.resourceUriString(), 24 + text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 25 + /*#__PURE__*/ v.stringLength(1, 3000), 26 + /*#__PURE__*/ v.stringGraphemes(1, 300), 27 + ]), 28 + }), 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 Main extends v.InferInput<typeof mainSchema> {} 38 + 39 + declare module "@atcute/lexicons/ambient" { 40 + interface Records { 41 + "sh.comet.v0.feed.comment": mainSchema; 42 + } 43 + }
+45
packages/lexicons/src/types/sh/comet/v0/feed/defs.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _buyLinkSchema = /*#__PURE__*/ v.literal("sh.comet.v0.feed.defs#buyLink"); 5 + const _downloadLinkSchema = /*#__PURE__*/ v.literal( 6 + "sh.comet.v0.feed.defs#downloadLink", 7 + ); 8 + const _linkSchema = /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.optional( 10 + /*#__PURE__*/ v.literal("sh.comet.v0.feed.defs#link"), 11 + ), 12 + type: /*#__PURE__*/ v.string< 13 + | "sh.comet.v0.feed.defs#buyLink" 14 + | "sh.comet.v0.feed.defs#downloadLink" 15 + | (string & {}) 16 + >(), 17 + value: /*#__PURE__*/ v.genericUriString(), 18 + }); 19 + const _viewerStateSchema = /*#__PURE__*/ v.object({ 20 + $type: /*#__PURE__*/ v.optional( 21 + /*#__PURE__*/ v.literal("sh.comet.v0.feed.defs#viewerState"), 22 + ), 23 + like: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 24 + repost: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.resourceUriString()), 25 + }); 26 + 27 + type buyLink$schematype = typeof _buyLinkSchema; 28 + type downloadLink$schematype = typeof _downloadLinkSchema; 29 + type link$schematype = typeof _linkSchema; 30 + type viewerState$schematype = typeof _viewerStateSchema; 31 + 32 + export interface buyLinkSchema extends buyLink$schematype {} 33 + export interface downloadLinkSchema extends downloadLink$schematype {} 34 + export interface linkSchema extends link$schematype {} 35 + export interface viewerStateSchema extends viewerState$schematype {} 36 + 37 + export const buyLinkSchema = _buyLinkSchema as buyLinkSchema; 38 + export const downloadLinkSchema = _downloadLinkSchema as downloadLinkSchema; 39 + export const linkSchema = _linkSchema as linkSchema; 40 + export const viewerStateSchema = _viewerStateSchema as viewerStateSchema; 41 + 42 + export type BuyLink = v.InferInput<typeof buyLinkSchema>; 43 + export type DownloadLink = v.InferInput<typeof downloadLinkSchema>; 44 + export interface Link extends v.InferInput<typeof linkSchema> {} 45 + export interface ViewerState extends v.InferInput<typeof viewerStateSchema> {}
+26
packages/lexicons/src/types/sh/comet/v0/feed/like.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.comet.v0.feed.like"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + subject: /*#__PURE__*/ v.resourceUriString(), 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.comet.v0.feed.like": mainSchema; 25 + } 26 + }
+26
packages/lexicons/src/types/sh/comet/v0/feed/play.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.comet.v0.feed.play"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + subject: /*#__PURE__*/ v.resourceUriString(), 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.comet.v0.feed.play": mainSchema; 25 + } 26 + }
+92
packages/lexicons/src/types/sh/comet/v0/feed/playlist.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 ShCometV0FeedDefs from "./defs.js"; 5 + import * as ShCometV0RichtextFacet from "../richtext/facet.js"; 6 + 7 + const _albumSchema = /*#__PURE__*/ v.literal("sh.comet.v0.feed.playlist#album"); 8 + const _compilationSchema = /*#__PURE__*/ v.literal( 9 + "sh.comet.v0.feed.playlist#compilation", 10 + ); 11 + const _mainSchema = /*#__PURE__*/ v.record( 12 + /*#__PURE__*/ v.tidString(), 13 + /*#__PURE__*/ v.object({ 14 + $type: /*#__PURE__*/ v.literal("sh.comet.v0.feed.playlist"), 15 + createdAt: /*#__PURE__*/ v.datetimeString(), 16 + description: /*#__PURE__*/ v.optional( 17 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 18 + /*#__PURE__*/ v.stringLength(0, 20000), 19 + /*#__PURE__*/ v.stringGraphemes(0, 2000), 20 + ]), 21 + ), 22 + get descriptionFacets() { 23 + return /*#__PURE__*/ v.optional(ShCometV0RichtextFacet.mainSchema); 24 + }, 25 + image: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 26 + get link() { 27 + return /*#__PURE__*/ v.optional(ShCometV0FeedDefs.linkSchema); 28 + }, 29 + tags: /*#__PURE__*/ v.optional( 30 + /*#__PURE__*/ v.constrain( 31 + /*#__PURE__*/ v.array( 32 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 33 + /*#__PURE__*/ v.stringLength(0, 640), 34 + /*#__PURE__*/ v.stringGraphemes(0, 64), 35 + ]), 36 + ), 37 + [/*#__PURE__*/ v.arrayLength(0, 8)], 38 + ), 39 + ), 40 + title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 41 + /*#__PURE__*/ v.stringLength(1, 2560), 42 + /*#__PURE__*/ v.stringGraphemes(0, 256), 43 + ]), 44 + tracks: /*#__PURE__*/ v.constrain( 45 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.resourceUriString()), 46 + [/*#__PURE__*/ v.arrayLength(1)], 47 + ), 48 + type: /*#__PURE__*/ v.string< 49 + | "sh.comet.v0.feed.playlist#album" 50 + | "sh.comet.v0.feed.playlist#compilation" 51 + | "sh.comet.v0.feed.playlist#playlist" 52 + | "sh.comet.v0.feed.playlist#podcast" 53 + | (string & {}) 54 + >(), 55 + }), 56 + ); 57 + const _playlistSchema = /*#__PURE__*/ v.literal( 58 + "sh.comet.v0.feed.playlist#playlist", 59 + ); 60 + const _podcastSchema = /*#__PURE__*/ v.literal( 61 + "sh.comet.v0.feed.playlist#podcast", 62 + ); 63 + 64 + type album$schematype = typeof _albumSchema; 65 + type compilation$schematype = typeof _compilationSchema; 66 + type main$schematype = typeof _mainSchema; 67 + type playlist$schematype = typeof _playlistSchema; 68 + type podcast$schematype = typeof _podcastSchema; 69 + 70 + export interface albumSchema extends album$schematype {} 71 + export interface compilationSchema extends compilation$schematype {} 72 + export interface mainSchema extends main$schematype {} 73 + export interface playlistSchema extends playlist$schematype {} 74 + export interface podcastSchema extends podcast$schematype {} 75 + 76 + export const albumSchema = _albumSchema as albumSchema; 77 + export const compilationSchema = _compilationSchema as compilationSchema; 78 + export const mainSchema = _mainSchema as mainSchema; 79 + export const playlistSchema = _playlistSchema as playlistSchema; 80 + export const podcastSchema = _podcastSchema as podcastSchema; 81 + 82 + export type Album = v.InferInput<typeof albumSchema>; 83 + export type Compilation = v.InferInput<typeof compilationSchema>; 84 + export interface Main extends v.InferInput<typeof mainSchema> {} 85 + export type Playlist = v.InferInput<typeof playlistSchema>; 86 + export type Podcast = v.InferInput<typeof podcastSchema>; 87 + 88 + declare module "@atcute/lexicons/ambient" { 89 + interface Records { 90 + "sh.comet.v0.feed.playlist": mainSchema; 91 + } 92 + }
+26
packages/lexicons/src/types/sh/comet/v0/feed/repost.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.comet.v0.feed.repost"), 9 + createdAt: /*#__PURE__*/ v.datetimeString(), 10 + subject: /*#__PURE__*/ v.resourceUriString(), 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.comet.v0.feed.repost": mainSchema; 25 + } 26 + }
+80
packages/lexicons/src/types/sh/comet/v0/feed/track.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 ShCometV0FeedDefs from "./defs.js"; 5 + import * as ShCometV0RichtextFacet from "../richtext/facet.js"; 6 + 7 + const _mainSchema = /*#__PURE__*/ v.record( 8 + /*#__PURE__*/ v.tidString(), 9 + /*#__PURE__*/ v.object({ 10 + $type: /*#__PURE__*/ v.literal("sh.comet.v0.feed.track"), 11 + audio: /*#__PURE__*/ v.blob(), 12 + createdAt: /*#__PURE__*/ v.datetimeString(), 13 + description: /*#__PURE__*/ v.optional( 14 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 15 + /*#__PURE__*/ v.stringLength(0, 20000), 16 + /*#__PURE__*/ v.stringGraphemes(0, 2000), 17 + ]), 18 + ), 19 + get descriptionFacets() { 20 + return /*#__PURE__*/ v.optional(ShCometV0RichtextFacet.mainSchema); 21 + }, 22 + image: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 23 + get link() { 24 + return /*#__PURE__*/ v.optional(ShCometV0FeedDefs.linkSchema); 25 + }, 26 + tags: /*#__PURE__*/ v.optional( 27 + /*#__PURE__*/ v.constrain( 28 + /*#__PURE__*/ v.array( 29 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 30 + /*#__PURE__*/ v.stringLength(0, 640), 31 + /*#__PURE__*/ v.stringGraphemes(0, 64), 32 + ]), 33 + ), 34 + [/*#__PURE__*/ v.arrayLength(0, 8)], 35 + ), 36 + ), 37 + title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 38 + /*#__PURE__*/ v.stringLength(1, 2560), 39 + /*#__PURE__*/ v.stringGraphemes(0, 256), 40 + ]), 41 + }), 42 + ); 43 + const _viewSchema = /*#__PURE__*/ v.object({ 44 + $type: /*#__PURE__*/ v.optional( 45 + /*#__PURE__*/ v.literal("sh.comet.v0.feed.track#view"), 46 + ), 47 + audio: /*#__PURE__*/ v.genericUriString(), 48 + author: /*#__PURE__*/ v.unknown(), 49 + cid: /*#__PURE__*/ v.cidString(), 50 + image: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.genericUriString()), 51 + indexedAt: /*#__PURE__*/ v.datetimeString(), 52 + likeCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 53 + playCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 54 + get record() { 55 + return mainSchema; 56 + }, 57 + repostCount: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 58 + uri: /*#__PURE__*/ v.resourceUriString(), 59 + get viewer() { 60 + return /*#__PURE__*/ v.optional(ShCometV0FeedDefs.viewerStateSchema); 61 + }, 62 + }); 63 + 64 + type main$schematype = typeof _mainSchema; 65 + type view$schematype = typeof _viewSchema; 66 + 67 + export interface mainSchema extends main$schematype {} 68 + export interface viewSchema extends view$schematype {} 69 + 70 + export const mainSchema = _mainSchema as mainSchema; 71 + export const viewSchema = _viewSchema as viewSchema; 72 + 73 + export interface Main extends v.InferInput<typeof mainSchema> {} 74 + export interface View extends v.InferInput<typeof viewSchema> {} 75 + 76 + declare module "@atcute/lexicons/ambient" { 77 + interface Records { 78 + "sh.comet.v0.feed.track": mainSchema; 79 + } 80 + }
+78
packages/lexicons/src/types/sh/comet/v0/richtext/facet.ts
··· 1 + import type {} from "@atcute/lexicons"; 2 + import * as v from "@atcute/lexicons/validations"; 3 + 4 + const _byteSliceSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional( 6 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet#byteSlice"), 7 + ), 8 + byteEnd: /*#__PURE__*/ v.integer(), 9 + byteStart: /*#__PURE__*/ v.integer(), 10 + }); 11 + const _linkSchema = /*#__PURE__*/ v.object({ 12 + $type: /*#__PURE__*/ v.optional( 13 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet#link"), 14 + ), 15 + uri: /*#__PURE__*/ v.genericUriString(), 16 + }); 17 + const _mainSchema = /*#__PURE__*/ v.object({ 18 + $type: /*#__PURE__*/ v.optional( 19 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet"), 20 + ), 21 + get features() { 22 + return /*#__PURE__*/ v.array( 23 + /*#__PURE__*/ v.variant([linkSchema, mentionSchema, tagSchema]), 24 + ); 25 + }, 26 + get index() { 27 + return byteSliceSchema; 28 + }, 29 + }); 30 + const _mentionSchema = /*#__PURE__*/ v.object({ 31 + $type: /*#__PURE__*/ v.optional( 32 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet#mention"), 33 + ), 34 + did: /*#__PURE__*/ v.didString(), 35 + }); 36 + const _tagSchema = /*#__PURE__*/ v.object({ 37 + $type: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet#tag"), 39 + ), 40 + tag: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 41 + /*#__PURE__*/ v.stringLength(0, 640), 42 + /*#__PURE__*/ v.stringGraphemes(0, 64), 43 + ]), 44 + }); 45 + const _timestampSchema = /*#__PURE__*/ v.object({ 46 + $type: /*#__PURE__*/ v.optional( 47 + /*#__PURE__*/ v.literal("sh.comet.v0.richtext.facet#timestamp"), 48 + ), 49 + timestamp: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()), 50 + }); 51 + 52 + type byteSlice$schematype = typeof _byteSliceSchema; 53 + type link$schematype = typeof _linkSchema; 54 + type main$schematype = typeof _mainSchema; 55 + type mention$schematype = typeof _mentionSchema; 56 + type tag$schematype = typeof _tagSchema; 57 + type timestamp$schematype = typeof _timestampSchema; 58 + 59 + export interface byteSliceSchema extends byteSlice$schematype {} 60 + export interface linkSchema extends link$schematype {} 61 + export interface mainSchema extends main$schematype {} 62 + export interface mentionSchema extends mention$schematype {} 63 + export interface tagSchema extends tag$schematype {} 64 + export interface timestampSchema extends timestamp$schematype {} 65 + 66 + export const byteSliceSchema = _byteSliceSchema as byteSliceSchema; 67 + export const linkSchema = _linkSchema as linkSchema; 68 + export const mainSchema = _mainSchema as mainSchema; 69 + export const mentionSchema = _mentionSchema as mentionSchema; 70 + export const tagSchema = _tagSchema as tagSchema; 71 + export const timestampSchema = _timestampSchema as timestampSchema; 72 + 73 + export interface ByteSlice extends v.InferInput<typeof byteSliceSchema> {} 74 + export interface Link extends v.InferInput<typeof linkSchema> {} 75 + export interface Main extends v.InferInput<typeof mainSchema> {} 76 + export interface Mention extends v.InferInput<typeof mentionSchema> {} 77 + export interface Tag extends v.InferInput<typeof tagSchema> {} 78 + export interface Timestamp extends v.InferInput<typeof timestampSchema> {}