diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 0dc66e4..0000000 --- a/.dockerignore +++ /dev/null @@ -1,5 +0,0 @@ -node_modules/ -.idea/ -.env -.git -dist \ No newline at end of file diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 8afe9bb..0000000 --- a/.eslintrc +++ /dev/null @@ -1,99 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/base", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "plugin:import/recommended", - "plugin:import/typescript" - ], - "plugins": ["n"], - "ignorePatterns": ["dist", "node_modules"], - "rules": { - "no-var": "error", - "prefer-const": "warn", - "no-misleading-character-class": "warn", - "eqeqeq": ["error", "always", { "null": "ignore" }], - "n/global-require": "error", - "n/no-extraneous-import": "error", - "n/prefer-node-protocol": "error", - "import/extensions": ["off", "ignorePackages"], - "import/export": "off", - "import/namespace": "off", - "import/no-deprecated": "error", - "import/no-absolute-path": "error", - "import/no-dynamic-require": "error", - "import/no-self-import": "error", - "import/order": [ - "error", - { - "named": true, - "distinctGroup": true, - "alphabetize": { "order": "asc" }, - "newlines-between": "never", - "groups": [ - "builtin", - "external", - "internal", - "parent", - ["index", "sibling"], - "object" - ] - } - ], - "@typescript-eslint/no-unused-vars": [ - "warn", - { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } - ], - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-explicit-any": "off" - }, - "overrides": [ - { - "files": ["jest.config.js"], - "env": { "commonjs": true } - }, - { - "files": ["jest.setup.js"], - "env": { "jest": true } - }, - { - "files": "*.js", - "rules": { - "@typescript-eslint/no-var-requires": "off" - } - }, - { - "files": ["**/*.test.ts", "**/tests/**/*.ts"], - "rules": { - "n/no-extraneous-import": [ - "error", - { "allowModules": ["@atproto/dev-env"] } - ] - } - } - ], - "settings": { - "node": { "version": ">=18.7.0" }, - "import/internal-regex": "^@atproto(?:-labs)?/", - "import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] }, - "import/resolver": { - "typescript": { - "project": [ - "tsconfig.json", - "packages/oauth/*/tsconfig.json", - "packages/internal/*/tsconfig.json", - "packages/*/tsconfig.json" - ] - }, - "node": { - "extensions": [".js", ".jsx", ".json"] - } - } - } -} diff --git a/.gitignore b/.gitignore index 6936abd..c8bbd90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # deps node_modules/ -dist -.env \ No newline at end of file +devdb/ +.env +.DS_Store diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index d7161f6..0000000 --- a/.prettierrc +++ /dev/null @@ -1,21 +0,0 @@ -{ - "trailingComma": "all", - "tabWidth": 2, - "semi": false, - "singleQuote": true, - "overrides": [ - { - "files": "*.hbs", - "options": { - "singleQuote": false - } - }, - { - "files": [".eslintrc"], - "options": { - "parser": "json", - "trailingComma": "none" - } - } - ] -} diff --git a/Dockerfile b/Dockerfile index bd753d6..450b130 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,9 @@ -FROM oven/bun:1-alpine AS builder +FROM denoland/deno:latest WORKDIR /app -COPY package.json bun.lock ./ -RUN bun install --frozen-lockfile -COPY . . -RUN bun run build - -FROM oven/bun:1-alpine -WORKDIR /app -COPY --from=builder /app/dist ./dist -COPY --from=builder /app/package.json ./ -COPY --from=builder /app/bun.lock ./ -RUN bun install --production --frozen-lockfile +COPY --from=builder /app/deno.json ./ +COPY --from=builder /app/deno.lock ./ +RUN deno install --production --frozen-lockfile ENV NODE_ENV=production EXPOSE 3000 -CMD ["bun", "run", "start"] \ No newline at end of file +CMD ["deno", "task", "start"] diff --git a/README.md b/README.md index cf2f8f9..bb98055 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ If you prefer to run the application manually or use an existing MongoDB instanc #### Prerequisites -- [Bun](https://bun.sh/) runtime +- [Deno](https://deno.com/) runtime - MongoDB instance (local or remote) #### Steps diff --git a/algos/index.ts b/algos/index.ts new file mode 100644 index 0000000..8850279 --- /dev/null +++ b/algos/index.ts @@ -0,0 +1,20 @@ +import * as simpleDesc from "./simple-desc.ts"; +import { Algorithm } from "./types.ts"; + +const algos: Algorithm[] = [ + simpleDesc.info, +]; + +export function getAlgo( + publisherDid: string, + rkey: string, +) { + for (const algo of algos) { + if (algo.rkey === rkey && algo.publisherDid === publisherDid) { + return algo; + } + } + return null; +} + +export default algos; diff --git a/algos/simple-desc.ts b/algos/simple-desc.ts new file mode 100644 index 0000000..df6089f --- /dev/null +++ b/algos/simple-desc.ts @@ -0,0 +1,47 @@ +import { AppContext } from "../main.ts"; +import { Algorithm, feedParams } from "./types.ts"; + +interface QueryFilter { + reply: null; + indexedAt?: { $lt: Date }; +} + +const handler = async ( + ctx: AppContext, + params: feedParams, + _did?: string | null, +) => { + const { limit = 50, cursor } = params; + + const query: QueryFilter = { reply: null }; + + if (cursor) { + query.indexedAt = { $lt: new Date(parseInt(cursor, 10)) }; + } + + const posts = await ctx.db.models.Post.find(query) + .sort({ indexedAt: -1 }) + .limit(limit); + + const feed = posts.map((post) => ({ post: post.uri })); + + const lastPost = posts.at(-1); + const nextCursor = lastPost + ? new Date(lastPost.indexedAt).getTime().toString(10) + : undefined; + + return { + cursor: nextCursor, + feed, + }; +}; + +export const publisherDid = "did:plc:example123"; +export const rkey = "simple-desc"; + +export const info = { + handler, + needsAuth: false, + publisherDid, + rkey, +} as Algorithm; diff --git a/algos/types.ts b/algos/types.ts new file mode 100644 index 0000000..a90a9f7 --- /dev/null +++ b/algos/types.ts @@ -0,0 +1,25 @@ +import { AppContext } from "../main.ts"; + +export interface feedParams { + feed: string; + limit: number; + cursor?: string; +} + +export interface FeedResponse { + cursor?: string; + feed: Array<{ post: string }>; +} + +export interface Algorithm { + handler: AlgoHandler; + needsAuth: boolean; + publisherDid: string; + rkey: string; +} + +export type AlgoHandler = ( + ctx: AppContext, + params: feedParams, + did?: string | null, +) => Promise; diff --git a/api/describeFeedGenerator.ts b/api/describeFeedGenerator.ts new file mode 100644 index 0000000..51ceab9 --- /dev/null +++ b/api/describeFeedGenerator.ts @@ -0,0 +1,24 @@ +import { Server } from "../lex/index.ts"; +import { AppContext } from "../main.ts"; +import algos from "../algos/index.ts"; +import { AtUri } from "@atp/syntax"; +import { Algorithm } from "../algos/types.ts"; + +export default function (server: Server, ctx: AppContext) { + server.so.sprk.feed.describeFeedGenerator(() => { + const feeds = algos.map((algo: Algorithm) => ({ + uri: AtUri.make( + algo.publisherDid, + "so.sprk.feed.generator", + algo.rkey, + ).toString(), + })); + return { + encoding: "application/json", + body: { + did: ctx.ownDid, + feeds, + }, + }; + }); +} diff --git a/api/getFeedSkeleton.ts b/api/getFeedSkeleton.ts new file mode 100644 index 0000000..f1450dc --- /dev/null +++ b/api/getFeedSkeleton.ts @@ -0,0 +1,36 @@ +import { AuthRequiredError, InvalidRequestError } from "@atp/xrpc-server"; +import { Server } from "../lex/index.ts"; +import { getAlgo } from "../algos/index.ts"; +import { AppContext } from "../main.ts"; +import { AtUri } from "@atp/syntax"; + +export default function (server: Server, ctx: AppContext) { + server.so.sprk.feed.getFeedSkeleton({ + auth: ctx.authVerifier.standardOptional, + handler: async ({ params, auth }) => { + const feedUri = new AtUri(params.feed); + const algo = getAlgo(feedUri.hostname, feedUri.rkey); + if ( + feedUri.collection !== "so.sprk.feed.generator" || + !algo + ) { + throw new InvalidRequestError( + "Unsupported algorithm", + "UnsupportedAlgorithm", + ); + } + const did = auth.credentials.type === "standard" + ? auth.credentials.iss + : null; + if (algo.needsAuth && !did) { + throw new AuthRequiredError(); + } + + const body = await algo.handler(ctx, params, did); + return { + encoding: "application/json", + body: body, + }; + }, + }); +} diff --git a/bun.lock b/bun.lock deleted file mode 100644 index c194f98..0000000 --- a/bun.lock +++ /dev/null @@ -1,357 +0,0 @@ -{ - "lockfileVersion": 1, - "workspaces": { - "": { - "name": "feed-gen", - "dependencies": { - "@atproto/identity": "^0.4.6", - "@atproto/xrpc-server": "^0.7.13", - "dotenv": "^16.4.7", - "envalid": "^8.0.0", - "hono": "^4.7.4", - "mongoose": "^8.12.1", - "pino": "^9.6.0", - "pino-pretty": "^13.0.0", - "prettier": "^3.5.3", - }, - "devDependencies": { - "@types/bun": "latest", - }, - }, - }, - "packages": { - "@atproto/common": ["@atproto/common@0.4.11", "", { "dependencies": { "@atproto/common-web": "^0.4.2", "@ipld/dag-cbor": "^7.0.3", "cbor-x": "^1.5.1", "iso-datestring-validator": "^2.2.2", "multiformats": "^9.9.0", "pino": "^8.21.0" } }, "sha512-Knv0viYXNMfCdIE7jLUiWJKnnMfEwg+vz2epJQi8WOjqtqCFb3W/3Jn72ZiuovIfpdm13MaOiny6w2NErUQC6g=="], - - "@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=="], - - "@atproto/crypto": ["@atproto/crypto@0.4.4", "", { "dependencies": { "@noble/curves": "^1.7.0", "@noble/hashes": "^1.6.1", "uint8arrays": "3.0.0" } }, "sha512-Yq9+crJ7WQl7sxStVpHgie5Z51R05etaK9DLWYG/7bR5T4bhdcIgF6IfklLShtZwLYdVVj+K15s0BqW9a8PSDA=="], - - "@atproto/identity": ["@atproto/identity@0.4.8", "", { "dependencies": { "@atproto/common-web": "^0.4.2", "@atproto/crypto": "^0.4.4" } }, "sha512-Z0sLnJ87SeNdAifT+rqpgE1Rc3layMMW25gfWNo4u40RGuRODbdfAZlTwBSU2r+Vk45hU+iE+xeQspfednCEnA=="], - - "@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=="], - - "@atproto/syntax": ["@atproto/syntax@0.4.0", "", {}, "sha512-b9y5ceHS8YKOfP3mdKmwAx5yVj9294UN7FG2XzP6V5aKUdFazEYRnR9m5n5ZQFKa3GNvz7de9guZCJ/sUTcOAA=="], - - "@atproto/xrpc": ["@atproto/xrpc@0.7.0", "", { "dependencies": { "@atproto/lexicon": "^0.4.11", "zod": "^3.23.8" } }, "sha512-SfhP9dGx2qclaScFDb58Jnrmim5nk4geZXCqg6sB0I/KZhZEkr9iIx1hLCp+sxkIfEsmEJjeWO4B0rjUIJW5cw=="], - - "@atproto/xrpc-server": ["@atproto/xrpc-server@0.7.18", "", { "dependencies": { "@atproto/common": "^0.4.11", "@atproto/crypto": "^0.4.4", "@atproto/lexicon": "^0.4.11", "@atproto/xrpc": "^0.7.0", "cbor-x": "^1.5.1", "express": "^4.17.2", "http-errors": "^2.0.0", "mime-types": "^2.1.35", "rate-limiter-flexible": "^2.4.1", "uint8arrays": "3.0.0", "ws": "^8.12.0", "zod": "^3.23.8" } }, "sha512-kjlAsI+UNbbm6AK3Y5Hb4BJ7VQHNKiYYu2kX5vhZJZHO8qfO40GPYYb/2TknZV8IG6fDPBQhUpcDRolI86sgag=="], - - "@cbor-extract/cbor-extract-darwin-arm64": ["@cbor-extract/cbor-extract-darwin-arm64@2.2.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-P7swiOAdF7aSi0H+tHtHtr6zrpF3aAq/W9FXx5HektRvLTM2O89xCyXF3pk7pLc7QpaY7AoaE8UowVf9QBdh3w=="], - - "@cbor-extract/cbor-extract-darwin-x64": ["@cbor-extract/cbor-extract-darwin-x64@2.2.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-1liF6fgowph0JxBbYnAS7ZlqNYLf000Qnj4KjqPNW4GViKrEql2MgZnAsExhY9LSy8dnvA4C0qHEBgPrll0z0w=="], - - "@cbor-extract/cbor-extract-linux-arm": ["@cbor-extract/cbor-extract-linux-arm@2.2.0", "", { "os": "linux", "cpu": "arm" }, "sha512-QeBcBXk964zOytiedMPQNZr7sg0TNavZeuUCD6ON4vEOU/25+pLhNN6EDIKJ9VLTKaZ7K7EaAriyYQ1NQ05s/Q=="], - - "@cbor-extract/cbor-extract-linux-arm64": ["@cbor-extract/cbor-extract-linux-arm64@2.2.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-rQvhNmDuhjTVXSPFLolmQ47/ydGOFXtbR7+wgkSY0bdOxCFept1hvg59uiLPT2fVDuJFuEy16EImo5tE2x3RsQ=="], - - "@cbor-extract/cbor-extract-linux-x64": ["@cbor-extract/cbor-extract-linux-x64@2.2.0", "", { "os": "linux", "cpu": "x64" }, "sha512-cWLAWtT3kNLHSvP4RKDzSTX9o0wvQEEAj4SKvhWuOVZxiDAeQazr9A+PSiRILK1VYMLeDml89ohxCnUNQNQNCw=="], - - "@cbor-extract/cbor-extract-win32-x64": ["@cbor-extract/cbor-extract-win32-x64@2.2.0", "", { "os": "win32", "cpu": "x64" }, "sha512-l2M+Z8DO2vbvADOBNLbbh9y5ST1RY5sqkWOg/58GkUPBYou/cuNZ68SGQ644f1CvZ8kcOxyZtw06+dxWHIoN/w=="], - - "@ipld/dag-cbor": ["@ipld/dag-cbor@7.0.3", "", { "dependencies": { "cborg": "^1.6.0", "multiformats": "^9.5.4" } }, "sha512-1VVh2huHsuohdXC1bGJNE8WR72slZ9XE2T3wbBBq31dm7ZBatmKLLxrB+XAqafxfRFjv08RZmj/W/ZqaM13AuA=="], - - "@mongodb-js/saslprep": ["@mongodb-js/saslprep@1.2.2", "", { "dependencies": { "sparse-bitfield": "^3.0.3" } }, "sha512-EB0O3SCSNRUFk66iRCpI+cXzIjdswfCs7F6nOC3RAGJ7xr5YhaicvsRwJ9eyzYvYRlCSDUO/c7g4yNulxKC1WA=="], - - "@noble/curves": ["@noble/curves@1.9.1", "", { "dependencies": { "@noble/hashes": "1.8.0" } }, "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA=="], - - "@noble/hashes": ["@noble/hashes@1.8.0", "", {}, "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A=="], - - "@types/bun": ["@types/bun@1.2.14", "", { "dependencies": { "bun-types": "1.2.14" } }, "sha512-VsFZKs8oKHzI7zwvECiAJ5oSorWndIWEVhfbYqZd4HI/45kzW7PN2Rr5biAzvGvRuNmYLSANY+H59ubHq8xw7Q=="], - - "@types/node": ["@types/node@22.15.21", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ=="], - - "@types/webidl-conversions": ["@types/webidl-conversions@7.0.3", "", {}, "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA=="], - - "@types/whatwg-url": ["@types/whatwg-url@11.0.5", "", { "dependencies": { "@types/webidl-conversions": "*" } }, "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ=="], - - "abort-controller": ["abort-controller@3.0.0", "", { "dependencies": { "event-target-shim": "^5.0.0" } }, "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg=="], - - "accepts": ["accepts@1.3.8", "", { "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" } }, "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw=="], - - "array-flatten": ["array-flatten@1.1.1", "", {}, "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="], - - "atomic-sleep": ["atomic-sleep@1.0.0", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="], - - "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], - - "body-parser": ["body-parser@1.20.3", "", { "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" } }, "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g=="], - - "bson": ["bson@6.10.3", "", {}, "sha512-MTxGsqgYTwfshYWTRdmZRC+M7FnG1b4y7RO7p2k3X24Wq0yv1m77Wsj0BzlPzd/IowgESfsruQCUToa7vbOpPQ=="], - - "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="], - - "bun-types": ["bun-types@1.2.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-Kuh4Ub28ucMRWeiUUWMHsT9Wcbr4H3kLIO72RZZElSDxSu7vpetRvxIUDUaW6QtaIeixIpm7OXtNnZPf82EzwA=="], - - "bytes": ["bytes@3.1.2", "", {}, "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="], - - "call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="], - - "call-bound": ["call-bound@1.0.4", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "get-intrinsic": "^1.3.0" } }, "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg=="], - - "cbor-extract": ["cbor-extract@2.2.0", "", { "dependencies": { "node-gyp-build-optional-packages": "5.1.1" }, "optionalDependencies": { "@cbor-extract/cbor-extract-darwin-arm64": "2.2.0", "@cbor-extract/cbor-extract-darwin-x64": "2.2.0", "@cbor-extract/cbor-extract-linux-arm": "2.2.0", "@cbor-extract/cbor-extract-linux-arm64": "2.2.0", "@cbor-extract/cbor-extract-linux-x64": "2.2.0", "@cbor-extract/cbor-extract-win32-x64": "2.2.0" }, "bin": { "download-cbor-prebuilds": "bin/download-prebuilds.js" } }, "sha512-Ig1zM66BjLfTXpNgKpvBePq271BPOvu8MR0Jl080yG7Jsl+wAZunfrwiwA+9ruzm/WEdIV5QF/bjDZTqyAIVHA=="], - - "cbor-x": ["cbor-x@1.6.0", "", { "optionalDependencies": { "cbor-extract": "^2.2.0" } }, "sha512-0kareyRwHSkL6ws5VXHEf8uY1liitysCVJjlmhaLG+IXLqhSaOO+t63coaso7yjwEzWZzLy8fJo06gZDVQM9Qg=="], - - "cborg": ["cborg@1.10.2", "", { "bin": { "cborg": "cli.js" } }, "sha512-b3tFPA9pUr2zCUiCfRd2+wok2/LBSNUMKOuRRok+WlvvAgEt/PlbgPTsZUcwCOs53IJvLgTp0eotwtosE6njug=="], - - "colorette": ["colorette@2.0.20", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="], - - "content-disposition": ["content-disposition@0.5.4", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ=="], - - "content-type": ["content-type@1.0.5", "", {}, "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="], - - "cookie": ["cookie@0.7.1", "", {}, "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w=="], - - "cookie-signature": ["cookie-signature@1.0.6", "", {}, "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="], - - "dateformat": ["dateformat@4.6.3", "", {}, "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA=="], - - "debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="], - - "depd": ["depd@2.0.0", "", {}, "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="], - - "destroy": ["destroy@1.2.0", "", {}, "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="], - - "detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="], - - "dotenv": ["dotenv@16.5.0", "", {}, "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg=="], - - "dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="], - - "ee-first": ["ee-first@1.1.1", "", {}, "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="], - - "encodeurl": ["encodeurl@2.0.0", "", {}, "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="], - - "end-of-stream": ["end-of-stream@1.4.4", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q=="], - - "envalid": ["envalid@8.0.0", "", { "dependencies": { "tslib": "2.6.2" } }, "sha512-PGeYJnJB5naN0ME6SH8nFcDj9HVbLpYIfg1p5lAyM9T4cH2lwtu2fLbozC/bq+HUUOIFxhX/LP0/GmlqPHT4tQ=="], - - "es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="], - - "es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="], - - "es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="], - - "escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="], - - "etag": ["etag@1.8.1", "", {}, "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="], - - "event-target-shim": ["event-target-shim@5.0.1", "", {}, "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="], - - "events": ["events@3.3.0", "", {}, "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="], - - "express": ["express@4.21.2", "", { "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", "send": "0.19.0", "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" } }, "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA=="], - - "fast-copy": ["fast-copy@3.0.2", "", {}, "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ=="], - - "fast-redact": ["fast-redact@3.5.0", "", {}, "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A=="], - - "fast-safe-stringify": ["fast-safe-stringify@2.1.1", "", {}, "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="], - - "finalhandler": ["finalhandler@1.3.1", "", { "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", "statuses": "2.0.1", "unpipe": "~1.0.0" } }, "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ=="], - - "forwarded": ["forwarded@0.2.0", "", {}, "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="], - - "fresh": ["fresh@0.5.2", "", {}, "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q=="], - - "function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="], - - "get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="], - - "get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="], - - "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], - - "graphemer": ["graphemer@1.4.0", "", {}, "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag=="], - - "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], - - "hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="], - - "help-me": ["help-me@5.0.0", "", {}, "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="], - - "hono": ["hono@4.7.10", "", {}, "sha512-QkACju9MiN59CKSY5JsGZCYmPZkA6sIW6OFCUp7qDjZu6S6KHtJHhAc9Uy9mV9F8PJ1/HQ3ybZF2yjCa/73fvQ=="], - - "http-errors": ["http-errors@2.0.0", "", { "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", "setprototypeof": "1.2.0", "statuses": "2.0.1", "toidentifier": "1.0.1" } }, "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ=="], - - "iconv-lite": ["iconv-lite@0.4.24", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3" } }, "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA=="], - - "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], - - "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], - - "ipaddr.js": ["ipaddr.js@1.9.1", "", {}, "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="], - - "iso-datestring-validator": ["iso-datestring-validator@2.2.2", "", {}, "sha512-yLEMkBbLZTlVQqOnQ4FiMujR6T4DEcCb1xizmvXS+OxuhwcbtynoosRzdMA69zZCShCNAbi+gJ71FxZBBXx1SA=="], - - "joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="], - - "kareem": ["kareem@2.6.3", "", {}, "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q=="], - - "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="], - - "media-typer": ["media-typer@0.3.0", "", {}, "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ=="], - - "memory-pager": ["memory-pager@1.5.0", "", {}, "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg=="], - - "merge-descriptors": ["merge-descriptors@1.0.3", "", {}, "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ=="], - - "methods": ["methods@1.1.2", "", {}, "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w=="], - - "mime": ["mime@1.6.0", "", { "bin": { "mime": "cli.js" } }, "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="], - - "mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="], - - "mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="], - - "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], - - "mongodb": ["mongodb@6.16.0", "", { "dependencies": { "@mongodb-js/saslprep": "^1.1.9", "bson": "^6.10.3", "mongodb-connection-string-url": "^3.0.0" }, "peerDependencies": { "@aws-sdk/credential-providers": "^3.188.0", "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", "gcp-metadata": "^5.2.0", "kerberos": "^2.0.1", "mongodb-client-encryption": ">=6.0.0 <7", "snappy": "^7.2.2", "socks": "^2.7.1" }, "optionalPeers": ["@aws-sdk/credential-providers", "@mongodb-js/zstd", "gcp-metadata", "kerberos", "mongodb-client-encryption", "snappy", "socks"] }, "sha512-D1PNcdT0y4Grhou5Zi/qgipZOYeWrhLEpk33n3nm6LGtz61jvO88WlrWCK/bigMjpnOdAUKKQwsGIl0NtWMyYw=="], - - "mongodb-connection-string-url": ["mongodb-connection-string-url@3.0.2", "", { "dependencies": { "@types/whatwg-url": "^11.0.2", "whatwg-url": "^14.1.0 || ^13.0.0" } }, "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA=="], - - "mongoose": ["mongoose@8.15.1", "", { "dependencies": { "bson": "^6.10.3", "kareem": "2.6.3", "mongodb": "~6.16.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", "sift": "17.1.3" } }, "sha512-RhQ4DzmBi5BNGcS0w4u1vdMRIKcteXTCNzDt1j7XRcdWYBz1MjMjulBhPaeC5jBCHOD1yinuOFTTSOWLLGexWw=="], - - "mpath": ["mpath@0.9.0", "", {}, "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew=="], - - "mquery": ["mquery@5.0.0", "", { "dependencies": { "debug": "4.x" } }, "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg=="], - - "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], - - "multiformats": ["multiformats@9.9.0", "", {}, "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg=="], - - "negotiator": ["negotiator@0.6.3", "", {}, "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="], - - "node-gyp-build-optional-packages": ["node-gyp-build-optional-packages@5.1.1", "", { "dependencies": { "detect-libc": "^2.0.1" }, "bin": { "node-gyp-build-optional-packages": "bin.js", "node-gyp-build-optional-packages-test": "build-test.js", "node-gyp-build-optional-packages-optional": "optional.js" } }, "sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw=="], - - "object-inspect": ["object-inspect@1.13.4", "", {}, "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="], - - "on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="], - - "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="], - - "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], - - "parseurl": ["parseurl@1.3.3", "", {}, "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="], - - "path-to-regexp": ["path-to-regexp@0.1.12", "", {}, "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="], - - "pino": ["pino@9.7.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^4.0.1", "thread-stream": "^3.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-vnMCM6xZTb1WDmLvtG2lE/2p+t9hDEIvTWJsu6FejkE62vB7gDhvzrpFR4Cw2to+9JNQxVnkAKVPA1KPB98vWg=="], - - "pino-abstract-transport": ["pino-abstract-transport@2.0.0", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw=="], - - "pino-pretty": ["pino-pretty@13.0.0", "", { "dependencies": { "colorette": "^2.0.7", "dateformat": "^4.6.3", "fast-copy": "^3.0.2", "fast-safe-stringify": "^2.1.1", "help-me": "^5.0.0", "joycon": "^3.1.1", "minimist": "^1.2.6", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pump": "^3.0.0", "secure-json-parse": "^2.4.0", "sonic-boom": "^4.0.1", "strip-json-comments": "^3.1.1" }, "bin": { "pino-pretty": "bin.js" } }, "sha512-cQBBIVG3YajgoUjo1FdKVRX6t9XPxwB9lcNJVD5GCnNM4Y6T12YYx8c6zEejxQsU0wrg9TwmDulcE9LR7qcJqA=="], - - "pino-std-serializers": ["pino-std-serializers@7.0.0", "", {}, "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA=="], - - "prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="], - - "process": ["process@0.11.10", "", {}, "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A=="], - - "process-warning": ["process-warning@5.0.0", "", {}, "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA=="], - - "proxy-addr": ["proxy-addr@2.0.7", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="], - - "pump": ["pump@3.0.2", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw=="], - - "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], - - "qs": ["qs@6.13.0", "", { "dependencies": { "side-channel": "^1.0.6" } }, "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg=="], - - "quick-format-unescaped": ["quick-format-unescaped@4.0.4", "", {}, "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="], - - "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="], - - "rate-limiter-flexible": ["rate-limiter-flexible@2.4.2", "", {}, "sha512-rMATGGOdO1suFyf/mI5LYhts71g1sbdhmd6YvdiXO2gJnd42Tt6QS4JUKJKSWVVkMtBacm6l40FR7Trjo6Iruw=="], - - "raw-body": ["raw-body@2.5.2", "", { "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "unpipe": "1.0.0" } }, "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA=="], - - "readable-stream": ["readable-stream@4.7.0", "", { "dependencies": { "abort-controller": "^3.0.0", "buffer": "^6.0.3", "events": "^3.3.0", "process": "^0.11.10", "string_decoder": "^1.3.0" } }, "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg=="], - - "real-require": ["real-require@0.2.0", "", {}, "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg=="], - - "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], - - "safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="], - - "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - - "secure-json-parse": ["secure-json-parse@2.7.0", "", {}, "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw=="], - - "send": ["send@0.19.0", "", { "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "2.0.0", "mime": "1.6.0", "ms": "2.1.3", "on-finished": "2.4.1", "range-parser": "~1.2.1", "statuses": "2.0.1" } }, "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw=="], - - "serve-static": ["serve-static@1.16.2", "", { "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", "send": "0.19.0" } }, "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw=="], - - "setprototypeof": ["setprototypeof@1.2.0", "", {}, "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="], - - "side-channel": ["side-channel@1.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" } }, "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw=="], - - "side-channel-list": ["side-channel-list@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" } }, "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA=="], - - "side-channel-map": ["side-channel-map@1.0.1", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" } }, "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA=="], - - "side-channel-weakmap": ["side-channel-weakmap@1.0.2", "", { "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" } }, "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A=="], - - "sift": ["sift@17.1.3", "", {}, "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ=="], - - "sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="], - - "sparse-bitfield": ["sparse-bitfield@3.0.3", "", { "dependencies": { "memory-pager": "^1.0.2" } }, "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ=="], - - "split2": ["split2@4.2.0", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="], - - "statuses": ["statuses@2.0.1", "", {}, "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="], - - "string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="], - - "strip-json-comments": ["strip-json-comments@3.1.1", "", {}, "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="], - - "thread-stream": ["thread-stream@3.1.0", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A=="], - - "toidentifier": ["toidentifier@1.0.1", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="], - - "tr46": ["tr46@5.1.1", "", { "dependencies": { "punycode": "^2.3.1" } }, "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw=="], - - "tslib": ["tslib@2.6.2", "", {}, "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="], - - "type-is": ["type-is@1.6.18", "", { "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" } }, "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g=="], - - "uint8arrays": ["uint8arrays@3.0.0", "", { "dependencies": { "multiformats": "^9.4.2" } }, "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA=="], - - "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], - - "unpipe": ["unpipe@1.0.0", "", {}, "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="], - - "utils-merge": ["utils-merge@1.0.1", "", {}, "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA=="], - - "vary": ["vary@1.1.2", "", {}, "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="], - - "webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="], - - "whatwg-url": ["whatwg-url@14.2.0", "", { "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" } }, "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw=="], - - "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], - - "ws": ["ws@8.18.2", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ=="], - - "zod": ["zod@3.25.30", "", {}, "sha512-VolhdEtu6TJr/fzGuHA/SZ5ixvXqA6ADOG9VRcQ3rdOKmF5hkmcJbyaQjUH5BgmpA9gej++zYRX7zjSmdReIwA=="], - - "@atproto/common/pino": ["pino@8.21.0", "", { "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^1.2.0", "pino-std-serializers": "^6.0.0", "process-warning": "^3.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^3.7.0", "thread-stream": "^2.6.0" }, "bin": { "pino": "bin.js" } }, "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q=="], - - "debug/ms": ["ms@2.0.0", "", {}, "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="], - - "mquery/debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="], - - "send/encodeurl": ["encodeurl@1.0.2", "", {}, "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="], - - "@atproto/common/pino/pino-abstract-transport": ["pino-abstract-transport@1.2.0", "", { "dependencies": { "readable-stream": "^4.0.0", "split2": "^4.0.0" } }, "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q=="], - - "@atproto/common/pino/pino-std-serializers": ["pino-std-serializers@6.2.2", "", {}, "sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA=="], - - "@atproto/common/pino/process-warning": ["process-warning@3.0.0", "", {}, "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ=="], - - "@atproto/common/pino/sonic-boom": ["sonic-boom@3.8.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg=="], - - "@atproto/common/pino/thread-stream": ["thread-stream@2.7.0", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw=="], - } -} diff --git a/docker-compose.yaml b/compose.yml similarity index 54% rename from docker-compose.yaml rename to compose.yml index afbbf8d..4ee1d52 100644 --- a/docker-compose.yaml +++ b/compose.yml @@ -1,18 +1,18 @@ services: - feed-gen: - build: . - ports: - - 3000:3000 - environment: - - NODE_ENV=production - - FEEDGEN_DOMAIN=feed-gen.example.com - - DB_NAME=feed-gen - - DB_HOST=db - - DB_PORT=27017 - - DB_USER=mongo - - DB_PASSWORD=mongo - depends_on: - - db + # feed-gen: + # build: . + # ports: + # - 3000:3000 + # environment: + # - NODE_ENV=production + # - FEEDGEN_DOMAIN=feed-gen.example.com + # - DB_NAME=feed-gen + # - DB_HOST=db + # - DB_PORT=27017 + # - DB_USER=mongo + # - DB_PASSWORD=mongo + # depends_on: + # - db db: image: mongo:8 diff --git a/db/connection.ts b/db/connection.ts new file mode 100644 index 0000000..748a55e --- /dev/null +++ b/db/connection.ts @@ -0,0 +1,57 @@ +import mongoose, { Connection } from "mongoose"; +import { env } from "../utils/env.ts"; +import { + cursorStateSchema, + type DatabaseModels, + followSchema, + likeSchema, + postSchema, + repostSchema, +} from "./models.ts"; +import { getLogger } from "@logtape/logtape"; + +export class Database { + private connection: Connection; + public models: DatabaseModels; + private logger = getLogger(["feedgen", "db"]); + + constructor() { + this.connection = mongoose.createConnection(); + this.models = { + Post: this.connection.model("Post", postSchema), + Follow: this.connection.model("Follow", followSchema), + Like: this.connection.model("Like", likeSchema), + Repost: this.connection.model("Repost", repostSchema), + CursorState: this.connection.model("CursorState", cursorStateSchema), + }; + } + + async connect(): Promise { + const { DB_USER, DB_PASSWORD, DB_HOST, DB_PORT, DB_NAME } = env; + const uri = + `mongodb://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/?appName=feed-gen`; + + this.logger.info( + `Connecting to MongoDB at ${DB_HOST}:${DB_PORT}/?appName=feed-gen`, + ); + + try { + await this.connection.openUri(uri, { + autoIndex: true, + autoCreate: true, + dbName: DB_NAME, + }); + this.logger.info("Connected to MongoDB"); + } catch (error) { + this.logger.error("MongoDB connection error", { error }); + throw error; + } + } + + async disconnect(): Promise { + if (this.connection) { + await this.connection.close(); + this.logger.info("Disconnected from MongoDB"); + } + } +} diff --git a/db/models.ts b/db/models.ts new file mode 100644 index 0000000..f991c90 --- /dev/null +++ b/db/models.ts @@ -0,0 +1,221 @@ +import { Document, Model, Schema } from "mongoose"; + +// Base interface for documents with authorDid +interface AuthoredDocument extends Document { + uri: string; + cid: string; + createdAt: string; + indexedAt: string; + authorDid: string; +} + +export const authoredSchema = { + uri: { type: String, required: true, unique: true, index: true }, + authorDid: { type: String, required: true, index: true }, + cid: { type: String, required: true }, + createdAt: { type: String, required: true }, + indexedAt: { type: String, required: true }, +}; + +export interface MediaRef { + $type: string; + ref: { $link: string }; +} + +export interface EmbedImage { + alt: string; + image: MediaRef; + aspectRatio: { + width: number; + height: number; + }; +} + +export interface EmbedVideo extends MediaRef { + alt: string; + aspectRatio: { + width: number; + height: number; + }; +} + +interface Label { + src: string; + uri: string; + cid: string; + val: string; + neg: boolean; +} + +interface Facet { + index: { + byteStart: number; + byteEnd: number; + }; + features: Array<{ + $type: string; + uri?: string; + did?: string; + tag?: string; + }>; +} + +export interface PostEmbed { + $type: string; + record?: { + uri: string; + cid: string; + }; + alt?: string; + video?: EmbedVideo; + images?: Array; + external?: { + uri: string; + title: string; + description: string; + thumb?: MediaRef; + }; + recordWithMedia?: { + record: { + uri: string; + cid: string; + }; + media: { + $type: string; + images?: Array<{ + alt: string; + image: MediaRef; + }>; + }; + }; +} + +export interface PostDocument extends AuthoredDocument { + text?: string; + facets?: Facet[]; + reply: { + root: { + uri: string; + cid: string; + }; + parent: { + uri: string; + cid: string; + }; + } | null; + embed: PostEmbed | null; + sound: { + uri: string; + cid: string; + } | null; + langs?: string[]; + labels: Label[] | null; + tags?: string[]; +} + +export const postSchema = new Schema({ + ...authoredSchema, + text: { type: String, required: false }, + facets: { type: [Object], required: false, default: [] }, + reply: { + type: { + root: { + uri: { type: String, required: true }, + cid: { type: String, required: true }, + }, + parent: { + uri: { type: String, required: true }, + cid: { type: String, required: true }, + }, + }, + required: false, + default: null, + }, + embed: { type: Object, required: false, default: null }, + sound: { + type: { + uri: { type: String, required: true }, + cid: { type: String, required: true }, + }, + required: false, + default: null, + }, + langs: { type: [String], required: false, default: [] }, + labels: { type: Object, required: false, default: null }, + tags: { type: [String], required: false, default: [] }, +}); + +// Compound indexes for more efficient queries +postSchema.index({ authorDid: 1, createdAt: -1 }); +postSchema.index({ tags: 1, createdAt: -1 }); + +export interface FollowDocument extends AuthoredDocument { + subject: string; + type: "sprk" | "bsky"; +} + +export const followSchema = new Schema({ + ...authoredSchema, + subject: { type: String, required: true, index: true }, + type: { + type: String, + required: true, + enum: ["sprk", "bsky"], + index: true, + default: "sprk", + }, +}); + +export interface LikeDocument extends AuthoredDocument { + subject: string; + subjectCid: string; + via?: string | null; + viaCid?: string | null; +} + +export const likeSchema = new Schema({ + ...authoredSchema, + subject: { type: String, required: true, index: true }, + subjectCid: { type: String, required: true }, + via: { type: String, required: false }, + viaCid: { type: String, required: false }, +}); + +export interface RepostDocument extends AuthoredDocument { + subject: { + uri: string; + cid: string; + }; + via?: string | null; + viaCid?: string | null; +} + +export const repostSchema = new Schema({ + ...authoredSchema, + subject: { + uri: { type: String, required: true }, + cid: { type: String, required: true }, + }, + via: { type: String, required: false }, + viaCid: { type: String, required: false }, +}); + +export interface CursorStateDocument extends Document { + identifier: string; // To ensure a single document, e.g., 'last_processed_cursor' + cursorValue: number; + updatedAt: Date; +} + +export const cursorStateSchema = new Schema({ + identifier: { type: String, required: true, unique: true, index: true }, + cursorValue: { type: Number, required: true }, + updatedAt: { type: Date, default: Date.now }, +}); + +export interface DatabaseModels { + Post: Model; + Follow: Model; + Like: Model; + Repost: Model; + CursorState: Model; +} diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..fcc881c --- /dev/null +++ b/deno.json @@ -0,0 +1,22 @@ +{ + "tasks": { + "start": "deno run -A main.ts", + "dev": "deno run -A --watch main.ts" + }, + "imports": { + "@atp/common": "jsr:@atp/common@^0.1.0-alpha.4", + "@atp/identity": "jsr:@atp/identity@^0.1.0-alpha.1", + "@atp/lexicon": "jsr:@atp/lexicon@^0.1.0-alpha.2", + "@atp/syntax": "jsr:@atp/syntax@^0.1.0-alpha.2", + "@atp/xrpc-server": "jsr:@atp/xrpc-server@^0.1.0-alpha.2", + "@atproto/lexicon": "npm:@atproto/lexicon@^0.4.12", + "@logtape/logtape": "jsr:@logtape/logtape@^1.0.4", + "@logtape/pretty": "jsr:@logtape/pretty@^1.1.0-dev.333+b25e634b", + "hono": "jsr:@hono/hono@^4.8.4", + "dotenv": "npm:dotenv@^16.4.7", + "envalid": "npm:envalid@^8.0.0", + "jose": "npm:jose@^6.0.12", + "mongoose": "npm:mongoose@^8.12.1", + "multiformats": "npm:multiformats@^13.3.7" + } +} diff --git a/deno.lock b/deno.lock new file mode 100644 index 0000000..4952a65 --- /dev/null +++ b/deno.lock @@ -0,0 +1,354 @@ +{ + "version": "5", + "specifiers": { + "jsr:@atp/bytes@~0.1.0-alpha.1": "0.1.0-alpha.1", + "jsr:@atp/common@~0.1.0-alpha.3": "0.1.0-alpha.4", + "jsr:@atp/common@~0.1.0-alpha.4": "0.1.0-alpha.4", + "jsr:@atp/crypto@~0.1.0-alpha.1": "0.1.0-alpha.2", + "jsr:@atp/crypto@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@atp/identity@~0.1.0-alpha.1": "0.1.0-alpha.1", + "jsr:@atp/lexicon@~0.1.0-alpha.1": "0.1.0-alpha.2", + "jsr:@atp/lexicon@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@atp/syntax@~0.1.0-alpha.1": "0.1.0-alpha.2", + "jsr:@atp/syntax@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@atp/xrpc-server@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@atp/xrpc@~0.1.0-alpha.2": "0.1.0-alpha.2", + "jsr:@hono/hono@^4.8.4": "4.9.10", + "jsr:@hono/hono@^4.9.8": "4.9.10", + "jsr:@logtape/file@^1.2.0-dev.344+834f24a9": "1.2.0-dev.344+834f24a9", + "jsr:@logtape/logtape@^1.0.4": "1.0.4", + "jsr:@logtape/logtape@^1.1.0-dev.333+b25e634b": "1.1.0-dev.333+b25e634b", + "jsr:@logtape/logtape@^1.2.0-dev.344+834f24a9": "1.2.0-dev.344+834f24a9", + "jsr:@logtape/pretty@^1.1.0-dev.333+b25e634b": "1.1.0-dev.333+b25e634b", + "jsr:@noble/curves@^2.0.1": "2.0.1", + "jsr:@noble/hashes@2": "2.0.1", + "jsr:@noble/hashes@^2.0.1": "2.0.1", + "jsr:@std/assert@^1.0.14": "1.0.15", + "jsr:@std/bytes@^1.0.5": "1.0.6", + "jsr:@std/cbor@~0.1.8": "0.1.8", + "jsr:@std/crypto@^1.0.5": "1.0.5", + "jsr:@std/encoding@^1.0.10": "1.0.10", + "jsr:@std/fs@^1.0.19": "1.0.19", + "jsr:@std/internal@^1.0.12": "1.0.12", + "jsr:@std/streams@^1.0.9": "1.0.13", + "jsr:@zod/zod@^4.1.11": "4.1.12", + "npm:@ipld/dag-cbor@^9.2.5": "9.2.5", + "npm:@types/node@*": "24.0.7", + "npm:@types/node@24.0.7": "24.0.7", + "npm:dotenv@^16.4.7": "16.6.1", + "npm:envalid@8": "8.1.0", + "npm:jose@^6.0.12": "6.0.12", + "npm:mongoose@^8.12.1": "8.16.3", + "npm:multiformats@^13.3.7": "13.4.1", + "npm:multiformats@^13.4.1": "13.4.1", + "npm:rate-limiter-flexible@^2.4.2": "2.4.2", + "npm:zod@^4.1.11": "4.1.12" + }, + "jsr": { + "@atp/bytes@0.1.0-alpha.1": { + "integrity": "51ab3c11252f29265b9ac382b6b2f7023643fe74682114300f4efceee87cfd5c", + "dependencies": [ + "npm:multiformats@^13.4.1" + ] + }, + "@atp/common@0.1.0-alpha.4": { + "integrity": "b935ad78c94f1829a348139eb9fd2eabb6ddfed3dfd5a62a2af904712c1c1e52", + "dependencies": [ + "jsr:@atp/bytes", + "jsr:@logtape/file", + "jsr:@logtape/logtape@^1.2.0-dev.344+834f24a9", + "jsr:@std/cbor", + "jsr:@std/crypto", + "jsr:@std/encoding", + "jsr:@std/fs", + "jsr:@zod/zod", + "npm:@ipld/dag-cbor", + "npm:multiformats@^13.4.1" + ] + }, + "@atp/crypto@0.1.0-alpha.2": { + "integrity": "594b0211ab82cc530bcd6f4a494ce192b0d5be60c01304d7096e030ef2baae11", + "dependencies": [ + "jsr:@atp/bytes", + "jsr:@noble/curves", + "jsr:@noble/hashes@^2.0.1" + ] + }, + "@atp/identity@0.1.0-alpha.1": { + "integrity": "a548f4715abeca8ed6f6f359cdaf277bf1a41cd455170d8e13a629bcf6351016", + "dependencies": [ + "jsr:@atp/common@~0.1.0-alpha.4", + "jsr:@atp/crypto@~0.1.0-alpha.1" + ] + }, + "@atp/lexicon@0.1.0-alpha.2": { + "integrity": "2c66b1a958656f4e272c2082a1b2b4edb4b5d62104684c667af5485551ec17b1", + "dependencies": [ + "jsr:@atp/common@~0.1.0-alpha.3", + "jsr:@atp/syntax@~0.1.0-alpha.1", + "npm:multiformats@^13.4.1", + "npm:zod" + ] + }, + "@atp/syntax@0.1.0-alpha.1": { + "integrity": "9e2055cace77cf63a8c52a4a94c39492215e7135101db7bc2289ebad9bec1991" + }, + "@atp/syntax@0.1.0-alpha.2": { + "integrity": "f7ab598b6b3c3b01dc446077b4c57acc1f1cb8a45f91bd3eb394997408a712a2" + }, + "@atp/xrpc@0.1.0-alpha.2": { + "integrity": "53a548b554430671eeef683ce48830599c12e48bb2f73ef9fa49d1cfe3aba1fb", + "dependencies": [ + "jsr:@atp/lexicon@~0.1.0-alpha.1", + "jsr:@zod/zod" + ] + }, + "@atp/xrpc-server@0.1.0-alpha.2": { + "integrity": "fbf472cb725459ab844529c989ab61967a088956ceba03aba89f3784ee20e1e9", + "dependencies": [ + "jsr:@atp/bytes", + "jsr:@atp/common@~0.1.0-alpha.4", + "jsr:@atp/crypto@~0.1.0-alpha.2", + "jsr:@atp/lexicon@~0.1.0-alpha.2", + "jsr:@atp/xrpc", + "jsr:@hono/hono@^4.9.8", + "jsr:@std/assert", + "jsr:@zod/zod", + "npm:rate-limiter-flexible" + ] + }, + "@hono/hono@4.9.2": { + "integrity": "1a8ae7b0d9e4fecef440f991c604e032d5548dc313d1961073ac5d94809be52b" + }, + "@hono/hono@4.9.10": { + "integrity": "b416cf3bf42e33353e37ea13df409b08bd9a67fabc5fca630f76924fbadb01e5" + }, + "@logtape/file@1.2.0-dev.344+834f24a9": { + "integrity": "4d674c368f8130dc1403c5c93a316726a65d6b17e36b094780f1b2ed301f5e1b", + "dependencies": [ + "jsr:@logtape/logtape@^1.2.0-dev.344+834f24a9" + ] + }, + "@logtape/logtape@1.0.4": { + "integrity": "6ada87764d995b1033c352a17fd9e20b217f3672083bc2d8debe356eac03fe10" + }, + "@logtape/logtape@1.1.0-dev.333+b25e634b": { + "integrity": "482814e7de5a3470cd614182681bc3e64435b56f424de34badee259503a40273" + }, + "@logtape/logtape@1.2.0-dev.344+834f24a9": { + "integrity": "204222be0f94cd1b64a500e2dcdea22a1618a086fc531b054351e3cfa079c435" + }, + "@logtape/pretty@1.1.0-dev.333+b25e634b": { + "integrity": "f9579c0ca9658c6424758024c26a6bd841b60c57ca0fe69dd6fda0289b6f3afe", + "dependencies": [ + "jsr:@logtape/logtape@^1.1.0-dev.333+b25e634b", + "npm:@types/node@24.0.7" + ] + }, + "@noble/curves@2.0.1": { + "integrity": "21ef41d207a203f60ba37a4fdcbc4f4a545b10c5dab7f293889f18292f81ab23", + "dependencies": [ + "jsr:@noble/hashes@2" + ] + }, + "@noble/hashes@2.0.1": { + "integrity": "e0e908292a0bf91099cf8ba0720a1647cef82ab38b588815b5e9535b4ff4d7bb" + }, + "@std/assert@1.0.15": { + "integrity": "d64018e951dbdfab9777335ecdb000c0b4e3df036984083be219ce5941e4703b", + "dependencies": [ + "jsr:@std/internal" + ] + }, + "@std/bytes@1.0.6": { + "integrity": "f6ac6adbd8ccd99314045f5703e23af0a68d7f7e58364b47d2c7f408aeb5820a" + }, + "@std/cbor@0.1.8": { + "integrity": "a0d1c520f8963358cc96defd8cbd1f9e81e40adc2bbfb301f122150f2024d93e", + "dependencies": [ + "jsr:@std/bytes", + "jsr:@std/streams" + ] + }, + "@std/crypto@1.0.5": { + "integrity": "0dcfbb319fe0bba1bd3af904ceb4f948cde1b92979ec1614528380ed308a3b40" + }, + "@std/encoding@1.0.10": { + "integrity": "8783c6384a2d13abd5e9e87a7ae0520a30e9f56aeeaa3bdf910a3eaaf5c811a1" + }, + "@std/fs@1.0.19": { + "integrity": "051968c2b1eae4d2ea9f79a08a3845740ef6af10356aff43d3e2ef11ed09fb06" + }, + "@std/internal@1.0.12": { + "integrity": "972a634fd5bc34b242024402972cd5143eac68d8dffaca5eaa4dba30ce17b027" + }, + "@std/streams@1.0.13": { + "integrity": "772d208cd0d3e5dac7c1d9e6cdb25842846d136eea4a41a62e44ed4ab0c8dd9e" + }, + "@zod/zod@4.1.12": { + "integrity": "5876ed4c6d44673faf5120f0a461a2ada2eb6c735329d3ebaf5ba1fc08387695" + } + }, + "npm": { + "@ipld/dag-cbor@9.2.5": { + "integrity": "sha512-84wSr4jv30biui7endhobYhXBQzQE4c/wdoWlFrKcfiwH+ofaPg8fwsM8okX9cOzkkrsAsNdDyH3ou+kiLquwQ==", + "dependencies": [ + "cborg", + "multiformats" + ] + }, + "@mongodb-js/saslprep@1.3.0": { + "integrity": "sha512-zlayKCsIjYb7/IdfqxorK5+xUMyi4vOKcFy10wKJYc63NSdKI8mNME+uJqfatkPmOSMMUiojrL58IePKBm3gvQ==", + "dependencies": [ + "sparse-bitfield" + ] + }, + "@types/node@24.0.7": { + "integrity": "sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw==", + "dependencies": [ + "undici-types" + ] + }, + "@types/webidl-conversions@7.0.3": { + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "@types/whatwg-url@11.0.5": { + "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", + "dependencies": [ + "@types/webidl-conversions" + ] + }, + "bson@6.10.4": { + "integrity": "sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng==" + }, + "cborg@4.2.15": { + "integrity": "sha512-T+YVPemWyXcBVQdp0k61lQp2hJniRNmul0lAwTj2DTS/6dI4eCq/MRMucGqqvFqMBfmnD8tJ9aFtPu5dEGAbgw==", + "bin": true + }, + "debug@4.4.1": { + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dependencies": [ + "ms" + ] + }, + "dotenv@16.6.1": { + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==" + }, + "envalid@8.1.0": { + "integrity": "sha512-OT6+qVhKVyCidaGoXflb2iK1tC8pd0OV2Q+v9n33wNhUJ+lus+rJobUj4vJaQBPxPZ0vYrPGuxdrenyCAIJcow==", + "dependencies": [ + "tslib" + ] + }, + "jose@6.0.12": { + "integrity": "sha512-T8xypXs8CpmiIi78k0E+Lk7T2zlK4zDyg+o1CZ4AkOHgDg98ogdP2BeZ61lTFKFyoEwJ9RgAgN+SdM3iPgNonQ==" + }, + "kareem@2.6.3": { + "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==" + }, + "memory-pager@1.5.0": { + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + }, + "mongodb-connection-string-url@3.0.2": { + "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==", + "dependencies": [ + "@types/whatwg-url", + "whatwg-url" + ] + }, + "mongodb@6.17.0": { + "integrity": "sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==", + "dependencies": [ + "@mongodb-js/saslprep", + "bson", + "mongodb-connection-string-url" + ] + }, + "mongoose@8.16.3": { + "integrity": "sha512-p2JOsRQG7j0vXhLpsWw5Slm2VnDeJK8sRyqSyegk5jQujuP9BTOZ1Di9VX/0lYfBhZ2DpAExi51QTd4pIqSgig==", + "dependencies": [ + "bson", + "kareem", + "mongodb", + "mpath", + "mquery", + "ms", + "sift" + ] + }, + "mpath@0.9.0": { + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==" + }, + "mquery@5.0.0": { + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "dependencies": [ + "debug" + ] + }, + "ms@2.1.3": { + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "multiformats@13.4.1": { + "integrity": "sha512-VqO6OSvLrFVAYYjgsr8tyv62/rCQhPgsZUXLTqoFLSgdkgiUYKYeArbt1uWLlEpkjxQe+P0+sHlbPEte1Bi06Q==" + }, + "punycode@2.3.1": { + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" + }, + "rate-limiter-flexible@2.4.2": { + "integrity": "sha512-rMATGGOdO1suFyf/mI5LYhts71g1sbdhmd6YvdiXO2gJnd42Tt6QS4JUKJKSWVVkMtBacm6l40FR7Trjo6Iruw==" + }, + "sift@17.1.3": { + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==" + }, + "sparse-bitfield@3.0.3": { + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "dependencies": [ + "memory-pager" + ] + }, + "tr46@5.1.1": { + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "dependencies": [ + "punycode" + ] + }, + "tslib@2.8.1": { + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, + "undici-types@7.8.0": { + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==" + }, + "webidl-conversions@7.0.0": { + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==" + }, + "whatwg-url@14.2.0": { + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "dependencies": [ + "tr46", + "webidl-conversions" + ] + }, + "zod@4.1.12": { + "integrity": "sha512-JInaHOamG8pt5+Ey8kGmdcAcg3OL9reK8ltczgHTAwNhMys/6ThXHityHxVV2p3fkw/c+MAvBHFVYHFZDmjMCQ==" + } + }, + "workspace": { + "dependencies": [ + "jsr:@atp/common@~0.1.0-alpha.4", + "jsr:@atp/identity@~0.1.0-alpha.1", + "jsr:@atp/lexicon@~0.1.0-alpha.2", + "jsr:@atp/syntax@~0.1.0-alpha.2", + "jsr:@atp/xrpc-server@~0.1.0-alpha.2", + "jsr:@hono/hono@^4.8.4", + "jsr:@logtape/logtape@^1.0.4", + "jsr:@logtape/pretty@^1.1.0-dev.333+b25e634b", + "jsr:@sprk/xrpc-server@~0.1.5", + "npm:@atproto/lexicon@~0.4.12", + "npm:dotenv@^16.4.7", + "npm:envalid@8", + "npm:jose@^6.0.12", + "npm:mongoose@^8.12.1", + "npm:multiformats@^13.3.7" + ] + } +} diff --git a/lex/index.ts b/lex/index.ts new file mode 100644 index 0000000..3bbb7ca --- /dev/null +++ b/lex/index.ts @@ -0,0 +1,3664 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { + type Auth, + createServer as createXrpcServer, + type MethodConfigOrHandler, + type Options as XrpcOptions, + Server as XrpcServer, + type StreamConfigOrHandler, +} from "@atp/xrpc-server"; +import { schemas } from "./lexicons.ts"; +import * as ToolsOzoneSignatureFindCorrelation from "./types/tools/ozone/signature/findCorrelation.ts"; +import * as ToolsOzoneSignatureSearchAccounts from "./types/tools/ozone/signature/searchAccounts.ts"; +import * as ToolsOzoneSignatureFindRelatedAccounts from "./types/tools/ozone/signature/findRelatedAccounts.ts"; +import * as ToolsOzoneServerGetConfig from "./types/tools/ozone/server/getConfig.ts"; +import * as ToolsOzoneTeamListMembers from "./types/tools/ozone/team/listMembers.ts"; +import * as ToolsOzoneTeamDeleteMember from "./types/tools/ozone/team/deleteMember.ts"; +import * as ToolsOzoneTeamUpdateMember from "./types/tools/ozone/team/updateMember.ts"; +import * as ToolsOzoneTeamAddMember from "./types/tools/ozone/team/addMember.ts"; +import * as ToolsOzoneCommunicationUpdateTemplate from "./types/tools/ozone/communication/updateTemplate.ts"; +import * as ToolsOzoneCommunicationCreateTemplate from "./types/tools/ozone/communication/createTemplate.ts"; +import * as ToolsOzoneCommunicationListTemplates from "./types/tools/ozone/communication/listTemplates.ts"; +import * as ToolsOzoneCommunicationDeleteTemplate from "./types/tools/ozone/communication/deleteTemplate.ts"; +import * as ToolsOzoneSetAddValues from "./types/tools/ozone/set/addValues.ts"; +import * as ToolsOzoneSetGetValues from "./types/tools/ozone/set/getValues.ts"; +import * as ToolsOzoneSetDeleteSet from "./types/tools/ozone/set/deleteSet.ts"; +import * as ToolsOzoneSetUpsertSet from "./types/tools/ozone/set/upsertSet.ts"; +import * as ToolsOzoneSetDeleteValues from "./types/tools/ozone/set/deleteValues.ts"; +import * as ToolsOzoneSetQuerySets from "./types/tools/ozone/set/querySets.ts"; +import * as ToolsOzoneSettingListOptions from "./types/tools/ozone/setting/listOptions.ts"; +import * as ToolsOzoneSettingRemoveOptions from "./types/tools/ozone/setting/removeOptions.ts"; +import * as ToolsOzoneSettingUpsertOption from "./types/tools/ozone/setting/upsertOption.ts"; +import * as ToolsOzoneModerationGetReporterStats from "./types/tools/ozone/moderation/getReporterStats.ts"; +import * as ToolsOzoneModerationQueryStatuses from "./types/tools/ozone/moderation/queryStatuses.ts"; +import * as ToolsOzoneModerationGetRepo from "./types/tools/ozone/moderation/getRepo.ts"; +import * as ToolsOzoneModerationGetRecords from "./types/tools/ozone/moderation/getRecords.ts"; +import * as ToolsOzoneModerationGetEvent from "./types/tools/ozone/moderation/getEvent.ts"; +import * as ToolsOzoneModerationQueryEvents from "./types/tools/ozone/moderation/queryEvents.ts"; +import * as ToolsOzoneModerationGetRecord from "./types/tools/ozone/moderation/getRecord.ts"; +import * as ToolsOzoneModerationEmitEvent from "./types/tools/ozone/moderation/emitEvent.ts"; +import * as ToolsOzoneModerationSearchRepos from "./types/tools/ozone/moderation/searchRepos.ts"; +import * as ToolsOzoneModerationGetRepos from "./types/tools/ozone/moderation/getRepos.ts"; +import * as AppBskyVideoUploadVideo from "./types/app/bsky/video/uploadVideo.ts"; +import * as AppBskyVideoGetJobStatus from "./types/app/bsky/video/getJobStatus.ts"; +import * as AppBskyVideoGetUploadLimits from "./types/app/bsky/video/getUploadLimits.ts"; +import * as AppBskyNotificationRegisterPush from "./types/app/bsky/notification/registerPush.ts"; +import * as AppBskyNotificationPutPreferences from "./types/app/bsky/notification/putPreferences.ts"; +import * as AppBskyNotificationUpdateSeen from "./types/app/bsky/notification/updateSeen.ts"; +import * as AppBskyNotificationListNotifications from "./types/app/bsky/notification/listNotifications.ts"; +import * as AppBskyNotificationGetUnreadCount from "./types/app/bsky/notification/getUnreadCount.ts"; +import * as AppBskyUnspeccedSearchStarterPacksSkeleton from "./types/app/bsky/unspecced/searchStarterPacksSkeleton.ts"; +import * as AppBskyUnspeccedSearchActorsSkeleton from "./types/app/bsky/unspecced/searchActorsSkeleton.ts"; +import * as AppBskyUnspeccedGetSuggestionsSkeleton from "./types/app/bsky/unspecced/getSuggestionsSkeleton.ts"; +import * as AppBskyUnspeccedSearchPostsSkeleton from "./types/app/bsky/unspecced/searchPostsSkeleton.ts"; +import * as AppBskyUnspeccedGetPopularFeedGenerators from "./types/app/bsky/unspecced/getPopularFeedGenerators.ts"; +import * as AppBskyUnspeccedGetTrendingTopics from "./types/app/bsky/unspecced/getTrendingTopics.ts"; +import * as AppBskyUnspeccedGetTaggedSuggestions from "./types/app/bsky/unspecced/getTaggedSuggestions.ts"; +import * as AppBskyUnspeccedGetConfig from "./types/app/bsky/unspecced/getConfig.ts"; +import * as AppBskyGraphGetStarterPacks from "./types/app/bsky/graph/getStarterPacks.ts"; +import * as AppBskyGraphGetSuggestedFollowsByActor from "./types/app/bsky/graph/getSuggestedFollowsByActor.ts"; +import * as AppBskyGraphUnmuteActorList from "./types/app/bsky/graph/unmuteActorList.ts"; +import * as AppBskyGraphGetListBlocks from "./types/app/bsky/graph/getListBlocks.ts"; +import * as AppBskyGraphGetStarterPack from "./types/app/bsky/graph/getStarterPack.ts"; +import * as AppBskyGraphMuteActorList from "./types/app/bsky/graph/muteActorList.ts"; +import * as AppBskyGraphMuteThread from "./types/app/bsky/graph/muteThread.ts"; +import * as AppBskyGraphSearchStarterPacks from "./types/app/bsky/graph/searchStarterPacks.ts"; +import * as AppBskyGraphGetActorStarterPacks from "./types/app/bsky/graph/getActorStarterPacks.ts"; +import * as AppBskyGraphGetLists from "./types/app/bsky/graph/getLists.ts"; +import * as AppBskyGraphGetFollowers from "./types/app/bsky/graph/getFollowers.ts"; +import * as AppBskyGraphUnmuteThread from "./types/app/bsky/graph/unmuteThread.ts"; +import * as AppBskyGraphMuteActor from "./types/app/bsky/graph/muteActor.ts"; +import * as AppBskyGraphGetMutes from "./types/app/bsky/graph/getMutes.ts"; +import * as AppBskyGraphGetKnownFollowers from "./types/app/bsky/graph/getKnownFollowers.ts"; +import * as AppBskyGraphGetListMutes from "./types/app/bsky/graph/getListMutes.ts"; +import * as AppBskyGraphGetFollows from "./types/app/bsky/graph/getFollows.ts"; +import * as AppBskyGraphGetBlocks from "./types/app/bsky/graph/getBlocks.ts"; +import * as AppBskyGraphGetRelationships from "./types/app/bsky/graph/getRelationships.ts"; +import * as AppBskyGraphUnmuteActor from "./types/app/bsky/graph/unmuteActor.ts"; +import * as AppBskyGraphGetList from "./types/app/bsky/graph/getList.ts"; +import * as AppBskyFeedSendInteractions from "./types/app/bsky/feed/sendInteractions.ts"; +import * as AppBskyFeedGetFeedGenerators from "./types/app/bsky/feed/getFeedGenerators.ts"; +import * as AppBskyFeedGetTimeline from "./types/app/bsky/feed/getTimeline.ts"; +import * as AppBskyFeedGetFeedGenerator from "./types/app/bsky/feed/getFeedGenerator.ts"; +import * as AppBskyFeedGetAuthorFeed from "./types/app/bsky/feed/getAuthorFeed.ts"; +import * as AppBskyFeedGetLikes from "./types/app/bsky/feed/getLikes.ts"; +import * as AppBskyFeedGetPostThread from "./types/app/bsky/feed/getPostThread.ts"; +import * as AppBskyFeedGetActorLikes from "./types/app/bsky/feed/getActorLikes.ts"; +import * as AppBskyFeedGetRepostedBy from "./types/app/bsky/feed/getRepostedBy.ts"; +import * as AppBskyFeedDescribeFeedGenerator from "./types/app/bsky/feed/describeFeedGenerator.ts"; +import * as AppBskyFeedSearchPosts from "./types/app/bsky/feed/searchPosts.ts"; +import * as AppBskyFeedGetPosts from "./types/app/bsky/feed/getPosts.ts"; +import * as AppBskyFeedGetFeed from "./types/app/bsky/feed/getFeed.ts"; +import * as AppBskyFeedGetQuotes from "./types/app/bsky/feed/getQuotes.ts"; +import * as AppBskyFeedGetFeedSkeleton from "./types/app/bsky/feed/getFeedSkeleton.ts"; +import * as AppBskyFeedGetListFeed from "./types/app/bsky/feed/getListFeed.ts"; +import * as AppBskyFeedGetSuggestedFeeds from "./types/app/bsky/feed/getSuggestedFeeds.ts"; +import * as AppBskyFeedGetActorFeeds from "./types/app/bsky/feed/getActorFeeds.ts"; +import * as AppBskyActorSearchActorsTypeahead from "./types/app/bsky/actor/searchActorsTypeahead.ts"; +import * as AppBskyActorPutPreferences from "./types/app/bsky/actor/putPreferences.ts"; +import * as AppBskyActorGetProfile from "./types/app/bsky/actor/getProfile.ts"; +import * as AppBskyActorGetSuggestions from "./types/app/bsky/actor/getSuggestions.ts"; +import * as AppBskyActorSearchActors from "./types/app/bsky/actor/searchActors.ts"; +import * as AppBskyActorGetProfiles from "./types/app/bsky/actor/getProfiles.ts"; +import * as AppBskyActorGetPreferences from "./types/app/bsky/actor/getPreferences.ts"; +import * as AppBskyLabelerGetServices from "./types/app/bsky/labeler/getServices.ts"; +import * as ChatBskyConvoListConvos from "./types/chat/bsky/convo/listConvos.ts"; +import * as ChatBskyConvoUnmuteConvo from "./types/chat/bsky/convo/unmuteConvo.ts"; +import * as ChatBskyConvoGetConvoAvailability from "./types/chat/bsky/convo/getConvoAvailability.ts"; +import * as ChatBskyConvoGetLog from "./types/chat/bsky/convo/getLog.ts"; +import * as ChatBskyConvoSendMessage from "./types/chat/bsky/convo/sendMessage.ts"; +import * as ChatBskyConvoLeaveConvo from "./types/chat/bsky/convo/leaveConvo.ts"; +import * as ChatBskyConvoAcceptConvo from "./types/chat/bsky/convo/acceptConvo.ts"; +import * as ChatBskyConvoMuteConvo from "./types/chat/bsky/convo/muteConvo.ts"; +import * as ChatBskyConvoDeleteMessageForSelf from "./types/chat/bsky/convo/deleteMessageForSelf.ts"; +import * as ChatBskyConvoUpdateRead from "./types/chat/bsky/convo/updateRead.ts"; +import * as ChatBskyConvoUpdateAllRead from "./types/chat/bsky/convo/updateAllRead.ts"; +import * as ChatBskyConvoGetConvo from "./types/chat/bsky/convo/getConvo.ts"; +import * as ChatBskyConvoGetMessages from "./types/chat/bsky/convo/getMessages.ts"; +import * as ChatBskyConvoGetConvoForMembers from "./types/chat/bsky/convo/getConvoForMembers.ts"; +import * as ChatBskyConvoSendMessageBatch from "./types/chat/bsky/convo/sendMessageBatch.ts"; +import * as ChatBskyActorExportAccountData from "./types/chat/bsky/actor/exportAccountData.ts"; +import * as ChatBskyActorDeleteAccount from "./types/chat/bsky/actor/deleteAccount.ts"; +import * as ChatBskyModerationGetActorMetadata from "./types/chat/bsky/moderation/getActorMetadata.ts"; +import * as ChatBskyModerationGetMessageContext from "./types/chat/bsky/moderation/getMessageContext.ts"; +import * as ChatBskyModerationUpdateActorAccess from "./types/chat/bsky/moderation/updateActorAccess.ts"; +import * as SoSprkVideoUploadVideo from "./types/so/sprk/video/uploadVideo.ts"; +import * as SoSprkVideoGetJobStatus from "./types/so/sprk/video/getJobStatus.ts"; +import * as SoSprkVideoGetUploadLimits from "./types/so/sprk/video/getUploadLimits.ts"; +import * as SoSprkNotificationRegisterPush from "./types/so/sprk/notification/registerPush.ts"; +import * as SoSprkNotificationPutPreferences from "./types/so/sprk/notification/putPreferences.ts"; +import * as SoSprkNotificationUpdateSeen from "./types/so/sprk/notification/updateSeen.ts"; +import * as SoSprkNotificationListNotifications from "./types/so/sprk/notification/listNotifications.ts"; +import * as SoSprkNotificationGetUnreadCount from "./types/so/sprk/notification/getUnreadCount.ts"; +import * as SoSprkGraphGetSuggestedFollowsByActor from "./types/so/sprk/graph/getSuggestedFollowsByActor.ts"; +import * as SoSprkGraphMuteThread from "./types/so/sprk/graph/muteThread.ts"; +import * as SoSprkGraphGetFollowers from "./types/so/sprk/graph/getFollowers.ts"; +import * as SoSprkGraphUnmuteThread from "./types/so/sprk/graph/unmuteThread.ts"; +import * as SoSprkGraphMuteActor from "./types/so/sprk/graph/muteActor.ts"; +import * as SoSprkGraphGetMutes from "./types/so/sprk/graph/getMutes.ts"; +import * as SoSprkGraphGetKnownFollowers from "./types/so/sprk/graph/getKnownFollowers.ts"; +import * as SoSprkGraphGetFollows from "./types/so/sprk/graph/getFollows.ts"; +import * as SoSprkGraphGetBlocks from "./types/so/sprk/graph/getBlocks.ts"; +import * as SoSprkGraphGetRelationships from "./types/so/sprk/graph/getRelationships.ts"; +import * as SoSprkGraphUnmuteActor from "./types/so/sprk/graph/unmuteActor.ts"; +import * as SoSprkFeedSendInteractions from "./types/so/sprk/feed/sendInteractions.ts"; +import * as SoSprkFeedGetFeedGenerators from "./types/so/sprk/feed/getFeedGenerators.ts"; +import * as SoSprkFeedGetTimeline from "./types/so/sprk/feed/getTimeline.ts"; +import * as SoSprkFeedGetFeedGenerator from "./types/so/sprk/feed/getFeedGenerator.ts"; +import * as SoSprkFeedGetAuthorFeed from "./types/so/sprk/feed/getAuthorFeed.ts"; +import * as SoSprkFeedGetLikes from "./types/so/sprk/feed/getLikes.ts"; +import * as SoSprkFeedGetPostThread from "./types/so/sprk/feed/getPostThread.ts"; +import * as SoSprkFeedGetActorLikes from "./types/so/sprk/feed/getActorLikes.ts"; +import * as SoSprkFeedGetRepostedBy from "./types/so/sprk/feed/getRepostedBy.ts"; +import * as SoSprkFeedDescribeFeedGenerator from "./types/so/sprk/feed/describeFeedGenerator.ts"; +import * as SoSprkFeedSearchPosts from "./types/so/sprk/feed/searchPosts.ts"; +import * as SoSprkFeedGetPosts from "./types/so/sprk/feed/getPosts.ts"; +import * as SoSprkFeedGetFeed from "./types/so/sprk/feed/getFeed.ts"; +import * as SoSprkFeedGetFeedSkeleton from "./types/so/sprk/feed/getFeedSkeleton.ts"; +import * as SoSprkFeedGetSuggestedFeeds from "./types/so/sprk/feed/getSuggestedFeeds.ts"; +import * as SoSprkFeedGetActorFeeds from "./types/so/sprk/feed/getActorFeeds.ts"; +import * as SoSprkSoundGetActorAudios from "./types/so/sprk/sound/getActorAudios.ts"; +import * as SoSprkSoundGetAudioPosts from "./types/so/sprk/sound/getAudioPosts.ts"; +import * as SoSprkSoundGetAudios from "./types/so/sprk/sound/getAudios.ts"; +import * as SoSprkSoundGetTrendingAudios from "./types/so/sprk/sound/getTrendingAudios.ts"; +import * as SoSprkActorSearchActorsTypeahead from "./types/so/sprk/actor/searchActorsTypeahead.ts"; +import * as SoSprkActorPutPreferences from "./types/so/sprk/actor/putPreferences.ts"; +import * as SoSprkActorGetProfile from "./types/so/sprk/actor/getProfile.ts"; +import * as SoSprkActorGetSuggestions from "./types/so/sprk/actor/getSuggestions.ts"; +import * as SoSprkActorSearchActors from "./types/so/sprk/actor/searchActors.ts"; +import * as SoSprkActorGetProfiles from "./types/so/sprk/actor/getProfiles.ts"; +import * as SoSprkActorGetPreferences from "./types/so/sprk/actor/getPreferences.ts"; +import * as SoSprkStoryGetTimeline from "./types/so/sprk/story/getTimeline.ts"; +import * as SoSprkStoryGetStories from "./types/so/sprk/story/getStories.ts"; +import * as SoSprkLabelerGetServices from "./types/so/sprk/labeler/getServices.ts"; +import * as ComAtprotoTempAddReservedHandle from "./types/com/atproto/temp/addReservedHandle.ts"; +import * as ComAtprotoTempCheckSignupQueue from "./types/com/atproto/temp/checkSignupQueue.ts"; +import * as ComAtprotoTempRequestPhoneVerification from "./types/com/atproto/temp/requestPhoneVerification.ts"; +import * as ComAtprotoTempFetchLabels from "./types/com/atproto/temp/fetchLabels.ts"; +import * as ComAtprotoIdentityUpdateHandle from "./types/com/atproto/identity/updateHandle.ts"; +import * as ComAtprotoIdentitySignPlcOperation from "./types/com/atproto/identity/signPlcOperation.ts"; +import * as ComAtprotoIdentitySubmitPlcOperation from "./types/com/atproto/identity/submitPlcOperation.ts"; +import * as ComAtprotoIdentityResolveHandle from "./types/com/atproto/identity/resolveHandle.ts"; +import * as ComAtprotoIdentityRequestPlcOperationSignature from "./types/com/atproto/identity/requestPlcOperationSignature.ts"; +import * as ComAtprotoIdentityGetRecommendedDidCredentials from "./types/com/atproto/identity/getRecommendedDidCredentials.ts"; +import * as ComAtprotoAdminUpdateAccountEmail from "./types/com/atproto/admin/updateAccountEmail.ts"; +import * as ComAtprotoAdminGetAccountInfo from "./types/com/atproto/admin/getAccountInfo.ts"; +import * as ComAtprotoAdminGetSubjectStatus from "./types/com/atproto/admin/getSubjectStatus.ts"; +import * as ComAtprotoAdminSearchAccounts from "./types/com/atproto/admin/searchAccounts.ts"; +import * as ComAtprotoAdminUpdateAccountPassword from "./types/com/atproto/admin/updateAccountPassword.ts"; +import * as ComAtprotoAdminUpdateAccountHandle from "./types/com/atproto/admin/updateAccountHandle.ts"; +import * as ComAtprotoAdminGetInviteCodes from "./types/com/atproto/admin/getInviteCodes.ts"; +import * as ComAtprotoAdminEnableAccountInvites from "./types/com/atproto/admin/enableAccountInvites.ts"; +import * as ComAtprotoAdminDisableAccountInvites from "./types/com/atproto/admin/disableAccountInvites.ts"; +import * as ComAtprotoAdminDisableInviteCodes from "./types/com/atproto/admin/disableInviteCodes.ts"; +import * as ComAtprotoAdminUpdateSubjectStatus from "./types/com/atproto/admin/updateSubjectStatus.ts"; +import * as ComAtprotoAdminSendEmail from "./types/com/atproto/admin/sendEmail.ts"; +import * as ComAtprotoAdminGetAccountInfos from "./types/com/atproto/admin/getAccountInfos.ts"; +import * as ComAtprotoAdminDeleteAccount from "./types/com/atproto/admin/deleteAccount.ts"; +import * as ComAtprotoLabelSubscribeLabels from "./types/com/atproto/label/subscribeLabels.ts"; +import * as ComAtprotoLabelQueryLabels from "./types/com/atproto/label/queryLabels.ts"; +import * as ComAtprotoServerRequestEmailConfirmation from "./types/com/atproto/server/requestEmailConfirmation.ts"; +import * as ComAtprotoServerReserveSigningKey from "./types/com/atproto/server/reserveSigningKey.ts"; +import * as ComAtprotoServerGetServiceAuth from "./types/com/atproto/server/getServiceAuth.ts"; +import * as ComAtprotoServerGetAccountInviteCodes from "./types/com/atproto/server/getAccountInviteCodes.ts"; +import * as ComAtprotoServerCreateSession from "./types/com/atproto/server/createSession.ts"; +import * as ComAtprotoServerListAppPasswords from "./types/com/atproto/server/listAppPasswords.ts"; +import * as ComAtprotoServerCreateInviteCodes from "./types/com/atproto/server/createInviteCodes.ts"; +import * as ComAtprotoServerDeleteSession from "./types/com/atproto/server/deleteSession.ts"; +import * as ComAtprotoServerRevokeAppPassword from "./types/com/atproto/server/revokeAppPassword.ts"; +import * as ComAtprotoServerCreateAppPassword from "./types/com/atproto/server/createAppPassword.ts"; +import * as ComAtprotoServerActivateAccount from "./types/com/atproto/server/activateAccount.ts"; +import * as ComAtprotoServerDescribeServer from "./types/com/atproto/server/describeServer.ts"; +import * as ComAtprotoServerConfirmEmail from "./types/com/atproto/server/confirmEmail.ts"; +import * as ComAtprotoServerGetSession from "./types/com/atproto/server/getSession.ts"; +import * as ComAtprotoServerRefreshSession from "./types/com/atproto/server/refreshSession.ts"; +import * as ComAtprotoServerDeactivateAccount from "./types/com/atproto/server/deactivateAccount.ts"; +import * as ComAtprotoServerUpdateEmail from "./types/com/atproto/server/updateEmail.ts"; +import * as ComAtprotoServerResetPassword from "./types/com/atproto/server/resetPassword.ts"; +import * as ComAtprotoServerCheckAccountStatus from "./types/com/atproto/server/checkAccountStatus.ts"; +import * as ComAtprotoServerRequestEmailUpdate from "./types/com/atproto/server/requestEmailUpdate.ts"; +import * as ComAtprotoServerRequestPasswordReset from "./types/com/atproto/server/requestPasswordReset.ts"; +import * as ComAtprotoServerRequestAccountDelete from "./types/com/atproto/server/requestAccountDelete.ts"; +import * as ComAtprotoServerCreateAccount from "./types/com/atproto/server/createAccount.ts"; +import * as ComAtprotoServerDeleteAccount from "./types/com/atproto/server/deleteAccount.ts"; +import * as ComAtprotoServerCreateInviteCode from "./types/com/atproto/server/createInviteCode.ts"; +import * as ComAtprotoSyncGetHead from "./types/com/atproto/sync/getHead.ts"; +import * as ComAtprotoSyncGetBlob from "./types/com/atproto/sync/getBlob.ts"; +import * as ComAtprotoSyncGetRepo from "./types/com/atproto/sync/getRepo.ts"; +import * as ComAtprotoSyncNotifyOfUpdate from "./types/com/atproto/sync/notifyOfUpdate.ts"; +import * as ComAtprotoSyncRequestCrawl from "./types/com/atproto/sync/requestCrawl.ts"; +import * as ComAtprotoSyncListBlobs from "./types/com/atproto/sync/listBlobs.ts"; +import * as ComAtprotoSyncGetLatestCommit from "./types/com/atproto/sync/getLatestCommit.ts"; +import * as ComAtprotoSyncSubscribeRepos from "./types/com/atproto/sync/subscribeRepos.ts"; +import * as ComAtprotoSyncGetRepoStatus from "./types/com/atproto/sync/getRepoStatus.ts"; +import * as ComAtprotoSyncGetRecord from "./types/com/atproto/sync/getRecord.ts"; +import * as ComAtprotoSyncListRepos from "./types/com/atproto/sync/listRepos.ts"; +import * as ComAtprotoSyncGetBlocks from "./types/com/atproto/sync/getBlocks.ts"; +import * as ComAtprotoSyncListReposByCollection from "./types/com/atproto/sync/listReposByCollection.ts"; +import * as ComAtprotoSyncGetCheckout from "./types/com/atproto/sync/getCheckout.ts"; +import * as ComAtprotoRepoListMissingBlobs from "./types/com/atproto/repo/listMissingBlobs.ts"; +import * as ComAtprotoRepoCreateRecord from "./types/com/atproto/repo/createRecord.ts"; +import * as ComAtprotoRepoDeleteRecord from "./types/com/atproto/repo/deleteRecord.ts"; +import * as ComAtprotoRepoPutRecord from "./types/com/atproto/repo/putRecord.ts"; +import * as ComAtprotoRepoUploadBlob from "./types/com/atproto/repo/uploadBlob.ts"; +import * as ComAtprotoRepoImportRepo from "./types/com/atproto/repo/importRepo.ts"; +import * as ComAtprotoRepoDescribeRepo from "./types/com/atproto/repo/describeRepo.ts"; +import * as ComAtprotoRepoGetRecord from "./types/com/atproto/repo/getRecord.ts"; +import * as ComAtprotoRepoApplyWrites from "./types/com/atproto/repo/applyWrites.ts"; +import * as ComAtprotoRepoListRecords from "./types/com/atproto/repo/listRecords.ts"; +import * as ComAtprotoModerationCreateReport from "./types/com/atproto/moderation/createReport.ts"; + +export const TOOLS_OZONE_TEAM = { + DefsRoleAdmin: "tools.ozone.team.defs#roleAdmin", + DefsRoleModerator: "tools.ozone.team.defs#roleModerator", + DefsRoleTriage: "tools.ozone.team.defs#roleTriage", +}; +export const TOOLS_OZONE_MODERATION = { + DefsReviewOpen: "tools.ozone.moderation.defs#reviewOpen", + DefsReviewEscalated: "tools.ozone.moderation.defs#reviewEscalated", + DefsReviewClosed: "tools.ozone.moderation.defs#reviewClosed", + DefsReviewNone: "tools.ozone.moderation.defs#reviewNone", +}; +export const APP_BSKY_GRAPH = { + DefsModlist: "app.bsky.graph.defs#modlist", + DefsCuratelist: "app.bsky.graph.defs#curatelist", + DefsReferencelist: "app.bsky.graph.defs#referencelist", +}; +export const APP_BSKY_FEED = { + DefsRequestLess: "app.bsky.feed.defs#requestLess", + DefsRequestMore: "app.bsky.feed.defs#requestMore", + DefsClickthroughItem: "app.bsky.feed.defs#clickthroughItem", + DefsClickthroughAuthor: "app.bsky.feed.defs#clickthroughAuthor", + DefsClickthroughReposter: "app.bsky.feed.defs#clickthroughReposter", + DefsClickthroughEmbed: "app.bsky.feed.defs#clickthroughEmbed", + DefsContentModeUnspecified: "app.bsky.feed.defs#contentModeUnspecified", + DefsContentModeVideo: "app.bsky.feed.defs#contentModeVideo", + DefsInteractionSeen: "app.bsky.feed.defs#interactionSeen", + DefsInteractionLike: "app.bsky.feed.defs#interactionLike", + DefsInteractionRepost: "app.bsky.feed.defs#interactionRepost", + DefsInteractionReply: "app.bsky.feed.defs#interactionReply", + DefsInteractionQuote: "app.bsky.feed.defs#interactionQuote", + DefsInteractionShare: "app.bsky.feed.defs#interactionShare", +}; +export const SO_SPRK_FEED = { + DefsRequestLess: "so.sprk.feed.defs#requestLess", + DefsRequestMore: "so.sprk.feed.defs#requestMore", + DefsClickthroughItem: "so.sprk.feed.defs#clickthroughItem", + DefsClickthroughAuthor: "so.sprk.feed.defs#clickthroughAuthor", + DefsClickthroughReposter: "so.sprk.feed.defs#clickthroughReposter", + DefsClickthroughEmbed: "so.sprk.feed.defs#clickthroughEmbed", + DefsInteractionSeen: "so.sprk.feed.defs#interactionSeen", + DefsInteractionLike: "so.sprk.feed.defs#interactionLike", + DefsInteractionRepost: "so.sprk.feed.defs#interactionRepost", + DefsInteractionReply: "so.sprk.feed.defs#interactionReply", + DefsInteractionShare: "so.sprk.feed.defs#interactionShare", +}; +export const COM_ATPROTO_MODERATION = { + DefsReasonSpam: "com.atproto.moderation.defs#reasonSpam", + DefsReasonViolation: "com.atproto.moderation.defs#reasonViolation", + DefsReasonMisleading: "com.atproto.moderation.defs#reasonMisleading", + DefsReasonSexual: "com.atproto.moderation.defs#reasonSexual", + DefsReasonRude: "com.atproto.moderation.defs#reasonRude", + DefsReasonOther: "com.atproto.moderation.defs#reasonOther", + DefsReasonAppeal: "com.atproto.moderation.defs#reasonAppeal", +}; + +export function createServer(options?: XrpcOptions): Server { + return new Server(options); +} + +export class Server { + xrpc: XrpcServer; + tools: ToolsNS; + app: AppNS; + chat: ChatNS; + so: SoNS; + com: ComNS; + + constructor(options?: XrpcOptions) { + this.xrpc = createXrpcServer(schemas, options); + this.tools = new ToolsNS(this); + this.app = new AppNS(this); + this.chat = new ChatNS(this); + this.so = new SoNS(this); + this.com = new ComNS(this); + } +} + +export class ToolsNS { + _server: Server; + ozone: ToolsOzoneNS; + + constructor(server: Server) { + this._server = server; + this.ozone = new ToolsOzoneNS(server); + } +} + +export class ToolsOzoneNS { + _server: Server; + signature: ToolsOzoneSignatureNS; + server: ToolsOzoneServerNS; + team: ToolsOzoneTeamNS; + communication: ToolsOzoneCommunicationNS; + set: ToolsOzoneSetNS; + setting: ToolsOzoneSettingNS; + moderation: ToolsOzoneModerationNS; + + constructor(server: Server) { + this._server = server; + this.signature = new ToolsOzoneSignatureNS(server); + this.server = new ToolsOzoneServerNS(server); + this.team = new ToolsOzoneTeamNS(server); + this.communication = new ToolsOzoneCommunicationNS(server); + this.set = new ToolsOzoneSetNS(server); + this.setting = new ToolsOzoneSettingNS(server); + this.moderation = new ToolsOzoneModerationNS(server); + } +} + +export class ToolsOzoneSignatureNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + findCorrelation( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSignatureFindCorrelation.QueryParams, + ToolsOzoneSignatureFindCorrelation.HandlerInput, + ToolsOzoneSignatureFindCorrelation.HandlerOutput + >, + ) { + const nsid = "tools.ozone.signature.findCorrelation"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchAccounts( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSignatureSearchAccounts.QueryParams, + ToolsOzoneSignatureSearchAccounts.HandlerInput, + ToolsOzoneSignatureSearchAccounts.HandlerOutput + >, + ) { + const nsid = "tools.ozone.signature.searchAccounts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + findRelatedAccounts( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSignatureFindRelatedAccounts.QueryParams, + ToolsOzoneSignatureFindRelatedAccounts.HandlerInput, + ToolsOzoneSignatureFindRelatedAccounts.HandlerOutput + >, + ) { + const nsid = "tools.ozone.signature.findRelatedAccounts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneServerNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getConfig( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneServerGetConfig.QueryParams, + ToolsOzoneServerGetConfig.HandlerInput, + ToolsOzoneServerGetConfig.HandlerOutput + >, + ) { + const nsid = "tools.ozone.server.getConfig"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneTeamNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + listMembers( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneTeamListMembers.QueryParams, + ToolsOzoneTeamListMembers.HandlerInput, + ToolsOzoneTeamListMembers.HandlerOutput + >, + ) { + const nsid = "tools.ozone.team.listMembers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteMember( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneTeamDeleteMember.QueryParams, + ToolsOzoneTeamDeleteMember.HandlerInput, + ToolsOzoneTeamDeleteMember.HandlerOutput + >, + ) { + const nsid = "tools.ozone.team.deleteMember"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateMember( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneTeamUpdateMember.QueryParams, + ToolsOzoneTeamUpdateMember.HandlerInput, + ToolsOzoneTeamUpdateMember.HandlerOutput + >, + ) { + const nsid = "tools.ozone.team.updateMember"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + addMember( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneTeamAddMember.QueryParams, + ToolsOzoneTeamAddMember.HandlerInput, + ToolsOzoneTeamAddMember.HandlerOutput + >, + ) { + const nsid = "tools.ozone.team.addMember"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneCommunicationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + updateTemplate( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneCommunicationUpdateTemplate.QueryParams, + ToolsOzoneCommunicationUpdateTemplate.HandlerInput, + ToolsOzoneCommunicationUpdateTemplate.HandlerOutput + >, + ) { + const nsid = "tools.ozone.communication.updateTemplate"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createTemplate( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneCommunicationCreateTemplate.QueryParams, + ToolsOzoneCommunicationCreateTemplate.HandlerInput, + ToolsOzoneCommunicationCreateTemplate.HandlerOutput + >, + ) { + const nsid = "tools.ozone.communication.createTemplate"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listTemplates( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneCommunicationListTemplates.QueryParams, + ToolsOzoneCommunicationListTemplates.HandlerInput, + ToolsOzoneCommunicationListTemplates.HandlerOutput + >, + ) { + const nsid = "tools.ozone.communication.listTemplates"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteTemplate( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneCommunicationDeleteTemplate.QueryParams, + ToolsOzoneCommunicationDeleteTemplate.HandlerInput, + ToolsOzoneCommunicationDeleteTemplate.HandlerOutput + >, + ) { + const nsid = "tools.ozone.communication.deleteTemplate"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneSetNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + addValues( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetAddValues.QueryParams, + ToolsOzoneSetAddValues.HandlerInput, + ToolsOzoneSetAddValues.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.addValues"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getValues( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetGetValues.QueryParams, + ToolsOzoneSetGetValues.HandlerInput, + ToolsOzoneSetGetValues.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.getValues"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteSet( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetDeleteSet.QueryParams, + ToolsOzoneSetDeleteSet.HandlerInput, + ToolsOzoneSetDeleteSet.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.deleteSet"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + upsertSet( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetUpsertSet.QueryParams, + ToolsOzoneSetUpsertSet.HandlerInput, + ToolsOzoneSetUpsertSet.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.upsertSet"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteValues( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetDeleteValues.QueryParams, + ToolsOzoneSetDeleteValues.HandlerInput, + ToolsOzoneSetDeleteValues.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.deleteValues"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + querySets( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSetQuerySets.QueryParams, + ToolsOzoneSetQuerySets.HandlerInput, + ToolsOzoneSetQuerySets.HandlerOutput + >, + ) { + const nsid = "tools.ozone.set.querySets"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneSettingNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + listOptions( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSettingListOptions.QueryParams, + ToolsOzoneSettingListOptions.HandlerInput, + ToolsOzoneSettingListOptions.HandlerOutput + >, + ) { + const nsid = "tools.ozone.setting.listOptions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + removeOptions( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSettingRemoveOptions.QueryParams, + ToolsOzoneSettingRemoveOptions.HandlerInput, + ToolsOzoneSettingRemoveOptions.HandlerOutput + >, + ) { + const nsid = "tools.ozone.setting.removeOptions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + upsertOption( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneSettingUpsertOption.QueryParams, + ToolsOzoneSettingUpsertOption.HandlerInput, + ToolsOzoneSettingUpsertOption.HandlerOutput + >, + ) { + const nsid = "tools.ozone.setting.upsertOption"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ToolsOzoneModerationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getReporterStats( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetReporterStats.QueryParams, + ToolsOzoneModerationGetReporterStats.HandlerInput, + ToolsOzoneModerationGetReporterStats.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getReporterStats"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + queryStatuses( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationQueryStatuses.QueryParams, + ToolsOzoneModerationQueryStatuses.HandlerInput, + ToolsOzoneModerationQueryStatuses.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.queryStatuses"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRepo( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetRepo.QueryParams, + ToolsOzoneModerationGetRepo.HandlerInput, + ToolsOzoneModerationGetRepo.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getRepo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRecords( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetRecords.QueryParams, + ToolsOzoneModerationGetRecords.HandlerInput, + ToolsOzoneModerationGetRecords.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getRecords"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getEvent( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetEvent.QueryParams, + ToolsOzoneModerationGetEvent.HandlerInput, + ToolsOzoneModerationGetEvent.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getEvent"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + queryEvents( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationQueryEvents.QueryParams, + ToolsOzoneModerationQueryEvents.HandlerInput, + ToolsOzoneModerationQueryEvents.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.queryEvents"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRecord( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetRecord.QueryParams, + ToolsOzoneModerationGetRecord.HandlerInput, + ToolsOzoneModerationGetRecord.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + emitEvent( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationEmitEvent.QueryParams, + ToolsOzoneModerationEmitEvent.HandlerInput, + ToolsOzoneModerationEmitEvent.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.emitEvent"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchRepos( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationSearchRepos.QueryParams, + ToolsOzoneModerationSearchRepos.HandlerInput, + ToolsOzoneModerationSearchRepos.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.searchRepos"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRepos( + cfg: MethodConfigOrHandler< + A, + ToolsOzoneModerationGetRepos.QueryParams, + ToolsOzoneModerationGetRepos.HandlerInput, + ToolsOzoneModerationGetRepos.HandlerOutput + >, + ) { + const nsid = "tools.ozone.moderation.getRepos"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppNS { + _server: Server; + bsky: AppBskyNS; + + constructor(server: Server) { + this._server = server; + this.bsky = new AppBskyNS(server); + } +} + +export class AppBskyNS { + _server: Server; + video: AppBskyVideoNS; + embed: AppBskyEmbedNS; + notification: AppBskyNotificationNS; + unspecced: AppBskyUnspeccedNS; + graph: AppBskyGraphNS; + feed: AppBskyFeedNS; + richtext: AppBskyRichtextNS; + actor: AppBskyActorNS; + labeler: AppBskyLabelerNS; + + constructor(server: Server) { + this._server = server; + this.video = new AppBskyVideoNS(server); + this.embed = new AppBskyEmbedNS(server); + this.notification = new AppBskyNotificationNS(server); + this.unspecced = new AppBskyUnspeccedNS(server); + this.graph = new AppBskyGraphNS(server); + this.feed = new AppBskyFeedNS(server); + this.richtext = new AppBskyRichtextNS(server); + this.actor = new AppBskyActorNS(server); + this.labeler = new AppBskyLabelerNS(server); + } +} + +export class AppBskyVideoNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + uploadVideo( + cfg: MethodConfigOrHandler< + A, + AppBskyVideoUploadVideo.QueryParams, + AppBskyVideoUploadVideo.HandlerInput, + AppBskyVideoUploadVideo.HandlerOutput + >, + ) { + const nsid = "app.bsky.video.uploadVideo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getJobStatus( + cfg: MethodConfigOrHandler< + A, + AppBskyVideoGetJobStatus.QueryParams, + AppBskyVideoGetJobStatus.HandlerInput, + AppBskyVideoGetJobStatus.HandlerOutput + >, + ) { + const nsid = "app.bsky.video.getJobStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getUploadLimits( + cfg: MethodConfigOrHandler< + A, + AppBskyVideoGetUploadLimits.QueryParams, + AppBskyVideoGetUploadLimits.HandlerInput, + AppBskyVideoGetUploadLimits.HandlerOutput + >, + ) { + const nsid = "app.bsky.video.getUploadLimits"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyEmbedNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } +} + +export class AppBskyNotificationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + registerPush( + cfg: MethodConfigOrHandler< + A, + AppBskyNotificationRegisterPush.QueryParams, + AppBskyNotificationRegisterPush.HandlerInput, + AppBskyNotificationRegisterPush.HandlerOutput + >, + ) { + const nsid = "app.bsky.notification.registerPush"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + putPreferences( + cfg: MethodConfigOrHandler< + A, + AppBskyNotificationPutPreferences.QueryParams, + AppBskyNotificationPutPreferences.HandlerInput, + AppBskyNotificationPutPreferences.HandlerOutput + >, + ) { + const nsid = "app.bsky.notification.putPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateSeen( + cfg: MethodConfigOrHandler< + A, + AppBskyNotificationUpdateSeen.QueryParams, + AppBskyNotificationUpdateSeen.HandlerInput, + AppBskyNotificationUpdateSeen.HandlerOutput + >, + ) { + const nsid = "app.bsky.notification.updateSeen"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listNotifications( + cfg: MethodConfigOrHandler< + A, + AppBskyNotificationListNotifications.QueryParams, + AppBskyNotificationListNotifications.HandlerInput, + AppBskyNotificationListNotifications.HandlerOutput + >, + ) { + const nsid = "app.bsky.notification.listNotifications"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getUnreadCount( + cfg: MethodConfigOrHandler< + A, + AppBskyNotificationGetUnreadCount.QueryParams, + AppBskyNotificationGetUnreadCount.HandlerInput, + AppBskyNotificationGetUnreadCount.HandlerOutput + >, + ) { + const nsid = "app.bsky.notification.getUnreadCount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyUnspeccedNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + searchStarterPacksSkeleton( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedSearchStarterPacksSkeleton.QueryParams, + AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerInput, + AppBskyUnspeccedSearchStarterPacksSkeleton.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.searchStarterPacksSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchActorsSkeleton( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedSearchActorsSkeleton.QueryParams, + AppBskyUnspeccedSearchActorsSkeleton.HandlerInput, + AppBskyUnspeccedSearchActorsSkeleton.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.searchActorsSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestionsSkeleton( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedGetSuggestionsSkeleton.QueryParams, + AppBskyUnspeccedGetSuggestionsSkeleton.HandlerInput, + AppBskyUnspeccedGetSuggestionsSkeleton.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.getSuggestionsSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchPostsSkeleton( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedSearchPostsSkeleton.QueryParams, + AppBskyUnspeccedSearchPostsSkeleton.HandlerInput, + AppBskyUnspeccedSearchPostsSkeleton.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.searchPostsSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPopularFeedGenerators( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedGetPopularFeedGenerators.QueryParams, + AppBskyUnspeccedGetPopularFeedGenerators.HandlerInput, + AppBskyUnspeccedGetPopularFeedGenerators.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.getPopularFeedGenerators"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getTrendingTopics( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedGetTrendingTopics.QueryParams, + AppBskyUnspeccedGetTrendingTopics.HandlerInput, + AppBskyUnspeccedGetTrendingTopics.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.getTrendingTopics"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getTaggedSuggestions( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedGetTaggedSuggestions.QueryParams, + AppBskyUnspeccedGetTaggedSuggestions.HandlerInput, + AppBskyUnspeccedGetTaggedSuggestions.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.getTaggedSuggestions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getConfig( + cfg: MethodConfigOrHandler< + A, + AppBskyUnspeccedGetConfig.QueryParams, + AppBskyUnspeccedGetConfig.HandlerInput, + AppBskyUnspeccedGetConfig.HandlerOutput + >, + ) { + const nsid = "app.bsky.unspecced.getConfig"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyGraphNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getStarterPacks( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetStarterPacks.QueryParams, + AppBskyGraphGetStarterPacks.HandlerInput, + AppBskyGraphGetStarterPacks.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getStarterPacks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestedFollowsByActor( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetSuggestedFollowsByActor.QueryParams, + AppBskyGraphGetSuggestedFollowsByActor.HandlerInput, + AppBskyGraphGetSuggestedFollowsByActor.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getSuggestedFollowsByActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteActorList( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphUnmuteActorList.QueryParams, + AppBskyGraphUnmuteActorList.HandlerInput, + AppBskyGraphUnmuteActorList.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.unmuteActorList"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getListBlocks( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetListBlocks.QueryParams, + AppBskyGraphGetListBlocks.HandlerInput, + AppBskyGraphGetListBlocks.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getListBlocks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getStarterPack( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetStarterPack.QueryParams, + AppBskyGraphGetStarterPack.HandlerInput, + AppBskyGraphGetStarterPack.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getStarterPack"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteActorList( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphMuteActorList.QueryParams, + AppBskyGraphMuteActorList.HandlerInput, + AppBskyGraphMuteActorList.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.muteActorList"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteThread( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphMuteThread.QueryParams, + AppBskyGraphMuteThread.HandlerInput, + AppBskyGraphMuteThread.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.muteThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchStarterPacks( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphSearchStarterPacks.QueryParams, + AppBskyGraphSearchStarterPacks.HandlerInput, + AppBskyGraphSearchStarterPacks.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.searchStarterPacks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getActorStarterPacks( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetActorStarterPacks.QueryParams, + AppBskyGraphGetActorStarterPacks.HandlerInput, + AppBskyGraphGetActorStarterPacks.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getActorStarterPacks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getLists( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetLists.QueryParams, + AppBskyGraphGetLists.HandlerInput, + AppBskyGraphGetLists.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getLists"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFollowers( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetFollowers.QueryParams, + AppBskyGraphGetFollowers.HandlerInput, + AppBskyGraphGetFollowers.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getFollowers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteThread( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphUnmuteThread.QueryParams, + AppBskyGraphUnmuteThread.HandlerInput, + AppBskyGraphUnmuteThread.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.unmuteThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteActor( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphMuteActor.QueryParams, + AppBskyGraphMuteActor.HandlerInput, + AppBskyGraphMuteActor.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.muteActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getMutes( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetMutes.QueryParams, + AppBskyGraphGetMutes.HandlerInput, + AppBskyGraphGetMutes.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getMutes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getKnownFollowers( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetKnownFollowers.QueryParams, + AppBskyGraphGetKnownFollowers.HandlerInput, + AppBskyGraphGetKnownFollowers.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getKnownFollowers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getListMutes( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetListMutes.QueryParams, + AppBskyGraphGetListMutes.HandlerInput, + AppBskyGraphGetListMutes.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getListMutes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFollows( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetFollows.QueryParams, + AppBskyGraphGetFollows.HandlerInput, + AppBskyGraphGetFollows.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getFollows"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getBlocks( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetBlocks.QueryParams, + AppBskyGraphGetBlocks.HandlerInput, + AppBskyGraphGetBlocks.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getBlocks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRelationships( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetRelationships.QueryParams, + AppBskyGraphGetRelationships.HandlerInput, + AppBskyGraphGetRelationships.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getRelationships"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteActor( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphUnmuteActor.QueryParams, + AppBskyGraphUnmuteActor.HandlerInput, + AppBskyGraphUnmuteActor.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.unmuteActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getList( + cfg: MethodConfigOrHandler< + A, + AppBskyGraphGetList.QueryParams, + AppBskyGraphGetList.HandlerInput, + AppBskyGraphGetList.HandlerOutput + >, + ) { + const nsid = "app.bsky.graph.getList"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyFeedNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + sendInteractions( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedSendInteractions.QueryParams, + AppBskyFeedSendInteractions.HandlerInput, + AppBskyFeedSendInteractions.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.sendInteractions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedGenerators( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetFeedGenerators.QueryParams, + AppBskyFeedGetFeedGenerators.HandlerInput, + AppBskyFeedGetFeedGenerators.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getFeedGenerators"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getTimeline( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetTimeline.QueryParams, + AppBskyFeedGetTimeline.HandlerInput, + AppBskyFeedGetTimeline.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getTimeline"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedGenerator( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetFeedGenerator.QueryParams, + AppBskyFeedGetFeedGenerator.HandlerInput, + AppBskyFeedGetFeedGenerator.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getFeedGenerator"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAuthorFeed( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetAuthorFeed.QueryParams, + AppBskyFeedGetAuthorFeed.HandlerInput, + AppBskyFeedGetAuthorFeed.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getAuthorFeed"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getLikes( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetLikes.QueryParams, + AppBskyFeedGetLikes.HandlerInput, + AppBskyFeedGetLikes.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getLikes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPostThread( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetPostThread.QueryParams, + AppBskyFeedGetPostThread.HandlerInput, + AppBskyFeedGetPostThread.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getPostThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getActorLikes( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetActorLikes.QueryParams, + AppBskyFeedGetActorLikes.HandlerInput, + AppBskyFeedGetActorLikes.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getActorLikes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRepostedBy( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetRepostedBy.QueryParams, + AppBskyFeedGetRepostedBy.HandlerInput, + AppBskyFeedGetRepostedBy.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getRepostedBy"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + describeFeedGenerator( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedDescribeFeedGenerator.QueryParams, + AppBskyFeedDescribeFeedGenerator.HandlerInput, + AppBskyFeedDescribeFeedGenerator.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.describeFeedGenerator"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchPosts( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedSearchPosts.QueryParams, + AppBskyFeedSearchPosts.HandlerInput, + AppBskyFeedSearchPosts.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.searchPosts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPosts( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetPosts.QueryParams, + AppBskyFeedGetPosts.HandlerInput, + AppBskyFeedGetPosts.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getPosts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeed( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetFeed.QueryParams, + AppBskyFeedGetFeed.HandlerInput, + AppBskyFeedGetFeed.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getFeed"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getQuotes( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetQuotes.QueryParams, + AppBskyFeedGetQuotes.HandlerInput, + AppBskyFeedGetQuotes.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getQuotes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedSkeleton( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetFeedSkeleton.QueryParams, + AppBskyFeedGetFeedSkeleton.HandlerInput, + AppBskyFeedGetFeedSkeleton.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getFeedSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getListFeed( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetListFeed.QueryParams, + AppBskyFeedGetListFeed.HandlerInput, + AppBskyFeedGetListFeed.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getListFeed"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestedFeeds( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetSuggestedFeeds.QueryParams, + AppBskyFeedGetSuggestedFeeds.HandlerInput, + AppBskyFeedGetSuggestedFeeds.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getSuggestedFeeds"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getActorFeeds( + cfg: MethodConfigOrHandler< + A, + AppBskyFeedGetActorFeeds.QueryParams, + AppBskyFeedGetActorFeeds.HandlerInput, + AppBskyFeedGetActorFeeds.HandlerOutput + >, + ) { + const nsid = "app.bsky.feed.getActorFeeds"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyRichtextNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } +} + +export class AppBskyActorNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + searchActorsTypeahead( + cfg: MethodConfigOrHandler< + A, + AppBskyActorSearchActorsTypeahead.QueryParams, + AppBskyActorSearchActorsTypeahead.HandlerInput, + AppBskyActorSearchActorsTypeahead.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.searchActorsTypeahead"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + putPreferences( + cfg: MethodConfigOrHandler< + A, + AppBskyActorPutPreferences.QueryParams, + AppBskyActorPutPreferences.HandlerInput, + AppBskyActorPutPreferences.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.putPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getProfile( + cfg: MethodConfigOrHandler< + A, + AppBskyActorGetProfile.QueryParams, + AppBskyActorGetProfile.HandlerInput, + AppBskyActorGetProfile.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.getProfile"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestions( + cfg: MethodConfigOrHandler< + A, + AppBskyActorGetSuggestions.QueryParams, + AppBskyActorGetSuggestions.HandlerInput, + AppBskyActorGetSuggestions.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.getSuggestions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchActors( + cfg: MethodConfigOrHandler< + A, + AppBskyActorSearchActors.QueryParams, + AppBskyActorSearchActors.HandlerInput, + AppBskyActorSearchActors.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.searchActors"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getProfiles( + cfg: MethodConfigOrHandler< + A, + AppBskyActorGetProfiles.QueryParams, + AppBskyActorGetProfiles.HandlerInput, + AppBskyActorGetProfiles.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.getProfiles"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPreferences( + cfg: MethodConfigOrHandler< + A, + AppBskyActorGetPreferences.QueryParams, + AppBskyActorGetPreferences.HandlerInput, + AppBskyActorGetPreferences.HandlerOutput + >, + ) { + const nsid = "app.bsky.actor.getPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class AppBskyLabelerNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getServices( + cfg: MethodConfigOrHandler< + A, + AppBskyLabelerGetServices.QueryParams, + AppBskyLabelerGetServices.HandlerInput, + AppBskyLabelerGetServices.HandlerOutput + >, + ) { + const nsid = "app.bsky.labeler.getServices"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ChatNS { + _server: Server; + bsky: ChatBskyNS; + + constructor(server: Server) { + this._server = server; + this.bsky = new ChatBskyNS(server); + } +} + +export class ChatBskyNS { + _server: Server; + convo: ChatBskyConvoNS; + actor: ChatBskyActorNS; + moderation: ChatBskyModerationNS; + + constructor(server: Server) { + this._server = server; + this.convo = new ChatBskyConvoNS(server); + this.actor = new ChatBskyActorNS(server); + this.moderation = new ChatBskyModerationNS(server); + } +} + +export class ChatBskyConvoNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + listConvos( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoListConvos.QueryParams, + ChatBskyConvoListConvos.HandlerInput, + ChatBskyConvoListConvos.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.listConvos"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteConvo( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoUnmuteConvo.QueryParams, + ChatBskyConvoUnmuteConvo.HandlerInput, + ChatBskyConvoUnmuteConvo.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.unmuteConvo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getConvoAvailability( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoGetConvoAvailability.QueryParams, + ChatBskyConvoGetConvoAvailability.HandlerInput, + ChatBskyConvoGetConvoAvailability.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.getConvoAvailability"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getLog( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoGetLog.QueryParams, + ChatBskyConvoGetLog.HandlerInput, + ChatBskyConvoGetLog.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.getLog"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + sendMessage( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoSendMessage.QueryParams, + ChatBskyConvoSendMessage.HandlerInput, + ChatBskyConvoSendMessage.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.sendMessage"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + leaveConvo( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoLeaveConvo.QueryParams, + ChatBskyConvoLeaveConvo.HandlerInput, + ChatBskyConvoLeaveConvo.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.leaveConvo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + acceptConvo( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoAcceptConvo.QueryParams, + ChatBskyConvoAcceptConvo.HandlerInput, + ChatBskyConvoAcceptConvo.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.acceptConvo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteConvo( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoMuteConvo.QueryParams, + ChatBskyConvoMuteConvo.HandlerInput, + ChatBskyConvoMuteConvo.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.muteConvo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteMessageForSelf( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoDeleteMessageForSelf.QueryParams, + ChatBskyConvoDeleteMessageForSelf.HandlerInput, + ChatBskyConvoDeleteMessageForSelf.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.deleteMessageForSelf"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateRead( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoUpdateRead.QueryParams, + ChatBskyConvoUpdateRead.HandlerInput, + ChatBskyConvoUpdateRead.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.updateRead"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateAllRead( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoUpdateAllRead.QueryParams, + ChatBskyConvoUpdateAllRead.HandlerInput, + ChatBskyConvoUpdateAllRead.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.updateAllRead"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getConvo( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoGetConvo.QueryParams, + ChatBskyConvoGetConvo.HandlerInput, + ChatBskyConvoGetConvo.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.getConvo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getMessages( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoGetMessages.QueryParams, + ChatBskyConvoGetMessages.HandlerInput, + ChatBskyConvoGetMessages.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.getMessages"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getConvoForMembers( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoGetConvoForMembers.QueryParams, + ChatBskyConvoGetConvoForMembers.HandlerInput, + ChatBskyConvoGetConvoForMembers.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.getConvoForMembers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + sendMessageBatch( + cfg: MethodConfigOrHandler< + A, + ChatBskyConvoSendMessageBatch.QueryParams, + ChatBskyConvoSendMessageBatch.HandlerInput, + ChatBskyConvoSendMessageBatch.HandlerOutput + >, + ) { + const nsid = "chat.bsky.convo.sendMessageBatch"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ChatBskyActorNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + exportAccountData( + cfg: MethodConfigOrHandler< + A, + ChatBskyActorExportAccountData.QueryParams, + ChatBskyActorExportAccountData.HandlerInput, + ChatBskyActorExportAccountData.HandlerOutput + >, + ) { + const nsid = "chat.bsky.actor.exportAccountData"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteAccount( + cfg: MethodConfigOrHandler< + A, + ChatBskyActorDeleteAccount.QueryParams, + ChatBskyActorDeleteAccount.HandlerInput, + ChatBskyActorDeleteAccount.HandlerOutput + >, + ) { + const nsid = "chat.bsky.actor.deleteAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ChatBskyModerationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getActorMetadata( + cfg: MethodConfigOrHandler< + A, + ChatBskyModerationGetActorMetadata.QueryParams, + ChatBskyModerationGetActorMetadata.HandlerInput, + ChatBskyModerationGetActorMetadata.HandlerOutput + >, + ) { + const nsid = "chat.bsky.moderation.getActorMetadata"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getMessageContext( + cfg: MethodConfigOrHandler< + A, + ChatBskyModerationGetMessageContext.QueryParams, + ChatBskyModerationGetMessageContext.HandlerInput, + ChatBskyModerationGetMessageContext.HandlerOutput + >, + ) { + const nsid = "chat.bsky.moderation.getMessageContext"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateActorAccess( + cfg: MethodConfigOrHandler< + A, + ChatBskyModerationUpdateActorAccess.QueryParams, + ChatBskyModerationUpdateActorAccess.HandlerInput, + ChatBskyModerationUpdateActorAccess.HandlerOutput + >, + ) { + const nsid = "chat.bsky.moderation.updateActorAccess"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoNS { + _server: Server; + sprk: SoSprkNS; + + constructor(server: Server) { + this._server = server; + this.sprk = new SoSprkNS(server); + } +} + +export class SoSprkNS { + _server: Server; + video: SoSprkVideoNS; + notification: SoSprkNotificationNS; + graph: SoSprkGraphNS; + feed: SoSprkFeedNS; + richtext: SoSprkRichtextNS; + sound: SoSprkSoundNS; + actor: SoSprkActorNS; + story: SoSprkStoryNS; + labeler: SoSprkLabelerNS; + media: SoSprkMediaNS; + + constructor(server: Server) { + this._server = server; + this.video = new SoSprkVideoNS(server); + this.notification = new SoSprkNotificationNS(server); + this.graph = new SoSprkGraphNS(server); + this.feed = new SoSprkFeedNS(server); + this.richtext = new SoSprkRichtextNS(server); + this.sound = new SoSprkSoundNS(server); + this.actor = new SoSprkActorNS(server); + this.story = new SoSprkStoryNS(server); + this.labeler = new SoSprkLabelerNS(server); + this.media = new SoSprkMediaNS(server); + } +} + +export class SoSprkVideoNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + uploadVideo( + cfg: MethodConfigOrHandler< + A, + SoSprkVideoUploadVideo.QueryParams, + SoSprkVideoUploadVideo.HandlerInput, + SoSprkVideoUploadVideo.HandlerOutput + >, + ) { + const nsid = "so.sprk.video.uploadVideo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getJobStatus( + cfg: MethodConfigOrHandler< + A, + SoSprkVideoGetJobStatus.QueryParams, + SoSprkVideoGetJobStatus.HandlerInput, + SoSprkVideoGetJobStatus.HandlerOutput + >, + ) { + const nsid = "so.sprk.video.getJobStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getUploadLimits( + cfg: MethodConfigOrHandler< + A, + SoSprkVideoGetUploadLimits.QueryParams, + SoSprkVideoGetUploadLimits.HandlerInput, + SoSprkVideoGetUploadLimits.HandlerOutput + >, + ) { + const nsid = "so.sprk.video.getUploadLimits"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkNotificationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + registerPush( + cfg: MethodConfigOrHandler< + A, + SoSprkNotificationRegisterPush.QueryParams, + SoSprkNotificationRegisterPush.HandlerInput, + SoSprkNotificationRegisterPush.HandlerOutput + >, + ) { + const nsid = "so.sprk.notification.registerPush"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + putPreferences( + cfg: MethodConfigOrHandler< + A, + SoSprkNotificationPutPreferences.QueryParams, + SoSprkNotificationPutPreferences.HandlerInput, + SoSprkNotificationPutPreferences.HandlerOutput + >, + ) { + const nsid = "so.sprk.notification.putPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateSeen( + cfg: MethodConfigOrHandler< + A, + SoSprkNotificationUpdateSeen.QueryParams, + SoSprkNotificationUpdateSeen.HandlerInput, + SoSprkNotificationUpdateSeen.HandlerOutput + >, + ) { + const nsid = "so.sprk.notification.updateSeen"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listNotifications( + cfg: MethodConfigOrHandler< + A, + SoSprkNotificationListNotifications.QueryParams, + SoSprkNotificationListNotifications.HandlerInput, + SoSprkNotificationListNotifications.HandlerOutput + >, + ) { + const nsid = "so.sprk.notification.listNotifications"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getUnreadCount( + cfg: MethodConfigOrHandler< + A, + SoSprkNotificationGetUnreadCount.QueryParams, + SoSprkNotificationGetUnreadCount.HandlerInput, + SoSprkNotificationGetUnreadCount.HandlerOutput + >, + ) { + const nsid = "so.sprk.notification.getUnreadCount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkGraphNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getSuggestedFollowsByActor( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetSuggestedFollowsByActor.QueryParams, + SoSprkGraphGetSuggestedFollowsByActor.HandlerInput, + SoSprkGraphGetSuggestedFollowsByActor.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getSuggestedFollowsByActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteThread( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphMuteThread.QueryParams, + SoSprkGraphMuteThread.HandlerInput, + SoSprkGraphMuteThread.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.muteThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFollowers( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetFollowers.QueryParams, + SoSprkGraphGetFollowers.HandlerInput, + SoSprkGraphGetFollowers.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getFollowers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteThread( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphUnmuteThread.QueryParams, + SoSprkGraphUnmuteThread.HandlerInput, + SoSprkGraphUnmuteThread.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.unmuteThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + muteActor( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphMuteActor.QueryParams, + SoSprkGraphMuteActor.HandlerInput, + SoSprkGraphMuteActor.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.muteActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getMutes( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetMutes.QueryParams, + SoSprkGraphGetMutes.HandlerInput, + SoSprkGraphGetMutes.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getMutes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getKnownFollowers( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetKnownFollowers.QueryParams, + SoSprkGraphGetKnownFollowers.HandlerInput, + SoSprkGraphGetKnownFollowers.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getKnownFollowers"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFollows( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetFollows.QueryParams, + SoSprkGraphGetFollows.HandlerInput, + SoSprkGraphGetFollows.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getFollows"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getBlocks( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetBlocks.QueryParams, + SoSprkGraphGetBlocks.HandlerInput, + SoSprkGraphGetBlocks.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getBlocks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRelationships( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphGetRelationships.QueryParams, + SoSprkGraphGetRelationships.HandlerInput, + SoSprkGraphGetRelationships.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.getRelationships"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + unmuteActor( + cfg: MethodConfigOrHandler< + A, + SoSprkGraphUnmuteActor.QueryParams, + SoSprkGraphUnmuteActor.HandlerInput, + SoSprkGraphUnmuteActor.HandlerOutput + >, + ) { + const nsid = "so.sprk.graph.unmuteActor"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkFeedNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + sendInteractions( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedSendInteractions.QueryParams, + SoSprkFeedSendInteractions.HandlerInput, + SoSprkFeedSendInteractions.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.sendInteractions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedGenerators( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetFeedGenerators.QueryParams, + SoSprkFeedGetFeedGenerators.HandlerInput, + SoSprkFeedGetFeedGenerators.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getFeedGenerators"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getTimeline( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetTimeline.QueryParams, + SoSprkFeedGetTimeline.HandlerInput, + SoSprkFeedGetTimeline.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getTimeline"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedGenerator( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetFeedGenerator.QueryParams, + SoSprkFeedGetFeedGenerator.HandlerInput, + SoSprkFeedGetFeedGenerator.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getFeedGenerator"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAuthorFeed( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetAuthorFeed.QueryParams, + SoSprkFeedGetAuthorFeed.HandlerInput, + SoSprkFeedGetAuthorFeed.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getAuthorFeed"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getLikes( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetLikes.QueryParams, + SoSprkFeedGetLikes.HandlerInput, + SoSprkFeedGetLikes.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getLikes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPostThread( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetPostThread.QueryParams, + SoSprkFeedGetPostThread.HandlerInput, + SoSprkFeedGetPostThread.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getPostThread"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getActorLikes( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetActorLikes.QueryParams, + SoSprkFeedGetActorLikes.HandlerInput, + SoSprkFeedGetActorLikes.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getActorLikes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRepostedBy( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetRepostedBy.QueryParams, + SoSprkFeedGetRepostedBy.HandlerInput, + SoSprkFeedGetRepostedBy.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getRepostedBy"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + describeFeedGenerator( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedDescribeFeedGenerator.QueryParams, + SoSprkFeedDescribeFeedGenerator.HandlerInput, + SoSprkFeedDescribeFeedGenerator.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.describeFeedGenerator"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchPosts( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedSearchPosts.QueryParams, + SoSprkFeedSearchPosts.HandlerInput, + SoSprkFeedSearchPosts.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.searchPosts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPosts( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetPosts.QueryParams, + SoSprkFeedGetPosts.HandlerInput, + SoSprkFeedGetPosts.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getPosts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeed( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetFeed.QueryParams, + SoSprkFeedGetFeed.HandlerInput, + SoSprkFeedGetFeed.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getFeed"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getFeedSkeleton( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetFeedSkeleton.QueryParams, + SoSprkFeedGetFeedSkeleton.HandlerInput, + SoSprkFeedGetFeedSkeleton.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getFeedSkeleton"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestedFeeds( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetSuggestedFeeds.QueryParams, + SoSprkFeedGetSuggestedFeeds.HandlerInput, + SoSprkFeedGetSuggestedFeeds.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getSuggestedFeeds"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getActorFeeds( + cfg: MethodConfigOrHandler< + A, + SoSprkFeedGetActorFeeds.QueryParams, + SoSprkFeedGetActorFeeds.HandlerInput, + SoSprkFeedGetActorFeeds.HandlerOutput + >, + ) { + const nsid = "so.sprk.feed.getActorFeeds"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkRichtextNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } +} + +export class SoSprkSoundNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getActorAudios( + cfg: MethodConfigOrHandler< + A, + SoSprkSoundGetActorAudios.QueryParams, + SoSprkSoundGetActorAudios.HandlerInput, + SoSprkSoundGetActorAudios.HandlerOutput + >, + ) { + const nsid = "so.sprk.sound.getActorAudios"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAudioPosts( + cfg: MethodConfigOrHandler< + A, + SoSprkSoundGetAudioPosts.QueryParams, + SoSprkSoundGetAudioPosts.HandlerInput, + SoSprkSoundGetAudioPosts.HandlerOutput + >, + ) { + const nsid = "so.sprk.sound.getAudioPosts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAudios( + cfg: MethodConfigOrHandler< + A, + SoSprkSoundGetAudios.QueryParams, + SoSprkSoundGetAudios.HandlerInput, + SoSprkSoundGetAudios.HandlerOutput + >, + ) { + const nsid = "so.sprk.sound.getAudios"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getTrendingAudios( + cfg: MethodConfigOrHandler< + A, + SoSprkSoundGetTrendingAudios.QueryParams, + SoSprkSoundGetTrendingAudios.HandlerInput, + SoSprkSoundGetTrendingAudios.HandlerOutput + >, + ) { + const nsid = "so.sprk.sound.getTrendingAudios"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkActorNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + searchActorsTypeahead( + cfg: MethodConfigOrHandler< + A, + SoSprkActorSearchActorsTypeahead.QueryParams, + SoSprkActorSearchActorsTypeahead.HandlerInput, + SoSprkActorSearchActorsTypeahead.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.searchActorsTypeahead"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + putPreferences( + cfg: MethodConfigOrHandler< + A, + SoSprkActorPutPreferences.QueryParams, + SoSprkActorPutPreferences.HandlerInput, + SoSprkActorPutPreferences.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.putPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getProfile( + cfg: MethodConfigOrHandler< + A, + SoSprkActorGetProfile.QueryParams, + SoSprkActorGetProfile.HandlerInput, + SoSprkActorGetProfile.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.getProfile"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSuggestions( + cfg: MethodConfigOrHandler< + A, + SoSprkActorGetSuggestions.QueryParams, + SoSprkActorGetSuggestions.HandlerInput, + SoSprkActorGetSuggestions.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.getSuggestions"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchActors( + cfg: MethodConfigOrHandler< + A, + SoSprkActorSearchActors.QueryParams, + SoSprkActorSearchActors.HandlerInput, + SoSprkActorSearchActors.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.searchActors"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getProfiles( + cfg: MethodConfigOrHandler< + A, + SoSprkActorGetProfiles.QueryParams, + SoSprkActorGetProfiles.HandlerInput, + SoSprkActorGetProfiles.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.getProfiles"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getPreferences( + cfg: MethodConfigOrHandler< + A, + SoSprkActorGetPreferences.QueryParams, + SoSprkActorGetPreferences.HandlerInput, + SoSprkActorGetPreferences.HandlerOutput + >, + ) { + const nsid = "so.sprk.actor.getPreferences"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkStoryNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getTimeline( + cfg: MethodConfigOrHandler< + A, + SoSprkStoryGetTimeline.QueryParams, + SoSprkStoryGetTimeline.HandlerInput, + SoSprkStoryGetTimeline.HandlerOutput + >, + ) { + const nsid = "so.sprk.story.getTimeline"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getStories( + cfg: MethodConfigOrHandler< + A, + SoSprkStoryGetStories.QueryParams, + SoSprkStoryGetStories.HandlerInput, + SoSprkStoryGetStories.HandlerOutput + >, + ) { + const nsid = "so.sprk.story.getStories"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkLabelerNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getServices( + cfg: MethodConfigOrHandler< + A, + SoSprkLabelerGetServices.QueryParams, + SoSprkLabelerGetServices.HandlerInput, + SoSprkLabelerGetServices.HandlerOutput + >, + ) { + const nsid = "so.sprk.labeler.getServices"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class SoSprkMediaNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } +} + +export class ComNS { + _server: Server; + atproto: ComAtprotoNS; + + constructor(server: Server) { + this._server = server; + this.atproto = new ComAtprotoNS(server); + } +} + +export class ComAtprotoNS { + _server: Server; + temp: ComAtprotoTempNS; + identity: ComAtprotoIdentityNS; + admin: ComAtprotoAdminNS; + label: ComAtprotoLabelNS; + server: ComAtprotoServerNS; + lexicon: ComAtprotoLexiconNS; + sync: ComAtprotoSyncNS; + repo: ComAtprotoRepoNS; + moderation: ComAtprotoModerationNS; + + constructor(server: Server) { + this._server = server; + this.temp = new ComAtprotoTempNS(server); + this.identity = new ComAtprotoIdentityNS(server); + this.admin = new ComAtprotoAdminNS(server); + this.label = new ComAtprotoLabelNS(server); + this.server = new ComAtprotoServerNS(server); + this.lexicon = new ComAtprotoLexiconNS(server); + this.sync = new ComAtprotoSyncNS(server); + this.repo = new ComAtprotoRepoNS(server); + this.moderation = new ComAtprotoModerationNS(server); + } +} + +export class ComAtprotoTempNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + addReservedHandle( + cfg: MethodConfigOrHandler< + A, + ComAtprotoTempAddReservedHandle.QueryParams, + ComAtprotoTempAddReservedHandle.HandlerInput, + ComAtprotoTempAddReservedHandle.HandlerOutput + >, + ) { + const nsid = "com.atproto.temp.addReservedHandle"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + checkSignupQueue( + cfg: MethodConfigOrHandler< + A, + ComAtprotoTempCheckSignupQueue.QueryParams, + ComAtprotoTempCheckSignupQueue.HandlerInput, + ComAtprotoTempCheckSignupQueue.HandlerOutput + >, + ) { + const nsid = "com.atproto.temp.checkSignupQueue"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestPhoneVerification( + cfg: MethodConfigOrHandler< + A, + ComAtprotoTempRequestPhoneVerification.QueryParams, + ComAtprotoTempRequestPhoneVerification.HandlerInput, + ComAtprotoTempRequestPhoneVerification.HandlerOutput + >, + ) { + const nsid = "com.atproto.temp.requestPhoneVerification"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + fetchLabels( + cfg: MethodConfigOrHandler< + A, + ComAtprotoTempFetchLabels.QueryParams, + ComAtprotoTempFetchLabels.HandlerInput, + ComAtprotoTempFetchLabels.HandlerOutput + >, + ) { + const nsid = "com.atproto.temp.fetchLabels"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoIdentityNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + updateHandle( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentityUpdateHandle.QueryParams, + ComAtprotoIdentityUpdateHandle.HandlerInput, + ComAtprotoIdentityUpdateHandle.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.updateHandle"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + signPlcOperation( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentitySignPlcOperation.QueryParams, + ComAtprotoIdentitySignPlcOperation.HandlerInput, + ComAtprotoIdentitySignPlcOperation.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.signPlcOperation"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + submitPlcOperation( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentitySubmitPlcOperation.QueryParams, + ComAtprotoIdentitySubmitPlcOperation.HandlerInput, + ComAtprotoIdentitySubmitPlcOperation.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.submitPlcOperation"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + resolveHandle( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentityResolveHandle.QueryParams, + ComAtprotoIdentityResolveHandle.HandlerInput, + ComAtprotoIdentityResolveHandle.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.resolveHandle"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestPlcOperationSignature( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentityRequestPlcOperationSignature.QueryParams, + ComAtprotoIdentityRequestPlcOperationSignature.HandlerInput, + ComAtprotoIdentityRequestPlcOperationSignature.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.requestPlcOperationSignature"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRecommendedDidCredentials( + cfg: MethodConfigOrHandler< + A, + ComAtprotoIdentityGetRecommendedDidCredentials.QueryParams, + ComAtprotoIdentityGetRecommendedDidCredentials.HandlerInput, + ComAtprotoIdentityGetRecommendedDidCredentials.HandlerOutput + >, + ) { + const nsid = "com.atproto.identity.getRecommendedDidCredentials"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoAdminNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + updateAccountEmail( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminUpdateAccountEmail.QueryParams, + ComAtprotoAdminUpdateAccountEmail.HandlerInput, + ComAtprotoAdminUpdateAccountEmail.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.updateAccountEmail"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAccountInfo( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminGetAccountInfo.QueryParams, + ComAtprotoAdminGetAccountInfo.HandlerInput, + ComAtprotoAdminGetAccountInfo.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.getAccountInfo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSubjectStatus( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminGetSubjectStatus.QueryParams, + ComAtprotoAdminGetSubjectStatus.HandlerInput, + ComAtprotoAdminGetSubjectStatus.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.getSubjectStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + searchAccounts( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminSearchAccounts.QueryParams, + ComAtprotoAdminSearchAccounts.HandlerInput, + ComAtprotoAdminSearchAccounts.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.searchAccounts"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateAccountPassword( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminUpdateAccountPassword.QueryParams, + ComAtprotoAdminUpdateAccountPassword.HandlerInput, + ComAtprotoAdminUpdateAccountPassword.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.updateAccountPassword"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateAccountHandle( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminUpdateAccountHandle.QueryParams, + ComAtprotoAdminUpdateAccountHandle.HandlerInput, + ComAtprotoAdminUpdateAccountHandle.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.updateAccountHandle"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getInviteCodes( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminGetInviteCodes.QueryParams, + ComAtprotoAdminGetInviteCodes.HandlerInput, + ComAtprotoAdminGetInviteCodes.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.getInviteCodes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + enableAccountInvites( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminEnableAccountInvites.QueryParams, + ComAtprotoAdminEnableAccountInvites.HandlerInput, + ComAtprotoAdminEnableAccountInvites.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.enableAccountInvites"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + disableAccountInvites( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminDisableAccountInvites.QueryParams, + ComAtprotoAdminDisableAccountInvites.HandlerInput, + ComAtprotoAdminDisableAccountInvites.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.disableAccountInvites"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + disableInviteCodes( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminDisableInviteCodes.QueryParams, + ComAtprotoAdminDisableInviteCodes.HandlerInput, + ComAtprotoAdminDisableInviteCodes.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.disableInviteCodes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateSubjectStatus( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminUpdateSubjectStatus.QueryParams, + ComAtprotoAdminUpdateSubjectStatus.HandlerInput, + ComAtprotoAdminUpdateSubjectStatus.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.updateSubjectStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + sendEmail( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminSendEmail.QueryParams, + ComAtprotoAdminSendEmail.HandlerInput, + ComAtprotoAdminSendEmail.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.sendEmail"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAccountInfos( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminGetAccountInfos.QueryParams, + ComAtprotoAdminGetAccountInfos.HandlerInput, + ComAtprotoAdminGetAccountInfos.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.getAccountInfos"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteAccount( + cfg: MethodConfigOrHandler< + A, + ComAtprotoAdminDeleteAccount.QueryParams, + ComAtprotoAdminDeleteAccount.HandlerInput, + ComAtprotoAdminDeleteAccount.HandlerOutput + >, + ) { + const nsid = "com.atproto.admin.deleteAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoLabelNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + subscribeLabels( + cfg: StreamConfigOrHandler< + A, + ComAtprotoLabelSubscribeLabels.QueryParams, + ComAtprotoLabelSubscribeLabels.HandlerOutput + >, + ) { + const nsid = "com.atproto.label.subscribeLabels"; // @ts-ignore - dynamically generated + return this._server.xrpc.streamMethod(nsid, cfg); + } + + queryLabels( + cfg: MethodConfigOrHandler< + A, + ComAtprotoLabelQueryLabels.QueryParams, + ComAtprotoLabelQueryLabels.HandlerInput, + ComAtprotoLabelQueryLabels.HandlerOutput + >, + ) { + const nsid = "com.atproto.label.queryLabels"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoServerNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + requestEmailConfirmation( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRequestEmailConfirmation.QueryParams, + ComAtprotoServerRequestEmailConfirmation.HandlerInput, + ComAtprotoServerRequestEmailConfirmation.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.requestEmailConfirmation"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + reserveSigningKey( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerReserveSigningKey.QueryParams, + ComAtprotoServerReserveSigningKey.HandlerInput, + ComAtprotoServerReserveSigningKey.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.reserveSigningKey"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getServiceAuth( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerGetServiceAuth.QueryParams, + ComAtprotoServerGetServiceAuth.HandlerInput, + ComAtprotoServerGetServiceAuth.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.getServiceAuth"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getAccountInviteCodes( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerGetAccountInviteCodes.QueryParams, + ComAtprotoServerGetAccountInviteCodes.HandlerInput, + ComAtprotoServerGetAccountInviteCodes.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.getAccountInviteCodes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createSession( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCreateSession.QueryParams, + ComAtprotoServerCreateSession.HandlerInput, + ComAtprotoServerCreateSession.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.createSession"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listAppPasswords( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerListAppPasswords.QueryParams, + ComAtprotoServerListAppPasswords.HandlerInput, + ComAtprotoServerListAppPasswords.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.listAppPasswords"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createInviteCodes( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCreateInviteCodes.QueryParams, + ComAtprotoServerCreateInviteCodes.HandlerInput, + ComAtprotoServerCreateInviteCodes.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.createInviteCodes"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteSession( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerDeleteSession.QueryParams, + ComAtprotoServerDeleteSession.HandlerInput, + ComAtprotoServerDeleteSession.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.deleteSession"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + revokeAppPassword( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRevokeAppPassword.QueryParams, + ComAtprotoServerRevokeAppPassword.HandlerInput, + ComAtprotoServerRevokeAppPassword.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.revokeAppPassword"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createAppPassword( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCreateAppPassword.QueryParams, + ComAtprotoServerCreateAppPassword.HandlerInput, + ComAtprotoServerCreateAppPassword.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.createAppPassword"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + activateAccount( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerActivateAccount.QueryParams, + ComAtprotoServerActivateAccount.HandlerInput, + ComAtprotoServerActivateAccount.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.activateAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + describeServer( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerDescribeServer.QueryParams, + ComAtprotoServerDescribeServer.HandlerInput, + ComAtprotoServerDescribeServer.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.describeServer"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + confirmEmail( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerConfirmEmail.QueryParams, + ComAtprotoServerConfirmEmail.HandlerInput, + ComAtprotoServerConfirmEmail.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.confirmEmail"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getSession( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerGetSession.QueryParams, + ComAtprotoServerGetSession.HandlerInput, + ComAtprotoServerGetSession.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.getSession"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + refreshSession( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRefreshSession.QueryParams, + ComAtprotoServerRefreshSession.HandlerInput, + ComAtprotoServerRefreshSession.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.refreshSession"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deactivateAccount( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerDeactivateAccount.QueryParams, + ComAtprotoServerDeactivateAccount.HandlerInput, + ComAtprotoServerDeactivateAccount.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.deactivateAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + updateEmail( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerUpdateEmail.QueryParams, + ComAtprotoServerUpdateEmail.HandlerInput, + ComAtprotoServerUpdateEmail.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.updateEmail"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + resetPassword( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerResetPassword.QueryParams, + ComAtprotoServerResetPassword.HandlerInput, + ComAtprotoServerResetPassword.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.resetPassword"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + checkAccountStatus( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCheckAccountStatus.QueryParams, + ComAtprotoServerCheckAccountStatus.HandlerInput, + ComAtprotoServerCheckAccountStatus.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.checkAccountStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestEmailUpdate( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRequestEmailUpdate.QueryParams, + ComAtprotoServerRequestEmailUpdate.HandlerInput, + ComAtprotoServerRequestEmailUpdate.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.requestEmailUpdate"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestPasswordReset( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRequestPasswordReset.QueryParams, + ComAtprotoServerRequestPasswordReset.HandlerInput, + ComAtprotoServerRequestPasswordReset.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.requestPasswordReset"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestAccountDelete( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerRequestAccountDelete.QueryParams, + ComAtprotoServerRequestAccountDelete.HandlerInput, + ComAtprotoServerRequestAccountDelete.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.requestAccountDelete"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createAccount( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCreateAccount.QueryParams, + ComAtprotoServerCreateAccount.HandlerInput, + ComAtprotoServerCreateAccount.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.createAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteAccount( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerDeleteAccount.QueryParams, + ComAtprotoServerDeleteAccount.HandlerInput, + ComAtprotoServerDeleteAccount.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.deleteAccount"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createInviteCode( + cfg: MethodConfigOrHandler< + A, + ComAtprotoServerCreateInviteCode.QueryParams, + ComAtprotoServerCreateInviteCode.HandlerInput, + ComAtprotoServerCreateInviteCode.HandlerOutput + >, + ) { + const nsid = "com.atproto.server.createInviteCode"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoLexiconNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } +} + +export class ComAtprotoSyncNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + getHead( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetHead.QueryParams, + ComAtprotoSyncGetHead.HandlerInput, + ComAtprotoSyncGetHead.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getHead"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getBlob( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetBlob.QueryParams, + ComAtprotoSyncGetBlob.HandlerInput, + ComAtprotoSyncGetBlob.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getBlob"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRepo( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetRepo.QueryParams, + ComAtprotoSyncGetRepo.HandlerInput, + ComAtprotoSyncGetRepo.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getRepo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + notifyOfUpdate( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncNotifyOfUpdate.QueryParams, + ComAtprotoSyncNotifyOfUpdate.HandlerInput, + ComAtprotoSyncNotifyOfUpdate.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.notifyOfUpdate"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + requestCrawl( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncRequestCrawl.QueryParams, + ComAtprotoSyncRequestCrawl.HandlerInput, + ComAtprotoSyncRequestCrawl.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.requestCrawl"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listBlobs( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncListBlobs.QueryParams, + ComAtprotoSyncListBlobs.HandlerInput, + ComAtprotoSyncListBlobs.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.listBlobs"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getLatestCommit( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetLatestCommit.QueryParams, + ComAtprotoSyncGetLatestCommit.HandlerInput, + ComAtprotoSyncGetLatestCommit.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getLatestCommit"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + subscribeRepos( + cfg: StreamConfigOrHandler< + A, + ComAtprotoSyncSubscribeRepos.QueryParams, + ComAtprotoSyncSubscribeRepos.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.subscribeRepos"; // @ts-ignore - dynamically generated + return this._server.xrpc.streamMethod(nsid, cfg); + } + + getRepoStatus( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetRepoStatus.QueryParams, + ComAtprotoSyncGetRepoStatus.HandlerInput, + ComAtprotoSyncGetRepoStatus.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getRepoStatus"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRecord( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetRecord.QueryParams, + ComAtprotoSyncGetRecord.HandlerInput, + ComAtprotoSyncGetRecord.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listRepos( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncListRepos.QueryParams, + ComAtprotoSyncListRepos.HandlerInput, + ComAtprotoSyncListRepos.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.listRepos"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getBlocks( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetBlocks.QueryParams, + ComAtprotoSyncGetBlocks.HandlerInput, + ComAtprotoSyncGetBlocks.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getBlocks"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listReposByCollection( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncListReposByCollection.QueryParams, + ComAtprotoSyncListReposByCollection.HandlerInput, + ComAtprotoSyncListReposByCollection.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.listReposByCollection"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getCheckout( + cfg: MethodConfigOrHandler< + A, + ComAtprotoSyncGetCheckout.QueryParams, + ComAtprotoSyncGetCheckout.HandlerInput, + ComAtprotoSyncGetCheckout.HandlerOutput + >, + ) { + const nsid = "com.atproto.sync.getCheckout"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoRepoNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + listMissingBlobs( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoListMissingBlobs.QueryParams, + ComAtprotoRepoListMissingBlobs.HandlerInput, + ComAtprotoRepoListMissingBlobs.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.listMissingBlobs"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + createRecord( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoCreateRecord.QueryParams, + ComAtprotoRepoCreateRecord.HandlerInput, + ComAtprotoRepoCreateRecord.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.createRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + deleteRecord( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoDeleteRecord.QueryParams, + ComAtprotoRepoDeleteRecord.HandlerInput, + ComAtprotoRepoDeleteRecord.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.deleteRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + putRecord( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoPutRecord.QueryParams, + ComAtprotoRepoPutRecord.HandlerInput, + ComAtprotoRepoPutRecord.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.putRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + uploadBlob( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoUploadBlob.QueryParams, + ComAtprotoRepoUploadBlob.HandlerInput, + ComAtprotoRepoUploadBlob.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.uploadBlob"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + importRepo( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoImportRepo.QueryParams, + ComAtprotoRepoImportRepo.HandlerInput, + ComAtprotoRepoImportRepo.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.importRepo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + describeRepo( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoDescribeRepo.QueryParams, + ComAtprotoRepoDescribeRepo.HandlerInput, + ComAtprotoRepoDescribeRepo.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.describeRepo"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + getRecord( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoGetRecord.QueryParams, + ComAtprotoRepoGetRecord.HandlerInput, + ComAtprotoRepoGetRecord.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.getRecord"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + applyWrites( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoApplyWrites.QueryParams, + ComAtprotoRepoApplyWrites.HandlerInput, + ComAtprotoRepoApplyWrites.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.applyWrites"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } + + listRecords( + cfg: MethodConfigOrHandler< + A, + ComAtprotoRepoListRecords.QueryParams, + ComAtprotoRepoListRecords.HandlerInput, + ComAtprotoRepoListRecords.HandlerOutput + >, + ) { + const nsid = "com.atproto.repo.listRecords"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} + +export class ComAtprotoModerationNS { + _server: Server; + + constructor(server: Server) { + this._server = server; + } + + createReport( + cfg: MethodConfigOrHandler< + A, + ComAtprotoModerationCreateReport.QueryParams, + ComAtprotoModerationCreateReport.HandlerInput, + ComAtprotoModerationCreateReport.HandlerOutput + >, + ) { + const nsid = "com.atproto.moderation.createReport"; // @ts-ignore - dynamically generated + return this._server.xrpc.method(nsid, cfg); + } +} diff --git a/lex/lexicons.ts b/lex/lexicons.ts new file mode 100644 index 0000000..5aa6496 --- /dev/null +++ b/lex/lexicons.ts @@ -0,0 +1,21001 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { + type LexiconDoc, + Lexicons, + ValidationError, + type ValidationResult, +} from "@atp/lexicon"; +import { is$typed, maybe$typed } from "./util.ts"; + +export const schemaDict = { + "ToolsOzoneSignatureFindCorrelation": { + "lexicon": 1, + "id": "tools.ozone.signature.findCorrelation", + "defs": { + "main": { + "type": "query", + "description": + "Find all correlated threat signatures between 2 or more accounts.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "details", + ], + "properties": { + "details": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.signature.defs#sigDetail", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSignatureDefs": { + "lexicon": 1, + "id": "tools.ozone.signature.defs", + "defs": { + "sigDetail": { + "type": "object", + "required": [ + "property", + "value", + ], + "properties": { + "property": { + "type": "string", + }, + "value": { + "type": "string", + }, + }, + }, + }, + }, + "ToolsOzoneSignatureSearchAccounts": { + "lexicon": 1, + "id": "tools.ozone.signature.searchAccounts", + "defs": { + "main": { + "type": "query", + "description": + "Search for accounts that match one or more threat signature values.", + "parameters": { + "type": "params", + "required": [ + "values", + ], + "properties": { + "values": { + "type": "array", + "items": { + "type": "string", + }, + }, + "cursor": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "accounts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#accountView", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSignatureFindRelatedAccounts": { + "lexicon": 1, + "id": "tools.ozone.signature.findRelatedAccounts", + "defs": { + "main": { + "type": "query", + "description": + "Get accounts that share some matching threat signatures with the root account.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "cursor": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "accounts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:tools.ozone.signature.findRelatedAccounts#relatedAccount", + }, + }, + }, + }, + }, + }, + "relatedAccount": { + "type": "object", + "required": [ + "account", + ], + "properties": { + "account": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#accountView", + }, + "similarities": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.signature.defs#sigDetail", + }, + }, + }, + }, + }, + }, + "ToolsOzoneServerGetConfig": { + "lexicon": 1, + "id": "tools.ozone.server.getConfig", + "defs": { + "main": { + "type": "query", + "description": "Get details about ozone's server configuration.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "appview": { + "type": "ref", + "ref": "lex:tools.ozone.server.getConfig#serviceConfig", + }, + "pds": { + "type": "ref", + "ref": "lex:tools.ozone.server.getConfig#serviceConfig", + }, + "blobDivert": { + "type": "ref", + "ref": "lex:tools.ozone.server.getConfig#serviceConfig", + }, + "chat": { + "type": "ref", + "ref": "lex:tools.ozone.server.getConfig#serviceConfig", + }, + "viewer": { + "type": "ref", + "ref": "lex:tools.ozone.server.getConfig#viewerConfig", + }, + }, + }, + }, + }, + "serviceConfig": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + }, + }, + }, + "viewerConfig": { + "type": "object", + "properties": { + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + ], + }, + }, + }, + }, + }, + "ToolsOzoneTeamListMembers": { + "lexicon": 1, + "id": "tools.ozone.team.listMembers", + "defs": { + "main": { + "type": "query", + "description": "List all members with access to the ozone service.", + "parameters": { + "type": "params", + "properties": { + "disabled": { + "type": "boolean", + }, + "roles": { + "type": "array", + "items": { + "type": "string", + }, + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "members", + ], + "properties": { + "cursor": { + "type": "string", + }, + "members": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.team.defs#member", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneTeamDefs": { + "lexicon": 1, + "id": "tools.ozone.team.defs", + "defs": { + "member": { + "type": "object", + "required": [ + "did", + "role", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "disabled": { + "type": "boolean", + }, + "profile": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewDetailed", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + "lastUpdatedBy": { + "type": "string", + }, + "role": { + "type": "string", + "knownValues": [ + "lex:tools.ozone.team.defs#roleAdmin", + "lex:tools.ozone.team.defs#roleModerator", + "lex:tools.ozone.team.defs#roleTriage", + ], + }, + }, + }, + "roleAdmin": { + "type": "token", + "description": + "Admin role. Highest level of access, can perform all actions.", + }, + "roleModerator": { + "type": "token", + "description": "Moderator role. Can perform most actions.", + }, + "roleTriage": { + "type": "token", + "description": + "Triage role. Mostly intended for monitoring and escalating issues.", + }, + }, + }, + "ToolsOzoneTeamDeleteMember": { + "lexicon": 1, + "id": "tools.ozone.team.deleteMember", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a member from ozone team. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "errors": [ + { + "name": "MemberNotFound", + "description": "The member being deleted does not exist", + }, + { + "name": "CannotDeleteSelf", + "description": "You can not delete yourself from the team", + }, + ], + }, + }, + }, + "ToolsOzoneTeamUpdateMember": { + "lexicon": 1, + "id": "tools.ozone.team.updateMember", + "defs": { + "main": { + "type": "procedure", + "description": + "Update a member in the ozone service. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "disabled": { + "type": "boolean", + }, + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.team.defs#member", + }, + }, + "errors": [ + { + "name": "MemberNotFound", + "description": + "The member being updated does not exist in the team", + }, + ], + }, + }, + }, + "ToolsOzoneTeamAddMember": { + "lexicon": 1, + "id": "tools.ozone.team.addMember", + "defs": { + "main": { + "type": "procedure", + "description": "Add a member to the ozone team. Requires admin role.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "role", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "role": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleAdmin", + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.team.defs#member", + }, + }, + "errors": [ + { + "name": "MemberAlreadyExists", + "description": "Member already exists in the team.", + }, + ], + }, + }, + }, + "ToolsOzoneCommunicationDefs": { + "lexicon": 1, + "id": "tools.ozone.communication.defs", + "defs": { + "templateView": { + "type": "object", + "required": [ + "id", + "name", + "contentMarkdown", + "disabled", + "lastUpdatedBy", + "createdAt", + "updatedAt", + ], + "properties": { + "id": { + "type": "string", + }, + "name": { + "type": "string", + "description": "Name of the template.", + }, + "subject": { + "type": "string", + "description": + "Content of the template, can contain markdown and variable placeholders.", + }, + "contentMarkdown": { + "type": "string", + "description": "Subject of the message, used in emails.", + }, + "disabled": { + "type": "boolean", + }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language.", + }, + "lastUpdatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who last updated the template.", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + "ToolsOzoneCommunicationUpdateTemplate": { + "lexicon": 1, + "id": "tools.ozone.communication.updateTemplate", + "defs": { + "main": { + "type": "procedure", + "description": + "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "id", + ], + "properties": { + "id": { + "type": "string", + "description": "ID of the template to be updated.", + }, + "name": { + "type": "string", + "description": "Name of the template.", + }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language.", + }, + "contentMarkdown": { + "type": "string", + "description": + "Content of the template, markdown supported, can contain variable placeholders.", + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails.", + }, + "updatedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is updating the template.", + }, + "disabled": { + "type": "boolean", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.communication.defs#templateView", + }, + }, + "errors": [ + { + "name": "DuplicateTemplateName", + }, + ], + }, + }, + }, + "ToolsOzoneCommunicationCreateTemplate": { + "lexicon": 1, + "id": "tools.ozone.communication.createTemplate", + "defs": { + "main": { + "type": "procedure", + "description": + "Administrative action to create a new, re-usable communication (email for now) template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "contentMarkdown", + "name", + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the template.", + }, + "contentMarkdown": { + "type": "string", + "description": + "Content of the template, markdown supported, can contain variable placeholders.", + }, + "subject": { + "type": "string", + "description": "Subject of the message, used in emails.", + }, + "lang": { + "type": "string", + "format": "language", + "description": "Message language.", + }, + "createdBy": { + "type": "string", + "format": "did", + "description": "DID of the user who is creating the template.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.communication.defs#templateView", + }, + }, + "errors": [ + { + "name": "DuplicateTemplateName", + }, + ], + }, + }, + }, + "ToolsOzoneCommunicationListTemplates": { + "lexicon": 1, + "id": "tools.ozone.communication.listTemplates", + "defs": { + "main": { + "type": "query", + "description": "Get list of all communication templates.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "communicationTemplates", + ], + "properties": { + "communicationTemplates": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.communication.defs#templateView", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneCommunicationDeleteTemplate": { + "lexicon": 1, + "id": "tools.ozone.communication.deleteTemplate", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a communication template.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "id", + ], + "properties": { + "id": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSetDefs": { + "lexicon": 1, + "id": "tools.ozone.set.defs", + "defs": { + "set": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 128, + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240, + }, + }, + }, + "setView": { + "type": "object", + "required": [ + "name", + "setSize", + "createdAt", + "updatedAt", + ], + "properties": { + "name": { + "type": "string", + "minLength": 3, + "maxLength": 128, + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240, + }, + "setSize": { + "type": "integer", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + "ToolsOzoneSetAddValues": { + "lexicon": 1, + "id": "tools.ozone.set.addValues", + "defs": { + "main": { + "type": "procedure", + "description": + "Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name", + "values", + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to add values to", + }, + "values": { + "type": "array", + "minLength": 1, + "maxLength": 1000, + "items": { + "type": "string", + }, + "description": "Array of string values to add to the set", + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSetGetValues": { + "lexicon": 1, + "id": "tools.ozone.set.getValues", + "defs": { + "main": { + "type": "query", + "description": "Get a specific set and its values", + "parameters": { + "type": "params", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 100, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "set", + "values", + ], + "properties": { + "set": { + "type": "ref", + "ref": "lex:tools.ozone.set.defs#setView", + }, + "values": { + "type": "array", + "items": { + "type": "string", + }, + }, + "cursor": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist", + }, + ], + }, + }, + }, + "ToolsOzoneSetDeleteSet": { + "lexicon": 1, + "id": "tools.ozone.set.deleteSet", + "defs": { + "main": { + "type": "procedure", + "description": + "Delete an entire set. Attempting to delete a set that does not exist will result in an error.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to delete", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist", + }, + ], + }, + }, + }, + "ToolsOzoneSetUpsertSet": { + "lexicon": 1, + "id": "tools.ozone.set.upsertSet", + "defs": { + "main": { + "type": "procedure", + "description": "Create or update set metadata", + "input": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.set.defs#set", + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.set.defs#setView", + }, + }, + }, + }, + }, + "ToolsOzoneSetDeleteValues": { + "lexicon": 1, + "id": "tools.ozone.set.deleteValues", + "defs": { + "main": { + "type": "procedure", + "description": + "Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name", + "values", + ], + "properties": { + "name": { + "type": "string", + "description": "Name of the set to delete values from", + }, + "values": { + "type": "array", + "minLength": 1, + "items": { + "type": "string", + }, + "description": "Array of string values to delete from the set", + }, + }, + }, + }, + "errors": [ + { + "name": "SetNotFound", + "description": "set with the given name does not exist", + }, + ], + }, + }, + }, + "ToolsOzoneSetQuerySets": { + "lexicon": 1, + "id": "tools.ozone.set.querySets", + "defs": { + "main": { + "type": "query", + "description": "Query available sets", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "namePrefix": { + "type": "string", + }, + "sortBy": { + "type": "string", + "enum": [ + "name", + "createdAt", + "updatedAt", + ], + "default": "name", + }, + "sortDirection": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc", + ], + "description": "Defaults to ascending order of name field.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "sets", + ], + "properties": { + "sets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.set.defs#setView", + }, + }, + "cursor": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSettingDefs": { + "lexicon": 1, + "id": "tools.ozone.setting.defs", + "defs": { + "option": { + "type": "object", + "required": [ + "key", + "value", + "did", + "scope", + "createdBy", + "lastUpdatedBy", + ], + "properties": { + "key": { + "type": "string", + "format": "nsid", + }, + "did": { + "type": "string", + "format": "did", + }, + "value": { + "type": "unknown", + }, + "description": { + "type": "string", + "maxGraphemes": 1024, + "maxLength": 10240, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + "managerRole": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + "tools.ozone.team.defs#roleAdmin", + ], + }, + "scope": { + "type": "string", + "knownValues": [ + "instance", + "personal", + ], + }, + "createdBy": { + "type": "string", + "format": "did", + }, + "lastUpdatedBy": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + "ToolsOzoneSettingListOptions": { + "lexicon": 1, + "id": "tools.ozone.setting.listOptions", + "defs": { + "main": { + "type": "query", + "description": "List settings with optional filtering", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "scope": { + "type": "string", + "knownValues": [ + "instance", + "personal", + ], + "default": "instance", + }, + "prefix": { + "type": "string", + "description": "Filter keys by prefix", + }, + "keys": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "nsid", + }, + "description": + "Filter for only the specified keys. Ignored if prefix is provided", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "options", + ], + "properties": { + "cursor": { + "type": "string", + }, + "options": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.setting.defs#option", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneSettingRemoveOptions": { + "lexicon": 1, + "id": "tools.ozone.setting.removeOptions", + "defs": { + "main": { + "type": "procedure", + "description": "Delete settings by key", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "keys", + "scope", + ], + "properties": { + "keys": { + "type": "array", + "minLength": 1, + "maxLength": 200, + "items": { + "type": "string", + "format": "nsid", + }, + }, + "scope": { + "type": "string", + "knownValues": [ + "instance", + "personal", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + }, + }, + }, + "ToolsOzoneSettingUpsertOption": { + "lexicon": 1, + "id": "tools.ozone.setting.upsertOption", + "defs": { + "main": { + "type": "procedure", + "description": "Create or update setting option", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "key", + "scope", + "value", + ], + "properties": { + "key": { + "type": "string", + "format": "nsid", + }, + "scope": { + "type": "string", + "knownValues": [ + "instance", + "personal", + ], + }, + "value": { + "type": "unknown", + }, + "description": { + "type": "string", + "maxLength": 2000, + }, + "managerRole": { + "type": "string", + "knownValues": [ + "tools.ozone.team.defs#roleModerator", + "tools.ozone.team.defs#roleTriage", + "tools.ozone.team.defs#roleAdmin", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "option", + ], + "properties": { + "option": { + "type": "ref", + "ref": "lex:tools.ozone.setting.defs#option", + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetReporterStats": { + "lexicon": 1, + "id": "tools.ozone.moderation.getReporterStats", + "defs": { + "main": { + "type": "query", + "description": "Get reporter stats for a list of users.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "stats", + ], + "properties": { + "stats": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#reporterStats", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationQueryStatuses": { + "lexicon": 1, + "id": "tools.ozone.moderation.queryStatuses", + "defs": { + "main": { + "type": "query", + "description": "View moderation statuses of subjects (record or repo).", + "parameters": { + "type": "params", + "properties": { + "queueCount": { + "type": "integer", + "description": + "Number of queues being used by moderators. Subjects will be split among all queues.", + }, + "queueIndex": { + "type": "integer", + "description": + "Index of the queue to fetch subjects from. Works only when queueCount value is specified.", + }, + "queueSeed": { + "type": "string", + "description": "A seeder to shuffle/balance the queue items.", + }, + "includeAllUserRecords": { + "type": "boolean", + "description": + "All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.", + }, + "subject": { + "type": "string", + "format": "uri", + "description": "The subject to get the status for.", + }, + "comment": { + "type": "string", + "description": "Search subjects by keyword from comments", + }, + "reportedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects reported after a given timestamp", + }, + "reportedBefore": { + "type": "string", + "format": "datetime", + "description": + "Search subjects reported before a given timestamp", + }, + "reviewedAfter": { + "type": "string", + "format": "datetime", + "description": "Search subjects reviewed after a given timestamp", + }, + "hostingDeletedAfter": { + "type": "string", + "format": "datetime", + "description": + "Search subjects where the associated record/account was deleted after a given timestamp", + }, + "hostingDeletedBefore": { + "type": "string", + "format": "datetime", + "description": + "Search subjects where the associated record/account was deleted before a given timestamp", + }, + "hostingUpdatedAfter": { + "type": "string", + "format": "datetime", + "description": + "Search subjects where the associated record/account was updated after a given timestamp", + }, + "hostingUpdatedBefore": { + "type": "string", + "format": "datetime", + "description": + "Search subjects where the associated record/account was updated before a given timestamp", + }, + "hostingStatuses": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "Search subjects by the status of the associated record/account", + }, + "reviewedBefore": { + "type": "string", + "format": "datetime", + "description": + "Search subjects reviewed before a given timestamp", + }, + "includeMuted": { + "type": "boolean", + "description": + "By default, we don't include muted subjects in the results. Set this to true to include them.", + }, + "onlyMuted": { + "type": "boolean", + "description": + "When set to true, only muted subjects and reporters will be returned.", + }, + "reviewState": { + "type": "string", + "description": + "Specify when fetching subjects in a certain state", + }, + "ignoreSubjects": { + "type": "array", + "items": { + "type": "string", + "format": "uri", + }, + }, + "lastReviewedBy": { + "type": "string", + "format": "did", + "description": + "Get all subject statuses that were reviewed by a specific moderator", + }, + "sortField": { + "type": "string", + "default": "lastReportedAt", + "enum": [ + "lastReviewedAt", + "lastReportedAt", + "reportedRecordsCount", + "takendownRecordsCount", + "priorityScore", + ], + }, + "sortDirection": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc", + ], + }, + "takendown": { + "type": "boolean", + "description": "Get subjects that were taken down", + }, + "appealed": { + "type": "boolean", + "description": "Get subjects in unresolved appealed status", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "tags": { + "type": "array", + "maxLength": 25, + "items": { + "type": "string", + "description": + "Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters", + }, + }, + "excludeTags": { + "type": "array", + "items": { + "type": "string", + }, + }, + "cursor": { + "type": "string", + }, + "collections": { + "type": "array", + "maxLength": 20, + "description": + "If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", + "items": { + "type": "string", + "format": "nsid", + }, + }, + "subjectType": { + "type": "string", + "description": + "If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", + "knownValues": [ + "account", + "record", + ], + }, + "minAccountSuspendCount": { + "type": "integer", + "description": + "If specified, only subjects that belong to an account that has at least this many suspensions will be returned.", + }, + "minReportedRecordsCount": { + "type": "integer", + "description": + "If specified, only subjects that belong to an account that has at least this many reported records will be returned.", + }, + "minTakendownRecordsCount": { + "type": "integer", + "description": + "If specified, only subjects that belong to an account that has at least this many taken down records will be returned.", + }, + "minPriorityScore": { + "minimum": 0, + "maximum": 100, + "type": "integer", + "description": + "If specified, only subjects that have priority score value above the given value will be returned.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subjectStatuses", + ], + "properties": { + "cursor": { + "type": "string", + }, + "subjectStatuses": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetRepo": { + "lexicon": 1, + "id": "tools.ozone.moderation.getRepo", + "defs": { + "main": { + "type": "query", + "description": "Get details about a repository.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#repoViewDetail", + }, + }, + "errors": [ + { + "name": "RepoNotFound", + }, + ], + }, + }, + }, + "ToolsOzoneModerationDefs": { + "lexicon": 1, + "id": "tools.ozone.moderation.defs", + "defs": { + "modEventView": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobCids", + "createdBy", + "createdAt", + ], + "properties": { + "id": { + "type": "integer", + }, + "event": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#modEventTakedown", + "lex:tools.ozone.moderation.defs#modEventReverseTakedown", + "lex:tools.ozone.moderation.defs#modEventComment", + "lex:tools.ozone.moderation.defs#modEventReport", + "lex:tools.ozone.moderation.defs#modEventLabel", + "lex:tools.ozone.moderation.defs#modEventAcknowledge", + "lex:tools.ozone.moderation.defs#modEventEscalate", + "lex:tools.ozone.moderation.defs#modEventMute", + "lex:tools.ozone.moderation.defs#modEventUnmute", + "lex:tools.ozone.moderation.defs#modEventMuteReporter", + "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", + "lex:tools.ozone.moderation.defs#modEventEmail", + "lex:tools.ozone.moderation.defs#modEventResolveAppeal", + "lex:tools.ozone.moderation.defs#modEventDivert", + "lex:tools.ozone.moderation.defs#modEventTag", + "lex:tools.ozone.moderation.defs#accountEvent", + "lex:tools.ozone.moderation.defs#identityEvent", + "lex:tools.ozone.moderation.defs#recordEvent", + "lex:tools.ozone.moderation.defs#modEventPriorityScore", + ], + }, + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + "lex:chat.bsky.convo.defs#messageRef", + ], + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string", + }, + }, + "createdBy": { + "type": "string", + "format": "did", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "creatorHandle": { + "type": "string", + }, + "subjectHandle": { + "type": "string", + }, + }, + }, + "modEventViewDetail": { + "type": "object", + "required": [ + "id", + "event", + "subject", + "subjectBlobs", + "createdBy", + "createdAt", + ], + "properties": { + "id": { + "type": "integer", + }, + "event": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#modEventTakedown", + "lex:tools.ozone.moderation.defs#modEventReverseTakedown", + "lex:tools.ozone.moderation.defs#modEventComment", + "lex:tools.ozone.moderation.defs#modEventReport", + "lex:tools.ozone.moderation.defs#modEventLabel", + "lex:tools.ozone.moderation.defs#modEventAcknowledge", + "lex:tools.ozone.moderation.defs#modEventEscalate", + "lex:tools.ozone.moderation.defs#modEventMute", + "lex:tools.ozone.moderation.defs#modEventUnmute", + "lex:tools.ozone.moderation.defs#modEventMuteReporter", + "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", + "lex:tools.ozone.moderation.defs#modEventEmail", + "lex:tools.ozone.moderation.defs#modEventResolveAppeal", + "lex:tools.ozone.moderation.defs#modEventDivert", + "lex:tools.ozone.moderation.defs#modEventTag", + "lex:tools.ozone.moderation.defs#accountEvent", + "lex:tools.ozone.moderation.defs#identityEvent", + "lex:tools.ozone.moderation.defs#recordEvent", + "lex:tools.ozone.moderation.defs#modEventPriorityScore", + ], + }, + "subject": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#repoView", + "lex:tools.ozone.moderation.defs#repoViewNotFound", + "lex:tools.ozone.moderation.defs#recordView", + "lex:tools.ozone.moderation.defs#recordViewNotFound", + ], + }, + "subjectBlobs": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#blobView", + }, + }, + "createdBy": { + "type": "string", + "format": "did", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "subjectStatusView": { + "type": "object", + "required": [ + "id", + "subject", + "createdAt", + "updatedAt", + "reviewState", + ], + "properties": { + "id": { + "type": "integer", + }, + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + ], + }, + "hosting": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#accountHosting", + "lex:tools.ozone.moderation.defs#recordHosting", + ], + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid", + }, + }, + "subjectRepoHandle": { + "type": "string", + }, + "updatedAt": { + "type": "string", + "format": "datetime", + "description": + "Timestamp referencing when the last update was made to the moderation status of the subject", + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Timestamp referencing the first moderation status impacting event was emitted on the subject", + }, + "reviewState": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#subjectReviewState", + }, + "comment": { + "type": "string", + "description": "Sticky comment on the subject.", + }, + "priorityScore": { + "type": "integer", + "description": + "Numeric value representing the level of priority. Higher score means higher priority.", + "minimum": 0, + "maximum": 100, + }, + "muteUntil": { + "type": "string", + "format": "datetime", + }, + "muteReportingUntil": { + "type": "string", + "format": "datetime", + }, + "lastReviewedBy": { + "type": "string", + "format": "did", + }, + "lastReviewedAt": { + "type": "string", + "format": "datetime", + }, + "lastReportedAt": { + "type": "string", + "format": "datetime", + }, + "lastAppealedAt": { + "type": "string", + "format": "datetime", + "description": + "Timestamp referencing when the author of the subject appealed a moderation action", + }, + "takendown": { + "type": "boolean", + }, + "appealed": { + "type": "boolean", + "description": + "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators.", + }, + "suspendUntil": { + "type": "string", + "format": "datetime", + }, + "tags": { + "type": "array", + "items": { + "type": "string", + }, + }, + "accountStats": { + "description": "Statistics related to the account subject", + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#accountStats", + }, + "recordsStats": { + "description": + "Statistics related to the record subjects authored by the subject's account", + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#recordsStats", + }, + }, + }, + "accountStats": { + "description": "Statistics about a particular account subject", + "type": "object", + "properties": { + "reportCount": { + "description": "Total number of reports on the account", + "type": "integer", + }, + "appealCount": { + "description": + "Total number of appeals against a moderation action on the account", + "type": "integer", + }, + "suspendCount": { + "description": "Number of times the account was suspended", + "type": "integer", + }, + "escalateCount": { + "description": "Number of times the account was escalated", + "type": "integer", + }, + "takedownCount": { + "description": "Number of times the account was taken down", + "type": "integer", + }, + }, + }, + "recordsStats": { + "description": "Statistics about a set of record subject items", + "type": "object", + "properties": { + "totalReports": { + "description": + "Cumulative sum of the number of reports on the items in the set", + "type": "integer", + }, + "reportedCount": { + "description": "Number of items that were reported at least once", + "type": "integer", + }, + "escalatedCount": { + "description": "Number of items that were escalated at least once", + "type": "integer", + }, + "appealedCount": { + "description": "Number of items that were appealed at least once", + "type": "integer", + }, + "subjectCount": { + "description": "Total number of item in the set", + "type": "integer", + }, + "pendingCount": { + "description": + 'Number of item currently in "reviewOpen" or "reviewEscalated" state', + "type": "integer", + }, + "processedCount": { + "description": + 'Number of item currently in "reviewNone" or "reviewClosed" state', + "type": "integer", + }, + "takendownCount": { + "description": "Number of item currently taken down", + "type": "integer", + }, + }, + }, + "subjectReviewState": { + "type": "string", + "knownValues": [ + "lex:tools.ozone.moderation.defs#reviewOpen", + "lex:tools.ozone.moderation.defs#reviewEscalated", + "lex:tools.ozone.moderation.defs#reviewClosed", + "lex:tools.ozone.moderation.defs#reviewNone", + ], + }, + "reviewOpen": { + "type": "token", + "description": + "Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator", + }, + "reviewEscalated": { + "type": "token", + "description": + "Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator", + }, + "reviewClosed": { + "type": "token", + "description": + "Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator", + }, + "reviewNone": { + "type": "token", + "description": + "Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it", + }, + "modEventTakedown": { + "type": "object", + "description": "Take down a subject permanently or temporarily", + "properties": { + "comment": { + "type": "string", + }, + "durationInHours": { + "type": "integer", + "description": + "Indicates how long the takedown should be in effect before automatically expiring.", + }, + "acknowledgeAccountSubjects": { + "type": "boolean", + "description": + "If true, all other reports on content authored by this account will be resolved (acknowledged).", + }, + "policies": { + "type": "array", + "maxLength": 5, + "items": { + "type": "string", + }, + "description": + "Names/Keywords of the policies that drove the decision.", + }, + }, + }, + "modEventReverseTakedown": { + "type": "object", + "description": "Revert take down action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal.", + }, + }, + }, + "modEventResolveAppeal": { + "type": "object", + "description": "Resolve appeal on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe resolution.", + }, + }, + }, + "modEventComment": { + "type": "object", + "description": + "Add a comment to a subject. An empty comment will clear any previously set sticky comment.", + "properties": { + "comment": { + "type": "string", + }, + "sticky": { + "type": "boolean", + "description": "Make the comment persistent on the subject", + }, + }, + }, + "modEventReport": { + "type": "object", + "description": "Report a subject", + "required": [ + "reportType", + ], + "properties": { + "comment": { + "type": "string", + }, + "isReporterMuted": { + "type": "boolean", + "description": + "Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject.", + }, + "reportType": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#reasonType", + }, + }, + }, + "modEventLabel": { + "type": "object", + "description": "Apply/Negate labels on a subject", + "required": [ + "createLabelVals", + "negateLabelVals", + ], + "properties": { + "comment": { + "type": "string", + }, + "createLabelVals": { + "type": "array", + "items": { + "type": "string", + }, + }, + "negateLabelVals": { + "type": "array", + "items": { + "type": "string", + }, + }, + "durationInHours": { + "type": "integer", + "description": + "Indicates how long the label will remain on the subject. Only applies on labels that are being added.", + }, + }, + }, + "modEventPriorityScore": { + "type": "object", + "description": + "Set priority score of the subject. Higher score means higher priority.", + "required": [ + "score", + ], + "properties": { + "comment": { + "type": "string", + }, + "score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + }, + }, + }, + "modEventAcknowledge": { + "type": "object", + "properties": { + "comment": { + "type": "string", + }, + "acknowledgeAccountSubjects": { + "type": "boolean", + "description": + "If true, all other reports on content authored by this account will be resolved (acknowledged).", + }, + }, + }, + "modEventEscalate": { + "type": "object", + "properties": { + "comment": { + "type": "string", + }, + }, + }, + "modEventMute": { + "type": "object", + "description": "Mute incoming reports on a subject", + "required": [ + "durationInHours", + ], + "properties": { + "comment": { + "type": "string", + }, + "durationInHours": { + "type": "integer", + "description": + "Indicates how long the subject should remain muted.", + }, + }, + }, + "modEventUnmute": { + "type": "object", + "description": "Unmute action on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal.", + }, + }, + }, + "modEventMuteReporter": { + "type": "object", + "description": "Mute incoming reports from an account", + "properties": { + "comment": { + "type": "string", + }, + "durationInHours": { + "type": "integer", + "description": + "Indicates how long the account should remain muted. Falsy value here means a permanent mute.", + }, + }, + }, + "modEventUnmuteReporter": { + "type": "object", + "description": "Unmute incoming reports from an account", + "properties": { + "comment": { + "type": "string", + "description": "Describe reasoning behind the reversal.", + }, + }, + }, + "modEventEmail": { + "type": "object", + "description": "Keep a log of outgoing email to a user", + "required": [ + "subjectLine", + ], + "properties": { + "subjectLine": { + "type": "string", + "description": "The subject line of the email sent to the user.", + }, + "content": { + "type": "string", + "description": "The content of the email sent to the user.", + }, + "comment": { + "type": "string", + "description": "Additional comment about the outgoing comm.", + }, + }, + }, + "modEventDivert": { + "type": "object", + "description": + "Divert a record's blobs to a 3rd party service for further scanning/tagging", + "properties": { + "comment": { + "type": "string", + }, + }, + }, + "modEventTag": { + "type": "object", + "description": "Add/Remove a tag on a subject", + "required": [ + "add", + "remove", + ], + "properties": { + "add": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "Tags to be added to the subject. If already exists, won't be duplicated.", + }, + "remove": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.", + }, + "comment": { + "type": "string", + "description": "Additional comment about added/removed tags.", + }, + }, + }, + "accountEvent": { + "type": "object", + "description": + "Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": [ + "timestamp", + "active", + ], + "properties": { + "comment": { + "type": "string", + }, + "active": { + "type": "boolean", + "description": + "Indicates that the account has a repository which can be fetched from the host that emitted this event.", + }, + "status": { + "type": "string", + "knownValues": [ + "unknown", + "deactivated", + "deleted", + "takendown", + "suspended", + "tombstoned", + ], + }, + "timestamp": { + "type": "string", + "format": "datetime", + }, + }, + }, + "identityEvent": { + "type": "object", + "description": + "Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": [ + "timestamp", + ], + "properties": { + "comment": { + "type": "string", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "pdsHost": { + "type": "string", + "format": "uri", + }, + "tombstone": { + "type": "boolean", + }, + "timestamp": { + "type": "string", + "format": "datetime", + }, + }, + }, + "recordEvent": { + "type": "object", + "description": + "Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.", + "required": [ + "timestamp", + "op", + ], + "properties": { + "comment": { + "type": "string", + }, + "op": { + "type": "string", + "knownValues": [ + "create", + "update", + "delete", + ], + }, + "cid": { + "type": "string", + "format": "cid", + }, + "timestamp": { + "type": "string", + "format": "datetime", + }, + }, + }, + "repoView": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "email": { + "type": "string", + }, + "relatedRecords": { + "type": "array", + "items": { + "type": "unknown", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "moderation": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#moderation", + }, + "invitedBy": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + "invitesDisabled": { + "type": "boolean", + }, + "inviteNote": { + "type": "string", + }, + "deactivatedAt": { + "type": "string", + "format": "datetime", + }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#threatSignature", + }, + }, + }, + }, + "repoViewDetail": { + "type": "object", + "required": [ + "did", + "handle", + "relatedRecords", + "indexedAt", + "moderation", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "email": { + "type": "string", + }, + "relatedRecords": { + "type": "array", + "items": { + "type": "unknown", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "moderation": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#moderationDetail", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "invitedBy": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + "invites": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + }, + "invitesDisabled": { + "type": "boolean", + }, + "inviteNote": { + "type": "string", + }, + "emailConfirmedAt": { + "type": "string", + "format": "datetime", + }, + "deactivatedAt": { + "type": "string", + "format": "datetime", + }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#threatSignature", + }, + }, + }, + }, + "repoViewNotFound": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "recordView": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobCids", + "indexedAt", + "moderation", + "repo", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "value": { + "type": "unknown", + }, + "blobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "moderation": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#moderation", + }, + "repo": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#repoView", + }, + }, + }, + "recordViewDetail": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + "blobs", + "indexedAt", + "moderation", + "repo", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "value": { + "type": "unknown", + }, + "blobs": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#blobView", + }, + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "moderation": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#moderationDetail", + }, + "repo": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#repoView", + }, + }, + }, + "recordViewNotFound": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "moderation": { + "type": "object", + "properties": { + "subjectStatus": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", + }, + }, + }, + "moderationDetail": { + "type": "object", + "properties": { + "subjectStatus": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#subjectStatusView", + }, + }, + }, + "blobView": { + "type": "object", + "required": [ + "cid", + "mimeType", + "size", + "createdAt", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "mimeType": { + "type": "string", + }, + "size": { + "type": "integer", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "details": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#imageDetails", + "lex:tools.ozone.moderation.defs#videoDetails", + ], + }, + "moderation": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#moderation", + }, + }, + }, + "imageDetails": { + "type": "object", + "required": [ + "width", + "height", + ], + "properties": { + "width": { + "type": "integer", + }, + "height": { + "type": "integer", + }, + }, + }, + "videoDetails": { + "type": "object", + "required": [ + "width", + "height", + "length", + ], + "properties": { + "width": { + "type": "integer", + }, + "height": { + "type": "integer", + }, + "length": { + "type": "integer", + }, + }, + }, + "accountHosting": { + "type": "object", + "required": [ + "status", + ], + "properties": { + "status": { + "type": "string", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + "unknown", + ], + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "deletedAt": { + "type": "string", + "format": "datetime", + }, + "deactivatedAt": { + "type": "string", + "format": "datetime", + }, + "reactivatedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "recordHosting": { + "type": "object", + "required": [ + "status", + ], + "properties": { + "status": { + "type": "string", + "knownValues": [ + "deleted", + "unknown", + ], + }, + "updatedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "deletedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "reporterStats": { + "type": "object", + "required": [ + "did", + "accountReportCount", + "recordReportCount", + "reportedAccountCount", + "reportedRecordCount", + "takendownAccountCount", + "takendownRecordCount", + "labeledAccountCount", + "labeledRecordCount", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "accountReportCount": { + "type": "integer", + "description": + "The total number of reports made by the user on accounts.", + }, + "recordReportCount": { + "type": "integer", + "description": + "The total number of reports made by the user on records.", + }, + "reportedAccountCount": { + "type": "integer", + "description": "The total number of accounts reported by the user.", + }, + "reportedRecordCount": { + "type": "integer", + "description": "The total number of records reported by the user.", + }, + "takendownAccountCount": { + "type": "integer", + "description": + "The total number of accounts taken down as a result of the user's reports.", + }, + "takendownRecordCount": { + "type": "integer", + "description": + "The total number of records taken down as a result of the user's reports.", + }, + "labeledAccountCount": { + "type": "integer", + "description": + "The total number of accounts labeled as a result of the user's reports.", + }, + "labeledRecordCount": { + "type": "integer", + "description": + "The total number of records labeled as a result of the user's reports.", + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetRecords": { + "lexicon": 1, + "id": "tools.ozone.moderation.getRecords", + "defs": { + "main": { + "type": "query", + "description": "Get details about some records.", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "records", + ], + "properties": { + "records": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#recordViewDetail", + "lex:tools.ozone.moderation.defs#recordViewNotFound", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetEvent": { + "lexicon": 1, + "id": "tools.ozone.moderation.getEvent", + "defs": { + "main": { + "type": "query", + "description": "Get details about a moderation event.", + "parameters": { + "type": "params", + "required": [ + "id", + ], + "properties": { + "id": { + "type": "integer", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#modEventViewDetail", + }, + }, + }, + }, + }, + "ToolsOzoneModerationQueryEvents": { + "lexicon": 1, + "id": "tools.ozone.moderation.queryEvents", + "defs": { + "main": { + "type": "query", + "description": "List moderation events related to a subject.", + "parameters": { + "type": "params", + "properties": { + "types": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned.", + }, + "createdBy": { + "type": "string", + "format": "did", + }, + "sortDirection": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc", + ], + "description": + "Sort direction for the events. Defaults to descending order of created at timestamp.", + }, + "createdAfter": { + "type": "string", + "format": "datetime", + "description": "Retrieve events created after a given timestamp", + }, + "createdBefore": { + "type": "string", + "format": "datetime", + "description": "Retrieve events created before a given timestamp", + }, + "subject": { + "type": "string", + "format": "uri", + }, + "collections": { + "type": "array", + "maxLength": 20, + "description": + "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.", + "items": { + "type": "string", + "format": "nsid", + }, + }, + "subjectType": { + "type": "string", + "description": + "If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.", + "knownValues": [ + "account", + "record", + ], + }, + "includeAllUserRecords": { + "type": "boolean", + "default": false, + "description": + "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "hasComment": { + "type": "boolean", + "description": "If true, only events with comments are returned", + }, + "comment": { + "type": "string", + "description": + "If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition.", + }, + "addedLabels": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "If specified, only events where all of these labels were added are returned", + }, + "removedLabels": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "If specified, only events where all of these labels were removed are returned", + }, + "addedTags": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "If specified, only events where all of these tags were added are returned", + }, + "removedTags": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "If specified, only events where all of these tags were removed are returned", + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string", + }, + }, + "policies": { + "type": "array", + "items": { + "type": "string", + "description": + "If specified, only events where the action policies match any of the given policies are returned", + }, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "events", + ], + "properties": { + "cursor": { + "type": "string", + }, + "events": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#modEventView", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetRecord": { + "lexicon": 1, + "id": "tools.ozone.moderation.getRecord", + "defs": { + "main": { + "type": "query", + "description": "Get details about a record.", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#recordViewDetail", + }, + }, + "errors": [ + { + "name": "RecordNotFound", + }, + ], + }, + }, + }, + "ToolsOzoneModerationEmitEvent": { + "lexicon": 1, + "id": "tools.ozone.moderation.emitEvent", + "defs": { + "main": { + "type": "procedure", + "description": "Take a moderation action on an actor.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "event", + "subject", + "createdBy", + ], + "properties": { + "event": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#modEventTakedown", + "lex:tools.ozone.moderation.defs#modEventAcknowledge", + "lex:tools.ozone.moderation.defs#modEventEscalate", + "lex:tools.ozone.moderation.defs#modEventComment", + "lex:tools.ozone.moderation.defs#modEventLabel", + "lex:tools.ozone.moderation.defs#modEventReport", + "lex:tools.ozone.moderation.defs#modEventMute", + "lex:tools.ozone.moderation.defs#modEventUnmute", + "lex:tools.ozone.moderation.defs#modEventMuteReporter", + "lex:tools.ozone.moderation.defs#modEventUnmuteReporter", + "lex:tools.ozone.moderation.defs#modEventReverseTakedown", + "lex:tools.ozone.moderation.defs#modEventResolveAppeal", + "lex:tools.ozone.moderation.defs#modEventEmail", + "lex:tools.ozone.moderation.defs#modEventDivert", + "lex:tools.ozone.moderation.defs#modEventTag", + "lex:tools.ozone.moderation.defs#accountEvent", + "lex:tools.ozone.moderation.defs#identityEvent", + "lex:tools.ozone.moderation.defs#recordEvent", + "lex:tools.ozone.moderation.defs#modEventPriorityScore", + ], + }, + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + ], + }, + "subjectBlobCids": { + "type": "array", + "items": { + "type": "string", + "format": "cid", + }, + }, + "createdBy": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#modEventView", + }, + }, + "errors": [ + { + "name": "SubjectHasAction", + }, + ], + }, + }, + }, + "ToolsOzoneModerationSearchRepos": { + "lexicon": 1, + "id": "tools.ozone.moderation.searchRepos", + "defs": { + "main": { + "type": "query", + "description": "Find repositories based on a search term.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead", + }, + "q": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repos", + ], + "properties": { + "cursor": { + "type": "string", + }, + "repos": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:tools.ozone.moderation.defs#repoView", + }, + }, + }, + }, + }, + }, + }, + }, + "ToolsOzoneModerationGetRepos": { + "lexicon": 1, + "id": "tools.ozone.moderation.getRepos", + "defs": { + "main": { + "type": "query", + "description": "Get details about some repositories.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repos", + ], + "properties": { + "repos": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:tools.ozone.moderation.defs#repoViewDetail", + "lex:tools.ozone.moderation.defs#repoViewNotFound", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyVideoUploadVideo": { + "lexicon": 1, + "id": "app.bsky.video.uploadVideo", + "defs": { + "main": { + "type": "procedure", + "description": "Upload a video to be processed then stored on the PDS.", + "input": { + "encoding": "video/mp4", + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "jobStatus", + ], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "lex:app.bsky.video.defs#jobStatus", + }, + }, + }, + }, + }, + }, + }, + "AppBskyVideoDefs": { + "lexicon": 1, + "id": "app.bsky.video.defs", + "defs": { + "jobStatus": { + "type": "object", + "required": [ + "jobId", + "did", + "state", + ], + "properties": { + "jobId": { + "type": "string", + }, + "did": { + "type": "string", + "format": "did", + }, + "state": { + "type": "string", + "description": + "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", + "knownValues": [ + "JOB_STATE_COMPLETED", + "JOB_STATE_FAILED", + ], + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Progress within the current processing state.", + }, + "blob": { + "type": "blob", + }, + "error": { + "type": "string", + }, + "message": { + "type": "string", + }, + }, + }, + }, + }, + "AppBskyVideoGetJobStatus": { + "lexicon": 1, + "id": "app.bsky.video.getJobStatus", + "defs": { + "main": { + "type": "query", + "description": "Get status details for a video processing job.", + "parameters": { + "type": "params", + "required": [ + "jobId", + ], + "properties": { + "jobId": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "jobStatus", + ], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "lex:app.bsky.video.defs#jobStatus", + }, + }, + }, + }, + }, + }, + }, + "AppBskyVideoGetUploadLimits": { + "lexicon": 1, + "id": "app.bsky.video.getUploadLimits", + "defs": { + "main": { + "type": "query", + "description": "Get video upload limits for the authenticated user.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "canUpload", + ], + "properties": { + "canUpload": { + "type": "boolean", + }, + "remainingDailyVideos": { + "type": "integer", + }, + "remainingDailyBytes": { + "type": "integer", + }, + "message": { + "type": "string", + }, + "error": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "AppBskyEmbedDefs": { + "lexicon": 1, + "id": "app.bsky.embed.defs", + "defs": { + "aspectRatio": { + "type": "object", + "description": + "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", + "required": [ + "width", + "height", + ], + "properties": { + "width": { + "type": "integer", + "minimum": 1, + }, + "height": { + "type": "integer", + "minimum": 1, + }, + }, + }, + }, + }, + "AppBskyEmbedRecord": { + "lexicon": 1, + "id": "app.bsky.embed.record", + "description": + "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.", + "defs": { + "main": { + "type": "object", + "required": [ + "record", + ], + "properties": { + "record": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + "view": { + "type": "object", + "required": [ + "record", + ], + "properties": { + "record": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.record#viewRecord", + "lex:app.bsky.embed.record#viewNotFound", + "lex:app.bsky.embed.record#viewBlocked", + "lex:app.bsky.embed.record#viewDetached", + "lex:app.bsky.feed.defs#generatorView", + "lex:app.bsky.graph.defs#listView", + "lex:app.bsky.labeler.defs#labelerView", + "lex:app.bsky.graph.defs#starterPackViewBasic", + ], + }, + }, + }, + "viewRecord": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "value", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + "value": { + "type": "unknown", + "description": "The record data itself.", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "replyCount": { + "type": "integer", + }, + "repostCount": { + "type": "integer", + }, + "likeCount": { + "type": "integer", + }, + "quoteCount": { + "type": "integer", + }, + "embeds": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.images#view", + "lex:app.bsky.embed.video#view", + "lex:app.bsky.embed.external#view", + "lex:app.bsky.embed.record#view", + "lex:app.bsky.embed.recordWithMedia#view", + ], + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "viewNotFound": { + "type": "object", + "required": [ + "uri", + "notFound", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "notFound": { + "type": "boolean", + "const": true, + }, + }, + }, + "viewBlocked": { + "type": "object", + "required": [ + "uri", + "blocked", + "author", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "blocked": { + "type": "boolean", + "const": true, + }, + "author": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#blockedAuthor", + }, + }, + }, + "viewDetached": { + "type": "object", + "required": [ + "uri", + "detached", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "detached": { + "type": "boolean", + "const": true, + }, + }, + }, + }, + }, + "AppBskyEmbedImages": { + "lexicon": 1, + "id": "app.bsky.embed.images", + "description": "A set of images embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": [ + "images", + ], + "properties": { + "images": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.embed.images#image", + }, + "maxLength": 4, + }, + }, + }, + "image": { + "type": "object", + "required": [ + "image", + "alt", + ], + "properties": { + "image": { + "type": "blob", + "accept": [ + "image/*", + ], + "maxSize": 1000000, + }, + "alt": { + "type": "string", + "description": + "Alt text description of the image, for accessibility.", + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:app.bsky.embed.defs#aspectRatio", + }, + }, + }, + "view": { + "type": "object", + "required": [ + "images", + ], + "properties": { + "images": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.embed.images#viewImage", + }, + "maxLength": 4, + }, + }, + }, + "viewImage": { + "type": "object", + "required": [ + "thumb", + "fullsize", + "alt", + ], + "properties": { + "thumb": { + "type": "string", + "format": "uri", + "description": + "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.", + }, + "fullsize": { + "type": "string", + "format": "uri", + "description": + "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.", + }, + "alt": { + "type": "string", + "description": + "Alt text description of the image, for accessibility.", + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:app.bsky.embed.defs#aspectRatio", + }, + }, + }, + }, + }, + "AppBskyEmbedRecordWithMedia": { + "lexicon": 1, + "id": "app.bsky.embed.recordWithMedia", + "description": + "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.", + "defs": { + "main": { + "type": "object", + "required": [ + "record", + "media", + ], + "properties": { + "record": { + "type": "ref", + "ref": "lex:app.bsky.embed.record", + }, + "media": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.images", + "lex:app.bsky.embed.video", + "lex:app.bsky.embed.external", + ], + }, + }, + }, + "view": { + "type": "object", + "required": [ + "record", + "media", + ], + "properties": { + "record": { + "type": "ref", + "ref": "lex:app.bsky.embed.record#view", + }, + "media": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.images#view", + "lex:app.bsky.embed.video#view", + "lex:app.bsky.embed.external#view", + ], + }, + }, + }, + }, + }, + "AppBskyEmbedVideo": { + "lexicon": 1, + "id": "app.bsky.embed.video", + "description": "A video embedded in a Bluesky record (eg, a post).", + "defs": { + "main": { + "type": "object", + "required": [ + "video", + ], + "properties": { + "video": { + "type": "blob", + "accept": [ + "video/mp4", + ], + "maxSize": 50000000, + }, + "captions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.embed.video#caption", + }, + "maxLength": 20, + }, + "alt": { + "type": "string", + "description": + "Alt text description of the video, for accessibility.", + "maxGraphemes": 1000, + "maxLength": 10000, + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:app.bsky.embed.defs#aspectRatio", + }, + }, + }, + "caption": { + "type": "object", + "required": [ + "lang", + "file", + ], + "properties": { + "lang": { + "type": "string", + "format": "language", + }, + "file": { + "type": "blob", + "accept": [ + "text/vtt", + ], + "maxSize": 20000, + }, + }, + }, + "view": { + "type": "object", + "required": [ + "cid", + "playlist", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "playlist": { + "type": "string", + "format": "uri", + }, + "thumbnail": { + "type": "string", + "format": "uri", + }, + "alt": { + "type": "string", + "maxGraphemes": 1000, + "maxLength": 10000, + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:app.bsky.embed.defs#aspectRatio", + }, + }, + }, + }, + }, + "AppBskyEmbedExternal": { + "lexicon": 1, + "id": "app.bsky.embed.external", + "defs": { + "main": { + "type": "object", + "description": + "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).", + "required": [ + "external", + ], + "properties": { + "external": { + "type": "ref", + "ref": "lex:app.bsky.embed.external#external", + }, + }, + }, + "external": { + "type": "object", + "required": [ + "uri", + "title", + "description", + ], + "properties": { + "uri": { + "type": "string", + "format": "uri", + }, + "title": { + "type": "string", + }, + "description": { + "type": "string", + }, + "thumb": { + "type": "blob", + "accept": [ + "image/*", + ], + "maxSize": 1000000, + }, + }, + }, + "view": { + "type": "object", + "required": [ + "external", + ], + "properties": { + "external": { + "type": "ref", + "ref": "lex:app.bsky.embed.external#viewExternal", + }, + }, + }, + "viewExternal": { + "type": "object", + "required": [ + "uri", + "title", + "description", + ], + "properties": { + "uri": { + "type": "string", + "format": "uri", + }, + "title": { + "type": "string", + }, + "description": { + "type": "string", + }, + "thumb": { + "type": "string", + "format": "uri", + }, + }, + }, + }, + }, + "AppBskyNotificationRegisterPush": { + "lexicon": 1, + "id": "app.bsky.notification.registerPush", + "defs": { + "main": { + "type": "procedure", + "description": + "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "serviceDid", + "token", + "platform", + "appId", + ], + "properties": { + "serviceDid": { + "type": "string", + "format": "did", + }, + "token": { + "type": "string", + }, + "platform": { + "type": "string", + "knownValues": [ + "ios", + "android", + "web", + ], + }, + "appId": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "AppBskyNotificationPutPreferences": { + "lexicon": 1, + "id": "app.bsky.notification.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": + "Set notification-related preferences for an account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "priority", + ], + "properties": { + "priority": { + "type": "boolean", + }, + }, + }, + }, + }, + }, + }, + "AppBskyNotificationUpdateSeen": { + "lexicon": 1, + "id": "app.bsky.notification.updateSeen", + "defs": { + "main": { + "type": "procedure", + "description": + "Notify server that the requesting account has seen notifications. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "seenAt", + ], + "properties": { + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + }, + "AppBskyNotificationListNotifications": { + "lexicon": 1, + "id": "app.bsky.notification.listNotifications", + "defs": { + "main": { + "type": "query", + "description": + "Enumerate notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "reasons": { + "description": "Notification reasons to include in response.", + "type": "array", + "items": { + "type": "string", + "description": + "A reason that matches the reason property of #notification.", + }, + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "priority": { + "type": "boolean", + }, + "cursor": { + "type": "string", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "notifications", + ], + "properties": { + "cursor": { + "type": "string", + }, + "notifications": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:app.bsky.notification.listNotifications#notification", + }, + }, + "priority": { + "type": "boolean", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + "notification": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "reason", + "record", + "isRead", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "reason": { + "type": "string", + "description": + "Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'.", + "knownValues": [ + "like", + "repost", + "follow", + "mention", + "reply", + "quote", + "starterpack-joined", + ], + }, + "reasonSubject": { + "type": "string", + "format": "at-uri", + }, + "record": { + "type": "unknown", + }, + "isRead": { + "type": "boolean", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + }, + }, + "AppBskyNotificationGetUnreadCount": { + "lexicon": 1, + "id": "app.bsky.notification.getUnreadCount", + "defs": { + "main": { + "type": "query", + "description": + "Count the number of unread notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "priority": { + "type": "boolean", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "count", + ], + "properties": { + "count": { + "type": "integer", + }, + }, + }, + }, + }, + }, + }, + "AppBskyUnspeccedSearchStarterPacksSkeleton": { + "lexicon": 1, + "id": "app.bsky.unspecced.searchStarterPacksSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Starter Pack search, returns only skeleton.", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "viewer": { + "type": "string", + "format": "did", + "description": + "DID of the account making the request (not included for public/unauthenticated queries).", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": + "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "starterPacks", + ], + "properties": { + "cursor": { + "type": "string", + }, + "hitsTotal": { + "type": "integer", + "description": + "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:app.bsky.unspecced.defs#skeletonSearchStarterPack", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BadQueryString", + }, + ], + }, + }, + }, + "AppBskyUnspeccedDefs": { + "lexicon": 1, + "id": "app.bsky.unspecced.defs", + "defs": { + "skeletonSearchPost": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "skeletonSearchActor": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "skeletonSearchStarterPack": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "trendingTopic": { + "type": "object", + "required": [ + "topic", + "link", + ], + "properties": { + "topic": { + "type": "string", + }, + "displayName": { + "type": "string", + }, + "description": { + "type": "string", + }, + "link": { + "type": "string", + }, + }, + }, + }, + }, + "AppBskyUnspeccedSearchActorsSkeleton": { + "lexicon": 1, + "id": "app.bsky.unspecced.searchActorsSkeleton", + "defs": { + "main": { + "type": "query", + "description": + "Backend Actors (profile) search, returns only skeleton.", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax.", + }, + "viewer": { + "type": "string", + "format": "did", + "description": + "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", + }, + "typeahead": { + "type": "boolean", + "description": "If true, acts as fast/simple 'typeahead' query.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": + "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "hitsTotal": { + "type": "integer", + "description": + "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.unspecced.defs#skeletonSearchActor", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BadQueryString", + }, + ], + }, + }, + }, + "AppBskyUnspeccedGetSuggestionsSkeleton": { + "lexicon": 1, + "id": "app.bsky.unspecced.getSuggestionsSkeleton", + "defs": { + "main": { + "type": "query", + "description": + "Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": + "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "relativeToDid": { + "type": "string", + "format": "did", + "description": + "DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.unspecced.defs#skeletonSearchActor", + }, + }, + "relativeToDid": { + "type": "string", + "format": "did", + "description": + "DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer.", + }, + "recId": { + "type": "integer", + "description": + "Snowflake for this recommendation, use when submitting recommendation events.", + }, + }, + }, + }, + }, + }, + }, + "AppBskyUnspeccedSearchPostsSkeleton": { + "lexicon": 1, + "id": "app.bsky.unspecced.searchPostsSkeleton", + "defs": { + "main": { + "type": "query", + "description": "Backend Posts search, returns only skeleton", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "sort": { + "type": "string", + "knownValues": [ + "top", + "latest", + ], + "default": "latest", + "description": "Specifies the ranking order of results.", + }, + "since": { + "type": "string", + "description": + "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).", + }, + "until": { + "type": "string", + "description": + "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).", + }, + "mentions": { + "type": "string", + "format": "at-identifier", + "description": + "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.", + }, + "author": { + "type": "string", + "format": "at-identifier", + "description": + "Filter to posts by the given account. Handles are resolved to DID before query-time.", + }, + "lang": { + "type": "string", + "format": "language", + "description": + "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.", + }, + "domain": { + "type": "string", + "description": + "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.", + }, + "url": { + "type": "string", + "format": "uri", + "description": + "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.", + }, + "tag": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + "description": + "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.", + }, + "viewer": { + "type": "string", + "format": "did", + "description": + "DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": + "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "hitsTotal": { + "type": "integer", + "description": + "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.unspecced.defs#skeletonSearchPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BadQueryString", + }, + ], + }, + }, + }, + "AppBskyUnspeccedGetPopularFeedGenerators": { + "lexicon": 1, + "id": "app.bsky.unspecced.getPopularFeedGenerators", + "defs": { + "main": { + "type": "query", + "description": "An unspecced view of globally popular feed generators.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "query": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyUnspeccedGetTrendingTopics": { + "lexicon": 1, + "id": "app.bsky.unspecced.getTrendingTopics", + "defs": { + "main": { + "type": "query", + "description": "Get a list of trending topics", + "parameters": { + "type": "params", + "properties": { + "viewer": { + "type": "string", + "format": "did", + "description": + "DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 25, + "default": 10, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "topics", + "suggested", + ], + "properties": { + "topics": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.unspecced.defs#trendingTopic", + }, + }, + "suggested": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.unspecced.defs#trendingTopic", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyUnspeccedGetTaggedSuggestions": { + "lexicon": 1, + "id": "app.bsky.unspecced.getTaggedSuggestions", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of suggestions (feeds and users) tagged with categories", + "parameters": { + "type": "params", + "properties": {}, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "suggestions", + ], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:app.bsky.unspecced.getTaggedSuggestions#suggestion", + }, + }, + }, + }, + }, + }, + "suggestion": { + "type": "object", + "required": [ + "tag", + "subjectType", + "subject", + ], + "properties": { + "tag": { + "type": "string", + }, + "subjectType": { + "type": "string", + "knownValues": [ + "actor", + "feed", + ], + }, + "subject": { + "type": "string", + "format": "uri", + }, + }, + }, + }, + }, + "AppBskyUnspeccedGetConfig": { + "lexicon": 1, + "id": "app.bsky.unspecced.getConfig", + "defs": { + "main": { + "type": "query", + "description": "Get miscellaneous runtime configuration.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [], + "properties": { + "checkEmailConfirmed": { + "type": "boolean", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetStarterPacks": { + "lexicon": 1, + "id": "app.bsky.graph.getStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Get views for a list of starter packs.", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "starterPacks", + ], + "properties": { + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetSuggestedFollowsByActor": { + "lexicon": 1, + "id": "app.bsky.graph.getSuggestedFollowsByActor", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "suggestions", + ], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + "isFallback": { + "type": "boolean", + "description": + "If true, response has fallen-back to generic results, and is not scoped using relativeToDid", + "default": false, + }, + "recId": { + "type": "integer", + "description": + "Snowflake for this recommendation, use when submitting recommendation events.", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphBlock": { + "lexicon": 1, + "id": "app.bsky.graph.block", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "did", + "description": "DID of the account to be blocked.", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyGraphFollow": { + "lexicon": 1, + "id": "app.bsky.graph.follow", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "did", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyGraphDefs": { + "lexicon": 1, + "id": "app.bsky.graph.defs", + "defs": { + "listViewBasic": { + "type": "object", + "required": [ + "uri", + "cid", + "name", + "purpose", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + }, + "purpose": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listPurpose", + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "listItemCount": { + "type": "integer", + "minimum": 0, + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "listView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "name", + "purpose", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + }, + "purpose": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listPurpose", + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "listItemCount": { + "type": "integer", + "minimum": 0, + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "listItemView": { + "type": "object", + "required": [ + "uri", + "subject", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "subject": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + "starterPackView": { + "type": "object", + "required": [ + "uri", + "cid", + "record", + "creator", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "record": { + "type": "unknown", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + "list": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewBasic", + }, + "listItemsSample": { + "type": "array", + "maxLength": 12, + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listItemView", + }, + }, + "feeds": { + "type": "array", + "maxLength": 3, + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + }, + "joinedWeekCount": { + "type": "integer", + "minimum": 0, + }, + "joinedAllTimeCount": { + "type": "integer", + "minimum": 0, + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "starterPackViewBasic": { + "type": "object", + "required": [ + "uri", + "cid", + "record", + "creator", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "record": { + "type": "unknown", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + "listItemCount": { + "type": "integer", + "minimum": 0, + }, + "joinedWeekCount": { + "type": "integer", + "minimum": 0, + }, + "joinedAllTimeCount": { + "type": "integer", + "minimum": 0, + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "listPurpose": { + "type": "string", + "knownValues": [ + "app.bsky.graph.defs#modlist", + "app.bsky.graph.defs#curatelist", + "app.bsky.graph.defs#referencelist", + ], + }, + "modlist": { + "type": "token", + "description": + "A list of actors to apply an aggregate moderation action (mute/block) on.", + }, + "curatelist": { + "type": "token", + "description": + "A list of actors used for curation purposes such as list feeds or interaction gating.", + }, + "referencelist": { + "type": "token", + "description": + "A list of actors used for only for reference purposes such as within a starter pack.", + }, + "listViewerState": { + "type": "object", + "properties": { + "muted": { + "type": "boolean", + }, + "blocked": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "notFoundActor": { + "type": "object", + "description": "indicates that a handle or DID could not be resolved", + "required": [ + "actor", + "notFound", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "notFound": { + "type": "boolean", + "const": true, + }, + }, + }, + "relationship": { + "type": "object", + "description": + "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "following": { + "type": "string", + "format": "at-uri", + "description": + "if the actor follows this DID, this is the AT-URI of the follow record", + }, + "followedBy": { + "type": "string", + "format": "at-uri", + "description": + "if the actor is followed by this DID, contains the AT-URI of the follow record", + }, + }, + }, + }, + }, + "AppBskyGraphUnmuteActorList": { + "lexicon": 1, + "id": "app.bsky.graph.unmuteActorList", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified list of accounts. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "list", + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetListBlocks": { + "lexicon": 1, + "id": "app.bsky.graph.getListBlocks", + "defs": { + "main": { + "type": "query", + "description": + "Get mod lists that the requesting account (actor) is blocking. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "lists", + ], + "properties": { + "cursor": { + "type": "string", + }, + "lists": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphListblock": { + "lexicon": 1, + "id": "app.bsky.graph.listblock", + "defs": { + "main": { + "type": "record", + "description": + "Record representing a block relationship against an entire an entire list of accounts (actors).", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the mod list record.", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetStarterPack": { + "lexicon": 1, + "id": "app.bsky.graph.getStarterPack", + "defs": { + "main": { + "type": "query", + "description": "Gets a view of a starter pack.", + "parameters": { + "type": "params", + "required": [ + "starterPack", + ], + "properties": { + "starterPack": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of the starter pack record.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "starterPack", + ], + "properties": { + "starterPack": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#starterPackView", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphStarterpack": { + "lexicon": 1, + "id": "app.bsky.graph.starterpack", + "defs": { + "main": { + "type": "record", + "description": + "Record defining a starter pack of actors and feeds for new users.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "list", + "createdAt", + ], + "properties": { + "name": { + "type": "string", + "maxGraphemes": 50, + "maxLength": 500, + "minLength": 1, + "description": "Display name for starter pack; can not be empty.", + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the list record.", + }, + "feeds": { + "type": "array", + "maxLength": 3, + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.starterpack#feedItem", + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + "feedItem": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + "AppBskyGraphMuteActorList": { + "lexicon": 1, + "id": "app.bsky.graph.muteActorList", + "defs": { + "main": { + "type": "procedure", + "description": + "Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "list", + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphMuteThread": { + "lexicon": 1, + "id": "app.bsky.graph.muteThread", + "defs": { + "main": { + "type": "procedure", + "description": + "Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "root", + ], + "properties": { + "root": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphSearchStarterPacks": { + "lexicon": 1, + "id": "app.bsky.graph.searchStarterPacks", + "defs": { + "main": { + "type": "query", + "description": + "Find starter packs matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "starterPacks", + ], + "properties": { + "cursor": { + "type": "string", + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetActorStarterPacks": { + "lexicon": 1, + "id": "app.bsky.graph.getActorStarterPacks", + "defs": { + "main": { + "type": "query", + "description": "Get a list of starter packs created by the actor.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "starterPacks", + ], + "properties": { + "cursor": { + "type": "string", + }, + "starterPacks": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetLists": { + "lexicon": 1, + "id": "app.bsky.graph.getLists", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates the lists created by a specified account (actor).", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "The account (actor) to enumerate lists from.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "lists", + ], + "properties": { + "cursor": { + "type": "string", + }, + "lists": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetFollowers": { + "lexicon": 1, + "id": "app.bsky.graph.getFollowers", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which follow a specified account (actor).", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "followers", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphUnmuteThread": { + "lexicon": 1, + "id": "app.bsky.graph.unmuteThread", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified thread. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "root", + ], + "properties": { + "root": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphMuteActor": { + "lexicon": 1, + "id": "app.bsky.graph.muteActor", + "defs": { + "main": { + "type": "procedure", + "description": + "Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetMutes": { + "lexicon": 1, + "id": "app.bsky.graph.getMutes", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "mutes", + ], + "properties": { + "cursor": { + "type": "string", + }, + "mutes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphListitem": { + "lexicon": 1, + "id": "app.bsky.graph.listitem", + "defs": { + "main": { + "type": "record", + "description": + "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "list", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "did", + "description": "The account which is included on the list.", + }, + "list": { + "type": "string", + "format": "at-uri", + "description": + "Reference (AT-URI) to the list record (app.bsky.graph.list).", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyGraphList": { + "lexicon": 1, + "id": "app.bsky.graph.list", + "defs": { + "main": { + "type": "record", + "description": + "Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "purpose", + "createdAt", + ], + "properties": { + "purpose": { + "type": "ref", + "description": + "Defines the purpose of the list (aka, moderation-oriented or curration-oriented)", + "ref": "lex:app.bsky.graph.defs#listPurpose", + }, + "name": { + "type": "string", + "maxLength": 64, + "minLength": 1, + "description": "Display name for list; can not be empty.", + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "avatar": { + "type": "blob", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 1000000, + }, + "labels": { + "type": "union", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetKnownFollowers": { + "lexicon": 1, + "id": "app.bsky.graph.getKnownFollowers", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "followers", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetListMutes": { + "lexicon": 1, + "id": "app.bsky.graph.getListMutes", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "lists", + ], + "properties": { + "cursor": { + "type": "string", + }, + "lists": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetFollows": { + "lexicon": 1, + "id": "app.bsky.graph.getFollows", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which a specified account (actor) follows.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "follows", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "follows": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetBlocks": { + "lexicon": 1, + "id": "app.bsky.graph.getBlocks", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates which accounts the requesting account is currently blocking. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "blocks", + ], + "properties": { + "cursor": { + "type": "string", + }, + "blocks": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetRelationships": { + "lexicon": 1, + "id": "app.bsky.graph.getRelationships", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates public relationships between one account, and a list of other accounts. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Primary account requesting relationships for.", + }, + "others": { + "type": "array", + "description": + "List of 'other' accounts to be related back to the primary.", + "maxLength": 30, + "items": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "relationships", + ], + "properties": { + "actor": { + "type": "string", + "format": "did", + }, + "relationships": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.graph.defs#relationship", + "lex:app.bsky.graph.defs#notFoundActor", + ], + }, + }, + }, + }, + }, + "errors": [ + { + "name": "ActorNotFound", + "description": + "the primary actor at-identifier could not be resolved", + }, + ], + }, + }, + }, + "AppBskyGraphUnmuteActor": { + "lexicon": 1, + "id": "app.bsky.graph.unmuteActor", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + }, + }, + }, + "AppBskyGraphGetList": { + "lexicon": 1, + "id": "app.bsky.graph.getList", + "defs": { + "main": { + "type": "query", + "description": + "Gets a 'view' (with additional context) of a specified list.", + "parameters": { + "type": "params", + "required": [ + "list", + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + "description": + "Reference (AT-URI) of the list record to hydrate.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "list", + "items", + ], + "properties": { + "cursor": { + "type": "string", + }, + "list": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listView", + }, + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listItemView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGenerator": { + "lexicon": 1, + "id": "app.bsky.feed.generator", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", + "key": "any", + "record": { + "type": "object", + "required": [ + "did", + "displayName", + "createdAt", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "displayName": { + "type": "string", + "maxGraphemes": 24, + "maxLength": 240, + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "avatar": { + "type": "blob", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 1000000, + }, + "acceptsInteractions": { + "type": "boolean", + "description": + "Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions", + }, + "labels": { + "type": "union", + "description": "Self-label values", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "contentMode": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#contentModeUnspecified", + "app.bsky.feed.defs#contentModeVideo", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyFeedSendInteractions": { + "lexicon": 1, + "id": "app.bsky.feed.sendInteractions", + "defs": { + "main": { + "type": "procedure", + "description": + "Send information about interactions with feed items back to the feed generator that served them.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "interactions", + ], + "properties": { + "interactions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#interaction", + }, + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + }, + }, + }, + "AppBskyFeedDefs": { + "lexicon": 1, + "id": "app.bsky.feed.defs", + "defs": { + "postView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + "record": { + "type": "unknown", + }, + "embed": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.images#view", + "lex:app.bsky.embed.video#view", + "lex:app.bsky.embed.external#view", + "lex:app.bsky.embed.record#view", + "lex:app.bsky.embed.recordWithMedia#view", + ], + }, + "replyCount": { + "type": "integer", + }, + "repostCount": { + "type": "integer", + }, + "likeCount": { + "type": "integer", + }, + "quoteCount": { + "type": "integer", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "threadgate": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#threadgateView", + }, + }, + }, + "viewerState": { + "type": "object", + "description": + "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", + "properties": { + "repost": { + "type": "string", + "format": "at-uri", + }, + "like": { + "type": "string", + "format": "at-uri", + }, + "threadMuted": { + "type": "boolean", + }, + "replyDisabled": { + "type": "boolean", + }, + "embeddingDisabled": { + "type": "boolean", + }, + "pinned": { + "type": "boolean", + }, + }, + }, + "threadContext": { + "type": "object", + "description": + "Metadata about this post within the context of the thread it is in.", + "properties": { + "rootAuthorLike": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "feedViewPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#postView", + }, + "reply": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#replyRef", + }, + "reason": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#reasonRepost", + "lex:app.bsky.feed.defs#reasonPin", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context provided by feed generator that may be passed back alongside interactions.", + "maxLength": 2000, + }, + }, + }, + "replyRef": { + "type": "object", + "required": [ + "root", + "parent", + ], + "properties": { + "root": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#postView", + "lex:app.bsky.feed.defs#notFoundPost", + "lex:app.bsky.feed.defs#blockedPost", + ], + }, + "parent": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#postView", + "lex:app.bsky.feed.defs#notFoundPost", + "lex:app.bsky.feed.defs#blockedPost", + ], + }, + "grandparentAuthor": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + "description": + "When parent is a reply to another post, this is the author of that post.", + }, + }, + }, + "reasonRepost": { + "type": "object", + "required": [ + "by", + "indexedAt", + ], + "properties": { + "by": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "reasonPin": { + "type": "object", + "properties": {}, + }, + "threadViewPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#postView", + }, + "parent": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#threadViewPost", + "lex:app.bsky.feed.defs#notFoundPost", + "lex:app.bsky.feed.defs#blockedPost", + ], + }, + "replies": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#threadViewPost", + "lex:app.bsky.feed.defs#notFoundPost", + "lex:app.bsky.feed.defs#blockedPost", + ], + }, + }, + "threadContext": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#threadContext", + }, + }, + }, + "notFoundPost": { + "type": "object", + "required": [ + "uri", + "notFound", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "notFound": { + "type": "boolean", + "const": true, + }, + }, + }, + "blockedPost": { + "type": "object", + "required": [ + "uri", + "blocked", + "author", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "blocked": { + "type": "boolean", + "const": true, + }, + "author": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#blockedAuthor", + }, + }, + }, + "blockedAuthor": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#viewerState", + }, + }, + }, + "generatorView": { + "type": "object", + "required": [ + "uri", + "cid", + "did", + "creator", + "displayName", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "did": { + "type": "string", + "format": "did", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "displayName": { + "type": "string", + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "acceptsInteractions": { + "type": "boolean", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorViewerState", + }, + "contentMode": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#contentModeUnspecified", + "app.bsky.feed.defs#contentModeVideo", + ], + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "generatorViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "skeletonFeedPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + }, + "reason": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#skeletonReasonRepost", + "lex:app.bsky.feed.defs#skeletonReasonPin", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", + "maxLength": 2000, + }, + }, + }, + "skeletonReasonRepost": { + "type": "object", + "required": [ + "repost", + ], + "properties": { + "repost": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "skeletonReasonPin": { + "type": "object", + "properties": {}, + }, + "threadgateView": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "record": { + "type": "unknown", + }, + "lists": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewBasic", + }, + }, + }, + }, + "interaction": { + "type": "object", + "properties": { + "item": { + "type": "string", + "format": "at-uri", + }, + "event": { + "type": "string", + "knownValues": [ + "app.bsky.feed.defs#requestLess", + "app.bsky.feed.defs#requestMore", + "app.bsky.feed.defs#clickthroughItem", + "app.bsky.feed.defs#clickthroughAuthor", + "app.bsky.feed.defs#clickthroughReposter", + "app.bsky.feed.defs#clickthroughEmbed", + "app.bsky.feed.defs#interactionSeen", + "app.bsky.feed.defs#interactionLike", + "app.bsky.feed.defs#interactionRepost", + "app.bsky.feed.defs#interactionReply", + "app.bsky.feed.defs#interactionQuote", + "app.bsky.feed.defs#interactionShare", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", + "maxLength": 2000, + }, + }, + }, + "requestLess": { + "type": "token", + "description": + "Request that less content like the given feed item be shown in the feed", + }, + "requestMore": { + "type": "token", + "description": + "Request that more content like the given feed item be shown in the feed", + }, + "clickthroughItem": { + "type": "token", + "description": "User clicked through to the feed item", + }, + "clickthroughAuthor": { + "type": "token", + "description": "User clicked through to the author of the feed item", + }, + "clickthroughReposter": { + "type": "token", + "description": "User clicked through to the reposter of the feed item", + }, + "clickthroughEmbed": { + "type": "token", + "description": + "User clicked through to the embedded content of the feed item", + }, + "contentModeUnspecified": { + "type": "token", + "description": + "Declares the feed generator returns any types of posts.", + }, + "contentModeVideo": { + "type": "token", + "description": + "Declares the feed generator returns posts containing app.bsky.embed.video embeds.", + }, + "interactionSeen": { + "type": "token", + "description": "Feed item was seen by user", + }, + "interactionLike": { + "type": "token", + "description": "User liked the feed item", + }, + "interactionRepost": { + "type": "token", + "description": "User reposted the feed item", + }, + "interactionReply": { + "type": "token", + "description": "User replied to the feed item", + }, + "interactionQuote": { + "type": "token", + "description": "User quoted the feed item", + }, + "interactionShare": { + "type": "token", + "description": "User shared the feed item", + }, + }, + }, + "AppBskyFeedGetFeedGenerators": { + "lexicon": 1, + "id": "app.bsky.feed.getFeedGenerators", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of feed generators.", + "parameters": { + "type": "params", + "required": [ + "feeds", + ], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetTimeline": { + "lexicon": 1, + "id": "app.bsky.feed.getTimeline", + "defs": { + "main": { + "type": "query", + "description": + "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", + "parameters": { + "type": "params", + "properties": { + "algorithm": { + "type": "string", + "description": + "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetFeedGenerator": { + "lexicon": 1, + "id": "app.bsky.feed.getFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": + "Get information about a feed generator. Implemented by AppView.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the feed generator record.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "view", + "isOnline", + "isValid", + ], + "properties": { + "view": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + "isOnline": { + "type": "boolean", + "description": + "Indicates whether the feed generator service has been online recently, or else seems to be inactive.", + }, + "isValid": { + "type": "boolean", + "description": + "Indicates whether the feed generator service is compatible with the record declaration.", + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetAuthorFeed": { + "lexicon": 1, + "id": "app.bsky.feed.getAuthorFeed", + "defs": { + "main": { + "type": "query", + "description": + "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "filter": { + "type": "string", + "description": + "Combinations of post/repost types to include in response.", + "knownValues": [ + "posts_with_replies", + "posts_no_replies", + "posts_with_media", + "posts_and_author_threads", + "posts_with_video", + ], + "default": "posts_with_replies", + }, + "includePins": { + "type": "boolean", + "default": false, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BlockedActor", + }, + { + "name": "BlockedByActor", + }, + ], + }, + }, + }, + "AppBskyFeedGetLikes": { + "lexicon": 1, + "id": "app.bsky.feed.getLikes", + "defs": { + "main": { + "type": "query", + "description": + "Get like records which reference a subject (by AT-URI and CID).", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the subject (eg, a post record).", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "CID of the subject record (aka, specific version of record), to filter likes.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "likes", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "cursor": { + "type": "string", + }, + "likes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.getLikes#like", + }, + }, + }, + }, + }, + }, + "like": { + "type": "object", + "required": [ + "indexedAt", + "createdAt", + "actor", + ], + "properties": { + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "actor": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + "AppBskyFeedPostgate": { + "lexicon": 1, + "id": "app.bsky.feed.postgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": + "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": [ + "post", + "createdAt", + ], + "properties": { + "createdAt": { + "type": "string", + "format": "datetime", + }, + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record.", + }, + "detachedEmbeddingUris": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri", + }, + "description": + "List of AT-URIs embedding this post that the author has detached from.", + }, + "embeddingRules": { + "description": + "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.postgate#disableRule", + ], + }, + }, + }, + }, + }, + "disableRule": { + "type": "object", + "description": "Disables embedding of this post.", + "properties": {}, + }, + }, + }, + "AppBskyFeedThreadgate": { + "lexicon": 1, + "id": "app.bsky.feed.threadgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": + "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": [ + "post", + "createdAt", + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record.", + }, + "allow": { + "description": + "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.threadgate#mentionRule", + "lex:app.bsky.feed.threadgate#followerRule", + "lex:app.bsky.feed.threadgate#followingRule", + "lex:app.bsky.feed.threadgate#listRule", + ], + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "hiddenReplies": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri", + }, + "description": "List of hidden reply URIs.", + }, + }, + }, + }, + "mentionRule": { + "type": "object", + "description": "Allow replies from actors mentioned in your post.", + "properties": {}, + }, + "followerRule": { + "type": "object", + "description": "Allow replies from actors who follow you.", + "properties": {}, + }, + "followingRule": { + "type": "object", + "description": "Allow replies from actors you follow.", + "properties": {}, + }, + "listRule": { + "type": "object", + "description": "Allow replies from actors on a list.", + "required": [ + "list", + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + "AppBskyFeedGetPostThread": { + "lexicon": 1, + "id": "app.bsky.feed.getPostThread", + "defs": { + "main": { + "type": "query", + "description": + "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to post record.", + }, + "depth": { + "type": "integer", + "description": + "How many levels of reply depth should be included in response.", + "default": 6, + "minimum": 0, + "maximum": 1000, + }, + "parentHeight": { + "type": "integer", + "description": + "How many levels of parent (and grandparent, etc) post to include.", + "default": 80, + "minimum": 0, + "maximum": 1000, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "thread", + ], + "properties": { + "thread": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.defs#threadViewPost", + "lex:app.bsky.feed.defs#notFoundPost", + "lex:app.bsky.feed.defs#blockedPost", + ], + }, + "threadgate": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#threadgateView", + }, + }, + }, + }, + "errors": [ + { + "name": "NotFound", + }, + ], + }, + }, + }, + "AppBskyFeedGetActorLikes": { + "lexicon": 1, + "id": "app.bsky.feed.getActorLikes", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BlockedActor", + }, + { + "name": "BlockedByActor", + }, + ], + }, + }, + }, + "AppBskyFeedLike": { + "lexicon": 1, + "id": "app.bsky.feed.like", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a 'like' of a piece of subject content.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "via": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetRepostedBy": { + "lexicon": 1, + "id": "app.bsky.feed.getRepostedBy", + "defs": { + "main": { + "type": "query", + "description": "Get a list of reposts for a given post.", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of post record", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "If supplied, filters to reposts of specific version (by CID) of the post record.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "repostedBy", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "cursor": { + "type": "string", + }, + "repostedBy": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedRepost": { + "lexicon": 1, + "id": "app.bsky.feed.repost", + "defs": { + "main": { + "description": + "Record representing a 'repost' of an existing Bluesky post.", + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "via": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + }, + }, + "AppBskyFeedDescribeFeedGenerator": { + "lexicon": 1, + "id": "app.bsky.feed.describeFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": + "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "feeds", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.describeFeedGenerator#feed", + }, + }, + "links": { + "type": "ref", + "ref": "lex:app.bsky.feed.describeFeedGenerator#links", + }, + }, + }, + }, + }, + "feed": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "links": { + "type": "object", + "properties": { + "privacyPolicy": { + "type": "string", + }, + "termsOfService": { + "type": "string", + }, + }, + }, + }, + }, + "AppBskyFeedSearchPosts": { + "lexicon": 1, + "id": "app.bsky.feed.searchPosts", + "defs": { + "main": { + "type": "query", + "description": + "Find posts matching search criteria, returning views of those posts.", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "sort": { + "type": "string", + "knownValues": [ + "top", + "latest", + ], + "default": "latest", + "description": "Specifies the ranking order of results.", + }, + "since": { + "type": "string", + "description": + "Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD).", + }, + "until": { + "type": "string", + "description": + "Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD).", + }, + "mentions": { + "type": "string", + "format": "at-identifier", + "description": + "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.", + }, + "author": { + "type": "string", + "format": "at-identifier", + "description": + "Filter to posts by the given account. Handles are resolved to DID before query-time.", + }, + "lang": { + "type": "string", + "format": "language", + "description": + "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.", + }, + "domain": { + "type": "string", + "description": + "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.", + }, + "url": { + "type": "string", + "format": "uri", + "description": + "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.", + }, + "tag": { + "type": "array", + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + "description": + "Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": + "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "hitsTotal": { + "type": "integer", + "description": + "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#postView", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BadQueryString", + }, + ], + }, + }, + }, + "AppBskyFeedGetPosts": { + "lexicon": 1, + "id": "app.bsky.feed.getPosts", + "defs": { + "main": { + "type": "query", + "description": + "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "description": + "List of post AT-URIs to return hydrated views for.", + "items": { + "type": "string", + "format": "at-uri", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#postView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetFeed": { + "lexicon": 1, + "id": "app.bsky.feed.getFeed", + "defs": { + "main": { + "type": "query", + "description": + "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "UnknownFeed", + }, + ], + }, + }, + }, + "AppBskyFeedGetQuotes": { + "lexicon": 1, + "id": "app.bsky.feed.getQuotes", + "defs": { + "main": { + "type": "query", + "description": "Get a list of quotes for a given post.", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of post record", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "If supplied, filters to quotes of specific version (by CID) of the post record.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "posts", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "cursor": { + "type": "string", + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#postView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetFeedSkeleton": { + "lexicon": 1, + "id": "app.bsky.feed.getFeedSkeleton", + "defs": { + "main": { + "type": "query", + "description": + "Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": + "Reference to feed generator record describing the specific feed being requested.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#skeletonFeedPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "UnknownFeed", + }, + ], + }, + }, + }, + "AppBskyFeedGetListFeed": { + "lexicon": 1, + "id": "app.bsky.feed.getListFeed", + "defs": { + "main": { + "type": "query", + "description": + "Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "list", + ], + "properties": { + "list": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the list record.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "UnknownList", + }, + ], + }, + }, + }, + "AppBskyFeedGetSuggestedFeeds": { + "lexicon": 1, + "id": "app.bsky.feed.getSuggestedFeeds", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of suggested feeds (feed generators) for the requesting account.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedGetActorFeeds": { + "lexicon": 1, + "id": "app.bsky.feed.getActorFeeds", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyFeedPost": { + "lexicon": 1, + "id": "app.bsky.feed.post", + "defs": { + "main": { + "type": "record", + "description": "Record containing a Bluesky post.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "text", + "createdAt", + ], + "properties": { + "text": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300, + "description": + "The primary post content. May be an empty string, if there are embeds.", + }, + "entities": { + "type": "array", + "description": "DEPRECATED: replaced by app.bsky.richtext.facet.", + "items": { + "type": "ref", + "ref": "lex:app.bsky.feed.post#entity", + }, + }, + "facets": { + "type": "array", + "description": + "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "reply": { + "type": "ref", + "ref": "lex:app.bsky.feed.post#replyRef", + }, + "embed": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.images", + "lex:app.bsky.embed.video", + "lex:app.bsky.embed.external", + "lex:app.bsky.embed.record", + "lex:app.bsky.embed.recordWithMedia", + ], + }, + "langs": { + "type": "array", + "description": + "Indicates human language of post primary text content.", + "maxLength": 3, + "items": { + "type": "string", + "format": "language", + }, + }, + "labels": { + "type": "union", + "description": + "Self-label values for this post. Effectively content warnings.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "tags": { + "type": "array", + "description": + "Additional hashtags, in addition to any included in post text and facets.", + "maxLength": 8, + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Client-declared timestamp when this post was originally created.", + }, + }, + }, + }, + "replyRef": { + "type": "object", + "required": [ + "root", + "parent", + ], + "properties": { + "root": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "parent": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + "entity": { + "type": "object", + "description": "Deprecated: use facets instead.", + "required": [ + "index", + "type", + "value", + ], + "properties": { + "index": { + "type": "ref", + "ref": "lex:app.bsky.feed.post#textSlice", + }, + "type": { + "type": "string", + "description": "Expected values are 'mention' and 'link'.", + }, + "value": { + "type": "string", + }, + }, + }, + "textSlice": { + "type": "object", + "description": + "Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.", + "required": [ + "start", + "end", + ], + "properties": { + "start": { + "type": "integer", + "minimum": 0, + }, + "end": { + "type": "integer", + "minimum": 0, + }, + }, + }, + }, + }, + "AppBskyRichtextFacet": { + "lexicon": 1, + "id": "app.bsky.richtext.facet", + "defs": { + "main": { + "type": "object", + "description": "Annotation of a sub-string within rich text.", + "required": [ + "index", + "features", + ], + "properties": { + "index": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet#byteSlice", + }, + "features": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.richtext.facet#mention", + "lex:app.bsky.richtext.facet#link", + "lex:app.bsky.richtext.facet#tag", + ], + }, + }, + }, + }, + "mention": { + "type": "object", + "description": + "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "link": { + "type": "object", + "description": + "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "uri", + }, + }, + }, + "tag": { + "type": "object", + "description": + "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", + "required": [ + "tag", + ], + "properties": { + "tag": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + }, + }, + "byteSlice": { + "type": "object", + "description": + "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", + "required": [ + "byteStart", + "byteEnd", + ], + "properties": { + "byteStart": { + "type": "integer", + "minimum": 0, + }, + "byteEnd": { + "type": "integer", + "minimum": 0, + }, + }, + }, + }, + }, + "AppBskyActorSearchActorsTypeahead": { + "lexicon": 1, + "id": "app.bsky.actor.searchActorsTypeahead", + "defs": { + "main": { + "type": "query", + "description": + "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead.", + }, + "q": { + "type": "string", + "description": "Search query prefix; not a full query string.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorDefs": { + "lexicon": 1, + "id": "app.bsky.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "associated": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileAssociated", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "profileView": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "associated": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileAssociated", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "profileViewDetailed": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "banner": { + "type": "string", + "format": "uri", + }, + "followersCount": { + "type": "integer", + }, + "followsCount": { + "type": "integer", + }, + "postsCount": { + "type": "integer", + }, + "associated": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileAssociated", + }, + "joinedViaStarterPack": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#starterPackViewBasic", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "pinnedPost": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + "profileAssociated": { + "type": "object", + "properties": { + "lists": { + "type": "integer", + }, + "feedgens": { + "type": "integer", + }, + "starterPacks": { + "type": "integer", + }, + "labeler": { + "type": "boolean", + }, + "chat": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileAssociatedChat", + }, + }, + }, + "profileAssociatedChat": { + "type": "object", + "required": [ + "allowIncoming", + ], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": [ + "all", + "none", + "following", + ], + }, + }, + }, + "viewerState": { + "type": "object", + "description": + "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", + "properties": { + "muted": { + "type": "boolean", + }, + "mutedByList": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewBasic", + }, + "blockedBy": { + "type": "boolean", + }, + "blocking": { + "type": "string", + "format": "at-uri", + }, + "blockingByList": { + "type": "ref", + "ref": "lex:app.bsky.graph.defs#listViewBasic", + }, + "following": { + "type": "string", + "format": "at-uri", + }, + "followedBy": { + "type": "string", + "format": "at-uri", + }, + "knownFollowers": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#knownFollowers", + }, + }, + }, + "knownFollowers": { + "type": "object", + "description": "The subject's followers whom you also follow", + "required": [ + "count", + "followers", + ], + "properties": { + "count": { + "type": "integer", + }, + "followers": { + "type": "array", + "minLength": 0, + "maxLength": 5, + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewBasic", + }, + }, + }, + }, + "preferences": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.actor.defs#adultContentPref", + "lex:app.bsky.actor.defs#contentLabelPref", + "lex:app.bsky.actor.defs#savedFeedsPref", + "lex:app.bsky.actor.defs#savedFeedsPrefV2", + "lex:app.bsky.actor.defs#personalDetailsPref", + "lex:app.bsky.actor.defs#feedViewPref", + "lex:app.bsky.actor.defs#threadViewPref", + "lex:app.bsky.actor.defs#interestsPref", + "lex:app.bsky.actor.defs#mutedWordsPref", + "lex:app.bsky.actor.defs#hiddenPostsPref", + "lex:app.bsky.actor.defs#bskyAppStatePref", + "lex:app.bsky.actor.defs#labelersPref", + "lex:app.bsky.actor.defs#postInteractionSettingsPref", + ], + }, + }, + "adultContentPref": { + "type": "object", + "required": [ + "enabled", + ], + "properties": { + "enabled": { + "type": "boolean", + "default": false, + }, + }, + }, + "contentLabelPref": { + "type": "object", + "required": [ + "label", + "visibility", + ], + "properties": { + "labelerDid": { + "type": "string", + "description": + "Which labeler does this preference apply to? If undefined, applies globally.", + "format": "did", + }, + "label": { + "type": "string", + }, + "visibility": { + "type": "string", + "knownValues": [ + "ignore", + "show", + "warn", + "hide", + ], + }, + }, + }, + "savedFeed": { + "type": "object", + "required": [ + "id", + "type", + "value", + "pinned", + ], + "properties": { + "id": { + "type": "string", + }, + "type": { + "type": "string", + "knownValues": [ + "feed", + "list", + "timeline", + ], + }, + "value": { + "type": "string", + }, + "pinned": { + "type": "boolean", + }, + }, + }, + "savedFeedsPrefV2": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#savedFeed", + }, + }, + }, + }, + "savedFeedsPref": { + "type": "object", + "required": [ + "pinned", + "saved", + ], + "properties": { + "pinned": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + }, + "saved": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + }, + "timelineIndex": { + "type": "integer", + }, + }, + }, + "personalDetailsPref": { + "type": "object", + "properties": { + "birthDate": { + "type": "string", + "format": "datetime", + "description": "The birth date of account owner.", + }, + }, + }, + "feedViewPref": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "description": + "The URI of the feed, or an identifier which describes the feed.", + }, + "hideReplies": { + "type": "boolean", + "description": "Hide replies in the feed.", + }, + "hideRepliesByUnfollowed": { + "type": "boolean", + "description": + "Hide replies in the feed if they are not by followed users.", + "default": true, + }, + "hideRepliesByLikeCount": { + "type": "integer", + "description": + "Hide replies in the feed if they do not have this number of likes.", + }, + "hideReposts": { + "type": "boolean", + "description": "Hide reposts in the feed.", + }, + "hideQuotePosts": { + "type": "boolean", + "description": "Hide quote posts in the feed.", + }, + }, + }, + "threadViewPref": { + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "Sorting mode for threads.", + "knownValues": [ + "oldest", + "newest", + "most-likes", + "random", + "hotness", + ], + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": "Show followed users at the top of all replies.", + }, + }, + }, + "interestsPref": { + "type": "object", + "required": [ + "tags", + ], + "properties": { + "tags": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + "description": + "A list of tags which describe the account owner's interests gathered during onboarding.", + }, + }, + }, + "mutedWordTarget": { + "type": "string", + "knownValues": [ + "content", + "tag", + ], + "maxLength": 640, + "maxGraphemes": 64, + }, + "mutedWord": { + "type": "object", + "description": "A word that the account owner has muted.", + "required": [ + "value", + "targets", + ], + "properties": { + "id": { + "type": "string", + }, + "value": { + "type": "string", + "description": "The muted word itself.", + "maxLength": 10000, + "maxGraphemes": 1000, + }, + "targets": { + "type": "array", + "description": "The intended targets of the muted word.", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#mutedWordTarget", + }, + }, + "actorTarget": { + "type": "string", + "description": + "Groups of users to apply the muted word to. If undefined, applies to all users.", + "knownValues": [ + "all", + "exclude-following", + ], + "default": "all", + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": + "The date and time at which the muted word will expire and no longer be applied.", + }, + }, + }, + "mutedWordsPref": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#mutedWord", + }, + "description": "A list of words the account owner has muted.", + }, + }, + }, + "hiddenPostsPref": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + "description": + "A list of URIs of posts the account owner has hidden.", + }, + }, + }, + "labelersPref": { + "type": "object", + "required": [ + "labelers", + ], + "properties": { + "labelers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#labelerPrefItem", + }, + }, + }, + }, + "labelerPrefItem": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "bskyAppStatePref": { + "description": + "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.", + "type": "object", + "properties": { + "activeProgressGuide": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#bskyAppProgressGuide", + }, + "queuedNudges": { + "description": + "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.", + "type": "array", + "maxLength": 1000, + "items": { + "type": "string", + "maxLength": 100, + }, + }, + "nuxs": { + "description": "Storage for NUXs the user has encountered.", + "type": "array", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#nux", + }, + }, + }, + }, + "bskyAppProgressGuide": { + "description": + "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.", + "type": "object", + "required": [ + "guide", + ], + "properties": { + "guide": { + "type": "string", + "maxLength": 100, + }, + }, + }, + "nux": { + "type": "object", + "description": "A new user experiences (NUX) storage object", + "required": [ + "id", + "completed", + ], + "properties": { + "id": { + "type": "string", + "maxLength": 100, + }, + "completed": { + "type": "boolean", + "default": false, + }, + "data": { + "description": + "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300, + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": + "The date and time at which the NUX will expire and should be considered completed.", + }, + }, + }, + "postInteractionSettingsPref": { + "type": "object", + "description": + "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", + "required": [], + "properties": { + "threadgateAllowRules": { + "description": + "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.threadgate#mentionRule", + "lex:app.bsky.feed.threadgate#followerRule", + "lex:app.bsky.feed.threadgate#followingRule", + "lex:app.bsky.feed.threadgate#listRule", + ], + }, + }, + "postgateEmbeddingRules": { + "description": + "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.feed.postgate#disableRule", + ], + }, + }, + }, + }, + }, + }, + "AppBskyActorPutPreferences": { + "lexicon": 1, + "id": "app.bsky.actor.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": "Set the private preferences attached to the account.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "preferences", + ], + "properties": { + "preferences": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#preferences", + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorGetProfile": { + "lexicon": 1, + "id": "app.bsky.actor.getProfile", + "defs": { + "main": { + "type": "query", + "description": + "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Handle or DID of account to fetch profile of.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewDetailed", + }, + }, + }, + }, + }, + "AppBskyActorGetSuggestions": { + "lexicon": 1, + "id": "app.bsky.actor.getSuggestions", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + "recId": { + "type": "integer", + "description": + "Snowflake for this recommendation, use when submitting recommendation events.", + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorSearchActors": { + "lexicon": 1, + "id": "app.bsky.actor.searchActors", + "defs": { + "main": { + "type": "query", + "description": + "Find actors (profiles) matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "term": { + "type": "string", + "description": "DEPRECATED: use 'q' instead.", + }, + "q": { + "type": "string", + "description": + "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorGetProfiles": { + "lexicon": 1, + "id": "app.bsky.actor.getProfiles", + "defs": { + "main": { + "type": "query", + "description": "Get detailed profile views of multiple actors.", + "parameters": { + "type": "params", + "required": [ + "actors", + ], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "string", + "format": "at-identifier", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "profiles", + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileViewDetailed", + }, + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorGetPreferences": { + "lexicon": 1, + "id": "app.bsky.actor.getPreferences", + "defs": { + "main": { + "type": "query", + "description": + "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", + "parameters": { + "type": "params", + "properties": {}, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "preferences", + ], + "properties": { + "preferences": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#preferences", + }, + }, + }, + }, + }, + }, + }, + "AppBskyActorProfile": { + "lexicon": 1, + "id": "app.bsky.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Bluesky account profile.", + "key": "literal:self", + "record": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "blob", + "description": + "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 1000000, + }, + "banner": { + "type": "blob", + "description": + "Larger horizontal image to display behind profile view.", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 1000000, + }, + "labels": { + "type": "union", + "description": + "Self-label values, specific to the Bluesky application, on the overall account.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "joinedViaStarterPack": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "pinnedPost": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "AppBskyLabelerDefs": { + "lexicon": 1, + "id": "app.bsky.labeler.defs", + "defs": { + "labelerView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.labeler.defs#labelerViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "labelerViewDetailed": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "policies", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "creator": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileView", + }, + "policies": { + "type": "ref", + "ref": "lex:app.bsky.labeler.defs#labelerPolicies", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.labeler.defs#labelerViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "reasonTypes": { + "description": + "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#reasonType", + }, + }, + "subjectTypes": { + "description": + "The set of subject types (account, record, etc) this service accepts reports on.", + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#subjectType", + }, + }, + "subjectCollections": { + "type": "array", + "description": + "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", + "items": { + "type": "string", + "format": "nsid", + }, + }, + }, + }, + "labelerViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "labelerPolicies": { + "type": "object", + "required": [ + "labelValues", + ], + "properties": { + "labelValues": { + "type": "array", + "description": + "The label values which this labeler publishes. May include global or custom labels.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#labelValue", + }, + }, + "labelValueDefinitions": { + "type": "array", + "description": + "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#labelValueDefinition", + }, + }, + }, + }, + }, + }, + "AppBskyLabelerService": { + "lexicon": 1, + "id": "app.bsky.labeler.service", + "defs": { + "main": { + "type": "record", + "description": "A declaration of the existence of labeler service.", + "key": "literal:self", + "record": { + "type": "object", + "required": [ + "policies", + "createdAt", + ], + "properties": { + "policies": { + "type": "ref", + "ref": "lex:app.bsky.labeler.defs#labelerPolicies", + }, + "labels": { + "type": "union", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "reasonTypes": { + "description": + "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#reasonType", + }, + }, + "subjectTypes": { + "description": + "The set of subject types (account, record, etc) this service accepts reports on.", + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#subjectType", + }, + }, + "subjectCollections": { + "type": "array", + "description": + "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", + "items": { + "type": "string", + "format": "nsid", + }, + }, + }, + }, + }, + }, + }, + "AppBskyLabelerGetServices": { + "lexicon": 1, + "id": "app.bsky.labeler.getServices", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of labeler services.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + }, + "detailed": { + "type": "boolean", + "default": false, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "views", + ], + "properties": { + "views": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:app.bsky.labeler.defs#labelerView", + "lex:app.bsky.labeler.defs#labelerViewDetailed", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoListConvos": { + "lexicon": 1, + "id": "chat.bsky.convo.listConvos", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "readState": { + "type": "string", + "knownValues": [ + "unread", + ], + }, + "status": { + "type": "string", + "knownValues": [ + "request", + "accepted", + ], + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convos", + ], + "properties": { + "cursor": { + "type": "string", + }, + "convos": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoUnmuteConvo": { + "lexicon": 1, + "id": "chat.bsky.convo.unmuteConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convo", + ], + "properties": { + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoDefs": { + "lexicon": 1, + "id": "chat.bsky.convo.defs", + "defs": { + "messageRef": { + "type": "object", + "required": [ + "did", + "messageId", + "convoId", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "convoId": { + "type": "string", + }, + "messageId": { + "type": "string", + }, + }, + }, + "messageInput": { + "type": "object", + "required": [ + "text", + ], + "properties": { + "text": { + "type": "string", + "maxLength": 10000, + "maxGraphemes": 1000, + }, + "facets": { + "type": "array", + "description": + "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "embed": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.record", + ], + }, + }, + }, + "messageView": { + "type": "object", + "required": [ + "id", + "rev", + "text", + "sender", + "sentAt", + ], + "properties": { + "id": { + "type": "string", + }, + "rev": { + "type": "string", + }, + "text": { + "type": "string", + "maxLength": 10000, + "maxGraphemes": 1000, + }, + "facets": { + "type": "array", + "description": + "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { + "type": "ref", + "ref": "lex:app.bsky.richtext.facet", + }, + }, + "embed": { + "type": "union", + "refs": [ + "lex:app.bsky.embed.record#view", + ], + }, + "sender": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageViewSender", + }, + "sentAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "deletedMessageView": { + "type": "object", + "required": [ + "id", + "rev", + "sender", + "sentAt", + ], + "properties": { + "id": { + "type": "string", + }, + "rev": { + "type": "string", + }, + "sender": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageViewSender", + }, + "sentAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "messageViewSender": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "convoView": { + "type": "object", + "required": [ + "id", + "rev", + "members", + "muted", + "unreadCount", + ], + "properties": { + "id": { + "type": "string", + }, + "rev": { + "type": "string", + }, + "members": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:chat.bsky.actor.defs#profileViewBasic", + }, + }, + "lastMessage": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + "muted": { + "type": "boolean", + }, + "status": { + "type": "string", + "knownValues": [ + "request", + "accepted", + ], + }, + "unreadCount": { + "type": "integer", + }, + }, + }, + "logBeginConvo": { + "type": "object", + "required": [ + "rev", + "convoId", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + }, + }, + "logAcceptConvo": { + "type": "object", + "required": [ + "rev", + "convoId", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + }, + }, + "logLeaveConvo": { + "type": "object", + "required": [ + "rev", + "convoId", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + }, + }, + "logMuteConvo": { + "type": "object", + "required": [ + "rev", + "convoId", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + }, + }, + "logUnmuteConvo": { + "type": "object", + "required": [ + "rev", + "convoId", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + }, + }, + "logCreateMessage": { + "type": "object", + "required": [ + "rev", + "convoId", + "message", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + "message": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + }, + }, + "logDeleteMessage": { + "type": "object", + "required": [ + "rev", + "convoId", + "message", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + "message": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + }, + }, + "logReadMessage": { + "type": "object", + "required": [ + "rev", + "convoId", + "message", + ], + "properties": { + "rev": { + "type": "string", + }, + "convoId": { + "type": "string", + }, + "message": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + }, + }, + }, + }, + "ChatBskyConvoGetConvoAvailability": { + "lexicon": 1, + "id": "chat.bsky.convo.getConvoAvailability", + "defs": { + "main": { + "type": "query", + "description": + "Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.", + "parameters": { + "type": "params", + "required": [ + "members", + ], + "properties": { + "members": { + "type": "array", + "minLength": 1, + "maxLength": 10, + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "canChat", + ], + "properties": { + "canChat": { + "type": "boolean", + }, + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoGetLog": { + "lexicon": 1, + "id": "chat.bsky.convo.getLog", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [], + "properties": { + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "logs", + ], + "properties": { + "cursor": { + "type": "string", + }, + "logs": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#logBeginConvo", + "lex:chat.bsky.convo.defs#logAcceptConvo", + "lex:chat.bsky.convo.defs#logLeaveConvo", + "lex:chat.bsky.convo.defs#logCreateMessage", + "lex:chat.bsky.convo.defs#logDeleteMessage", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoSendMessage": { + "lexicon": 1, + "id": "chat.bsky.convo.sendMessage", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + "message", + ], + "properties": { + "convoId": { + "type": "string", + }, + "message": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageInput", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageView", + }, + }, + }, + }, + }, + "ChatBskyConvoLeaveConvo": { + "lexicon": 1, + "id": "chat.bsky.convo.leaveConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + "rev", + ], + "properties": { + "convoId": { + "type": "string", + }, + "rev": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoAcceptConvo": { + "lexicon": 1, + "id": "chat.bsky.convo.acceptConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "rev": { + "description": + "Rev when the convo was accepted. If not present, the convo was already accepted.", + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoMuteConvo": { + "lexicon": 1, + "id": "chat.bsky.convo.muteConvo", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convo", + ], + "properties": { + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoDeleteMessageForSelf": { + "lexicon": 1, + "id": "chat.bsky.convo.deleteMessageForSelf", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + "messageId", + ], + "properties": { + "convoId": { + "type": "string", + }, + "messageId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#deletedMessageView", + }, + }, + }, + }, + }, + "ChatBskyConvoUpdateRead": { + "lexicon": 1, + "id": "chat.bsky.convo.updateRead", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + "messageId": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convo", + ], + "properties": { + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoUpdateAllRead": { + "lexicon": 1, + "id": "chat.bsky.convo.updateAllRead", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "knownValues": [ + "request", + "accepted", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "updatedCount", + ], + "properties": { + "updatedCount": { + "description": "The count of updated convos.", + "type": "integer", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoGetConvo": { + "lexicon": 1, + "id": "chat.bsky.convo.getConvo", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convo", + ], + "properties": { + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoGetMessages": { + "lexicon": 1, + "id": "chat.bsky.convo.getMessages", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "convoId", + ], + "properties": { + "convoId": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "messages", + ], + "properties": { + "cursor": { + "type": "string", + }, + "messages": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoGetConvoForMembers": { + "lexicon": 1, + "id": "chat.bsky.convo.getConvoForMembers", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "members", + ], + "properties": { + "members": { + "type": "array", + "minLength": 1, + "maxLength": 10, + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "convo", + ], + "properties": { + "convo": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#convoView", + }, + }, + }, + }, + }, + }, + }, + "ChatBskyConvoSendMessageBatch": { + "lexicon": 1, + "id": "chat.bsky.convo.sendMessageBatch", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "lex:chat.bsky.convo.sendMessageBatch#batchItem", + }, + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageView", + }, + }, + }, + }, + }, + }, + "batchItem": { + "type": "object", + "required": [ + "convoId", + "message", + ], + "properties": { + "convoId": { + "type": "string", + }, + "message": { + "type": "ref", + "ref": "lex:chat.bsky.convo.defs#messageInput", + }, + }, + }, + }, + }, + "ChatBskyActorDefs": { + "lexicon": 1, + "id": "chat.bsky.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "associated": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#profileAssociated", + }, + "viewer": { + "type": "ref", + "ref": "lex:app.bsky.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "chatDisabled": { + "type": "boolean", + "description": + "Set to true when the actor cannot actively participate in converations", + }, + }, + }, + }, + }, + "ChatBskyActorDeclaration": { + "lexicon": 1, + "id": "chat.bsky.actor.declaration", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Bluesky chat account.", + "key": "literal:self", + "record": { + "type": "object", + "required": [ + "allowIncoming", + ], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": [ + "all", + "none", + "following", + ], + }, + }, + }, + }, + }, + }, + "ChatBskyActorExportAccountData": { + "lexicon": 1, + "id": "chat.bsky.actor.exportAccountData", + "defs": { + "main": { + "type": "query", + "output": { + "encoding": "application/jsonl", + }, + }, + }, + }, + "ChatBskyActorDeleteAccount": { + "lexicon": 1, + "id": "chat.bsky.actor.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + }, + }, + }, + "ChatBskyModerationGetActorMetadata": { + "lexicon": 1, + "id": "chat.bsky.moderation.getActorMetadata", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "did", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "day", + "month", + "all", + ], + "properties": { + "day": { + "type": "ref", + "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", + }, + "month": { + "type": "ref", + "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", + }, + "all": { + "type": "ref", + "ref": "lex:chat.bsky.moderation.getActorMetadata#metadata", + }, + }, + }, + }, + }, + "metadata": { + "type": "object", + "required": [ + "messagesSent", + "messagesReceived", + "convos", + "convosStarted", + ], + "properties": { + "messagesSent": { + "type": "integer", + }, + "messagesReceived": { + "type": "integer", + }, + "convos": { + "type": "integer", + }, + "convosStarted": { + "type": "integer", + }, + }, + }, + }, + }, + "ChatBskyModerationGetMessageContext": { + "lexicon": 1, + "id": "chat.bsky.moderation.getMessageContext", + "defs": { + "main": { + "type": "query", + "parameters": { + "type": "params", + "required": [ + "messageId", + ], + "properties": { + "convoId": { + "type": "string", + "description": + "Conversation that the message is from. NOTE: this field will eventually be required.", + }, + "messageId": { + "type": "string", + }, + "before": { + "type": "integer", + "default": 5, + }, + "after": { + "type": "integer", + "default": 5, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "messages", + ], + "properties": { + "messages": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:chat.bsky.convo.defs#messageView", + "lex:chat.bsky.convo.defs#deletedMessageView", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "ChatBskyModerationUpdateActorAccess": { + "lexicon": 1, + "id": "chat.bsky.moderation.updateActorAccess", + "defs": { + "main": { + "type": "procedure", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actor", + "allowAccess", + ], + "properties": { + "actor": { + "type": "string", + "format": "did", + }, + "allowAccess": { + "type": "boolean", + }, + "ref": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "SoSprkVideoUploadVideo": { + "lexicon": 1, + "id": "so.sprk.video.uploadVideo", + "defs": { + "main": { + "type": "procedure", + "description": "Upload a video to be processed then stored on the PDS.", + "input": { + "encoding": "video/mp4", + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "jobStatus", + ], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "lex:so.sprk.video.defs#jobStatus", + }, + }, + }, + }, + }, + }, + }, + "SoSprkVideoDefs": { + "lexicon": 1, + "id": "so.sprk.video.defs", + "defs": { + "jobStatus": { + "type": "object", + "required": [ + "jobId", + "did", + "state", + ], + "properties": { + "jobId": { + "type": "string", + }, + "did": { + "type": "string", + "format": "did", + }, + "state": { + "type": "string", + "description": + "The state of the video processing job. All values not listed as a known value indicate that the job is in process.", + "knownValues": [ + "JOB_STATE_COMPLETED", + "JOB_STATE_FAILED", + "JOB_STATE_QUEUED", + "JOB_STATE_PROCESSING", + ], + }, + "progress": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Progress within the current processing state.", + }, + "blob": { + "type": "blob", + }, + "audio": { + "type": "ref", + "ref": "lex:so.sprk.video.defs#extractedAudio", + }, + "error": { + "type": "string", + }, + "message": { + "type": "string", + }, + }, + }, + "extractedAudio": { + "type": "object", + "description": + "Audio extracted from the uploaded video for client-side record creation.", + "required": [ + "blob", + ], + "properties": { + "details": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioDetails", + }, + "blob": { + "type": "blob", + }, + }, + }, + }, + }, + "SoSprkVideoGetJobStatus": { + "lexicon": 1, + "id": "so.sprk.video.getJobStatus", + "defs": { + "main": { + "type": "query", + "description": "Get status details for a video processing job.", + "parameters": { + "type": "params", + "required": [ + "jobId", + ], + "properties": { + "jobId": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "jobStatus", + ], + "properties": { + "jobStatus": { + "type": "ref", + "ref": "lex:so.sprk.video.defs#jobStatus", + }, + }, + }, + }, + }, + }, + }, + "SoSprkVideoGetUploadLimits": { + "lexicon": 1, + "id": "so.sprk.video.getUploadLimits", + "defs": { + "main": { + "type": "query", + "description": "Get video upload limits for the authenticated user.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "canUpload", + ], + "properties": { + "canUpload": { + "type": "boolean", + }, + "remainingDailyVideos": { + "type": "integer", + }, + "remainingDailyBytes": { + "type": "integer", + }, + "message": { + "type": "string", + }, + "error": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "SoSprkNotificationRegisterPush": { + "lexicon": 1, + "id": "so.sprk.notification.registerPush", + "defs": { + "main": { + "type": "procedure", + "description": + "Register to receive push notifications, via a specified service, for the requesting account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "serviceDid", + "token", + "platform", + "appId", + ], + "properties": { + "serviceDid": { + "type": "string", + "format": "did", + }, + "token": { + "type": "string", + }, + "platform": { + "type": "string", + "knownValues": [ + "ios", + "android", + "web", + ], + }, + "appId": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "SoSprkNotificationPutPreferences": { + "lexicon": 1, + "id": "so.sprk.notification.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": + "Set notification-related preferences for an account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "priority", + ], + "properties": { + "priority": { + "type": "boolean", + }, + }, + }, + }, + }, + }, + }, + "SoSprkNotificationUpdateSeen": { + "lexicon": 1, + "id": "so.sprk.notification.updateSeen", + "defs": { + "main": { + "type": "procedure", + "description": + "Notify server that the requesting account has seen notifications. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "seenAt", + ], + "properties": { + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + }, + "SoSprkNotificationListNotifications": { + "lexicon": 1, + "id": "so.sprk.notification.listNotifications", + "defs": { + "main": { + "type": "query", + "description": + "Enumerate notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "reasons": { + "description": "Notification reasons to include in response.", + "type": "array", + "items": { + "type": "string", + "description": + "A reason that matches the reason property of #notification.", + }, + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "priority": { + "type": "boolean", + }, + "cursor": { + "type": "string", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "notifications", + ], + "properties": { + "cursor": { + "type": "string", + }, + "notifications": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:so.sprk.notification.listNotifications#notification", + }, + }, + "priority": { + "type": "boolean", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + "notification": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "reason", + "record", + "isRead", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "reason": { + "type": "string", + "description": + "Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'.", + "knownValues": [ + "like", + "repost", + "follow", + "mention", + "reply", + "quote", + "starterpack-joined", + ], + }, + "reasonSubject": { + "type": "string", + "format": "at-uri", + }, + "record": { + "type": "unknown", + }, + "isRead": { + "type": "boolean", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + }, + }, + "SoSprkNotificationGetUnreadCount": { + "lexicon": 1, + "id": "so.sprk.notification.getUnreadCount", + "defs": { + "main": { + "type": "query", + "description": + "Count the number of unread notifications for the requesting account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "priority": { + "type": "boolean", + }, + "seenAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "count", + ], + "properties": { + "count": { + "type": "integer", + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetSuggestedFollowsByActor": { + "lexicon": 1, + "id": "so.sprk.graph.getSuggestedFollowsByActor", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "suggestions", + ], + "properties": { + "suggestions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + "isFallback": { + "type": "boolean", + "description": + "If true, response has fallen-back to generic results, and is not scoped using relativeToDid", + "default": false, + }, + "recId": { + "type": "integer", + "description": + "Snowflake for this recommendation, use when submitting recommendation events.", + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphBlock": { + "lexicon": 1, + "id": "so.sprk.graph.block", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Spark; see blog posts for details.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "did", + "description": "DID of the account to be blocked.", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "SoSprkGraphFollow": { + "lexicon": 1, + "id": "so.sprk.graph.follow", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "string", + "format": "did", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "SoSprkGraphDefs": { + "lexicon": 1, + "id": "so.sprk.graph.defs", + "defs": { + "notFoundActor": { + "type": "object", + "description": "indicates that a handle or DID could not be resolved", + "required": [ + "actor", + "notFound", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "notFound": { + "type": "boolean", + "const": true, + }, + }, + }, + "relationship": { + "type": "object", + "description": + "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "following": { + "type": "string", + "format": "at-uri", + "description": + "if the actor follows this DID, this is the AT-URI of the follow record", + }, + "followedBy": { + "type": "string", + "format": "at-uri", + "description": + "if the actor is followed by this DID, contains the AT-URI of the follow record", + }, + }, + }, + }, + }, + "SoSprkGraphMuteThread": { + "lexicon": 1, + "id": "so.sprk.graph.muteThread", + "defs": { + "main": { + "type": "procedure", + "description": + "Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Spark. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "root", + ], + "properties": { + "root": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetFollowers": { + "lexicon": 1, + "id": "so.sprk.graph.getFollowers", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which follow a specified account (actor).", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "followers", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphUnmuteThread": { + "lexicon": 1, + "id": "so.sprk.graph.unmuteThread", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified thread. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "root", + ], + "properties": { + "root": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphMuteActor": { + "lexicon": 1, + "id": "so.sprk.graph.muteActor", + "defs": { + "main": { + "type": "procedure", + "description": + "Creates a mute relationship for the specified account. Mutes are private in Spark. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetMutes": { + "lexicon": 1, + "id": "so.sprk.graph.getMutes", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "mutes", + ], + "properties": { + "cursor": { + "type": "string", + }, + "mutes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetKnownFollowers": { + "lexicon": 1, + "id": "so.sprk.graph.getKnownFollowers", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which follow a specified account (actor) and are followed by the viewer.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "followers", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "followers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetFollows": { + "lexicon": 1, + "id": "so.sprk.graph.getFollows", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates accounts which a specified account (actor) follows.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + "follows", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "cursor": { + "type": "string", + }, + "follows": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetBlocks": { + "lexicon": 1, + "id": "so.sprk.graph.getBlocks", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates which accounts the requesting account is currently blocking. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "blocks", + ], + "properties": { + "cursor": { + "type": "string", + }, + "blocks": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkGraphGetRelationships": { + "lexicon": 1, + "id": "so.sprk.graph.getRelationships", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates public relationships between one account, and a list of other accounts. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Primary account requesting relationships for.", + }, + "others": { + "type": "array", + "description": + "List of 'other' accounts to be related back to the primary.", + "maxLength": 30, + "items": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "relationships", + ], + "properties": { + "actor": { + "type": "string", + "format": "did", + }, + "relationships": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.graph.defs#relationship", + "lex:so.sprk.graph.defs#notFoundActor", + ], + }, + }, + }, + }, + }, + "errors": [ + { + "name": "ActorNotFound", + "description": + "the primary actor at-identifier could not be resolved", + }, + ], + }, + }, + }, + "SoSprkGraphUnmuteActor": { + "lexicon": 1, + "id": "so.sprk.graph.unmuteActor", + "defs": { + "main": { + "type": "procedure", + "description": "Unmutes the specified account. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGenerator": { + "lexicon": 1, + "id": "so.sprk.feed.generator", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.", + "key": "any", + "record": { + "type": "object", + "required": [ + "did", + "displayName", + "createdAt", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "displayName": { + "type": "string", + "maxGraphemes": 24, + "maxLength": 240, + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.richtext.facet", + }, + }, + "avatar": { + "type": "blob", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 1000000, + }, + "acceptsInteractions": { + "type": "boolean", + "description": + "Declaration that a feed accepts feedback interactions from a client through so.sprk.feed.sendInteractions", + }, + "labels": { + "type": "union", + "description": "Self-label values", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "SoSprkFeedSendInteractions": { + "lexicon": 1, + "id": "so.sprk.feed.sendInteractions", + "defs": { + "main": { + "type": "procedure", + "description": + "Send information about interactions with feed items back to the feed generator that served them.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "interactions", + ], + "properties": { + "interactions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#interaction", + }, + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + }, + }, + }, + "SoSprkFeedDefs": { + "lexicon": 1, + "id": "so.sprk.feed.defs", + "defs": { + "postView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "record": { + "type": "unknown", + }, + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.images#view", + "lex:so.sprk.media.video#view", + ], + }, + "sound": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioView", + }, + "replyCount": { + "type": "integer", + }, + "repostCount": { + "type": "integer", + }, + "likeCount": { + "type": "integer", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "threadgate": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#threadgateView", + }, + }, + }, + "replyView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "record": { + "type": "unknown", + }, + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.image#view", + ], + }, + "replyCount": { + "type": "integer", + }, + "likeCount": { + "type": "integer", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "viewerState": { + "type": "object", + "description": + "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.", + "properties": { + "repost": { + "type": "string", + "format": "at-uri", + }, + "like": { + "type": "string", + "format": "at-uri", + }, + "threadMuted": { + "type": "boolean", + }, + "replyDisabled": { + "type": "boolean", + }, + "embeddingDisabled": { + "type": "boolean", + }, + "pinned": { + "type": "boolean", + }, + }, + }, + "threadContext": { + "type": "object", + "description": + "Metadata about this post within the context of the thread it is in.", + "properties": { + "rootAuthorLike": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "feedViewPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#postView", + }, + "reason": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#reasonRepost", + "lex:so.sprk.feed.defs#reasonPin", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context provided by feed generator that may be passed back alongside interactions.", + "maxLength": 2000, + }, + }, + }, + "replyRef": { + "type": "object", + "required": [ + "root", + "parent", + ], + "properties": { + "root": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#postView", + "lex:so.sprk.feed.defs#notFoundPost", + "lex:so.sprk.feed.defs#blockedPost", + ], + }, + "parent": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#postView", + "lex:so.sprk.feed.defs#replyView", + "lex:so.sprk.feed.defs#notFoundPost", + "lex:so.sprk.feed.defs#blockedPost", + ], + }, + "grandparentAuthor": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + "description": + "When parent is a reply to another post, this is the author of that post.", + }, + }, + }, + "reasonRepost": { + "type": "object", + "required": [ + "by", + "indexedAt", + ], + "properties": { + "by": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "reasonPin": { + "type": "object", + "properties": {}, + }, + "threadViewPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#postView", + "lex:so.sprk.feed.defs#replyView", + ], + }, + "parent": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#threadViewPost", + "lex:so.sprk.feed.defs#notFoundPost", + "lex:so.sprk.feed.defs#blockedPost", + ], + }, + "replies": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#threadViewPost", + "lex:so.sprk.feed.defs#notFoundPost", + "lex:so.sprk.feed.defs#blockedPost", + ], + }, + }, + "threadContext": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#threadContext", + }, + }, + }, + "notFoundPost": { + "type": "object", + "required": [ + "uri", + "notFound", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "notFound": { + "type": "boolean", + "const": true, + }, + }, + }, + "blockedPost": { + "type": "object", + "required": [ + "uri", + "blocked", + "author", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "blocked": { + "type": "boolean", + "const": true, + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#blockedAuthor", + }, + }, + }, + "blockedAuthor": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#viewerState", + }, + }, + }, + "generatorView": { + "type": "object", + "required": [ + "uri", + "cid", + "did", + "creator", + "displayName", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "did": { + "type": "string", + "format": "did", + }, + "creator": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "displayName": { + "type": "string", + }, + "description": { + "type": "string", + "maxGraphemes": 300, + "maxLength": 3000, + }, + "descriptionFacets": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.richtext.facet", + }, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "acceptsInteractions": { + "type": "boolean", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#generatorViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "generatorViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "skeletonFeedPost": { + "type": "object", + "required": [ + "post", + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + }, + "reason": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#skeletonReasonRepost", + "lex:so.sprk.feed.defs#skeletonReasonPin", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context that will be passed through to client and may be passed to feed generator back alongside interactions.", + "maxLength": 2000, + }, + }, + }, + "skeletonReasonRepost": { + "type": "object", + "required": [ + "repost", + ], + "properties": { + "repost": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "skeletonReasonPin": { + "type": "object", + "properties": {}, + }, + "threadgateView": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "record": { + "type": "unknown", + }, + }, + }, + "interaction": { + "type": "object", + "properties": { + "item": { + "type": "string", + "format": "at-uri", + }, + "event": { + "type": "string", + "knownValues": [ + "so.sprk.feed.defs#requestLess", + "so.sprk.feed.defs#requestMore", + "so.sprk.feed.defs#clickthroughItem", + "so.sprk.feed.defs#clickthroughAuthor", + "so.sprk.feed.defs#clickthroughReposter", + "so.sprk.feed.defs#clickthroughEmbed", + "so.sprk.feed.defs#interactionSeen", + "so.sprk.feed.defs#interactionLike", + "so.sprk.feed.defs#interactionRepost", + "so.sprk.feed.defs#interactionReply", + "so.sprk.feed.defs#interactionShare", + ], + }, + "feedContext": { + "type": "string", + "description": + "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.", + "maxLength": 2000, + }, + }, + }, + "requestLess": { + "type": "token", + "description": + "Request that less content like the given feed item be shown in the feed", + }, + "requestMore": { + "type": "token", + "description": + "Request that more content like the given feed item be shown in the feed", + }, + "clickthroughItem": { + "type": "token", + "description": "User clicked through to the feed item", + }, + "clickthroughAuthor": { + "type": "token", + "description": "User clicked through to the author of the feed item", + }, + "clickthroughReposter": { + "type": "token", + "description": "User clicked through to the reposter of the feed item", + }, + "clickthroughEmbed": { + "type": "token", + "description": + "User clicked through to the embedded content of the feed item", + }, + "interactionSeen": { + "type": "token", + "description": "Feed item was seen by user", + }, + "interactionLike": { + "type": "token", + "description": "User liked the feed item", + }, + "interactionRepost": { + "type": "token", + "description": "User reposted the feed item", + }, + "interactionReply": { + "type": "token", + "description": "User replied to the feed item", + }, + "interactionShare": { + "type": "token", + "description": "User shared the feed item", + }, + }, + }, + "SoSprkFeedGetFeedGenerators": { + "lexicon": 1, + "id": "so.sprk.feed.getFeedGenerators", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of feed generators.", + "parameters": { + "type": "params", + "required": [ + "feeds", + ], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetTimeline": { + "lexicon": 1, + "id": "so.sprk.feed.getTimeline", + "defs": { + "main": { + "type": "query", + "description": + "Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.", + "parameters": { + "type": "params", + "properties": { + "algorithm": { + "type": "string", + "description": + "Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetFeedGenerator": { + "lexicon": 1, + "id": "so.sprk.feed.getFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": + "Get information about a feed generator. Implemented by AppView.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the feed generator record.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "view", + "isOnline", + "isValid", + ], + "properties": { + "view": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#generatorView", + }, + "isOnline": { + "type": "boolean", + "description": + "Indicates whether the feed generator service has been online recently, or else seems to be inactive.", + }, + "isValid": { + "type": "boolean", + "description": + "Indicates whether the feed generator service is compatible with the record declaration.", + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetAuthorFeed": { + "lexicon": 1, + "id": "so.sprk.feed.getAuthorFeed", + "defs": { + "main": { + "type": "query", + "description": + "Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "filter": { + "type": "string", + "description": + "Combinations of post/repost types to include in response.", + "knownValues": [ + "posts_with_video", + ], + }, + "includePins": { + "type": "boolean", + "default": false, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BlockedActor", + }, + { + "name": "BlockedByActor", + }, + ], + }, + }, + }, + "SoSprkFeedGetLikes": { + "lexicon": 1, + "id": "so.sprk.feed.getLikes", + "defs": { + "main": { + "type": "query", + "description": + "Get like records which reference a subject (by AT-URI and CID).", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the subject (eg, a post record).", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "CID of the subject record (aka, specific version of record), to filter likes.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "likes", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "cursor": { + "type": "string", + }, + "likes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.getLikes#like", + }, + }, + }, + }, + }, + }, + "like": { + "type": "object", + "required": [ + "indexedAt", + "createdAt", + "actor", + ], + "properties": { + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "actor": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + "SoSprkFeedPostgate": { + "lexicon": 1, + "id": "so.sprk.feed.postgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": + "Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": [ + "post", + "createdAt", + ], + "properties": { + "createdAt": { + "type": "string", + "format": "datetime", + }, + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record.", + }, + "detachedEmbeddingUris": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri", + }, + "description": + "List of AT-URIs embedding this post that the author has detached from.", + }, + "embeddingRules": { + "description": + "List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.postgate#disableRule", + ], + }, + }, + }, + }, + }, + "disableRule": { + "type": "object", + "description": "Disables embedding of this post.", + "properties": {}, + }, + }, + }, + "SoSprkFeedThreadgate": { + "lexicon": 1, + "id": "so.sprk.feed.threadgate", + "defs": { + "main": { + "type": "record", + "key": "tid", + "description": + "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.", + "record": { + "type": "object", + "required": [ + "post", + "createdAt", + ], + "properties": { + "post": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to the post record.", + }, + "allow": { + "description": + "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.threadgate#mentionRule", + "lex:so.sprk.feed.threadgate#followerRule", + "lex:so.sprk.feed.threadgate#followingRule", + ], + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "hiddenReplies": { + "type": "array", + "maxLength": 50, + "items": { + "type": "string", + "format": "at-uri", + }, + "description": "List of hidden reply URIs.", + }, + }, + }, + }, + "mentionRule": { + "type": "object", + "description": "Allow replies from actors mentioned in your post.", + "properties": {}, + }, + "followerRule": { + "type": "object", + "description": "Allow replies from actors who follow you.", + "properties": {}, + }, + "followingRule": { + "type": "object", + "description": "Allow replies from actors you follow.", + "properties": {}, + }, + }, + }, + "SoSprkFeedGetPostThread": { + "lexicon": 1, + "id": "so.sprk.feed.getPostThread", + "defs": { + "main": { + "type": "query", + "description": + "Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.", + "parameters": { + "type": "params", + "required": [ + "anchor", + ], + "properties": { + "anchor": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) to anchor post record.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + "depth": { + "type": "integer", + "description": + "How many levels of reply depth should be included in response.", + "default": 6, + "minimum": 0, + "maximum": 1000, + }, + "parentHeight": { + "type": "integer", + "description": + "How many levels of parent (and grandparent, etc) post to include.", + "default": 80, + "minimum": 0, + "maximum": 1000, + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": + "Whether to prioritize posts from followed users. It only has effect when the user is authenticated.", + "default": false, + }, + "sort": { + "type": "string", + "description": "Sorting for the thread replies.", + "knownValues": [ + "newest", + "oldest", + "top", + ], + "default": "oldest", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "thread", + ], + "properties": { + "cursor": { + "type": "string", + }, + "thread": { + "type": "array", + "description": + "A flat list of thread items. The depth of each item is indicated by the depth property inside the item.", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.getPostThread#threadItem", + }, + }, + "threadgate": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#threadgateView", + }, + }, + }, + }, + "errors": [ + { + "name": "NotFound", + }, + ], + }, + "threadItem": { + "type": "object", + "required": [ + "uri", + "depth", + "value", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "depth": { + "type": "integer", + "description": + "The nesting level of this item in the thread. Depth 0 means the anchor item.", + }, + "value": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.defs#threadViewPost", + "lex:so.sprk.feed.defs#NotFoundPost", + "lex:so.sprk.feed.defs#BlockedPost", + ], + }, + }, + }, + }, + }, + "SoSprkFeedGetActorLikes": { + "lexicon": 1, + "id": "so.sprk.feed.getActorLikes", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BlockedActor", + }, + { + "name": "BlockedByActor", + }, + ], + }, + }, + }, + "SoSprkFeedLike": { + "lexicon": 1, + "id": "so.sprk.feed.like", + "defs": { + "main": { + "type": "record", + "description": + "Record declaring a 'like' of a piece of subject content.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "via": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetRepostedBy": { + "lexicon": 1, + "id": "so.sprk.feed.getRepostedBy", + "defs": { + "main": { + "type": "query", + "description": "Get a list of reposts for a given post.", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Reference (AT-URI) of post record", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "If supplied, filters to reposts of specific version (by CID) of the post record.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "repostedBy", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "cursor": { + "type": "string", + }, + "repostedBy": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedRepost": { + "lexicon": 1, + "id": "so.sprk.feed.repost", + "defs": { + "main": { + "description": + "Record representing a 'repost' of an existing Spark post.", + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt", + ], + "properties": { + "subject": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "via": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + }, + }, + "SoSprkFeedDescribeFeedGenerator": { + "lexicon": 1, + "id": "so.sprk.feed.describeFeedGenerator", + "defs": { + "main": { + "type": "query", + "description": + "Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "feeds", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.describeFeedGenerator#feed", + }, + }, + "links": { + "type": "ref", + "ref": "lex:so.sprk.feed.describeFeedGenerator#links", + }, + }, + }, + }, + }, + "feed": { + "type": "object", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "links": { + "type": "object", + "properties": { + "privacyPolicy": { + "type": "string", + }, + "termsOfService": { + "type": "string", + }, + }, + }, + }, + }, + "SoSprkFeedSearchPosts": { + "lexicon": 1, + "id": "so.sprk.feed.searchPosts", + "defs": { + "main": { + "type": "query", + "description": + "Find posts matching search criteria, returning views of those posts.", + "parameters": { + "type": "params", + "required": [ + "q", + ], + "properties": { + "q": { + "type": "string", + "description": + "Search query string; to match against post descriptions and such.", + }, + "sort": { + "type": "string", + "knownValues": [ + "top", + "latest", + ], + "default": "latest", + "description": "Specifies the ranking order of results.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": + "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "hitsTotal": { + "type": "integer", + "description": + "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.", + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#postView", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "BadQueryString", + }, + ], + }, + }, + }, + "SoSprkFeedGetPosts": { + "lexicon": 1, + "id": "so.sprk.feed.getPosts", + "defs": { + "main": { + "type": "query", + "description": + "Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "description": + "List of post AT-URIs to return hydrated views for.", + "items": { + "type": "string", + "format": "at-uri", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#postView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetFeed": { + "lexicon": 1, + "id": "so.sprk.feed.getFeed", + "defs": { + "main": { + "type": "query", + "description": + "Get a hydrated feed from an actor's selected feed generator. Implemented by App View.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#feedViewPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "UnknownFeed", + }, + ], + }, + }, + }, + "SoSprkFeedReply": { + "lexicon": 1, + "id": "so.sprk.feed.reply", + "defs": { + "main": { + "type": "record", + "description": "Record containing a Spark reply.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "createdAt", + "reply", + ], + "properties": { + "text": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300, + "description": "The reply text.", + }, + "facets": { + "type": "array", + "description": + "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { + "type": "ref", + "ref": "lex:so.sprk.richtext.facet", + }, + }, + "reply": { + "type": "ref", + "ref": "lex:so.sprk.feed.reply#replyRef", + }, + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.image", + ], + }, + "langs": { + "type": "array", + "description": + "Indicates human language of post primary text content.", + "maxLength": 3, + "items": { + "type": "string", + "format": "language", + }, + }, + "labels": { + "type": "union", + "description": + "Self-label values for this post. Effectively content warnings.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Client-declared timestamp when this post was originally created.", + }, + }, + }, + }, + "replyRef": { + "type": "object", + "required": [ + "root", + "parent", + ], + "properties": { + "root": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "parent": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + }, + "SoSprkFeedGetFeedSkeleton": { + "lexicon": 1, + "id": "so.sprk.feed.getFeedSkeleton", + "defs": { + "main": { + "type": "query", + "description": + "Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.", + "parameters": { + "type": "params", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "format": "at-uri", + "description": + "Reference to feed generator record describing the specific feed being requested.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feed": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#skeletonFeedPost", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "UnknownFeed", + }, + ], + }, + }, + }, + "SoSprkFeedGetSuggestedFeeds": { + "lexicon": 1, + "id": "so.sprk.feed.getSuggestedFeeds", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of suggested feeds (feed generators) for the requesting account.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedGetActorFeeds": { + "lexicon": 1, + "id": "so.sprk.feed.getActorFeeds", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of feeds (feed generator records) created by the actor (in the actor's repo).", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "feeds", + ], + "properties": { + "cursor": { + "type": "string", + }, + "feeds": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#generatorView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkFeedPost": { + "lexicon": 1, + "id": "so.sprk.feed.post", + "defs": { + "main": { + "type": "record", + "description": "Record containing a Spark post.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "createdAt", + "media", + ], + "properties": { + "caption": { + "type": "ref", + "ref": "lex:so.sprk.feed.post#captionRef", + }, + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.images", + "lex:so.sprk.media.video", + ], + }, + "sound": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "langs": { + "type": "array", + "description": + "Indicates human language of post primary text content.", + "maxLength": 3, + "items": { + "type": "string", + "format": "language", + }, + }, + "labels": { + "type": "union", + "description": + "Self-label values for this post. Effectively content warnings.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "tags": { + "type": "array", + "description": + "Additional hashtags, in addition to any included in post text and facets.", + "maxLength": 8, + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Client-declared timestamp when this post was originally created.", + }, + }, + }, + }, + "captionRef": { + "type": "object", + "properties": { + "text": { + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300, + "description": "The post description.", + }, + "facets": { + "type": "array", + "description": + "Annotations of text (mentions, URLs, hashtags, etc)", + "items": { + "type": "ref", + "ref": "lex:so.sprk.richtext.facet", + }, + }, + }, + }, + }, + }, + "SoSprkRichtextFacet": { + "lexicon": 1, + "id": "so.sprk.richtext.facet", + "defs": { + "main": { + "type": "object", + "description": "Annotation of a sub-string within rich text.", + "required": [ + "index", + "features", + ], + "properties": { + "index": { + "type": "ref", + "ref": "lex:so.sprk.richtext.facet#byteSlice", + }, + "features": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.richtext.facet#mention", + "lex:so.sprk.richtext.facet#link", + "lex:so.sprk.richtext.facet#tag", + ], + }, + }, + }, + }, + "mention": { + "type": "object", + "description": + "Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "link": { + "type": "object", + "description": + "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "uri", + }, + }, + }, + "tag": { + "type": "object", + "description": + "Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').", + "required": [ + "tag", + ], + "properties": { + "tag": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + }, + }, + "byteSlice": { + "type": "object", + "description": + "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.", + "required": [ + "byteStart", + "byteEnd", + ], + "properties": { + "byteStart": { + "type": "integer", + "minimum": 0, + }, + "byteEnd": { + "type": "integer", + "minimum": 0, + }, + }, + }, + }, + }, + "SoSprkSoundDefs": { + "lexicon": 1, + "id": "so.sprk.sound.defs", + "defs": { + "audioView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "title", + "coverArt", + "record", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "record": { + "type": "unknown", + }, + "useCount": { + "type": "integer", + }, + "title": { + "type": "string", + }, + "coverArt": { + "type": "string", + }, + "details": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioDetails", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "audioDetails": { + "type": "object", + "description": "Metadata about the audio content.", + "properties": { + "artist": { + "type": "string", + }, + "title": { + "type": "string", + }, + }, + }, + }, + }, + "SoSprkSoundGetActorAudios": { + "lexicon": 1, + "id": "so.sprk.sound.getActorAudios", + "defs": { + "main": { + "type": "query", + "description": "Get a list of audio records created by the actor.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "audios", + ], + "properties": { + "cursor": { + "type": "string", + }, + "audios": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkSoundGetAudioPosts": { + "lexicon": 1, + "id": "so.sprk.sound.getAudioPosts", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of posts that use a given audio (by AT-URI).", + "parameters": { + "type": "params", + "required": [ + "uri", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + "description": "Audio AT-URI to find referencing posts for.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "posts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "posts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.feed.defs#postView", + }, + }, + "audio": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioView", + }, + }, + }, + }, + }, + }, + }, + "SoSprkSoundGetAudios": { + "lexicon": 1, + "id": "so.sprk.sound.getAudios", + "defs": { + "main": { + "type": "query", + "description": + "Gets audio views for a specified list of audios (by AT-URI).", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "description": "List of audio AT-URIs to return views for.", + "items": { + "type": "string", + "format": "at-uri", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "audios", + ], + "properties": { + "audios": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkSoundAudio": { + "lexicon": 1, + "id": "so.sprk.sound.audio", + "description": + "A audio record referencable in a Spark record (e.g, a post)", + "defs": { + "main": { + "type": "record", + "key": "tid", + "record": { + "type": "object", + "required": [ + "sound", + "title", + "createdAt", + ], + "properties": { + "sound": { + "type": "blob", + "accept": [ + "audio/*", + ], + "maxSize": 10485760, + }, + "origin": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "title": { + "type": "string", + "maxLength": 1000, + "maxGraphemes": 100, + "description": "The audio's title.", + }, + "details": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioDetails", + }, + "labels": { + "type": "union", + "description": + "Self-label values for this audio. Effectively content warnings.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Client-declared timestamp when this audio was originally created.", + }, + }, + }, + }, + }, + }, + "SoSprkSoundGetTrendingAudios": { + "lexicon": 1, + "id": "so.sprk.sound.getTrendingAudios", + "defs": { + "main": { + "type": "query", + "description": + "Return trending audios ranked by popularity, returning AudioViews.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + "description": "Opaque cursor for pagination", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "audios", + ], + "properties": { + "cursor": { + "type": "string", + }, + "audios": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.sound.defs#audioView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorSearchActorsTypeahead": { + "lexicon": 1, + "id": "so.sprk.actor.searchActorsTypeahead", + "defs": { + "main": { + "type": "query", + "description": + "Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "q": { + "type": "string", + "description": "Search query prefix; not a full query string.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 10, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorDefs": { + "lexicon": 1, + "id": "so.sprk.actor.defs", + "defs": { + "profileViewBasic": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "associated": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileAssociated", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "stories": { + "type": "array", + "description": "Recent stories from this profile author.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + "profileView": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "associated": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileAssociated", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "profileViewDetailed": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "string", + "format": "uri", + }, + "banner": { + "type": "string", + "format": "uri", + }, + "followersCount": { + "type": "integer", + }, + "followsCount": { + "type": "integer", + }, + "postsCount": { + "type": "integer", + }, + "associated": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileAssociated", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#viewerState", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + "pinnedPost": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "stories": { + "type": "array", + "description": "Recent stories from this profile author.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + }, + }, + }, + "profileAssociated": { + "type": "object", + "properties": { + "feedgens": { + "type": "integer", + }, + "labeler": { + "type": "boolean", + }, + "chat": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileAssociatedChat", + }, + }, + }, + "profileAssociatedChat": { + "type": "object", + "required": [ + "allowIncoming", + ], + "properties": { + "allowIncoming": { + "type": "string", + "knownValues": [ + "all", + "none", + "following", + ], + }, + }, + }, + "viewerState": { + "type": "object", + "description": + "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.", + "properties": { + "muted": { + "type": "boolean", + }, + "blockedBy": { + "type": "boolean", + }, + "blocking": { + "type": "string", + "format": "at-uri", + }, + "following": { + "type": "string", + "format": "at-uri", + }, + "followedBy": { + "type": "string", + "format": "at-uri", + }, + "knownFollowers": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#knownFollowers", + }, + }, + }, + "knownFollowers": { + "type": "object", + "description": "The subject's followers whom you also follow", + "required": [ + "count", + "followers", + ], + "properties": { + "count": { + "type": "integer", + }, + "followers": { + "type": "array", + "minLength": 0, + "maxLength": 5, + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + }, + }, + }, + "preferences": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.actor.defs#adultContentPref", + "lex:so.sprk.actor.defs#contentLabelPref", + "lex:so.sprk.actor.defs#savedFeedsPref", + "lex:so.sprk.actor.defs#personalDetailsPref", + "lex:so.sprk.actor.defs#feedViewPref", + "lex:so.sprk.actor.defs#threadViewPref", + "lex:so.sprk.actor.defs#interestsPref", + "lex:so.sprk.actor.defs#mutedWordsPref", + "lex:so.sprk.actor.defs#hiddenPostsPref", + "lex:so.sprk.actor.defs#labelersPref", + "lex:so.sprk.actor.defs#postInteractionSettingsPref", + ], + }, + }, + "adultContentPref": { + "type": "object", + "required": [ + "enabled", + ], + "properties": { + "enabled": { + "type": "boolean", + "default": false, + }, + }, + }, + "contentLabelPref": { + "type": "object", + "required": [ + "label", + "visibility", + ], + "properties": { + "labelerDid": { + "type": "string", + "description": + "Which labeler does this preference apply to? If undefined, applies globally.", + "format": "did", + }, + "label": { + "type": "string", + }, + "visibility": { + "type": "string", + "knownValues": [ + "ignore", + "show", + "warn", + "hide", + ], + }, + }, + }, + "savedFeed": { + "type": "object", + "required": [ + "id", + "type", + "value", + "pinned", + ], + "properties": { + "id": { + "type": "string", + }, + "type": { + "type": "string", + "knownValues": [ + "feed", + "timeline", + ], + }, + "value": { + "type": "string", + }, + "pinned": { + "type": "boolean", + }, + }, + }, + "savedFeedsPref": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#savedFeed", + }, + }, + }, + }, + "personalDetailsPref": { + "type": "object", + "properties": { + "birthDate": { + "type": "string", + "format": "datetime", + "description": "The birth date of account owner.", + }, + }, + }, + "feedViewPref": { + "type": "object", + "required": [ + "feed", + ], + "properties": { + "feed": { + "type": "string", + "description": + "The URI of the feed, or an identifier which describes the feed.", + }, + "hideReplies": { + "type": "boolean", + "description": "Hide replies in the feed.", + }, + "hideRepliesByUnfollowed": { + "type": "boolean", + "description": + "Hide replies in the feed if they are not by followed users.", + "default": true, + }, + "hideRepliesByLikeCount": { + "type": "integer", + "description": + "Hide replies in the feed if they do not have this number of likes.", + }, + "hideRepliesByLookCount": { + "type": "integer", + "description": + "Hide replies in the feed if they do not have this number of looks.", + }, + "hideReposts": { + "type": "boolean", + "description": "Hide reposts in the feed.", + }, + "hideQuotePosts": { + "type": "boolean", + "description": "Hide quote posts in the feed.", + }, + }, + }, + "threadViewPref": { + "type": "object", + "properties": { + "sort": { + "type": "string", + "description": "Sorting mode for threads.", + "knownValues": [ + "oldest", + "newest", + "most-likes", + "most-looks", + "random", + "hotness", + ], + }, + "prioritizeFollowedUsers": { + "type": "boolean", + "description": "Show followed users at the top of all replies.", + }, + }, + }, + "interestsPref": { + "type": "object", + "required": [ + "tags", + ], + "properties": { + "tags": { + "type": "array", + "maxLength": 100, + "items": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64, + }, + "description": + "A list of tags which describe the account owner's interests gathered during onboarding.", + }, + }, + }, + "mutedWordTarget": { + "type": "string", + "knownValues": [ + "content", + "tag", + ], + "maxLength": 640, + "maxGraphemes": 64, + }, + "mutedWord": { + "type": "object", + "description": "A word that the account owner has muted.", + "required": [ + "value", + "targets", + ], + "properties": { + "id": { + "type": "string", + }, + "value": { + "type": "string", + "description": "The muted word itself.", + "maxLength": 10000, + "maxGraphemes": 1000, + }, + "targets": { + "type": "array", + "description": "The intended targets of the muted word.", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#mutedWordTarget", + }, + }, + "actorTarget": { + "type": "string", + "description": + "Groups of users to apply the muted word to. If undefined, applies to all users.", + "knownValues": [ + "all", + "exclude-following", + ], + "default": "all", + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": + "The date and time at which the muted word will expire and no longer be applied.", + }, + }, + }, + "mutedWordsPref": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#mutedWord", + }, + "description": "A list of words the account owner has muted.", + }, + }, + }, + "hiddenPostsPref": { + "type": "object", + "required": [ + "items", + ], + "properties": { + "items": { + "type": "array", + "items": { + "type": "string", + "format": "at-uri", + }, + "description": + "A list of URIs of posts the account owner has hidden.", + }, + }, + }, + "labelersPref": { + "type": "object", + "required": [ + "labelers", + ], + "properties": { + "labelers": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#labelerPrefItem", + }, + }, + }, + }, + "labelerPrefItem": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "postInteractionSettingsPref": { + "type": "object", + "description": + "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", + "required": [], + "properties": { + "threadgateAllowRules": { + "description": + "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.", + "type": "array", + "maxLength": 5, + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.feed.threadgate#mentionRule", + "lex:so.sprk.feed.threadgate#followerRule", + "lex:so.sprk.feed.threadgate#followingRule", + ], + }, + }, + }, + }, + }, + }, + "SoSprkActorPutPreferences": { + "lexicon": 1, + "id": "so.sprk.actor.putPreferences", + "defs": { + "main": { + "type": "procedure", + "description": "Set the private preferences attached to the account.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "preferences", + ], + "properties": { + "preferences": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#preferences", + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorGetProfile": { + "lexicon": 1, + "id": "so.sprk.actor.getProfile", + "defs": { + "main": { + "type": "query", + "description": + "Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.", + "parameters": { + "type": "params", + "required": [ + "actor", + ], + "properties": { + "actor": { + "type": "string", + "format": "at-identifier", + "description": "Handle or DID of account to fetch profile of.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewDetailed", + }, + }, + }, + }, + }, + "SoSprkActorGetSuggestions": { + "lexicon": 1, + "id": "so.sprk.actor.getSuggestions", + "defs": { + "main": { + "type": "query", + "description": + "Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + "recId": { + "type": "integer", + "description": + "Snowflake for this recommendation, use when submitting recommendation events.", + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorSearchActors": { + "lexicon": 1, + "id": "so.sprk.actor.searchActors", + "defs": { + "main": { + "type": "query", + "description": + "Find actors (profiles) matching search criteria. Does not require auth.", + "parameters": { + "type": "params", + "properties": { + "q": { + "type": "string", + "description": + "Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 25, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "actors", + ], + "properties": { + "cursor": { + "type": "string", + }, + "actors": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorGetProfiles": { + "lexicon": 1, + "id": "so.sprk.actor.getProfiles", + "defs": { + "main": { + "type": "query", + "description": "Get detailed profile views of multiple actors.", + "parameters": { + "type": "params", + "required": [ + "actors", + ], + "properties": { + "actors": { + "type": "array", + "items": { + "type": "string", + "format": "at-identifier", + }, + "maxLength": 25, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "profiles", + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewDetailed", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorGetPreferences": { + "lexicon": 1, + "id": "so.sprk.actor.getPreferences", + "defs": { + "main": { + "type": "query", + "description": + "Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.", + "parameters": { + "type": "params", + "properties": {}, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "preferences", + ], + "properties": { + "preferences": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#preferences", + }, + }, + }, + }, + }, + }, + }, + "SoSprkActorProfile": { + "lexicon": 1, + "id": "so.sprk.actor.profile", + "defs": { + "main": { + "type": "record", + "description": "A declaration of a Spark account profile.", + "key": "literal:self", + "record": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "description": "Free-form profile description text.", + "maxGraphemes": 256, + "maxLength": 2560, + }, + "avatar": { + "type": "blob", + "description": + "Small image to be displayed next to posts from account. AKA, 'profile picture'", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 5242880, + }, + "banner": { + "type": "blob", + "description": + "Larger horizontal image to display behind profile view.", + "accept": [ + "image/png", + "image/jpeg", + ], + "maxSize": 5242880, + }, + "labels": { + "type": "union", + "description": + "Self-label values, specific to the Spark applications, on the overall account.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "joinedViaStarterPack": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "pinnedPost": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "SoSprkStoryDefs": { + "lexicon": 1, + "id": "so.sprk.story.defs", + "defs": { + "storyView": { + "type": "object", + "required": [ + "uri", + "cid", + "author", + "record", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "record": { + "type": "unknown", + }, + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.image#view", + "lex:so.sprk.media.video#view", + ], + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + "storiesByAuthor": { + "type": "object", + "required": [ + "author", + "stories", + ], + "properties": { + "author": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileViewBasic", + }, + "stories": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.story.defs#storyView", + }, + }, + }, + }, + "interaction": { + "type": "object", + "properties": { + "item": { + "type": "string", + "format": "at-uri", + }, + "event": { + "type": "string", + "knownValues": [ + "so.sprk.feed.defs#clickthroughItem", + "so.sprk.feed.defs#clickthroughAuthor", + "so.sprk.feed.defs#clickthroughReposter", + "so.sprk.feed.defs#clickthroughEmbed", + "so.sprk.feed.defs#interactionSeen", + "so.sprk.feed.defs#interactionLike", + "so.sprk.feed.defs#interactionRepost", + "so.sprk.feed.defs#interactionShare", + ], + }, + }, + }, + }, + }, + "SoSprkStoryGetTimeline": { + "lexicon": 1, + "id": "so.sprk.story.getTimeline", + "defs": { + "main": { + "type": "query", + "description": + "Get a view of the requesting account's stories timeline grouped by author.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "storiesByAuthor", + ], + "properties": { + "cursor": { + "type": "string", + }, + "storiesByAuthor": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.story.defs#storiesByAuthor", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkStoryGetStories": { + "lexicon": 1, + "id": "so.sprk.story.getStories", + "defs": { + "main": { + "type": "query", + "description": + "Gets story views for a specified list of stories (by AT-URI). This is sometimes referred to as 'hydrating' a story reference list.", + "parameters": { + "type": "params", + "required": [ + "uris", + ], + "properties": { + "uris": { + "type": "array", + "description": + "List of story AT-URIs to return hydrated views for.", + "items": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "stories", + ], + "properties": { + "stories": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.story.defs#storyView", + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkStoryPost": { + "lexicon": 1, + "id": "so.sprk.story.post", + "defs": { + "main": { + "type": "record", + "description": "Record containing a Spark story.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "createdAt", + "media", + ], + "properties": { + "media": { + "type": "union", + "refs": [ + "lex:so.sprk.media.image", + "lex:so.sprk.media.video", + ], + }, + "sound": { + "type": "ref", + "ref": "lex:com.atproto.repo.strongRef", + }, + "labels": { + "type": "union", + "description": + "Self-label values for this story. Effectively content warnings.", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": + "Client-declared timestamp when this story was originally created.", + }, + }, + }, + }, + }, + }, + "SoSprkLabelerDefs": { + "lexicon": 1, + "id": "so.sprk.labeler.defs", + "defs": { + "labelerView": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "creator": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "lookCount": { + "type": "integer", + "minimum": 0, + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.labeler.defs#labelerViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "labelerViewDetailed": { + "type": "object", + "required": [ + "uri", + "cid", + "creator", + "policies", + "indexedAt", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "creator": { + "type": "ref", + "ref": "lex:so.sprk.actor.defs#profileView", + }, + "policies": { + "type": "ref", + "ref": "lex:so.sprk.labeler.defs#labelerPolicies", + }, + "likeCount": { + "type": "integer", + "minimum": 0, + }, + "lookCount": { + "type": "integer", + "minimum": 0, + }, + "viewer": { + "type": "ref", + "ref": "lex:so.sprk.labeler.defs#labelerViewerState", + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "labelerViewerState": { + "type": "object", + "properties": { + "like": { + "type": "string", + "format": "at-uri", + }, + "look": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "labelerPolicies": { + "type": "object", + "required": [ + "labelValues", + ], + "properties": { + "labelValues": { + "type": "array", + "description": + "The label values which this labeler publishes. May include global or custom labels.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#labelValue", + }, + }, + "labelValueDefinitions": { + "type": "array", + "description": + "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#labelValueDefinition", + }, + }, + }, + }, + }, + }, + "SoSprkLabelerService": { + "lexicon": 1, + "id": "so.sprk.labeler.service", + "defs": { + "main": { + "type": "record", + "description": "A declaration of the existence of labeler service.", + "key": "literal:self", + "record": { + "type": "object", + "required": [ + "policies", + "createdAt", + ], + "properties": { + "policies": { + "type": "ref", + "ref": "lex:so.sprk.labeler.defs#labelerPolicies", + }, + "labels": { + "type": "union", + "refs": [ + "lex:com.atproto.label.defs#selfLabels", + ], + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + "SoSprkLabelerGetServices": { + "lexicon": 1, + "id": "so.sprk.labeler.getServices", + "defs": { + "main": { + "type": "query", + "description": "Get information about a list of labeler services.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + }, + "detailed": { + "type": "boolean", + "default": false, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "views", + ], + "properties": { + "views": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:so.sprk.labeler.defs#labelerView", + "lex:so.sprk.labeler.defs#labelerViewDetailed", + ], + }, + }, + }, + }, + }, + }, + }, + }, + "SoSprkMediaDefs": { + "lexicon": 1, + "id": "so.sprk.media.defs", + "defs": { + "aspectRatio": { + "type": "object", + "description": + "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.", + "required": [ + "width", + "height", + ], + "properties": { + "width": { + "type": "integer", + "minimum": 1, + }, + "height": { + "type": "integer", + "minimum": 1, + }, + }, + }, + }, + }, + "SoSprkMediaImages": { + "lexicon": 1, + "id": "so.sprk.media.images", + "description": "A set of multiple images in a Spark post.", + "defs": { + "main": { + "type": "object", + "required": [ + "images", + ], + "properties": { + "images": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.media.image", + }, + "maxLength": 12, + }, + }, + }, + "view": { + "type": "object", + "required": [ + "images", + ], + "properties": { + "images": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.media.image#view", + }, + "maxLength": 12, + }, + }, + }, + }, + }, + "SoSprkMediaVideo": { + "lexicon": 1, + "id": "so.sprk.media.video", + "description": "A video in a Spark post.", + "defs": { + "main": { + "type": "object", + "required": [ + "video", + ], + "properties": { + "video": { + "type": "blob", + "accept": [ + "video/mp4", + ], + "maxSize": 314572800, + }, + "captions": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:so.sprk.media.video#caption", + }, + "maxLength": 20, + }, + "alt": { + "type": "string", + "description": + "Alt text description of the video, for accessibility.", + "maxGraphemes": 1000, + "maxLength": 10000, + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:so.sprk.media.defs#aspectRatio", + }, + }, + }, + "caption": { + "type": "object", + "required": [ + "lang", + "file", + ], + "properties": { + "lang": { + "type": "string", + "format": "language", + }, + "file": { + "type": "blob", + "accept": [ + "text/vtt", + ], + "maxSize": 20000, + }, + }, + }, + "view": { + "type": "object", + "required": [ + "cid", + "playlist", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "playlist": { + "type": "string", + "format": "uri", + }, + "thumbnail": { + "type": "string", + "format": "uri", + }, + "alt": { + "type": "string", + "maxGraphemes": 1000, + "maxLength": 10000, + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:so.sprk.media.defs#aspectRatio", + }, + }, + }, + }, + }, + "SoSprkMediaImage": { + "lexicon": 1, + "id": "so.sprk.media.image", + "description": "An image in a Spark record.", + "defs": { + "main": { + "type": "object", + "required": [ + "image", + "alt", + ], + "properties": { + "image": { + "type": "blob", + "accept": [ + "image/*", + ], + "maxSize": 5242880, + }, + "alt": { + "type": "string", + "description": + "Alt text description of the image, for accessibility.", + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:so.sprk.media.defs#aspectRatio", + }, + }, + }, + "view": { + "type": "object", + "required": [ + "thumb", + "fullsize", + "alt", + ], + "properties": { + "thumb": { + "type": "string", + "format": "uri", + "description": + "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.", + }, + "fullsize": { + "type": "string", + "format": "uri", + "description": + "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.", + }, + "alt": { + "type": "string", + "description": + "Alt text description of the image, for accessibility.", + }, + "aspectRatio": { + "type": "ref", + "ref": "lex:so.sprk.media.defs#aspectRatio", + }, + }, + }, + }, + }, + "ComAtprotoTempAddReservedHandle": { + "lexicon": 1, + "id": "com.atproto.temp.addReservedHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Add a handle to the set of reserved handles.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + ], + "properties": { + "handle": { + "type": "string", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {}, + }, + }, + }, + }, + }, + "ComAtprotoTempCheckSignupQueue": { + "lexicon": 1, + "id": "com.atproto.temp.checkSignupQueue", + "defs": { + "main": { + "type": "query", + "description": "Check accounts location in signup queue.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "activated", + ], + "properties": { + "activated": { + "type": "boolean", + }, + "placeInQueue": { + "type": "integer", + }, + "estimatedTimeMs": { + "type": "integer", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoTempRequestPhoneVerification": { + "lexicon": 1, + "id": "com.atproto.temp.requestPhoneVerification", + "defs": { + "main": { + "type": "procedure", + "description": + "Request a verification code to be sent to the supplied phone number", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "phoneNumber", + ], + "properties": { + "phoneNumber": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoTempFetchLabels": { + "lexicon": 1, + "id": "com.atproto.temp.fetchLabels", + "defs": { + "main": { + "type": "query", + "description": + "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.", + "parameters": { + "type": "params", + "properties": { + "since": { + "type": "integer", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 50, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "labels", + ], + "properties": { + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoIdentityUpdateHandle": { + "lexicon": 1, + "id": "com.atproto.identity.updateHandle", + "defs": { + "main": { + "type": "procedure", + "description": + "Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + ], + "properties": { + "handle": { + "type": "string", + "format": "handle", + "description": "The new handle.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoIdentitySignPlcOperation": { + "lexicon": 1, + "id": "com.atproto.identity.signPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": + "Signs a PLC operation to update some value(s) in the requesting DID's document.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "token": { + "description": + "A token received through com.atproto.identity.requestPlcOperationSignature", + "type": "string", + }, + "rotationKeys": { + "type": "array", + "items": { + "type": "string", + }, + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string", + }, + }, + "verificationMethods": { + "type": "unknown", + }, + "services": { + "type": "unknown", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "operation", + ], + "properties": { + "operation": { + "type": "unknown", + "description": "A signed DID PLC operation.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoIdentitySubmitPlcOperation": { + "lexicon": 1, + "id": "com.atproto.identity.submitPlcOperation", + "defs": { + "main": { + "type": "procedure", + "description": + "Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "operation", + ], + "properties": { + "operation": { + "type": "unknown", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoIdentityResolveHandle": { + "lexicon": 1, + "id": "com.atproto.identity.resolveHandle", + "defs": { + "main": { + "type": "query", + "description": "Resolves a handle (domain name) to a DID.", + "parameters": { + "type": "params", + "required": [ + "handle", + ], + "properties": { + "handle": { + "type": "string", + "format": "handle", + "description": "The handle to resolve.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoIdentityRequestPlcOperationSignature": { + "lexicon": 1, + "id": "com.atproto.identity.requestPlcOperationSignature", + "defs": { + "main": { + "type": "procedure", + "description": + "Request an email with a code to in order to request a signed PLC operation. Requires Auth.", + }, + }, + }, + "ComAtprotoIdentityGetRecommendedDidCredentials": { + "lexicon": 1, + "id": "com.atproto.identity.getRecommendedDidCredentials", + "defs": { + "main": { + "type": "query", + "description": + "Describe the credentials that should be included in the DID doc of an account that is migrating to this service.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "rotationKeys": { + "description": + "Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.", + "type": "array", + "items": { + "type": "string", + }, + }, + "alsoKnownAs": { + "type": "array", + "items": { + "type": "string", + }, + }, + "verificationMethods": { + "type": "unknown", + }, + "services": { + "type": "unknown", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminUpdateAccountEmail": { + "lexicon": 1, + "id": "com.atproto.admin.updateAccountEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an account's email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "account", + "email", + ], + "properties": { + "account": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo.", + }, + "email": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminGetAccountInfo": { + "lexicon": 1, + "id": "com.atproto.admin.getAccountInfo", + "defs": { + "main": { + "type": "query", + "description": "Get details about an account.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#accountView", + }, + }, + }, + }, + }, + "ComAtprotoAdminGetSubjectStatus": { + "lexicon": 1, + "id": "com.atproto.admin.getSubjectStatus", + "defs": { + "main": { + "type": "query", + "description": + "Get the service-specific admin status of a subject (account, record, or blob).", + "parameters": { + "type": "params", + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "uri": { + "type": "string", + "format": "at-uri", + }, + "blob": { + "type": "string", + "format": "cid", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + ], + "properties": { + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + "lex:com.atproto.admin.defs#repoBlobRef", + ], + }, + "takedown": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#statusAttr", + }, + "deactivated": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#statusAttr", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminDefs": { + "lexicon": 1, + "id": "com.atproto.admin.defs", + "defs": { + "statusAttr": { + "type": "object", + "required": [ + "applied", + ], + "properties": { + "applied": { + "type": "boolean", + }, + "ref": { + "type": "string", + }, + }, + }, + "accountView": { + "type": "object", + "required": [ + "did", + "handle", + "indexedAt", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "email": { + "type": "string", + }, + "relatedRecords": { + "type": "array", + "items": { + "type": "unknown", + }, + }, + "indexedAt": { + "type": "string", + "format": "datetime", + }, + "invitedBy": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + "invites": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + }, + "invitesDisabled": { + "type": "boolean", + }, + "emailConfirmedAt": { + "type": "string", + "format": "datetime", + }, + "inviteNote": { + "type": "string", + }, + "deactivatedAt": { + "type": "string", + "format": "datetime", + }, + "threatSignatures": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#threatSignature", + }, + }, + }, + }, + "repoRef": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + "repoBlobRef": { + "type": "object", + "required": [ + "did", + "cid", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "recordUri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + "threatSignature": { + "type": "object", + "required": [ + "property", + "value", + ], + "properties": { + "property": { + "type": "string", + }, + "value": { + "type": "string", + }, + }, + }, + }, + }, + "ComAtprotoAdminSearchAccounts": { + "lexicon": 1, + "id": "com.atproto.admin.searchAccounts", + "defs": { + "main": { + "type": "query", + "description": "Get list of accounts that matches your search query.", + "parameters": { + "type": "params", + "properties": { + "email": { + "type": "string", + }, + "cursor": { + "type": "string", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "accounts", + ], + "properties": { + "cursor": { + "type": "string", + }, + "accounts": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#accountView", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminUpdateAccountPassword": { + "lexicon": 1, + "id": "com.atproto.admin.updateAccountPassword", + "defs": { + "main": { + "type": "procedure", + "description": + "Update the password for a user account as an administrator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "password", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "password": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminUpdateAccountHandle": { + "lexicon": 1, + "id": "com.atproto.admin.updateAccountHandle", + "defs": { + "main": { + "type": "procedure", + "description": "Administrative action to update an account's handle.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "handle", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminGetInviteCodes": { + "lexicon": 1, + "id": "com.atproto.admin.getInviteCodes", + "defs": { + "main": { + "type": "query", + "description": "Get an admin view of invite codes.", + "parameters": { + "type": "params", + "properties": { + "sort": { + "type": "string", + "knownValues": [ + "recent", + "usage", + ], + "default": "recent", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 500, + "default": 100, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "codes", + ], + "properties": { + "cursor": { + "type": "string", + }, + "codes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminEnableAccountInvites": { + "lexicon": 1, + "id": "com.atproto.admin.enableAccountInvites", + "defs": { + "main": { + "type": "procedure", + "description": + "Re-enable an account's ability to receive invite codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "account", + ], + "properties": { + "account": { + "type": "string", + "format": "did", + }, + "note": { + "type": "string", + "description": "Optional reason for enabled invites.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminDisableAccountInvites": { + "lexicon": 1, + "id": "com.atproto.admin.disableAccountInvites", + "defs": { + "main": { + "type": "procedure", + "description": + "Disable an account from receiving new invite codes, but does not invalidate existing codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "account", + ], + "properties": { + "account": { + "type": "string", + "format": "did", + }, + "note": { + "type": "string", + "description": "Optional reason for disabled invites.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminDisableInviteCodes": { + "lexicon": 1, + "id": "com.atproto.admin.disableInviteCodes", + "defs": { + "main": { + "type": "procedure", + "description": + "Disable some set of codes and/or all codes associated with a set of users.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "codes": { + "type": "array", + "items": { + "type": "string", + }, + }, + "accounts": { + "type": "array", + "items": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminUpdateSubjectStatus": { + "lexicon": 1, + "id": "com.atproto.admin.updateSubjectStatus", + "defs": { + "main": { + "type": "procedure", + "description": + "Update the service-specific admin status of a subject (account, record, or blob).", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + ], + "properties": { + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + "lex:com.atproto.admin.defs#repoBlobRef", + ], + }, + "takedown": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#statusAttr", + }, + "deactivated": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#statusAttr", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "subject", + ], + "properties": { + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + "lex:com.atproto.admin.defs#repoBlobRef", + ], + }, + "takedown": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#statusAttr", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminSendEmail": { + "lexicon": 1, + "id": "com.atproto.admin.sendEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Send email to a user's account email address.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "recipientDid", + "content", + "senderDid", + ], + "properties": { + "recipientDid": { + "type": "string", + "format": "did", + }, + "content": { + "type": "string", + }, + "subject": { + "type": "string", + }, + "senderDid": { + "type": "string", + "format": "did", + }, + "comment": { + "type": "string", + "description": + "Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "sent", + ], + "properties": { + "sent": { + "type": "boolean", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminGetAccountInfos": { + "lexicon": 1, + "id": "com.atproto.admin.getAccountInfos", + "defs": { + "main": { + "type": "query", + "description": "Get details about some accounts.", + "parameters": { + "type": "params", + "required": [ + "dids", + ], + "properties": { + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "infos", + ], + "properties": { + "infos": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.admin.defs#accountView", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoAdminDeleteAccount": { + "lexicon": 1, + "id": "com.atproto.admin.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a user account as an administrator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoLabelSubscribeLabels": { + "lexicon": 1, + "id": "com.atproto.label.subscribeLabels", + "defs": { + "main": { + "type": "subscription", + "description": + "Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "integer", + "description": + "The last known event seq number to backfill from.", + }, + }, + }, + "message": { + "schema": { + "type": "union", + "refs": [ + "lex:com.atproto.label.subscribeLabels#labels", + "lex:com.atproto.label.subscribeLabels#info", + ], + }, + }, + "errors": [ + { + "name": "FutureCursor", + }, + ], + }, + "labels": { + "type": "object", + "required": [ + "seq", + "labels", + ], + "properties": { + "seq": { + "type": "integer", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + "info": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + "knownValues": [ + "OutdatedCursor", + ], + }, + "message": { + "type": "string", + }, + }, + }, + }, + }, + "ComAtprotoLabelDefs": { + "lexicon": 1, + "id": "com.atproto.label.defs", + "defs": { + "label": { + "type": "object", + "description": + "Metadata tag on an atproto resource (eg, repo or record).", + "required": [ + "src", + "uri", + "val", + "cts", + ], + "properties": { + "ver": { + "type": "integer", + "description": "The AT Protocol version of the label object.", + }, + "src": { + "type": "string", + "format": "did", + "description": "DID of the actor who created this label.", + }, + "uri": { + "type": "string", + "format": "uri", + "description": + "AT URI of the record, repository (account), or other resource that this label applies to.", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "Optionally, CID specifying the specific version of 'uri' resource this label applies to.", + }, + "val": { + "type": "string", + "maxLength": 128, + "description": + "The short string name of the value or type of this label.", + }, + "neg": { + "type": "boolean", + "description": + "If true, this is a negation label, overwriting a previous label.", + }, + "cts": { + "type": "string", + "format": "datetime", + "description": "Timestamp when this label was created.", + }, + "exp": { + "type": "string", + "format": "datetime", + "description": + "Timestamp at which this label expires (no longer applies).", + }, + "sig": { + "type": "bytes", + "description": "Signature of dag-cbor encoded label.", + }, + }, + }, + "selfLabels": { + "type": "object", + "description": + "Metadata tags on an atproto record, published by the author within the record.", + "required": [ + "values", + ], + "properties": { + "values": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#selfLabel", + }, + "maxLength": 10, + }, + }, + }, + "selfLabel": { + "type": "object", + "description": + "Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.", + "required": [ + "val", + ], + "properties": { + "val": { + "type": "string", + "maxLength": 128, + "description": + "The short string name of the value or type of this label.", + }, + }, + }, + "labelValueDefinition": { + "type": "object", + "description": + "Declares a label value and its expected interpretations and behaviors.", + "required": [ + "identifier", + "severity", + "blurs", + "locales", + ], + "properties": { + "identifier": { + "type": "string", + "description": + "The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).", + "maxLength": 100, + "maxGraphemes": 100, + }, + "severity": { + "type": "string", + "description": + "How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.", + "knownValues": [ + "inform", + "alert", + "none", + ], + }, + "blurs": { + "type": "string", + "description": + "What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing.", + "knownValues": [ + "content", + "media", + "none", + ], + }, + "defaultSetting": { + "type": "string", + "description": "The default setting for this label.", + "knownValues": [ + "ignore", + "warn", + "hide", + ], + "default": "warn", + }, + "adultOnly": { + "type": "boolean", + "description": + "Does the user need to have adult content enabled in order to configure this label?", + }, + "locales": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#labelValueDefinitionStrings", + }, + }, + }, + }, + "labelValueDefinitionStrings": { + "type": "object", + "description": + "Strings which describe the label in the UI, localized into a specific language.", + "required": [ + "lang", + "name", + "description", + ], + "properties": { + "lang": { + "type": "string", + "description": + "The code of the language these strings are written in.", + "format": "language", + }, + "name": { + "type": "string", + "description": "A short human-readable name for the label.", + "maxGraphemes": 64, + "maxLength": 640, + }, + "description": { + "type": "string", + "description": + "A longer description of what the label means and why it might be applied.", + "maxGraphemes": 10000, + "maxLength": 100000, + }, + }, + }, + "labelValue": { + "type": "string", + "knownValues": [ + "!hide", + "!no-promote", + "!warn", + "!no-unauthenticated", + "dmca-violation", + "doxxing", + "porn", + "sexual", + "nudity", + "nsfl", + "gore", + ], + }, + }, + }, + "ComAtprotoLabelQueryLabels": { + "lexicon": 1, + "id": "com.atproto.label.queryLabels", + "defs": { + "main": { + "type": "query", + "description": + "Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.", + "parameters": { + "type": "params", + "required": [ + "uriPatterns", + ], + "properties": { + "uriPatterns": { + "type": "array", + "items": { + "type": "string", + }, + "description": + "List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI.", + }, + "sources": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + "description": + "Optional list of label sources (DIDs) to filter on.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 250, + "default": 50, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "labels", + ], + "properties": { + "cursor": { + "type": "string", + }, + "labels": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.label.defs#label", + }, + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerRequestEmailConfirmation": { + "lexicon": 1, + "id": "com.atproto.server.requestEmailConfirmation", + "defs": { + "main": { + "type": "procedure", + "description": + "Request an email with a code to confirm ownership of email.", + }, + }, + }, + "ComAtprotoServerReserveSigningKey": { + "lexicon": 1, + "id": "com.atproto.server.reserveSigningKey", + "defs": { + "main": { + "type": "procedure", + "description": + "Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID to reserve a key for.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "signingKey", + ], + "properties": { + "signingKey": { + "type": "string", + "description": + "The public key for the reserved signing key, in did:key serialization.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerDefs": { + "lexicon": 1, + "id": "com.atproto.server.defs", + "defs": { + "inviteCode": { + "type": "object", + "required": [ + "code", + "available", + "disabled", + "forAccount", + "createdBy", + "createdAt", + "uses", + ], + "properties": { + "code": { + "type": "string", + }, + "available": { + "type": "integer", + }, + "disabled": { + "type": "boolean", + }, + "forAccount": { + "type": "string", + }, + "createdBy": { + "type": "string", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "uses": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCodeUse", + }, + }, + }, + }, + "inviteCodeUse": { + "type": "object", + "required": [ + "usedBy", + "usedAt", + ], + "properties": { + "usedBy": { + "type": "string", + "format": "did", + }, + "usedAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + "ComAtprotoServerGetServiceAuth": { + "lexicon": 1, + "id": "com.atproto.server.getServiceAuth", + "defs": { + "main": { + "type": "query", + "description": + "Get a signed token on behalf of the requesting DID for the requested service.", + "parameters": { + "type": "params", + "required": [ + "aud", + ], + "properties": { + "aud": { + "type": "string", + "format": "did", + "description": + "The DID of the service that the token will be used to authenticate with", + }, + "exp": { + "type": "integer", + "description": + "The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds in the future. The service may enforce certain time bounds on tokens depending on the requested scope.", + }, + "lxm": { + "type": "string", + "format": "nsid", + "description": + "Lexicon (XRPC) method to bind the requested token to", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "token", + ], + "properties": { + "token": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "BadExpiration", + "description": + "Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes.", + }, + ], + }, + }, + }, + "ComAtprotoServerGetAccountInviteCodes": { + "lexicon": 1, + "id": "com.atproto.server.getAccountInviteCodes", + "defs": { + "main": { + "type": "query", + "description": + "Get all invite codes for the current account. Requires auth.", + "parameters": { + "type": "params", + "properties": { + "includeUsed": { + "type": "boolean", + "default": true, + }, + "createAvailable": { + "type": "boolean", + "default": true, + "description": + "Controls whether any new 'earned' but not 'created' invites should be created.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "codes", + ], + "properties": { + "codes": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.defs#inviteCode", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "DuplicateCreate", + }, + ], + }, + }, + }, + "ComAtprotoServerCreateSession": { + "lexicon": 1, + "id": "com.atproto.server.createSession", + "defs": { + "main": { + "type": "procedure", + "description": "Create an authentication session.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "identifier", + "password", + ], + "properties": { + "identifier": { + "type": "string", + "description": + "Handle or other identifier supported by the server for the authenticating user.", + }, + "password": { + "type": "string", + }, + "authFactorToken": { + "type": "string", + }, + "allowTakendown": { + "type": "boolean", + "description": + "When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did", + ], + "properties": { + "accessJwt": { + "type": "string", + }, + "refreshJwt": { + "type": "string", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "did": { + "type": "string", + "format": "did", + }, + "didDoc": { + "type": "unknown", + }, + "email": { + "type": "string", + }, + "emailConfirmed": { + "type": "boolean", + }, + "emailAuthFactor": { + "type": "boolean", + }, + "active": { + "type": "boolean", + }, + "status": { + "type": "string", + "description": + "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deactivated", + ], + }, + }, + }, + }, + "errors": [ + { + "name": "AccountTakedown", + }, + { + "name": "AuthFactorTokenRequired", + }, + ], + }, + }, + }, + "ComAtprotoServerListAppPasswords": { + "lexicon": 1, + "id": "com.atproto.server.listAppPasswords", + "defs": { + "main": { + "type": "query", + "description": "List all App Passwords.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "passwords", + ], + "properties": { + "passwords": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.server.listAppPasswords#appPassword", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "AccountTakedown", + }, + ], + }, + "appPassword": { + "type": "object", + "required": [ + "name", + "createdAt", + ], + "properties": { + "name": { + "type": "string", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "privileged": { + "type": "boolean", + }, + }, + }, + }, + }, + "ComAtprotoServerCreateInviteCodes": { + "lexicon": 1, + "id": "com.atproto.server.createInviteCodes", + "defs": { + "main": { + "type": "procedure", + "description": "Create invite codes.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "codeCount", + "useCount", + ], + "properties": { + "codeCount": { + "type": "integer", + "default": 1, + }, + "useCount": { + "type": "integer", + }, + "forAccounts": { + "type": "array", + "items": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "codes", + ], + "properties": { + "codes": { + "type": "array", + "items": { + "type": "ref", + "ref": + "lex:com.atproto.server.createInviteCodes#accountCodes", + }, + }, + }, + }, + }, + }, + "accountCodes": { + "type": "object", + "required": [ + "account", + "codes", + ], + "properties": { + "account": { + "type": "string", + }, + "codes": { + "type": "array", + "items": { + "type": "string", + }, + }, + }, + }, + }, + }, + "ComAtprotoServerDeleteSession": { + "lexicon": 1, + "id": "com.atproto.server.deleteSession", + "defs": { + "main": { + "type": "procedure", + "description": "Delete the current session. Requires auth.", + }, + }, + }, + "ComAtprotoServerRevokeAppPassword": { + "lexicon": 1, + "id": "com.atproto.server.revokeAppPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Revoke an App Password by name.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerCreateAppPassword": { + "lexicon": 1, + "id": "com.atproto.server.createAppPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Create an App Password.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + "description": + "A short name for the App Password, to help distinguish them.", + }, + "privileged": { + "type": "boolean", + "description": + "If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "lex:com.atproto.server.createAppPassword#appPassword", + }, + }, + "errors": [ + { + "name": "AccountTakedown", + }, + ], + }, + "appPassword": { + "type": "object", + "required": [ + "name", + "password", + "createdAt", + ], + "properties": { + "name": { + "type": "string", + }, + "password": { + "type": "string", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + "privileged": { + "type": "boolean", + }, + }, + }, + }, + }, + "ComAtprotoServerActivateAccount": { + "lexicon": 1, + "id": "com.atproto.server.activateAccount", + "defs": { + "main": { + "type": "procedure", + "description": + "Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup.", + }, + }, + }, + "ComAtprotoServerDescribeServer": { + "lexicon": 1, + "id": "com.atproto.server.describeServer", + "defs": { + "main": { + "type": "query", + "description": + "Describes the server's account creation requirements and capabilities. Implemented by PDS.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "availableUserDomains", + ], + "properties": { + "inviteCodeRequired": { + "type": "boolean", + "description": + "If true, an invite code must be supplied to create an account on this instance.", + }, + "phoneVerificationRequired": { + "type": "boolean", + "description": + "If true, a phone verification token must be supplied to create an account on this instance.", + }, + "availableUserDomains": { + "type": "array", + "description": + "List of domain suffixes that can be used in account handles.", + "items": { + "type": "string", + }, + }, + "links": { + "type": "ref", + "description": "URLs of service policy documents.", + "ref": "lex:com.atproto.server.describeServer#links", + }, + "contact": { + "type": "ref", + "description": "Contact information", + "ref": "lex:com.atproto.server.describeServer#contact", + }, + "did": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + "links": { + "type": "object", + "properties": { + "privacyPolicy": { + "type": "string", + "format": "uri", + }, + "termsOfService": { + "type": "string", + "format": "uri", + }, + }, + }, + "contact": { + "type": "object", + "properties": { + "email": { + "type": "string", + }, + }, + }, + }, + }, + "ComAtprotoServerConfirmEmail": { + "lexicon": 1, + "id": "com.atproto.server.confirmEmail", + "defs": { + "main": { + "type": "procedure", + "description": + "Confirm an email using a token from com.atproto.server.requestEmailConfirmation.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "email", + "token", + ], + "properties": { + "email": { + "type": "string", + }, + "token": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "AccountNotFound", + }, + { + "name": "ExpiredToken", + }, + { + "name": "InvalidToken", + }, + { + "name": "InvalidEmail", + }, + ], + }, + }, + }, + "ComAtprotoServerGetSession": { + "lexicon": 1, + "id": "com.atproto.server.getSession", + "defs": { + "main": { + "type": "query", + "description": + "Get information about the current auth session. Requires auth.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + "did", + ], + "properties": { + "handle": { + "type": "string", + "format": "handle", + }, + "did": { + "type": "string", + "format": "did", + }, + "email": { + "type": "string", + }, + "emailConfirmed": { + "type": "boolean", + }, + "emailAuthFactor": { + "type": "boolean", + }, + "didDoc": { + "type": "unknown", + }, + "active": { + "type": "boolean", + }, + "status": { + "type": "string", + "description": + "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deactivated", + ], + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerRefreshSession": { + "lexicon": 1, + "id": "com.atproto.server.refreshSession", + "defs": { + "main": { + "type": "procedure", + "description": + "Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did", + ], + "properties": { + "accessJwt": { + "type": "string", + }, + "refreshJwt": { + "type": "string", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "did": { + "type": "string", + "format": "did", + }, + "didDoc": { + "type": "unknown", + }, + "active": { + "type": "boolean", + }, + "status": { + "type": "string", + "description": + "Hosting status of the account. If not specified, then assume 'active'.", + "knownValues": [ + "takendown", + "suspended", + "deactivated", + ], + }, + }, + }, + }, + "errors": [ + { + "name": "AccountTakedown", + }, + ], + }, + }, + }, + "ComAtprotoServerDeactivateAccount": { + "lexicon": 1, + "id": "com.atproto.server.deactivateAccount", + "defs": { + "main": { + "type": "procedure", + "description": + "Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "deleteAfter": { + "type": "string", + "format": "datetime", + "description": + "A recommendation to server as to how long they should hold onto the deactivated account before deleting.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerUpdateEmail": { + "lexicon": 1, + "id": "com.atproto.server.updateEmail", + "defs": { + "main": { + "type": "procedure", + "description": "Update an account's email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "email", + ], + "properties": { + "email": { + "type": "string", + }, + "emailAuthFactor": { + "type": "boolean", + }, + "token": { + "type": "string", + "description": + "Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed.", + }, + }, + }, + }, + "errors": [ + { + "name": "ExpiredToken", + }, + { + "name": "InvalidToken", + }, + { + "name": "TokenRequired", + }, + ], + }, + }, + }, + "ComAtprotoServerResetPassword": { + "lexicon": 1, + "id": "com.atproto.server.resetPassword", + "defs": { + "main": { + "type": "procedure", + "description": "Reset a user account password using a token.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "token", + "password", + ], + "properties": { + "token": { + "type": "string", + }, + "password": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "ExpiredToken", + }, + { + "name": "InvalidToken", + }, + ], + }, + }, + }, + "ComAtprotoServerCheckAccountStatus": { + "lexicon": 1, + "id": "com.atproto.server.checkAccountStatus", + "defs": { + "main": { + "type": "query", + "description": + "Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "activated", + "validDid", + "repoCommit", + "repoRev", + "repoBlocks", + "indexedRecords", + "privateStateValues", + "expectedBlobs", + "importedBlobs", + ], + "properties": { + "activated": { + "type": "boolean", + }, + "validDid": { + "type": "boolean", + }, + "repoCommit": { + "type": "string", + "format": "cid", + }, + "repoRev": { + "type": "string", + }, + "repoBlocks": { + "type": "integer", + }, + "indexedRecords": { + "type": "integer", + }, + "privateStateValues": { + "type": "integer", + }, + "expectedBlobs": { + "type": "integer", + }, + "importedBlobs": { + "type": "integer", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerRequestEmailUpdate": { + "lexicon": 1, + "id": "com.atproto.server.requestEmailUpdate", + "defs": { + "main": { + "type": "procedure", + "description": "Request a token in order to update email.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "tokenRequired", + ], + "properties": { + "tokenRequired": { + "type": "boolean", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerRequestPasswordReset": { + "lexicon": 1, + "id": "com.atproto.server.requestPasswordReset", + "defs": { + "main": { + "type": "procedure", + "description": "Initiate a user account password reset via email.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "email", + ], + "properties": { + "email": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoServerRequestAccountDelete": { + "lexicon": 1, + "id": "com.atproto.server.requestAccountDelete", + "defs": { + "main": { + "type": "procedure", + "description": "Initiate a user account deletion via email.", + }, + }, + }, + "ComAtprotoServerCreateAccount": { + "lexicon": 1, + "id": "com.atproto.server.createAccount", + "defs": { + "main": { + "type": "procedure", + "description": "Create an account. Implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + ], + "properties": { + "email": { + "type": "string", + }, + "handle": { + "type": "string", + "format": "handle", + "description": "Requested handle for the account.", + }, + "did": { + "type": "string", + "format": "did", + "description": + "Pre-existing atproto DID, being imported to a new account.", + }, + "inviteCode": { + "type": "string", + }, + "verificationCode": { + "type": "string", + }, + "verificationPhone": { + "type": "string", + }, + "password": { + "type": "string", + "description": + "Initial account password. May need to meet instance-specific password strength requirements.", + }, + "recoveryKey": { + "type": "string", + "description": + "DID PLC rotation key (aka, recovery key) to be included in PLC creation operation.", + }, + "plcOp": { + "type": "unknown", + "description": + "A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "description": + "Account login session returned on successful account creation.", + "required": [ + "accessJwt", + "refreshJwt", + "handle", + "did", + ], + "properties": { + "accessJwt": { + "type": "string", + }, + "refreshJwt": { + "type": "string", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "did": { + "type": "string", + "format": "did", + "description": "The DID of the new account.", + }, + "didDoc": { + "type": "unknown", + "description": "Complete DID document.", + }, + }, + }, + }, + "errors": [ + { + "name": "InvalidHandle", + }, + { + "name": "InvalidPassword", + }, + { + "name": "InvalidInviteCode", + }, + { + "name": "HandleNotAvailable", + }, + { + "name": "UnsupportedDomain", + }, + { + "name": "UnresolvableDid", + }, + { + "name": "IncompatibleDidDoc", + }, + ], + }, + }, + }, + "ComAtprotoServerDeleteAccount": { + "lexicon": 1, + "id": "com.atproto.server.deleteAccount", + "defs": { + "main": { + "type": "procedure", + "description": + "Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "password", + "token", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "password": { + "type": "string", + }, + "token": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "ExpiredToken", + }, + { + "name": "InvalidToken", + }, + ], + }, + }, + }, + "ComAtprotoServerCreateInviteCode": { + "lexicon": 1, + "id": "com.atproto.server.createInviteCode", + "defs": { + "main": { + "type": "procedure", + "description": "Create an invite code.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "useCount", + ], + "properties": { + "useCount": { + "type": "integer", + }, + "forAccount": { + "type": "string", + "format": "did", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "code", + ], + "properties": { + "code": { + "type": "string", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoLexiconSchema": { + "lexicon": 1, + "id": "com.atproto.lexicon.schema", + "defs": { + "main": { + "type": "record", + "description": + "Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).", + "key": "nsid", + "record": { + "type": "object", + "required": [ + "lexicon", + ], + "properties": { + "lexicon": { + "type": "integer", + "description": + "Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system.", + }, + }, + }, + }, + }, + }, + "ComAtprotoSyncGetHead": { + "lexicon": 1, + "id": "com.atproto.sync.getHead", + "defs": { + "main": { + "type": "query", + "description": + "DEPRECATED - please use com.atproto.sync.getLatestCommit instead", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "root", + ], + "properties": { + "root": { + "type": "string", + "format": "cid", + }, + }, + }, + }, + "errors": [ + { + "name": "HeadNotFound", + }, + ], + }, + }, + }, + "ComAtprotoSyncGetBlob": { + "lexicon": 1, + "id": "com.atproto.sync.getBlob", + "defs": { + "main": { + "type": "query", + "description": + "Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": [ + "did", + "cid", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the account.", + }, + "cid": { + "type": "string", + "format": "cid", + "description": "The CID of the blob to fetch", + }, + }, + }, + "output": { + "encoding": "*/*", + }, + "errors": [ + { + "name": "BlobNotFound", + }, + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncGetRepo": { + "lexicon": 1, + "id": "com.atproto.sync.getRepo", + "defs": { + "main": { + "type": "query", + "description": + "Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + "since": { + "type": "string", + "description": + "The revision ('rev') of the repo to create a diff from.", + }, + }, + }, + "output": { + "encoding": "application/vnd.ipld.car", + }, + "errors": [ + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncNotifyOfUpdate": { + "lexicon": 1, + "id": "com.atproto.sync.notifyOfUpdate", + "defs": { + "main": { + "type": "procedure", + "description": + "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "hostname", + ], + "properties": { + "hostname": { + "type": "string", + "description": + "Hostname of the current service (usually a PDS) that is notifying of update.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoSyncRequestCrawl": { + "lexicon": 1, + "id": "com.atproto.sync.requestCrawl", + "defs": { + "main": { + "type": "procedure", + "description": + "Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "hostname", + ], + "properties": { + "hostname": { + "type": "string", + "description": + "Hostname of the current service (eg, PDS) that is requesting to be crawled.", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoSyncListBlobs": { + "lexicon": 1, + "id": "com.atproto.sync.listBlobs", + "defs": { + "main": { + "type": "query", + "description": + "List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + "since": { + "type": "string", + "description": + "Optional revision of the repo to list blobs since.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "cids", + ], + "properties": { + "cursor": { + "type": "string", + }, + "cids": { + "type": "array", + "items": { + "type": "string", + "format": "cid", + }, + }, + }, + }, + }, + "errors": [ + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncGetLatestCommit": { + "lexicon": 1, + "id": "com.atproto.sync.getLatestCommit", + "defs": { + "main": { + "type": "query", + "description": + "Get the current commit CID & revision of the specified repo. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "cid", + "rev", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "rev": { + "type": "string", + }, + }, + }, + }, + "errors": [ + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncSubscribeRepos": { + "lexicon": 1, + "id": "com.atproto.sync.subscribeRepos", + "defs": { + "main": { + "type": "subscription", + "description": + "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "integer", + "description": + "The last known event seq number to backfill from.", + }, + }, + }, + "message": { + "schema": { + "type": "union", + "refs": [ + "lex:com.atproto.sync.subscribeRepos#commit", + "lex:com.atproto.sync.subscribeRepos#identity", + "lex:com.atproto.sync.subscribeRepos#account", + "lex:com.atproto.sync.subscribeRepos#handle", + "lex:com.atproto.sync.subscribeRepos#migrate", + "lex:com.atproto.sync.subscribeRepos#tombstone", + "lex:com.atproto.sync.subscribeRepos#info", + ], + }, + }, + "errors": [ + { + "name": "FutureCursor", + }, + { + "name": "ConsumerTooSlow", + "description": + "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection.", + }, + ], + }, + "commit": { + "type": "object", + "description": + "Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature.", + "required": [ + "seq", + "rebase", + "tooBig", + "repo", + "commit", + "rev", + "since", + "blocks", + "ops", + "blobs", + "time", + ], + "nullable": [ + "prev", + "since", + ], + "properties": { + "seq": { + "type": "integer", + "description": "The stream sequence number of this message.", + }, + "rebase": { + "type": "boolean", + "description": "DEPRECATED -- unused", + }, + "tooBig": { + "type": "boolean", + "description": + "Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.", + }, + "repo": { + "type": "string", + "format": "did", + "description": "The repo this event comes from.", + }, + "commit": { + "type": "cid-link", + "description": "Repo commit object CID.", + }, + "prev": { + "type": "cid-link", + "description": + "DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability.", + }, + "rev": { + "type": "string", + "description": + "The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event.", + }, + "since": { + "type": "string", + "description": + "The rev of the last emitted commit from this repo (if any).", + }, + "blocks": { + "type": "bytes", + "description": + "CAR file containing relevant blocks, as a diff since the previous repo state.", + "maxLength": 1000000, + }, + "ops": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.sync.subscribeRepos#repoOp", + "description": + "List of repo mutation operations in this commit (eg, records created, updated, or deleted).", + }, + "maxLength": 200, + }, + "blobs": { + "type": "array", + "items": { + "type": "cid-link", + "description": + "List of new blobs (by CID) referenced by records in this commit.", + }, + }, + "time": { + "type": "string", + "format": "datetime", + "description": + "Timestamp of when this message was originally broadcast.", + }, + }, + }, + "identity": { + "type": "object", + "description": + "Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.", + "required": [ + "seq", + "did", + "time", + ], + "properties": { + "seq": { + "type": "integer", + }, + "did": { + "type": "string", + "format": "did", + }, + "time": { + "type": "string", + "format": "datetime", + }, + "handle": { + "type": "string", + "format": "handle", + "description": + "The current handle for the account, or 'handle.invalid' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details.", + }, + }, + }, + "account": { + "type": "object", + "description": + "Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.", + "required": [ + "seq", + "did", + "time", + "active", + ], + "properties": { + "seq": { + "type": "integer", + }, + "did": { + "type": "string", + "format": "did", + }, + "time": { + "type": "string", + "format": "datetime", + }, + "active": { + "type": "boolean", + "description": + "Indicates that the account has a repository which can be fetched from the host that emitted this event.", + }, + "status": { + "type": "string", + "description": + "If active=false, this optional field indicates a reason for why the account is not active.", + "knownValues": [ + "takendown", + "suspended", + "deleted", + "deactivated", + ], + }, + }, + }, + "handle": { + "type": "object", + "description": "DEPRECATED -- Use #identity event instead", + "required": [ + "seq", + "did", + "handle", + "time", + ], + "properties": { + "seq": { + "type": "integer", + }, + "did": { + "type": "string", + "format": "did", + }, + "handle": { + "type": "string", + "format": "handle", + }, + "time": { + "type": "string", + "format": "datetime", + }, + }, + }, + "migrate": { + "type": "object", + "description": "DEPRECATED -- Use #account event instead", + "required": [ + "seq", + "did", + "migrateTo", + "time", + ], + "nullable": [ + "migrateTo", + ], + "properties": { + "seq": { + "type": "integer", + }, + "did": { + "type": "string", + "format": "did", + }, + "migrateTo": { + "type": "string", + }, + "time": { + "type": "string", + "format": "datetime", + }, + }, + }, + "tombstone": { + "type": "object", + "description": "DEPRECATED -- Use #account event instead", + "required": [ + "seq", + "did", + "time", + ], + "properties": { + "seq": { + "type": "integer", + }, + "did": { + "type": "string", + "format": "did", + }, + "time": { + "type": "string", + "format": "datetime", + }, + }, + }, + "info": { + "type": "object", + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string", + "knownValues": [ + "OutdatedCursor", + ], + }, + "message": { + "type": "string", + }, + }, + }, + "repoOp": { + "type": "object", + "description": "A repo operation, ie a mutation of a single record.", + "required": [ + "action", + "path", + "cid", + ], + "nullable": [ + "cid", + ], + "properties": { + "action": { + "type": "string", + "knownValues": [ + "create", + "update", + "delete", + ], + }, + "path": { + "type": "string", + }, + "cid": { + "type": "cid-link", + "description": + "For creates and updates, the new record CID. For deletions, null.", + }, + }, + }, + }, + }, + "ComAtprotoSyncGetRepoStatus": { + "lexicon": 1, + "id": "com.atproto.sync.getRepoStatus", + "defs": { + "main": { + "type": "query", + "description": + "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "active", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "active": { + "type": "boolean", + }, + "status": { + "type": "string", + "description": + "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deactivated", + ], + }, + "rev": { + "type": "string", + "description": + "Optional field, the current rev of the repo, if active=true", + }, + }, + }, + }, + "errors": [ + { + "name": "RepoNotFound", + }, + ], + }, + }, + }, + "ComAtprotoSyncGetRecord": { + "lexicon": 1, + "id": "com.atproto.sync.getRecord", + "defs": { + "main": { + "type": "query", + "description": + "Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "did", + "collection", + "rkey", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + "collection": { + "type": "string", + "format": "nsid", + }, + "rkey": { + "type": "string", + "description": "Record Key", + }, + "commit": { + "type": "string", + "format": "cid", + "description": + "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit", + }, + }, + }, + "output": { + "encoding": "application/vnd.ipld.car", + }, + "errors": [ + { + "name": "RecordNotFound", + }, + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncListRepos": { + "lexicon": 1, + "id": "com.atproto.sync.listRepos", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repos", + ], + "properties": { + "cursor": { + "type": "string", + }, + "repos": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.sync.listRepos#repo", + }, + }, + }, + }, + }, + }, + "repo": { + "type": "object", + "required": [ + "did", + "head", + "rev", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + "head": { + "type": "string", + "format": "cid", + "description": "Current repo commit CID", + }, + "rev": { + "type": "string", + }, + "active": { + "type": "boolean", + }, + "status": { + "type": "string", + "description": + "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.", + "knownValues": [ + "takendown", + "suspended", + "deactivated", + ], + }, + }, + }, + }, + }, + "ComAtprotoSyncGetBlocks": { + "lexicon": 1, + "id": "com.atproto.sync.getBlocks", + "defs": { + "main": { + "type": "query", + "description": + "Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.", + "parameters": { + "type": "params", + "required": [ + "did", + "cids", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + "cids": { + "type": "array", + "items": { + "type": "string", + "format": "cid", + }, + }, + }, + }, + "output": { + "encoding": "application/vnd.ipld.car", + }, + "errors": [ + { + "name": "BlockNotFound", + }, + { + "name": "RepoNotFound", + }, + { + "name": "RepoTakendown", + }, + { + "name": "RepoSuspended", + }, + { + "name": "RepoDeactivated", + }, + ], + }, + }, + }, + "ComAtprotoSyncListReposByCollection": { + "lexicon": 1, + "id": "com.atproto.sync.listReposByCollection", + "defs": { + "main": { + "type": "query", + "description": + "Enumerates all the DIDs which have records with the given collection NSID.", + "parameters": { + "type": "params", + "required": [ + "collection", + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid", + }, + "limit": { + "type": "integer", + "description": + "Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.", + "minimum": 1, + "maximum": 2000, + "default": 500, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repos", + ], + "properties": { + "cursor": { + "type": "string", + }, + "repos": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.sync.listReposByCollection#repo", + }, + }, + }, + }, + }, + }, + "repo": { + "type": "object", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + }, + }, + }, + }, + }, + "ComAtprotoSyncGetCheckout": { + "lexicon": 1, + "id": "com.atproto.sync.getCheckout", + "defs": { + "main": { + "type": "query", + "description": + "DEPRECATED - please use com.atproto.sync.getRepo instead", + "parameters": { + "type": "params", + "required": [ + "did", + ], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "The DID of the repo.", + }, + }, + }, + "output": { + "encoding": "application/vnd.ipld.car", + }, + }, + }, + }, + "ComAtprotoRepoStrongRef": { + "lexicon": 1, + "id": "com.atproto.repo.strongRef", + "description": "A URI with a content-hash fingerprint.", + "defs": { + "main": { + "type": "object", + "required": [ + "uri", + "cid", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + }, + }, + }, + }, + "ComAtprotoRepoDefs": { + "lexicon": 1, + "id": "com.atproto.repo.defs", + "defs": { + "commitMeta": { + "type": "object", + "required": [ + "cid", + "rev", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "rev": { + "type": "string", + }, + }, + }, + }, + }, + "ComAtprotoRepoListMissingBlobs": { + "lexicon": 1, + "id": "com.atproto.repo.listMissingBlobs", + "defs": { + "main": { + "type": "query", + "description": + "Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.", + "parameters": { + "type": "params", + "properties": { + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 1000, + "default": 500, + }, + "cursor": { + "type": "string", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "blobs", + ], + "properties": { + "cursor": { + "type": "string", + }, + "blobs": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.repo.listMissingBlobs#recordBlob", + }, + }, + }, + }, + }, + }, + "recordBlob": { + "type": "object", + "required": [ + "cid", + "recordUri", + ], + "properties": { + "cid": { + "type": "string", + "format": "cid", + }, + "recordUri": { + "type": "string", + "format": "at-uri", + }, + }, + }, + }, + }, + "ComAtprotoRepoCreateRecord": { + "lexicon": 1, + "id": "com.atproto.repo.createRecord", + "defs": { + "main": { + "type": "procedure", + "description": + "Create a single new repository record. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "record", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": + "The handle or DID of the repo (aka, current account).", + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection.", + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "maxLength": 512, + }, + "validate": { + "type": "boolean", + "description": + "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.", + }, + "record": { + "type": "unknown", + "description": "The record itself. Must contain a $type field.", + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": + "Compare and swap with the previous commit by CID.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "cid", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "commit": { + "type": "ref", + "ref": "lex:com.atproto.repo.defs#commitMeta", + }, + "validationStatus": { + "type": "string", + "knownValues": [ + "valid", + "unknown", + ], + }, + }, + }, + }, + "errors": [ + { + "name": "InvalidSwap", + "description": + "Indicates that 'swapCommit' didn't match current repo commit.", + }, + ], + }, + }, + }, + "ComAtprotoRepoDeleteRecord": { + "lexicon": 1, + "id": "com.atproto.repo.deleteRecord", + "defs": { + "main": { + "type": "procedure", + "description": + "Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "rkey", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": + "The handle or DID of the repo (aka, current account).", + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection.", + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": + "Compare and swap with the previous record by CID.", + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": + "Compare and swap with the previous commit by CID.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "commit": { + "type": "ref", + "ref": "lex:com.atproto.repo.defs#commitMeta", + }, + }, + }, + }, + "errors": [ + { + "name": "InvalidSwap", + }, + ], + }, + }, + }, + "ComAtprotoRepoPutRecord": { + "lexicon": 1, + "id": "com.atproto.repo.putRecord", + "defs": { + "main": { + "type": "procedure", + "description": + "Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repo", + "collection", + "rkey", + "record", + ], + "nullable": [ + "swapRecord", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": + "The handle or DID of the repo (aka, current account).", + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection.", + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "maxLength": 512, + }, + "validate": { + "type": "boolean", + "description": + "Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons.", + }, + "record": { + "type": "unknown", + "description": "The record to write.", + }, + "swapRecord": { + "type": "string", + "format": "cid", + "description": + "Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation", + }, + "swapCommit": { + "type": "string", + "format": "cid", + "description": + "Compare and swap with the previous commit by CID.", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "cid", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "commit": { + "type": "ref", + "ref": "lex:com.atproto.repo.defs#commitMeta", + }, + "validationStatus": { + "type": "string", + "knownValues": [ + "valid", + "unknown", + ], + }, + }, + }, + }, + "errors": [ + { + "name": "InvalidSwap", + }, + ], + }, + }, + }, + "ComAtprotoRepoUploadBlob": { + "lexicon": 1, + "id": "com.atproto.repo.uploadBlob", + "defs": { + "main": { + "type": "procedure", + "description": + "Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.", + "input": { + "encoding": "*/*", + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "blob", + ], + "properties": { + "blob": { + "type": "blob", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoRepoImportRepo": { + "lexicon": 1, + "id": "com.atproto.repo.importRepo", + "defs": { + "main": { + "type": "procedure", + "description": + "Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.", + "input": { + "encoding": "application/vnd.ipld.car", + }, + }, + }, + }, + "ComAtprotoRepoDescribeRepo": { + "lexicon": 1, + "id": "com.atproto.repo.describeRepo", + "defs": { + "main": { + "type": "query", + "description": + "Get information about an account and repository, including the list of collections. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "repo", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "handle", + "did", + "didDoc", + "collections", + "handleIsCorrect", + ], + "properties": { + "handle": { + "type": "string", + "format": "handle", + }, + "did": { + "type": "string", + "format": "did", + }, + "didDoc": { + "type": "unknown", + "description": "The complete DID document for this account.", + }, + "collections": { + "type": "array", + "description": + "List of all the collections (NSIDs) for which this repo contains at least one record.", + "items": { + "type": "string", + "format": "nsid", + }, + }, + "handleIsCorrect": { + "type": "boolean", + "description": + "Indicates if handle is currently valid (resolves bi-directionally)", + }, + }, + }, + }, + }, + }, + }, + "ComAtprotoRepoGetRecord": { + "lexicon": 1, + "id": "com.atproto.repo.getRecord", + "defs": { + "main": { + "type": "query", + "description": + "Get a single record from a repository. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "repo", + "collection", + "rkey", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo.", + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record collection.", + }, + "rkey": { + "type": "string", + "description": "The Record Key.", + "format": "record-key", + }, + "cid": { + "type": "string", + "format": "cid", + "description": + "The CID of the version of the record. If not specified, then return the most recent version.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "uri", + "value", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "value": { + "type": "unknown", + }, + }, + }, + }, + "errors": [ + { + "name": "RecordNotFound", + }, + ], + }, + }, + }, + "ComAtprotoRepoApplyWrites": { + "lexicon": 1, + "id": "com.atproto.repo.applyWrites", + "defs": { + "main": { + "type": "procedure", + "description": + "Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "repo", + "writes", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": + "The handle or DID of the repo (aka, current account).", + }, + "validate": { + "type": "boolean", + "description": + "Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons.", + }, + "writes": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:com.atproto.repo.applyWrites#create", + "lex:com.atproto.repo.applyWrites#update", + "lex:com.atproto.repo.applyWrites#delete", + ], + "closed": true, + }, + }, + "swapCommit": { + "type": "string", + "description": + "If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.", + "format": "cid", + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [], + "properties": { + "commit": { + "type": "ref", + "ref": "lex:com.atproto.repo.defs#commitMeta", + }, + "results": { + "type": "array", + "items": { + "type": "union", + "refs": [ + "lex:com.atproto.repo.applyWrites#createResult", + "lex:com.atproto.repo.applyWrites#updateResult", + "lex:com.atproto.repo.applyWrites#deleteResult", + ], + "closed": true, + }, + }, + }, + }, + }, + "errors": [ + { + "name": "InvalidSwap", + "description": + "Indicates that the 'swapCommit' parameter did not match current commit.", + }, + ], + }, + "create": { + "type": "object", + "description": "Operation which creates a new record.", + "required": [ + "collection", + "value", + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid", + }, + "rkey": { + "type": "string", + "maxLength": 512, + }, + "value": { + "type": "unknown", + }, + }, + }, + "update": { + "type": "object", + "description": "Operation which updates an existing record.", + "required": [ + "collection", + "rkey", + "value", + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid", + }, + "rkey": { + "type": "string", + }, + "value": { + "type": "unknown", + }, + }, + }, + "delete": { + "type": "object", + "description": "Operation which deletes an existing record.", + "required": [ + "collection", + "rkey", + ], + "properties": { + "collection": { + "type": "string", + "format": "nsid", + }, + "rkey": { + "type": "string", + }, + }, + }, + "createResult": { + "type": "object", + "required": [ + "uri", + "cid", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "validationStatus": { + "type": "string", + "knownValues": [ + "valid", + "unknown", + ], + }, + }, + }, + "updateResult": { + "type": "object", + "required": [ + "uri", + "cid", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "validationStatus": { + "type": "string", + "knownValues": [ + "valid", + "unknown", + ], + }, + }, + }, + "deleteResult": { + "type": "object", + "required": [], + "properties": {}, + }, + }, + }, + "ComAtprotoRepoListRecords": { + "lexicon": 1, + "id": "com.atproto.repo.listRecords", + "defs": { + "main": { + "type": "query", + "description": + "List a range of records in a repository, matching a specific collection. Does not require auth.", + "parameters": { + "type": "params", + "required": [ + "repo", + "collection", + ], + "properties": { + "repo": { + "type": "string", + "format": "at-identifier", + "description": "The handle or DID of the repo.", + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "The NSID of the record type.", + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50, + "description": "The number of records to return.", + }, + "cursor": { + "type": "string", + }, + "rkeyStart": { + "type": "string", + "description": + "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)", + }, + "rkeyEnd": { + "type": "string", + "description": + "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)", + }, + "reverse": { + "type": "boolean", + "description": + "Flag to reverse the order of the returned records.", + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "records", + ], + "properties": { + "cursor": { + "type": "string", + }, + "records": { + "type": "array", + "items": { + "type": "ref", + "ref": "lex:com.atproto.repo.listRecords#record", + }, + }, + }, + }, + }, + }, + "record": { + "type": "object", + "required": [ + "uri", + "cid", + "value", + ], + "properties": { + "uri": { + "type": "string", + "format": "at-uri", + }, + "cid": { + "type": "string", + "format": "cid", + }, + "value": { + "type": "unknown", + }, + }, + }, + }, + }, + "ComAtprotoModerationDefs": { + "lexicon": 1, + "id": "com.atproto.moderation.defs", + "defs": { + "reasonType": { + "type": "string", + "knownValues": [ + "com.atproto.moderation.defs#reasonSpam", + "com.atproto.moderation.defs#reasonViolation", + "com.atproto.moderation.defs#reasonMisleading", + "com.atproto.moderation.defs#reasonSexual", + "com.atproto.moderation.defs#reasonRude", + "com.atproto.moderation.defs#reasonOther", + "com.atproto.moderation.defs#reasonAppeal", + ], + }, + "reasonSpam": { + "type": "token", + "description": "Spam: frequent unwanted promotion, replies, mentions", + }, + "reasonViolation": { + "type": "token", + "description": + "Direct violation of server rules, laws, terms of service", + }, + "reasonMisleading": { + "type": "token", + "description": "Misleading identity, affiliation, or content", + }, + "reasonSexual": { + "type": "token", + "description": "Unwanted or mislabeled sexual content", + }, + "reasonRude": { + "type": "token", + "description": + "Rude, harassing, explicit, or otherwise unwelcoming behavior", + }, + "reasonOther": { + "type": "token", + "description": + "Other: reports not falling under another report category", + }, + "reasonAppeal": { + "type": "token", + "description": "Appeal: appeal a previously taken moderation action", + }, + "subjectType": { + "type": "string", + "description": + "Tag describing a type of subject that might be reported.", + "knownValues": [ + "account", + "record", + "chat", + ], + }, + }, + }, + "ComAtprotoModerationCreateReport": { + "lexicon": 1, + "id": "com.atproto.moderation.createReport", + "defs": { + "main": { + "type": "procedure", + "description": + "Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "reasonType", + "subject", + ], + "properties": { + "reasonType": { + "type": "ref", + "description": + "Indicates the broad category of violation the report is for.", + "ref": "lex:com.atproto.moderation.defs#reasonType", + }, + "reason": { + "type": "string", + "maxGraphemes": 2000, + "maxLength": 20000, + "description": + "Additional context about the content and violation.", + }, + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + ], + }, + }, + }, + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "id", + "reasonType", + "subject", + "reportedBy", + "createdAt", + ], + "properties": { + "id": { + "type": "integer", + }, + "reasonType": { + "type": "ref", + "ref": "lex:com.atproto.moderation.defs#reasonType", + }, + "reason": { + "type": "string", + "maxGraphemes": 2000, + "maxLength": 20000, + }, + "subject": { + "type": "union", + "refs": [ + "lex:com.atproto.admin.defs#repoRef", + "lex:com.atproto.repo.strongRef", + ], + }, + "reportedBy": { + "type": "string", + "format": "did", + }, + "createdAt": { + "type": "string", + "format": "datetime", + }, + }, + }, + }, + }, + }, + }, +} as Record; +export const schemas = Object.values(schemaDict) satisfies LexiconDoc[]; +export const lexicons: Lexicons = new Lexicons(schemas); + +export function validate( + v: unknown, + id: string, + hash: string, + requiredType: true, +): ValidationResult; +export function validate( + v: unknown, + id: string, + hash: string, + requiredType?: false, +): ValidationResult; +export function validate( + v: unknown, + id: string, + hash: string, + requiredType?: boolean, +): ValidationResult { + return (requiredType ? is$typed : maybe$typed)(v, id, hash) + ? lexicons.validate(`${id}#${hash}`, v) + : { + success: false, + error: new ValidationError( + `Must be an object with "${ + hash === "main" ? id : `${id}#${hash}` + }" $type property`, + ), + }; +} + +export const ids = { + ToolsOzoneSignatureFindCorrelation: "tools.ozone.signature.findCorrelation", + ToolsOzoneSignatureDefs: "tools.ozone.signature.defs", + ToolsOzoneSignatureSearchAccounts: "tools.ozone.signature.searchAccounts", + ToolsOzoneSignatureFindRelatedAccounts: + "tools.ozone.signature.findRelatedAccounts", + ToolsOzoneServerGetConfig: "tools.ozone.server.getConfig", + ToolsOzoneTeamListMembers: "tools.ozone.team.listMembers", + ToolsOzoneTeamDefs: "tools.ozone.team.defs", + ToolsOzoneTeamDeleteMember: "tools.ozone.team.deleteMember", + ToolsOzoneTeamUpdateMember: "tools.ozone.team.updateMember", + ToolsOzoneTeamAddMember: "tools.ozone.team.addMember", + ToolsOzoneCommunicationDefs: "tools.ozone.communication.defs", + ToolsOzoneCommunicationUpdateTemplate: + "tools.ozone.communication.updateTemplate", + ToolsOzoneCommunicationCreateTemplate: + "tools.ozone.communication.createTemplate", + ToolsOzoneCommunicationListTemplates: + "tools.ozone.communication.listTemplates", + ToolsOzoneCommunicationDeleteTemplate: + "tools.ozone.communication.deleteTemplate", + ToolsOzoneSetDefs: "tools.ozone.set.defs", + ToolsOzoneSetAddValues: "tools.ozone.set.addValues", + ToolsOzoneSetGetValues: "tools.ozone.set.getValues", + ToolsOzoneSetDeleteSet: "tools.ozone.set.deleteSet", + ToolsOzoneSetUpsertSet: "tools.ozone.set.upsertSet", + ToolsOzoneSetDeleteValues: "tools.ozone.set.deleteValues", + ToolsOzoneSetQuerySets: "tools.ozone.set.querySets", + ToolsOzoneSettingDefs: "tools.ozone.setting.defs", + ToolsOzoneSettingListOptions: "tools.ozone.setting.listOptions", + ToolsOzoneSettingRemoveOptions: "tools.ozone.setting.removeOptions", + ToolsOzoneSettingUpsertOption: "tools.ozone.setting.upsertOption", + ToolsOzoneModerationGetReporterStats: + "tools.ozone.moderation.getReporterStats", + ToolsOzoneModerationQueryStatuses: "tools.ozone.moderation.queryStatuses", + ToolsOzoneModerationGetRepo: "tools.ozone.moderation.getRepo", + ToolsOzoneModerationDefs: "tools.ozone.moderation.defs", + ToolsOzoneModerationGetRecords: "tools.ozone.moderation.getRecords", + ToolsOzoneModerationGetEvent: "tools.ozone.moderation.getEvent", + ToolsOzoneModerationQueryEvents: "tools.ozone.moderation.queryEvents", + ToolsOzoneModerationGetRecord: "tools.ozone.moderation.getRecord", + ToolsOzoneModerationEmitEvent: "tools.ozone.moderation.emitEvent", + ToolsOzoneModerationSearchRepos: "tools.ozone.moderation.searchRepos", + ToolsOzoneModerationGetRepos: "tools.ozone.moderation.getRepos", + AppBskyVideoUploadVideo: "app.bsky.video.uploadVideo", + AppBskyVideoDefs: "app.bsky.video.defs", + AppBskyVideoGetJobStatus: "app.bsky.video.getJobStatus", + AppBskyVideoGetUploadLimits: "app.bsky.video.getUploadLimits", + AppBskyEmbedDefs: "app.bsky.embed.defs", + AppBskyEmbedRecord: "app.bsky.embed.record", + AppBskyEmbedImages: "app.bsky.embed.images", + AppBskyEmbedRecordWithMedia: "app.bsky.embed.recordWithMedia", + AppBskyEmbedVideo: "app.bsky.embed.video", + AppBskyEmbedExternal: "app.bsky.embed.external", + AppBskyNotificationRegisterPush: "app.bsky.notification.registerPush", + AppBskyNotificationPutPreferences: "app.bsky.notification.putPreferences", + AppBskyNotificationUpdateSeen: "app.bsky.notification.updateSeen", + AppBskyNotificationListNotifications: + "app.bsky.notification.listNotifications", + AppBskyNotificationGetUnreadCount: "app.bsky.notification.getUnreadCount", + AppBskyUnspeccedSearchStarterPacksSkeleton: + "app.bsky.unspecced.searchStarterPacksSkeleton", + AppBskyUnspeccedDefs: "app.bsky.unspecced.defs", + AppBskyUnspeccedSearchActorsSkeleton: + "app.bsky.unspecced.searchActorsSkeleton", + AppBskyUnspeccedGetSuggestionsSkeleton: + "app.bsky.unspecced.getSuggestionsSkeleton", + AppBskyUnspeccedSearchPostsSkeleton: "app.bsky.unspecced.searchPostsSkeleton", + AppBskyUnspeccedGetPopularFeedGenerators: + "app.bsky.unspecced.getPopularFeedGenerators", + AppBskyUnspeccedGetTrendingTopics: "app.bsky.unspecced.getTrendingTopics", + AppBskyUnspeccedGetTaggedSuggestions: + "app.bsky.unspecced.getTaggedSuggestions", + AppBskyUnspeccedGetConfig: "app.bsky.unspecced.getConfig", + AppBskyGraphGetStarterPacks: "app.bsky.graph.getStarterPacks", + AppBskyGraphGetSuggestedFollowsByActor: + "app.bsky.graph.getSuggestedFollowsByActor", + AppBskyGraphBlock: "app.bsky.graph.block", + AppBskyGraphFollow: "app.bsky.graph.follow", + AppBskyGraphDefs: "app.bsky.graph.defs", + AppBskyGraphUnmuteActorList: "app.bsky.graph.unmuteActorList", + AppBskyGraphGetListBlocks: "app.bsky.graph.getListBlocks", + AppBskyGraphListblock: "app.bsky.graph.listblock", + AppBskyGraphGetStarterPack: "app.bsky.graph.getStarterPack", + AppBskyGraphStarterpack: "app.bsky.graph.starterpack", + AppBskyGraphMuteActorList: "app.bsky.graph.muteActorList", + AppBskyGraphMuteThread: "app.bsky.graph.muteThread", + AppBskyGraphSearchStarterPacks: "app.bsky.graph.searchStarterPacks", + AppBskyGraphGetActorStarterPacks: "app.bsky.graph.getActorStarterPacks", + AppBskyGraphGetLists: "app.bsky.graph.getLists", + AppBskyGraphGetFollowers: "app.bsky.graph.getFollowers", + AppBskyGraphUnmuteThread: "app.bsky.graph.unmuteThread", + AppBskyGraphMuteActor: "app.bsky.graph.muteActor", + AppBskyGraphGetMutes: "app.bsky.graph.getMutes", + AppBskyGraphListitem: "app.bsky.graph.listitem", + AppBskyGraphList: "app.bsky.graph.list", + AppBskyGraphGetKnownFollowers: "app.bsky.graph.getKnownFollowers", + AppBskyGraphGetListMutes: "app.bsky.graph.getListMutes", + AppBskyGraphGetFollows: "app.bsky.graph.getFollows", + AppBskyGraphGetBlocks: "app.bsky.graph.getBlocks", + AppBskyGraphGetRelationships: "app.bsky.graph.getRelationships", + AppBskyGraphUnmuteActor: "app.bsky.graph.unmuteActor", + AppBskyGraphGetList: "app.bsky.graph.getList", + AppBskyFeedGenerator: "app.bsky.feed.generator", + AppBskyFeedSendInteractions: "app.bsky.feed.sendInteractions", + AppBskyFeedDefs: "app.bsky.feed.defs", + AppBskyFeedGetFeedGenerators: "app.bsky.feed.getFeedGenerators", + AppBskyFeedGetTimeline: "app.bsky.feed.getTimeline", + AppBskyFeedGetFeedGenerator: "app.bsky.feed.getFeedGenerator", + AppBskyFeedGetAuthorFeed: "app.bsky.feed.getAuthorFeed", + AppBskyFeedGetLikes: "app.bsky.feed.getLikes", + AppBskyFeedPostgate: "app.bsky.feed.postgate", + AppBskyFeedThreadgate: "app.bsky.feed.threadgate", + AppBskyFeedGetPostThread: "app.bsky.feed.getPostThread", + AppBskyFeedGetActorLikes: "app.bsky.feed.getActorLikes", + AppBskyFeedLike: "app.bsky.feed.like", + AppBskyFeedGetRepostedBy: "app.bsky.feed.getRepostedBy", + AppBskyFeedRepost: "app.bsky.feed.repost", + AppBskyFeedDescribeFeedGenerator: "app.bsky.feed.describeFeedGenerator", + AppBskyFeedSearchPosts: "app.bsky.feed.searchPosts", + AppBskyFeedGetPosts: "app.bsky.feed.getPosts", + AppBskyFeedGetFeed: "app.bsky.feed.getFeed", + AppBskyFeedGetQuotes: "app.bsky.feed.getQuotes", + AppBskyFeedGetFeedSkeleton: "app.bsky.feed.getFeedSkeleton", + AppBskyFeedGetListFeed: "app.bsky.feed.getListFeed", + AppBskyFeedGetSuggestedFeeds: "app.bsky.feed.getSuggestedFeeds", + AppBskyFeedGetActorFeeds: "app.bsky.feed.getActorFeeds", + AppBskyFeedPost: "app.bsky.feed.post", + AppBskyRichtextFacet: "app.bsky.richtext.facet", + AppBskyActorSearchActorsTypeahead: "app.bsky.actor.searchActorsTypeahead", + AppBskyActorDefs: "app.bsky.actor.defs", + AppBskyActorPutPreferences: "app.bsky.actor.putPreferences", + AppBskyActorGetProfile: "app.bsky.actor.getProfile", + AppBskyActorGetSuggestions: "app.bsky.actor.getSuggestions", + AppBskyActorSearchActors: "app.bsky.actor.searchActors", + AppBskyActorGetProfiles: "app.bsky.actor.getProfiles", + AppBskyActorGetPreferences: "app.bsky.actor.getPreferences", + AppBskyActorProfile: "app.bsky.actor.profile", + AppBskyLabelerDefs: "app.bsky.labeler.defs", + AppBskyLabelerService: "app.bsky.labeler.service", + AppBskyLabelerGetServices: "app.bsky.labeler.getServices", + ChatBskyConvoListConvos: "chat.bsky.convo.listConvos", + ChatBskyConvoUnmuteConvo: "chat.bsky.convo.unmuteConvo", + ChatBskyConvoDefs: "chat.bsky.convo.defs", + ChatBskyConvoGetConvoAvailability: "chat.bsky.convo.getConvoAvailability", + ChatBskyConvoGetLog: "chat.bsky.convo.getLog", + ChatBskyConvoSendMessage: "chat.bsky.convo.sendMessage", + ChatBskyConvoLeaveConvo: "chat.bsky.convo.leaveConvo", + ChatBskyConvoAcceptConvo: "chat.bsky.convo.acceptConvo", + ChatBskyConvoMuteConvo: "chat.bsky.convo.muteConvo", + ChatBskyConvoDeleteMessageForSelf: "chat.bsky.convo.deleteMessageForSelf", + ChatBskyConvoUpdateRead: "chat.bsky.convo.updateRead", + ChatBskyConvoUpdateAllRead: "chat.bsky.convo.updateAllRead", + ChatBskyConvoGetConvo: "chat.bsky.convo.getConvo", + ChatBskyConvoGetMessages: "chat.bsky.convo.getMessages", + ChatBskyConvoGetConvoForMembers: "chat.bsky.convo.getConvoForMembers", + ChatBskyConvoSendMessageBatch: "chat.bsky.convo.sendMessageBatch", + ChatBskyActorDefs: "chat.bsky.actor.defs", + ChatBskyActorDeclaration: "chat.bsky.actor.declaration", + ChatBskyActorExportAccountData: "chat.bsky.actor.exportAccountData", + ChatBskyActorDeleteAccount: "chat.bsky.actor.deleteAccount", + ChatBskyModerationGetActorMetadata: "chat.bsky.moderation.getActorMetadata", + ChatBskyModerationGetMessageContext: "chat.bsky.moderation.getMessageContext", + ChatBskyModerationUpdateActorAccess: "chat.bsky.moderation.updateActorAccess", + SoSprkVideoUploadVideo: "so.sprk.video.uploadVideo", + SoSprkVideoDefs: "so.sprk.video.defs", + SoSprkVideoGetJobStatus: "so.sprk.video.getJobStatus", + SoSprkVideoGetUploadLimits: "so.sprk.video.getUploadLimits", + SoSprkNotificationRegisterPush: "so.sprk.notification.registerPush", + SoSprkNotificationPutPreferences: "so.sprk.notification.putPreferences", + SoSprkNotificationUpdateSeen: "so.sprk.notification.updateSeen", + SoSprkNotificationListNotifications: "so.sprk.notification.listNotifications", + SoSprkNotificationGetUnreadCount: "so.sprk.notification.getUnreadCount", + SoSprkGraphGetSuggestedFollowsByActor: + "so.sprk.graph.getSuggestedFollowsByActor", + SoSprkGraphBlock: "so.sprk.graph.block", + SoSprkGraphFollow: "so.sprk.graph.follow", + SoSprkGraphDefs: "so.sprk.graph.defs", + SoSprkGraphMuteThread: "so.sprk.graph.muteThread", + SoSprkGraphGetFollowers: "so.sprk.graph.getFollowers", + SoSprkGraphUnmuteThread: "so.sprk.graph.unmuteThread", + SoSprkGraphMuteActor: "so.sprk.graph.muteActor", + SoSprkGraphGetMutes: "so.sprk.graph.getMutes", + SoSprkGraphGetKnownFollowers: "so.sprk.graph.getKnownFollowers", + SoSprkGraphGetFollows: "so.sprk.graph.getFollows", + SoSprkGraphGetBlocks: "so.sprk.graph.getBlocks", + SoSprkGraphGetRelationships: "so.sprk.graph.getRelationships", + SoSprkGraphUnmuteActor: "so.sprk.graph.unmuteActor", + SoSprkFeedGenerator: "so.sprk.feed.generator", + SoSprkFeedSendInteractions: "so.sprk.feed.sendInteractions", + SoSprkFeedDefs: "so.sprk.feed.defs", + SoSprkFeedGetFeedGenerators: "so.sprk.feed.getFeedGenerators", + SoSprkFeedGetTimeline: "so.sprk.feed.getTimeline", + SoSprkFeedGetFeedGenerator: "so.sprk.feed.getFeedGenerator", + SoSprkFeedGetAuthorFeed: "so.sprk.feed.getAuthorFeed", + SoSprkFeedGetLikes: "so.sprk.feed.getLikes", + SoSprkFeedPostgate: "so.sprk.feed.postgate", + SoSprkFeedThreadgate: "so.sprk.feed.threadgate", + SoSprkFeedGetPostThread: "so.sprk.feed.getPostThread", + SoSprkFeedGetActorLikes: "so.sprk.feed.getActorLikes", + SoSprkFeedLike: "so.sprk.feed.like", + SoSprkFeedGetRepostedBy: "so.sprk.feed.getRepostedBy", + SoSprkFeedRepost: "so.sprk.feed.repost", + SoSprkFeedDescribeFeedGenerator: "so.sprk.feed.describeFeedGenerator", + SoSprkFeedSearchPosts: "so.sprk.feed.searchPosts", + SoSprkFeedGetPosts: "so.sprk.feed.getPosts", + SoSprkFeedGetFeed: "so.sprk.feed.getFeed", + SoSprkFeedReply: "so.sprk.feed.reply", + SoSprkFeedGetFeedSkeleton: "so.sprk.feed.getFeedSkeleton", + SoSprkFeedGetSuggestedFeeds: "so.sprk.feed.getSuggestedFeeds", + SoSprkFeedGetActorFeeds: "so.sprk.feed.getActorFeeds", + SoSprkFeedPost: "so.sprk.feed.post", + SoSprkRichtextFacet: "so.sprk.richtext.facet", + SoSprkSoundDefs: "so.sprk.sound.defs", + SoSprkSoundGetActorAudios: "so.sprk.sound.getActorAudios", + SoSprkSoundGetAudioPosts: "so.sprk.sound.getAudioPosts", + SoSprkSoundGetAudios: "so.sprk.sound.getAudios", + SoSprkSoundAudio: "so.sprk.sound.audio", + SoSprkSoundGetTrendingAudios: "so.sprk.sound.getTrendingAudios", + SoSprkActorSearchActorsTypeahead: "so.sprk.actor.searchActorsTypeahead", + SoSprkActorDefs: "so.sprk.actor.defs", + SoSprkActorPutPreferences: "so.sprk.actor.putPreferences", + SoSprkActorGetProfile: "so.sprk.actor.getProfile", + SoSprkActorGetSuggestions: "so.sprk.actor.getSuggestions", + SoSprkActorSearchActors: "so.sprk.actor.searchActors", + SoSprkActorGetProfiles: "so.sprk.actor.getProfiles", + SoSprkActorGetPreferences: "so.sprk.actor.getPreferences", + SoSprkActorProfile: "so.sprk.actor.profile", + SoSprkStoryDefs: "so.sprk.story.defs", + SoSprkStoryGetTimeline: "so.sprk.story.getTimeline", + SoSprkStoryGetStories: "so.sprk.story.getStories", + SoSprkStoryPost: "so.sprk.story.post", + SoSprkLabelerDefs: "so.sprk.labeler.defs", + SoSprkLabelerService: "so.sprk.labeler.service", + SoSprkLabelerGetServices: "so.sprk.labeler.getServices", + SoSprkMediaDefs: "so.sprk.media.defs", + SoSprkMediaImages: "so.sprk.media.images", + SoSprkMediaVideo: "so.sprk.media.video", + SoSprkMediaImage: "so.sprk.media.image", + ComAtprotoTempAddReservedHandle: "com.atproto.temp.addReservedHandle", + ComAtprotoTempCheckSignupQueue: "com.atproto.temp.checkSignupQueue", + ComAtprotoTempRequestPhoneVerification: + "com.atproto.temp.requestPhoneVerification", + ComAtprotoTempFetchLabels: "com.atproto.temp.fetchLabels", + ComAtprotoIdentityUpdateHandle: "com.atproto.identity.updateHandle", + ComAtprotoIdentitySignPlcOperation: "com.atproto.identity.signPlcOperation", + ComAtprotoIdentitySubmitPlcOperation: + "com.atproto.identity.submitPlcOperation", + ComAtprotoIdentityResolveHandle: "com.atproto.identity.resolveHandle", + ComAtprotoIdentityRequestPlcOperationSignature: + "com.atproto.identity.requestPlcOperationSignature", + ComAtprotoIdentityGetRecommendedDidCredentials: + "com.atproto.identity.getRecommendedDidCredentials", + ComAtprotoAdminUpdateAccountEmail: "com.atproto.admin.updateAccountEmail", + ComAtprotoAdminGetAccountInfo: "com.atproto.admin.getAccountInfo", + ComAtprotoAdminGetSubjectStatus: "com.atproto.admin.getSubjectStatus", + ComAtprotoAdminDefs: "com.atproto.admin.defs", + ComAtprotoAdminSearchAccounts: "com.atproto.admin.searchAccounts", + ComAtprotoAdminUpdateAccountPassword: + "com.atproto.admin.updateAccountPassword", + ComAtprotoAdminUpdateAccountHandle: "com.atproto.admin.updateAccountHandle", + ComAtprotoAdminGetInviteCodes: "com.atproto.admin.getInviteCodes", + ComAtprotoAdminEnableAccountInvites: "com.atproto.admin.enableAccountInvites", + ComAtprotoAdminDisableAccountInvites: + "com.atproto.admin.disableAccountInvites", + ComAtprotoAdminDisableInviteCodes: "com.atproto.admin.disableInviteCodes", + ComAtprotoAdminUpdateSubjectStatus: "com.atproto.admin.updateSubjectStatus", + ComAtprotoAdminSendEmail: "com.atproto.admin.sendEmail", + ComAtprotoAdminGetAccountInfos: "com.atproto.admin.getAccountInfos", + ComAtprotoAdminDeleteAccount: "com.atproto.admin.deleteAccount", + ComAtprotoLabelSubscribeLabels: "com.atproto.label.subscribeLabels", + ComAtprotoLabelDefs: "com.atproto.label.defs", + ComAtprotoLabelQueryLabels: "com.atproto.label.queryLabels", + ComAtprotoServerRequestEmailConfirmation: + "com.atproto.server.requestEmailConfirmation", + ComAtprotoServerReserveSigningKey: "com.atproto.server.reserveSigningKey", + ComAtprotoServerDefs: "com.atproto.server.defs", + ComAtprotoServerGetServiceAuth: "com.atproto.server.getServiceAuth", + ComAtprotoServerGetAccountInviteCodes: + "com.atproto.server.getAccountInviteCodes", + ComAtprotoServerCreateSession: "com.atproto.server.createSession", + ComAtprotoServerListAppPasswords: "com.atproto.server.listAppPasswords", + ComAtprotoServerCreateInviteCodes: "com.atproto.server.createInviteCodes", + ComAtprotoServerDeleteSession: "com.atproto.server.deleteSession", + ComAtprotoServerRevokeAppPassword: "com.atproto.server.revokeAppPassword", + ComAtprotoServerCreateAppPassword: "com.atproto.server.createAppPassword", + ComAtprotoServerActivateAccount: "com.atproto.server.activateAccount", + ComAtprotoServerDescribeServer: "com.atproto.server.describeServer", + ComAtprotoServerConfirmEmail: "com.atproto.server.confirmEmail", + ComAtprotoServerGetSession: "com.atproto.server.getSession", + ComAtprotoServerRefreshSession: "com.atproto.server.refreshSession", + ComAtprotoServerDeactivateAccount: "com.atproto.server.deactivateAccount", + ComAtprotoServerUpdateEmail: "com.atproto.server.updateEmail", + ComAtprotoServerResetPassword: "com.atproto.server.resetPassword", + ComAtprotoServerCheckAccountStatus: "com.atproto.server.checkAccountStatus", + ComAtprotoServerRequestEmailUpdate: "com.atproto.server.requestEmailUpdate", + ComAtprotoServerRequestPasswordReset: + "com.atproto.server.requestPasswordReset", + ComAtprotoServerRequestAccountDelete: + "com.atproto.server.requestAccountDelete", + ComAtprotoServerCreateAccount: "com.atproto.server.createAccount", + ComAtprotoServerDeleteAccount: "com.atproto.server.deleteAccount", + ComAtprotoServerCreateInviteCode: "com.atproto.server.createInviteCode", + ComAtprotoLexiconSchema: "com.atproto.lexicon.schema", + ComAtprotoSyncGetHead: "com.atproto.sync.getHead", + ComAtprotoSyncGetBlob: "com.atproto.sync.getBlob", + ComAtprotoSyncGetRepo: "com.atproto.sync.getRepo", + ComAtprotoSyncNotifyOfUpdate: "com.atproto.sync.notifyOfUpdate", + ComAtprotoSyncRequestCrawl: "com.atproto.sync.requestCrawl", + ComAtprotoSyncListBlobs: "com.atproto.sync.listBlobs", + ComAtprotoSyncGetLatestCommit: "com.atproto.sync.getLatestCommit", + ComAtprotoSyncSubscribeRepos: "com.atproto.sync.subscribeRepos", + ComAtprotoSyncGetRepoStatus: "com.atproto.sync.getRepoStatus", + ComAtprotoSyncGetRecord: "com.atproto.sync.getRecord", + ComAtprotoSyncListRepos: "com.atproto.sync.listRepos", + ComAtprotoSyncGetBlocks: "com.atproto.sync.getBlocks", + ComAtprotoSyncListReposByCollection: "com.atproto.sync.listReposByCollection", + ComAtprotoSyncGetCheckout: "com.atproto.sync.getCheckout", + ComAtprotoRepoStrongRef: "com.atproto.repo.strongRef", + ComAtprotoRepoDefs: "com.atproto.repo.defs", + ComAtprotoRepoListMissingBlobs: "com.atproto.repo.listMissingBlobs", + ComAtprotoRepoCreateRecord: "com.atproto.repo.createRecord", + ComAtprotoRepoDeleteRecord: "com.atproto.repo.deleteRecord", + ComAtprotoRepoPutRecord: "com.atproto.repo.putRecord", + ComAtprotoRepoUploadBlob: "com.atproto.repo.uploadBlob", + ComAtprotoRepoImportRepo: "com.atproto.repo.importRepo", + ComAtprotoRepoDescribeRepo: "com.atproto.repo.describeRepo", + ComAtprotoRepoGetRecord: "com.atproto.repo.getRecord", + ComAtprotoRepoApplyWrites: "com.atproto.repo.applyWrites", + ComAtprotoRepoListRecords: "com.atproto.repo.listRecords", + ComAtprotoModerationDefs: "com.atproto.moderation.defs", + ComAtprotoModerationCreateReport: "com.atproto.moderation.createReport", +} as const; diff --git a/lex/types/app/bsky/actor/defs.ts b/lex/types/app/bsky/actor/defs.ts new file mode 100644 index 0000000..11d0022 --- /dev/null +++ b/lex/types/app/bsky/actor/defs.ts @@ -0,0 +1,540 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as AppBskyGraphDefs from "../graph/defs.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; +import type * as AppBskyFeedThreadgate from "../feed/threadgate.ts"; +import type * as AppBskyFeedPostgate from "../feed/postgate.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.actor.defs"; + +export interface ProfileViewBasic { + $type?: "app.bsky.actor.defs#profileViewBasic"; + did: string; + handle: string; + displayName?: string; + avatar?: string; + associated?: ProfileAssociated; + viewer?: ViewerState; + labels?: (ComAtprotoLabelDefs.Label)[]; + createdAt?: string; +} + +const hashProfileViewBasic = "profileViewBasic"; + +export function isProfileViewBasic(v: V) { + return is$typed(v, id, hashProfileViewBasic); +} + +export function validateProfileViewBasic(v: V) { + return validate(v, id, hashProfileViewBasic); +} + +export interface ProfileView { + $type?: "app.bsky.actor.defs#profileView"; + did: string; + handle: string; + displayName?: string; + description?: string; + avatar?: string; + associated?: ProfileAssociated; + indexedAt?: string; + createdAt?: string; + viewer?: ViewerState; + labels?: (ComAtprotoLabelDefs.Label)[]; +} + +const hashProfileView = "profileView"; + +export function isProfileView(v: V) { + return is$typed(v, id, hashProfileView); +} + +export function validateProfileView(v: V) { + return validate(v, id, hashProfileView); +} + +export interface ProfileViewDetailed { + $type?: "app.bsky.actor.defs#profileViewDetailed"; + did: string; + handle: string; + displayName?: string; + description?: string; + avatar?: string; + banner?: string; + followersCount?: number; + followsCount?: number; + postsCount?: number; + associated?: ProfileAssociated; + joinedViaStarterPack?: AppBskyGraphDefs.StarterPackViewBasic; + indexedAt?: string; + createdAt?: string; + viewer?: ViewerState; + labels?: (ComAtprotoLabelDefs.Label)[]; + pinnedPost?: ComAtprotoRepoStrongRef.Main; +} + +const hashProfileViewDetailed = "profileViewDetailed"; + +export function isProfileViewDetailed(v: V) { + return is$typed(v, id, hashProfileViewDetailed); +} + +export function validateProfileViewDetailed(v: V) { + return validate(v, id, hashProfileViewDetailed); +} + +export interface ProfileAssociated { + $type?: "app.bsky.actor.defs#profileAssociated"; + lists?: number; + feedgens?: number; + starterPacks?: number; + labeler?: boolean; + chat?: ProfileAssociatedChat; +} + +const hashProfileAssociated = "profileAssociated"; + +export function isProfileAssociated(v: V) { + return is$typed(v, id, hashProfileAssociated); +} + +export function validateProfileAssociated(v: V) { + return validate(v, id, hashProfileAssociated); +} + +export interface ProfileAssociatedChat { + $type?: "app.bsky.actor.defs#profileAssociatedChat"; + allowIncoming: + | "all" + | "none" + | "following" + | (string & globalThis.Record); +} + +const hashProfileAssociatedChat = "profileAssociatedChat"; + +export function isProfileAssociatedChat(v: V) { + return is$typed(v, id, hashProfileAssociatedChat); +} + +export function validateProfileAssociatedChat(v: V) { + return validate(v, id, hashProfileAssociatedChat); +} + +/** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */ +export interface ViewerState { + $type?: "app.bsky.actor.defs#viewerState"; + muted?: boolean; + mutedByList?: AppBskyGraphDefs.ListViewBasic; + blockedBy?: boolean; + blocking?: string; + blockingByList?: AppBskyGraphDefs.ListViewBasic; + following?: string; + followedBy?: string; + knownFollowers?: KnownFollowers; +} + +const hashViewerState = "viewerState"; + +export function isViewerState(v: V) { + return is$typed(v, id, hashViewerState); +} + +export function validateViewerState(v: V) { + return validate(v, id, hashViewerState); +} + +/** The subject's followers whom you also follow */ +export interface KnownFollowers { + $type?: "app.bsky.actor.defs#knownFollowers"; + count: number; + followers: (ProfileViewBasic)[]; +} + +const hashKnownFollowers = "knownFollowers"; + +export function isKnownFollowers(v: V) { + return is$typed(v, id, hashKnownFollowers); +} + +export function validateKnownFollowers(v: V) { + return validate(v, id, hashKnownFollowers); +} + +export type Preferences = ( + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string } +)[]; + +export interface AdultContentPref { + $type?: "app.bsky.actor.defs#adultContentPref"; + enabled: boolean; +} + +const hashAdultContentPref = "adultContentPref"; + +export function isAdultContentPref(v: V) { + return is$typed(v, id, hashAdultContentPref); +} + +export function validateAdultContentPref(v: V) { + return validate(v, id, hashAdultContentPref); +} + +export interface ContentLabelPref { + $type?: "app.bsky.actor.defs#contentLabelPref"; + /** Which labeler does this preference apply to? If undefined, applies globally. */ + labelerDid?: string; + label: string; + visibility: + | "ignore" + | "show" + | "warn" + | "hide" + | (string & globalThis.Record); +} + +const hashContentLabelPref = "contentLabelPref"; + +export function isContentLabelPref(v: V) { + return is$typed(v, id, hashContentLabelPref); +} + +export function validateContentLabelPref(v: V) { + return validate(v, id, hashContentLabelPref); +} + +export interface SavedFeed { + $type?: "app.bsky.actor.defs#savedFeed"; + id: string; + type: + | "feed" + | "list" + | "timeline" + | (string & globalThis.Record); + value: string; + pinned: boolean; +} + +const hashSavedFeed = "savedFeed"; + +export function isSavedFeed(v: V) { + return is$typed(v, id, hashSavedFeed); +} + +export function validateSavedFeed(v: V) { + return validate(v, id, hashSavedFeed); +} + +export interface SavedFeedsPrefV2 { + $type?: "app.bsky.actor.defs#savedFeedsPrefV2"; + items: (SavedFeed)[]; +} + +const hashSavedFeedsPrefV2 = "savedFeedsPrefV2"; + +export function isSavedFeedsPrefV2(v: V) { + return is$typed(v, id, hashSavedFeedsPrefV2); +} + +export function validateSavedFeedsPrefV2(v: V) { + return validate(v, id, hashSavedFeedsPrefV2); +} + +export interface SavedFeedsPref { + $type?: "app.bsky.actor.defs#savedFeedsPref"; + pinned: (string)[]; + saved: (string)[]; + timelineIndex?: number; +} + +const hashSavedFeedsPref = "savedFeedsPref"; + +export function isSavedFeedsPref(v: V) { + return is$typed(v, id, hashSavedFeedsPref); +} + +export function validateSavedFeedsPref(v: V) { + return validate(v, id, hashSavedFeedsPref); +} + +export interface PersonalDetailsPref { + $type?: "app.bsky.actor.defs#personalDetailsPref"; + /** The birth date of account owner. */ + birthDate?: string; +} + +const hashPersonalDetailsPref = "personalDetailsPref"; + +export function isPersonalDetailsPref(v: V) { + return is$typed(v, id, hashPersonalDetailsPref); +} + +export function validatePersonalDetailsPref(v: V) { + return validate(v, id, hashPersonalDetailsPref); +} + +export interface FeedViewPref { + $type?: "app.bsky.actor.defs#feedViewPref"; + /** The URI of the feed, or an identifier which describes the feed. */ + feed: string; + /** Hide replies in the feed. */ + hideReplies?: boolean; + /** Hide replies in the feed if they are not by followed users. */ + hideRepliesByUnfollowed: boolean; + /** Hide replies in the feed if they do not have this number of likes. */ + hideRepliesByLikeCount?: number; + /** Hide reposts in the feed. */ + hideReposts?: boolean; + /** Hide quote posts in the feed. */ + hideQuotePosts?: boolean; +} + +const hashFeedViewPref = "feedViewPref"; + +export function isFeedViewPref(v: V) { + return is$typed(v, id, hashFeedViewPref); +} + +export function validateFeedViewPref(v: V) { + return validate(v, id, hashFeedViewPref); +} + +export interface ThreadViewPref { + $type?: "app.bsky.actor.defs#threadViewPref"; + /** Sorting mode for threads. */ + sort?: + | "oldest" + | "newest" + | "most-likes" + | "random" + | "hotness" + | (string & globalThis.Record); + /** Show followed users at the top of all replies. */ + prioritizeFollowedUsers?: boolean; +} + +const hashThreadViewPref = "threadViewPref"; + +export function isThreadViewPref(v: V) { + return is$typed(v, id, hashThreadViewPref); +} + +export function validateThreadViewPref(v: V) { + return validate(v, id, hashThreadViewPref); +} + +export interface InterestsPref { + $type?: "app.bsky.actor.defs#interestsPref"; + /** A list of tags which describe the account owner's interests gathered during onboarding. */ + tags: (string)[]; +} + +const hashInterestsPref = "interestsPref"; + +export function isInterestsPref(v: V) { + return is$typed(v, id, hashInterestsPref); +} + +export function validateInterestsPref(v: V) { + return validate(v, id, hashInterestsPref); +} + +export type MutedWordTarget = + | "content" + | "tag" + | (string & globalThis.Record); + +/** A word that the account owner has muted. */ +export interface MutedWord { + $type?: "app.bsky.actor.defs#mutedWord"; + id?: string; + /** The muted word itself. */ + value: string; + /** The intended targets of the muted word. */ + targets: (MutedWordTarget)[]; + /** Groups of users to apply the muted word to. If undefined, applies to all users. */ + actorTarget: + | "all" + | "exclude-following" + | (string & globalThis.Record); + /** The date and time at which the muted word will expire and no longer be applied. */ + expiresAt?: string; +} + +const hashMutedWord = "mutedWord"; + +export function isMutedWord(v: V) { + return is$typed(v, id, hashMutedWord); +} + +export function validateMutedWord(v: V) { + return validate(v, id, hashMutedWord); +} + +export interface MutedWordsPref { + $type?: "app.bsky.actor.defs#mutedWordsPref"; + /** A list of words the account owner has muted. */ + items: (MutedWord)[]; +} + +const hashMutedWordsPref = "mutedWordsPref"; + +export function isMutedWordsPref(v: V) { + return is$typed(v, id, hashMutedWordsPref); +} + +export function validateMutedWordsPref(v: V) { + return validate(v, id, hashMutedWordsPref); +} + +export interface HiddenPostsPref { + $type?: "app.bsky.actor.defs#hiddenPostsPref"; + /** A list of URIs of posts the account owner has hidden. */ + items: (string)[]; +} + +const hashHiddenPostsPref = "hiddenPostsPref"; + +export function isHiddenPostsPref(v: V) { + return is$typed(v, id, hashHiddenPostsPref); +} + +export function validateHiddenPostsPref(v: V) { + return validate(v, id, hashHiddenPostsPref); +} + +export interface LabelersPref { + $type?: "app.bsky.actor.defs#labelersPref"; + labelers: (LabelerPrefItem)[]; +} + +const hashLabelersPref = "labelersPref"; + +export function isLabelersPref(v: V) { + return is$typed(v, id, hashLabelersPref); +} + +export function validateLabelersPref(v: V) { + return validate(v, id, hashLabelersPref); +} + +export interface LabelerPrefItem { + $type?: "app.bsky.actor.defs#labelerPrefItem"; + did: string; +} + +const hashLabelerPrefItem = "labelerPrefItem"; + +export function isLabelerPrefItem(v: V) { + return is$typed(v, id, hashLabelerPrefItem); +} + +export function validateLabelerPrefItem(v: V) { + return validate(v, id, hashLabelerPrefItem); +} + +/** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. */ +export interface BskyAppStatePref { + $type?: "app.bsky.actor.defs#bskyAppStatePref"; + activeProgressGuide?: BskyAppProgressGuide; + /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */ + queuedNudges?: (string)[]; + /** Storage for NUXs the user has encountered. */ + nuxs?: (Nux)[]; +} + +const hashBskyAppStatePref = "bskyAppStatePref"; + +export function isBskyAppStatePref(v: V) { + return is$typed(v, id, hashBskyAppStatePref); +} + +export function validateBskyAppStatePref(v: V) { + return validate(v, id, hashBskyAppStatePref); +} + +/** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. */ +export interface BskyAppProgressGuide { + $type?: "app.bsky.actor.defs#bskyAppProgressGuide"; + guide: string; +} + +const hashBskyAppProgressGuide = "bskyAppProgressGuide"; + +export function isBskyAppProgressGuide(v: V) { + return is$typed(v, id, hashBskyAppProgressGuide); +} + +export function validateBskyAppProgressGuide(v: V) { + return validate(v, id, hashBskyAppProgressGuide); +} + +/** A new user experiences (NUX) storage object */ +export interface Nux { + $type?: "app.bsky.actor.defs#nux"; + id: string; + completed: boolean; + /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */ + data?: string; + /** The date and time at which the NUX will expire and should be considered completed. */ + expiresAt?: string; +} + +const hashNux = "nux"; + +export function isNux(v: V) { + return is$typed(v, id, hashNux); +} + +export function validateNux(v: V) { + return validate(v, id, hashNux); +} + +/** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */ +export interface PostInteractionSettingsPref { + $type?: "app.bsky.actor.defs#postInteractionSettingsPref"; + /** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ + threadgateAllowRules?: ( + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string } + )[]; + /** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ + postgateEmbeddingRules?: + ($Typed | { $type: string })[]; +} + +const hashPostInteractionSettingsPref = "postInteractionSettingsPref"; + +export function isPostInteractionSettingsPref(v: V) { + return is$typed(v, id, hashPostInteractionSettingsPref); +} + +export function validatePostInteractionSettingsPref(v: V) { + return validate( + v, + id, + hashPostInteractionSettingsPref, + ); +} diff --git a/lex/types/app/bsky/actor/getPreferences.ts b/lex/types/app/bsky/actor/getPreferences.ts new file mode 100644 index 0000000..fc67df9 --- /dev/null +++ b/lex/types/app/bsky/actor/getPreferences.ts @@ -0,0 +1,26 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + preferences: AppBskyActorDefs.Preferences; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getProfile.ts b/lex/types/app/bsky/actor/getProfile.ts new file mode 100644 index 0000000..935ba0e --- /dev/null +++ b/lex/types/app/bsky/actor/getProfile.ts @@ -0,0 +1,25 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = { + /** Handle or DID of account to fetch profile of. */ + actor: string; +}; +export type InputSchema = undefined; +export type OutputSchema = AppBskyActorDefs.ProfileViewDetailed; +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getProfiles.ts b/lex/types/app/bsky/actor/getProfiles.ts new file mode 100644 index 0000000..2985daa --- /dev/null +++ b/lex/types/app/bsky/actor/getProfiles.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = { + actors: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + profiles: (AppBskyActorDefs.ProfileViewDetailed)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/getSuggestions.ts b/lex/types/app/bsky/actor/getSuggestions.ts new file mode 100644 index 0000000..cc816c4 --- /dev/null +++ b/lex/types/app/bsky/actor/getSuggestions.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + actors: (AppBskyActorDefs.ProfileView)[]; + /** Snowflake for this recommendation, use when submitting recommendation events. */ + recId?: number; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/profile.ts b/lex/types/app/bsky/actor/profile.ts new file mode 100644 index 0000000..ccb4424 --- /dev/null +++ b/lex/types/app/bsky/actor/profile.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.actor.profile"; + +export interface Record { + $type: "app.bsky.actor.profile"; + displayName?: string; + /** Free-form profile description text. */ + description?: string; + /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ + avatar?: BlobRef; + /** Larger horizontal image to display behind profile view. */ + banner?: BlobRef; + labels?: $Typed | { $type: string }; + joinedViaStarterPack?: ComAtprotoRepoStrongRef.Main; + pinnedPost?: ComAtprotoRepoStrongRef.Main; + createdAt?: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/actor/putPreferences.ts b/lex/types/app/bsky/actor/putPreferences.ts new file mode 100644 index 0000000..d4b2969 --- /dev/null +++ b/lex/types/app/bsky/actor/putPreferences.ts @@ -0,0 +1,22 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + preferences: AppBskyActorDefs.Preferences; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/actor/searchActors.ts b/lex/types/app/bsky/actor/searchActors.ts new file mode 100644 index 0000000..96731f9 --- /dev/null +++ b/lex/types/app/bsky/actor/searchActors.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = { + /** DEPRECATED: use 'q' instead. */ + term?: string; + /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ + q?: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + actors: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/actor/searchActorsTypeahead.ts b/lex/types/app/bsky/actor/searchActorsTypeahead.ts new file mode 100644 index 0000000..8352b8f --- /dev/null +++ b/lex/types/app/bsky/actor/searchActorsTypeahead.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "./defs.ts"; + +export type QueryParams = { + /** DEPRECATED: use 'q' instead. */ + term?: string; + /** Search query prefix; not a full query string. */ + q?: string; + limit: number; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + actors: (AppBskyActorDefs.ProfileViewBasic)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/embed/defs.ts b/lex/types/app/bsky/embed/defs.ts new file mode 100644 index 0000000..47abd26 --- /dev/null +++ b/lex/types/app/bsky/embed/defs.ts @@ -0,0 +1,25 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.defs"; + +/** width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit. */ +export interface AspectRatio { + $type?: "app.bsky.embed.defs#aspectRatio"; + width: number; + height: number; +} + +const hashAspectRatio = "aspectRatio"; + +export function isAspectRatio(v: V) { + return is$typed(v, id, hashAspectRatio); +} + +export function validateAspectRatio(v: V) { + return validate(v, id, hashAspectRatio); +} diff --git a/lex/types/app/bsky/embed/external.ts b/lex/types/app/bsky/embed/external.ts new file mode 100644 index 0000000..e7f4548 --- /dev/null +++ b/lex/types/app/bsky/embed/external.ts @@ -0,0 +1,76 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.external"; + +/** A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post). */ +export interface Main { + $type?: "app.bsky.embed.external"; + external: External; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +export interface External { + $type?: "app.bsky.embed.external#external"; + uri: string; + title: string; + description: string; + thumb?: BlobRef; +} + +const hashExternal = "external"; + +export function isExternal(v: V) { + return is$typed(v, id, hashExternal); +} + +export function validateExternal(v: V) { + return validate(v, id, hashExternal); +} + +export interface View { + $type?: "app.bsky.embed.external#view"; + external: ViewExternal; +} + +const hashView = "view"; + +export function isView(v: V) { + return is$typed(v, id, hashView); +} + +export function validateView(v: V) { + return validate(v, id, hashView); +} + +export interface ViewExternal { + $type?: "app.bsky.embed.external#viewExternal"; + uri: string; + title: string; + description: string; + thumb?: string; +} + +const hashViewExternal = "viewExternal"; + +export function isViewExternal(v: V) { + return is$typed(v, id, hashViewExternal); +} + +export function validateViewExternal(v: V) { + return validate(v, id, hashViewExternal); +} diff --git a/lex/types/app/bsky/embed/images.ts b/lex/types/app/bsky/embed/images.ts new file mode 100644 index 0000000..959ad2a --- /dev/null +++ b/lex/types/app/bsky/embed/images.ts @@ -0,0 +1,79 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyEmbedDefs from "./defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.images"; + +export interface Main { + $type?: "app.bsky.embed.images"; + images: (Image)[]; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +export interface Image { + $type?: "app.bsky.embed.images#image"; + image: BlobRef; + /** Alt text description of the image, for accessibility. */ + alt: string; + aspectRatio?: AppBskyEmbedDefs.AspectRatio; +} + +const hashImage = "image"; + +export function isImage(v: V) { + return is$typed(v, id, hashImage); +} + +export function validateImage(v: V) { + return validate(v, id, hashImage); +} + +export interface View { + $type?: "app.bsky.embed.images#view"; + images: (ViewImage)[]; +} + +const hashView = "view"; + +export function isView(v: V) { + return is$typed(v, id, hashView); +} + +export function validateView(v: V) { + return validate(v, id, hashView); +} + +export interface ViewImage { + $type?: "app.bsky.embed.images#viewImage"; + /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */ + thumb: string; + /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */ + fullsize: string; + /** Alt text description of the image, for accessibility. */ + alt: string; + aspectRatio?: AppBskyEmbedDefs.AspectRatio; +} + +const hashViewImage = "viewImage"; + +export function isViewImage(v: V) { + return is$typed(v, id, hashViewImage); +} + +export function validateViewImage(v: V) { + return validate(v, id, hashViewImage); +} diff --git a/lex/types/app/bsky/embed/record.ts b/lex/types/app/bsky/embed/record.ts new file mode 100644 index 0000000..2b337e8 --- /dev/null +++ b/lex/types/app/bsky/embed/record.ts @@ -0,0 +1,140 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; +import type * as AppBskyFeedDefs from "../feed/defs.ts"; +import type * as AppBskyGraphDefs from "../graph/defs.ts"; +import type * as AppBskyLabelerDefs from "../labeler/defs.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as AppBskyEmbedImages from "./images.ts"; +import type * as AppBskyEmbedVideo from "./video.ts"; +import type * as AppBskyEmbedExternal from "./external.ts"; +import type * as AppBskyEmbedRecordWithMedia from "./recordWithMedia.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.record"; + +export interface Main { + $type?: "app.bsky.embed.record"; + record: ComAtprotoRepoStrongRef.Main; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +export interface View { + $type?: "app.bsky.embed.record#view"; + record: + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string }; +} + +const hashView = "view"; + +export function isView(v: V) { + return is$typed(v, id, hashView); +} + +export function validateView(v: V) { + return validate(v, id, hashView); +} + +export interface ViewRecord { + $type?: "app.bsky.embed.record#viewRecord"; + uri: string; + cid: string; + author: AppBskyActorDefs.ProfileViewBasic; + /** The record data itself. */ + value: { [_ in string]: unknown }; + labels?: (ComAtprotoLabelDefs.Label)[]; + replyCount?: number; + repostCount?: number; + likeCount?: number; + quoteCount?: number; + embeds?: ( + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string } + )[]; + indexedAt: string; +} + +const hashViewRecord = "viewRecord"; + +export function isViewRecord(v: V) { + return is$typed(v, id, hashViewRecord); +} + +export function validateViewRecord(v: V) { + return validate(v, id, hashViewRecord); +} + +export interface ViewNotFound { + $type?: "app.bsky.embed.record#viewNotFound"; + uri: string; + notFound: true; +} + +const hashViewNotFound = "viewNotFound"; + +export function isViewNotFound(v: V) { + return is$typed(v, id, hashViewNotFound); +} + +export function validateViewNotFound(v: V) { + return validate(v, id, hashViewNotFound); +} + +export interface ViewBlocked { + $type?: "app.bsky.embed.record#viewBlocked"; + uri: string; + blocked: true; + author: AppBskyFeedDefs.BlockedAuthor; +} + +const hashViewBlocked = "viewBlocked"; + +export function isViewBlocked(v: V) { + return is$typed(v, id, hashViewBlocked); +} + +export function validateViewBlocked(v: V) { + return validate(v, id, hashViewBlocked); +} + +export interface ViewDetached { + $type?: "app.bsky.embed.record#viewDetached"; + uri: string; + detached: true; +} + +const hashViewDetached = "viewDetached"; + +export function isViewDetached(v: V) { + return is$typed(v, id, hashViewDetached); +} + +export function validateViewDetached(v: V) { + return validate(v, id, hashViewDetached); +} diff --git a/lex/types/app/bsky/embed/recordWithMedia.ts b/lex/types/app/bsky/embed/recordWithMedia.ts new file mode 100644 index 0000000..da13f10 --- /dev/null +++ b/lex/types/app/bsky/embed/recordWithMedia.ts @@ -0,0 +1,53 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyEmbedRecord from "./record.ts"; +import type * as AppBskyEmbedImages from "./images.ts"; +import type * as AppBskyEmbedVideo from "./video.ts"; +import type * as AppBskyEmbedExternal from "./external.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.recordWithMedia"; + +export interface Main { + $type?: "app.bsky.embed.recordWithMedia"; + record: AppBskyEmbedRecord.Main; + media: + | $Typed + | $Typed + | $Typed + | { $type: string }; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +export interface View { + $type?: "app.bsky.embed.recordWithMedia#view"; + record: AppBskyEmbedRecord.View; + media: + | $Typed + | $Typed + | $Typed + | { $type: string }; +} + +const hashView = "view"; + +export function isView(v: V) { + return is$typed(v, id, hashView); +} + +export function validateView(v: V) { + return validate(v, id, hashView); +} diff --git a/lex/types/app/bsky/embed/video.ts b/lex/types/app/bsky/embed/video.ts new file mode 100644 index 0000000..dd8d60c --- /dev/null +++ b/lex/types/app/bsky/embed/video.ts @@ -0,0 +1,64 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyEmbedDefs from "./defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.embed.video"; + +export interface Main { + $type?: "app.bsky.embed.video"; + video: BlobRef; + captions?: (Caption)[]; + /** Alt text description of the video, for accessibility. */ + alt?: string; + aspectRatio?: AppBskyEmbedDefs.AspectRatio; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +export interface Caption { + $type?: "app.bsky.embed.video#caption"; + lang: string; + file: BlobRef; +} + +const hashCaption = "caption"; + +export function isCaption(v: V) { + return is$typed(v, id, hashCaption); +} + +export function validateCaption(v: V) { + return validate(v, id, hashCaption); +} + +export interface View { + $type?: "app.bsky.embed.video#view"; + cid: string; + playlist: string; + thumbnail?: string; + alt?: string; + aspectRatio?: AppBskyEmbedDefs.AspectRatio; +} + +const hashView = "view"; + +export function isView(v: V) { + return is$typed(v, id, hashView); +} + +export function validateView(v: V) { + return validate(v, id, hashView); +} diff --git a/lex/types/app/bsky/feed/defs.ts b/lex/types/app/bsky/feed/defs.ts new file mode 100644 index 0000000..3a128cb --- /dev/null +++ b/lex/types/app/bsky/feed/defs.ts @@ -0,0 +1,405 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; +import type * as AppBskyEmbedImages from "../embed/images.ts"; +import type * as AppBskyEmbedVideo from "../embed/video.ts"; +import type * as AppBskyEmbedExternal from "../embed/external.ts"; +import type * as AppBskyEmbedRecord from "../embed/record.ts"; +import type * as AppBskyEmbedRecordWithMedia from "../embed/recordWithMedia.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; +import type * as AppBskyGraphDefs from "../graph/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.defs"; + +export interface PostView { + $type?: "app.bsky.feed.defs#postView"; + uri: string; + cid: string; + author: AppBskyActorDefs.ProfileViewBasic; + record: { [_ in string]: unknown }; + embed?: + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string }; + replyCount?: number; + repostCount?: number; + likeCount?: number; + quoteCount?: number; + indexedAt: string; + viewer?: ViewerState; + labels?: (ComAtprotoLabelDefs.Label)[]; + threadgate?: ThreadgateView; +} + +const hashPostView = "postView"; + +export function isPostView(v: V) { + return is$typed(v, id, hashPostView); +} + +export function validatePostView(v: V) { + return validate(v, id, hashPostView); +} + +/** Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests. */ +export interface ViewerState { + $type?: "app.bsky.feed.defs#viewerState"; + repost?: string; + like?: string; + threadMuted?: boolean; + replyDisabled?: boolean; + embeddingDisabled?: boolean; + pinned?: boolean; +} + +const hashViewerState = "viewerState"; + +export function isViewerState(v: V) { + return is$typed(v, id, hashViewerState); +} + +export function validateViewerState(v: V) { + return validate(v, id, hashViewerState); +} + +/** Metadata about this post within the context of the thread it is in. */ +export interface ThreadContext { + $type?: "app.bsky.feed.defs#threadContext"; + rootAuthorLike?: string; +} + +const hashThreadContext = "threadContext"; + +export function isThreadContext(v: V) { + return is$typed(v, id, hashThreadContext); +} + +export function validateThreadContext(v: V) { + return validate(v, id, hashThreadContext); +} + +export interface FeedViewPost { + $type?: "app.bsky.feed.defs#feedViewPost"; + post: PostView; + reply?: ReplyRef; + reason?: $Typed | $Typed | { $type: string }; + /** Context provided by feed generator that may be passed back alongside interactions. */ + feedContext?: string; +} + +const hashFeedViewPost = "feedViewPost"; + +export function isFeedViewPost(v: V) { + return is$typed(v, id, hashFeedViewPost); +} + +export function validateFeedViewPost(v: V) { + return validate(v, id, hashFeedViewPost); +} + +export interface ReplyRef { + $type?: "app.bsky.feed.defs#replyRef"; + root: $Typed | $Typed | $Typed | { + $type: string; + }; + parent: $Typed | $Typed | $Typed | { + $type: string; + }; + grandparentAuthor?: AppBskyActorDefs.ProfileViewBasic; +} + +const hashReplyRef = "replyRef"; + +export function isReplyRef(v: V) { + return is$typed(v, id, hashReplyRef); +} + +export function validateReplyRef(v: V) { + return validate(v, id, hashReplyRef); +} + +export interface ReasonRepost { + $type?: "app.bsky.feed.defs#reasonRepost"; + by: AppBskyActorDefs.ProfileViewBasic; + indexedAt: string; +} + +const hashReasonRepost = "reasonRepost"; + +export function isReasonRepost(v: V) { + return is$typed(v, id, hashReasonRepost); +} + +export function validateReasonRepost(v: V) { + return validate(v, id, hashReasonRepost); +} + +export interface ReasonPin { + $type?: "app.bsky.feed.defs#reasonPin"; +} + +const hashReasonPin = "reasonPin"; + +export function isReasonPin(v: V) { + return is$typed(v, id, hashReasonPin); +} + +export function validateReasonPin(v: V) { + return validate(v, id, hashReasonPin); +} + +export interface ThreadViewPost { + $type?: "app.bsky.feed.defs#threadViewPost"; + post: PostView; + parent?: + | $Typed + | $Typed + | $Typed + | { $type: string }; + replies?: + ($Typed | $Typed | $Typed | { + $type: string; + })[]; + threadContext?: ThreadContext; +} + +const hashThreadViewPost = "threadViewPost"; + +export function isThreadViewPost(v: V) { + return is$typed(v, id, hashThreadViewPost); +} + +export function validateThreadViewPost(v: V) { + return validate(v, id, hashThreadViewPost); +} + +export interface NotFoundPost { + $type?: "app.bsky.feed.defs#notFoundPost"; + uri: string; + notFound: true; +} + +const hashNotFoundPost = "notFoundPost"; + +export function isNotFoundPost(v: V) { + return is$typed(v, id, hashNotFoundPost); +} + +export function validateNotFoundPost(v: V) { + return validate(v, id, hashNotFoundPost); +} + +export interface BlockedPost { + $type?: "app.bsky.feed.defs#blockedPost"; + uri: string; + blocked: true; + author: BlockedAuthor; +} + +const hashBlockedPost = "blockedPost"; + +export function isBlockedPost(v: V) { + return is$typed(v, id, hashBlockedPost); +} + +export function validateBlockedPost(v: V) { + return validate(v, id, hashBlockedPost); +} + +export interface BlockedAuthor { + $type?: "app.bsky.feed.defs#blockedAuthor"; + did: string; + viewer?: AppBskyActorDefs.ViewerState; +} + +const hashBlockedAuthor = "blockedAuthor"; + +export function isBlockedAuthor(v: V) { + return is$typed(v, id, hashBlockedAuthor); +} + +export function validateBlockedAuthor(v: V) { + return validate(v, id, hashBlockedAuthor); +} + +export interface GeneratorView { + $type?: "app.bsky.feed.defs#generatorView"; + uri: string; + cid: string; + did: string; + creator: AppBskyActorDefs.ProfileView; + displayName: string; + description?: string; + descriptionFacets?: (AppBskyRichtextFacet.Main)[]; + avatar?: string; + likeCount?: number; + acceptsInteractions?: boolean; + labels?: (ComAtprotoLabelDefs.Label)[]; + viewer?: GeneratorViewerState; + contentMode?: + | "app.bsky.feed.defs#contentModeUnspecified" + | "app.bsky.feed.defs#contentModeVideo" + | (string & globalThis.Record); + indexedAt: string; +} + +const hashGeneratorView = "generatorView"; + +export function isGeneratorView(v: V) { + return is$typed(v, id, hashGeneratorView); +} + +export function validateGeneratorView(v: V) { + return validate(v, id, hashGeneratorView); +} + +export interface GeneratorViewerState { + $type?: "app.bsky.feed.defs#generatorViewerState"; + like?: string; +} + +const hashGeneratorViewerState = "generatorViewerState"; + +export function isGeneratorViewerState(v: V) { + return is$typed(v, id, hashGeneratorViewerState); +} + +export function validateGeneratorViewerState(v: V) { + return validate(v, id, hashGeneratorViewerState); +} + +export interface SkeletonFeedPost { + $type?: "app.bsky.feed.defs#skeletonFeedPost"; + post: string; + reason?: $Typed | $Typed | { + $type: string; + }; + /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ + feedContext?: string; +} + +const hashSkeletonFeedPost = "skeletonFeedPost"; + +export function isSkeletonFeedPost(v: V) { + return is$typed(v, id, hashSkeletonFeedPost); +} + +export function validateSkeletonFeedPost(v: V) { + return validate(v, id, hashSkeletonFeedPost); +} + +export interface SkeletonReasonRepost { + $type?: "app.bsky.feed.defs#skeletonReasonRepost"; + repost: string; +} + +const hashSkeletonReasonRepost = "skeletonReasonRepost"; + +export function isSkeletonReasonRepost(v: V) { + return is$typed(v, id, hashSkeletonReasonRepost); +} + +export function validateSkeletonReasonRepost(v: V) { + return validate(v, id, hashSkeletonReasonRepost); +} + +export interface SkeletonReasonPin { + $type?: "app.bsky.feed.defs#skeletonReasonPin"; +} + +const hashSkeletonReasonPin = "skeletonReasonPin"; + +export function isSkeletonReasonPin(v: V) { + return is$typed(v, id, hashSkeletonReasonPin); +} + +export function validateSkeletonReasonPin(v: V) { + return validate(v, id, hashSkeletonReasonPin); +} + +export interface ThreadgateView { + $type?: "app.bsky.feed.defs#threadgateView"; + uri?: string; + cid?: string; + record?: { [_ in string]: unknown }; + lists?: (AppBskyGraphDefs.ListViewBasic)[]; +} + +const hashThreadgateView = "threadgateView"; + +export function isThreadgateView(v: V) { + return is$typed(v, id, hashThreadgateView); +} + +export function validateThreadgateView(v: V) { + return validate(v, id, hashThreadgateView); +} + +export interface Interaction { + $type?: "app.bsky.feed.defs#interaction"; + item?: string; + event?: + | "app.bsky.feed.defs#requestLess" + | "app.bsky.feed.defs#requestMore" + | "app.bsky.feed.defs#clickthroughItem" + | "app.bsky.feed.defs#clickthroughAuthor" + | "app.bsky.feed.defs#clickthroughReposter" + | "app.bsky.feed.defs#clickthroughEmbed" + | "app.bsky.feed.defs#interactionSeen" + | "app.bsky.feed.defs#interactionLike" + | "app.bsky.feed.defs#interactionRepost" + | "app.bsky.feed.defs#interactionReply" + | "app.bsky.feed.defs#interactionQuote" + | "app.bsky.feed.defs#interactionShare" + | (string & globalThis.Record); + /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ + feedContext?: string; +} + +const hashInteraction = "interaction"; + +export function isInteraction(v: V) { + return is$typed(v, id, hashInteraction); +} + +export function validateInteraction(v: V) { + return validate(v, id, hashInteraction); +} + +/** Request that less content like the given feed item be shown in the feed */ +export const REQUESTLESS = `${id}#requestLess`; +/** Request that more content like the given feed item be shown in the feed */ +export const REQUESTMORE = `${id}#requestMore`; +/** User clicked through to the feed item */ +export const CLICKTHROUGHITEM = `${id}#clickthroughItem`; +/** User clicked through to the author of the feed item */ +export const CLICKTHROUGHAUTHOR = `${id}#clickthroughAuthor`; +/** User clicked through to the reposter of the feed item */ +export const CLICKTHROUGHREPOSTER = `${id}#clickthroughReposter`; +/** User clicked through to the embedded content of the feed item */ +export const CLICKTHROUGHEMBED = `${id}#clickthroughEmbed`; +/** Declares the feed generator returns any types of posts. */ +export const CONTENTMODEUNSPECIFIED = `${id}#contentModeUnspecified`; +/** Declares the feed generator returns posts containing app.bsky.embed.video embeds. */ +export const CONTENTMODEVIDEO = `${id}#contentModeVideo`; +/** Feed item was seen by user */ +export const INTERACTIONSEEN = `${id}#interactionSeen`; +/** User liked the feed item */ +export const INTERACTIONLIKE = `${id}#interactionLike`; +/** User reposted the feed item */ +export const INTERACTIONREPOST = `${id}#interactionRepost`; +/** User replied to the feed item */ +export const INTERACTIONREPLY = `${id}#interactionReply`; +/** User quoted the feed item */ +export const INTERACTIONQUOTE = `${id}#interactionQuote`; +/** User shared the feed item */ +export const INTERACTIONSHARE = `${id}#interactionShare`; diff --git a/lex/types/app/bsky/feed/describeFeedGenerator.ts b/lex/types/app/bsky/feed/describeFeedGenerator.ts new file mode 100644 index 0000000..8e0b6bd --- /dev/null +++ b/lex/types/app/bsky/feed/describeFeedGenerator.ts @@ -0,0 +1,63 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.describeFeedGenerator"; + +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + did: string; + feeds: (Feed)[]; + links?: Links; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface Feed { + $type?: "app.bsky.feed.describeFeedGenerator#feed"; + uri: string; +} + +const hashFeed = "feed"; + +export function isFeed(v: V) { + return is$typed(v, id, hashFeed); +} + +export function validateFeed(v: V) { + return validate(v, id, hashFeed); +} + +export interface Links { + $type?: "app.bsky.feed.describeFeedGenerator#links"; + privacyPolicy?: string; + termsOfService?: string; +} + +const hashLinks = "links"; + +export function isLinks(v: V) { + return is$typed(v, id, hashLinks); +} + +export function validateLinks(v: V) { + return validate(v, id, hashLinks); +} diff --git a/lex/types/app/bsky/feed/generator.ts b/lex/types/app/bsky/feed/generator.ts new file mode 100644 index 0000000..4e988fa --- /dev/null +++ b/lex/types/app/bsky/feed/generator.ts @@ -0,0 +1,40 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.generator"; + +export interface Record { + $type: "app.bsky.feed.generator"; + did: string; + displayName: string; + description?: string; + descriptionFacets?: (AppBskyRichtextFacet.Main)[]; + avatar?: BlobRef; + /** Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions */ + acceptsInteractions?: boolean; + labels?: $Typed | { $type: string }; + contentMode?: + | "app.bsky.feed.defs#contentModeUnspecified" + | "app.bsky.feed.defs#contentModeVideo" + | (string & globalThis.Record); + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/feed/getActorFeeds.ts b/lex/types/app/bsky/feed/getActorFeeds.ts new file mode 100644 index 0000000..c5c0f25 --- /dev/null +++ b/lex/types/app/bsky/feed/getActorFeeds.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feeds: (AppBskyFeedDefs.GeneratorView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getActorLikes.ts b/lex/types/app/bsky/feed/getActorLikes.ts new file mode 100644 index 0000000..6b94471 --- /dev/null +++ b/lex/types/app/bsky/feed/getActorLikes.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.FeedViewPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BlockedActor" | "BlockedByActor"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getAuthorFeed.ts b/lex/types/app/bsky/feed/getAuthorFeed.ts new file mode 100644 index 0000000..dcf6766 --- /dev/null +++ b/lex/types/app/bsky/feed/getAuthorFeed.ts @@ -0,0 +1,41 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; + /** Combinations of post/repost types to include in response. */ + filter: + | "posts_with_replies" + | "posts_no_replies" + | "posts_with_media" + | "posts_and_author_threads" + | "posts_with_video" + | (string & globalThis.Record); + includePins: boolean; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.FeedViewPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BlockedActor" | "BlockedByActor"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeed.ts b/lex/types/app/bsky/feed/getFeed.ts new file mode 100644 index 0000000..cb01604 --- /dev/null +++ b/lex/types/app/bsky/feed/getFeed.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + feed: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.FeedViewPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "UnknownFeed"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedGenerator.ts b/lex/types/app/bsky/feed/getFeedGenerator.ts new file mode 100644 index 0000000..a30881d --- /dev/null +++ b/lex/types/app/bsky/feed/getFeedGenerator.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** AT-URI of the feed generator record. */ + feed: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + view: AppBskyFeedDefs.GeneratorView; + /** Indicates whether the feed generator service has been online recently, or else seems to be inactive. */ + isOnline: boolean; + /** Indicates whether the feed generator service is compatible with the record declaration. */ + isValid: boolean; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedGenerators.ts b/lex/types/app/bsky/feed/getFeedGenerators.ts new file mode 100644 index 0000000..cdd32ff --- /dev/null +++ b/lex/types/app/bsky/feed/getFeedGenerators.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + feeds: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + feeds: (AppBskyFeedDefs.GeneratorView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getFeedSkeleton.ts b/lex/types/app/bsky/feed/getFeedSkeleton.ts new file mode 100644 index 0000000..0b68e1a --- /dev/null +++ b/lex/types/app/bsky/feed/getFeedSkeleton.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference to feed generator record describing the specific feed being requested. */ + feed: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.SkeletonFeedPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "UnknownFeed"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getLikes.ts b/lex/types/app/bsky/feed/getLikes.ts new file mode 100644 index 0000000..5f07f59 --- /dev/null +++ b/lex/types/app/bsky/feed/getLikes.ts @@ -0,0 +1,58 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.getLikes"; + +export type QueryParams = { + /** AT-URI of the subject (eg, a post record). */ + uri: string; + /** CID of the subject record (aka, specific version of record), to filter likes. */ + cid?: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + uri: string; + cid?: string; + cursor?: string; + likes: (Like)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface Like { + $type?: "app.bsky.feed.getLikes#like"; + indexedAt: string; + createdAt: string; + actor: AppBskyActorDefs.ProfileView; +} + +const hashLike = "like"; + +export function isLike(v: V) { + return is$typed(v, id, hashLike); +} + +export function validateLike(v: V) { + return validate(v, id, hashLike); +} diff --git a/lex/types/app/bsky/feed/getListFeed.ts b/lex/types/app/bsky/feed/getListFeed.ts new file mode 100644 index 0000000..f312f2e --- /dev/null +++ b/lex/types/app/bsky/feed/getListFeed.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) to the list record. */ + list: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.FeedViewPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "UnknownList"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getPostThread.ts b/lex/types/app/bsky/feed/getPostThread.ts new file mode 100644 index 0000000..9e4763c --- /dev/null +++ b/lex/types/app/bsky/feed/getPostThread.ts @@ -0,0 +1,40 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) to post record. */ + uri: string; + /** How many levels of reply depth should be included in response. */ + depth: number; + /** How many levels of parent (and grandparent, etc) post to include. */ + parentHeight: number; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + thread: + | $Typed + | $Typed + | $Typed + | { $type: string }; + threadgate?: AppBskyFeedDefs.ThreadgateView; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "NotFound"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getPosts.ts b/lex/types/app/bsky/feed/getPosts.ts new file mode 100644 index 0000000..4ef3ff7 --- /dev/null +++ b/lex/types/app/bsky/feed/getPosts.ts @@ -0,0 +1,29 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** List of post AT-URIs to return hydrated views for. */ + uris: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + posts: (AppBskyFeedDefs.PostView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getQuotes.ts b/lex/types/app/bsky/feed/getQuotes.ts new file mode 100644 index 0000000..f1e801e --- /dev/null +++ b/lex/types/app/bsky/feed/getQuotes.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) of post record */ + uri: string; + /** If supplied, filters to quotes of specific version (by CID) of the post record. */ + cid?: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + uri: string; + cid?: string; + cursor?: string; + posts: (AppBskyFeedDefs.PostView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getRepostedBy.ts b/lex/types/app/bsky/feed/getRepostedBy.ts new file mode 100644 index 0000000..9522645 --- /dev/null +++ b/lex/types/app/bsky/feed/getRepostedBy.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) of post record */ + uri: string; + /** If supplied, filters to reposts of specific version (by CID) of the post record. */ + cid?: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + uri: string; + cid?: string; + cursor?: string; + repostedBy: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getSuggestedFeeds.ts b/lex/types/app/bsky/feed/getSuggestedFeeds.ts new file mode 100644 index 0000000..da4b67b --- /dev/null +++ b/lex/types/app/bsky/feed/getSuggestedFeeds.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feeds: (AppBskyFeedDefs.GeneratorView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/getTimeline.ts b/lex/types/app/bsky/feed/getTimeline.ts new file mode 100644 index 0000000..5f62fcb --- /dev/null +++ b/lex/types/app/bsky/feed/getTimeline.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism. */ + algorithm?: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feed: (AppBskyFeedDefs.FeedViewPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/like.ts b/lex/types/app/bsky/feed/like.ts new file mode 100644 index 0000000..cb655b2 --- /dev/null +++ b/lex/types/app/bsky/feed/like.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.like"; + +export interface Record { + $type: "app.bsky.feed.like"; + subject: ComAtprotoRepoStrongRef.Main; + createdAt: string; + via?: ComAtprotoRepoStrongRef.Main; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/feed/post.ts b/lex/types/app/bsky/feed/post.ts new file mode 100644 index 0000000..1db8977 --- /dev/null +++ b/lex/types/app/bsky/feed/post.ts @@ -0,0 +1,105 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; +import type * as AppBskyEmbedImages from "../embed/images.ts"; +import type * as AppBskyEmbedVideo from "../embed/video.ts"; +import type * as AppBskyEmbedExternal from "../embed/external.ts"; +import type * as AppBskyEmbedRecord from "../embed/record.ts"; +import type * as AppBskyEmbedRecordWithMedia from "../embed/recordWithMedia.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.post"; + +export interface Record { + $type: "app.bsky.feed.post"; + /** The primary post content. May be an empty string, if there are embeds. */ + text: string; + /** DEPRECATED: replaced by app.bsky.richtext.facet. */ + entities?: (Entity)[]; + /** Annotations of text (mentions, URLs, hashtags, etc) */ + facets?: (AppBskyRichtextFacet.Main)[]; + reply?: ReplyRef; + embed?: + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string }; + /** Indicates human language of post primary text content. */ + langs?: (string)[]; + labels?: $Typed | { $type: string }; + /** Additional hashtags, in addition to any included in post text and facets. */ + tags?: (string)[]; + /** Client-declared timestamp when this post was originally created. */ + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} + +export interface ReplyRef { + $type?: "app.bsky.feed.post#replyRef"; + root: ComAtprotoRepoStrongRef.Main; + parent: ComAtprotoRepoStrongRef.Main; +} + +const hashReplyRef = "replyRef"; + +export function isReplyRef(v: V) { + return is$typed(v, id, hashReplyRef); +} + +export function validateReplyRef(v: V) { + return validate(v, id, hashReplyRef); +} + +/** Deprecated: use facets instead. */ +export interface Entity { + $type?: "app.bsky.feed.post#entity"; + index: TextSlice; + /** Expected values are 'mention' and 'link'. */ + type: string; + value: string; +} + +const hashEntity = "entity"; + +export function isEntity(v: V) { + return is$typed(v, id, hashEntity); +} + +export function validateEntity(v: V) { + return validate(v, id, hashEntity); +} + +/** Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings. */ +export interface TextSlice { + $type?: "app.bsky.feed.post#textSlice"; + start: number; + end: number; +} + +const hashTextSlice = "textSlice"; + +export function isTextSlice(v: V) { + return is$typed(v, id, hashTextSlice); +} + +export function validateTextSlice(v: V) { + return validate(v, id, hashTextSlice); +} diff --git a/lex/types/app/bsky/feed/postgate.ts b/lex/types/app/bsky/feed/postgate.ts new file mode 100644 index 0000000..6dc59a8 --- /dev/null +++ b/lex/types/app/bsky/feed/postgate.ts @@ -0,0 +1,46 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.postgate"; + +export interface Record { + $type: "app.bsky.feed.postgate"; + createdAt: string; + /** Reference (AT-URI) to the post record. */ + post: string; + /** List of AT-URIs embedding this post that the author has detached from. */ + detachedEmbeddingUris?: (string)[]; + /** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ + embeddingRules?: ($Typed | { $type: string })[]; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} + +/** Disables embedding of this post. */ +export interface DisableRule { + $type?: "app.bsky.feed.postgate#disableRule"; +} + +const hashDisableRule = "disableRule"; + +export function isDisableRule(v: V) { + return is$typed(v, id, hashDisableRule); +} + +export function validateDisableRule(v: V) { + return validate(v, id, hashDisableRule); +} diff --git a/lex/types/app/bsky/feed/repost.ts b/lex/types/app/bsky/feed/repost.ts new file mode 100644 index 0000000..8196fed --- /dev/null +++ b/lex/types/app/bsky/feed/repost.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.repost"; + +export interface Record { + $type: "app.bsky.feed.repost"; + subject: ComAtprotoRepoStrongRef.Main; + createdAt: string; + via?: ComAtprotoRepoStrongRef.Main; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/feed/searchPosts.ts b/lex/types/app/bsky/feed/searchPosts.ts new file mode 100644 index 0000000..c09f87f --- /dev/null +++ b/lex/types/app/bsky/feed/searchPosts.ts @@ -0,0 +1,54 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = { + /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ + q: string; + /** Specifies the ranking order of results. */ + sort: "top" | "latest" | (string & globalThis.Record); + /** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */ + since?: string; + /** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */ + until?: string; + /** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */ + mentions?: string; + /** Filter to posts by the given account. Handles are resolved to DID before query-time. */ + author?: string; + /** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */ + lang?: string; + /** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */ + domain?: string; + /** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */ + url?: string; + /** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */ + tag?: string[]; + limit: number; + /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ + hitsTotal?: number; + posts: (AppBskyFeedDefs.PostView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BadQueryString"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/sendInteractions.ts b/lex/types/app/bsky/feed/sendInteractions.ts new file mode 100644 index 0000000..01ca419 --- /dev/null +++ b/lex/types/app/bsky/feed/sendInteractions.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + interactions: (AppBskyFeedDefs.Interaction)[]; +} + +export type OutputSchema = globalThis.Record; + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/feed/threadgate.ts b/lex/types/app/bsky/feed/threadgate.ts new file mode 100644 index 0000000..65f5967 --- /dev/null +++ b/lex/types/app/bsky/feed/threadgate.ts @@ -0,0 +1,98 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.feed.threadgate"; + +export interface Record { + $type: "app.bsky.feed.threadgate"; + /** Reference (AT-URI) to the post record. */ + post: string; + /** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ + allow?: ( + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string } + )[]; + createdAt: string; + /** List of hidden reply URIs. */ + hiddenReplies?: (string)[]; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} + +/** Allow replies from actors mentioned in your post. */ +export interface MentionRule { + $type?: "app.bsky.feed.threadgate#mentionRule"; +} + +const hashMentionRule = "mentionRule"; + +export function isMentionRule(v: V) { + return is$typed(v, id, hashMentionRule); +} + +export function validateMentionRule(v: V) { + return validate(v, id, hashMentionRule); +} + +/** Allow replies from actors who follow you. */ +export interface FollowerRule { + $type?: "app.bsky.feed.threadgate#followerRule"; +} + +const hashFollowerRule = "followerRule"; + +export function isFollowerRule(v: V) { + return is$typed(v, id, hashFollowerRule); +} + +export function validateFollowerRule(v: V) { + return validate(v, id, hashFollowerRule); +} + +/** Allow replies from actors you follow. */ +export interface FollowingRule { + $type?: "app.bsky.feed.threadgate#followingRule"; +} + +const hashFollowingRule = "followingRule"; + +export function isFollowingRule(v: V) { + return is$typed(v, id, hashFollowingRule); +} + +export function validateFollowingRule(v: V) { + return validate(v, id, hashFollowingRule); +} + +/** Allow replies from actors on a list. */ +export interface ListRule { + $type?: "app.bsky.feed.threadgate#listRule"; + list: string; +} + +const hashListRule = "listRule"; + +export function isListRule(v: V) { + return is$typed(v, id, hashListRule); +} + +export function validateListRule(v: V) { + return validate(v, id, hashListRule); +} diff --git a/lex/types/app/bsky/graph/block.ts b/lex/types/app/bsky/graph/block.ts new file mode 100644 index 0000000..c71b026 --- /dev/null +++ b/lex/types/app/bsky/graph/block.ts @@ -0,0 +1,26 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.block"; + +export interface Record { + $type: "app.bsky.graph.block"; + /** DID of the account to be blocked. */ + subject: string; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/graph/defs.ts b/lex/types/app/bsky/graph/defs.ts new file mode 100644 index 0000000..d169451 --- /dev/null +++ b/lex/types/app/bsky/graph/defs.ts @@ -0,0 +1,191 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; +import type * as AppBskyFeedDefs from "../feed/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.defs"; + +export interface ListViewBasic { + $type?: "app.bsky.graph.defs#listViewBasic"; + uri: string; + cid: string; + name: string; + purpose: ListPurpose; + avatar?: string; + listItemCount?: number; + labels?: (ComAtprotoLabelDefs.Label)[]; + viewer?: ListViewerState; + indexedAt?: string; +} + +const hashListViewBasic = "listViewBasic"; + +export function isListViewBasic(v: V) { + return is$typed(v, id, hashListViewBasic); +} + +export function validateListViewBasic(v: V) { + return validate(v, id, hashListViewBasic); +} + +export interface ListView { + $type?: "app.bsky.graph.defs#listView"; + uri: string; + cid: string; + creator: AppBskyActorDefs.ProfileView; + name: string; + purpose: ListPurpose; + description?: string; + descriptionFacets?: (AppBskyRichtextFacet.Main)[]; + avatar?: string; + listItemCount?: number; + labels?: (ComAtprotoLabelDefs.Label)[]; + viewer?: ListViewerState; + indexedAt: string; +} + +const hashListView = "listView"; + +export function isListView(v: V) { + return is$typed(v, id, hashListView); +} + +export function validateListView(v: V) { + return validate(v, id, hashListView); +} + +export interface ListItemView { + $type?: "app.bsky.graph.defs#listItemView"; + uri: string; + subject: AppBskyActorDefs.ProfileView; +} + +const hashListItemView = "listItemView"; + +export function isListItemView(v: V) { + return is$typed(v, id, hashListItemView); +} + +export function validateListItemView(v: V) { + return validate(v, id, hashListItemView); +} + +export interface StarterPackView { + $type?: "app.bsky.graph.defs#starterPackView"; + uri: string; + cid: string; + record: { [_ in string]: unknown }; + creator: AppBskyActorDefs.ProfileViewBasic; + list?: ListViewBasic; + listItemsSample?: (ListItemView)[]; + feeds?: (AppBskyFeedDefs.GeneratorView)[]; + joinedWeekCount?: number; + joinedAllTimeCount?: number; + labels?: (ComAtprotoLabelDefs.Label)[]; + indexedAt: string; +} + +const hashStarterPackView = "starterPackView"; + +export function isStarterPackView(v: V) { + return is$typed(v, id, hashStarterPackView); +} + +export function validateStarterPackView(v: V) { + return validate(v, id, hashStarterPackView); +} + +export interface StarterPackViewBasic { + $type?: "app.bsky.graph.defs#starterPackViewBasic"; + uri: string; + cid: string; + record: { [_ in string]: unknown }; + creator: AppBskyActorDefs.ProfileViewBasic; + listItemCount?: number; + joinedWeekCount?: number; + joinedAllTimeCount?: number; + labels?: (ComAtprotoLabelDefs.Label)[]; + indexedAt: string; +} + +const hashStarterPackViewBasic = "starterPackViewBasic"; + +export function isStarterPackViewBasic(v: V) { + return is$typed(v, id, hashStarterPackViewBasic); +} + +export function validateStarterPackViewBasic(v: V) { + return validate(v, id, hashStarterPackViewBasic); +} + +export type ListPurpose = + | "app.bsky.graph.defs#modlist" + | "app.bsky.graph.defs#curatelist" + | "app.bsky.graph.defs#referencelist" + | (string & globalThis.Record); + +/** A list of actors to apply an aggregate moderation action (mute/block) on. */ +export const MODLIST = `${id}#modlist`; +/** A list of actors used for curation purposes such as list feeds or interaction gating. */ +export const CURATELIST = `${id}#curatelist`; +/** A list of actors used for only for reference purposes such as within a starter pack. */ +export const REFERENCELIST = `${id}#referencelist`; + +export interface ListViewerState { + $type?: "app.bsky.graph.defs#listViewerState"; + muted?: boolean; + blocked?: string; +} + +const hashListViewerState = "listViewerState"; + +export function isListViewerState(v: V) { + return is$typed(v, id, hashListViewerState); +} + +export function validateListViewerState(v: V) { + return validate(v, id, hashListViewerState); +} + +/** indicates that a handle or DID could not be resolved */ +export interface NotFoundActor { + $type?: "app.bsky.graph.defs#notFoundActor"; + actor: string; + notFound: true; +} + +const hashNotFoundActor = "notFoundActor"; + +export function isNotFoundActor(v: V) { + return is$typed(v, id, hashNotFoundActor); +} + +export function validateNotFoundActor(v: V) { + return validate(v, id, hashNotFoundActor); +} + +/** lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) */ +export interface Relationship { + $type?: "app.bsky.graph.defs#relationship"; + did: string; + /** if the actor follows this DID, this is the AT-URI of the follow record */ + following?: string; + /** if the actor is followed by this DID, contains the AT-URI of the follow record */ + followedBy?: string; +} + +const hashRelationship = "relationship"; + +export function isRelationship(v: V) { + return is$typed(v, id, hashRelationship); +} + +export function validateRelationship(v: V) { + return validate(v, id, hashRelationship); +} diff --git a/lex/types/app/bsky/graph/follow.ts b/lex/types/app/bsky/graph/follow.ts new file mode 100644 index 0000000..3c13495 --- /dev/null +++ b/lex/types/app/bsky/graph/follow.ts @@ -0,0 +1,25 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.follow"; + +export interface Record { + $type: "app.bsky.graph.follow"; + subject: string; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/graph/getActorStarterPacks.ts b/lex/types/app/bsky/graph/getActorStarterPacks.ts new file mode 100644 index 0000000..08fb016 --- /dev/null +++ b/lex/types/app/bsky/graph/getActorStarterPacks.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getBlocks.ts b/lex/types/app/bsky/graph/getBlocks.ts new file mode 100644 index 0000000..142ae96 --- /dev/null +++ b/lex/types/app/bsky/graph/getBlocks.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + blocks: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getFollowers.ts b/lex/types/app/bsky/graph/getFollowers.ts new file mode 100644 index 0000000..df23e0c --- /dev/null +++ b/lex/types/app/bsky/graph/getFollowers.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + subject: AppBskyActorDefs.ProfileView; + cursor?: string; + followers: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getFollows.ts b/lex/types/app/bsky/graph/getFollows.ts new file mode 100644 index 0000000..e2ff349 --- /dev/null +++ b/lex/types/app/bsky/graph/getFollows.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + subject: AppBskyActorDefs.ProfileView; + cursor?: string; + follows: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getKnownFollowers.ts b/lex/types/app/bsky/graph/getKnownFollowers.ts new file mode 100644 index 0000000..df23e0c --- /dev/null +++ b/lex/types/app/bsky/graph/getKnownFollowers.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + subject: AppBskyActorDefs.ProfileView; + cursor?: string; + followers: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getList.ts b/lex/types/app/bsky/graph/getList.ts new file mode 100644 index 0000000..71607fb --- /dev/null +++ b/lex/types/app/bsky/graph/getList.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) of the list record to hydrate. */ + list: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + list: AppBskyGraphDefs.ListView; + items: (AppBskyGraphDefs.ListItemView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getListBlocks.ts b/lex/types/app/bsky/graph/getListBlocks.ts new file mode 100644 index 0000000..b71a1d0 --- /dev/null +++ b/lex/types/app/bsky/graph/getListBlocks.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + lists: (AppBskyGraphDefs.ListView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getListMutes.ts b/lex/types/app/bsky/graph/getListMutes.ts new file mode 100644 index 0000000..b71a1d0 --- /dev/null +++ b/lex/types/app/bsky/graph/getListMutes.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + lists: (AppBskyGraphDefs.ListView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getLists.ts b/lex/types/app/bsky/graph/getLists.ts new file mode 100644 index 0000000..ed4ea24 --- /dev/null +++ b/lex/types/app/bsky/graph/getLists.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + /** The account (actor) to enumerate lists from. */ + actor: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + lists: (AppBskyGraphDefs.ListView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getMutes.ts b/lex/types/app/bsky/graph/getMutes.ts new file mode 100644 index 0000000..e1beb1b --- /dev/null +++ b/lex/types/app/bsky/graph/getMutes.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + mutes: (AppBskyActorDefs.ProfileView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getRelationships.ts b/lex/types/app/bsky/graph/getRelationships.ts new file mode 100644 index 0000000..ddc472f --- /dev/null +++ b/lex/types/app/bsky/graph/getRelationships.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + /** Primary account requesting relationships for. */ + actor: string; + /** List of 'other' accounts to be related back to the primary. */ + others?: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + actor?: string; + relationships: ( + | $Typed + | $Typed + | { $type: string } + )[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "ActorNotFound"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getStarterPack.ts b/lex/types/app/bsky/graph/getStarterPack.ts new file mode 100644 index 0000000..f0f7e96 --- /dev/null +++ b/lex/types/app/bsky/graph/getStarterPack.ts @@ -0,0 +1,29 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + /** Reference (AT-URI) of the starter pack record. */ + starterPack: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + starterPack: AppBskyGraphDefs.StarterPackView; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getStarterPacks.ts b/lex/types/app/bsky/graph/getStarterPacks.ts new file mode 100644 index 0000000..6e735b6 --- /dev/null +++ b/lex/types/app/bsky/graph/getStarterPacks.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + uris: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts new file mode 100644 index 0000000..5591e8e --- /dev/null +++ b/lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyActorDefs from "../actor/defs.ts"; + +export type QueryParams = { + actor: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + suggestions: (AppBskyActorDefs.ProfileView)[]; + /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ + isFallback?: boolean; + /** Snowflake for this recommendation, use when submitting recommendation events. */ + recId?: number; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/list.ts b/lex/types/app/bsky/graph/list.ts new file mode 100644 index 0000000..2006076 --- /dev/null +++ b/lex/types/app/bsky/graph/list.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyGraphDefs from "./defs.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.list"; + +export interface Record { + $type: "app.bsky.graph.list"; + purpose: AppBskyGraphDefs.ListPurpose; + /** Display name for list; can not be empty. */ + name: string; + description?: string; + descriptionFacets?: (AppBskyRichtextFacet.Main)[]; + avatar?: BlobRef; + labels?: $Typed | { $type: string }; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/graph/listblock.ts b/lex/types/app/bsky/graph/listblock.ts new file mode 100644 index 0000000..9ca1333 --- /dev/null +++ b/lex/types/app/bsky/graph/listblock.ts @@ -0,0 +1,26 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.listblock"; + +export interface Record { + $type: "app.bsky.graph.listblock"; + /** Reference (AT-URI) to the mod list record. */ + subject: string; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/graph/listitem.ts b/lex/types/app/bsky/graph/listitem.ts new file mode 100644 index 0000000..4309ab7 --- /dev/null +++ b/lex/types/app/bsky/graph/listitem.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.listitem"; + +export interface Record { + $type: "app.bsky.graph.listitem"; + /** The account which is included on the list. */ + subject: string; + /** Reference (AT-URI) to the list record (app.bsky.graph.list). */ + list: string; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/graph/muteActor.ts b/lex/types/app/bsky/graph/muteActor.ts new file mode 100644 index 0000000..e185363 --- /dev/null +++ b/lex/types/app/bsky/graph/muteActor.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + actor: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/muteActorList.ts b/lex/types/app/bsky/graph/muteActorList.ts new file mode 100644 index 0000000..e5a2f15 --- /dev/null +++ b/lex/types/app/bsky/graph/muteActorList.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + list: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/muteThread.ts b/lex/types/app/bsky/graph/muteThread.ts new file mode 100644 index 0000000..b99c31e --- /dev/null +++ b/lex/types/app/bsky/graph/muteThread.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + root: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/searchStarterPacks.ts b/lex/types/app/bsky/graph/searchStarterPacks.ts new file mode 100644 index 0000000..2d26942 --- /dev/null +++ b/lex/types/app/bsky/graph/searchStarterPacks.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyGraphDefs from "./defs.ts"; + +export type QueryParams = { + /** Search query string. Syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ + q: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + starterPacks: (AppBskyGraphDefs.StarterPackViewBasic)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/graph/starterpack.ts b/lex/types/app/bsky/graph/starterpack.ts new file mode 100644 index 0000000..0848037 --- /dev/null +++ b/lex/types/app/bsky/graph/starterpack.ts @@ -0,0 +1,47 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.graph.starterpack"; + +export interface Record { + $type: "app.bsky.graph.starterpack"; + /** Display name for starter pack; can not be empty. */ + name: string; + description?: string; + descriptionFacets?: (AppBskyRichtextFacet.Main)[]; + /** Reference (AT-URI) to the list record. */ + list: string; + feeds?: (FeedItem)[]; + createdAt: string; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} + +export interface FeedItem { + $type?: "app.bsky.graph.starterpack#feedItem"; + uri: string; +} + +const hashFeedItem = "feedItem"; + +export function isFeedItem(v: V) { + return is$typed(v, id, hashFeedItem); +} + +export function validateFeedItem(v: V) { + return validate(v, id, hashFeedItem); +} diff --git a/lex/types/app/bsky/graph/unmuteActor.ts b/lex/types/app/bsky/graph/unmuteActor.ts new file mode 100644 index 0000000..e185363 --- /dev/null +++ b/lex/types/app/bsky/graph/unmuteActor.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + actor: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/unmuteActorList.ts b/lex/types/app/bsky/graph/unmuteActorList.ts new file mode 100644 index 0000000..e5a2f15 --- /dev/null +++ b/lex/types/app/bsky/graph/unmuteActorList.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + list: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/graph/unmuteThread.ts b/lex/types/app/bsky/graph/unmuteThread.ts new file mode 100644 index 0000000..b99c31e --- /dev/null +++ b/lex/types/app/bsky/graph/unmuteThread.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + root: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/labeler/defs.ts b/lex/types/app/bsky/labeler/defs.ts new file mode 100644 index 0000000..9a83570 --- /dev/null +++ b/lex/types/app/bsky/labeler/defs.ts @@ -0,0 +1,93 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as ComAtprotoModerationDefs from "../../../com/atproto/moderation/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.labeler.defs"; + +export interface LabelerView { + $type?: "app.bsky.labeler.defs#labelerView"; + uri: string; + cid: string; + creator: AppBskyActorDefs.ProfileView; + likeCount?: number; + viewer?: LabelerViewerState; + indexedAt: string; + labels?: (ComAtprotoLabelDefs.Label)[]; +} + +const hashLabelerView = "labelerView"; + +export function isLabelerView(v: V) { + return is$typed(v, id, hashLabelerView); +} + +export function validateLabelerView(v: V) { + return validate(v, id, hashLabelerView); +} + +export interface LabelerViewDetailed { + $type?: "app.bsky.labeler.defs#labelerViewDetailed"; + uri: string; + cid: string; + creator: AppBskyActorDefs.ProfileView; + policies: LabelerPolicies; + likeCount?: number; + viewer?: LabelerViewerState; + indexedAt: string; + labels?: (ComAtprotoLabelDefs.Label)[]; + /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ + reasonTypes?: (ComAtprotoModerationDefs.ReasonType)[]; + /** The set of subject types (account, record, etc) this service accepts reports on. */ + subjectTypes?: (ComAtprotoModerationDefs.SubjectType)[]; + /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ + subjectCollections?: (string)[]; +} + +const hashLabelerViewDetailed = "labelerViewDetailed"; + +export function isLabelerViewDetailed(v: V) { + return is$typed(v, id, hashLabelerViewDetailed); +} + +export function validateLabelerViewDetailed(v: V) { + return validate(v, id, hashLabelerViewDetailed); +} + +export interface LabelerViewerState { + $type?: "app.bsky.labeler.defs#labelerViewerState"; + like?: string; +} + +const hashLabelerViewerState = "labelerViewerState"; + +export function isLabelerViewerState(v: V) { + return is$typed(v, id, hashLabelerViewerState); +} + +export function validateLabelerViewerState(v: V) { + return validate(v, id, hashLabelerViewerState); +} + +export interface LabelerPolicies { + $type?: "app.bsky.labeler.defs#labelerPolicies"; + /** The label values which this labeler publishes. May include global or custom labels. */ + labelValues: (ComAtprotoLabelDefs.LabelValue)[]; + /** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. */ + labelValueDefinitions?: (ComAtprotoLabelDefs.LabelValueDefinition)[]; +} + +const hashLabelerPolicies = "labelerPolicies"; + +export function isLabelerPolicies(v: V) { + return is$typed(v, id, hashLabelerPolicies); +} + +export function validateLabelerPolicies(v: V) { + return validate(v, id, hashLabelerPolicies); +} diff --git a/lex/types/app/bsky/labeler/getServices.ts b/lex/types/app/bsky/labeler/getServices.ts new file mode 100644 index 0000000..dda8a03 --- /dev/null +++ b/lex/types/app/bsky/labeler/getServices.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyLabelerDefs from "./defs.ts"; + +export type QueryParams = { + dids: string[]; + detailed: boolean; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + views: ( + | $Typed + | $Typed + | { $type: string } + )[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/labeler/service.ts b/lex/types/app/bsky/labeler/service.ts new file mode 100644 index 0000000..de0ff53 --- /dev/null +++ b/lex/types/app/bsky/labeler/service.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyLabelerDefs from "./defs.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; +import type * as ComAtprotoModerationDefs from "../../../com/atproto/moderation/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.labeler.service"; + +export interface Record { + $type: "app.bsky.labeler.service"; + policies: AppBskyLabelerDefs.LabelerPolicies; + labels?: $Typed | { $type: string }; + createdAt: string; + /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ + reasonTypes?: (ComAtprotoModerationDefs.ReasonType)[]; + /** The set of subject types (account, record, etc) this service accepts reports on. */ + subjectTypes?: (ComAtprotoModerationDefs.SubjectType)[]; + /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ + subjectCollections?: (string)[]; + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/app/bsky/notification/getUnreadCount.ts b/lex/types/app/bsky/notification/getUnreadCount.ts new file mode 100644 index 0000000..1901eea --- /dev/null +++ b/lex/types/app/bsky/notification/getUnreadCount.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = { + priority?: boolean; + seenAt?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + count: number; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/notification/listNotifications.ts b/lex/types/app/bsky/notification/listNotifications.ts new file mode 100644 index 0000000..05fea19 --- /dev/null +++ b/lex/types/app/bsky/notification/listNotifications.ts @@ -0,0 +1,74 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyActorDefs from "../actor/defs.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.notification.listNotifications"; + +export type QueryParams = { + /** Notification reasons to include in response. */ + reasons?: string[]; + limit: number; + priority?: boolean; + cursor?: string; + seenAt?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + notifications: (Notification)[]; + priority?: boolean; + seenAt?: string; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface Notification { + $type?: "app.bsky.notification.listNotifications#notification"; + uri: string; + cid: string; + author: AppBskyActorDefs.ProfileView; + /** Expected values are 'like', 'repost', 'follow', 'mention', 'reply', 'quote', and 'starterpack-joined'. */ + reason: + | "like" + | "repost" + | "follow" + | "mention" + | "reply" + | "quote" + | "starterpack-joined" + | (string & globalThis.Record); + reasonSubject?: string; + record: { [_ in string]: unknown }; + isRead: boolean; + indexedAt: string; + labels?: (ComAtprotoLabelDefs.Label)[]; +} + +const hashNotification = "notification"; + +export function isNotification(v: V) { + return is$typed(v, id, hashNotification); +} + +export function validateNotification(v: V) { + return validate(v, id, hashNotification); +} diff --git a/lex/types/app/bsky/notification/putPreferences.ts b/lex/types/app/bsky/notification/putPreferences.ts new file mode 100644 index 0000000..3d4d3ab --- /dev/null +++ b/lex/types/app/bsky/notification/putPreferences.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + priority: boolean; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/notification/registerPush.ts b/lex/types/app/bsky/notification/registerPush.ts new file mode 100644 index 0000000..5687ba5 --- /dev/null +++ b/lex/types/app/bsky/notification/registerPush.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + serviceDid: string; + token: string; + platform: + | "ios" + | "android" + | "web" + | (string & globalThis.Record); + appId: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/notification/updateSeen.ts b/lex/types/app/bsky/notification/updateSeen.ts new file mode 100644 index 0000000..57a14ce --- /dev/null +++ b/lex/types/app/bsky/notification/updateSeen.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + seenAt: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/app/bsky/richtext/facet.ts b/lex/types/app/bsky/richtext/facet.ts new file mode 100644 index 0000000..c5dad2b --- /dev/null +++ b/lex/types/app/bsky/richtext/facet.ts @@ -0,0 +1,92 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.richtext.facet"; + +/** Annotation of a sub-string within rich text. */ +export interface Main { + $type?: "app.bsky.richtext.facet"; + index: ByteSlice; + features: + ($Typed | $Typed | $Typed | { $type: string })[]; +} + +const hashMain = "main"; + +export function isMain(v: V) { + return is$typed(v, id, hashMain); +} + +export function validateMain(v: V) { + return validate
(v, id, hashMain); +} + +/** Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID. */ +export interface Mention { + $type?: "app.bsky.richtext.facet#mention"; + did: string; +} + +const hashMention = "mention"; + +export function isMention(v: V) { + return is$typed(v, id, hashMention); +} + +export function validateMention(v: V) { + return validate(v, id, hashMention); +} + +/** Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL. */ +export interface Link { + $type?: "app.bsky.richtext.facet#link"; + uri: string; +} + +const hashLink = "link"; + +export function isLink(v: V) { + return is$typed(v, id, hashLink); +} + +export function validateLink(v: V) { + return validate(v, id, hashLink); +} + +/** Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags'). */ +export interface Tag { + $type?: "app.bsky.richtext.facet#tag"; + tag: string; +} + +const hashTag = "tag"; + +export function isTag(v: V) { + return is$typed(v, id, hashTag); +} + +export function validateTag(v: V) { + return validate(v, id, hashTag); +} + +/** Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets. */ +export interface ByteSlice { + $type?: "app.bsky.richtext.facet#byteSlice"; + byteStart: number; + byteEnd: number; +} + +const hashByteSlice = "byteSlice"; + +export function isByteSlice(v: V) { + return is$typed(v, id, hashByteSlice); +} + +export function validateByteSlice(v: V) { + return validate(v, id, hashByteSlice); +} diff --git a/lex/types/app/bsky/unspecced/defs.ts b/lex/types/app/bsky/unspecced/defs.ts new file mode 100644 index 0000000..9214402 --- /dev/null +++ b/lex/types/app/bsky/unspecced/defs.ts @@ -0,0 +1,75 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.unspecced.defs"; + +export interface SkeletonSearchPost { + $type?: "app.bsky.unspecced.defs#skeletonSearchPost"; + uri: string; +} + +const hashSkeletonSearchPost = "skeletonSearchPost"; + +export function isSkeletonSearchPost(v: V) { + return is$typed(v, id, hashSkeletonSearchPost); +} + +export function validateSkeletonSearchPost(v: V) { + return validate(v, id, hashSkeletonSearchPost); +} + +export interface SkeletonSearchActor { + $type?: "app.bsky.unspecced.defs#skeletonSearchActor"; + did: string; +} + +const hashSkeletonSearchActor = "skeletonSearchActor"; + +export function isSkeletonSearchActor(v: V) { + return is$typed(v, id, hashSkeletonSearchActor); +} + +export function validateSkeletonSearchActor(v: V) { + return validate(v, id, hashSkeletonSearchActor); +} + +export interface SkeletonSearchStarterPack { + $type?: "app.bsky.unspecced.defs#skeletonSearchStarterPack"; + uri: string; +} + +const hashSkeletonSearchStarterPack = "skeletonSearchStarterPack"; + +export function isSkeletonSearchStarterPack(v: V) { + return is$typed(v, id, hashSkeletonSearchStarterPack); +} + +export function validateSkeletonSearchStarterPack(v: V) { + return validate( + v, + id, + hashSkeletonSearchStarterPack, + ); +} + +export interface TrendingTopic { + $type?: "app.bsky.unspecced.defs#trendingTopic"; + topic: string; + displayName?: string; + description?: string; + link: string; +} + +const hashTrendingTopic = "trendingTopic"; + +export function isTrendingTopic(v: V) { + return is$typed(v, id, hashTrendingTopic); +} + +export function validateTrendingTopic(v: V) { + return validate(v, id, hashTrendingTopic); +} diff --git a/lex/types/app/bsky/unspecced/getConfig.ts b/lex/types/app/bsky/unspecced/getConfig.ts new file mode 100644 index 0000000..139c6e2 --- /dev/null +++ b/lex/types/app/bsky/unspecced/getConfig.ts @@ -0,0 +1,24 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + checkEmailConfirmed?: boolean; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts new file mode 100644 index 0000000..cb91c0d --- /dev/null +++ b/lex/types/app/bsky/unspecced/getPopularFeedGenerators.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyFeedDefs from "../feed/defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; + query?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + feeds: (AppBskyFeedDefs.GeneratorView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts new file mode 100644 index 0000000..3d224b4 --- /dev/null +++ b/lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyUnspeccedDefs from "./defs.ts"; + +export type QueryParams = { + /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ + viewer?: string; + limit: number; + cursor?: string; + /** DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer. */ + relativeToDid?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + actors: (AppBskyUnspeccedDefs.SkeletonSearchActor)[]; + /** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. */ + relativeToDid?: string; + /** Snowflake for this recommendation, use when submitting recommendation events. */ + recId?: number; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts b/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts new file mode 100644 index 0000000..7572a2f --- /dev/null +++ b/lex/types/app/bsky/unspecced/getTaggedSuggestions.ts @@ -0,0 +1,50 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.unspecced.getTaggedSuggestions"; + +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + suggestions: (Suggestion)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface Suggestion { + $type?: "app.bsky.unspecced.getTaggedSuggestions#suggestion"; + tag: string; + subjectType: + | "actor" + | "feed" + | (string & globalThis.Record); + subject: string; +} + +const hashSuggestion = "suggestion"; + +export function isSuggestion(v: V) { + return is$typed(v, id, hashSuggestion); +} + +export function validateSuggestion(v: V) { + return validate(v, id, hashSuggestion); +} diff --git a/lex/types/app/bsky/unspecced/getTrendingTopics.ts b/lex/types/app/bsky/unspecced/getTrendingTopics.ts new file mode 100644 index 0000000..82f2240 --- /dev/null +++ b/lex/types/app/bsky/unspecced/getTrendingTopics.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyUnspeccedDefs from "./defs.ts"; + +export type QueryParams = { + /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ + viewer?: string; + limit: number; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + topics: (AppBskyUnspeccedDefs.TrendingTopic)[]; + suggested: (AppBskyUnspeccedDefs.TrendingTopic)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts b/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts new file mode 100644 index 0000000..7b2281c --- /dev/null +++ b/lex/types/app/bsky/unspecced/searchActorsSkeleton.ts @@ -0,0 +1,40 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyUnspeccedDefs from "./defs.ts"; + +export type QueryParams = { + /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax. */ + q: string; + /** DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking. */ + viewer?: string; + /** If true, acts as fast/simple 'typeahead' query. */ + typeahead?: boolean; + limit: number; + /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ + hitsTotal?: number; + actors: (AppBskyUnspeccedDefs.SkeletonSearchActor)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BadQueryString"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts b/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts new file mode 100644 index 0000000..7f08cc7 --- /dev/null +++ b/lex/types/app/bsky/unspecced/searchPostsSkeleton.ts @@ -0,0 +1,56 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyUnspeccedDefs from "./defs.ts"; + +export type QueryParams = { + /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ + q: string; + /** Specifies the ranking order of results. */ + sort: "top" | "latest" | (string & globalThis.Record); + /** Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD). */ + since?: string; + /** Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD). */ + until?: string; + /** Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions. */ + mentions?: string; + /** Filter to posts by the given account. Handles are resolved to DID before query-time. */ + author?: string; + /** Filter to posts in the given language. Expected to be based on post language field, though server may override language detection. */ + lang?: string; + /** Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization. */ + domain?: string; + /** Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching. */ + url?: string; + /** Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching. */ + tag?: string[]; + /** DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries. */ + viewer?: string; + limit: number; + /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ + hitsTotal?: number; + posts: (AppBskyUnspeccedDefs.SkeletonSearchPost)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BadQueryString"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts b/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts new file mode 100644 index 0000000..6246283 --- /dev/null +++ b/lex/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyUnspeccedDefs from "./defs.ts"; + +export type QueryParams = { + /** Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. */ + q: string; + /** DID of the account making the request (not included for public/unauthenticated queries). */ + viewer?: string; + limit: number; + /** Optional pagination mechanism; may not necessarily allow scrolling through entire result set. */ + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + /** Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits. */ + hitsTotal?: number; + starterPacks: (AppBskyUnspeccedDefs.SkeletonSearchStarterPack)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; + error?: "BadQueryString"; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/defs.ts b/lex/types/app/bsky/video/defs.ts new file mode 100644 index 0000000..ad8b59b --- /dev/null +++ b/lex/types/app/bsky/video/defs.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { BlobRef } from "@atp/lexicon"; +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "app.bsky.video.defs"; + +export interface JobStatus { + $type?: "app.bsky.video.defs#jobStatus"; + jobId: string; + did: string; + /** The state of the video processing job. All values not listed as a known value indicate that the job is in process. */ + state: + | "JOB_STATE_COMPLETED" + | "JOB_STATE_FAILED" + | (string & globalThis.Record); + /** Progress within the current processing state. */ + progress?: number; + blob?: BlobRef; + error?: string; + message?: string; +} + +const hashJobStatus = "jobStatus"; + +export function isJobStatus(v: V) { + return is$typed(v, id, hashJobStatus); +} + +export function validateJobStatus(v: V) { + return validate(v, id, hashJobStatus); +} diff --git a/lex/types/app/bsky/video/getJobStatus.ts b/lex/types/app/bsky/video/getJobStatus.ts new file mode 100644 index 0000000..08ca76a --- /dev/null +++ b/lex/types/app/bsky/video/getJobStatus.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as AppBskyVideoDefs from "./defs.ts"; + +export type QueryParams = { + jobId: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + jobStatus: AppBskyVideoDefs.JobStatus; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/getUploadLimits.ts b/lex/types/app/bsky/video/getUploadLimits.ts new file mode 100644 index 0000000..e18fdd5 --- /dev/null +++ b/lex/types/app/bsky/video/getUploadLimits.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + canUpload: boolean; + remainingDailyVideos?: number; + remainingDailyBytes?: number; + message?: string; + error?: string; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/app/bsky/video/uploadVideo.ts b/lex/types/app/bsky/video/uploadVideo.ts new file mode 100644 index 0000000..515906a --- /dev/null +++ b/lex/types/app/bsky/video/uploadVideo.ts @@ -0,0 +1,30 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import stream from "node:stream"; +import type * as AppBskyVideoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; +export type InputSchema = string | Uint8Array | Blob; + +export interface OutputSchema { + jobStatus: AppBskyVideoDefs.JobStatus; +} + +export interface HandlerInput { + encoding: "video/mp4"; + body: stream.Readable; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/actor/declaration.ts b/lex/types/chat/bsky/actor/declaration.ts new file mode 100644 index 0000000..3620e21 --- /dev/null +++ b/lex/types/chat/bsky/actor/declaration.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "chat.bsky.actor.declaration"; + +export interface Record { + $type: "chat.bsky.actor.declaration"; + allowIncoming: + | "all" + | "none" + | "following" + | (string & globalThis.Record); + [k: string]: unknown; +} + +const hashRecord = "main"; + +export function isRecord(v: V) { + return is$typed(v, id, hashRecord); +} + +export function validateRecord(v: V) { + return validate(v, id, hashRecord, true); +} diff --git a/lex/types/chat/bsky/actor/defs.ts b/lex/types/chat/bsky/actor/defs.ts new file mode 100644 index 0000000..046aa00 --- /dev/null +++ b/lex/types/chat/bsky/actor/defs.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as AppBskyActorDefs from "../../../app/bsky/actor/defs.ts"; +import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "chat.bsky.actor.defs"; + +export interface ProfileViewBasic { + $type?: "chat.bsky.actor.defs#profileViewBasic"; + did: string; + handle: string; + displayName?: string; + avatar?: string; + associated?: AppBskyActorDefs.ProfileAssociated; + viewer?: AppBskyActorDefs.ViewerState; + labels?: (ComAtprotoLabelDefs.Label)[]; + /** Set to true when the actor cannot actively participate in converations */ + chatDisabled?: boolean; +} + +const hashProfileViewBasic = "profileViewBasic"; + +export function isProfileViewBasic(v: V) { + return is$typed(v, id, hashProfileViewBasic); +} + +export function validateProfileViewBasic(v: V) { + return validate(v, id, hashProfileViewBasic); +} diff --git a/lex/types/chat/bsky/actor/deleteAccount.ts b/lex/types/chat/bsky/actor/deleteAccount.ts new file mode 100644 index 0000000..c4cb57a --- /dev/null +++ b/lex/types/chat/bsky/actor/deleteAccount.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; +export type OutputSchema = globalThis.Record; +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/actor/exportAccountData.ts b/lex/types/chat/bsky/actor/exportAccountData.ts new file mode 100644 index 0000000..8c84c76 --- /dev/null +++ b/lex/types/chat/bsky/actor/exportAccountData.ts @@ -0,0 +1,21 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import stream from "node:stream"; + +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/jsonl"; + body: Uint8Array | stream.Readable; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/acceptConvo.ts b/lex/types/chat/bsky/convo/acceptConvo.ts new file mode 100644 index 0000000..713d533 --- /dev/null +++ b/lex/types/chat/bsky/convo/acceptConvo.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; +} + +export interface OutputSchema { + /** Rev when the convo was accepted. If not present, the convo was already accepted. */ + rev?: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/defs.ts b/lex/types/chat/bsky/convo/defs.ts new file mode 100644 index 0000000..ec5d315 --- /dev/null +++ b/lex/types/chat/bsky/convo/defs.ts @@ -0,0 +1,259 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import { type $Typed } from "../../../../util.ts"; +import type * as AppBskyRichtextFacet from "../../../app/bsky/richtext/facet.ts"; +import type * as AppBskyEmbedRecord from "../../../app/bsky/embed/record.ts"; +import type * as ChatBskyActorDefs from "../actor/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "chat.bsky.convo.defs"; + +export interface MessageRef { + $type?: "chat.bsky.convo.defs#messageRef"; + did: string; + convoId: string; + messageId: string; +} + +const hashMessageRef = "messageRef"; + +export function isMessageRef(v: V) { + return is$typed(v, id, hashMessageRef); +} + +export function validateMessageRef(v: V) { + return validate(v, id, hashMessageRef); +} + +export interface MessageInput { + $type?: "chat.bsky.convo.defs#messageInput"; + text: string; + /** Annotations of text (mentions, URLs, hashtags, etc) */ + facets?: (AppBskyRichtextFacet.Main)[]; + embed?: $Typed | { $type: string }; +} + +const hashMessageInput = "messageInput"; + +export function isMessageInput(v: V) { + return is$typed(v, id, hashMessageInput); +} + +export function validateMessageInput(v: V) { + return validate(v, id, hashMessageInput); +} + +export interface MessageView { + $type?: "chat.bsky.convo.defs#messageView"; + id: string; + rev: string; + text: string; + /** Annotations of text (mentions, URLs, hashtags, etc) */ + facets?: (AppBskyRichtextFacet.Main)[]; + embed?: $Typed | { $type: string }; + sender: MessageViewSender; + sentAt: string; +} + +const hashMessageView = "messageView"; + +export function isMessageView(v: V) { + return is$typed(v, id, hashMessageView); +} + +export function validateMessageView(v: V) { + return validate(v, id, hashMessageView); +} + +export interface DeletedMessageView { + $type?: "chat.bsky.convo.defs#deletedMessageView"; + id: string; + rev: string; + sender: MessageViewSender; + sentAt: string; +} + +const hashDeletedMessageView = "deletedMessageView"; + +export function isDeletedMessageView(v: V) { + return is$typed(v, id, hashDeletedMessageView); +} + +export function validateDeletedMessageView(v: V) { + return validate(v, id, hashDeletedMessageView); +} + +export interface MessageViewSender { + $type?: "chat.bsky.convo.defs#messageViewSender"; + did: string; +} + +const hashMessageViewSender = "messageViewSender"; + +export function isMessageViewSender(v: V) { + return is$typed(v, id, hashMessageViewSender); +} + +export function validateMessageViewSender(v: V) { + return validate(v, id, hashMessageViewSender); +} + +export interface ConvoView { + $type?: "chat.bsky.convo.defs#convoView"; + id: string; + rev: string; + members: (ChatBskyActorDefs.ProfileViewBasic)[]; + lastMessage?: $Typed | $Typed | { + $type: string; + }; + muted: boolean; + status?: + | "request" + | "accepted" + | (string & globalThis.Record); + unreadCount: number; +} + +const hashConvoView = "convoView"; + +export function isConvoView(v: V) { + return is$typed(v, id, hashConvoView); +} + +export function validateConvoView(v: V) { + return validate(v, id, hashConvoView); +} + +export interface LogBeginConvo { + $type?: "chat.bsky.convo.defs#logBeginConvo"; + rev: string; + convoId: string; +} + +const hashLogBeginConvo = "logBeginConvo"; + +export function isLogBeginConvo(v: V) { + return is$typed(v, id, hashLogBeginConvo); +} + +export function validateLogBeginConvo(v: V) { + return validate(v, id, hashLogBeginConvo); +} + +export interface LogAcceptConvo { + $type?: "chat.bsky.convo.defs#logAcceptConvo"; + rev: string; + convoId: string; +} + +const hashLogAcceptConvo = "logAcceptConvo"; + +export function isLogAcceptConvo(v: V) { + return is$typed(v, id, hashLogAcceptConvo); +} + +export function validateLogAcceptConvo(v: V) { + return validate(v, id, hashLogAcceptConvo); +} + +export interface LogLeaveConvo { + $type?: "chat.bsky.convo.defs#logLeaveConvo"; + rev: string; + convoId: string; +} + +const hashLogLeaveConvo = "logLeaveConvo"; + +export function isLogLeaveConvo(v: V) { + return is$typed(v, id, hashLogLeaveConvo); +} + +export function validateLogLeaveConvo(v: V) { + return validate(v, id, hashLogLeaveConvo); +} + +export interface LogMuteConvo { + $type?: "chat.bsky.convo.defs#logMuteConvo"; + rev: string; + convoId: string; +} + +const hashLogMuteConvo = "logMuteConvo"; + +export function isLogMuteConvo(v: V) { + return is$typed(v, id, hashLogMuteConvo); +} + +export function validateLogMuteConvo(v: V) { + return validate(v, id, hashLogMuteConvo); +} + +export interface LogUnmuteConvo { + $type?: "chat.bsky.convo.defs#logUnmuteConvo"; + rev: string; + convoId: string; +} + +const hashLogUnmuteConvo = "logUnmuteConvo"; + +export function isLogUnmuteConvo(v: V) { + return is$typed(v, id, hashLogUnmuteConvo); +} + +export function validateLogUnmuteConvo(v: V) { + return validate(v, id, hashLogUnmuteConvo); +} + +export interface LogCreateMessage { + $type?: "chat.bsky.convo.defs#logCreateMessage"; + rev: string; + convoId: string; + message: $Typed | $Typed | { $type: string }; +} + +const hashLogCreateMessage = "logCreateMessage"; + +export function isLogCreateMessage(v: V) { + return is$typed(v, id, hashLogCreateMessage); +} + +export function validateLogCreateMessage(v: V) { + return validate(v, id, hashLogCreateMessage); +} + +export interface LogDeleteMessage { + $type?: "chat.bsky.convo.defs#logDeleteMessage"; + rev: string; + convoId: string; + message: $Typed | $Typed | { $type: string }; +} + +const hashLogDeleteMessage = "logDeleteMessage"; + +export function isLogDeleteMessage(v: V) { + return is$typed(v, id, hashLogDeleteMessage); +} + +export function validateLogDeleteMessage(v: V) { + return validate(v, id, hashLogDeleteMessage); +} + +export interface LogReadMessage { + $type?: "chat.bsky.convo.defs#logReadMessage"; + rev: string; + convoId: string; + message: $Typed | $Typed | { $type: string }; +} + +const hashLogReadMessage = "logReadMessage"; + +export function isLogReadMessage(v: V) { + return is$typed(v, id, hashLogReadMessage); +} + +export function validateLogReadMessage(v: V) { + return validate(v, id, hashLogReadMessage); +} diff --git a/lex/types/chat/bsky/convo/deleteMessageForSelf.ts b/lex/types/chat/bsky/convo/deleteMessageForSelf.ts new file mode 100644 index 0000000..2f88086 --- /dev/null +++ b/lex/types/chat/bsky/convo/deleteMessageForSelf.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; + messageId: string; +} + +export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView; + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvo.ts b/lex/types/chat/bsky/convo/getConvo.ts new file mode 100644 index 0000000..32eabe0 --- /dev/null +++ b/lex/types/chat/bsky/convo/getConvo.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + convoId: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + convo: ChatBskyConvoDefs.ConvoView; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvoAvailability.ts b/lex/types/chat/bsky/convo/getConvoAvailability.ts new file mode 100644 index 0000000..19f4cd1 --- /dev/null +++ b/lex/types/chat/bsky/convo/getConvoAvailability.ts @@ -0,0 +1,29 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + members: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + canChat: boolean; + convo?: ChatBskyConvoDefs.ConvoView; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getConvoForMembers.ts b/lex/types/chat/bsky/convo/getConvoForMembers.ts new file mode 100644 index 0000000..5d2ae45 --- /dev/null +++ b/lex/types/chat/bsky/convo/getConvoForMembers.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + members: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + convo: ChatBskyConvoDefs.ConvoView; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getLog.ts b/lex/types/chat/bsky/convo/getLog.ts new file mode 100644 index 0000000..12f8a74 --- /dev/null +++ b/lex/types/chat/bsky/convo/getLog.ts @@ -0,0 +1,37 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + logs: ( + | $Typed + | $Typed + | $Typed + | $Typed + | $Typed + | { $type: string } + )[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/getMessages.ts b/lex/types/chat/bsky/convo/getMessages.ts new file mode 100644 index 0000000..d7f34fa --- /dev/null +++ b/lex/types/chat/bsky/convo/getMessages.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + convoId: string; + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + messages: ( + | $Typed + | $Typed + | { $type: string } + )[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/leaveConvo.ts b/lex/types/chat/bsky/convo/leaveConvo.ts new file mode 100644 index 0000000..4e9f8e6 --- /dev/null +++ b/lex/types/chat/bsky/convo/leaveConvo.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; +} + +export interface OutputSchema { + convoId: string; + rev: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/listConvos.ts b/lex/types/chat/bsky/convo/listConvos.ts new file mode 100644 index 0000000..1cf0ce7 --- /dev/null +++ b/lex/types/chat/bsky/convo/listConvos.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = { + limit: number; + cursor?: string; + readState?: "unread" | (string & globalThis.Record); + status?: + | "request" + | "accepted" + | (string & globalThis.Record); +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + convos: (ChatBskyConvoDefs.ConvoView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/muteConvo.ts b/lex/types/chat/bsky/convo/muteConvo.ts new file mode 100644 index 0000000..e91c3e5 --- /dev/null +++ b/lex/types/chat/bsky/convo/muteConvo.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; +} + +export interface OutputSchema { + convo: ChatBskyConvoDefs.ConvoView; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/sendMessage.ts b/lex/types/chat/bsky/convo/sendMessage.ts new file mode 100644 index 0000000..6b90850 --- /dev/null +++ b/lex/types/chat/bsky/convo/sendMessage.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; + message: ChatBskyConvoDefs.MessageInput; +} + +export type OutputSchema = ChatBskyConvoDefs.MessageView; + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/sendMessageBatch.ts b/lex/types/chat/bsky/convo/sendMessageBatch.ts new file mode 100644 index 0000000..fb3cf8c --- /dev/null +++ b/lex/types/chat/bsky/convo/sendMessageBatch.ts @@ -0,0 +1,53 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as ChatBskyConvoDefs from "./defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "chat.bsky.convo.sendMessageBatch"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + items: (BatchItem)[]; +} + +export interface OutputSchema { + items: (ChatBskyConvoDefs.MessageView)[]; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface BatchItem { + $type?: "chat.bsky.convo.sendMessageBatch#batchItem"; + convoId: string; + message: ChatBskyConvoDefs.MessageInput; +} + +const hashBatchItem = "batchItem"; + +export function isBatchItem(v: V) { + return is$typed(v, id, hashBatchItem); +} + +export function validateBatchItem(v: V) { + return validate(v, id, hashBatchItem); +} diff --git a/lex/types/chat/bsky/convo/unmuteConvo.ts b/lex/types/chat/bsky/convo/unmuteConvo.ts new file mode 100644 index 0000000..e91c3e5 --- /dev/null +++ b/lex/types/chat/bsky/convo/unmuteConvo.ts @@ -0,0 +1,32 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; +} + +export interface OutputSchema { + convo: ChatBskyConvoDefs.ConvoView; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/updateAllRead.ts b/lex/types/chat/bsky/convo/updateAllRead.ts new file mode 100644 index 0000000..2359812 --- /dev/null +++ b/lex/types/chat/bsky/convo/updateAllRead.ts @@ -0,0 +1,34 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + status?: + | "request" + | "accepted" + | (string & globalThis.Record); +} + +export interface OutputSchema { + /** The count of updated convos. */ + updatedCount: number; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/convo/updateRead.ts b/lex/types/chat/bsky/convo/updateRead.ts new file mode 100644 index 0000000..877f504 --- /dev/null +++ b/lex/types/chat/bsky/convo/updateRead.ts @@ -0,0 +1,33 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ChatBskyConvoDefs from "./defs.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + convoId: string; + messageId?: string; +} + +export interface OutputSchema { + convo: ChatBskyConvoDefs.ConvoView; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/moderation/getActorMetadata.ts b/lex/types/chat/bsky/moderation/getActorMetadata.ts new file mode 100644 index 0000000..a04ee8c --- /dev/null +++ b/lex/types/chat/bsky/moderation/getActorMetadata.ts @@ -0,0 +1,52 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "chat.bsky.moderation.getActorMetadata"; + +export type QueryParams = { + actor: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + day: Metadata; + month: Metadata; + all: Metadata; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; + +export interface Metadata { + $type?: "chat.bsky.moderation.getActorMetadata#metadata"; + messagesSent: number; + messagesReceived: number; + convos: number; + convosStarted: number; +} + +const hashMetadata = "metadata"; + +export function isMetadata(v: V) { + return is$typed(v, id, hashMetadata); +} + +export function validateMetadata(v: V) { + return validate(v, id, hashMetadata); +} diff --git a/lex/types/chat/bsky/moderation/getMessageContext.ts b/lex/types/chat/bsky/moderation/getMessageContext.ts new file mode 100644 index 0000000..998850e --- /dev/null +++ b/lex/types/chat/bsky/moderation/getMessageContext.ts @@ -0,0 +1,37 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as ChatBskyConvoDefs from "../convo/defs.ts"; + +export type QueryParams = { + /** Conversation that the message is from. NOTE: this field will eventually be required. */ + convoId?: string; + messageId: string; + before: number; + after: number; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + messages: ( + | $Typed + | $Typed + | { $type: string } + )[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/chat/bsky/moderation/updateActorAccess.ts b/lex/types/chat/bsky/moderation/updateActorAccess.ts new file mode 100644 index 0000000..7852dc3 --- /dev/null +++ b/lex/types/chat/bsky/moderation/updateActorAccess.ts @@ -0,0 +1,22 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + actor: string; + allowAccess: boolean; + ref?: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/defs.ts b/lex/types/com/atproto/admin/defs.ts new file mode 100644 index 0000000..216c362 --- /dev/null +++ b/lex/types/com/atproto/admin/defs.ts @@ -0,0 +1,99 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; +import type * as ComAtprotoServerDefs from "../server/defs.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "com.atproto.admin.defs"; + +export interface StatusAttr { + $type?: "com.atproto.admin.defs#statusAttr"; + applied: boolean; + ref?: string; +} + +const hashStatusAttr = "statusAttr"; + +export function isStatusAttr(v: V) { + return is$typed(v, id, hashStatusAttr); +} + +export function validateStatusAttr(v: V) { + return validate(v, id, hashStatusAttr); +} + +export interface AccountView { + $type?: "com.atproto.admin.defs#accountView"; + did: string; + handle: string; + email?: string; + relatedRecords?: ({ [_ in string]: unknown })[]; + indexedAt: string; + invitedBy?: ComAtprotoServerDefs.InviteCode; + invites?: (ComAtprotoServerDefs.InviteCode)[]; + invitesDisabled?: boolean; + emailConfirmedAt?: string; + inviteNote?: string; + deactivatedAt?: string; + threatSignatures?: (ThreatSignature)[]; +} + +const hashAccountView = "accountView"; + +export function isAccountView(v: V) { + return is$typed(v, id, hashAccountView); +} + +export function validateAccountView(v: V) { + return validate(v, id, hashAccountView); +} + +export interface RepoRef { + $type?: "com.atproto.admin.defs#repoRef"; + did: string; +} + +const hashRepoRef = "repoRef"; + +export function isRepoRef(v: V) { + return is$typed(v, id, hashRepoRef); +} + +export function validateRepoRef(v: V) { + return validate(v, id, hashRepoRef); +} + +export interface RepoBlobRef { + $type?: "com.atproto.admin.defs#repoBlobRef"; + did: string; + cid: string; + recordUri?: string; +} + +const hashRepoBlobRef = "repoBlobRef"; + +export function isRepoBlobRef(v: V) { + return is$typed(v, id, hashRepoBlobRef); +} + +export function validateRepoBlobRef(v: V) { + return validate(v, id, hashRepoBlobRef); +} + +export interface ThreatSignature { + $type?: "com.atproto.admin.defs#threatSignature"; + property: string; + value: string; +} + +const hashThreatSignature = "threatSignature"; + +export function isThreatSignature(v: V) { + return is$typed(v, id, hashThreatSignature); +} + +export function validateThreatSignature(v: V) { + return validate(v, id, hashThreatSignature); +} diff --git a/lex/types/com/atproto/admin/deleteAccount.ts b/lex/types/com/atproto/admin/deleteAccount.ts new file mode 100644 index 0000000..c1c5baf --- /dev/null +++ b/lex/types/com/atproto/admin/deleteAccount.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + did: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/disableAccountInvites.ts b/lex/types/com/atproto/admin/disableAccountInvites.ts new file mode 100644 index 0000000..ed4f5e8 --- /dev/null +++ b/lex/types/com/atproto/admin/disableAccountInvites.ts @@ -0,0 +1,22 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + account: string; + /** Optional reason for disabled invites. */ + note?: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/disableInviteCodes.ts b/lex/types/com/atproto/admin/disableInviteCodes.ts new file mode 100644 index 0000000..c14992c --- /dev/null +++ b/lex/types/com/atproto/admin/disableInviteCodes.ts @@ -0,0 +1,21 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + codes?: (string)[]; + accounts?: (string)[]; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/enableAccountInvites.ts b/lex/types/com/atproto/admin/enableAccountInvites.ts new file mode 100644 index 0000000..36eef2f --- /dev/null +++ b/lex/types/com/atproto/admin/enableAccountInvites.ts @@ -0,0 +1,22 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + account: string; + /** Optional reason for enabled invites. */ + note?: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/getAccountInfo.ts b/lex/types/com/atproto/admin/getAccountInfo.ts new file mode 100644 index 0000000..9752b33 --- /dev/null +++ b/lex/types/com/atproto/admin/getAccountInfo.ts @@ -0,0 +1,24 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ComAtprotoAdminDefs from "./defs.ts"; + +export type QueryParams = { + did: string; +}; +export type InputSchema = undefined; +export type OutputSchema = ComAtprotoAdminDefs.AccountView; +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getAccountInfos.ts b/lex/types/com/atproto/admin/getAccountInfos.ts new file mode 100644 index 0000000..c4a7acf --- /dev/null +++ b/lex/types/com/atproto/admin/getAccountInfos.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ComAtprotoAdminDefs from "./defs.ts"; + +export type QueryParams = { + dids: string[]; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + infos: (ComAtprotoAdminDefs.AccountView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getInviteCodes.ts b/lex/types/com/atproto/admin/getInviteCodes.ts new file mode 100644 index 0000000..b3e0873 --- /dev/null +++ b/lex/types/com/atproto/admin/getInviteCodes.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ComAtprotoServerDefs from "../server/defs.ts"; + +export type QueryParams = { + sort: "recent" | "usage" | (string & globalThis.Record); + limit: number; + cursor?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + codes: (ComAtprotoServerDefs.InviteCode)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/getSubjectStatus.ts b/lex/types/com/atproto/admin/getSubjectStatus.ts new file mode 100644 index 0000000..2367a9d --- /dev/null +++ b/lex/types/com/atproto/admin/getSubjectStatus.ts @@ -0,0 +1,38 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as ComAtprotoAdminDefs from "./defs.ts"; +import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; + +export type QueryParams = { + did?: string; + uri?: string; + blob?: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + subject: + | $Typed + | $Typed + | $Typed + | { $type: string }; + takedown?: ComAtprotoAdminDefs.StatusAttr; + deactivated?: ComAtprotoAdminDefs.StatusAttr; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/searchAccounts.ts b/lex/types/com/atproto/admin/searchAccounts.ts new file mode 100644 index 0000000..f24a144 --- /dev/null +++ b/lex/types/com/atproto/admin/searchAccounts.ts @@ -0,0 +1,31 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import type * as ComAtprotoAdminDefs from "./defs.ts"; + +export type QueryParams = { + email?: string; + cursor?: string; + limit: number; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + cursor?: string; + accounts: (ComAtprotoAdminDefs.AccountView)[]; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/sendEmail.ts b/lex/types/com/atproto/admin/sendEmail.ts new file mode 100644 index 0000000..5ecabd3 --- /dev/null +++ b/lex/types/com/atproto/admin/sendEmail.ts @@ -0,0 +1,35 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + recipientDid: string; + content: string; + subject?: string; + senderDid: string; + /** Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers */ + comment?: string; +} + +export interface OutputSchema { + sent: boolean; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/admin/updateAccountEmail.ts b/lex/types/com/atproto/admin/updateAccountEmail.ts new file mode 100644 index 0000000..bd5b139 --- /dev/null +++ b/lex/types/com/atproto/admin/updateAccountEmail.ts @@ -0,0 +1,22 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + /** The handle or DID of the repo. */ + account: string; + email: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateAccountHandle.ts b/lex/types/com/atproto/admin/updateAccountHandle.ts new file mode 100644 index 0000000..8922a87 --- /dev/null +++ b/lex/types/com/atproto/admin/updateAccountHandle.ts @@ -0,0 +1,21 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + did: string; + handle: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateAccountPassword.ts b/lex/types/com/atproto/admin/updateAccountPassword.ts new file mode 100644 index 0000000..c7530a1 --- /dev/null +++ b/lex/types/com/atproto/admin/updateAccountPassword.ts @@ -0,0 +1,21 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + did: string; + password: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/admin/updateSubjectStatus.ts b/lex/types/com/atproto/admin/updateSubjectStatus.ts new file mode 100644 index 0000000..7068deb --- /dev/null +++ b/lex/types/com/atproto/admin/updateSubjectStatus.ts @@ -0,0 +1,45 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { type $Typed } from "../../../../util.ts"; +import type * as ComAtprotoAdminDefs from "./defs.ts"; +import type * as ComAtprotoRepoStrongRef from "../repo/strongRef.ts"; + +export type QueryParams = globalThis.Record; + +export interface InputSchema { + subject: + | $Typed + | $Typed + | $Typed + | { $type: string }; + takedown?: ComAtprotoAdminDefs.StatusAttr; + deactivated?: ComAtprotoAdminDefs.StatusAttr; +} + +export interface OutputSchema { + subject: + | $Typed + | $Typed + | $Typed + | { $type: string }; + takedown?: ComAtprotoAdminDefs.StatusAttr; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts b/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts new file mode 100644 index 0000000..87e0a0f --- /dev/null +++ b/lex/types/com/atproto/identity/getRecommendedDidCredentials.ts @@ -0,0 +1,28 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; + +export interface OutputSchema { + /** Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs. */ + rotationKeys?: (string)[]; + alsoKnownAs?: (string)[]; + verificationMethods?: { [_ in string]: unknown }; + services?: { [_ in string]: unknown }; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/requestPlcOperationSignature.ts b/lex/types/com/atproto/identity/requestPlcOperationSignature.ts new file mode 100644 index 0000000..ed8f629 --- /dev/null +++ b/lex/types/com/atproto/identity/requestPlcOperationSignature.ts @@ -0,0 +1,13 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; +export type InputSchema = undefined; +export type HandlerInput = void; + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/identity/resolveHandle.ts b/lex/types/com/atproto/identity/resolveHandle.ts new file mode 100644 index 0000000..d5a7968 --- /dev/null +++ b/lex/types/com/atproto/identity/resolveHandle.ts @@ -0,0 +1,27 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = { + /** The handle to resolve. */ + handle: string; +}; +export type InputSchema = undefined; + +export interface OutputSchema { + did: string; +} + +export type HandlerInput = void; + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/signPlcOperation.ts b/lex/types/com/atproto/identity/signPlcOperation.ts new file mode 100644 index 0000000..ad1c017 --- /dev/null +++ b/lex/types/com/atproto/identity/signPlcOperation.ts @@ -0,0 +1,36 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + /** A token received through com.atproto.identity.requestPlcOperationSignature */ + token?: string; + rotationKeys?: (string)[]; + alsoKnownAs?: (string)[]; + verificationMethods?: { [_ in string]: unknown }; + services?: { [_ in string]: unknown }; +} + +export interface OutputSchema { + /** A signed DID PLC operation. */ + operation: { [_ in string]: unknown }; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerSuccess { + encoding: "application/json"; + body: OutputSchema; + headers?: { [key: string]: string }; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | HandlerSuccess; diff --git a/lex/types/com/atproto/identity/submitPlcOperation.ts b/lex/types/com/atproto/identity/submitPlcOperation.ts new file mode 100644 index 0000000..85fd218 --- /dev/null +++ b/lex/types/com/atproto/identity/submitPlcOperation.ts @@ -0,0 +1,20 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + operation: { [_ in string]: unknown }; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/identity/updateHandle.ts b/lex/types/com/atproto/identity/updateHandle.ts new file mode 100644 index 0000000..7c8b0a6 --- /dev/null +++ b/lex/types/com/atproto/identity/updateHandle.ts @@ -0,0 +1,21 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +export type QueryParams = globalThis.Record; + +export interface InputSchema { + /** The new handle. */ + handle: string; +} + +export interface HandlerInput { + encoding: "application/json"; + body: InputSchema; +} + +export interface HandlerError { + status: number; + message?: string; +} + +export type HandlerOutput = HandlerError | void; diff --git a/lex/types/com/atproto/label/defs.ts b/lex/types/com/atproto/label/defs.ts new file mode 100644 index 0000000..056da34 --- /dev/null +++ b/lex/types/com/atproto/label/defs.ts @@ -0,0 +1,151 @@ +/** + * GENERATED CODE - DO NOT MODIFY + */ +import { validate as _validate } from "../../../../lexicons.ts"; +import { is$typed as _is$typed } from "../../../../util.ts"; + +const is$typed = _is$typed, validate = _validate; +const id = "com.atproto.label.defs"; + +/** Metadata tag on an atproto resource (eg, repo or record). */ +export interface Label { + $type?: "com.atproto.label.defs#label"; + /** The AT Protocol version of the label object. */ + ver?: number; + /** DID of the actor who created this label. */ + src: string; + /** AT URI of the record, repository (account), or other resource that this label applies to. */ + uri: string; + /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */ + cid?: string; + /** The short string name of the value or type of this label. */ + val: string; + /** If true, this is a negation label, overwriting a previous label. */ + neg?: boolean; + /** Timestamp when this label was created. */ + cts: string; + /** Timestamp at which this label expires (no longer applies). */ + exp?: string; + /** Signature of dag-cbor encoded label. */ + sig?: Uint8Array; +} + +const hashLabel = "label"; + +export function isLabel(v: V) { + return is$typed(v, id, hashLabel); +} + +export function validateLabel(v: V) { + return validate