diff --git a/.changeset/calm-groups-limit.md b/.changeset/calm-groups-limit.md new file mode 100644 index 00000000000..660458a700c --- /dev/null +++ b/.changeset/calm-groups-limit.md @@ -0,0 +1,5 @@ +--- +"@atproto/api": patch +--- + +update chat lexicons diff --git a/.changeset/chatty-icons-agree.md b/.changeset/chatty-icons-agree.md new file mode 100644 index 00000000000..b858b85a84d --- /dev/null +++ b/.changeset/chatty-icons-agree.md @@ -0,0 +1,5 @@ +--- +'@atproto/bsky': patch +--- + +Ensure `associatedProfiles` is returned for Standard Site external embed views diff --git a/.changeset/crisp-bridges-dream.md b/.changeset/crisp-bridges-dream.md new file mode 100644 index 00000000000..a22393aa617 --- /dev/null +++ b/.changeset/crisp-bridges-dream.md @@ -0,0 +1,5 @@ +--- +'@atproto/pds': patch +--- + +Fix OAuth service-proxying audience check to use combined `did#serviceId` form, matching the shape of granted `rpc:` scopes. diff --git a/.changeset/plain-rivers-glow.md b/.changeset/plain-rivers-glow.md new file mode 100644 index 00000000000..6a6d75d7596 --- /dev/null +++ b/.changeset/plain-rivers-glow.md @@ -0,0 +1,5 @@ +--- +'@atproto/oauth-scopes': minor +--- + +**BREAKING:** Remove the `AtprotoAudience` and `isAtprotoAudience` re-exports. They are superseded by `AtprotoDidRefAbsolute` and `isAtprotoDidRefAbsolute`, also re-exported from this package. diff --git a/.changeset/quiet-bridges-hum.md b/.changeset/quiet-bridges-hum.md new file mode 100644 index 00000000000..5712ee5128d --- /dev/null +++ b/.changeset/quiet-bridges-hum.md @@ -0,0 +1,5 @@ +--- +'@atproto/did': minor +--- + +**BREAKING:** Remove `AtprotoAudience` and `isAtprotoAudience`. They are superseded by `AtprotoDidRefAbsolute` and `isAtprotoDidRefAbsolute`. Adds the related `DidRefAbsolute` and `DidRefRelative` types and predicates. diff --git a/.changeset/quiet-rivers-dance.md b/.changeset/quiet-rivers-dance.md new file mode 100644 index 00000000000..5a9b29d31f7 --- /dev/null +++ b/.changeset/quiet-rivers-dance.md @@ -0,0 +1,5 @@ +--- +'@atproto/pds': patch +--- + +`getServiceAuth` now accepts the combined `did#serviceId` form for its `aud` parameter, in addition to the bare DID form. diff --git a/.eslintrc b/.eslintrc index 3f5f750aeda..c429553f9db 100644 --- a/.eslintrc +++ b/.eslintrc @@ -51,6 +51,7 @@ { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_|^err$|^error$", "ignoreRestSiblings": true } ], @@ -62,7 +63,7 @@ }, "overrides": [ { - "files": ["jest.config.js"], + "files": ["jest.config.cjs"], "env": { "commonjs": true } }, { @@ -70,13 +71,13 @@ "env": { "node": true } }, { - "files": ["jest.setup.js"], + "files": ["test.setup.ts"], "env": { "jest": true } }, { - "files": ["*.js", "*.cjs"], + "files": ["*.js", "*.cjs", "*.cts"], "rules": { - "@typescript-eslint/no-var-requires": "off" + "@typescript-eslint/no-require-imports": "off" } }, { @@ -85,12 +86,21 @@ "n/no-extraneous-import": [ "error", { "allowModules": ["@atproto/dev-env"] } + ], + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_|^err$|^error$", + "ignoreRestSiblings": true + } ] } } ], "settings": { - "node": { "version": ">=18.7.0" }, + "node": { "version": ">=22" }, "import/internal-regex": "^@atproto(?:-labs)?/", "import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] }, "import/resolver": { diff --git a/.gitattributes b/.gitattributes index da3637dd037..c67629eeb96 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,13 +1,2 @@ -# buf -packages/bsky/src/proto/** linguist-generated=true -packages/bsync/src/proto/** linguist-generated=true - -# codegen -packages/api/src/client/** linguist-generated=true -packages/ozone/src/lexicon/** linguist-generated=true - -# @atproto/lex -packages/lexicon-resolver/src/lexicons/** linguist-generated=true - # i18n packages/oauth/oauth-provider-ui/src/locales/**/messages.po linguist-generated=true diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9cccb9e6d29..55feff28a54 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -38,7 +38,7 @@ jobs: uses: changesets/action@v1 id: changesets with: - publish: pnpm release + publish: pnpm run publish:ci version: pnpm run version-packages commit: 'Version packages' title: 'Version packages' diff --git a/.github/workflows/repo.yaml b/.github/workflows/repo.yaml index 2f9ab26ec6b..8e2ef31ea91 100644 --- a/.github/workflows/repo.yaml +++ b/.github/workflows/repo.yaml @@ -2,8 +2,6 @@ name: Repository CI on: pull_request: - branches: - - '*' concurrency: group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' @@ -24,22 +22,51 @@ jobs: env: PUPPETEER_SKIP_DOWNLOAD: true + # lex-cli code generation can be a bottleneck. The "prebuild" script in + # the "api" and "ozone" packages only re-runs lex-cli when needed: if the + # generated output is missing, or if any lexicon JSON has a newer mtime + # than the generated files. We cache the generated output keyed on the + # content of the lexicon JSONs (plus the package.json files that define + # the codegen command), so unchanged lexicons restore from cache. + # + # However, on a cache hit we have to fix mtimes by hand. + # `actions/checkout` writes every checked-out file (including + # lexicons/**/*.json) with mtime = checkout time, while `actions/cache` + # restores files with their original archived mtime (older). Without + # intervention, every lexicon JSON looks "newer" than the restored + # generated files and the prebuild script would re-run lex-cli even though + # nothing has changed. Touching the restored files brings their mtime to + # "now", so the prebuild's `find -newer` check correctly reports no newer + # lexicons. + - uses: actions/cache@v4 + id: lex-cli-cache + with: + path: | + packages/api/src/client + packages/ozone/src/lexicon + key: lex-cli-${{ hashFiles('lexicons/**/*.json', 'packages/api/package.json', 'packages/ozone/package.json') }} + - if: steps.lex-cli-cache.outputs.cache-hit == 'true' + run: find packages/api/src/client packages/ozone/src/lexicon -exec touch {} + + - run: pnpm build + - uses: actions/upload-artifact@v4 with: + # Preserve the result of codegen and build steps. name: dist retention-days: 2 path: | packages/*/dist packages/*/*/dist + packages/*/src/proto + packages/*/src/lexicons packages/lex/*/src/lexicons packages/lex/*/tests/lexicons - packages/oauth/oauth-client-browser-example/src/lexicons + packages/oauth/*/src/lexicons packages/oauth/*/src/locales/*/messages.ts + packages/api/src/client packages/api/src/moderation/const/labels.ts - packages/bsky/src/lexicons - packages/pds/src/lexicons - packages/sync/src/lexicons + packages/ozone/src/lexicon changeset: name: Changeset diff --git a/.vscode/settings.json b/.vscode/settings.json index 482e0e0adfc..39cb1e3709f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -49,5 +49,5 @@ "prettier.semi": false, "prettier.singleQuote": true, "prettier.trailingComma": "es5", - "typescript.tsdk": "node_modules/typescript/lib" + "js/ts.tsdk.path": "node_modules/typescript/lib" } diff --git a/README.md b/README.md index da08d1bd011..283c1466bf9 100644 --- a/README.md +++ b/README.md @@ -8,18 +8,19 @@ This repository contains Bluesky's reference implementation of AT Protocol, and **TypeScript Packages:** -| Package | Docs | NPM | -| ----------------------------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | -| `@atproto/api`: client library | [README](./packages/api/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/api)](https://www.npmjs.com/package/@atproto/api) | -| `@atproto/common-web`: shared code and helpers which can run in web browsers | [README](./packages/common-web/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/common-web)](https://www.npmjs.com/package/@atproto/common-web) | -| `@atproto/common`: shared code and helpers which doesn't work in web browsers | [README](./packages/common/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/common)](https://www.npmjs.com/package/@atproto/common) | -| `@atproto/crypto`: cryptographic signing and key serialization | [README](./packages/crypto/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/crypto)](https://www.npmjs.com/package/@atproto/crypto) | -| `@atproto/identity`: DID and handle resolution | [README](./packages/identity/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/identity)](https://www.npmjs.com/package/@atproto/identity) | -| `@atproto/lexicon`: schema definition language | [README](./packages/lexicon/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/lexicon)](https://www.npmjs.com/package/@atproto/lexicon) | -| `@atproto/repo`: data storage structure, including MST | [README](./packages/repo/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/repo)](https://www.npmjs.com/package/@atproto/repo) | -| `@atproto/syntax`: string parsers for identifiers | [README](./packages/syntax/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/syntax)](https://www.npmjs.com/package/@atproto/syntax) | -| `@atproto/xrpc`: client-side HTTP API helpers | [README](./packages/xrpc/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/xrpc)](https://www.npmjs.com/package/@atproto/xrpc) | -| `@atproto/xrpc-server`: server-side HTTP API helpers | [README](./packages/xrpc-server/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/xrpc-server)](https://www.npmjs.com/package/@atproto/xrpc-server) | +| Package | Docs | NPMX | +| ----------------------------------------------------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | +| `@atproto/api`: client library | [README](./packages/api/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/api)](https://npmx.dev/package/@atproto/api) | +| `@atproto/common-web`: shared code and helpers which can run in web browsers | [README](./packages/common-web/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/common-web)](https://npmx.dev/package/@atproto/common-web) | +| `@atproto/common`: shared code and helpers which doesn't work in web browsers | [README](./packages/common/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/common)](https://npmx.dev/package/@atproto/common) | +| `@atproto/crypto`: cryptographic signing and key serialization | [README](./packages/crypto/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/crypto)](https://npmx.dev/package/@atproto/crypto) | +| `@atproto/identity`: DID and handle resolution | [README](./packages/identity/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/identity)](https://npmx.dev/package/@atproto/identity) | +| `@atproto/lex`: modern type-safe client library with codegen | [README](./packages/lex/lex/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/lex)](https://npmx.dev/package/@atproto/lex) | +| `@atproto/lexicon`: schema definition language | [README](./packages/lexicon/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/lexicon)](https://npmx.dev/package/@atproto/lexicon) | +| `@atproto/repo`: data storage structure, including MST | [README](./packages/repo/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/repo)](https://npmx.dev/package/@atproto/repo) | +| `@atproto/syntax`: string parsers for identifiers | [README](./packages/syntax/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/syntax)](https://npmx.dev/package/@atproto/syntax) | +| `@atproto/xrpc`: client-side HTTP API helpers | [README](./packages/xrpc/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/xrpc)](https://npmx.dev/package/@atproto/xrpc) | +| `@atproto/xrpc-server`: server-side HTTP API helpers | [README](./packages/xrpc-server/README.md) | [![NPM](https://img.shields.io/npm/v/@atproto/xrpc-server)](https://npmx.dev/package/@atproto/xrpc-server) | **TypeScript Services:** @@ -36,12 +37,12 @@ Go programming language source code is in [bluesky-social/indigo](https://github ## Developer Quickstart -We recommend [`nvm`](https://github.com/nvm-sh/nvm) for managing Node.js installs. This project requires Node.js version 18. `pnpm` is used to manage the workspace of multiple packages. You can install it with `npm install --global pnpm`. +We recommend [`nvm`](https://github.com/nvm-sh/nvm) for managing Node.js installs. This project requires Node.js version 22 or later. `pnpm` is used to manage the workspace of multiple packages. You can install it with `npm install --global pnpm`. There is a Makefile which can help with basic development tasks: ```shell -# use existing nvm to install node 18 and pnpm +# use existing nvm to install node 22 and pnpm make nvm-setup # pull dependencies and build all local packages diff --git a/jest.config.js b/jest.config.cjs similarity index 51% rename from jest.config.js rename to jest.config.cjs index d0126bea35b..be8cbbf78c1 100644 --- a/jest.config.js +++ b/jest.config.cjs @@ -1,4 +1,4 @@ /** @type {import('jest').Config} */ module.exports = { - projects: ['/packages/*/jest.config.js'], + projects: ['/packages/*/jest.config.cjs'], } diff --git a/jest.varint-shim.cjs b/jest.varint-shim.cjs new file mode 100644 index 00000000000..1f5bc89c758 --- /dev/null +++ b/jest.varint-shim.cjs @@ -0,0 +1,7 @@ +// Shim for varint that works around cjs-module-lexer not detecting +// comma-first style exports (which prevents Jest ESM interop from +// exposing named exports in SyntheticModule). +const _varint = require('./node_modules/.pnpm/varint@6.0.0/node_modules/varint/index.js') +exports.encode = _varint.encode +exports.decode = _varint.decode +exports.encodingLength = _varint.encodingLength diff --git a/lexicons/app/bsky/embed/external.json b/lexicons/app/bsky/embed/external.json index b9930dff2b0..7caf008cd4a 100644 --- a/lexicons/app/bsky/embed/external.json +++ b/lexicons/app/bsky/embed/external.json @@ -24,6 +24,14 @@ "type": "blob", "accept": ["image/*"], "maxSize": 1000000 + }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view." } } }, @@ -44,7 +52,97 @@ "uri": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "description": { "type": "string" }, - "thumb": { "type": "string", "format": "uri" } + "thumb": { "type": "string", "format": "uri" }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "When the external content was created, if available. Example: a publication date, for an article." + }, + "updatedAt": { + "type": "string", + "format": "datetime", + "description": "When the external content was updated, if available." + }, + "readingTime": { + "type": "integer", + "description": "Estimated reading time in minutes, if applicable and available." + }, + "labels": { + "type": "array", + "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } + }, + "source": { "type": "ref", "ref": "#viewExternalSource" }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (uri+cid) of the Atmosphere records that backed this view." + }, + "associatedProfiles": { + "type": "array", + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#profileViewBasic" + }, + "description": "Profiles of the owners of the Atmosphere records that backed this view." + } + } + }, + "viewExternalSource": { + "type": "object", + "description": "The source of an external embed, such as a standard.site publication.", + "required": ["uri", "title"], + "properties": { + "uri": { + "type": "string", + "format": "uri", + "description": "URI of the source, if available. Example: the https:// URL of a site.standard.publication record." + }, + "icon": { + "type": "string", + "format": "uri", + "description": "Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View." + }, + "title": { "type": "string" }, + "description": { "type": "string" }, + "theme": { + "type": "ref", + "ref": "#viewExternalSourceTheme" + } + } + }, + "viewExternalSourceTheme": { + "type": "object", + "description": "The theme colors of an external source, such as a site.standard.publication. These colors may be used when rendering an embed from that source.", + "properties": { + "backgroundRGB": { + "type": "ref", + "ref": "#colorRGB" + }, + "foregroundRGB": { + "type": "ref", + "ref": "#colorRGB" + }, + "accentRGB": { + "type": "ref", + "ref": "#colorRGB" + }, + "accentForegroundRGB": { + "type": "ref", + "ref": "#colorRGB" + } + } + }, + "colorRGB": { + "type": "object", + "description": "RGB color definition, inspired by site.standard.theme.color#rgb", + "required": ["r", "g", "b"], + "properties": { + "r": { "type": "integer", "minimum": 0, "maximum": 255 }, + "g": { "type": "integer", "minimum": 0, "maximum": 255 }, + "b": { "type": "integer", "minimum": 0, "maximum": 255 } } } } diff --git a/lexicons/app/bsky/embed/getEmbedExternalView.json b/lexicons/app/bsky/embed/getEmbedExternalView.json new file mode 100644 index 00000000000..421fd3dabe6 --- /dev/null +++ b/lexicons/app/bsky/embed/getEmbedExternalView.json @@ -0,0 +1,55 @@ +{ + "lexicon": 1, + "id": "app.bsky.embed.getEmbedExternalView", + "defs": { + "main": { + "type": "query", + "description": "Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs), the raw `associatedRecords`, and a hydrated `view`. The response is empty (`{}`) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.", + "parameters": { + "type": "params", + "required": ["url", "uris"], + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. May be used for validation in the future." + }, + "uris": { + "type": "array", + "description": "AT-URIs of any Atmosphere records that can be resolved and used to construct #externalView views. Example: a site.standard.document and optionally its associated site.standard.publication.", + "items": { "type": "string", "format": "at-uri" }, + "maxLength": 4 + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": { + "view": { + "type": "ref", + "ref": "app.bsky.embed.external#view", + "description": "Hydrated view of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required `viewExternal` fields. Omitted alongside the rest of the response when no records resolved or validation failed." + }, + "associatedRefs": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.repo.strongRef" + }, + "description": "StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs." + }, + "associatedRecords": { + "type": "array", + "items": { + "type": "unknown", + "description": "The raw record data of the Atmosphere records that backed this view. This is returned for convenience, to avoid the need for the client to separately fetch the record data for the associatedRefs. Example: the site.standard.document and site.standard.publication records that backed this view." + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/actor/defs.json b/lexicons/chat/bsky/actor/defs.json index c1756545bed..39532b6e8da 100644 --- a/lexicons/chat/bsky/actor/defs.json +++ b/lexicons/chat/bsky/actor/defs.json @@ -39,7 +39,11 @@ "kind": { "description": "Union field that has data specific to different kinds of convos.", "type": "union", - "refs": ["#directConvoMember", "#groupConvoMember"] + "refs": [ + "#directConvoMember", + "#groupConvoMember", + "#pastGroupConvoMember" + ] } } }, @@ -49,7 +53,7 @@ "properties": {} }, "groupConvoMember": { - "description": "[NOTE: This is under active development and should be considered unstable while this note is here].", + "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. A current group convo member.", "type": "object", "required": ["role"], "properties": { @@ -64,6 +68,12 @@ "ref": "#memberRole" } } + }, + "pastGroupConvoMember": { + "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. A past group convo member.", + "type": "object", + "required": [], + "properties": {} } } } diff --git a/lexicons/chat/bsky/actor/getStatus.json b/lexicons/chat/bsky/actor/getStatus.json new file mode 100644 index 00000000000..300aa98f320 --- /dev/null +++ b/lexicons/chat/bsky/actor/getStatus.json @@ -0,0 +1,31 @@ +{ + "lexicon": 1, + "id": "chat.bsky.actor.getStatus", + "defs": { + "main": { + "type": "query", + "description": "Get the authenticated viewer's chat status: whether their account is chat-disabled and whether their group-membership additions are restricted to accounts they follow.", + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["chatDisabled", "canCreateGroups", "groupMemberLimit"], + "properties": { + "chatDisabled": { + "type": "boolean", + "description": "True when the viewer's account is disabled and cannot actively participate in chat." + }, + "canCreateGroups": { + "type": "boolean", + "description": "Whether the viewer's account is allowed to create group chats. New accounts are restricted from creating groups." + }, + "groupMemberLimit": { + "type": "integer", + "description": "The maximum number of members allowed in a group conversation." + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/authFullChatClient.json b/lexicons/chat/bsky/authFullChatClient.json index 97867680b31..e190126fe20 100644 --- a/lexicons/chat/bsky/authFullChatClient.json +++ b/lexicons/chat/bsky/authFullChatClient.json @@ -17,6 +17,7 @@ "inheritAud": true, "lxm": [ "chat.bsky.actor.deleteAccount", + "chat.bsky.actor.getStatus", "chat.bsky.convo.acceptConvo", "chat.bsky.convo.addReaction", "chat.bsky.convo.deleteMessageForSelf", @@ -24,17 +25,35 @@ "chat.bsky.convo.getConvo", "chat.bsky.convo.getConvoAvailability", "chat.bsky.convo.getConvoForMembers", + "chat.bsky.convo.getConvoMembers", "chat.bsky.convo.getLog", "chat.bsky.convo.getMessages", "chat.bsky.convo.leaveConvo", + "chat.bsky.convo.listConvoRequests", "chat.bsky.convo.listConvos", + "chat.bsky.convo.lockConvo", "chat.bsky.convo.muteConvo", "chat.bsky.convo.removeReaction", "chat.bsky.convo.sendMessage", "chat.bsky.convo.sendMessageBatch", + "chat.bsky.convo.unlockConvo", "chat.bsky.convo.unmuteConvo", "chat.bsky.convo.updateAllRead", - "chat.bsky.convo.updateRead" + "chat.bsky.convo.updateRead", + "chat.bsky.group.addMembers", + "chat.bsky.group.approveJoinRequest", + "chat.bsky.group.createGroup", + "chat.bsky.group.createJoinLink", + "chat.bsky.group.disableJoinLink", + "chat.bsky.group.editGroup", + "chat.bsky.group.editJoinLink", + "chat.bsky.group.enableJoinLink", + "chat.bsky.group.getJoinLinkPreviews", + "chat.bsky.group.listJoinRequests", + "chat.bsky.group.listMutualGroups", + "chat.bsky.group.rejectJoinRequest", + "chat.bsky.group.removeMembers", + "chat.bsky.group.requestJoin" ] }, { diff --git a/lexicons/chat/bsky/convo/defs.json b/lexicons/chat/bsky/convo/defs.json index cbbf30ae020..f78a1fab50f 100644 --- a/lexicons/chat/bsky/convo/defs.json +++ b/lexicons/chat/bsky/convo/defs.json @@ -14,6 +14,14 @@ "type": "string", "knownValues": ["request", "accepted"] }, + "convoRef": { + "type": "object", + "required": ["did", "convoId"], + "properties": { + "did": { "type": "string", "format": "did" }, + "convoId": { "type": "string" } + } + }, "messageRef": { "type": "object", "required": ["did", "messageId", "convoId"], @@ -72,6 +80,13 @@ "sentAt": { "type": "string", "format": "datetime" } } }, + "systemMessageReferredUser": { + "type": "object", + "required": ["did"], + "properties": { + "did": { "type": "string", "format": "did" } + } + }, "systemMessageView": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here].", "type": "object", @@ -107,7 +122,7 @@ "member": { "description": "Current view of the member who was added.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" }, "role": { "description": "Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.", @@ -116,7 +131,7 @@ }, "addedBy": { "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -128,11 +143,11 @@ "member": { "description": "Current view of the member who was removed.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" }, "removedBy": { "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -144,7 +159,7 @@ "member": { "description": "Current view of the member who joined.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" }, "role": { "description": "Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.", @@ -154,7 +169,7 @@ "approvedBy": { "description": "If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -166,7 +181,7 @@ "member": { "description": "Current view of the member who left the group.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -178,7 +193,7 @@ "lockedBy": { "description": "Current view of the member who locked the group.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -190,7 +205,7 @@ "unlockedBy": { "description": "Current view of the member who unlocked the group.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -202,7 +217,7 @@ "lockedBy": { "description": "Current view of the member who locked the group.", "type": "ref", - "ref": "chat.bsky.actor.defs#profileViewBasic" + "ref": "#systemMessageReferredUser" } } }, @@ -288,7 +303,7 @@ "id": { "type": "string" }, "rev": { "type": "string" }, "members": { - "description": "Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who invited the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.", + "description": "Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.", "type": "array", "items": { "type": "ref", @@ -325,7 +340,13 @@ "groupConvo": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here].", "type": "object", - "required": ["name", "lockStatus", "memberCount"], + "required": [ + "name", + "lockStatus", + "memberCount", + "memberLimit", + "createdAt" + ], "properties": { "name": { "type": "string", @@ -337,10 +358,22 @@ "type": "integer", "description": "The total number of members in the group conversation." }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "joinRequestCount": { + "type": "integer", + "description": "The total number of pending join requests for the group conversation. Only present for the owner. Capped at 21." + }, "joinLink": { "type": "ref", "ref": "chat.bsky.group.defs#joinLinkView" }, + "memberLimit": { + "type": "integer", + "description": "The maximum number of members allowed in the group conversation." + }, "lockStatus": { "description": "The lock status of the conversation.", "type": "ref", @@ -403,6 +436,14 @@ "message": { "type": "union", "refs": ["#messageView", "#deletedMessageView"] + }, + "relatedProfiles": { + "description": "Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, @@ -443,7 +484,15 @@ "type": "union", "refs": ["#messageView", "#deletedMessageView"] }, - "reaction": { "type": "ref", "ref": "#reactionView" } + "reaction": { "type": "ref", "ref": "#reactionView" }, + "relatedProfiles": { + "description": "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } + } } }, "logRemoveReaction": { @@ -457,7 +506,15 @@ "type": "union", "refs": ["#messageView", "#deletedMessageView"] }, - "reaction": { "type": "ref", "ref": "#reactionView" } + "reaction": { "type": "ref", "ref": "#reactionView" }, + "relatedProfiles": { + "description": "Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } + } } }, "logReadConvo": { @@ -476,7 +533,7 @@ "logAddMember": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -484,13 +541,21 @@ "description": "A system message with data of type #systemMessageDataAddMember", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logRemoveMember": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -498,13 +563,21 @@ "description": "A system message with data of type #systemMessageDataRemoveMember", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logMemberJoin": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -512,13 +585,21 @@ "description": "A system message with data of type #systemMessageDataMemberJoin", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logMemberLeave": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -526,13 +607,21 @@ "description": "A system message with data of type #systemMessageDataMemberLeave", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logLockConvo": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -540,13 +629,21 @@ "description": "A system message with data of type #systemMessageDataLockConvo", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logUnlockConvo": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -554,13 +651,21 @@ "description": "A system message with data of type #systemMessageDataUnlockConvo", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, "logLockConvoPermanently": { "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.", "type": "object", - "required": ["rev", "convoId", "message"], + "required": ["rev", "convoId", "message", "relatedProfiles"], "properties": { "rev": { "type": "string" }, "convoId": { "type": "string" }, @@ -568,6 +673,14 @@ "description": "A system message with data of type #systemMessageDataLockConvoPermanently", "type": "ref", "ref": "#systemMessageView" + }, + "relatedProfiles": { + "description": "Profiles referred in the system message.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } }, diff --git a/lexicons/chat/bsky/convo/getMessages.json b/lexicons/chat/bsky/convo/getMessages.json index 67be547a82c..dc5d2d78d20 100644 --- a/lexicons/chat/bsky/convo/getMessages.json +++ b/lexicons/chat/bsky/convo/getMessages.json @@ -37,6 +37,14 @@ "chat.bsky.convo.defs#systemMessageView" ] } + }, + "relatedProfiles": { + "description": "Set of all members who authored or reacted to the returned messages. Members referred to by system messages are also included.", + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + } } } } diff --git a/lexicons/chat/bsky/convo/listConvoRequests.json b/lexicons/chat/bsky/convo/listConvoRequests.json index f289a439c7b..f6f537f39ed 100644 --- a/lexicons/chat/bsky/convo/listConvoRequests.json +++ b/lexicons/chat/bsky/convo/listConvoRequests.json @@ -4,7 +4,7 @@ "defs": { "main": { "type": "query", - "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests are returned as joinRequestView.", + "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests made by the user are returned as joinRequestConvoView.", "parameters": { "type": "params", "properties": { @@ -30,7 +30,7 @@ "type": "union", "refs": [ "chat.bsky.convo.defs#convoView", - "chat.bsky.group.defs#joinRequestView" + "chat.bsky.group.defs#joinRequestConvoView" ] } } diff --git a/lexicons/chat/bsky/convo/listConvos.json b/lexicons/chat/bsky/convo/listConvos.json index 098b66aac15..68deb2d6f07 100644 --- a/lexicons/chat/bsky/convo/listConvos.json +++ b/lexicons/chat/bsky/convo/listConvos.json @@ -28,6 +28,11 @@ "type": "string", "description": "Filter by conversation kind.", "knownValues": ["direct", "group"] + }, + "lockStatus": { + "type": "string", + "description": "Filter by conversation lock status. Values follow chat.bsky.convo.defs#convoLockStatus.", + "knownValues": ["unlocked", "locked", "locked-permanently"] } } }, diff --git a/lexicons/chat/bsky/group/addMembers.json b/lexicons/chat/bsky/group/addMembers.json index 3cef6ffda0f..155703543a5 100644 --- a/lexicons/chat/bsky/group/addMembers.json +++ b/lexicons/chat/bsky/group/addMembers.json @@ -8,13 +8,13 @@ "errors": [ { "name": "AccountSuspended" }, { "name": "BlockedActor" }, - { "name": "GroupInvitesDisabled" }, { "name": "ConvoLocked" }, { "name": "InsufficientRole" }, { "name": "InvalidConvo" }, { "name": "MemberLimitReached" }, { "name": "NotFollowedBySender" }, - { "name": "RecipientNotFound" } + { "name": "RecipientNotFound" }, + { "name": "UserForbidsGroups" } ], "input": { "encoding": "application/json", diff --git a/lexicons/chat/bsky/group/createGroup.json b/lexicons/chat/bsky/group/createGroup.json index 79feb8d4e26..bd5d2e8bdfd 100644 --- a/lexicons/chat/bsky/group/createGroup.json +++ b/lexicons/chat/bsky/group/createGroup.json @@ -8,9 +8,10 @@ "errors": [ { "name": "AccountSuspended" }, { "name": "BlockedActor" }, - { "name": "GroupInvitesDisabled" }, + { "name": "NewAccountCannotCreateGroup" }, { "name": "NotFollowedBySender" }, - { "name": "RecipientNotFound" } + { "name": "RecipientNotFound" }, + { "name": "UserForbidsGroups" } ], "input": { "encoding": "application/json", diff --git a/lexicons/chat/bsky/group/defs.json b/lexicons/chat/bsky/group/defs.json index 91aa9cb4dc5..30f442a77ea 100644 --- a/lexicons/chat/bsky/group/defs.json +++ b/lexicons/chat/bsky/group/defs.json @@ -31,17 +31,45 @@ "createdAt": { "type": "string", "format": "datetime" } } }, - "groupPublicView": { + "joinLinkPreviewView": { "type": "object", - "required": ["name", "owner", "memberCount", "requireApproval"], + "required": [ + "code", + "name", + "owner", + "memberCount", + "memberLimit", + "requireApproval", + "joinRule", + "enabledStatus" + ], "properties": { + "code": { "type": "string" }, "name": { "type": "string" }, "owner": { "type": "ref", "ref": "chat.bsky.actor.defs#profileViewBasic" }, "memberCount": { "type": "integer" }, - "requireApproval": { "type": "boolean" } + "memberLimit": { "type": "integer" }, + "requireApproval": { "type": "boolean" }, + "joinRule": { "type": "ref", "ref": "#joinRule" }, + "enabledStatus": { "type": "ref", "ref": "#linkEnabledStatus" }, + "convo": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView", + "description": "Present only if the request is authenticated and the user is a member of the group." + }, + "viewer": { + "type": "ref", + "ref": "#joinLinkViewerState" + } + } + }, + "joinLinkViewerState": { + "type": "object", + "properties": { + "requestedAt": { "type": "string", "format": "datetime" } } }, "joinRequestView": { @@ -55,6 +83,29 @@ }, "requestedAt": { "type": "string", "format": "datetime" } } + }, + "joinRequestConvoView": { + "description": "A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count).", + "type": "object", + "required": [ + "convoId", + "name", + "owner", + "memberCount", + "memberLimit", + "requestedAt" + ], + "properties": { + "convoId": { "type": "string" }, + "name": { "type": "string" }, + "owner": { + "type": "ref", + "ref": "chat.bsky.actor.defs#profileViewBasic" + }, + "memberCount": { "type": "integer" }, + "memberLimit": { "type": "integer" }, + "requestedAt": { "type": "string", "format": "datetime" } + } } } } diff --git a/lexicons/chat/bsky/group/getGroupPublicInfo.json b/lexicons/chat/bsky/group/getGroupPublicInfo.json deleted file mode 100644 index 85b6563ccff..00000000000 --- a/lexicons/chat/bsky/group/getGroupPublicInfo.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "lexicon": 1, - "id": "chat.bsky.group.getGroupPublicInfo", - "defs": { - "main": { - "type": "query", - "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Get public information about a group from an join link.", - "errors": [{ "name": "InvalidCode" }], - "parameters": { - "type": "params", - "required": ["code"], - "properties": { - "code": { "type": "string" } - } - }, - "output": { - "encoding": "application/json", - "schema": { - "type": "object", - "required": ["group"], - "properties": { - "group": { - "type": "ref", - "ref": "chat.bsky.group.defs#groupPublicView" - } - } - } - } - } - } -} diff --git a/lexicons/chat/bsky/group/getJoinLinkPreviews.json b/lexicons/chat/bsky/group/getJoinLinkPreviews.json new file mode 100644 index 00000000000..98f13090c86 --- /dev/null +++ b/lexicons/chat/bsky/group/getJoinLinkPreviews.json @@ -0,0 +1,38 @@ +{ + "lexicon": 1, + "id": "chat.bsky.group.getJoinLinkPreviews", + "defs": { + "main": { + "type": "query", + "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Get public information about groups from join links. Invalid or disabled codes are silently omitted from results.", + "parameters": { + "type": "params", + "required": ["codes"], + "properties": { + "codes": { + "type": "array", + "minLength": 1, + "maxLength": 50, + "items": { "type": "string" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["joinLinkPreviews"], + "properties": { + "joinLinkPreviews": { + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.group.defs#joinLinkPreviewView" + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/group/listMutualGroups.json b/lexicons/chat/bsky/group/listMutualGroups.json new file mode 100644 index 00000000000..3cd8c38c859 --- /dev/null +++ b/lexicons/chat/bsky/group/listMutualGroups.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "chat.bsky.group.listMutualGroups", + "defs": { + "main": { + "type": "query", + "description": "[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of group conversations that both the requester and the specified actor are members of.", + "parameters": { + "type": "params", + "required": ["subject"], + "properties": { + "subject": { + "type": "string", + "format": "did" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { "type": "string" } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["convos"], + "properties": { + "cursor": { "type": "string" }, + "convos": { + "type": "array", + "items": { + "type": "ref", + "ref": "chat.bsky.convo.defs#convoView" + } + } + } + } + } + } + } +} diff --git a/lexicons/chat/bsky/moderation/getMessageContext.json b/lexicons/chat/bsky/moderation/getMessageContext.json index 93b9d9a0181..b267dcd251a 100644 --- a/lexicons/chat/bsky/moderation/getMessageContext.json +++ b/lexicons/chat/bsky/moderation/getMessageContext.json @@ -13,8 +13,23 @@ "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 } + "before": { + "type": "integer", + "default": 5, + "description": "Number of user messages before the target to include. System messages between the earliest returned user message and the target are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages before the target, up to `maxInterleavedSystemMessages` system messages immediately preceding the target are returned instead." + }, + "after": { + "type": "integer", + "default": 5, + "description": "Number of user messages after the target to include. System messages between the target and the latest returned user message are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages after the target, up to `maxInterleavedSystemMessages` system messages immediately following the target are returned instead." + }, + "maxInterleavedSystemMessages": { + "type": "integer", + "default": 10, + "minimum": 0, + "maximum": 1000, + "description": "Maximum number of system messages to include per gap between consecutive returned messages (and per side when there are no user messages on that side). Within a gap, the system messages closest to the earlier message are kept." + } } }, "output": { @@ -29,7 +44,6 @@ "type": "union", "refs": [ "chat.bsky.convo.defs#messageView", - "chat.bsky.convo.defs#deletedMessageView", "chat.bsky.convo.defs#systemMessageView" ] } diff --git a/lexicons/chat/bsky/moderation/subscribeModEvents.json b/lexicons/chat/bsky/moderation/subscribeModEvents.json index c911498458d..6e71843807c 100644 --- a/lexicons/chat/bsky/moderation/subscribeModEvents.json +++ b/lexicons/chat/bsky/moderation/subscribeModEvents.json @@ -17,7 +17,18 @@ "message": { "schema": { "type": "union", - "refs": ["#eventConvoFirstMessage"] + "refs": [ + "#eventConvoFirstMessage", + "#eventGroupChatCreated", + "#eventGroupChatMemberAdded", + "#eventGroupChatMemberJoined", + "#eventGroupChatJoinRequest", + "#eventGroupChatJoinRequestApproved", + "#eventGroupChatJoinRequestRejected", + "#eventChatAccepted", + "#eventGroupChatMemberLeft", + "#eventGroupChatUpdated" + ] } }, "errors": [ @@ -30,6 +41,7 @@ }, "eventConvoFirstMessage": { "type": "object", + "description": "Fired when the first message was sent on a convo.", "required": ["createdAt", "rev", "convoId", "user", "recipients"], "properties": { "convoId": { "type": "string" }, @@ -47,6 +59,482 @@ "format": "did" } } + }, + "eventGroupChatCreated": { + "type": "object", + "description": "Fire when a group chat is created.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "initialMemberDids", + "ownerDid", + "rev" + ], + "properties": { + "actorDid": { + "description": "The DID of the actor performing the action. For this event, same as ownerDid.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { + "description": "The name set at creation time.", + "type": "string" + }, + "initialMemberDids": { + "description": "DIDs of everyone added at creation time.", + "type": "array", + "items": { "type": "string", "format": "did" } + }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" } + } + }, + "eventGroupChatMemberAdded": { + "type": "object", + "description": "Fired when a member is added to a group chat. Note that members are added in the 'request' state.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "ownerDid", + "requestMembersCount", + "rev", + "subjectDid", + "subjectFollowsOwner" + ], + "properties": { + "actorDid": { + "description": "The DID of the actor performing the action. For this event, same as ownerDid.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "requestMembersCount": { + "description": "The number of members who have not yet accepted the convo.", + "type": "integer" + }, + "rev": { "type": "string" }, + "subjectDid": { + "description": "The DID of the member who was added.", + "type": "string", + "format": "did" + }, + "subjectFollowsOwner": { + "description": "Whether the added member follows the group owner.", + "type": "boolean" + } + } + }, + "eventGroupChatMemberJoined": { + "type": "object", + "description": "Fired when a member joins a group chat via an join link that does not require approval.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "joinLinkCode", + "ownerDid", + "rev", + "subjectFollowsOwner" + ], + "properties": { + "actorDid": { + "description": "The DID of the person joining.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "joinLinkCode": { + "description": "The code of the join link used to join.", + "type": "string" + }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "subjectFollowsOwner": { + "description": "Whether the joining member follows the group owner.", + "type": "boolean" + } + } + }, + "eventGroupChatJoinRequest": { + "type": "object", + "description": "Fired when a user requests to join a group chat via an join link that requires approval.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "joinLinkCode", + "ownerDid", + "rev", + "subjectFollowsOwner" + ], + "properties": { + "actorDid": { + "description": "The DID of the person requesting to join.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "joinLinkCode": { + "description": "The code of the join link used to request joining.", + "type": "string" + }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "subjectFollowsOwner": { + "description": "Whether the requesting member follows the group owner.", + "type": "boolean" + } + } + }, + "eventGroupChatJoinRequestApproved": { + "type": "object", + "description": "Fired when a join request is approved by the group owner.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "ownerDid", + "rev", + "subjectDid" + ], + "properties": { + "actorDid": { + "description": "The DID of the owner approving the request.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "subjectDid": { + "description": "The DID of the member whose request was approved.", + "type": "string", + "format": "did" + } + } + }, + "eventGroupChatJoinRequestRejected": { + "type": "object", + "description": "Fired when a join request is rejected by the group owner.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "ownerDid", + "rev", + "subjectDid" + ], + "properties": { + "actorDid": { + "description": "The DID of the owner rejecting the request.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "subjectDid": { + "description": "The DID of the member whose request was rejected.", + "type": "string", + "format": "did" + } + } + }, + "eventChatAccepted": { + "type": "object", + "description": "Fired when a user accepts a chat convo, either explicitly or by sending a message.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "method", + "rev" + ], + "properties": { + "actorDid": { + "description": "The DID of the person accepting the convo.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the convo was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event. Only present for group convos.", + "type": "integer" + }, + "groupName": { + "description": "The name of the group chat. Only present for group convos.", + "type": "string" + }, + "method": { + "description": "How the convo was accepted.", + "type": "string", + "knownValues": ["explicit", "message"] + }, + "ownerDid": { + "description": "The DID of the group chat owner. Only present for group convos.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" } + } + }, + "eventGroupChatMemberLeft": { + "type": "object", + "description": "Fired when a member leaves or is removed from a group chat.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "leaveMethod", + "ownerDid", + "rev", + "subjectDid" + ], + "properties": { + "actorDid": { + "description": "The DID of the actor. For voluntary: the person leaving. For kicked: the owner.", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { "type": "string" }, + "leaveMethod": { + "description": "How the member left.", + "type": "string", + "knownValues": ["voluntary", "kicked"] + }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "subjectDid": { + "description": "The DID of the member who left or was removed.", + "type": "string", + "format": "did" + } + } + }, + "eventGroupChatUpdated": { + "type": "object", + "description": "Fired when a group chat's metadata or status changes.", + "required": [ + "actorDid", + "convoCreatedAt", + "convoId", + "createdAt", + "groupMemberCount", + "groupName", + "ownerDid", + "rev", + "updateType" + ], + "properties": { + "actorDid": { + "description": "The DID of the actor performing the action (the owner).", + "type": "string", + "format": "did" + }, + "convoCreatedAt": { + "description": "When the group was originally created.", + "type": "string", + "format": "datetime" + }, + "convoId": { "type": "string" }, + "createdAt": { "type": "string", "format": "datetime" }, + "groupMemberCount": { + "description": "Current member count at the time of the event.", + "type": "integer" + }, + "groupName": { + "description": "Current group name.", + "type": "string" + }, + "joinLinkCode": { + "description": "The code of the join link. Only present when updateType is join-link-related.", + "type": "string" + }, + "joinLinkFollowersOnly": { + "description": "Whether the join link is restricted to followers of the owner. Only present when updateType is join-link-related.", + "type": "boolean" + }, + "joinLinkRequiresApproval": { + "description": "Whether the join link requires owner approval to join. Only present when updateType is join-link-related.", + "type": "boolean" + }, + "lockReason": { + "description": "Why the group was locked. Only present when updateType is 'locked'.", + "type": "string", + "knownValues": [ + "owner_action", + "owner_left", + "owner_deactivated", + "owner_deleted", + "owner_suspended", + "owner_taken_down", + "label_applied" + ] + }, + "newName": { + "description": "The new group name. Only present when updateType is 'name_changed'.", + "type": "string" + }, + "oldName": { + "description": "The previous group name. Only present when updateType is 'name_changed'.", + "type": "string" + }, + "ownerDid": { + "description": "The DID of the group chat owner.", + "type": "string", + "format": "did" + }, + "rev": { "type": "string" }, + "updateType": { + "description": "What changed.", + "type": "string", + "knownValues": [ + "name_changed", + "locked", + "locked_permanently", + "unlocked", + "join_link_created", + "join_link_disabled", + "join_link_settings_changed" + ] + } + } } } } diff --git a/lexicons/com/atproto/server/getServiceAuth.json b/lexicons/com/atproto/server/getServiceAuth.json index 37c150d79e3..e0c694767ac 100644 --- a/lexicons/com/atproto/server/getServiceAuth.json +++ b/lexicons/com/atproto/server/getServiceAuth.json @@ -11,8 +11,8 @@ "properties": { "aud": { "type": "string", - "format": "did", - "description": "The DID of the service that the token will be used to authenticate with" + "maxLength": 2048, + "description": "The DID or `did#serviceId` reference of the service that the token will be used to authenticate with." }, "exp": { "type": "integer", diff --git a/lexicons/site/standard/document.json b/lexicons/site/standard/document.json new file mode 100644 index 00000000000..c2231e9dbc3 --- /dev/null +++ b/lexicons/site/standard/document.json @@ -0,0 +1,115 @@ +{ + "defs": { + "contributor": { + "properties": { + "did": { + "format": "did", + "type": "string" + }, + "displayName": { + "maxGraphemes": 100, + "maxLength": 1000, + "type": "string" + }, + "role": { + "maxGraphemes": 100, + "maxLength": 1000, + "type": "string" + } + }, + "required": ["did"], + "type": "object" + }, + "main": { + "description": "A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently.", + "key": "tid", + "record": { + "properties": { + "bskyPostRef": { + "description": "Strong reference to a Bluesky post. Useful to keep track of comments off-platform.", + "ref": "com.atproto.repo.strongRef", + "type": "ref" + }, + "content": { + "closed": false, + "description": "Open union used to define the record's content. Each entry must specify a $type and may be extended with other lexicons to support additional content formats.", + "refs": [], + "type": "union" + }, + "contributors": { + "items": { + "ref": "#contributor", + "type": "ref" + }, + "type": "array" + }, + "coverImage": { + "accept": ["image/*"], + "description": "Image to used for thumbnail or cover image. Less than 1MB is size.", + "maxSize": 1000000, + "type": "blob" + }, + "description": { + "description": "A brief description or excerpt from the document.", + "maxGraphemes": 3000, + "maxLength": 30000, + "type": "string" + }, + "labels": { + "description": "Self-label values for this post. Effectively content warnings.", + "refs": ["com.atproto.label.defs#selfLabels"], + "type": "union" + }, + "links": { + "description": "Array of values describing relationships between this document and external resources", + "refs": [], + "type": "union" + }, + "path": { + "description": "Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash.", + "type": "string" + }, + "publishedAt": { + "description": "Timestamp of the documents publish time.", + "format": "datetime", + "type": "string" + }, + "site": { + "description": "Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes.", + "format": "uri", + "type": "string" + }, + "tags": { + "description": "Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags.", + "items": { + "maxGraphemes": 128, + "maxLength": 1280, + "type": "string" + }, + "type": "array" + }, + "textContent": { + "description": "Plaintext representation of the documents contents. Should not contain markdown or other formatting.", + "type": "string" + }, + "title": { + "description": "Title of the document.", + "maxGraphemes": 500, + "maxLength": 5000, + "type": "string" + }, + "updatedAt": { + "description": "Timestamp of the documents last edit.", + "format": "datetime", + "type": "string" + } + }, + "required": ["site", "title", "publishedAt"], + "type": "object" + }, + "type": "record" + } + }, + "id": "site.standard.document", + "lexicon": 1 +} diff --git a/lexicons/site/standard/graph/recommend.json b/lexicons/site/standard/graph/recommend.json new file mode 100644 index 00000000000..51477b6cdf0 --- /dev/null +++ b/lexicons/site/standard/graph/recommend.json @@ -0,0 +1,26 @@ +{ + "defs": { + "main": { + "description": "Record declaring a recommendation of a document.", + "key": "tid", + "record": { + "properties": { + "createdAt": { + "format": "datetime", + "type": "string" + }, + "document": { + "description": "AT-URI reference to the document record being recommended (ex: at://did:plc:abc123/site.standard.document/xyz789).", + "format": "at-uri", + "type": "string" + } + }, + "required": ["document", "createdAt"], + "type": "object" + }, + "type": "record" + } + }, + "id": "site.standard.graph.recommend", + "lexicon": 1 +} diff --git a/lexicons/site/standard/graph/subscription.json b/lexicons/site/standard/graph/subscription.json new file mode 100644 index 00000000000..e590b2d607a --- /dev/null +++ b/lexicons/site/standard/graph/subscription.json @@ -0,0 +1,26 @@ +{ + "defs": { + "main": { + "description": "Record declaring a subscription to a publication.", + "key": "tid", + "record": { + "properties": { + "createdAt": { + "format": "datetime", + "type": "string" + }, + "publication": { + "description": "AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789).", + "format": "at-uri", + "type": "string" + } + }, + "required": ["publication"], + "type": "object" + }, + "type": "record" + } + }, + "id": "site.standard.graph.subscription", + "lexicon": 1 +} diff --git a/lexicons/site/standard/publication.json b/lexicons/site/standard/publication.json new file mode 100644 index 00000000000..249c9f1f45d --- /dev/null +++ b/lexicons/site/standard/publication.json @@ -0,0 +1,65 @@ +{ + "defs": { + "main": { + "description": "A publication record representing a blog, website, or content platform. Publications serve as containers for documents and define the overall branding and settings.", + "key": "tid", + "record": { + "properties": { + "basicTheme": { + "description": "Simplified publication theme for tools and apps to utilize when displaying content.", + "ref": "site.standard.theme.basic", + "type": "ref" + }, + "description": { + "description": "Brief description of the publication.", + "maxGraphemes": 3000, + "maxLength": 30000, + "type": "string" + }, + "icon": { + "accept": ["image/*"], + "description": "Square image to identify the publication. Should be at least 256x256.", + "maxSize": 1000000, + "type": "blob" + }, + "labels": { + "description": "Self-label values for this publication. Effectively content warnings.", + "refs": ["com.atproto.label.defs#selfLabels"], + "type": "union" + }, + "name": { + "description": "Name of the publication.", + "maxGraphemes": 500, + "maxLength": 5000, + "type": "string" + }, + "preferences": { + "description": "Object containing platform specific preferences (with a few shared properties).", + "ref": "#preferences", + "type": "ref" + }, + "url": { + "description": "Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path.", + "format": "uri", + "type": "string" + } + }, + "required": ["url", "name"], + "type": "object" + }, + "type": "record" + }, + "preferences": { + "properties": { + "showInDiscover": { + "default": true, + "description": "Boolean which decides whether the publication should appear in discovery feeds.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "id": "site.standard.publication", + "lexicon": 1 +} diff --git a/lexicons/site/standard/theme/basic.json b/lexicons/site/standard/theme/basic.json new file mode 100644 index 00000000000..37b3f00255a --- /dev/null +++ b/lexicons/site/standard/theme/basic.json @@ -0,0 +1,37 @@ +{ + "defs": { + "main": { + "description": "A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications.", + "key": "tid", + "record": { + "properties": { + "accent": { + "description": "Color used for links and button backgrounds.", + "refs": ["site.standard.theme.color#rgb"], + "type": "union" + }, + "accentForeground": { + "description": "Color used for button text.", + "refs": ["site.standard.theme.color#rgb"], + "type": "union" + }, + "background": { + "description": "Color used for content background.", + "refs": ["site.standard.theme.color#rgb"], + "type": "union" + }, + "foreground": { + "description": "Color used for content text.", + "refs": ["site.standard.theme.color#rgb"], + "type": "union" + } + }, + "required": ["background", "foreground", "accent", "accentForeground"], + "type": "object" + }, + "type": "record" + } + }, + "id": "site.standard.theme.basic", + "lexicon": 1 +} diff --git a/lexicons/site/standard/theme/color.json b/lexicons/site/standard/theme/color.json new file mode 100644 index 00000000000..a4047de82e6 --- /dev/null +++ b/lexicons/site/standard/theme/color.json @@ -0,0 +1,53 @@ +{ + "defs": { + "rgb": { + "properties": { + "b": { + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "g": { + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "r": { + "maximum": 255, + "minimum": 0, + "type": "integer" + } + }, + "required": ["r", "g", "b"], + "type": "object" + }, + "rgba": { + "properties": { + "a": { + "maximum": 100, + "minimum": 0, + "type": "integer" + }, + "b": { + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "g": { + "maximum": 255, + "minimum": 0, + "type": "integer" + }, + "r": { + "maximum": 255, + "minimum": 0, + "type": "integer" + } + }, + "required": ["r", "g", "b", "a"], + "type": "object" + } + }, + "id": "site.standard.theme.color", + "lexicon": 1 +} diff --git a/lexicons/tools/ozone/moderation/defs.json b/lexicons/tools/ozone/moderation/defs.json index 0ed8f27d736..80d7e5c7716 100644 --- a/lexicons/tools/ozone/moderation/defs.json +++ b/lexicons/tools/ozone/moderation/defs.json @@ -739,6 +739,10 @@ "comment": { "type": "string", "description": "Additional comment about added/removed tags." + }, + "durationInHours": { + "type": "integer", + "description": "Indicates how long the tags being added should remain before automatically being removed. Only applies to tags being added." } } }, diff --git a/lexicons/tools/ozone/moderation/emitEvent.json b/lexicons/tools/ozone/moderation/emitEvent.json index 256ef164242..968946acc50 100644 --- a/lexicons/tools/ozone/moderation/emitEvent.json +++ b/lexicons/tools/ozone/moderation/emitEvent.json @@ -66,6 +66,11 @@ "externalId": { "type": "string", "description": "An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject." + }, + "reportAction": { + "type": "ref", + "ref": "#reportAction", + "description": "Optional report-level targeting. If provided, this event will be linked to specific reports and reporters may be notified." } } } @@ -86,6 +91,34 @@ "description": "An event with the same external ID already exists for the subject." } ] + }, + "reportAction": { + "type": "object", + "description": "Target specific reports when emitting a moderation event", + "properties": { + "ids": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Target specific report IDs" + }, + "types": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Target reports matching these report types on the subject (fully qualified NSIDs)" + }, + "all": { + "type": "boolean", + "description": "Target ALL reports on the subject" + }, + "note": { + "type": "string", + "description": "Note to send to reporter(s) when actioning their report" + } + } } } } diff --git a/lexicons/tools/ozone/queue/assignModerator.json b/lexicons/tools/ozone/queue/assignModerator.json new file mode 100644 index 00000000000..e38c8afcfdc --- /dev/null +++ b/lexicons/tools/ozone/queue/assignModerator.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.assignModerator", + "defs": { + "main": { + "type": "procedure", + "description": "Assign a user to a queue.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queueId", "did"], + "properties": { + "queueId": { + "type": "integer", + "description": "The ID of the queue to assign the user to." + }, + "did": { + "type": "string", + "description": "DID to be assigned." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.queue.defs#assignmentView" + } + }, + "errors": [ + { + "name": "InvalidAssignment", + "description": "The specified queue does not exist or is not enabled." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/queue/createQueue.json b/lexicons/tools/ozone/queue/createQueue.json new file mode 100644 index 00000000000..a7a42a23dd4 --- /dev/null +++ b/lexicons/tools/ozone/queue/createQueue.json @@ -0,0 +1,69 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.createQueue", + "defs": { + "main": { + "type": "procedure", + "description": "Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["name", "subjectTypes", "reportTypes"], + "properties": { + "name": { + "type": "string", + "description": "Display name for the queue (must be unique)" + }, + "subjectTypes": { + "type": "array", + "minLength": 1, + "items": { + "type": "string", + "knownValues": ["account", "record", "message"] + }, + "description": "Subject types this queue accepts" + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "Collection name for record subjects. Required if subjectTypes includes 'record'." + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + }, + "minLength": 1, + "maxLength": 25, + "description": "Report reason types (fully qualified NSIDs)" + }, + "description": { + "type": "string", + "description": "Optional description of the queue" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queue"], + "properties": { + "queue": { + "type": "ref", + "ref": "tools.ozone.queue.defs#queueView" + } + } + } + }, + "errors": [ + { + "name": "ConflictingQueue", + "description": "The queue configuration conflicts with an existing queue" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/queue/defs.json b/lexicons/tools/ozone/queue/defs.json new file mode 100644 index 00000000000..81890d80abb --- /dev/null +++ b/lexicons/tools/ozone/queue/defs.json @@ -0,0 +1,148 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.defs", + "defs": { + "queueView": { + "type": "object", + "required": [ + "id", + "name", + "subjectTypes", + "reportTypes", + "createdBy", + "createdAt", + "updatedAt", + "enabled", + "stats" + ], + "properties": { + "id": { + "type": "integer", + "description": "Queue ID" + }, + "name": { + "type": "string", + "description": "Display name of the queue" + }, + "subjectTypes": { + "type": "array", + "minLength": 1, + "items": { + "type": "string", + "knownValues": ["account", "record", "message"] + }, + "description": "Subject types this queue accepts." + }, + "collection": { + "type": "string", + "format": "nsid", + "description": "Collection name for record subjects (e.g., 'app.bsky.feed.post')" + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + }, + "minLength": 1, + "description": "Report reason types this queue accepts (fully qualified NSIDs)" + }, + "description": { + "type": "string", + "description": "Optional description of the queue" + }, + "createdBy": { + "type": "string", + "format": "did", + "description": "DID of moderator who created this queue" + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "updatedAt": { + "type": "string", + "format": "datetime" + }, + "enabled": { + "type": "boolean", + "description": "Whether this queue is currently active" + }, + "deletedAt": { + "type": "string", + "format": "datetime", + "description": "When the queue was deleted, if applicable" + }, + "stats": { + "type": "ref", + "ref": "#queueStats", + "description": "Statistics about this queue" + } + } + }, + "queueStats": { + "type": "object", + "required": [], + "properties": { + "pendingCount": { + "type": "integer", + "description": "Number of reports in 'open' status" + }, + "actionedCount": { + "type": "integer", + "description": "Number of reports in 'closed' status" + }, + "escalatedCount": { + "type": "integer", + "description": "Number of reports in 'escalated' status" + }, + "inboundCount": { + "type": "integer", + "description": "Reports received in this queue in the last 24 hours." + }, + "actionRate": { + "type": "integer", + "description": "Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. Absent when inboundCount is 0." + }, + "avgHandlingTimeSec": { + "type": "integer", + "description": "Average time in seconds from report creation to close, for reports closed in this period." + }, + "lastUpdated": { + "type": "string", + "format": "datetime", + "description": "When these statistics were last computed" + } + } + }, + "assignmentView": { + "type": "object", + "required": ["id", "did", "queue", "startAt"], + "properties": { + "id": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "moderator": { + "type": "ref", + "ref": "tools.ozone.team.defs#member", + "description": "The moderator assigned to this queue" + }, + "queue": { + "type": "ref", + "ref": "#queueView" + }, + "startAt": { + "type": "string", + "format": "datetime" + }, + "endAt": { + "type": "string", + "format": "datetime" + } + } + } + } +} diff --git a/lexicons/tools/ozone/queue/deleteQueue.json b/lexicons/tools/ozone/queue/deleteQueue.json new file mode 100644 index 00000000000..29a3735299f --- /dev/null +++ b/lexicons/tools/ozone/queue/deleteQueue.json @@ -0,0 +1,43 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.deleteQueue", + "defs": { + "main": { + "type": "procedure", + "description": "Delete a moderation queue. Optionally migrate reports to another queue.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queueId"], + "properties": { + "queueId": { + "type": "integer", + "description": "ID of the queue to delete" + }, + "migrateToQueueId": { + "type": "integer", + "description": "Optional: migrate all reports to this queue. If not specified, reports will be set to unassigned (-1)." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["deleted"], + "properties": { + "deleted": { + "type": "boolean" + }, + "reportsMigrated": { + "type": "integer", + "description": "Number of reports that were migrated (if migration occurred)" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/queue/getAssignments.json b/lexicons/tools/ozone/queue/getAssignments.json new file mode 100644 index 00000000000..2eb5c65be8c --- /dev/null +++ b/lexicons/tools/ozone/queue/getAssignments.json @@ -0,0 +1,63 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.getAssignments", + "defs": { + "main": { + "type": "query", + "description": "Get moderator assignments, optionally filtered by active status, queue, or moderator.", + "parameters": { + "type": "params", + "properties": { + "onlyActive": { + "type": "boolean", + "default": true, + "description": "When true, only returns active assignments." + }, + "queueIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "If specified, returns assignments for these queues only." + }, + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did" + }, + "description": "If specified, returns assignments for these moderators only." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["assignments"], + "properties": { + "cursor": { + "type": "string" + }, + "assignments": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.queue.defs#assignmentView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/queue/listQueues.json b/lexicons/tools/ozone/queue/listQueues.json new file mode 100644 index 00000000000..e9f9caf47e3 --- /dev/null +++ b/lexicons/tools/ozone/queue/listQueues.json @@ -0,0 +1,61 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.listQueues", + "defs": { + "main": { + "type": "query", + "description": "List all configured moderation queues with statistics.", + "parameters": { + "type": "params", + "properties": { + "enabled": { + "type": "boolean", + "description": "Filter by enabled status. If not specified, returns all queues." + }, + "subjectType": { + "type": "string", + "description": "Filter queues that handle this subject type ('account' or 'record')." + }, + "collection": { + "type": "string", + "description": "Filter queues by collection name (e.g. 'app.bsky.feed.post')." + }, + "reportTypes": { + "type": "array", + "items": { "type": "string" }, + "maxLength": 10, + "description": "Filter queues that handle any of these report reason types." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queues"], + "properties": { + "cursor": { + "type": "string" + }, + "queues": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.queue.defs#queueView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/queue/routeReports.json b/lexicons/tools/ozone/queue/routeReports.json new file mode 100644 index 00000000000..d69ab68f741 --- /dev/null +++ b/lexicons/tools/ozone/queue/routeReports.json @@ -0,0 +1,50 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.routeReports", + "defs": { + "main": { + "type": "procedure", + "description": "Route reports within an ID range to matching queues based.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["startReportId", "endReportId"], + "properties": { + "startReportId": { + "type": "integer", + "description": "Start of report ID range (inclusive)." + }, + "endReportId": { + "type": "integer", + "description": "End of report ID range (inclusive). Difference between start and end must be less than 5,000." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["assigned", "unmatched"], + "properties": { + "assigned": { + "type": "integer", + "description": "The number of reports assigned to a queue." + }, + "unmatched": { + "type": "integer", + "description": "The number of reports with no matching queue." + } + } + } + }, + "errors": [ + { + "name": "OutOfRange", + "description": "The request is invalid, such as missing required fields or invalid field values." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/queue/unassignModerator.json b/lexicons/tools/ozone/queue/unassignModerator.json new file mode 100644 index 00000000000..633ac817c8a --- /dev/null +++ b/lexicons/tools/ozone/queue/unassignModerator.json @@ -0,0 +1,34 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.unassignModerator", + "defs": { + "main": { + "type": "procedure", + "description": "Remove a user's assignment from a queue.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queueId", "did"], + "properties": { + "queueId": { + "type": "integer", + "description": "The ID of the queue to unassign the user from." + }, + "did": { + "type": "string", + "format": "did", + "description": "DID to be unassigned." + } + } + } + }, + "errors": [ + { + "name": "InvalidAssignment", + "description": "No active assignment exists for the given queue and user." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/queue/updateQueue.json b/lexicons/tools/ozone/queue/updateQueue.json new file mode 100644 index 00000000000..a813f427d2e --- /dev/null +++ b/lexicons/tools/ozone/queue/updateQueue.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "tools.ozone.queue.updateQueue", + "defs": { + "main": { + "type": "procedure", + "description": "Update queue properties. Currently only supports updating the name and enabled status to prevent configuration conflicts.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queueId"], + "properties": { + "queueId": { + "type": "integer", + "description": "ID of the queue to update" + }, + "name": { + "type": "string", + "description": "New display name for the queue" + }, + "enabled": { + "type": "boolean", + "description": "Enable or disable the queue" + }, + "description": { + "type": "string", + "description": "Optional description of the queue" + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["queue"], + "properties": { + "queue": { + "type": "ref", + "ref": "tools.ozone.queue.defs#queueView" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/assignModerator.json b/lexicons/tools/ozone/report/assignModerator.json new file mode 100644 index 00000000000..f7ec75474ac --- /dev/null +++ b/lexicons/tools/ozone/report/assignModerator.json @@ -0,0 +1,53 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.assignModerator", + "defs": { + "main": { + "type": "procedure", + "description": "Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reportId"], + "properties": { + "reportId": { + "type": "integer", + "description": "The ID of the report to assign." + }, + "queueId": { + "type": "integer", + "description": "Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue." + }, + "did": { + "type": "string", + "format": "did", + "description": "DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator." + }, + "isPermanent": { + "type": "boolean", + "description": "When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.report.defs#assignmentView" + } + }, + "errors": [ + { + "name": "AlreadyAssigned", + "description": "The report is already assigned to another user." + }, + { + "name": "InvalidAssignment", + "description": "The report ID or queue ID is invalid." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/report/createActivity.json b/lexicons/tools/ozone/report/createActivity.json new file mode 100644 index 00000000000..254df962b50 --- /dev/null +++ b/lexicons/tools/ozone/report/createActivity.json @@ -0,0 +1,75 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.createActivity", + "defs": { + "main": { + "type": "procedure", + "description": "Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reportId", "activity"], + "properties": { + "reportId": { + "type": "integer", + "description": "ID of the report to record activity on" + }, + "activity": { + "type": "union", + "refs": [ + "tools.ozone.report.defs#queueActivity", + "tools.ozone.report.defs#assignmentActivity", + "tools.ozone.report.defs#escalationActivity", + "tools.ozone.report.defs#closeActivity", + "tools.ozone.report.defs#reopenActivity", + "tools.ozone.report.defs#noteActivity" + ], + "description": "The type of activity to record." + }, + "internalNote": { + "type": "string", + "description": "Optional moderator-only note. Not visible to reporters." + }, + "publicNote": { + "type": "string", + "description": "Optional public-facing note, potentially visible to the reporter." + }, + "isAutomated": { + "type": "boolean", + "description": "Set true when this activity is triggered by an automated process. Defaults to false.", + "default": false + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["activity"], + "properties": { + "activity": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportActivityView" + } + } + } + }, + "errors": [ + { + "name": "ReportNotFound", + "description": "No report exists with the given reportId" + }, + { + "name": "InvalidStateTransition", + "description": "The requested state transition is not permitted from the report's current status" + }, + { + "name": "AlreadyInTargetState", + "description": "The report is already in the status implied by this activity type" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/report/defs.json b/lexicons/tools/ozone/report/defs.json index 5eca2699585..e5f6efd1180 100644 --- a/lexicons/tools/ozone/report/defs.json +++ b/lexicons/tools/ozone/report/defs.json @@ -218,6 +218,370 @@ "reasonSelfHarmOther": { "type": "token", "description": "Other dangerous content" + }, + "reportAssignment": { + "type": "object", + "description": "Information about the moderator currently assigned to a report.", + "required": ["did", "assignedAt"], + "properties": { + "did": { + "type": "string", + "format": "did", + "description": "DID of the assigned moderator" + }, + "moderator": { + "type": "ref", + "ref": "tools.ozone.team.defs#member", + "description": "Full member record of the assigned moderator" + }, + "assignedAt": { + "type": "string", + "format": "datetime", + "description": "When the report was assigned" + } + } + }, + "reportView": { + "type": "object", + "required": [ + "id", + "eventId", + "status", + "subject", + "reportType", + "reportedBy", + "reporter", + "createdAt" + ], + "properties": { + "id": { + "type": "integer", + "description": "Report ID" + }, + "eventId": { + "type": "integer", + "description": "ID of the moderation event that created this report" + }, + "status": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "Current status of the report" + }, + "subject": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#subjectView", + "description": "The subject that was reported with full details" + }, + "reportType": { + "type": "ref", + "ref": "com.atproto.moderation.defs#reasonType", + "description": "Type of report" + }, + "reportedBy": { + "type": "string", + "format": "did", + "description": "DID of the user who made the report" + }, + "reporter": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#subjectView", + "description": "Full subject view of the reporter account" + }, + "comment": { + "type": "string", + "description": "Comment provided by the reporter" + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "When the report was created" + }, + "updatedAt": { + "type": "string", + "format": "datetime", + "description": "When the report was last updated" + }, + "queuedAt": { + "type": "string", + "format": "datetime", + "description": "When the report was assigned to its current queue" + }, + "actionEventIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first)" + }, + "actions": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#modEventView" + }, + "description": "Optional: expanded action events" + }, + "actionNote": { + "type": "string", + "description": "Note sent to reporter when report was actioned" + }, + "subjectStatus": { + "type": "ref", + "ref": "tools.ozone.moderation.defs#subjectStatusView", + "description": "Current status of the reported subject" + }, + "relatedReportCount": { + "type": "integer", + "description": "Number of other pending reports on the same subject" + }, + "assignment": { + "type": "ref", + "ref": "#reportAssignment", + "description": "Information about moderator currently assigned to this report (if any)" + }, + "queue": { + "type": "ref", + "ref": "tools.ozone.queue.defs#queueView", + "description": "The queue this report is assigned to (if any)" + }, + "isMuted": { + "type": "boolean", + "description": "Whether this report is muted. A report is muted if the reporter was muted or the subject was muted at the time the report was created." + } + } + }, + "queueActivity": { + "type": "object", + "description": "Activity recording a report being routed to a queue.", + "properties": { + "previousStatus": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "The report's status before this activity. Populated automatically from the report row; not required in input." + } + } + }, + "assignmentActivity": { + "type": "object", + "description": "Activity recording a moderator being assigned to a report.", + "properties": { + "previousStatus": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "The report's status before this activity. Populated automatically from the report row; not required in input." + } + } + }, + "escalationActivity": { + "type": "object", + "description": "Activity recording a report being escalated.", + "properties": { + "previousStatus": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "The report's status before this activity. Populated automatically from the report row; not required in input." + } + } + }, + "closeActivity": { + "type": "object", + "description": "Activity recording a report being closed.", + "properties": { + "previousStatus": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "The report's status before this activity. Populated automatically from the report row; not required in input." + } + } + }, + "reopenActivity": { + "type": "object", + "description": "Activity recording a closed report being reopened. Only valid when the report is in 'closed' status.", + "properties": { + "previousStatus": { + "type": "string", + "knownValues": ["open", "closed", "escalated", "queued", "assigned"], + "description": "The report's status before this activity. Populated automatically from the report row; not required in input." + } + } + }, + "noteActivity": { + "type": "object", + "description": "Activity recording a note on a report. Use internalNote for moderator-only notes or publicNote for reporter-visible notes (or both).", + "properties": {} + }, + "reportActivityView": { + "type": "object", + "description": "A single activity entry on a report.", + "required": [ + "id", + "reportId", + "activity", + "isAutomated", + "createdBy", + "createdAt" + ], + "properties": { + "id": { + "type": "integer", + "description": "Activity ID" + }, + "reportId": { + "type": "integer", + "description": "ID of the report this activity belongs to" + }, + "activity": { + "type": "union", + "refs": [ + "#queueActivity", + "#assignmentActivity", + "#escalationActivity", + "#closeActivity", + "#reopenActivity", + "#noteActivity" + ], + "description": "The typed activity object describing what occurred." + }, + "internalNote": { + "type": "string", + "description": "Optional moderator-only note. Not visible to reporters." + }, + "publicNote": { + "type": "string", + "description": "Optional public note, potentially visible to the reporter." + }, + "meta": { + "type": "unknown", + "description": "Extensible JSON payload for loose activity-specific metadata (e.g. assignmentId)." + }, + "isAutomated": { + "type": "boolean", + "description": "True if this activity was created by an automated process (e.g. queue router) rather than a direct human action." + }, + "createdBy": { + "type": "string", + "format": "did", + "description": "DID of the actor who created this activity, or the service DID for automated activities." + }, + "moderator": { + "type": "ref", + "ref": "tools.ozone.team.defs#member", + "description": "Full member record of the moderator who created this activity" + }, + "createdAt": { + "type": "string", + "format": "datetime", + "description": "When this activity was created" + } + } + }, + "liveStats": { + "description": "Live statistics for reports for the current calendar day, filterable by queue, moderator, or report type.", + "type": "object", + "properties": { + "pendingCount": { + "type": "integer", + "description": "Number of reports currently not closed." + }, + "actionedCount": { + "type": "integer", + "description": "Number of reports closed today." + }, + "escalatedCount": { + "type": "integer", + "description": "Number of reports escalated today." + }, + "inboundCount": { + "type": "integer", + "description": "Reports received today." + }, + "actionRate": { + "type": "integer", + "description": "Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer." + }, + "avgHandlingTimeSec": { + "type": "integer", + "description": "Average time in seconds from report creation (or moderator assignment) to close." + }, + "lastUpdated": { + "type": "string", + "format": "datetime", + "description": "When these statistics were last computed." + } + } + }, + "historicalStats": { + "description": "A single daily snapshot of report statistics for a calendar date.", + "type": "object", + "required": ["date"], + "properties": { + "date": { + "type": "string", + "description": "The calendar date this snapshot covers (YYYY-MM-DD)." + }, + "computedAt": { + "type": "string", + "format": "datetime", + "description": "When this snapshot was last computed." + }, + "pendingCount": { + "type": "integer", + "description": "Number of reports not closed at time of computation." + }, + "actionedCount": { + "type": "integer", + "description": "Number of reports closed during this day." + }, + "escalatedCount": { + "type": "integer", + "description": "Number of reports escalated during this day." + }, + "inboundCount": { + "type": "integer", + "description": "Reports received during this day." + }, + "actionRate": { + "type": "integer", + "description": "Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer." + }, + "avgHandlingTimeSec": { + "type": "integer", + "description": "Average time in seconds from report creation (or moderator assignment) to close." + } + } + }, + "assignmentView": { + "type": "object", + "required": ["id", "did", "reportId", "startAt"], + "properties": { + "id": { + "type": "integer" + }, + "did": { + "type": "string", + "format": "did" + }, + "moderator": { + "type": "ref", + "ref": "tools.ozone.team.defs#member", + "description": "The moderator assigned to this report" + }, + "queue": { + "type": "ref", + "ref": "tools.ozone.queue.defs#queueView" + }, + "reportId": { + "type": "integer" + }, + "startAt": { + "type": "string", + "format": "datetime" + }, + "endAt": { + "type": "string", + "format": "datetime" + } + } } } } diff --git a/lexicons/tools/ozone/report/getAssignments.json b/lexicons/tools/ozone/report/getAssignments.json new file mode 100644 index 00000000000..55bf7ddbeef --- /dev/null +++ b/lexicons/tools/ozone/report/getAssignments.json @@ -0,0 +1,65 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.getAssignments", + "defs": { + "main": { + "type": "query", + "description": "Get assignments for reports.", + "parameters": { + "type": "params", + "properties": { + "onlyActive": { + "type": "boolean", + "default": true, + "description": "When true, only returns active assignments." + }, + "reportIds": { + "type": "array", + "items": { + "type": "integer" + }, + "maxLength": 50, + "description": "If specified, returns assignments for these reports only." + }, + "dids": { + "type": "array", + "items": { + "type": "string", + "format": "did" + }, + "maxLength": 50, + "description": "If specified, returns assignments for these moderators only." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["assignments"], + "properties": { + "cursor": { + "type": "string" + }, + "assignments": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.report.defs#assignmentView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/getHistoricalStats.json b/lexicons/tools/ozone/report/getHistoricalStats.json new file mode 100644 index 00000000000..0d8cd6709d5 --- /dev/null +++ b/lexicons/tools/ozone/report/getHistoricalStats.json @@ -0,0 +1,71 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.getHistoricalStats", + "defs": { + "main": { + "type": "query", + "description": "Get historical daily report statistics. Returns a paginated list of daily stat snapshots, newest first. Filter by queue, moderator, or report type.", + "parameters": { + "type": "params", + "properties": { + "queueId": { + "type": "integer", + "description": "Filter stats by queue. Use -1 for unqueued reports." + }, + "moderatorDid": { + "type": "string", + "format": "did", + "description": "Filter stats by moderator DID." + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter stats by report types." + }, + "startDate": { + "type": "string", + "format": "datetime", + "description": "Earliest date to include (inclusive)." + }, + "endDate": { + "type": "string", + "format": "datetime", + "description": "Latest date to include (inclusive)." + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30, + "description": "Maximum number of entries to return." + }, + "cursor": { + "type": "string", + "description": "Pagination cursor." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["stats"], + "properties": { + "stats": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.report.defs#historicalStats" + } + }, + "cursor": { + "type": "string" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/getLatestReport.json b/lexicons/tools/ozone/report/getLatestReport.json new file mode 100644 index 00000000000..83357543120 --- /dev/null +++ b/lexicons/tools/ozone/report/getLatestReport.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.getLatestReport", + "defs": { + "main": { + "type": "query", + "description": "Get the most recent report.", + "parameters": { + "type": "params", + "properties": {} + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["report"], + "properties": { + "report": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportView" + } + } + } + }, + "errors": [ + { + "name": "NotFound", + "description": "No report found." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/report/getLiveStats.json b/lexicons/tools/ozone/report/getLiveStats.json new file mode 100644 index 00000000000..80a05fd3160 --- /dev/null +++ b/lexicons/tools/ozone/report/getLiveStats.json @@ -0,0 +1,45 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.getLiveStats", + "defs": { + "main": { + "type": "query", + "description": "Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.", + "parameters": { + "type": "params", + "properties": { + "queueId": { + "type": "integer", + "description": "Filter stats by queue. Use -1 for unqueued reports." + }, + "moderatorDid": { + "type": "string", + "format": "did", + "description": "Filter stats by moderator DID." + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter stats by report types." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["stats"], + "properties": { + "stats": { + "type": "ref", + "ref": "tools.ozone.report.defs#liveStats", + "description": "Statistics for the requested filter." + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/getReport.json b/lexicons/tools/ozone/report/getReport.json new file mode 100644 index 00000000000..709e93e42bc --- /dev/null +++ b/lexicons/tools/ozone/report/getReport.json @@ -0,0 +1,33 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.getReport", + "defs": { + "main": { + "type": "query", + "description": "Get details about a single moderation report by ID.", + "parameters": { + "type": "params", + "required": ["id"], + "properties": { + "id": { + "type": "integer", + "description": "The ID of the report to retrieve." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportView" + } + }, + "errors": [ + { + "name": "NotFound", + "description": "No report found." + } + ] + } + } +} diff --git a/lexicons/tools/ozone/report/listActivities.json b/lexicons/tools/ozone/report/listActivities.json new file mode 100644 index 00000000000..e5eaa7ded21 --- /dev/null +++ b/lexicons/tools/ozone/report/listActivities.json @@ -0,0 +1,48 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.listActivities", + "defs": { + "main": { + "type": "query", + "description": "List all activities for a report, sorted most-recent-first.", + "parameters": { + "type": "params", + "required": ["reportId"], + "properties": { + "reportId": { + "type": "integer", + "description": "ID of the report whose activities to list" + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["activities"], + "properties": { + "activities": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportActivityView" + } + }, + "cursor": { + "type": "string" + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/queryReports.json b/lexicons/tools/ozone/report/queryReports.json new file mode 100644 index 00000000000..e15da3339cd --- /dev/null +++ b/lexicons/tools/ozone/report/queryReports.json @@ -0,0 +1,120 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.queryReports", + "defs": { + "main": { + "type": "query", + "description": "View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.", + "parameters": { + "type": "params", + "required": ["status"], + "properties": { + "queueId": { + "type": "integer", + "description": "Filter by queue ID. Use -1 for unassigned reports." + }, + "reportTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason)." + }, + "status": { + "type": "string", + "knownValues": [ + "open", + "closed", + "escalated", + "queued", + "assigned" + ], + "description": "Filter by report status." + }, + "subject": { + "type": "string", + "format": "uri", + "description": "Filter by subject DID or AT-URI." + }, + "did": { + "type": "string", + "format": "did", + "description": "Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects." + }, + "subjectType": { + "type": "string", + "description": "If specified, reports of the given type (account or record) will be returned.", + "knownValues": ["account", "record"] + }, + "collections": { + "type": "array", + "maxLength": 20, + "description": "If specified, reports 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" + } + }, + "reportedAfter": { + "type": "string", + "format": "datetime", + "description": "Retrieve reports created after a given timestamp" + }, + "reportedBefore": { + "type": "string", + "format": "datetime", + "description": "Retrieve reports created before a given timestamp" + }, + "isMuted": { + "type": "boolean", + "default": false, + "description": "Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false." + }, + "assignedTo": { + "type": "string", + "format": "did", + "description": "Filter by the DID of the moderator permanently assigned to the report." + }, + "sortField": { + "type": "string", + "default": "createdAt", + "enum": ["createdAt", "updatedAt"] + }, + "sortDirection": { + "type": "string", + "default": "desc", + "enum": ["asc", "desc"] + }, + "limit": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + }, + "cursor": { + "type": "string" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reports"], + "properties": { + "cursor": { + "type": "string" + }, + "reports": { + "type": "array", + "items": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportView" + } + } + } + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/reassignQueue.json b/lexicons/tools/ozone/report/reassignQueue.json new file mode 100644 index 00000000000..3916654367c --- /dev/null +++ b/lexicons/tools/ozone/report/reassignQueue.json @@ -0,0 +1,66 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.reassignQueue", + "defs": { + "main": { + "type": "procedure", + "description": "Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reportId", "queueId"], + "properties": { + "reportId": { + "type": "integer", + "description": "ID of the report to reassign" + }, + "queueId": { + "type": "integer", + "description": "Target queue ID. Use -1 to unassign from any queue." + }, + "comment": { + "type": "string", + "description": "Optional moderator-only note recorded on the resulting queueActivity as internalNote." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["report"], + "properties": { + "report": { + "type": "ref", + "ref": "tools.ozone.report.defs#reportView" + } + } + } + }, + "errors": [ + { + "name": "ReportNotFound", + "description": "No report exists with the given reportId" + }, + { + "name": "ReportClosed", + "description": "The report is closed and cannot be reassigned" + }, + { + "name": "AlreadyInTargetQueue", + "description": "The report is already assigned to the target queue" + }, + { + "name": "QueueNotFound", + "description": "No active queue exists with the given queueId" + }, + { + "name": "QueueDisabled", + "description": "The target queue is disabled and cannot receive new assignments" + } + ] + } + } +} diff --git a/lexicons/tools/ozone/report/refreshStats.json b/lexicons/tools/ozone/report/refreshStats.json new file mode 100644 index 00000000000..126827a0460 --- /dev/null +++ b/lexicons/tools/ozone/report/refreshStats.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.refreshStats", + "defs": { + "main": { + "type": "procedure", + "description": "Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["startDate", "endDate"], + "properties": { + "startDate": { + "type": "string", + "description": "Start date for recomputation, inclusive (YYYY-MM-DD)." + }, + "endDate": { + "type": "string", + "description": "End date for recomputation, inclusive (YYYY-MM-DD)." + }, + "queueIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Optional list of queue IDs to recompute. Omit to recompute all groups." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "properties": {} + } + } + } + } +} diff --git a/lexicons/tools/ozone/report/unassignModerator.json b/lexicons/tools/ozone/report/unassignModerator.json new file mode 100644 index 00000000000..5f12019f4ca --- /dev/null +++ b/lexicons/tools/ozone/report/unassignModerator.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "tools.ozone.report.unassignModerator", + "defs": { + "main": { + "type": "procedure", + "description": "Remove report assignment.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["reportId"], + "properties": { + "reportId": { + "type": "integer", + "description": "The ID of the report to unassign." + } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "tools.ozone.report.defs#assignmentView" + } + }, + "errors": [ + { + "name": "InvalidAssignment", + "description": "The report ID is invalid." + } + ] + } + } +} diff --git a/package.json b/package.json index 266b4ff40e6..938306b58c2 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,15 @@ "license": "MIT", "private": true, "engines": { - "node": ">=18.7.0" + "node": ">=22" }, "packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81", + "devEngines": { + "packageManager": { + "name": "pnpm", + "onFail": "error" + } + }, "scripts": { "lint:fix": "pnpm lint --fix", "lint": "NODE_OPTIONS=--max_old_space_size=4096 eslint . --ext .ts,.js,.tsx,.jsx", @@ -20,7 +26,7 @@ "verify:types": "tsc --build tsconfig.json", "format": "pnpm lint:fix && pnpm style:fix", "precodegen": "pnpm run --recursive --stream --filter '@atproto/lex-cli...' --filter '@atproto/lex...' build --force", - "codegen": "pnpm run --sort --recursive --stream --parallel codegen", + "codegen": "pnpm run --sort --recursive --stream --parallel '/^(codegen|codegen:.+)$/'", "build": "pnpm run --sort --recursive --stream build", "i18n": "pnpm run --parallel i18n:extract", "dev": "NODE_ENV=development pnpm run --recursive --parallel --stream '/^(dev|dev:.+)$/'", @@ -29,19 +35,20 @@ "test:withFlags": "pnpm run test --", "bench": "vitest bench --run", "changeset": "changeset", - "release": "pnpm build && changeset publish", + "publish:ci": "pnpm build && jq '.devEngines.packageManager.onFail = \"warn\"' package.json > package.json.tmp && mv package.json.tmp package.json && changeset publish", "version-packages": "changeset version && git add ." }, "devDependencies": { "@atproto/dev-env": "workspace:^", "@changesets/changelog-github": "^0.5.1", "@changesets/cli": "^2.29.7", + "@jest/globals": "^30.0.0", "@swc/core": "^1.3.42", "@swc/jest": "^0.2.24", - "@types/jest": "^28.1.4", - "@types/node": "^18.19.67", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@types/jest": "^30.0.0", + "@types/node": "^22.0.0", + "@typescript-eslint/eslint-plugin": "^8.59.2", + "@typescript-eslint/parser": "^8.59.2", "@vitest/coverage-v8": "4.0.16", "dotenv": "^16.0.3", "eslint": "^8.57.0", @@ -50,18 +57,25 @@ "eslint-plugin-import": "^2.31.0", "eslint-plugin-n": "^17.15.0", "eslint-plugin-prettier": "^5.1.3", - "jest": "^28.1.2", + "jest": "^30.0.0", "node-gyp": "^9.3.1", "pino-pretty": "^9.1.0", "prettier": "^3.2.5", "prettier-config-standard": "^7.0.0", "prettier-plugin-tailwindcss": "^0.6.11", - "typescript": "^5.8.3", + "typescript": "^6.0.3", "vitest": "^4.0.16" }, "pnpm": { + "executionEnv": { + "nodeVersion": ">=22" + }, "overrides": { - "cookie": "^0.7.2" + "cookie": "^0.7.2", + "opentelemetry-plugin-better-sqlite3>@opentelemetry/core": "^1.30.0" + }, + "patchedDependencies": { + "kysely@0.22.0": "patches/kysely@0.22.0.patch" } }, "workspace": [ @@ -77,5 +91,6 @@ "packages/oauth/*", "packages/internal/*" ] - } + }, + "type": "module" } diff --git a/packages/api/.gitignore b/packages/api/.gitignore index be83884b87c..239dba5afae 100644 --- a/packages/api/.gitignore +++ b/packages/api/.gitignore @@ -1,5 +1,5 @@ # @atproto/lex-cli -# src/client +src/client # ./scripts/generate-code.mjs src/moderation/const/labels.ts diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 39a25cc3467..555c8b26ae2 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,129 @@ # @atproto/api +## 0.20.5 + +### Patch Changes + +- [#4998](https://github.com/bluesky-social/atproto/pull/4998) [`4984994`](https://github.com/bluesky-social/atproto/commit/4984994f7d3f0773b03c61dccd68286e42e0c6af) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +## 0.20.4 + +### Patch Changes + +- [#4987](https://github.com/bluesky-social/atproto/pull/4987) [`7fecf13`](https://github.com/bluesky-social/atproto/commit/7fecf13852eff09c0dd55da0258cf779688a36e6) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4987](https://github.com/bluesky-social/atproto/pull/4987) [`7fecf13`](https://github.com/bluesky-social/atproto/commit/7fecf13852eff09c0dd55da0258cf779688a36e6) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4991](https://github.com/bluesky-social/atproto/pull/4991) [`86bb63e`](https://github.com/bluesky-social/atproto/commit/86bb63ef97d487abe55a5a263261b4af2b5d7664) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +## 0.20.3 + +### Patch Changes + +- [#4985](https://github.com/bluesky-social/atproto/pull/4985) [`604e16d`](https://github.com/bluesky-social/atproto/commit/604e16dda2972f0e17cedefc49dafd4ecbfda8f9) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Update fields that are always present on `viewExternalSource` + +## 0.20.2 + +### Patch Changes + +- [#4975](https://github.com/bluesky-social/atproto/pull/4975) [`5b43753`](https://github.com/bluesky-social/atproto/commit/5b43753aa5e32edfa8aebbcc6f1e8ba777657c07) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4915](https://github.com/bluesky-social/atproto/pull/4915) [`2c958f8`](https://github.com/bluesky-social/atproto/commit/2c958f88219b7c796a884a37da13847bb817c8e6) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add rich metadata fields to `app.bsky.embed.external#viewExternal`, and a new + query method `app.bsky.embed.getEmbedExternalView`. Also changes + `associatedRecords` to `associatedRefs` on the `app.bsky.embed.external` record. + +## 0.20.1 + +### Patch Changes + +- [#4963](https://github.com/bluesky-social/atproto/pull/4963) [`37c6fe6`](https://github.com/bluesky-social/atproto/commit/37c6fe6caeaf1b6ca598d6147e74c954c5a24854) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4968](https://github.com/bluesky-social/atproto/pull/4968) [`8eb0662`](https://github.com/bluesky-social/atproto/commit/8eb0662ac38a915c7a0c669e739fc8afc3ed7e7b) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Run "lexgen" during CI instead of keeping the generated code in Git + +## 0.20.0 + +### Minor Changes + +- [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24. + +- [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution. + + Node.js 22's `require()` compatibility layer can still load these packages in CommonJS code. + +- [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0. + +### Patch Changes + +- Updated dependencies [[`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c), [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9), [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705)]: + - @atproto/common-web@0.5.0 + - @atproto/lexicon@0.7.0 + - @atproto/syntax@0.6.0 + - @atproto/xrpc@0.8.0 + +## 0.19.19 + +### Patch Changes + +- [#4945](https://github.com/bluesky-social/atproto/pull/4945) [`cb13878`](https://github.com/bluesky-social/atproto/commit/cb1387899f0b296759ebdf5b8985b6b573091a9a) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4947](https://github.com/bluesky-social/atproto/pull/4947) [`ea4184b`](https://github.com/bluesky-social/atproto/commit/ea4184b9beb9821d806a9540223dab55c2628184) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Updates contract defined in #4912 to replace `associatedRecord: string` with `associatedRecords: StrongRef[]` + +- [#4946](https://github.com/bluesky-social/atproto/pull/4946) [`38bc2fa`](https://github.com/bluesky-social/atproto/commit/38bc2faa142d42f95c5b89b5a10bf8ed607fe39f) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +## 0.19.18 + +### Patch Changes + +- [#4932](https://github.com/bluesky-social/atproto/pull/4932) [`18d3114`](https://github.com/bluesky-social/atproto/commit/18d311494038b73e3c3429e504ca6cc05bba5f6d) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4933](https://github.com/bluesky-social/atproto/pull/4933) [`0533a5f`](https://github.com/bluesky-social/atproto/commit/0533a5f60ecc1f15feb9c4940781bc7e217a3644) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - trigger build after github actions previously disabled + +## 0.19.17 + +### Patch Changes + +- [#4924](https://github.com/bluesky-social/atproto/pull/4924) [`8ffae17`](https://github.com/bluesky-social/atproto/commit/8ffae17323df37f2be1dd7286bb9443fa1aa5b42) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4926](https://github.com/bluesky-social/atproto/pull/4926) [`4502df1`](https://github.com/bluesky-social/atproto/commit/4502df140600fc74ef5b69db84ff4529797f3ca3) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +## 0.19.16 + +### Patch Changes + +- [#4661](https://github.com/bluesky-social/atproto/pull/4661) [`d05b76c`](https://github.com/bluesky-social/atproto/commit/d05b76cdb59e5bf0af739d1dcbe54df5e7faa7b3) Thanks [@foysalit](https://github.com/foysalit)! - Introduce report based moderation flow in ozone + +## 0.19.15 + +### Patch Changes + +- [#4912](https://github.com/bluesky-social/atproto/pull/4912) [`450f26a`](https://github.com/bluesky-social/atproto/commit/450f26ac854cf53484dd887204447c8ead78d3b2) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `associatedRecord` to `app.bsky.embed.external` record. + +## 0.19.14 + +### Patch Changes + +- [#4894](https://github.com/bluesky-social/atproto/pull/4894) [`65a4b31`](https://github.com/bluesky-social/atproto/commit/65a4b31e67c786c06ce7d48d46b7c6c9d55fcec1) Thanks [@foysalit](https://github.com/foysalit)! - Add expiring tags in ozone + +## 0.19.13 + +### Patch Changes + +- [#4906](https://github.com/bluesky-social/atproto/pull/4906) [`2879b56`](https://github.com/bluesky-social/atproto/commit/2879b56a04d37fc93d5afb51cf6131fb7c156b85) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +- [#4769](https://github.com/bluesky-social/atproto/pull/4769) [`02b8b32`](https://github.com/bluesky-social/atproto/commit/02b8b32d2fd57ade330d18fbfc8d0d25ed95e476) Thanks [@whyrusleeping](https://github.com/whyrusleeping)! - Update blur behaviors to be more comprehensive and cover more surfaces. + +## 0.19.12 + +### Patch Changes + +- [#4903](https://github.com/bluesky-social/atproto/pull/4903) [`3f1cb53`](https://github.com/bluesky-social/atproto/commit/3f1cb5374cec92b4422bbb9a7d6f06dba77396ae) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + +## 0.19.11 + +### Patch Changes + +- [#4876](https://github.com/bluesky-social/atproto/pull/4876) [`03445ee`](https://github.com/bluesky-social/atproto/commit/03445eef45d9fba66d48ea5ca86742685d91faa5) Thanks [@rafaeleyng](https://github.com/rafaeleyng)! - update chat lexicons + ## 0.19.10 ### Patch Changes diff --git a/packages/api/README.md b/packages/api/README.md index c630466e754..c538cd56d91 100644 --- a/packages/api/README.md +++ b/packages/api/README.md @@ -7,6 +7,10 @@ This API is a client for ATProtocol servers. It communicates using HTTP. It incl - ✔️ Session management. - ✔️ A RichText library. +> [!Note] +> +> We recommend using [lex](https://github.com/bluesky-social/atproto/tree/main/packages/lex/lex), our type-safe SDK with Lexicon code generation, for all new projects. + ## Getting started First install the package: diff --git a/packages/api/definitions/labels.json b/packages/api/definitions/labels.json index 7252f406333..b404889bb23 100644 --- a/packages/api/definitions/labels.json +++ b/packages/api/definitions/labels.json @@ -92,7 +92,12 @@ "behaviors": { "account": { "avatar": "blur", - "banner": "blur" + "banner": "blur", + "profileList": "blur", + "profileView": "blur", + "contentList": "blur", + "contentView": "blur", + "contentMedia": "blur" }, "profile": { "avatar": "blur", @@ -113,7 +118,12 @@ "behaviors": { "account": { "avatar": "blur", - "banner": "blur" + "banner": "blur", + "profileList": "blur", + "profileView": "blur", + "contentList": "blur", + "contentView": "blur", + "contentMedia": "blur" }, "profile": { "avatar": "blur", @@ -134,7 +144,8 @@ "behaviors": { "account": { "avatar": "blur", - "banner": "blur" + "banner": "blur", + "contentMedia": "blur" }, "profile": { "avatar": "blur", @@ -156,7 +167,12 @@ "behaviors": { "account": { "avatar": "blur", - "banner": "blur" + "banner": "blur", + "profileList": "blur", + "profileView": "blur", + "contentList": "blur", + "contentView": "blur", + "contentMedia": "blur" }, "profile": { "avatar": "blur", diff --git a/packages/api/jest.config.cjs b/packages/api/jest.config.cjs new file mode 100644 index 00000000000..9c67bcc1f44 --- /dev/null +++ b/packages/api/jest.config.cjs @@ -0,0 +1,23 @@ +/** @type {import('jest').Config} */ +module.exports = { + displayName: 'API', + transform: { + '^.+\\.(t|j)s$': [ + '@swc/jest', + { + jsc: { + parser: { syntax: 'typescript', importAttributes: true }, + experimental: { keepImportAttributes: true }, + transform: {}, + }, + module: { type: 'es6' }, + }, + ], + }, + extensionsToTreatAsEsm: ['.ts'], + transformIgnorePatterns: [], + testTimeout: 60000, + setupFiles: ['/../../test.setup.ts'], + setupFilesAfterEnv: ['/jest.setup.ts'], + moduleNameMapper: { '^(\\.\\.?\\/.+)\\.js$': ['$1.ts', '$1.js'] }, +} diff --git a/packages/api/jest.config.js b/packages/api/jest.config.js deleted file mode 100644 index d6611c66952..00000000000 --- a/packages/api/jest.config.js +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import('jest').Config} */ -module.exports = { - displayName: 'API', - transform: { '^.+\\.ts$': '@swc/jest' }, - testTimeout: 60000, - setupFiles: ['/../../jest.setup.ts'], - setupFilesAfterEnv: ['/jest.setup.ts'], - moduleNameMapper: { '^(\\.\\.?\\/.+)\\.js$': ['$1.ts', '$1.js'] }, -} diff --git a/packages/api/jest.setup.ts b/packages/api/jest.setup.ts index 4263aad09f4..885466688d7 100644 --- a/packages/api/jest.setup.ts +++ b/packages/api/jest.setup.ts @@ -1,5 +1,5 @@ -import { ModerationUI } from './src' -import { ModerationTestSuiteResultFlag } from './tests/util/moderation-behavior' +import { ModerationUI } from './src/index.js' +import { ModerationTestSuiteResultFlag } from './tests/util/moderation-behavior.js' expect.extend({ toBeModerationResult( diff --git a/packages/api/package.json b/packages/api/package.json index d917de07b1e..b1aee888501 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,9 @@ { "name": "@atproto/api", - "version": "0.19.10", + "version": "0.20.5", + "engines": { + "node": ">=22" + }, "license": "MIT", "description": "Client library for atproto and Bluesky", "keywords": [ @@ -14,29 +17,35 @@ "url": "https://github.com/bluesky-social/atproto", "directory": "packages/api" }, - "main": "dist/index.js", - "types": "dist/index.d.ts", "scripts": { - "codegen": "lex gen-api --yes ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/* ../../lexicons/com/germnetwork/*", - "prebuild": "node ./scripts/generate-code.mjs && ([ -f ./src/client/index.ts ] || pnpm run codegen)", + "codegen:lex": "lex gen-api --yes ./src/client ../../lexicons/com/atproto/*/* ../../lexicons/app/bsky/*/* ../../lexicons/chat/bsky/*/* ../../lexicons/tools/ozone/*/* ../../lexicons/com/germnetwork/*", + "codegen:code": "node ./scripts/generate-code.mjs", + "prebuild": "pnpm run codegen:code && if [ ! -f ./src/client/index.ts ] || [ -n \"$(find ../../lexicons -name '*.json' -newer ./src/client/index.ts -type f -print -quit)\" ]; then pnpm run codegen:lex; fi", "build": "tsc --build tsconfig.build.json", - "test": "jest" + "test": "NODE_OPTIONS=--experimental-vm-modules jest" }, "dependencies": { "@atproto/common-web": "workspace:^", "@atproto/lexicon": "workspace:^", "@atproto/syntax": "workspace:^", "@atproto/xrpc": "workspace:^", - "await-lock": "^2.2.2", - "multiformats": "^9.9.0", + "await-lock": "^3.0.0", + "multiformats": "^13.0.0", "tlds": "^1.234.0", "zod": "^3.23.8" }, "devDependencies": { "@atproto/lex-cli": "workspace:^", "@jest/globals": "^28.1.3", - "jest": "^28.1.2", + "jest": "^30.0.0", "prettier": "^3.2.5", - "typescript": "^5.6.3" + "typescript": "^6.0.3" + }, + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } } } diff --git a/packages/api/scripts/code/labels.mjs b/packages/api/scripts/code/labels.mjs index c2dae9086a5..2d9acbcf3b5 100644 --- a/packages/api/scripts/code/labels.mjs +++ b/packages/api/scripts/code/labels.mjs @@ -56,7 +56,7 @@ async function gen() { return prettier.format( `/** this doc is generated by ./scripts/code/labels.mjs **/ - import {InterpretedLabelValueDefinition, LabelPreference} from '../types' + import {InterpretedLabelValueDefinition, LabelPreference} from '../types.js' export type KnownLabelValue = ${Array.from(knownValues) .map((value) => `"${value}"`) diff --git a/packages/api/src/age-assurance.test.ts b/packages/api/src/age-assurance.test.ts index dcce59b059e..4248287decd 100644 --- a/packages/api/src/age-assurance.test.ts +++ b/packages/api/src/age-assurance.test.ts @@ -3,8 +3,8 @@ import { ageAssuranceRuleIDs, computeAgeAssuranceRegionAccess, getAgeAssuranceRegionConfig, -} from './age-assurance' -import { AppBskyAgeassuranceDefs } from './client' +} from './age-assurance.js' +import { AppBskyAgeassuranceDefs } from './client/index.js' describe('age-assurance', () => { describe('getAgeAssuranceRegionConfig', () => { diff --git a/packages/api/src/age-assurance.ts b/packages/api/src/age-assurance.ts index 25a38e8cdc1..8cb02fd2987 100644 --- a/packages/api/src/age-assurance.ts +++ b/packages/api/src/age-assurance.ts @@ -1,5 +1,5 @@ -import { AppBskyAgeassuranceDefs } from './client' -import { ids } from './client/lexicons' +import { AppBskyAgeassuranceDefs } from './client/index.js' +import { ids } from './client/lexicons.js' export type AgeAssuranceRuleID = Exclude< | AppBskyAgeassuranceDefs.ConfigRegionRuleDefault['$type'] diff --git a/packages/api/src/agent.ts b/packages/api/src/agent.ts index ae14fc7720f..037a41cbe20 100644 --- a/packages/api/src/agent.ts +++ b/packages/api/src/agent.ts @@ -17,20 +17,20 @@ import { ComAtprotoRepoPutRecord, ComNS, ToolsNS, -} from './client/index' -import { schemas } from './client/lexicons' -import { MutedWord, Nux } from './client/types/app/bsky/actor/defs' -import { $Typed, Un$Typed } from './client/util' -import { BSKY_LABELER_DID } from './const' -import { interpretLabelValueDefinitions } from './moderation' -import { DEFAULT_LABEL_SETTINGS } from './moderation/const/labels' +} from './client/index.js' +import { schemas } from './client/lexicons.js' +import { MutedWord, Nux } from './client/types/app/bsky/actor/defs.js' +import { $Typed, Un$Typed } from './client/util.js' +import { BSKY_LABELER_DID } from './const.js' +import { DEFAULT_LABEL_SETTINGS } from './moderation/const/labels.js' +import { interpretLabelValueDefinitions } from './moderation/index.js' import { InterpretedLabelValueDefinition, LabelPreference, ModerationPrefs, -} from './moderation/types' -import * as predicate from './predicate' -import { SessionManager } from './session-manager' +} from './moderation/types.js' +import * as predicate from './predicate.js' +import { SessionManager } from './session-manager.js' import { AtpAgentGlobalOpts, AtprotoProxy, @@ -42,14 +42,14 @@ import { asAtprotoProxy, asDid, isDid, -} from './types' +} from './types.js' import { getSavedFeedType, sanitizeMutedWordValue, savedFeedsToUriArrays, validateNux, validateSavedFeed, -} from './util' +} from './util.js' const FEED_VIEW_PREF_DEFAULTS = { hideReplies: false, diff --git a/packages/api/src/atp-agent.ts b/packages/api/src/atp-agent.ts index 05c2951daa5..74359dd5e0d 100644 --- a/packages/api/src/atp-agent.ts +++ b/packages/api/src/atp-agent.ts @@ -7,21 +7,21 @@ import { XrpcClient, errorResponseBody, } from '@atproto/xrpc' -import { Agent } from './agent' +import { Agent } from './agent.js' import { ComAtprotoServerCreateAccount, ComAtprotoServerCreateSession, ComAtprotoServerGetSession, ComAtprotoServerNS, ComAtprotoServerRefreshSession, -} from './client' -import { schemas } from './client/lexicons' -import { SessionManager } from './session-manager' +} from './client/index.js' +import { schemas } from './client/lexicons.js' +import { SessionManager } from './session-manager.js' import { AtpAgentLoginOpts, AtpPersistSessionHandler, AtpSessionData, -} from './types' +} from './types.js' const ReadableStream = globalThis.ReadableStream as | typeof globalThis.ReadableStream diff --git a/packages/api/src/bsky-agent.ts b/packages/api/src/bsky-agent.ts index 5091101afcf..fbd5ee456dd 100644 --- a/packages/api/src/bsky-agent.ts +++ b/packages/api/src/bsky-agent.ts @@ -1,4 +1,4 @@ -import { AtpAgent } from './atp-agent' +import { AtpAgent } from './atp-agent.js' /** @deprecated use {@link AtpAgent} instead */ export class BskyAgent extends AtpAgent { diff --git a/packages/api/src/client/index.ts b/packages/api/src/client/index.ts deleted file mode 100644 index 6d87a8453b0..00000000000 --- a/packages/api/src/client/index.ts +++ /dev/null @@ -1,6116 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { - XrpcClient, - type FetchHandler, - type FetchHandlerOptions, -} from '@atproto/xrpc' -import { schemas } from './lexicons.js' -import { CID } from 'multiformats/cid' -import { type OmitKey, type Un$Typed } from './util.js' -import * as AppBskyActorDefs from './types/app/bsky/actor/defs.js' -import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences.js' -import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js' -import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.js' -import * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions.js' -import * as AppBskyActorProfile from './types/app/bsky/actor/profile.js' -import * as AppBskyActorPutPreferences from './types/app/bsky/actor/putPreferences.js' -import * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors.js' -import * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead.js' -import * as AppBskyActorStatus from './types/app/bsky/actor/status.js' -import * as AppBskyAgeassuranceBegin from './types/app/bsky/ageassurance/begin.js' -import * as AppBskyAgeassuranceDefs from './types/app/bsky/ageassurance/defs.js' -import * as AppBskyAgeassuranceGetConfig from './types/app/bsky/ageassurance/getConfig.js' -import * as AppBskyAgeassuranceGetState from './types/app/bsky/ageassurance/getState.js' -import * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/createBookmark.js' -import * as AppBskyBookmarkDefs from './types/app/bsky/bookmark/defs.js' -import * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js' -import * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js' -import * as AppBskyContactDefs from './types/app/bsky/contact/defs.js' -import * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js' -import * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js' -import * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js' -import * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js' -import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js' -import * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js' -import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js' -import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js' -import * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js' -import * as AppBskyDraftDefs from './types/app/bsky/draft/defs.js' -import * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js' -import * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js' -import * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js' -import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js' -import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js' -import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js' -import * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js' -import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js' -import * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js' -import * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js' -import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js' -import * as AppBskyFeedGenerator from './types/app/bsky/feed/generator.js' -import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js' -import * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes.js' -import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed.js' -import * as AppBskyFeedGetFeed from './types/app/bsky/feed/getFeed.js' -import * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.js' -import * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.js' -import * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js' -import * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js' -import * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js' -import * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js' -import * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js' -import * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js' -import * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js' -import * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js' -import * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline.js' -import * as AppBskyFeedLike from './types/app/bsky/feed/like.js' -import * as AppBskyFeedPost from './types/app/bsky/feed/post.js' -import * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js' -import * as AppBskyFeedRepost from './types/app/bsky/feed/repost.js' -import * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts.js' -import * as AppBskyFeedSendInteractions from './types/app/bsky/feed/sendInteractions.js' -import * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js' -import * as AppBskyGraphBlock from './types/app/bsky/graph/block.js' -import * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js' -import * as AppBskyGraphFollow from './types/app/bsky/graph/follow.js' -import * as AppBskyGraphGetActorStarterPacks from './types/app/bsky/graph/getActorStarterPacks.js' -import * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks.js' -import * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers.js' -import * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows.js' -import * as AppBskyGraphGetKnownFollowers from './types/app/bsky/graph/getKnownFollowers.js' -import * as AppBskyGraphGetList from './types/app/bsky/graph/getList.js' -import * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks.js' -import * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes.js' -import * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists.js' -import * as AppBskyGraphGetListsWithMembership from './types/app/bsky/graph/getListsWithMembership.js' -import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes.js' -import * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships.js' -import * as AppBskyGraphGetStarterPack from './types/app/bsky/graph/getStarterPack.js' -import * as AppBskyGraphGetStarterPacks from './types/app/bsky/graph/getStarterPacks.js' -import * as AppBskyGraphGetStarterPacksWithMembership from './types/app/bsky/graph/getStarterPacksWithMembership.js' -import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor.js' -import * as AppBskyGraphList from './types/app/bsky/graph/list.js' -import * as AppBskyGraphListblock from './types/app/bsky/graph/listblock.js' -import * as AppBskyGraphListitem from './types/app/bsky/graph/listitem.js' -import * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor.js' -import * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList.js' -import * as AppBskyGraphMuteThread from './types/app/bsky/graph/muteThread.js' -import * as AppBskyGraphSearchStarterPacks from './types/app/bsky/graph/searchStarterPacks.js' -import * as AppBskyGraphStarterpack from './types/app/bsky/graph/starterpack.js' -import * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor.js' -import * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList.js' -import * as AppBskyGraphUnmuteThread from './types/app/bsky/graph/unmuteThread.js' -import * as AppBskyGraphVerification from './types/app/bsky/graph/verification.js' -import * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js' -import * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js' -import * as AppBskyLabelerService from './types/app/bsky/labeler/service.js' -import * as AppBskyNotificationDeclaration from './types/app/bsky/notification/declaration.js' -import * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js' -import * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js' -import * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js' -import * as AppBskyNotificationListActivitySubscriptions from './types/app/bsky/notification/listActivitySubscriptions.js' -import * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js' -import * as AppBskyNotificationPutActivitySubscription from './types/app/bsky/notification/putActivitySubscription.js' -import * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js' -import * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js' -import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js' -import * as AppBskyNotificationUnregisterPush from './types/app/bsky/notification/unregisterPush.js' -import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js' -import * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js' -import * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs.js' -import * as AppBskyUnspeccedGetAgeAssuranceState from './types/app/bsky/unspecced/getAgeAssuranceState.js' -import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js' -import * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacks from './types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.js' -import * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.js' -import * as AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton from './types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.js' -import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js' -import * as AppBskyUnspeccedGetPostThreadOtherV2 from './types/app/bsky/unspecced/getPostThreadOtherV2.js' -import * as AppBskyUnspeccedGetPostThreadV2 from './types/app/bsky/unspecced/getPostThreadV2.js' -import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js' -import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js' -import * as AppBskyUnspeccedGetSuggestedOnboardingUsers from './types/app/bsky/unspecced/getSuggestedOnboardingUsers.js' -import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js' -import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js' -import * as AppBskyUnspeccedGetSuggestedUsers from './types/app/bsky/unspecced/getSuggestedUsers.js' -import * as AppBskyUnspeccedGetSuggestedUsersForDiscover from './types/app/bsky/unspecced/getSuggestedUsersForDiscover.js' -import * as AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.js' -import * as AppBskyUnspeccedGetSuggestedUsersForExplore from './types/app/bsky/unspecced/getSuggestedUsersForExplore.js' -import * as AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.js' -import * as AppBskyUnspeccedGetSuggestedUsersForSeeMore from './types/app/bsky/unspecced/getSuggestedUsersForSeeMore.js' -import * as AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.js' -import * as AppBskyUnspeccedGetSuggestedUsersSkeleton from './types/app/bsky/unspecced/getSuggestedUsersSkeleton.js' -import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js' -import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions.js' -import * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics.js' -import * as AppBskyUnspeccedGetTrends from './types/app/bsky/unspecced/getTrends.js' -import * as AppBskyUnspeccedGetTrendsSkeleton from './types/app/bsky/unspecced/getTrendsSkeleton.js' -import * as AppBskyUnspeccedInitAgeAssurance from './types/app/bsky/unspecced/initAgeAssurance.js' -import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js' -import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js' -import * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js' -import * as AppBskyVideoDefs from './types/app/bsky/video/defs.js' -import * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus.js' -import * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits.js' -import * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js' -import * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.js' -import * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js' -import * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js' -import * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js' -import * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js' -import * as ChatBskyConvoAddReaction from './types/chat/bsky/convo/addReaction.js' -import * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js' -import * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js' -import * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js' -import * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js' -import * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js' -import * as ChatBskyConvoGetConvoMembers from './types/chat/bsky/convo/getConvoMembers.js' -import * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js' -import * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js' -import * as ChatBskyConvoLeaveConvo from './types/chat/bsky/convo/leaveConvo.js' -import * as ChatBskyConvoListConvoRequests from './types/chat/bsky/convo/listConvoRequests.js' -import * as ChatBskyConvoListConvos from './types/chat/bsky/convo/listConvos.js' -import * as ChatBskyConvoLockConvo from './types/chat/bsky/convo/lockConvo.js' -import * as ChatBskyConvoMuteConvo from './types/chat/bsky/convo/muteConvo.js' -import * as ChatBskyConvoRemoveReaction from './types/chat/bsky/convo/removeReaction.js' -import * as ChatBskyConvoSendMessage from './types/chat/bsky/convo/sendMessage.js' -import * as ChatBskyConvoSendMessageBatch from './types/chat/bsky/convo/sendMessageBatch.js' -import * as ChatBskyConvoUnlockConvo from './types/chat/bsky/convo/unlockConvo.js' -import * as ChatBskyConvoUnmuteConvo from './types/chat/bsky/convo/unmuteConvo.js' -import * as ChatBskyConvoUpdateAllRead from './types/chat/bsky/convo/updateAllRead.js' -import * as ChatBskyConvoUpdateRead from './types/chat/bsky/convo/updateRead.js' -import * as ChatBskyGroupAddMembers from './types/chat/bsky/group/addMembers.js' -import * as ChatBskyGroupApproveJoinRequest from './types/chat/bsky/group/approveJoinRequest.js' -import * as ChatBskyGroupCreateGroup from './types/chat/bsky/group/createGroup.js' -import * as ChatBskyGroupCreateJoinLink from './types/chat/bsky/group/createJoinLink.js' -import * as ChatBskyGroupDefs from './types/chat/bsky/group/defs.js' -import * as ChatBskyGroupDisableJoinLink from './types/chat/bsky/group/disableJoinLink.js' -import * as ChatBskyGroupEditGroup from './types/chat/bsky/group/editGroup.js' -import * as ChatBskyGroupEditJoinLink from './types/chat/bsky/group/editJoinLink.js' -import * as ChatBskyGroupEnableJoinLink from './types/chat/bsky/group/enableJoinLink.js' -import * as ChatBskyGroupGetGroupPublicInfo from './types/chat/bsky/group/getGroupPublicInfo.js' -import * as ChatBskyGroupListJoinRequests from './types/chat/bsky/group/listJoinRequests.js' -import * as ChatBskyGroupRejectJoinRequest from './types/chat/bsky/group/rejectJoinRequest.js' -import * as ChatBskyGroupRemoveMembers from './types/chat/bsky/group/removeMembers.js' -import * as ChatBskyGroupRequestJoin from './types/chat/bsky/group/requestJoin.js' -import * as ChatBskyModerationGetActorMetadata from './types/chat/bsky/moderation/getActorMetadata.js' -import * as ChatBskyModerationGetMessageContext from './types/chat/bsky/moderation/getMessageContext.js' -import * as ChatBskyModerationSubscribeModEvents from './types/chat/bsky/moderation/subscribeModEvents.js' -import * as ChatBskyModerationUpdateActorAccess from './types/chat/bsky/moderation/updateActorAccess.js' -import * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs.js' -import * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount.js' -import * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites.js' -import * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes.js' -import * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites.js' -import * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo.js' -import * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos.js' -import * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes.js' -import * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus.js' -import * as ComAtprotoAdminSearchAccounts from './types/com/atproto/admin/searchAccounts.js' -import * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail.js' -import * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail.js' -import * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle.js' -import * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword.js' -import * as ComAtprotoAdminUpdateAccountSigningKey from './types/com/atproto/admin/updateAccountSigningKey.js' -import * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus.js' -import * as ComAtprotoIdentityDefs from './types/com/atproto/identity/defs.js' -import * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials.js' -import * as ComAtprotoIdentityRefreshIdentity from './types/com/atproto/identity/refreshIdentity.js' -import * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature.js' -import * as ComAtprotoIdentityResolveDid from './types/com/atproto/identity/resolveDid.js' -import * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle.js' -import * as ComAtprotoIdentityResolveIdentity from './types/com/atproto/identity/resolveIdentity.js' -import * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation.js' -import * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation.js' -import * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle.js' -import * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.js' -import * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels.js' -import * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels.js' -import * as ComAtprotoLexiconResolveLexicon from './types/com/atproto/lexicon/resolveLexicon.js' -import * as ComAtprotoLexiconSchema from './types/com/atproto/lexicon/schema.js' -import * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport.js' -import * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs.js' -import * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites.js' -import * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord.js' -import * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs.js' -import * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord.js' -import * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo.js' -import * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord.js' -import * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo.js' -import * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs.js' -import * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords.js' -import * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord.js' -import * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js' -import * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob.js' -import * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount.js' -import * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus.js' -import * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail.js' -import * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount.js' -import * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword.js' -import * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode.js' -import * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes.js' -import * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession.js' -import * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount.js' -import * as ComAtprotoServerDefs from './types/com/atproto/server/defs.js' -import * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount.js' -import * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession.js' -import * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer.js' -import * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes.js' -import * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth.js' -import * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession.js' -import * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords.js' -import * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession.js' -import * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete.js' -import * as ComAtprotoServerRequestEmailConfirmation from './types/com/atproto/server/requestEmailConfirmation.js' -import * as ComAtprotoServerRequestEmailUpdate from './types/com/atproto/server/requestEmailUpdate.js' -import * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset.js' -import * as ComAtprotoServerReserveSigningKey from './types/com/atproto/server/reserveSigningKey.js' -import * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword.js' -import * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword.js' -import * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail.js' -import * as ComAtprotoSyncDefs from './types/com/atproto/sync/defs.js' -import * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob.js' -import * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks.js' -import * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout.js' -import * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead.js' -import * as ComAtprotoSyncGetHostStatus from './types/com/atproto/sync/getHostStatus.js' -import * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit.js' -import * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord.js' -import * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo.js' -import * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus.js' -import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs.js' -import * as ComAtprotoSyncListHosts from './types/com/atproto/sync/listHosts.js' -import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos.js' -import * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection.js' -import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate.js' -import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl.js' -import * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos.js' -import * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle.js' -import * as ComAtprotoTempCheckHandleAvailability from './types/com/atproto/temp/checkHandleAvailability.js' -import * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue.js' -import * as ComAtprotoTempDereferenceScope from './types/com/atproto/temp/dereferenceScope.js' -import * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels.js' -import * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification.js' -import * as ComAtprotoTempRevokeAccountCredentials from './types/com/atproto/temp/revokeAccountCredentials.js' -import * as ComGermnetworkDeclaration from './types/com/germnetwork/declaration.js' -import * as ToolsOzoneCommunicationCreateTemplate from './types/tools/ozone/communication/createTemplate.js' -import * as ToolsOzoneCommunicationDefs from './types/tools/ozone/communication/defs.js' -import * as ToolsOzoneCommunicationDeleteTemplate from './types/tools/ozone/communication/deleteTemplate.js' -import * as ToolsOzoneCommunicationListTemplates from './types/tools/ozone/communication/listTemplates.js' -import * as ToolsOzoneCommunicationUpdateTemplate from './types/tools/ozone/communication/updateTemplate.js' -import * as ToolsOzoneHostingGetAccountHistory from './types/tools/ozone/hosting/getAccountHistory.js' -import * as ToolsOzoneModerationCancelScheduledActions from './types/tools/ozone/moderation/cancelScheduledActions.js' -import * as ToolsOzoneModerationDefs from './types/tools/ozone/moderation/defs.js' -import * as ToolsOzoneModerationEmitEvent from './types/tools/ozone/moderation/emitEvent.js' -import * as ToolsOzoneModerationGetAccountTimeline from './types/tools/ozone/moderation/getAccountTimeline.js' -import * as ToolsOzoneModerationGetEvent from './types/tools/ozone/moderation/getEvent.js' -import * as ToolsOzoneModerationGetRecord from './types/tools/ozone/moderation/getRecord.js' -import * as ToolsOzoneModerationGetRecords from './types/tools/ozone/moderation/getRecords.js' -import * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/getRepo.js' -import * as ToolsOzoneModerationGetReporterStats from './types/tools/ozone/moderation/getReporterStats.js' -import * as ToolsOzoneModerationGetRepos from './types/tools/ozone/moderation/getRepos.js' -import * as ToolsOzoneModerationGetSubjects from './types/tools/ozone/moderation/getSubjects.js' -import * as ToolsOzoneModerationListScheduledActions from './types/tools/ozone/moderation/listScheduledActions.js' -import * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents.js' -import * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses.js' -import * as ToolsOzoneModerationScheduleAction from './types/tools/ozone/moderation/scheduleAction.js' -import * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos.js' -import * as ToolsOzoneReportDefs from './types/tools/ozone/report/defs.js' -import * as ToolsOzoneSafelinkAddRule from './types/tools/ozone/safelink/addRule.js' -import * as ToolsOzoneSafelinkDefs from './types/tools/ozone/safelink/defs.js' -import * as ToolsOzoneSafelinkQueryEvents from './types/tools/ozone/safelink/queryEvents.js' -import * as ToolsOzoneSafelinkQueryRules from './types/tools/ozone/safelink/queryRules.js' -import * as ToolsOzoneSafelinkRemoveRule from './types/tools/ozone/safelink/removeRule.js' -import * as ToolsOzoneSafelinkUpdateRule from './types/tools/ozone/safelink/updateRule.js' -import * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig.js' -import * as ToolsOzoneSetAddValues from './types/tools/ozone/set/addValues.js' -import * as ToolsOzoneSetDefs from './types/tools/ozone/set/defs.js' -import * as ToolsOzoneSetDeleteSet from './types/tools/ozone/set/deleteSet.js' -import * as ToolsOzoneSetDeleteValues from './types/tools/ozone/set/deleteValues.js' -import * as ToolsOzoneSetGetValues from './types/tools/ozone/set/getValues.js' -import * as ToolsOzoneSetQuerySets from './types/tools/ozone/set/querySets.js' -import * as ToolsOzoneSetUpsertSet from './types/tools/ozone/set/upsertSet.js' -import * as ToolsOzoneSettingDefs from './types/tools/ozone/setting/defs.js' -import * as ToolsOzoneSettingListOptions from './types/tools/ozone/setting/listOptions.js' -import * as ToolsOzoneSettingRemoveOptions from './types/tools/ozone/setting/removeOptions.js' -import * as ToolsOzoneSettingUpsertOption from './types/tools/ozone/setting/upsertOption.js' -import * as ToolsOzoneSignatureDefs from './types/tools/ozone/signature/defs.js' -import * as ToolsOzoneSignatureFindCorrelation from './types/tools/ozone/signature/findCorrelation.js' -import * as ToolsOzoneSignatureFindRelatedAccounts from './types/tools/ozone/signature/findRelatedAccounts.js' -import * as ToolsOzoneSignatureSearchAccounts from './types/tools/ozone/signature/searchAccounts.js' -import * as ToolsOzoneTeamAddMember from './types/tools/ozone/team/addMember.js' -import * as ToolsOzoneTeamDefs from './types/tools/ozone/team/defs.js' -import * as ToolsOzoneTeamDeleteMember from './types/tools/ozone/team/deleteMember.js' -import * as ToolsOzoneTeamListMembers from './types/tools/ozone/team/listMembers.js' -import * as ToolsOzoneTeamUpdateMember from './types/tools/ozone/team/updateMember.js' -import * as ToolsOzoneVerificationDefs from './types/tools/ozone/verification/defs.js' -import * as ToolsOzoneVerificationGrantVerifications from './types/tools/ozone/verification/grantVerifications.js' -import * as ToolsOzoneVerificationListVerifications from './types/tools/ozone/verification/listVerifications.js' -import * as ToolsOzoneVerificationRevokeVerifications from './types/tools/ozone/verification/revokeVerifications.js' - -export * as AppBskyActorDefs from './types/app/bsky/actor/defs.js' -export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences.js' -export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile.js' -export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles.js' -export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions.js' -export * as AppBskyActorProfile from './types/app/bsky/actor/profile.js' -export * as AppBskyActorPutPreferences from './types/app/bsky/actor/putPreferences.js' -export * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors.js' -export * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead.js' -export * as AppBskyActorStatus from './types/app/bsky/actor/status.js' -export * as AppBskyAgeassuranceBegin from './types/app/bsky/ageassurance/begin.js' -export * as AppBskyAgeassuranceDefs from './types/app/bsky/ageassurance/defs.js' -export * as AppBskyAgeassuranceGetConfig from './types/app/bsky/ageassurance/getConfig.js' -export * as AppBskyAgeassuranceGetState from './types/app/bsky/ageassurance/getState.js' -export * as AppBskyBookmarkCreateBookmark from './types/app/bsky/bookmark/createBookmark.js' -export * as AppBskyBookmarkDefs from './types/app/bsky/bookmark/defs.js' -export * as AppBskyBookmarkDeleteBookmark from './types/app/bsky/bookmark/deleteBookmark.js' -export * as AppBskyBookmarkGetBookmarks from './types/app/bsky/bookmark/getBookmarks.js' -export * as AppBskyContactDefs from './types/app/bsky/contact/defs.js' -export * as AppBskyContactDismissMatch from './types/app/bsky/contact/dismissMatch.js' -export * as AppBskyContactGetMatches from './types/app/bsky/contact/getMatches.js' -export * as AppBskyContactGetSyncStatus from './types/app/bsky/contact/getSyncStatus.js' -export * as AppBskyContactImportContacts from './types/app/bsky/contact/importContacts.js' -export * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.js' -export * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js' -export * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js' -export * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js' -export * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js' -export * as AppBskyDraftDefs from './types/app/bsky/draft/defs.js' -export * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js' -export * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js' -export * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js' -export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js' -export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js' -export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js' -export * as AppBskyEmbedRecord from './types/app/bsky/embed/record.js' -export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia.js' -export * as AppBskyEmbedVideo from './types/app/bsky/embed/video.js' -export * as AppBskyFeedDefs from './types/app/bsky/feed/defs.js' -export * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator.js' -export * as AppBskyFeedGenerator from './types/app/bsky/feed/generator.js' -export * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds.js' -export * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes.js' -export * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed.js' -export * as AppBskyFeedGetFeed from './types/app/bsky/feed/getFeed.js' -export * as AppBskyFeedGetFeedGenerator from './types/app/bsky/feed/getFeedGenerator.js' -export * as AppBskyFeedGetFeedGenerators from './types/app/bsky/feed/getFeedGenerators.js' -export * as AppBskyFeedGetFeedSkeleton from './types/app/bsky/feed/getFeedSkeleton.js' -export * as AppBskyFeedGetLikes from './types/app/bsky/feed/getLikes.js' -export * as AppBskyFeedGetListFeed from './types/app/bsky/feed/getListFeed.js' -export * as AppBskyFeedGetPostThread from './types/app/bsky/feed/getPostThread.js' -export * as AppBskyFeedGetPosts from './types/app/bsky/feed/getPosts.js' -export * as AppBskyFeedGetQuotes from './types/app/bsky/feed/getQuotes.js' -export * as AppBskyFeedGetRepostedBy from './types/app/bsky/feed/getRepostedBy.js' -export * as AppBskyFeedGetSuggestedFeeds from './types/app/bsky/feed/getSuggestedFeeds.js' -export * as AppBskyFeedGetTimeline from './types/app/bsky/feed/getTimeline.js' -export * as AppBskyFeedLike from './types/app/bsky/feed/like.js' -export * as AppBskyFeedPost from './types/app/bsky/feed/post.js' -export * as AppBskyFeedPostgate from './types/app/bsky/feed/postgate.js' -export * as AppBskyFeedRepost from './types/app/bsky/feed/repost.js' -export * as AppBskyFeedSearchPosts from './types/app/bsky/feed/searchPosts.js' -export * as AppBskyFeedSendInteractions from './types/app/bsky/feed/sendInteractions.js' -export * as AppBskyFeedThreadgate from './types/app/bsky/feed/threadgate.js' -export * as AppBskyGraphBlock from './types/app/bsky/graph/block.js' -export * as AppBskyGraphDefs from './types/app/bsky/graph/defs.js' -export * as AppBskyGraphFollow from './types/app/bsky/graph/follow.js' -export * as AppBskyGraphGetActorStarterPacks from './types/app/bsky/graph/getActorStarterPacks.js' -export * as AppBskyGraphGetBlocks from './types/app/bsky/graph/getBlocks.js' -export * as AppBskyGraphGetFollowers from './types/app/bsky/graph/getFollowers.js' -export * as AppBskyGraphGetFollows from './types/app/bsky/graph/getFollows.js' -export * as AppBskyGraphGetKnownFollowers from './types/app/bsky/graph/getKnownFollowers.js' -export * as AppBskyGraphGetList from './types/app/bsky/graph/getList.js' -export * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks.js' -export * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes.js' -export * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists.js' -export * as AppBskyGraphGetListsWithMembership from './types/app/bsky/graph/getListsWithMembership.js' -export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes.js' -export * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships.js' -export * as AppBskyGraphGetStarterPack from './types/app/bsky/graph/getStarterPack.js' -export * as AppBskyGraphGetStarterPacks from './types/app/bsky/graph/getStarterPacks.js' -export * as AppBskyGraphGetStarterPacksWithMembership from './types/app/bsky/graph/getStarterPacksWithMembership.js' -export * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor.js' -export * as AppBskyGraphList from './types/app/bsky/graph/list.js' -export * as AppBskyGraphListblock from './types/app/bsky/graph/listblock.js' -export * as AppBskyGraphListitem from './types/app/bsky/graph/listitem.js' -export * as AppBskyGraphMuteActor from './types/app/bsky/graph/muteActor.js' -export * as AppBskyGraphMuteActorList from './types/app/bsky/graph/muteActorList.js' -export * as AppBskyGraphMuteThread from './types/app/bsky/graph/muteThread.js' -export * as AppBskyGraphSearchStarterPacks from './types/app/bsky/graph/searchStarterPacks.js' -export * as AppBskyGraphStarterpack from './types/app/bsky/graph/starterpack.js' -export * as AppBskyGraphUnmuteActor from './types/app/bsky/graph/unmuteActor.js' -export * as AppBskyGraphUnmuteActorList from './types/app/bsky/graph/unmuteActorList.js' -export * as AppBskyGraphUnmuteThread from './types/app/bsky/graph/unmuteThread.js' -export * as AppBskyGraphVerification from './types/app/bsky/graph/verification.js' -export * as AppBskyLabelerDefs from './types/app/bsky/labeler/defs.js' -export * as AppBskyLabelerGetServices from './types/app/bsky/labeler/getServices.js' -export * as AppBskyLabelerService from './types/app/bsky/labeler/service.js' -export * as AppBskyNotificationDeclaration from './types/app/bsky/notification/declaration.js' -export * as AppBskyNotificationDefs from './types/app/bsky/notification/defs.js' -export * as AppBskyNotificationGetPreferences from './types/app/bsky/notification/getPreferences.js' -export * as AppBskyNotificationGetUnreadCount from './types/app/bsky/notification/getUnreadCount.js' -export * as AppBskyNotificationListActivitySubscriptions from './types/app/bsky/notification/listActivitySubscriptions.js' -export * as AppBskyNotificationListNotifications from './types/app/bsky/notification/listNotifications.js' -export * as AppBskyNotificationPutActivitySubscription from './types/app/bsky/notification/putActivitySubscription.js' -export * as AppBskyNotificationPutPreferences from './types/app/bsky/notification/putPreferences.js' -export * as AppBskyNotificationPutPreferencesV2 from './types/app/bsky/notification/putPreferencesV2.js' -export * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush.js' -export * as AppBskyNotificationUnregisterPush from './types/app/bsky/notification/unregisterPush.js' -export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js' -export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet.js' -export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs.js' -export * as AppBskyUnspeccedGetAgeAssuranceState from './types/app/bsky/unspecced/getAgeAssuranceState.js' -export * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js' -export * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacks from './types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.js' -export * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.js' -export * as AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton from './types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.js' -export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js' -export * as AppBskyUnspeccedGetPostThreadOtherV2 from './types/app/bsky/unspecced/getPostThreadOtherV2.js' -export * as AppBskyUnspeccedGetPostThreadV2 from './types/app/bsky/unspecced/getPostThreadV2.js' -export * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js' -export * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js' -export * as AppBskyUnspeccedGetSuggestedOnboardingUsers from './types/app/bsky/unspecced/getSuggestedOnboardingUsers.js' -export * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js' -export * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js' -export * as AppBskyUnspeccedGetSuggestedUsers from './types/app/bsky/unspecced/getSuggestedUsers.js' -export * as AppBskyUnspeccedGetSuggestedUsersForDiscover from './types/app/bsky/unspecced/getSuggestedUsersForDiscover.js' -export * as AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.js' -export * as AppBskyUnspeccedGetSuggestedUsersForExplore from './types/app/bsky/unspecced/getSuggestedUsersForExplore.js' -export * as AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.js' -export * as AppBskyUnspeccedGetSuggestedUsersForSeeMore from './types/app/bsky/unspecced/getSuggestedUsersForSeeMore.js' -export * as AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton from './types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.js' -export * as AppBskyUnspeccedGetSuggestedUsersSkeleton from './types/app/bsky/unspecced/getSuggestedUsersSkeleton.js' -export * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js' -export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions.js' -export * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics.js' -export * as AppBskyUnspeccedGetTrends from './types/app/bsky/unspecced/getTrends.js' -export * as AppBskyUnspeccedGetTrendsSkeleton from './types/app/bsky/unspecced/getTrendsSkeleton.js' -export * as AppBskyUnspeccedInitAgeAssurance from './types/app/bsky/unspecced/initAgeAssurance.js' -export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton.js' -export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton.js' -export * as AppBskyUnspeccedSearchStarterPacksSkeleton from './types/app/bsky/unspecced/searchStarterPacksSkeleton.js' -export * as AppBskyVideoDefs from './types/app/bsky/video/defs.js' -export * as AppBskyVideoGetJobStatus from './types/app/bsky/video/getJobStatus.js' -export * as AppBskyVideoGetUploadLimits from './types/app/bsky/video/getUploadLimits.js' -export * as AppBskyVideoUploadVideo from './types/app/bsky/video/uploadVideo.js' -export * as ChatBskyActorDeclaration from './types/chat/bsky/actor/declaration.js' -export * as ChatBskyActorDefs from './types/chat/bsky/actor/defs.js' -export * as ChatBskyActorDeleteAccount from './types/chat/bsky/actor/deleteAccount.js' -export * as ChatBskyActorExportAccountData from './types/chat/bsky/actor/exportAccountData.js' -export * as ChatBskyConvoAcceptConvo from './types/chat/bsky/convo/acceptConvo.js' -export * as ChatBskyConvoAddReaction from './types/chat/bsky/convo/addReaction.js' -export * as ChatBskyConvoDefs from './types/chat/bsky/convo/defs.js' -export * as ChatBskyConvoDeleteMessageForSelf from './types/chat/bsky/convo/deleteMessageForSelf.js' -export * as ChatBskyConvoGetConvo from './types/chat/bsky/convo/getConvo.js' -export * as ChatBskyConvoGetConvoAvailability from './types/chat/bsky/convo/getConvoAvailability.js' -export * as ChatBskyConvoGetConvoForMembers from './types/chat/bsky/convo/getConvoForMembers.js' -export * as ChatBskyConvoGetConvoMembers from './types/chat/bsky/convo/getConvoMembers.js' -export * as ChatBskyConvoGetLog from './types/chat/bsky/convo/getLog.js' -export * as ChatBskyConvoGetMessages from './types/chat/bsky/convo/getMessages.js' -export * as ChatBskyConvoLeaveConvo from './types/chat/bsky/convo/leaveConvo.js' -export * as ChatBskyConvoListConvoRequests from './types/chat/bsky/convo/listConvoRequests.js' -export * as ChatBskyConvoListConvos from './types/chat/bsky/convo/listConvos.js' -export * as ChatBskyConvoLockConvo from './types/chat/bsky/convo/lockConvo.js' -export * as ChatBskyConvoMuteConvo from './types/chat/bsky/convo/muteConvo.js' -export * as ChatBskyConvoRemoveReaction from './types/chat/bsky/convo/removeReaction.js' -export * as ChatBskyConvoSendMessage from './types/chat/bsky/convo/sendMessage.js' -export * as ChatBskyConvoSendMessageBatch from './types/chat/bsky/convo/sendMessageBatch.js' -export * as ChatBskyConvoUnlockConvo from './types/chat/bsky/convo/unlockConvo.js' -export * as ChatBskyConvoUnmuteConvo from './types/chat/bsky/convo/unmuteConvo.js' -export * as ChatBskyConvoUpdateAllRead from './types/chat/bsky/convo/updateAllRead.js' -export * as ChatBskyConvoUpdateRead from './types/chat/bsky/convo/updateRead.js' -export * as ChatBskyGroupAddMembers from './types/chat/bsky/group/addMembers.js' -export * as ChatBskyGroupApproveJoinRequest from './types/chat/bsky/group/approveJoinRequest.js' -export * as ChatBskyGroupCreateGroup from './types/chat/bsky/group/createGroup.js' -export * as ChatBskyGroupCreateJoinLink from './types/chat/bsky/group/createJoinLink.js' -export * as ChatBskyGroupDefs from './types/chat/bsky/group/defs.js' -export * as ChatBskyGroupDisableJoinLink from './types/chat/bsky/group/disableJoinLink.js' -export * as ChatBskyGroupEditGroup from './types/chat/bsky/group/editGroup.js' -export * as ChatBskyGroupEditJoinLink from './types/chat/bsky/group/editJoinLink.js' -export * as ChatBskyGroupEnableJoinLink from './types/chat/bsky/group/enableJoinLink.js' -export * as ChatBskyGroupGetGroupPublicInfo from './types/chat/bsky/group/getGroupPublicInfo.js' -export * as ChatBskyGroupListJoinRequests from './types/chat/bsky/group/listJoinRequests.js' -export * as ChatBskyGroupRejectJoinRequest from './types/chat/bsky/group/rejectJoinRequest.js' -export * as ChatBskyGroupRemoveMembers from './types/chat/bsky/group/removeMembers.js' -export * as ChatBskyGroupRequestJoin from './types/chat/bsky/group/requestJoin.js' -export * as ChatBskyModerationGetActorMetadata from './types/chat/bsky/moderation/getActorMetadata.js' -export * as ChatBskyModerationGetMessageContext from './types/chat/bsky/moderation/getMessageContext.js' -export * as ChatBskyModerationSubscribeModEvents from './types/chat/bsky/moderation/subscribeModEvents.js' -export * as ChatBskyModerationUpdateActorAccess from './types/chat/bsky/moderation/updateActorAccess.js' -export * as ComAtprotoAdminDefs from './types/com/atproto/admin/defs.js' -export * as ComAtprotoAdminDeleteAccount from './types/com/atproto/admin/deleteAccount.js' -export * as ComAtprotoAdminDisableAccountInvites from './types/com/atproto/admin/disableAccountInvites.js' -export * as ComAtprotoAdminDisableInviteCodes from './types/com/atproto/admin/disableInviteCodes.js' -export * as ComAtprotoAdminEnableAccountInvites from './types/com/atproto/admin/enableAccountInvites.js' -export * as ComAtprotoAdminGetAccountInfo from './types/com/atproto/admin/getAccountInfo.js' -export * as ComAtprotoAdminGetAccountInfos from './types/com/atproto/admin/getAccountInfos.js' -export * as ComAtprotoAdminGetInviteCodes from './types/com/atproto/admin/getInviteCodes.js' -export * as ComAtprotoAdminGetSubjectStatus from './types/com/atproto/admin/getSubjectStatus.js' -export * as ComAtprotoAdminSearchAccounts from './types/com/atproto/admin/searchAccounts.js' -export * as ComAtprotoAdminSendEmail from './types/com/atproto/admin/sendEmail.js' -export * as ComAtprotoAdminUpdateAccountEmail from './types/com/atproto/admin/updateAccountEmail.js' -export * as ComAtprotoAdminUpdateAccountHandle from './types/com/atproto/admin/updateAccountHandle.js' -export * as ComAtprotoAdminUpdateAccountPassword from './types/com/atproto/admin/updateAccountPassword.js' -export * as ComAtprotoAdminUpdateAccountSigningKey from './types/com/atproto/admin/updateAccountSigningKey.js' -export * as ComAtprotoAdminUpdateSubjectStatus from './types/com/atproto/admin/updateSubjectStatus.js' -export * as ComAtprotoIdentityDefs from './types/com/atproto/identity/defs.js' -export * as ComAtprotoIdentityGetRecommendedDidCredentials from './types/com/atproto/identity/getRecommendedDidCredentials.js' -export * as ComAtprotoIdentityRefreshIdentity from './types/com/atproto/identity/refreshIdentity.js' -export * as ComAtprotoIdentityRequestPlcOperationSignature from './types/com/atproto/identity/requestPlcOperationSignature.js' -export * as ComAtprotoIdentityResolveDid from './types/com/atproto/identity/resolveDid.js' -export * as ComAtprotoIdentityResolveHandle from './types/com/atproto/identity/resolveHandle.js' -export * as ComAtprotoIdentityResolveIdentity from './types/com/atproto/identity/resolveIdentity.js' -export * as ComAtprotoIdentitySignPlcOperation from './types/com/atproto/identity/signPlcOperation.js' -export * as ComAtprotoIdentitySubmitPlcOperation from './types/com/atproto/identity/submitPlcOperation.js' -export * as ComAtprotoIdentityUpdateHandle from './types/com/atproto/identity/updateHandle.js' -export * as ComAtprotoLabelDefs from './types/com/atproto/label/defs.js' -export * as ComAtprotoLabelQueryLabels from './types/com/atproto/label/queryLabels.js' -export * as ComAtprotoLabelSubscribeLabels from './types/com/atproto/label/subscribeLabels.js' -export * as ComAtprotoLexiconResolveLexicon from './types/com/atproto/lexicon/resolveLexicon.js' -export * as ComAtprotoLexiconSchema from './types/com/atproto/lexicon/schema.js' -export * as ComAtprotoModerationCreateReport from './types/com/atproto/moderation/createReport.js' -export * as ComAtprotoModerationDefs from './types/com/atproto/moderation/defs.js' -export * as ComAtprotoRepoApplyWrites from './types/com/atproto/repo/applyWrites.js' -export * as ComAtprotoRepoCreateRecord from './types/com/atproto/repo/createRecord.js' -export * as ComAtprotoRepoDefs from './types/com/atproto/repo/defs.js' -export * as ComAtprotoRepoDeleteRecord from './types/com/atproto/repo/deleteRecord.js' -export * as ComAtprotoRepoDescribeRepo from './types/com/atproto/repo/describeRepo.js' -export * as ComAtprotoRepoGetRecord from './types/com/atproto/repo/getRecord.js' -export * as ComAtprotoRepoImportRepo from './types/com/atproto/repo/importRepo.js' -export * as ComAtprotoRepoListMissingBlobs from './types/com/atproto/repo/listMissingBlobs.js' -export * as ComAtprotoRepoListRecords from './types/com/atproto/repo/listRecords.js' -export * as ComAtprotoRepoPutRecord from './types/com/atproto/repo/putRecord.js' -export * as ComAtprotoRepoStrongRef from './types/com/atproto/repo/strongRef.js' -export * as ComAtprotoRepoUploadBlob from './types/com/atproto/repo/uploadBlob.js' -export * as ComAtprotoServerActivateAccount from './types/com/atproto/server/activateAccount.js' -export * as ComAtprotoServerCheckAccountStatus from './types/com/atproto/server/checkAccountStatus.js' -export * as ComAtprotoServerConfirmEmail from './types/com/atproto/server/confirmEmail.js' -export * as ComAtprotoServerCreateAccount from './types/com/atproto/server/createAccount.js' -export * as ComAtprotoServerCreateAppPassword from './types/com/atproto/server/createAppPassword.js' -export * as ComAtprotoServerCreateInviteCode from './types/com/atproto/server/createInviteCode.js' -export * as ComAtprotoServerCreateInviteCodes from './types/com/atproto/server/createInviteCodes.js' -export * as ComAtprotoServerCreateSession from './types/com/atproto/server/createSession.js' -export * as ComAtprotoServerDeactivateAccount from './types/com/atproto/server/deactivateAccount.js' -export * as ComAtprotoServerDefs from './types/com/atproto/server/defs.js' -export * as ComAtprotoServerDeleteAccount from './types/com/atproto/server/deleteAccount.js' -export * as ComAtprotoServerDeleteSession from './types/com/atproto/server/deleteSession.js' -export * as ComAtprotoServerDescribeServer from './types/com/atproto/server/describeServer.js' -export * as ComAtprotoServerGetAccountInviteCodes from './types/com/atproto/server/getAccountInviteCodes.js' -export * as ComAtprotoServerGetServiceAuth from './types/com/atproto/server/getServiceAuth.js' -export * as ComAtprotoServerGetSession from './types/com/atproto/server/getSession.js' -export * as ComAtprotoServerListAppPasswords from './types/com/atproto/server/listAppPasswords.js' -export * as ComAtprotoServerRefreshSession from './types/com/atproto/server/refreshSession.js' -export * as ComAtprotoServerRequestAccountDelete from './types/com/atproto/server/requestAccountDelete.js' -export * as ComAtprotoServerRequestEmailConfirmation from './types/com/atproto/server/requestEmailConfirmation.js' -export * as ComAtprotoServerRequestEmailUpdate from './types/com/atproto/server/requestEmailUpdate.js' -export * as ComAtprotoServerRequestPasswordReset from './types/com/atproto/server/requestPasswordReset.js' -export * as ComAtprotoServerReserveSigningKey from './types/com/atproto/server/reserveSigningKey.js' -export * as ComAtprotoServerResetPassword from './types/com/atproto/server/resetPassword.js' -export * as ComAtprotoServerRevokeAppPassword from './types/com/atproto/server/revokeAppPassword.js' -export * as ComAtprotoServerUpdateEmail from './types/com/atproto/server/updateEmail.js' -export * as ComAtprotoSyncDefs from './types/com/atproto/sync/defs.js' -export * as ComAtprotoSyncGetBlob from './types/com/atproto/sync/getBlob.js' -export * as ComAtprotoSyncGetBlocks from './types/com/atproto/sync/getBlocks.js' -export * as ComAtprotoSyncGetCheckout from './types/com/atproto/sync/getCheckout.js' -export * as ComAtprotoSyncGetHead from './types/com/atproto/sync/getHead.js' -export * as ComAtprotoSyncGetHostStatus from './types/com/atproto/sync/getHostStatus.js' -export * as ComAtprotoSyncGetLatestCommit from './types/com/atproto/sync/getLatestCommit.js' -export * as ComAtprotoSyncGetRecord from './types/com/atproto/sync/getRecord.js' -export * as ComAtprotoSyncGetRepo from './types/com/atproto/sync/getRepo.js' -export * as ComAtprotoSyncGetRepoStatus from './types/com/atproto/sync/getRepoStatus.js' -export * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs.js' -export * as ComAtprotoSyncListHosts from './types/com/atproto/sync/listHosts.js' -export * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos.js' -export * as ComAtprotoSyncListReposByCollection from './types/com/atproto/sync/listReposByCollection.js' -export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate.js' -export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl.js' -export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos.js' -export * as ComAtprotoTempAddReservedHandle from './types/com/atproto/temp/addReservedHandle.js' -export * as ComAtprotoTempCheckHandleAvailability from './types/com/atproto/temp/checkHandleAvailability.js' -export * as ComAtprotoTempCheckSignupQueue from './types/com/atproto/temp/checkSignupQueue.js' -export * as ComAtprotoTempDereferenceScope from './types/com/atproto/temp/dereferenceScope.js' -export * as ComAtprotoTempFetchLabels from './types/com/atproto/temp/fetchLabels.js' -export * as ComAtprotoTempRequestPhoneVerification from './types/com/atproto/temp/requestPhoneVerification.js' -export * as ComAtprotoTempRevokeAccountCredentials from './types/com/atproto/temp/revokeAccountCredentials.js' -export * as ComGermnetworkDeclaration from './types/com/germnetwork/declaration.js' -export * as ToolsOzoneCommunicationCreateTemplate from './types/tools/ozone/communication/createTemplate.js' -export * as ToolsOzoneCommunicationDefs from './types/tools/ozone/communication/defs.js' -export * as ToolsOzoneCommunicationDeleteTemplate from './types/tools/ozone/communication/deleteTemplate.js' -export * as ToolsOzoneCommunicationListTemplates from './types/tools/ozone/communication/listTemplates.js' -export * as ToolsOzoneCommunicationUpdateTemplate from './types/tools/ozone/communication/updateTemplate.js' -export * as ToolsOzoneHostingGetAccountHistory from './types/tools/ozone/hosting/getAccountHistory.js' -export * as ToolsOzoneModerationCancelScheduledActions from './types/tools/ozone/moderation/cancelScheduledActions.js' -export * as ToolsOzoneModerationDefs from './types/tools/ozone/moderation/defs.js' -export * as ToolsOzoneModerationEmitEvent from './types/tools/ozone/moderation/emitEvent.js' -export * as ToolsOzoneModerationGetAccountTimeline from './types/tools/ozone/moderation/getAccountTimeline.js' -export * as ToolsOzoneModerationGetEvent from './types/tools/ozone/moderation/getEvent.js' -export * as ToolsOzoneModerationGetRecord from './types/tools/ozone/moderation/getRecord.js' -export * as ToolsOzoneModerationGetRecords from './types/tools/ozone/moderation/getRecords.js' -export * as ToolsOzoneModerationGetRepo from './types/tools/ozone/moderation/getRepo.js' -export * as ToolsOzoneModerationGetReporterStats from './types/tools/ozone/moderation/getReporterStats.js' -export * as ToolsOzoneModerationGetRepos from './types/tools/ozone/moderation/getRepos.js' -export * as ToolsOzoneModerationGetSubjects from './types/tools/ozone/moderation/getSubjects.js' -export * as ToolsOzoneModerationListScheduledActions from './types/tools/ozone/moderation/listScheduledActions.js' -export * as ToolsOzoneModerationQueryEvents from './types/tools/ozone/moderation/queryEvents.js' -export * as ToolsOzoneModerationQueryStatuses from './types/tools/ozone/moderation/queryStatuses.js' -export * as ToolsOzoneModerationScheduleAction from './types/tools/ozone/moderation/scheduleAction.js' -export * as ToolsOzoneModerationSearchRepos from './types/tools/ozone/moderation/searchRepos.js' -export * as ToolsOzoneReportDefs from './types/tools/ozone/report/defs.js' -export * as ToolsOzoneSafelinkAddRule from './types/tools/ozone/safelink/addRule.js' -export * as ToolsOzoneSafelinkDefs from './types/tools/ozone/safelink/defs.js' -export * as ToolsOzoneSafelinkQueryEvents from './types/tools/ozone/safelink/queryEvents.js' -export * as ToolsOzoneSafelinkQueryRules from './types/tools/ozone/safelink/queryRules.js' -export * as ToolsOzoneSafelinkRemoveRule from './types/tools/ozone/safelink/removeRule.js' -export * as ToolsOzoneSafelinkUpdateRule from './types/tools/ozone/safelink/updateRule.js' -export * as ToolsOzoneServerGetConfig from './types/tools/ozone/server/getConfig.js' -export * as ToolsOzoneSetAddValues from './types/tools/ozone/set/addValues.js' -export * as ToolsOzoneSetDefs from './types/tools/ozone/set/defs.js' -export * as ToolsOzoneSetDeleteSet from './types/tools/ozone/set/deleteSet.js' -export * as ToolsOzoneSetDeleteValues from './types/tools/ozone/set/deleteValues.js' -export * as ToolsOzoneSetGetValues from './types/tools/ozone/set/getValues.js' -export * as ToolsOzoneSetQuerySets from './types/tools/ozone/set/querySets.js' -export * as ToolsOzoneSetUpsertSet from './types/tools/ozone/set/upsertSet.js' -export * as ToolsOzoneSettingDefs from './types/tools/ozone/setting/defs.js' -export * as ToolsOzoneSettingListOptions from './types/tools/ozone/setting/listOptions.js' -export * as ToolsOzoneSettingRemoveOptions from './types/tools/ozone/setting/removeOptions.js' -export * as ToolsOzoneSettingUpsertOption from './types/tools/ozone/setting/upsertOption.js' -export * as ToolsOzoneSignatureDefs from './types/tools/ozone/signature/defs.js' -export * as ToolsOzoneSignatureFindCorrelation from './types/tools/ozone/signature/findCorrelation.js' -export * as ToolsOzoneSignatureFindRelatedAccounts from './types/tools/ozone/signature/findRelatedAccounts.js' -export * as ToolsOzoneSignatureSearchAccounts from './types/tools/ozone/signature/searchAccounts.js' -export * as ToolsOzoneTeamAddMember from './types/tools/ozone/team/addMember.js' -export * as ToolsOzoneTeamDefs from './types/tools/ozone/team/defs.js' -export * as ToolsOzoneTeamDeleteMember from './types/tools/ozone/team/deleteMember.js' -export * as ToolsOzoneTeamListMembers from './types/tools/ozone/team/listMembers.js' -export * as ToolsOzoneTeamUpdateMember from './types/tools/ozone/team/updateMember.js' -export * as ToolsOzoneVerificationDefs from './types/tools/ozone/verification/defs.js' -export * as ToolsOzoneVerificationGrantVerifications from './types/tools/ozone/verification/grantVerifications.js' -export * as ToolsOzoneVerificationListVerifications from './types/tools/ozone/verification/listVerifications.js' -export * as ToolsOzoneVerificationRevokeVerifications from './types/tools/ozone/verification/revokeVerifications.js' - -export const APP_BSKY_ACTOR = { - StatusLive: 'app.bsky.actor.status#live', -} -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 APP_BSKY_GRAPH = { - DefsModlist: 'app.bsky.graph.defs#modlist', - DefsCuratelist: 'app.bsky.graph.defs#curatelist', - DefsReferencelist: 'app.bsky.graph.defs#referencelist', -} -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 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', - DefsTimelineEventPlcCreate: - 'tools.ozone.moderation.defs#timelineEventPlcCreate', - DefsTimelineEventPlcOperation: - 'tools.ozone.moderation.defs#timelineEventPlcOperation', - DefsTimelineEventPlcTombstone: - 'tools.ozone.moderation.defs#timelineEventPlcTombstone', -} -export const TOOLS_OZONE_REPORT = { - DefsReasonAppeal: 'tools.ozone.report.defs#reasonAppeal', - DefsReasonOther: 'tools.ozone.report.defs#reasonOther', - DefsReasonViolenceAnimal: 'tools.ozone.report.defs#reasonViolenceAnimal', - DefsReasonViolenceThreats: 'tools.ozone.report.defs#reasonViolenceThreats', - DefsReasonViolenceGraphicContent: - 'tools.ozone.report.defs#reasonViolenceGraphicContent', - DefsReasonViolenceGlorification: - 'tools.ozone.report.defs#reasonViolenceGlorification', - DefsReasonViolenceExtremistContent: - 'tools.ozone.report.defs#reasonViolenceExtremistContent', - DefsReasonViolenceTrafficking: - 'tools.ozone.report.defs#reasonViolenceTrafficking', - DefsReasonViolenceOther: 'tools.ozone.report.defs#reasonViolenceOther', - DefsReasonSexualAbuseContent: - 'tools.ozone.report.defs#reasonSexualAbuseContent', - DefsReasonSexualNCII: 'tools.ozone.report.defs#reasonSexualNCII', - DefsReasonSexualDeepfake: 'tools.ozone.report.defs#reasonSexualDeepfake', - DefsReasonSexualAnimal: 'tools.ozone.report.defs#reasonSexualAnimal', - DefsReasonSexualUnlabeled: 'tools.ozone.report.defs#reasonSexualUnlabeled', - DefsReasonSexualOther: 'tools.ozone.report.defs#reasonSexualOther', - DefsReasonChildSafetyCSAM: 'tools.ozone.report.defs#reasonChildSafetyCSAM', - DefsReasonChildSafetyGroom: 'tools.ozone.report.defs#reasonChildSafetyGroom', - DefsReasonChildSafetyPrivacy: - 'tools.ozone.report.defs#reasonChildSafetyPrivacy', - DefsReasonChildSafetyHarassment: - 'tools.ozone.report.defs#reasonChildSafetyHarassment', - DefsReasonChildSafetyOther: 'tools.ozone.report.defs#reasonChildSafetyOther', - DefsReasonHarassmentTroll: 'tools.ozone.report.defs#reasonHarassmentTroll', - DefsReasonHarassmentTargeted: - 'tools.ozone.report.defs#reasonHarassmentTargeted', - DefsReasonHarassmentHateSpeech: - 'tools.ozone.report.defs#reasonHarassmentHateSpeech', - DefsReasonHarassmentDoxxing: - 'tools.ozone.report.defs#reasonHarassmentDoxxing', - DefsReasonHarassmentOther: 'tools.ozone.report.defs#reasonHarassmentOther', - DefsReasonMisleadingBot: 'tools.ozone.report.defs#reasonMisleadingBot', - DefsReasonMisleadingImpersonation: - 'tools.ozone.report.defs#reasonMisleadingImpersonation', - DefsReasonMisleadingSpam: 'tools.ozone.report.defs#reasonMisleadingSpam', - DefsReasonMisleadingScam: 'tools.ozone.report.defs#reasonMisleadingScam', - DefsReasonMisleadingElections: - 'tools.ozone.report.defs#reasonMisleadingElections', - DefsReasonMisleadingOther: 'tools.ozone.report.defs#reasonMisleadingOther', - DefsReasonRuleSiteSecurity: 'tools.ozone.report.defs#reasonRuleSiteSecurity', - DefsReasonRuleProhibitedSales: - 'tools.ozone.report.defs#reasonRuleProhibitedSales', - DefsReasonRuleBanEvasion: 'tools.ozone.report.defs#reasonRuleBanEvasion', - DefsReasonRuleOther: 'tools.ozone.report.defs#reasonRuleOther', - DefsReasonSelfHarmContent: 'tools.ozone.report.defs#reasonSelfHarmContent', - DefsReasonSelfHarmED: 'tools.ozone.report.defs#reasonSelfHarmED', - DefsReasonSelfHarmStunts: 'tools.ozone.report.defs#reasonSelfHarmStunts', - DefsReasonSelfHarmSubstances: - 'tools.ozone.report.defs#reasonSelfHarmSubstances', - DefsReasonSelfHarmOther: 'tools.ozone.report.defs#reasonSelfHarmOther', -} -export const TOOLS_OZONE_TEAM = { - DefsRoleAdmin: 'tools.ozone.team.defs#roleAdmin', - DefsRoleModerator: 'tools.ozone.team.defs#roleModerator', - DefsRoleTriage: 'tools.ozone.team.defs#roleTriage', - DefsRoleVerifier: 'tools.ozone.team.defs#roleVerifier', -} - -export class AtpBaseClient extends XrpcClient { - app: AppNS - chat: ChatNS - com: ComNS - tools: ToolsNS - - constructor(options: FetchHandler | FetchHandlerOptions) { - super(options, schemas) - this.app = new AppNS(this) - this.chat = new ChatNS(this) - this.com = new ComNS(this) - this.tools = new ToolsNS(this) - } - - /** @deprecated use `this` instead */ - get xrpc(): XrpcClient { - return this - } -} - -export class AppNS { - _client: XrpcClient - bsky: AppBskyNS - - constructor(client: XrpcClient) { - this._client = client - this.bsky = new AppBskyNS(client) - } -} - -export class AppBskyNS { - _client: XrpcClient - actor: AppBskyActorNS - ageassurance: AppBskyAgeassuranceNS - bookmark: AppBskyBookmarkNS - contact: AppBskyContactNS - draft: AppBskyDraftNS - embed: AppBskyEmbedNS - feed: AppBskyFeedNS - graph: AppBskyGraphNS - labeler: AppBskyLabelerNS - notification: AppBskyNotificationNS - richtext: AppBskyRichtextNS - unspecced: AppBskyUnspeccedNS - video: AppBskyVideoNS - - constructor(client: XrpcClient) { - this._client = client - this.actor = new AppBskyActorNS(client) - this.ageassurance = new AppBskyAgeassuranceNS(client) - this.bookmark = new AppBskyBookmarkNS(client) - this.contact = new AppBskyContactNS(client) - this.draft = new AppBskyDraftNS(client) - this.embed = new AppBskyEmbedNS(client) - this.feed = new AppBskyFeedNS(client) - this.graph = new AppBskyGraphNS(client) - this.labeler = new AppBskyLabelerNS(client) - this.notification = new AppBskyNotificationNS(client) - this.richtext = new AppBskyRichtextNS(client) - this.unspecced = new AppBskyUnspeccedNS(client) - this.video = new AppBskyVideoNS(client) - } -} - -export class AppBskyActorNS { - _client: XrpcClient - profile: AppBskyActorProfileRecord - status: AppBskyActorStatusRecord - - constructor(client: XrpcClient) { - this._client = client - this.profile = new AppBskyActorProfileRecord(client) - this.status = new AppBskyActorStatusRecord(client) - } - - getPreferences( - params?: AppBskyActorGetPreferences.QueryParams, - opts?: AppBskyActorGetPreferences.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.getPreferences', - params, - undefined, - opts, - ) - } - - getProfile( - params?: AppBskyActorGetProfile.QueryParams, - opts?: AppBskyActorGetProfile.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.getProfile', - params, - undefined, - opts, - ) - } - - getProfiles( - params?: AppBskyActorGetProfiles.QueryParams, - opts?: AppBskyActorGetProfiles.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.getProfiles', - params, - undefined, - opts, - ) - } - - getSuggestions( - params?: AppBskyActorGetSuggestions.QueryParams, - opts?: AppBskyActorGetSuggestions.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.getSuggestions', - params, - undefined, - opts, - ) - } - - putPreferences( - data?: AppBskyActorPutPreferences.InputSchema, - opts?: AppBskyActorPutPreferences.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.putPreferences', - opts?.qp, - data, - opts, - ) - } - - searchActors( - params?: AppBskyActorSearchActors.QueryParams, - opts?: AppBskyActorSearchActors.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.searchActors', - params, - undefined, - opts, - ) - } - - searchActorsTypeahead( - params?: AppBskyActorSearchActorsTypeahead.QueryParams, - opts?: AppBskyActorSearchActorsTypeahead.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.actor.searchActorsTypeahead', - params, - undefined, - opts, - ) - } -} - -export class AppBskyActorProfileRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyActorProfile.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.actor.profile', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyActorProfile.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.actor.profile', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.actor.profile' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.actor.profile' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.actor.profile', ...params }, - { headers }, - ) - } -} - -export class AppBskyActorStatusRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyActorStatus.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.actor.status', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyActorStatus.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.actor.status', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.actor.status' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.actor.status' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.actor.status', ...params }, - { headers }, - ) - } -} - -export class AppBskyAgeassuranceNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - begin( - data?: AppBskyAgeassuranceBegin.InputSchema, - opts?: AppBskyAgeassuranceBegin.CallOptions, - ): Promise { - return this._client - .call('app.bsky.ageassurance.begin', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyAgeassuranceBegin.toKnownErr(e) - }) - } - - getConfig( - params?: AppBskyAgeassuranceGetConfig.QueryParams, - opts?: AppBskyAgeassuranceGetConfig.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.ageassurance.getConfig', - params, - undefined, - opts, - ) - } - - getState( - params?: AppBskyAgeassuranceGetState.QueryParams, - opts?: AppBskyAgeassuranceGetState.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.ageassurance.getState', - params, - undefined, - opts, - ) - } -} - -export class AppBskyBookmarkNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - createBookmark( - data?: AppBskyBookmarkCreateBookmark.InputSchema, - opts?: AppBskyBookmarkCreateBookmark.CallOptions, - ): Promise { - return this._client - .call('app.bsky.bookmark.createBookmark', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyBookmarkCreateBookmark.toKnownErr(e) - }) - } - - deleteBookmark( - data?: AppBskyBookmarkDeleteBookmark.InputSchema, - opts?: AppBskyBookmarkDeleteBookmark.CallOptions, - ): Promise { - return this._client - .call('app.bsky.bookmark.deleteBookmark', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyBookmarkDeleteBookmark.toKnownErr(e) - }) - } - - getBookmarks( - params?: AppBskyBookmarkGetBookmarks.QueryParams, - opts?: AppBskyBookmarkGetBookmarks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.bookmark.getBookmarks', - params, - undefined, - opts, - ) - } -} - -export class AppBskyContactNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - dismissMatch( - data?: AppBskyContactDismissMatch.InputSchema, - opts?: AppBskyContactDismissMatch.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.dismissMatch', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyContactDismissMatch.toKnownErr(e) - }) - } - - getMatches( - params?: AppBskyContactGetMatches.QueryParams, - opts?: AppBskyContactGetMatches.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.getMatches', params, undefined, opts) - .catch((e) => { - throw AppBskyContactGetMatches.toKnownErr(e) - }) - } - - getSyncStatus( - params?: AppBskyContactGetSyncStatus.QueryParams, - opts?: AppBskyContactGetSyncStatus.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.getSyncStatus', params, undefined, opts) - .catch((e) => { - throw AppBskyContactGetSyncStatus.toKnownErr(e) - }) - } - - importContacts( - data?: AppBskyContactImportContacts.InputSchema, - opts?: AppBskyContactImportContacts.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.importContacts', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyContactImportContacts.toKnownErr(e) - }) - } - - removeData( - data?: AppBskyContactRemoveData.InputSchema, - opts?: AppBskyContactRemoveData.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.removeData', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyContactRemoveData.toKnownErr(e) - }) - } - - sendNotification( - data?: AppBskyContactSendNotification.InputSchema, - opts?: AppBskyContactSendNotification.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.contact.sendNotification', - opts?.qp, - data, - opts, - ) - } - - startPhoneVerification( - data?: AppBskyContactStartPhoneVerification.InputSchema, - opts?: AppBskyContactStartPhoneVerification.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.startPhoneVerification', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyContactStartPhoneVerification.toKnownErr(e) - }) - } - - verifyPhone( - data?: AppBskyContactVerifyPhone.InputSchema, - opts?: AppBskyContactVerifyPhone.CallOptions, - ): Promise { - return this._client - .call('app.bsky.contact.verifyPhone', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyContactVerifyPhone.toKnownErr(e) - }) - } -} - -export class AppBskyDraftNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - createDraft( - data?: AppBskyDraftCreateDraft.InputSchema, - opts?: AppBskyDraftCreateDraft.CallOptions, - ): Promise { - return this._client - .call('app.bsky.draft.createDraft', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyDraftCreateDraft.toKnownErr(e) - }) - } - - deleteDraft( - data?: AppBskyDraftDeleteDraft.InputSchema, - opts?: AppBskyDraftDeleteDraft.CallOptions, - ): Promise { - return this._client.call('app.bsky.draft.deleteDraft', opts?.qp, data, opts) - } - - getDrafts( - params?: AppBskyDraftGetDrafts.QueryParams, - opts?: AppBskyDraftGetDrafts.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.draft.getDrafts', - params, - undefined, - opts, - ) - } - - updateDraft( - data?: AppBskyDraftUpdateDraft.InputSchema, - opts?: AppBskyDraftUpdateDraft.CallOptions, - ): Promise { - return this._client.call('app.bsky.draft.updateDraft', opts?.qp, data, opts) - } -} - -export class AppBskyEmbedNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } -} - -export class AppBskyFeedNS { - _client: XrpcClient - generator: AppBskyFeedGeneratorRecord - like: AppBskyFeedLikeRecord - post: AppBskyFeedPostRecord - postgate: AppBskyFeedPostgateRecord - repost: AppBskyFeedRepostRecord - threadgate: AppBskyFeedThreadgateRecord - - constructor(client: XrpcClient) { - this._client = client - this.generator = new AppBskyFeedGeneratorRecord(client) - this.like = new AppBskyFeedLikeRecord(client) - this.post = new AppBskyFeedPostRecord(client) - this.postgate = new AppBskyFeedPostgateRecord(client) - this.repost = new AppBskyFeedRepostRecord(client) - this.threadgate = new AppBskyFeedThreadgateRecord(client) - } - - describeFeedGenerator( - params?: AppBskyFeedDescribeFeedGenerator.QueryParams, - opts?: AppBskyFeedDescribeFeedGenerator.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.describeFeedGenerator', - params, - undefined, - opts, - ) - } - - getActorFeeds( - params?: AppBskyFeedGetActorFeeds.QueryParams, - opts?: AppBskyFeedGetActorFeeds.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getActorFeeds', - params, - undefined, - opts, - ) - } - - getActorLikes( - params?: AppBskyFeedGetActorLikes.QueryParams, - opts?: AppBskyFeedGetActorLikes.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getActorLikes', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetActorLikes.toKnownErr(e) - }) - } - - getAuthorFeed( - params?: AppBskyFeedGetAuthorFeed.QueryParams, - opts?: AppBskyFeedGetAuthorFeed.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getAuthorFeed', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetAuthorFeed.toKnownErr(e) - }) - } - - getFeed( - params?: AppBskyFeedGetFeed.QueryParams, - opts?: AppBskyFeedGetFeed.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getFeed', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetFeed.toKnownErr(e) - }) - } - - getFeedGenerator( - params?: AppBskyFeedGetFeedGenerator.QueryParams, - opts?: AppBskyFeedGetFeedGenerator.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getFeedGenerator', - params, - undefined, - opts, - ) - } - - getFeedGenerators( - params?: AppBskyFeedGetFeedGenerators.QueryParams, - opts?: AppBskyFeedGetFeedGenerators.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getFeedGenerators', - params, - undefined, - opts, - ) - } - - getFeedSkeleton( - params?: AppBskyFeedGetFeedSkeleton.QueryParams, - opts?: AppBskyFeedGetFeedSkeleton.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getFeedSkeleton', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetFeedSkeleton.toKnownErr(e) - }) - } - - getLikes( - params?: AppBskyFeedGetLikes.QueryParams, - opts?: AppBskyFeedGetLikes.CallOptions, - ): Promise { - return this._client.call('app.bsky.feed.getLikes', params, undefined, opts) - } - - getListFeed( - params?: AppBskyFeedGetListFeed.QueryParams, - opts?: AppBskyFeedGetListFeed.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getListFeed', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetListFeed.toKnownErr(e) - }) - } - - getPostThread( - params?: AppBskyFeedGetPostThread.QueryParams, - opts?: AppBskyFeedGetPostThread.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.getPostThread', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedGetPostThread.toKnownErr(e) - }) - } - - getPosts( - params?: AppBskyFeedGetPosts.QueryParams, - opts?: AppBskyFeedGetPosts.CallOptions, - ): Promise { - return this._client.call('app.bsky.feed.getPosts', params, undefined, opts) - } - - getQuotes( - params?: AppBskyFeedGetQuotes.QueryParams, - opts?: AppBskyFeedGetQuotes.CallOptions, - ): Promise { - return this._client.call('app.bsky.feed.getQuotes', params, undefined, opts) - } - - getRepostedBy( - params?: AppBskyFeedGetRepostedBy.QueryParams, - opts?: AppBskyFeedGetRepostedBy.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getRepostedBy', - params, - undefined, - opts, - ) - } - - getSuggestedFeeds( - params?: AppBskyFeedGetSuggestedFeeds.QueryParams, - opts?: AppBskyFeedGetSuggestedFeeds.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getSuggestedFeeds', - params, - undefined, - opts, - ) - } - - getTimeline( - params?: AppBskyFeedGetTimeline.QueryParams, - opts?: AppBskyFeedGetTimeline.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.getTimeline', - params, - undefined, - opts, - ) - } - - searchPosts( - params?: AppBskyFeedSearchPosts.QueryParams, - opts?: AppBskyFeedSearchPosts.CallOptions, - ): Promise { - return this._client - .call('app.bsky.feed.searchPosts', params, undefined, opts) - .catch((e) => { - throw AppBskyFeedSearchPosts.toKnownErr(e) - }) - } - - sendInteractions( - data?: AppBskyFeedSendInteractions.InputSchema, - opts?: AppBskyFeedSendInteractions.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.feed.sendInteractions', - opts?.qp, - data, - opts, - ) - } -} - -export class AppBskyFeedGeneratorRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedGenerator.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.generator', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyFeedGenerator.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.generator', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.generator' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.generator' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.generator', ...params }, - { headers }, - ) - } -} - -export class AppBskyFeedLikeRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedLike.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.like', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyFeedLike.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.like', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.like' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.like' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.like', ...params }, - { headers }, - ) - } -} - -export class AppBskyFeedPostRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedPost.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.post', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyFeedPost.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.post', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.post' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.post' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.post', ...params }, - { headers }, - ) - } -} - -export class AppBskyFeedPostgateRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedPostgate.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.postgate', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyFeedPostgate.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.postgate', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.postgate' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.postgate' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.postgate', ...params }, - { headers }, - ) - } -} - -export class AppBskyFeedRepostRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedRepost.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.repost', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyFeedRepost.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.repost', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.repost' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.repost' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.repost', ...params }, - { headers }, - ) - } -} - -export class AppBskyFeedThreadgateRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyFeedThreadgate.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.feed.threadgate', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyFeedThreadgate.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.feed.threadgate', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.threadgate' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.feed.threadgate' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.feed.threadgate', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphNS { - _client: XrpcClient - block: AppBskyGraphBlockRecord - follow: AppBskyGraphFollowRecord - list: AppBskyGraphListRecord - listblock: AppBskyGraphListblockRecord - listitem: AppBskyGraphListitemRecord - starterpack: AppBskyGraphStarterpackRecord - verification: AppBskyGraphVerificationRecord - - constructor(client: XrpcClient) { - this._client = client - this.block = new AppBskyGraphBlockRecord(client) - this.follow = new AppBskyGraphFollowRecord(client) - this.list = new AppBskyGraphListRecord(client) - this.listblock = new AppBskyGraphListblockRecord(client) - this.listitem = new AppBskyGraphListitemRecord(client) - this.starterpack = new AppBskyGraphStarterpackRecord(client) - this.verification = new AppBskyGraphVerificationRecord(client) - } - - getActorStarterPacks( - params?: AppBskyGraphGetActorStarterPacks.QueryParams, - opts?: AppBskyGraphGetActorStarterPacks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getActorStarterPacks', - params, - undefined, - opts, - ) - } - - getBlocks( - params?: AppBskyGraphGetBlocks.QueryParams, - opts?: AppBskyGraphGetBlocks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getBlocks', - params, - undefined, - opts, - ) - } - - getFollowers( - params?: AppBskyGraphGetFollowers.QueryParams, - opts?: AppBskyGraphGetFollowers.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getFollowers', - params, - undefined, - opts, - ) - } - - getFollows( - params?: AppBskyGraphGetFollows.QueryParams, - opts?: AppBskyGraphGetFollows.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getFollows', - params, - undefined, - opts, - ) - } - - getKnownFollowers( - params?: AppBskyGraphGetKnownFollowers.QueryParams, - opts?: AppBskyGraphGetKnownFollowers.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getKnownFollowers', - params, - undefined, - opts, - ) - } - - getList( - params?: AppBskyGraphGetList.QueryParams, - opts?: AppBskyGraphGetList.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.getList', params, undefined, opts) - } - - getListBlocks( - params?: AppBskyGraphGetListBlocks.QueryParams, - opts?: AppBskyGraphGetListBlocks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getListBlocks', - params, - undefined, - opts, - ) - } - - getListMutes( - params?: AppBskyGraphGetListMutes.QueryParams, - opts?: AppBskyGraphGetListMutes.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getListMutes', - params, - undefined, - opts, - ) - } - - getLists( - params?: AppBskyGraphGetLists.QueryParams, - opts?: AppBskyGraphGetLists.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.getLists', params, undefined, opts) - } - - getListsWithMembership( - params?: AppBskyGraphGetListsWithMembership.QueryParams, - opts?: AppBskyGraphGetListsWithMembership.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getListsWithMembership', - params, - undefined, - opts, - ) - } - - getMutes( - params?: AppBskyGraphGetMutes.QueryParams, - opts?: AppBskyGraphGetMutes.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.getMutes', params, undefined, opts) - } - - getRelationships( - params?: AppBskyGraphGetRelationships.QueryParams, - opts?: AppBskyGraphGetRelationships.CallOptions, - ): Promise { - return this._client - .call('app.bsky.graph.getRelationships', params, undefined, opts) - .catch((e) => { - throw AppBskyGraphGetRelationships.toKnownErr(e) - }) - } - - getStarterPack( - params?: AppBskyGraphGetStarterPack.QueryParams, - opts?: AppBskyGraphGetStarterPack.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getStarterPack', - params, - undefined, - opts, - ) - } - - getStarterPacks( - params?: AppBskyGraphGetStarterPacks.QueryParams, - opts?: AppBskyGraphGetStarterPacks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getStarterPacks', - params, - undefined, - opts, - ) - } - - getStarterPacksWithMembership( - params?: AppBskyGraphGetStarterPacksWithMembership.QueryParams, - opts?: AppBskyGraphGetStarterPacksWithMembership.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getStarterPacksWithMembership', - params, - undefined, - opts, - ) - } - - getSuggestedFollowsByActor( - params?: AppBskyGraphGetSuggestedFollowsByActor.QueryParams, - opts?: AppBskyGraphGetSuggestedFollowsByActor.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.getSuggestedFollowsByActor', - params, - undefined, - opts, - ) - } - - muteActor( - data?: AppBskyGraphMuteActor.InputSchema, - opts?: AppBskyGraphMuteActor.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.muteActor', opts?.qp, data, opts) - } - - muteActorList( - data?: AppBskyGraphMuteActorList.InputSchema, - opts?: AppBskyGraphMuteActorList.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.muteActorList', - opts?.qp, - data, - opts, - ) - } - - muteThread( - data?: AppBskyGraphMuteThread.InputSchema, - opts?: AppBskyGraphMuteThread.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.muteThread', opts?.qp, data, opts) - } - - searchStarterPacks( - params?: AppBskyGraphSearchStarterPacks.QueryParams, - opts?: AppBskyGraphSearchStarterPacks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.searchStarterPacks', - params, - undefined, - opts, - ) - } - - unmuteActor( - data?: AppBskyGraphUnmuteActor.InputSchema, - opts?: AppBskyGraphUnmuteActor.CallOptions, - ): Promise { - return this._client.call('app.bsky.graph.unmuteActor', opts?.qp, data, opts) - } - - unmuteActorList( - data?: AppBskyGraphUnmuteActorList.InputSchema, - opts?: AppBskyGraphUnmuteActorList.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.unmuteActorList', - opts?.qp, - data, - opts, - ) - } - - unmuteThread( - data?: AppBskyGraphUnmuteThread.InputSchema, - opts?: AppBskyGraphUnmuteThread.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.graph.unmuteThread', - opts?.qp, - data, - opts, - ) - } -} - -export class AppBskyGraphBlockRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphBlock.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.block', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyGraphBlock.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.block', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.block' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.block' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.block', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphFollowRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphFollow.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.follow', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyGraphFollow.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.follow', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.follow' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.follow' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.follow', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphListRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphList.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.list', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyGraphList.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.list', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.list' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.list' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.list', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphListblockRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphListblock.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.listblock', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyGraphListblock.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.listblock', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.listblock' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.listblock' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.listblock', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphListitemRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphListitem.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.listitem', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ uri: string; cid: string; value: AppBskyGraphListitem.Record }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.listitem', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.listitem' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.listitem' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.listitem', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphStarterpackRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphStarterpack.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.starterpack', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyGraphStarterpack.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.starterpack', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.starterpack' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.starterpack' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.starterpack', ...params }, - { headers }, - ) - } -} - -export class AppBskyGraphVerificationRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyGraphVerification.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.graph.verification', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyGraphVerification.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.graph.verification', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.verification' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.graph.verification' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.graph.verification', ...params }, - { headers }, - ) - } -} - -export class AppBskyLabelerNS { - _client: XrpcClient - service: AppBskyLabelerServiceRecord - - constructor(client: XrpcClient) { - this._client = client - this.service = new AppBskyLabelerServiceRecord(client) - } - - getServices( - params?: AppBskyLabelerGetServices.QueryParams, - opts?: AppBskyLabelerGetServices.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.labeler.getServices', - params, - undefined, - opts, - ) - } -} - -export class AppBskyLabelerServiceRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyLabelerService.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.labeler.service', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyLabelerService.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.labeler.service', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.labeler.service' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.labeler.service' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.labeler.service', ...params }, - { headers }, - ) - } -} - -export class AppBskyNotificationNS { - _client: XrpcClient - declaration: AppBskyNotificationDeclarationRecord - - constructor(client: XrpcClient) { - this._client = client - this.declaration = new AppBskyNotificationDeclarationRecord(client) - } - - getPreferences( - params?: AppBskyNotificationGetPreferences.QueryParams, - opts?: AppBskyNotificationGetPreferences.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.getPreferences', - params, - undefined, - opts, - ) - } - - getUnreadCount( - params?: AppBskyNotificationGetUnreadCount.QueryParams, - opts?: AppBskyNotificationGetUnreadCount.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.getUnreadCount', - params, - undefined, - opts, - ) - } - - listActivitySubscriptions( - params?: AppBskyNotificationListActivitySubscriptions.QueryParams, - opts?: AppBskyNotificationListActivitySubscriptions.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.listActivitySubscriptions', - params, - undefined, - opts, - ) - } - - listNotifications( - params?: AppBskyNotificationListNotifications.QueryParams, - opts?: AppBskyNotificationListNotifications.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.listNotifications', - params, - undefined, - opts, - ) - } - - putActivitySubscription( - data?: AppBskyNotificationPutActivitySubscription.InputSchema, - opts?: AppBskyNotificationPutActivitySubscription.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.putActivitySubscription', - opts?.qp, - data, - opts, - ) - } - - putPreferences( - data?: AppBskyNotificationPutPreferences.InputSchema, - opts?: AppBskyNotificationPutPreferences.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.putPreferences', - opts?.qp, - data, - opts, - ) - } - - putPreferencesV2( - data?: AppBskyNotificationPutPreferencesV2.InputSchema, - opts?: AppBskyNotificationPutPreferencesV2.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.putPreferencesV2', - opts?.qp, - data, - opts, - ) - } - - registerPush( - data?: AppBskyNotificationRegisterPush.InputSchema, - opts?: AppBskyNotificationRegisterPush.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.registerPush', - opts?.qp, - data, - opts, - ) - } - - unregisterPush( - data?: AppBskyNotificationUnregisterPush.InputSchema, - opts?: AppBskyNotificationUnregisterPush.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.unregisterPush', - opts?.qp, - data, - opts, - ) - } - - updateSeen( - data?: AppBskyNotificationUpdateSeen.InputSchema, - opts?: AppBskyNotificationUpdateSeen.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.notification.updateSeen', - opts?.qp, - data, - opts, - ) - } -} - -export class AppBskyNotificationDeclarationRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: AppBskyNotificationDeclaration.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'app.bsky.notification.declaration', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: AppBskyNotificationDeclaration.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'app.bsky.notification.declaration', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.notification.declaration' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'app.bsky.notification.declaration' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'app.bsky.notification.declaration', ...params }, - { headers }, - ) - } -} - -export class AppBskyRichtextNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } -} - -export class AppBskyUnspeccedNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getAgeAssuranceState( - params?: AppBskyUnspeccedGetAgeAssuranceState.QueryParams, - opts?: AppBskyUnspeccedGetAgeAssuranceState.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getAgeAssuranceState', - params, - undefined, - opts, - ) - } - - getConfig( - params?: AppBskyUnspeccedGetConfig.QueryParams, - opts?: AppBskyUnspeccedGetConfig.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getConfig', - params, - undefined, - opts, - ) - } - - getOnboardingSuggestedStarterPacks( - params?: AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.QueryParams, - opts?: AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getOnboardingSuggestedStarterPacks', - params, - undefined, - opts, - ) - } - - getOnboardingSuggestedStarterPacksSkeleton( - params?: AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton', - params, - undefined, - opts, - ) - } - - getOnboardingSuggestedUsersSkeleton( - params?: AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton', - params, - undefined, - opts, - ) - } - - getPopularFeedGenerators( - params?: AppBskyUnspeccedGetPopularFeedGenerators.QueryParams, - opts?: AppBskyUnspeccedGetPopularFeedGenerators.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getPopularFeedGenerators', - params, - undefined, - opts, - ) - } - - getPostThreadOtherV2( - params?: AppBskyUnspeccedGetPostThreadOtherV2.QueryParams, - opts?: AppBskyUnspeccedGetPostThreadOtherV2.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getPostThreadOtherV2', - params, - undefined, - opts, - ) - } - - getPostThreadV2( - params?: AppBskyUnspeccedGetPostThreadV2.QueryParams, - opts?: AppBskyUnspeccedGetPostThreadV2.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getPostThreadV2', - params, - undefined, - opts, - ) - } - - getSuggestedFeeds( - params?: AppBskyUnspeccedGetSuggestedFeeds.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedFeeds.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedFeeds', - params, - undefined, - opts, - ) - } - - getSuggestedFeedsSkeleton( - params?: AppBskyUnspeccedGetSuggestedFeedsSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedFeedsSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedFeedsSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestedOnboardingUsers( - params?: AppBskyUnspeccedGetSuggestedOnboardingUsers.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedOnboardingUsers.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedOnboardingUsers', - params, - undefined, - opts, - ) - } - - getSuggestedStarterPacks( - params?: AppBskyUnspeccedGetSuggestedStarterPacks.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedStarterPacks.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedStarterPacks', - params, - undefined, - opts, - ) - } - - getSuggestedStarterPacksSkeleton( - params?: AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestedUsers( - params?: AppBskyUnspeccedGetSuggestedUsers.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsers.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsers', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForDiscover( - params?: AppBskyUnspeccedGetSuggestedUsersForDiscover.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForDiscover.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForDiscover', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForDiscoverSkeleton( - params?: AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForExplore( - params?: AppBskyUnspeccedGetSuggestedUsersForExplore.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForExplore.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForExplore', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForExploreSkeleton( - params?: AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForExploreSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForSeeMore( - params?: AppBskyUnspeccedGetSuggestedUsersForSeeMore.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForSeeMore.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForSeeMore', - params, - undefined, - opts, - ) - } - - getSuggestedUsersForSeeMoreSkeleton( - params?: AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestedUsersSkeleton( - params?: AppBskyUnspeccedGetSuggestedUsersSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestedUsersSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestedUsersSkeleton', - params, - undefined, - opts, - ) - } - - getSuggestionsSkeleton( - params?: AppBskyUnspeccedGetSuggestionsSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetSuggestionsSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getSuggestionsSkeleton', - params, - undefined, - opts, - ) - } - - getTaggedSuggestions( - params?: AppBskyUnspeccedGetTaggedSuggestions.QueryParams, - opts?: AppBskyUnspeccedGetTaggedSuggestions.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getTaggedSuggestions', - params, - undefined, - opts, - ) - } - - getTrendingTopics( - params?: AppBskyUnspeccedGetTrendingTopics.QueryParams, - opts?: AppBskyUnspeccedGetTrendingTopics.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getTrendingTopics', - params, - undefined, - opts, - ) - } - - getTrends( - params?: AppBskyUnspeccedGetTrends.QueryParams, - opts?: AppBskyUnspeccedGetTrends.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getTrends', - params, - undefined, - opts, - ) - } - - getTrendsSkeleton( - params?: AppBskyUnspeccedGetTrendsSkeleton.QueryParams, - opts?: AppBskyUnspeccedGetTrendsSkeleton.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.unspecced.getTrendsSkeleton', - params, - undefined, - opts, - ) - } - - initAgeAssurance( - data?: AppBskyUnspeccedInitAgeAssurance.InputSchema, - opts?: AppBskyUnspeccedInitAgeAssurance.CallOptions, - ): Promise { - return this._client - .call('app.bsky.unspecced.initAgeAssurance', opts?.qp, data, opts) - .catch((e) => { - throw AppBskyUnspeccedInitAgeAssurance.toKnownErr(e) - }) - } - - searchActorsSkeleton( - params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams, - opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions, - ): Promise { - return this._client - .call('app.bsky.unspecced.searchActorsSkeleton', params, undefined, opts) - .catch((e) => { - throw AppBskyUnspeccedSearchActorsSkeleton.toKnownErr(e) - }) - } - - searchPostsSkeleton( - params?: AppBskyUnspeccedSearchPostsSkeleton.QueryParams, - opts?: AppBskyUnspeccedSearchPostsSkeleton.CallOptions, - ): Promise { - return this._client - .call('app.bsky.unspecced.searchPostsSkeleton', params, undefined, opts) - .catch((e) => { - throw AppBskyUnspeccedSearchPostsSkeleton.toKnownErr(e) - }) - } - - searchStarterPacksSkeleton( - params?: AppBskyUnspeccedSearchStarterPacksSkeleton.QueryParams, - opts?: AppBskyUnspeccedSearchStarterPacksSkeleton.CallOptions, - ): Promise { - return this._client - .call( - 'app.bsky.unspecced.searchStarterPacksSkeleton', - params, - undefined, - opts, - ) - .catch((e) => { - throw AppBskyUnspeccedSearchStarterPacksSkeleton.toKnownErr(e) - }) - } -} - -export class AppBskyVideoNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getJobStatus( - params?: AppBskyVideoGetJobStatus.QueryParams, - opts?: AppBskyVideoGetJobStatus.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.video.getJobStatus', - params, - undefined, - opts, - ) - } - - getUploadLimits( - params?: AppBskyVideoGetUploadLimits.QueryParams, - opts?: AppBskyVideoGetUploadLimits.CallOptions, - ): Promise { - return this._client.call( - 'app.bsky.video.getUploadLimits', - params, - undefined, - opts, - ) - } - - uploadVideo( - data?: AppBskyVideoUploadVideo.InputSchema, - opts?: AppBskyVideoUploadVideo.CallOptions, - ): Promise { - return this._client.call('app.bsky.video.uploadVideo', opts?.qp, data, opts) - } -} - -export class ChatNS { - _client: XrpcClient - bsky: ChatBskyNS - - constructor(client: XrpcClient) { - this._client = client - this.bsky = new ChatBskyNS(client) - } -} - -export class ChatBskyNS { - _client: XrpcClient - actor: ChatBskyActorNS - convo: ChatBskyConvoNS - group: ChatBskyGroupNS - moderation: ChatBskyModerationNS - - constructor(client: XrpcClient) { - this._client = client - this.actor = new ChatBskyActorNS(client) - this.convo = new ChatBskyConvoNS(client) - this.group = new ChatBskyGroupNS(client) - this.moderation = new ChatBskyModerationNS(client) - } -} - -export class ChatBskyActorNS { - _client: XrpcClient - declaration: ChatBskyActorDeclarationRecord - - constructor(client: XrpcClient) { - this._client = client - this.declaration = new ChatBskyActorDeclarationRecord(client) - } - - deleteAccount( - data?: ChatBskyActorDeleteAccount.InputSchema, - opts?: ChatBskyActorDeleteAccount.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.actor.deleteAccount', - opts?.qp, - data, - opts, - ) - } - - exportAccountData( - params?: ChatBskyActorExportAccountData.QueryParams, - opts?: ChatBskyActorExportAccountData.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.actor.exportAccountData', - params, - undefined, - opts, - ) - } -} - -export class ChatBskyActorDeclarationRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: ChatBskyActorDeclaration.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'chat.bsky.actor.declaration', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: ChatBskyActorDeclaration.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'chat.bsky.actor.declaration', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'chat.bsky.actor.declaration' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'chat.bsky.actor.declaration' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'chat.bsky.actor.declaration', ...params }, - { headers }, - ) - } -} - -export class ChatBskyConvoNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - acceptConvo( - data?: ChatBskyConvoAcceptConvo.InputSchema, - opts?: ChatBskyConvoAcceptConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.acceptConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoAcceptConvo.toKnownErr(e) - }) - } - - addReaction( - data?: ChatBskyConvoAddReaction.InputSchema, - opts?: ChatBskyConvoAddReaction.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.addReaction', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoAddReaction.toKnownErr(e) - }) - } - - deleteMessageForSelf( - data?: ChatBskyConvoDeleteMessageForSelf.InputSchema, - opts?: ChatBskyConvoDeleteMessageForSelf.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.deleteMessageForSelf', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoDeleteMessageForSelf.toKnownErr(e) - }) - } - - getConvo( - params?: ChatBskyConvoGetConvo.QueryParams, - opts?: ChatBskyConvoGetConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.getConvo', params, undefined, opts) - .catch((e) => { - throw ChatBskyConvoGetConvo.toKnownErr(e) - }) - } - - getConvoAvailability( - params?: ChatBskyConvoGetConvoAvailability.QueryParams, - opts?: ChatBskyConvoGetConvoAvailability.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.convo.getConvoAvailability', - params, - undefined, - opts, - ) - } - - getConvoForMembers( - params?: ChatBskyConvoGetConvoForMembers.QueryParams, - opts?: ChatBskyConvoGetConvoForMembers.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.getConvoForMembers', params, undefined, opts) - .catch((e) => { - throw ChatBskyConvoGetConvoForMembers.toKnownErr(e) - }) - } - - getConvoMembers( - params?: ChatBskyConvoGetConvoMembers.QueryParams, - opts?: ChatBskyConvoGetConvoMembers.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.getConvoMembers', params, undefined, opts) - .catch((e) => { - throw ChatBskyConvoGetConvoMembers.toKnownErr(e) - }) - } - - getLog( - params?: ChatBskyConvoGetLog.QueryParams, - opts?: ChatBskyConvoGetLog.CallOptions, - ): Promise { - return this._client.call('chat.bsky.convo.getLog', params, undefined, opts) - } - - getMessages( - params?: ChatBskyConvoGetMessages.QueryParams, - opts?: ChatBskyConvoGetMessages.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.getMessages', params, undefined, opts) - .catch((e) => { - throw ChatBskyConvoGetMessages.toKnownErr(e) - }) - } - - leaveConvo( - data?: ChatBskyConvoLeaveConvo.InputSchema, - opts?: ChatBskyConvoLeaveConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.leaveConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoLeaveConvo.toKnownErr(e) - }) - } - - listConvoRequests( - params?: ChatBskyConvoListConvoRequests.QueryParams, - opts?: ChatBskyConvoListConvoRequests.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.convo.listConvoRequests', - params, - undefined, - opts, - ) - } - - listConvos( - params?: ChatBskyConvoListConvos.QueryParams, - opts?: ChatBskyConvoListConvos.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.convo.listConvos', - params, - undefined, - opts, - ) - } - - lockConvo( - data?: ChatBskyConvoLockConvo.InputSchema, - opts?: ChatBskyConvoLockConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.lockConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoLockConvo.toKnownErr(e) - }) - } - - muteConvo( - data?: ChatBskyConvoMuteConvo.InputSchema, - opts?: ChatBskyConvoMuteConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.muteConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoMuteConvo.toKnownErr(e) - }) - } - - removeReaction( - data?: ChatBskyConvoRemoveReaction.InputSchema, - opts?: ChatBskyConvoRemoveReaction.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.removeReaction', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoRemoveReaction.toKnownErr(e) - }) - } - - sendMessage( - data?: ChatBskyConvoSendMessage.InputSchema, - opts?: ChatBskyConvoSendMessage.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.sendMessage', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoSendMessage.toKnownErr(e) - }) - } - - sendMessageBatch( - data?: ChatBskyConvoSendMessageBatch.InputSchema, - opts?: ChatBskyConvoSendMessageBatch.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.sendMessageBatch', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoSendMessageBatch.toKnownErr(e) - }) - } - - unlockConvo( - data?: ChatBskyConvoUnlockConvo.InputSchema, - opts?: ChatBskyConvoUnlockConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.unlockConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoUnlockConvo.toKnownErr(e) - }) - } - - unmuteConvo( - data?: ChatBskyConvoUnmuteConvo.InputSchema, - opts?: ChatBskyConvoUnmuteConvo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.unmuteConvo', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoUnmuteConvo.toKnownErr(e) - }) - } - - updateAllRead( - data?: ChatBskyConvoUpdateAllRead.InputSchema, - opts?: ChatBskyConvoUpdateAllRead.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.convo.updateAllRead', - opts?.qp, - data, - opts, - ) - } - - updateRead( - data?: ChatBskyConvoUpdateRead.InputSchema, - opts?: ChatBskyConvoUpdateRead.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.convo.updateRead', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyConvoUpdateRead.toKnownErr(e) - }) - } -} - -export class ChatBskyGroupNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - addMembers( - data?: ChatBskyGroupAddMembers.InputSchema, - opts?: ChatBskyGroupAddMembers.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.addMembers', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupAddMembers.toKnownErr(e) - }) - } - - approveJoinRequest( - data?: ChatBskyGroupApproveJoinRequest.InputSchema, - opts?: ChatBskyGroupApproveJoinRequest.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.approveJoinRequest', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupApproveJoinRequest.toKnownErr(e) - }) - } - - createGroup( - data?: ChatBskyGroupCreateGroup.InputSchema, - opts?: ChatBskyGroupCreateGroup.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.createGroup', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupCreateGroup.toKnownErr(e) - }) - } - - createJoinLink( - data?: ChatBskyGroupCreateJoinLink.InputSchema, - opts?: ChatBskyGroupCreateJoinLink.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.createJoinLink', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupCreateJoinLink.toKnownErr(e) - }) - } - - disableJoinLink( - data?: ChatBskyGroupDisableJoinLink.InputSchema, - opts?: ChatBskyGroupDisableJoinLink.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.disableJoinLink', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupDisableJoinLink.toKnownErr(e) - }) - } - - editGroup( - data?: ChatBskyGroupEditGroup.InputSchema, - opts?: ChatBskyGroupEditGroup.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.editGroup', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupEditGroup.toKnownErr(e) - }) - } - - editJoinLink( - data?: ChatBskyGroupEditJoinLink.InputSchema, - opts?: ChatBskyGroupEditJoinLink.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.editJoinLink', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupEditJoinLink.toKnownErr(e) - }) - } - - enableJoinLink( - data?: ChatBskyGroupEnableJoinLink.InputSchema, - opts?: ChatBskyGroupEnableJoinLink.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.enableJoinLink', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupEnableJoinLink.toKnownErr(e) - }) - } - - getGroupPublicInfo( - params?: ChatBskyGroupGetGroupPublicInfo.QueryParams, - opts?: ChatBskyGroupGetGroupPublicInfo.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.getGroupPublicInfo', params, undefined, opts) - .catch((e) => { - throw ChatBskyGroupGetGroupPublicInfo.toKnownErr(e) - }) - } - - listJoinRequests( - params?: ChatBskyGroupListJoinRequests.QueryParams, - opts?: ChatBskyGroupListJoinRequests.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.listJoinRequests', params, undefined, opts) - .catch((e) => { - throw ChatBskyGroupListJoinRequests.toKnownErr(e) - }) - } - - rejectJoinRequest( - data?: ChatBskyGroupRejectJoinRequest.InputSchema, - opts?: ChatBskyGroupRejectJoinRequest.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.rejectJoinRequest', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupRejectJoinRequest.toKnownErr(e) - }) - } - - removeMembers( - data?: ChatBskyGroupRemoveMembers.InputSchema, - opts?: ChatBskyGroupRemoveMembers.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.removeMembers', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupRemoveMembers.toKnownErr(e) - }) - } - - requestJoin( - data?: ChatBskyGroupRequestJoin.InputSchema, - opts?: ChatBskyGroupRequestJoin.CallOptions, - ): Promise { - return this._client - .call('chat.bsky.group.requestJoin', opts?.qp, data, opts) - .catch((e) => { - throw ChatBskyGroupRequestJoin.toKnownErr(e) - }) - } -} - -export class ChatBskyModerationNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getActorMetadata( - params?: ChatBskyModerationGetActorMetadata.QueryParams, - opts?: ChatBskyModerationGetActorMetadata.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.moderation.getActorMetadata', - params, - undefined, - opts, - ) - } - - getMessageContext( - params?: ChatBskyModerationGetMessageContext.QueryParams, - opts?: ChatBskyModerationGetMessageContext.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.moderation.getMessageContext', - params, - undefined, - opts, - ) - } - - updateActorAccess( - data?: ChatBskyModerationUpdateActorAccess.InputSchema, - opts?: ChatBskyModerationUpdateActorAccess.CallOptions, - ): Promise { - return this._client.call( - 'chat.bsky.moderation.updateActorAccess', - opts?.qp, - data, - opts, - ) - } -} - -export class ComNS { - _client: XrpcClient - atproto: ComAtprotoNS - germnetwork: ComGermnetworkNS - - constructor(client: XrpcClient) { - this._client = client - this.atproto = new ComAtprotoNS(client) - this.germnetwork = new ComGermnetworkNS(client) - } -} - -export class ComAtprotoNS { - _client: XrpcClient - admin: ComAtprotoAdminNS - identity: ComAtprotoIdentityNS - label: ComAtprotoLabelNS - lexicon: ComAtprotoLexiconNS - moderation: ComAtprotoModerationNS - repo: ComAtprotoRepoNS - server: ComAtprotoServerNS - sync: ComAtprotoSyncNS - temp: ComAtprotoTempNS - - constructor(client: XrpcClient) { - this._client = client - this.admin = new ComAtprotoAdminNS(client) - this.identity = new ComAtprotoIdentityNS(client) - this.label = new ComAtprotoLabelNS(client) - this.lexicon = new ComAtprotoLexiconNS(client) - this.moderation = new ComAtprotoModerationNS(client) - this.repo = new ComAtprotoRepoNS(client) - this.server = new ComAtprotoServerNS(client) - this.sync = new ComAtprotoSyncNS(client) - this.temp = new ComAtprotoTempNS(client) - } -} - -export class ComAtprotoAdminNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - deleteAccount( - data?: ComAtprotoAdminDeleteAccount.InputSchema, - opts?: ComAtprotoAdminDeleteAccount.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.deleteAccount', - opts?.qp, - data, - opts, - ) - } - - disableAccountInvites( - data?: ComAtprotoAdminDisableAccountInvites.InputSchema, - opts?: ComAtprotoAdminDisableAccountInvites.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.disableAccountInvites', - opts?.qp, - data, - opts, - ) - } - - disableInviteCodes( - data?: ComAtprotoAdminDisableInviteCodes.InputSchema, - opts?: ComAtprotoAdminDisableInviteCodes.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.disableInviteCodes', - opts?.qp, - data, - opts, - ) - } - - enableAccountInvites( - data?: ComAtprotoAdminEnableAccountInvites.InputSchema, - opts?: ComAtprotoAdminEnableAccountInvites.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.enableAccountInvites', - opts?.qp, - data, - opts, - ) - } - - getAccountInfo( - params?: ComAtprotoAdminGetAccountInfo.QueryParams, - opts?: ComAtprotoAdminGetAccountInfo.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.getAccountInfo', - params, - undefined, - opts, - ) - } - - getAccountInfos( - params?: ComAtprotoAdminGetAccountInfos.QueryParams, - opts?: ComAtprotoAdminGetAccountInfos.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.getAccountInfos', - params, - undefined, - opts, - ) - } - - getInviteCodes( - params?: ComAtprotoAdminGetInviteCodes.QueryParams, - opts?: ComAtprotoAdminGetInviteCodes.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.getInviteCodes', - params, - undefined, - opts, - ) - } - - getSubjectStatus( - params?: ComAtprotoAdminGetSubjectStatus.QueryParams, - opts?: ComAtprotoAdminGetSubjectStatus.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.getSubjectStatus', - params, - undefined, - opts, - ) - } - - searchAccounts( - params?: ComAtprotoAdminSearchAccounts.QueryParams, - opts?: ComAtprotoAdminSearchAccounts.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.searchAccounts', - params, - undefined, - opts, - ) - } - - sendEmail( - data?: ComAtprotoAdminSendEmail.InputSchema, - opts?: ComAtprotoAdminSendEmail.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.sendEmail', - opts?.qp, - data, - opts, - ) - } - - updateAccountEmail( - data?: ComAtprotoAdminUpdateAccountEmail.InputSchema, - opts?: ComAtprotoAdminUpdateAccountEmail.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.updateAccountEmail', - opts?.qp, - data, - opts, - ) - } - - updateAccountHandle( - data?: ComAtprotoAdminUpdateAccountHandle.InputSchema, - opts?: ComAtprotoAdminUpdateAccountHandle.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.updateAccountHandle', - opts?.qp, - data, - opts, - ) - } - - updateAccountPassword( - data?: ComAtprotoAdminUpdateAccountPassword.InputSchema, - opts?: ComAtprotoAdminUpdateAccountPassword.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.updateAccountPassword', - opts?.qp, - data, - opts, - ) - } - - updateAccountSigningKey( - data?: ComAtprotoAdminUpdateAccountSigningKey.InputSchema, - opts?: ComAtprotoAdminUpdateAccountSigningKey.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.updateAccountSigningKey', - opts?.qp, - data, - opts, - ) - } - - updateSubjectStatus( - data?: ComAtprotoAdminUpdateSubjectStatus.InputSchema, - opts?: ComAtprotoAdminUpdateSubjectStatus.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.admin.updateSubjectStatus', - opts?.qp, - data, - opts, - ) - } -} - -export class ComAtprotoIdentityNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getRecommendedDidCredentials( - params?: ComAtprotoIdentityGetRecommendedDidCredentials.QueryParams, - opts?: ComAtprotoIdentityGetRecommendedDidCredentials.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.identity.getRecommendedDidCredentials', - params, - undefined, - opts, - ) - } - - refreshIdentity( - data?: ComAtprotoIdentityRefreshIdentity.InputSchema, - opts?: ComAtprotoIdentityRefreshIdentity.CallOptions, - ): Promise { - return this._client - .call('com.atproto.identity.refreshIdentity', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoIdentityRefreshIdentity.toKnownErr(e) - }) - } - - requestPlcOperationSignature( - data?: ComAtprotoIdentityRequestPlcOperationSignature.InputSchema, - opts?: ComAtprotoIdentityRequestPlcOperationSignature.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.identity.requestPlcOperationSignature', - opts?.qp, - data, - opts, - ) - } - - resolveDid( - params?: ComAtprotoIdentityResolveDid.QueryParams, - opts?: ComAtprotoIdentityResolveDid.CallOptions, - ): Promise { - return this._client - .call('com.atproto.identity.resolveDid', params, undefined, opts) - .catch((e) => { - throw ComAtprotoIdentityResolveDid.toKnownErr(e) - }) - } - - resolveHandle( - params?: ComAtprotoIdentityResolveHandle.QueryParams, - opts?: ComAtprotoIdentityResolveHandle.CallOptions, - ): Promise { - return this._client - .call('com.atproto.identity.resolveHandle', params, undefined, opts) - .catch((e) => { - throw ComAtprotoIdentityResolveHandle.toKnownErr(e) - }) - } - - resolveIdentity( - params?: ComAtprotoIdentityResolveIdentity.QueryParams, - opts?: ComAtprotoIdentityResolveIdentity.CallOptions, - ): Promise { - return this._client - .call('com.atproto.identity.resolveIdentity', params, undefined, opts) - .catch((e) => { - throw ComAtprotoIdentityResolveIdentity.toKnownErr(e) - }) - } - - signPlcOperation( - data?: ComAtprotoIdentitySignPlcOperation.InputSchema, - opts?: ComAtprotoIdentitySignPlcOperation.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.identity.signPlcOperation', - opts?.qp, - data, - opts, - ) - } - - submitPlcOperation( - data?: ComAtprotoIdentitySubmitPlcOperation.InputSchema, - opts?: ComAtprotoIdentitySubmitPlcOperation.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.identity.submitPlcOperation', - opts?.qp, - data, - opts, - ) - } - - updateHandle( - data?: ComAtprotoIdentityUpdateHandle.InputSchema, - opts?: ComAtprotoIdentityUpdateHandle.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.identity.updateHandle', - opts?.qp, - data, - opts, - ) - } -} - -export class ComAtprotoLabelNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - queryLabels( - params?: ComAtprotoLabelQueryLabels.QueryParams, - opts?: ComAtprotoLabelQueryLabels.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.label.queryLabels', - params, - undefined, - opts, - ) - } -} - -export class ComAtprotoLexiconNS { - _client: XrpcClient - schema: ComAtprotoLexiconSchemaRecord - - constructor(client: XrpcClient) { - this._client = client - this.schema = new ComAtprotoLexiconSchemaRecord(client) - } - - resolveLexicon( - params?: ComAtprotoLexiconResolveLexicon.QueryParams, - opts?: ComAtprotoLexiconResolveLexicon.CallOptions, - ): Promise { - return this._client - .call('com.atproto.lexicon.resolveLexicon', params, undefined, opts) - .catch((e) => { - throw ComAtprotoLexiconResolveLexicon.toKnownErr(e) - }) - } -} - -export class ComAtprotoLexiconSchemaRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: ComAtprotoLexiconSchema.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'com.atproto.lexicon.schema', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: ComAtprotoLexiconSchema.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'com.atproto.lexicon.schema', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'com.atproto.lexicon.schema' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'com.atproto.lexicon.schema' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'com.atproto.lexicon.schema', ...params }, - { headers }, - ) - } -} - -export class ComAtprotoModerationNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - createReport( - data?: ComAtprotoModerationCreateReport.InputSchema, - opts?: ComAtprotoModerationCreateReport.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.moderation.createReport', - opts?.qp, - data, - opts, - ) - } -} - -export class ComAtprotoRepoNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - applyWrites( - data?: ComAtprotoRepoApplyWrites.InputSchema, - opts?: ComAtprotoRepoApplyWrites.CallOptions, - ): Promise { - return this._client - .call('com.atproto.repo.applyWrites', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoRepoApplyWrites.toKnownErr(e) - }) - } - - createRecord( - data?: ComAtprotoRepoCreateRecord.InputSchema, - opts?: ComAtprotoRepoCreateRecord.CallOptions, - ): Promise { - return this._client - .call('com.atproto.repo.createRecord', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoRepoCreateRecord.toKnownErr(e) - }) - } - - deleteRecord( - data?: ComAtprotoRepoDeleteRecord.InputSchema, - opts?: ComAtprotoRepoDeleteRecord.CallOptions, - ): Promise { - return this._client - .call('com.atproto.repo.deleteRecord', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoRepoDeleteRecord.toKnownErr(e) - }) - } - - describeRepo( - params?: ComAtprotoRepoDescribeRepo.QueryParams, - opts?: ComAtprotoRepoDescribeRepo.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.repo.describeRepo', - params, - undefined, - opts, - ) - } - - getRecord( - params?: ComAtprotoRepoGetRecord.QueryParams, - opts?: ComAtprotoRepoGetRecord.CallOptions, - ): Promise { - return this._client - .call('com.atproto.repo.getRecord', params, undefined, opts) - .catch((e) => { - throw ComAtprotoRepoGetRecord.toKnownErr(e) - }) - } - - importRepo( - data?: ComAtprotoRepoImportRepo.InputSchema, - opts?: ComAtprotoRepoImportRepo.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.repo.importRepo', - opts?.qp, - data, - opts, - ) - } - - listMissingBlobs( - params?: ComAtprotoRepoListMissingBlobs.QueryParams, - opts?: ComAtprotoRepoListMissingBlobs.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.repo.listMissingBlobs', - params, - undefined, - opts, - ) - } - - listRecords( - params?: ComAtprotoRepoListRecords.QueryParams, - opts?: ComAtprotoRepoListRecords.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.repo.listRecords', - params, - undefined, - opts, - ) - } - - putRecord( - data?: ComAtprotoRepoPutRecord.InputSchema, - opts?: ComAtprotoRepoPutRecord.CallOptions, - ): Promise { - return this._client - .call('com.atproto.repo.putRecord', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoRepoPutRecord.toKnownErr(e) - }) - } - - uploadBlob( - data?: ComAtprotoRepoUploadBlob.InputSchema, - opts?: ComAtprotoRepoUploadBlob.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.repo.uploadBlob', - opts?.qp, - data, - opts, - ) - } -} - -export class ComAtprotoServerNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - activateAccount( - data?: ComAtprotoServerActivateAccount.InputSchema, - opts?: ComAtprotoServerActivateAccount.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.activateAccount', - opts?.qp, - data, - opts, - ) - } - - checkAccountStatus( - params?: ComAtprotoServerCheckAccountStatus.QueryParams, - opts?: ComAtprotoServerCheckAccountStatus.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.checkAccountStatus', - params, - undefined, - opts, - ) - } - - confirmEmail( - data?: ComAtprotoServerConfirmEmail.InputSchema, - opts?: ComAtprotoServerConfirmEmail.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.confirmEmail', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerConfirmEmail.toKnownErr(e) - }) - } - - createAccount( - data?: ComAtprotoServerCreateAccount.InputSchema, - opts?: ComAtprotoServerCreateAccount.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.createAccount', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerCreateAccount.toKnownErr(e) - }) - } - - createAppPassword( - data?: ComAtprotoServerCreateAppPassword.InputSchema, - opts?: ComAtprotoServerCreateAppPassword.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.createAppPassword', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerCreateAppPassword.toKnownErr(e) - }) - } - - createInviteCode( - data?: ComAtprotoServerCreateInviteCode.InputSchema, - opts?: ComAtprotoServerCreateInviteCode.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.createInviteCode', - opts?.qp, - data, - opts, - ) - } - - createInviteCodes( - data?: ComAtprotoServerCreateInviteCodes.InputSchema, - opts?: ComAtprotoServerCreateInviteCodes.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.createInviteCodes', - opts?.qp, - data, - opts, - ) - } - - createSession( - data?: ComAtprotoServerCreateSession.InputSchema, - opts?: ComAtprotoServerCreateSession.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.createSession', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerCreateSession.toKnownErr(e) - }) - } - - deactivateAccount( - data?: ComAtprotoServerDeactivateAccount.InputSchema, - opts?: ComAtprotoServerDeactivateAccount.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.deactivateAccount', - opts?.qp, - data, - opts, - ) - } - - deleteAccount( - data?: ComAtprotoServerDeleteAccount.InputSchema, - opts?: ComAtprotoServerDeleteAccount.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.deleteAccount', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerDeleteAccount.toKnownErr(e) - }) - } - - deleteSession( - data?: ComAtprotoServerDeleteSession.InputSchema, - opts?: ComAtprotoServerDeleteSession.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.deleteSession', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerDeleteSession.toKnownErr(e) - }) - } - - describeServer( - params?: ComAtprotoServerDescribeServer.QueryParams, - opts?: ComAtprotoServerDescribeServer.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.describeServer', - params, - undefined, - opts, - ) - } - - getAccountInviteCodes( - params?: ComAtprotoServerGetAccountInviteCodes.QueryParams, - opts?: ComAtprotoServerGetAccountInviteCodes.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.getAccountInviteCodes', params, undefined, opts) - .catch((e) => { - throw ComAtprotoServerGetAccountInviteCodes.toKnownErr(e) - }) - } - - getServiceAuth( - params?: ComAtprotoServerGetServiceAuth.QueryParams, - opts?: ComAtprotoServerGetServiceAuth.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.getServiceAuth', params, undefined, opts) - .catch((e) => { - throw ComAtprotoServerGetServiceAuth.toKnownErr(e) - }) - } - - getSession( - params?: ComAtprotoServerGetSession.QueryParams, - opts?: ComAtprotoServerGetSession.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.getSession', - params, - undefined, - opts, - ) - } - - listAppPasswords( - params?: ComAtprotoServerListAppPasswords.QueryParams, - opts?: ComAtprotoServerListAppPasswords.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.listAppPasswords', params, undefined, opts) - .catch((e) => { - throw ComAtprotoServerListAppPasswords.toKnownErr(e) - }) - } - - refreshSession( - data?: ComAtprotoServerRefreshSession.InputSchema, - opts?: ComAtprotoServerRefreshSession.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.refreshSession', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerRefreshSession.toKnownErr(e) - }) - } - - requestAccountDelete( - data?: ComAtprotoServerRequestAccountDelete.InputSchema, - opts?: ComAtprotoServerRequestAccountDelete.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.requestAccountDelete', - opts?.qp, - data, - opts, - ) - } - - requestEmailConfirmation( - data?: ComAtprotoServerRequestEmailConfirmation.InputSchema, - opts?: ComAtprotoServerRequestEmailConfirmation.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.requestEmailConfirmation', - opts?.qp, - data, - opts, - ) - } - - requestEmailUpdate( - data?: ComAtprotoServerRequestEmailUpdate.InputSchema, - opts?: ComAtprotoServerRequestEmailUpdate.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.requestEmailUpdate', - opts?.qp, - data, - opts, - ) - } - - requestPasswordReset( - data?: ComAtprotoServerRequestPasswordReset.InputSchema, - opts?: ComAtprotoServerRequestPasswordReset.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.requestPasswordReset', - opts?.qp, - data, - opts, - ) - } - - reserveSigningKey( - data?: ComAtprotoServerReserveSigningKey.InputSchema, - opts?: ComAtprotoServerReserveSigningKey.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.reserveSigningKey', - opts?.qp, - data, - opts, - ) - } - - resetPassword( - data?: ComAtprotoServerResetPassword.InputSchema, - opts?: ComAtprotoServerResetPassword.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.resetPassword', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerResetPassword.toKnownErr(e) - }) - } - - revokeAppPassword( - data?: ComAtprotoServerRevokeAppPassword.InputSchema, - opts?: ComAtprotoServerRevokeAppPassword.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.server.revokeAppPassword', - opts?.qp, - data, - opts, - ) - } - - updateEmail( - data?: ComAtprotoServerUpdateEmail.InputSchema, - opts?: ComAtprotoServerUpdateEmail.CallOptions, - ): Promise { - return this._client - .call('com.atproto.server.updateEmail', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoServerUpdateEmail.toKnownErr(e) - }) - } -} - -export class ComAtprotoSyncNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getBlob( - params?: ComAtprotoSyncGetBlob.QueryParams, - opts?: ComAtprotoSyncGetBlob.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getBlob', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetBlob.toKnownErr(e) - }) - } - - getBlocks( - params?: ComAtprotoSyncGetBlocks.QueryParams, - opts?: ComAtprotoSyncGetBlocks.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getBlocks', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetBlocks.toKnownErr(e) - }) - } - - getCheckout( - params?: ComAtprotoSyncGetCheckout.QueryParams, - opts?: ComAtprotoSyncGetCheckout.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.sync.getCheckout', - params, - undefined, - opts, - ) - } - - getHead( - params?: ComAtprotoSyncGetHead.QueryParams, - opts?: ComAtprotoSyncGetHead.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getHead', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetHead.toKnownErr(e) - }) - } - - getHostStatus( - params?: ComAtprotoSyncGetHostStatus.QueryParams, - opts?: ComAtprotoSyncGetHostStatus.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getHostStatus', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetHostStatus.toKnownErr(e) - }) - } - - getLatestCommit( - params?: ComAtprotoSyncGetLatestCommit.QueryParams, - opts?: ComAtprotoSyncGetLatestCommit.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getLatestCommit', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetLatestCommit.toKnownErr(e) - }) - } - - getRecord( - params?: ComAtprotoSyncGetRecord.QueryParams, - opts?: ComAtprotoSyncGetRecord.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getRecord', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetRecord.toKnownErr(e) - }) - } - - getRepo( - params?: ComAtprotoSyncGetRepo.QueryParams, - opts?: ComAtprotoSyncGetRepo.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getRepo', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetRepo.toKnownErr(e) - }) - } - - getRepoStatus( - params?: ComAtprotoSyncGetRepoStatus.QueryParams, - opts?: ComAtprotoSyncGetRepoStatus.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.getRepoStatus', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncGetRepoStatus.toKnownErr(e) - }) - } - - listBlobs( - params?: ComAtprotoSyncListBlobs.QueryParams, - opts?: ComAtprotoSyncListBlobs.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.listBlobs', params, undefined, opts) - .catch((e) => { - throw ComAtprotoSyncListBlobs.toKnownErr(e) - }) - } - - listHosts( - params?: ComAtprotoSyncListHosts.QueryParams, - opts?: ComAtprotoSyncListHosts.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.sync.listHosts', - params, - undefined, - opts, - ) - } - - listRepos( - params?: ComAtprotoSyncListRepos.QueryParams, - opts?: ComAtprotoSyncListRepos.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.sync.listRepos', - params, - undefined, - opts, - ) - } - - listReposByCollection( - params?: ComAtprotoSyncListReposByCollection.QueryParams, - opts?: ComAtprotoSyncListReposByCollection.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.sync.listReposByCollection', - params, - undefined, - opts, - ) - } - - notifyOfUpdate( - data?: ComAtprotoSyncNotifyOfUpdate.InputSchema, - opts?: ComAtprotoSyncNotifyOfUpdate.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.sync.notifyOfUpdate', - opts?.qp, - data, - opts, - ) - } - - requestCrawl( - data?: ComAtprotoSyncRequestCrawl.InputSchema, - opts?: ComAtprotoSyncRequestCrawl.CallOptions, - ): Promise { - return this._client - .call('com.atproto.sync.requestCrawl', opts?.qp, data, opts) - .catch((e) => { - throw ComAtprotoSyncRequestCrawl.toKnownErr(e) - }) - } -} - -export class ComAtprotoTempNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - addReservedHandle( - data?: ComAtprotoTempAddReservedHandle.InputSchema, - opts?: ComAtprotoTempAddReservedHandle.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.temp.addReservedHandle', - opts?.qp, - data, - opts, - ) - } - - checkHandleAvailability( - params?: ComAtprotoTempCheckHandleAvailability.QueryParams, - opts?: ComAtprotoTempCheckHandleAvailability.CallOptions, - ): Promise { - return this._client - .call('com.atproto.temp.checkHandleAvailability', params, undefined, opts) - .catch((e) => { - throw ComAtprotoTempCheckHandleAvailability.toKnownErr(e) - }) - } - - checkSignupQueue( - params?: ComAtprotoTempCheckSignupQueue.QueryParams, - opts?: ComAtprotoTempCheckSignupQueue.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.temp.checkSignupQueue', - params, - undefined, - opts, - ) - } - - dereferenceScope( - params?: ComAtprotoTempDereferenceScope.QueryParams, - opts?: ComAtprotoTempDereferenceScope.CallOptions, - ): Promise { - return this._client - .call('com.atproto.temp.dereferenceScope', params, undefined, opts) - .catch((e) => { - throw ComAtprotoTempDereferenceScope.toKnownErr(e) - }) - } - - fetchLabels( - params?: ComAtprotoTempFetchLabels.QueryParams, - opts?: ComAtprotoTempFetchLabels.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.temp.fetchLabels', - params, - undefined, - opts, - ) - } - - requestPhoneVerification( - data?: ComAtprotoTempRequestPhoneVerification.InputSchema, - opts?: ComAtprotoTempRequestPhoneVerification.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.temp.requestPhoneVerification', - opts?.qp, - data, - opts, - ) - } - - revokeAccountCredentials( - data?: ComAtprotoTempRevokeAccountCredentials.InputSchema, - opts?: ComAtprotoTempRevokeAccountCredentials.CallOptions, - ): Promise { - return this._client.call( - 'com.atproto.temp.revokeAccountCredentials', - opts?.qp, - data, - opts, - ) - } -} - -export class ComGermnetworkNS { - _client: XrpcClient - declaration: ComGermnetworkDeclarationRecord - - constructor(client: XrpcClient) { - this._client = client - this.declaration = new ComGermnetworkDeclarationRecord(client) - } -} - -export class ComGermnetworkDeclarationRecord { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - async list( - params: OmitKey, - ): Promise<{ - cursor?: string - records: { uri: string; value: ComGermnetworkDeclaration.Record }[] - }> { - const res = await this._client.call('com.atproto.repo.listRecords', { - collection: 'com.germnetwork.declaration', - ...params, - }) - return res.data - } - - async get( - params: OmitKey, - ): Promise<{ - uri: string - cid: string - value: ComGermnetworkDeclaration.Record - }> { - const res = await this._client.call('com.atproto.repo.getRecord', { - collection: 'com.germnetwork.declaration', - ...params, - }) - return res.data - } - - async create( - params: OmitKey< - ComAtprotoRepoCreateRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'com.germnetwork.declaration' - const res = await this._client.call( - 'com.atproto.repo.createRecord', - undefined, - { - collection, - rkey: 'self', - ...params, - record: { ...record, $type: collection }, - }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async put( - params: OmitKey< - ComAtprotoRepoPutRecord.InputSchema, - 'collection' | 'record' - >, - record: Un$Typed, - headers?: Record, - ): Promise<{ uri: string; cid: string }> { - const collection = 'com.germnetwork.declaration' - const res = await this._client.call( - 'com.atproto.repo.putRecord', - undefined, - { collection, ...params, record: { ...record, $type: collection } }, - { encoding: 'application/json', headers }, - ) - return res.data - } - - async delete( - params: OmitKey, - headers?: Record, - ): Promise { - await this._client.call( - 'com.atproto.repo.deleteRecord', - undefined, - { collection: 'com.germnetwork.declaration', ...params }, - { headers }, - ) - } -} - -export class ToolsNS { - _client: XrpcClient - ozone: ToolsOzoneNS - - constructor(client: XrpcClient) { - this._client = client - this.ozone = new ToolsOzoneNS(client) - } -} - -export class ToolsOzoneNS { - _client: XrpcClient - communication: ToolsOzoneCommunicationNS - hosting: ToolsOzoneHostingNS - moderation: ToolsOzoneModerationNS - safelink: ToolsOzoneSafelinkNS - server: ToolsOzoneServerNS - set: ToolsOzoneSetNS - setting: ToolsOzoneSettingNS - signature: ToolsOzoneSignatureNS - team: ToolsOzoneTeamNS - verification: ToolsOzoneVerificationNS - - constructor(client: XrpcClient) { - this._client = client - this.communication = new ToolsOzoneCommunicationNS(client) - this.hosting = new ToolsOzoneHostingNS(client) - this.moderation = new ToolsOzoneModerationNS(client) - this.safelink = new ToolsOzoneSafelinkNS(client) - this.server = new ToolsOzoneServerNS(client) - this.set = new ToolsOzoneSetNS(client) - this.setting = new ToolsOzoneSettingNS(client) - this.signature = new ToolsOzoneSignatureNS(client) - this.team = new ToolsOzoneTeamNS(client) - this.verification = new ToolsOzoneVerificationNS(client) - } -} - -export class ToolsOzoneCommunicationNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - createTemplate( - data?: ToolsOzoneCommunicationCreateTemplate.InputSchema, - opts?: ToolsOzoneCommunicationCreateTemplate.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.communication.createTemplate', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneCommunicationCreateTemplate.toKnownErr(e) - }) - } - - deleteTemplate( - data?: ToolsOzoneCommunicationDeleteTemplate.InputSchema, - opts?: ToolsOzoneCommunicationDeleteTemplate.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.communication.deleteTemplate', - opts?.qp, - data, - opts, - ) - } - - listTemplates( - params?: ToolsOzoneCommunicationListTemplates.QueryParams, - opts?: ToolsOzoneCommunicationListTemplates.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.communication.listTemplates', - params, - undefined, - opts, - ) - } - - updateTemplate( - data?: ToolsOzoneCommunicationUpdateTemplate.InputSchema, - opts?: ToolsOzoneCommunicationUpdateTemplate.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.communication.updateTemplate', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneCommunicationUpdateTemplate.toKnownErr(e) - }) - } -} - -export class ToolsOzoneHostingNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getAccountHistory( - params?: ToolsOzoneHostingGetAccountHistory.QueryParams, - opts?: ToolsOzoneHostingGetAccountHistory.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.hosting.getAccountHistory', - params, - undefined, - opts, - ) - } -} - -export class ToolsOzoneModerationNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - cancelScheduledActions( - data?: ToolsOzoneModerationCancelScheduledActions.InputSchema, - opts?: ToolsOzoneModerationCancelScheduledActions.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.cancelScheduledActions', - opts?.qp, - data, - opts, - ) - } - - emitEvent( - data?: ToolsOzoneModerationEmitEvent.InputSchema, - opts?: ToolsOzoneModerationEmitEvent.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.moderation.emitEvent', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneModerationEmitEvent.toKnownErr(e) - }) - } - - getAccountTimeline( - params?: ToolsOzoneModerationGetAccountTimeline.QueryParams, - opts?: ToolsOzoneModerationGetAccountTimeline.CallOptions, - ): Promise { - return this._client - .call( - 'tools.ozone.moderation.getAccountTimeline', - params, - undefined, - opts, - ) - .catch((e) => { - throw ToolsOzoneModerationGetAccountTimeline.toKnownErr(e) - }) - } - - getEvent( - params?: ToolsOzoneModerationGetEvent.QueryParams, - opts?: ToolsOzoneModerationGetEvent.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.getEvent', - params, - undefined, - opts, - ) - } - - getRecord( - params?: ToolsOzoneModerationGetRecord.QueryParams, - opts?: ToolsOzoneModerationGetRecord.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.moderation.getRecord', params, undefined, opts) - .catch((e) => { - throw ToolsOzoneModerationGetRecord.toKnownErr(e) - }) - } - - getRecords( - params?: ToolsOzoneModerationGetRecords.QueryParams, - opts?: ToolsOzoneModerationGetRecords.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.getRecords', - params, - undefined, - opts, - ) - } - - getRepo( - params?: ToolsOzoneModerationGetRepo.QueryParams, - opts?: ToolsOzoneModerationGetRepo.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.moderation.getRepo', params, undefined, opts) - .catch((e) => { - throw ToolsOzoneModerationGetRepo.toKnownErr(e) - }) - } - - getReporterStats( - params?: ToolsOzoneModerationGetReporterStats.QueryParams, - opts?: ToolsOzoneModerationGetReporterStats.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.getReporterStats', - params, - undefined, - opts, - ) - } - - getRepos( - params?: ToolsOzoneModerationGetRepos.QueryParams, - opts?: ToolsOzoneModerationGetRepos.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.getRepos', - params, - undefined, - opts, - ) - } - - getSubjects( - params?: ToolsOzoneModerationGetSubjects.QueryParams, - opts?: ToolsOzoneModerationGetSubjects.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.getSubjects', - params, - undefined, - opts, - ) - } - - listScheduledActions( - data?: ToolsOzoneModerationListScheduledActions.InputSchema, - opts?: ToolsOzoneModerationListScheduledActions.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.listScheduledActions', - opts?.qp, - data, - opts, - ) - } - - queryEvents( - params?: ToolsOzoneModerationQueryEvents.QueryParams, - opts?: ToolsOzoneModerationQueryEvents.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.queryEvents', - params, - undefined, - opts, - ) - } - - queryStatuses( - params?: ToolsOzoneModerationQueryStatuses.QueryParams, - opts?: ToolsOzoneModerationQueryStatuses.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.queryStatuses', - params, - undefined, - opts, - ) - } - - scheduleAction( - data?: ToolsOzoneModerationScheduleAction.InputSchema, - opts?: ToolsOzoneModerationScheduleAction.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.scheduleAction', - opts?.qp, - data, - opts, - ) - } - - searchRepos( - params?: ToolsOzoneModerationSearchRepos.QueryParams, - opts?: ToolsOzoneModerationSearchRepos.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.moderation.searchRepos', - params, - undefined, - opts, - ) - } -} - -export class ToolsOzoneSafelinkNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - addRule( - data?: ToolsOzoneSafelinkAddRule.InputSchema, - opts?: ToolsOzoneSafelinkAddRule.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.safelink.addRule', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneSafelinkAddRule.toKnownErr(e) - }) - } - - queryEvents( - data?: ToolsOzoneSafelinkQueryEvents.InputSchema, - opts?: ToolsOzoneSafelinkQueryEvents.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.safelink.queryEvents', - opts?.qp, - data, - opts, - ) - } - - queryRules( - data?: ToolsOzoneSafelinkQueryRules.InputSchema, - opts?: ToolsOzoneSafelinkQueryRules.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.safelink.queryRules', - opts?.qp, - data, - opts, - ) - } - - removeRule( - data?: ToolsOzoneSafelinkRemoveRule.InputSchema, - opts?: ToolsOzoneSafelinkRemoveRule.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.safelink.removeRule', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneSafelinkRemoveRule.toKnownErr(e) - }) - } - - updateRule( - data?: ToolsOzoneSafelinkUpdateRule.InputSchema, - opts?: ToolsOzoneSafelinkUpdateRule.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.safelink.updateRule', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneSafelinkUpdateRule.toKnownErr(e) - }) - } -} - -export class ToolsOzoneServerNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - getConfig( - params?: ToolsOzoneServerGetConfig.QueryParams, - opts?: ToolsOzoneServerGetConfig.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.server.getConfig', - params, - undefined, - opts, - ) - } -} - -export class ToolsOzoneSetNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - addValues( - data?: ToolsOzoneSetAddValues.InputSchema, - opts?: ToolsOzoneSetAddValues.CallOptions, - ): Promise { - return this._client.call('tools.ozone.set.addValues', opts?.qp, data, opts) - } - - deleteSet( - data?: ToolsOzoneSetDeleteSet.InputSchema, - opts?: ToolsOzoneSetDeleteSet.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.set.deleteSet', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneSetDeleteSet.toKnownErr(e) - }) - } - - deleteValues( - data?: ToolsOzoneSetDeleteValues.InputSchema, - opts?: ToolsOzoneSetDeleteValues.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.set.deleteValues', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneSetDeleteValues.toKnownErr(e) - }) - } - - getValues( - params?: ToolsOzoneSetGetValues.QueryParams, - opts?: ToolsOzoneSetGetValues.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.set.getValues', params, undefined, opts) - .catch((e) => { - throw ToolsOzoneSetGetValues.toKnownErr(e) - }) - } - - querySets( - params?: ToolsOzoneSetQuerySets.QueryParams, - opts?: ToolsOzoneSetQuerySets.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.set.querySets', - params, - undefined, - opts, - ) - } - - upsertSet( - data?: ToolsOzoneSetUpsertSet.InputSchema, - opts?: ToolsOzoneSetUpsertSet.CallOptions, - ): Promise { - return this._client.call('tools.ozone.set.upsertSet', opts?.qp, data, opts) - } -} - -export class ToolsOzoneSettingNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - listOptions( - params?: ToolsOzoneSettingListOptions.QueryParams, - opts?: ToolsOzoneSettingListOptions.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.setting.listOptions', - params, - undefined, - opts, - ) - } - - removeOptions( - data?: ToolsOzoneSettingRemoveOptions.InputSchema, - opts?: ToolsOzoneSettingRemoveOptions.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.setting.removeOptions', - opts?.qp, - data, - opts, - ) - } - - upsertOption( - data?: ToolsOzoneSettingUpsertOption.InputSchema, - opts?: ToolsOzoneSettingUpsertOption.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.setting.upsertOption', - opts?.qp, - data, - opts, - ) - } -} - -export class ToolsOzoneSignatureNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - findCorrelation( - params?: ToolsOzoneSignatureFindCorrelation.QueryParams, - opts?: ToolsOzoneSignatureFindCorrelation.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.signature.findCorrelation', - params, - undefined, - opts, - ) - } - - findRelatedAccounts( - params?: ToolsOzoneSignatureFindRelatedAccounts.QueryParams, - opts?: ToolsOzoneSignatureFindRelatedAccounts.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.signature.findRelatedAccounts', - params, - undefined, - opts, - ) - } - - searchAccounts( - params?: ToolsOzoneSignatureSearchAccounts.QueryParams, - opts?: ToolsOzoneSignatureSearchAccounts.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.signature.searchAccounts', - params, - undefined, - opts, - ) - } -} - -export class ToolsOzoneTeamNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - addMember( - data?: ToolsOzoneTeamAddMember.InputSchema, - opts?: ToolsOzoneTeamAddMember.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.team.addMember', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneTeamAddMember.toKnownErr(e) - }) - } - - deleteMember( - data?: ToolsOzoneTeamDeleteMember.InputSchema, - opts?: ToolsOzoneTeamDeleteMember.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.team.deleteMember', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneTeamDeleteMember.toKnownErr(e) - }) - } - - listMembers( - params?: ToolsOzoneTeamListMembers.QueryParams, - opts?: ToolsOzoneTeamListMembers.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.team.listMembers', - params, - undefined, - opts, - ) - } - - updateMember( - data?: ToolsOzoneTeamUpdateMember.InputSchema, - opts?: ToolsOzoneTeamUpdateMember.CallOptions, - ): Promise { - return this._client - .call('tools.ozone.team.updateMember', opts?.qp, data, opts) - .catch((e) => { - throw ToolsOzoneTeamUpdateMember.toKnownErr(e) - }) - } -} - -export class ToolsOzoneVerificationNS { - _client: XrpcClient - - constructor(client: XrpcClient) { - this._client = client - } - - grantVerifications( - data?: ToolsOzoneVerificationGrantVerifications.InputSchema, - opts?: ToolsOzoneVerificationGrantVerifications.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.verification.grantVerifications', - opts?.qp, - data, - opts, - ) - } - - listVerifications( - params?: ToolsOzoneVerificationListVerifications.QueryParams, - opts?: ToolsOzoneVerificationListVerifications.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.verification.listVerifications', - params, - undefined, - opts, - ) - } - - revokeVerifications( - data?: ToolsOzoneVerificationRevokeVerifications.InputSchema, - opts?: ToolsOzoneVerificationRevokeVerifications.CallOptions, - ): Promise { - return this._client.call( - 'tools.ozone.verification.revokeVerifications', - opts?.qp, - data, - opts, - ) - } -} diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts deleted file mode 100644 index 49912fef345..00000000000 --- a/packages/api/src/client/lexicons.ts +++ /dev/null @@ -1,23288 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { - type LexiconDoc, - Lexicons, - ValidationError, - type ValidationResult, -} from '@atproto/lexicon' -import { type $Typed, is$typed, maybe$typed } from './util.js' - -export const schemaDict = { - 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, - }, - pronouns: { - type: 'string', - }, - 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', - }, - verification: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#verificationState', - }, - status: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#statusView', - }, - debug: { - type: 'unknown', - description: 'Debug information for internal development', - }, - }, - }, - profileView: { - type: 'object', - required: ['did', 'handle'], - properties: { - did: { - type: 'string', - format: 'did', - }, - handle: { - type: 'string', - format: 'handle', - }, - displayName: { - type: 'string', - maxGraphemes: 64, - maxLength: 640, - }, - pronouns: { - type: 'string', - }, - 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', - }, - }, - verification: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#verificationState', - }, - status: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#statusView', - }, - debug: { - type: 'unknown', - description: 'Debug information for internal development', - }, - }, - }, - 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, - }, - pronouns: { - type: 'string', - }, - website: { - type: 'string', - format: 'uri', - }, - 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', - }, - verification: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#verificationState', - }, - status: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#statusView', - }, - debug: { - type: 'unknown', - description: 'Debug information for internal development', - }, - }, - }, - 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', - }, - activitySubscription: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileAssociatedActivitySubscription', - }, - germ: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileAssociatedGerm', - }, - }, - }, - profileAssociatedChat: { - type: 'object', - required: ['allowIncoming'], - properties: { - allowIncoming: { - type: 'string', - knownValues: ['all', 'none', 'following'], - }, - allowGroupInvites: { - type: 'string', - knownValues: ['all', 'none', 'following'], - }, - }, - }, - profileAssociatedGerm: { - type: 'object', - required: ['showButtonTo', 'messageMeUrl'], - properties: { - messageMeUrl: { - type: 'string', - format: 'uri', - }, - showButtonTo: { - type: 'string', - knownValues: ['usersIFollow', 'everyone'], - }, - }, - }, - profileAssociatedActivitySubscription: { - type: 'object', - required: ['allowSubscriptions'], - properties: { - allowSubscriptions: { - type: 'string', - knownValues: ['followers', 'mutuals', 'none'], - }, - }, - }, - 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: { - description: - 'This property is present only in selected cases, as an optimization.', - type: 'ref', - ref: 'lex:app.bsky.actor.defs#knownFollowers', - }, - activitySubscription: { - description: - 'This property is present only in selected cases, as an optimization.', - type: 'ref', - ref: 'lex:app.bsky.notification.defs#activitySubscription', - }, - }, - }, - 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', - }, - }, - }, - }, - verificationState: { - type: 'object', - description: - 'Represents the verification information about the user this object is attached to.', - required: ['verifications', 'verifiedStatus', 'trustedVerifierStatus'], - properties: { - verifications: { - type: 'array', - description: - 'All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#verificationView', - }, - }, - verifiedStatus: { - type: 'string', - description: "The user's status as a verified account.", - knownValues: ['valid', 'invalid', 'none'], - }, - trustedVerifierStatus: { - type: 'string', - description: "The user's status as a trusted verifier.", - knownValues: ['valid', 'invalid', 'none'], - }, - }, - }, - verificationView: { - type: 'object', - description: 'An individual verification for an associated subject.', - required: ['issuer', 'uri', 'isValid', 'createdAt'], - properties: { - issuer: { - type: 'string', - description: 'The user who issued this verification.', - format: 'did', - }, - uri: { - type: 'string', - description: 'The AT-URI of the verification record.', - format: 'at-uri', - }, - isValid: { - type: 'boolean', - description: - 'True if the verification passes validation, otherwise false.', - }, - createdAt: { - type: 'string', - description: 'Timestamp when the verification was created.', - format: 'datetime', - }, - }, - }, - 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#declaredAgePref', - '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', - 'lex:app.bsky.actor.defs#verificationPrefs', - 'lex:app.bsky.actor.defs#liveEventPreferences', - ], - }, - }, - 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.', - }, - }, - }, - declaredAgePref: { - type: 'object', - description: - "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.", - properties: { - isOverAge13: { - type: 'boolean', - description: - 'Indicates if the user has declared that they are over 13 years of age.', - }, - isOverAge16: { - type: 'boolean', - description: - 'Indicates if the user has declared that they are over 16 years of age.', - }, - isOverAge18: { - type: 'boolean', - description: - 'Indicates if the user has declared that they are over 18 years of age.', - }, - }, - }, - 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', - ], - }, - }, - }, - 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.', - }, - }, - }, - verificationPrefs: { - type: 'object', - description: 'Preferences for how verified accounts appear in the app.', - required: [], - properties: { - hideBadges: { - description: - 'Hide the blue check badges for verified accounts and trusted verifiers.', - type: 'boolean', - default: false, - }, - }, - }, - liveEventPreferences: { - type: 'object', - description: 'Preferences for live events.', - properties: { - hiddenFeedIds: { - description: - 'A list of feed IDs that the user has hidden from live events.', - type: 'array', - items: { - type: 'string', - }, - }, - hideAllFeeds: { - description: 'Whether to hide all feeds from live events.', - type: 'boolean', - default: false, - }, - }, - }, - 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'], - }, - }, - }, - }, - statusView: { - type: 'object', - required: ['status', 'record'], - properties: { - uri: { - type: 'string', - format: 'at-uri', - }, - cid: { - type: 'string', - format: 'cid', - }, - status: { - type: 'string', - description: 'The status for the account.', - knownValues: ['app.bsky.actor.status#live'], - }, - record: { - type: 'unknown', - }, - embed: { - type: 'union', - description: 'An optional embed associated with the status.', - refs: ['lex:app.bsky.embed.external#view'], - }, - labels: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:com.atproto.label.defs#label', - }, - }, - expiresAt: { - type: 'string', - description: - 'The date when this status will expire. The application might choose to no longer return the status after expiration.', - format: 'datetime', - }, - isActive: { - type: 'boolean', - description: - 'True if the status is not expired, false if it is expired. Only present if expiration was set.', - }, - isDisabled: { - type: 'boolean', - description: - "True if the user's go-live access has been disabled by a moderator, false otherwise.", - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - 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, - }, - pronouns: { - type: 'string', - description: 'Free-form pronouns text.', - maxGraphemes: 20, - maxLength: 200, - }, - website: { - type: 'string', - format: 'uri', - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyActorStatus: { - lexicon: 1, - id: 'app.bsky.actor.status', - defs: { - main: { - type: 'record', - description: 'A declaration of a Bluesky account status.', - key: 'literal:self', - record: { - type: 'object', - required: ['status', 'createdAt'], - properties: { - status: { - type: 'string', - description: 'The status for the account.', - knownValues: ['app.bsky.actor.status#live'], - }, - embed: { - type: 'union', - description: 'An optional embed associated with the status.', - refs: ['lex:app.bsky.embed.external'], - }, - durationMinutes: { - type: 'integer', - description: - 'The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.', - minimum: 1, - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - }, - live: { - type: 'token', - description: - 'Advertises an account as currently offering live content.', - }, - }, - }, - AppBskyAgeassuranceBegin: { - lexicon: 1, - id: 'app.bsky.ageassurance.begin', - defs: { - main: { - type: 'procedure', - description: 'Initiate Age Assurance for an account.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['email', 'language', 'countryCode'], - properties: { - email: { - type: 'string', - description: - "The user's email address to receive Age Assurance instructions.", - }, - language: { - type: 'string', - description: - "The user's preferred language for communication during the Age Assurance process.", - }, - countryCode: { - type: 'string', - description: - "An ISO 3166-1 alpha-2 code of the user's location.", - }, - regionCode: { - type: 'string', - description: - "An optional ISO 3166-2 code of the user's region or state within the country.", - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#state', - }, - }, - errors: [ - { - name: 'InvalidEmail', - }, - { - name: 'DidTooLong', - }, - { - name: 'InvalidInitiation', - }, - { - name: 'RegionNotSupported', - }, - ], - }, - }, - }, - AppBskyAgeassuranceDefs: { - lexicon: 1, - id: 'app.bsky.ageassurance.defs', - defs: { - access: { - description: - "The access level granted based on Age Assurance data we've processed.", - type: 'string', - knownValues: ['unknown', 'none', 'safe', 'full'], - }, - status: { - type: 'string', - description: 'The status of the Age Assurance process.', - knownValues: ['unknown', 'pending', 'assured', 'blocked'], - }, - state: { - type: 'object', - description: "The user's computed Age Assurance state.", - required: ['status', 'access'], - properties: { - lastInitiatedAt: { - type: 'string', - format: 'datetime', - description: 'The timestamp when this state was last updated.', - }, - status: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#status', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - stateMetadata: { - type: 'object', - description: - 'Additional metadata needed to compute Age Assurance state client-side.', - required: [], - properties: { - accountCreatedAt: { - type: 'string', - format: 'datetime', - description: 'The account creation timestamp.', - }, - }, - }, - config: { - type: 'object', - description: '', - required: ['regions'], - properties: { - regions: { - type: 'array', - description: 'The per-region Age Assurance configuration.', - items: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#configRegion', - }, - }, - }, - }, - configRegion: { - type: 'object', - description: 'The Age Assurance configuration for a specific region.', - required: ['countryCode', 'minAccessAge', 'rules'], - properties: { - countryCode: { - type: 'string', - description: - 'The ISO 3166-1 alpha-2 country code this configuration applies to.', - }, - regionCode: { - type: 'string', - description: - 'The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.', - }, - minAccessAge: { - type: 'integer', - description: - 'The minimum age (as a whole integer) required to use Bluesky in this region.', - }, - rules: { - type: 'array', - description: - 'The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.', - items: { - type: 'union', - refs: [ - 'lex:app.bsky.ageassurance.defs#configRegionRuleDefault', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan', - 'lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan', - ], - }, - }, - }, - }, - configRegionRuleDefault: { - type: 'object', - description: 'Age Assurance rule that applies by default.', - required: ['access'], - properties: { - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfDeclaredOverAge: { - type: 'object', - description: - 'Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age.', - required: ['age', 'access'], - properties: { - age: { - type: 'integer', - description: 'The age threshold as a whole integer.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfDeclaredUnderAge: { - type: 'object', - description: - 'Age Assurance rule that applies if the user has declared themselves under a certain age.', - required: ['age', 'access'], - properties: { - age: { - type: 'integer', - description: 'The age threshold as a whole integer.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfAssuredOverAge: { - type: 'object', - description: - 'Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age.', - required: ['age', 'access'], - properties: { - age: { - type: 'integer', - description: 'The age threshold as a whole integer.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfAssuredUnderAge: { - type: 'object', - description: - 'Age Assurance rule that applies if the user has been assured to be under a certain age.', - required: ['age', 'access'], - properties: { - age: { - type: 'integer', - description: 'The age threshold as a whole integer.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfAccountNewerThan: { - type: 'object', - description: - 'Age Assurance rule that applies if the account is equal-to or newer than a certain date.', - required: ['date', 'access'], - properties: { - date: { - type: 'string', - format: 'datetime', - description: 'The date threshold as a datetime string.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - configRegionRuleIfAccountOlderThan: { - type: 'object', - description: - 'Age Assurance rule that applies if the account is older than a certain date.', - required: ['date', 'access'], - properties: { - date: { - type: 'string', - format: 'datetime', - description: 'The date threshold as a datetime string.', - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - }, - }, - event: { - type: 'object', - description: 'Object used to store Age Assurance data in stash.', - required: ['createdAt', 'status', 'access', 'attemptId', 'countryCode'], - properties: { - createdAt: { - type: 'string', - format: 'datetime', - description: 'The date and time of this write operation.', - }, - attemptId: { - type: 'string', - description: - 'The unique identifier for this instance of the Age Assurance flow, in UUID format.', - }, - status: { - type: 'string', - description: 'The status of the Age Assurance process.', - knownValues: ['unknown', 'pending', 'assured', 'blocked'], - }, - access: { - description: - "The access level granted based on Age Assurance data we've processed.", - type: 'string', - knownValues: ['unknown', 'none', 'safe', 'full'], - }, - countryCode: { - type: 'string', - description: - 'The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow.', - }, - regionCode: { - type: 'string', - description: - 'The ISO 3166-2 region code provided when beginning the Age Assurance flow.', - }, - email: { - type: 'string', - description: 'The email used for Age Assurance.', - }, - initIp: { - type: 'string', - description: - 'The IP address used when initiating the Age Assurance flow.', - }, - initUa: { - type: 'string', - description: - 'The user agent used when initiating the Age Assurance flow.', - }, - completeIp: { - type: 'string', - description: - 'The IP address used when completing the Age Assurance flow.', - }, - completeUa: { - type: 'string', - description: - 'The user agent used when completing the Age Assurance flow.', - }, - }, - }, - }, - }, - AppBskyAgeassuranceGetConfig: { - lexicon: 1, - id: 'app.bsky.ageassurance.getConfig', - defs: { - main: { - type: 'query', - description: - 'Returns Age Assurance configuration for use on the client.', - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#config', - }, - }, - }, - }, - }, - AppBskyAgeassuranceGetState: { - lexicon: 1, - id: 'app.bsky.ageassurance.getState', - defs: { - main: { - type: 'query', - description: - 'Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.', - parameters: { - type: 'params', - required: ['countryCode'], - properties: { - countryCode: { - type: 'string', - }, - regionCode: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['state', 'metadata'], - properties: { - state: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#state', - }, - metadata: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#stateMetadata', - }, - }, - }, - }, - }, - }, - }, - AppBskyBookmarkCreateBookmark: { - lexicon: 1, - id: 'app.bsky.bookmark.createBookmark', - defs: { - main: { - type: 'procedure', - description: - 'Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['uri', 'cid'], - properties: { - uri: { - type: 'string', - format: 'at-uri', - }, - cid: { - type: 'string', - format: 'cid', - }, - }, - }, - }, - errors: [ - { - name: 'UnsupportedCollection', - description: - 'The URI to be bookmarked is for an unsupported collection.', - }, - ], - }, - }, - }, - AppBskyBookmarkDefs: { - lexicon: 1, - id: 'app.bsky.bookmark.defs', - defs: { - bookmark: { - description: 'Object used to store bookmark data in stash.', - type: 'object', - required: ['subject'], - properties: { - subject: { - description: - 'A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported.', - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', - }, - }, - }, - bookmarkView: { - type: 'object', - required: ['subject', 'item'], - properties: { - subject: { - description: 'A strong ref to the bookmarked record.', - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - item: { - type: 'union', - refs: [ - 'lex:app.bsky.feed.defs#blockedPost', - 'lex:app.bsky.feed.defs#notFoundPost', - 'lex:app.bsky.feed.defs#postView', - ], - }, - }, - }, - }, - }, - AppBskyBookmarkDeleteBookmark: { - lexicon: 1, - id: 'app.bsky.bookmark.deleteBookmark', - defs: { - main: { - type: 'procedure', - description: - 'Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['uri'], - properties: { - uri: { - type: 'string', - format: 'at-uri', - }, - }, - }, - }, - errors: [ - { - name: 'UnsupportedCollection', - description: - 'The URI to be bookmarked is for an unsupported collection.', - }, - ], - }, - }, - }, - AppBskyBookmarkGetBookmarks: { - lexicon: 1, - id: 'app.bsky.bookmark.getBookmarks', - defs: { - main: { - type: 'query', - description: - 'Gets views of records bookmarked by the authenticated user. Requires authentication.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['bookmarks'], - properties: { - cursor: { - type: 'string', - }, - bookmarks: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.bookmark.defs#bookmarkView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyContactDefs: { - lexicon: 1, - id: 'app.bsky.contact.defs', - defs: { - matchAndContactIndex: { - description: - 'Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.', - type: 'object', - required: ['match', 'contactIndex'], - properties: { - match: { - description: 'Profile of the matched user.', - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - contactIndex: { - description: 'The index of this match in the import contact input.', - type: 'integer', - minimum: 0, - maximum: 999, - }, - }, - }, - syncStatus: { - type: 'object', - required: ['syncedAt', 'matchesCount'], - properties: { - syncedAt: { - description: 'Last date when contacts where imported.', - type: 'string', - format: 'datetime', - }, - matchesCount: { - description: - 'Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.', - type: 'integer', - minimum: 0, - }, - }, - }, - notification: { - description: - 'A stash object to be sent via bsync representing a notification to be created.', - type: 'object', - required: ['from', 'to'], - properties: { - from: { - description: 'The DID of who this notification comes from.', - type: 'string', - format: 'did', - }, - to: { - description: 'The DID of who this notification should go to.', - type: 'string', - format: 'did', - }, - }, - }, - }, - }, - AppBskyContactDismissMatch: { - lexicon: 1, - id: 'app.bsky.contact.dismissMatch', - defs: { - main: { - type: 'procedure', - description: - "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.", - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['subject'], - properties: { - subject: { - description: "The subject's DID to dismiss the match with.", - type: 'string', - format: 'did', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - errors: [ - { - name: 'InvalidDid', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactGetMatches: { - lexicon: 1, - id: 'app.bsky.contact.getMatches', - defs: { - main: { - type: 'query', - description: - 'Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['matches'], - properties: { - cursor: { - type: 'string', - }, - matches: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - }, - }, - }, - errors: [ - { - name: 'InvalidDid', - }, - { - name: 'InvalidLimit', - }, - { - name: 'InvalidCursor', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactGetSyncStatus: { - lexicon: 1, - id: 'app.bsky.contact.getSyncStatus', - defs: { - main: { - type: 'query', - description: - "Gets the user's current contact import status. Requires authentication.", - parameters: { - type: 'params', - properties: {}, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: { - syncStatus: { - description: - "If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.", - type: 'ref', - ref: 'lex:app.bsky.contact.defs#syncStatus', - }, - }, - }, - }, - errors: [ - { - name: 'InvalidDid', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactImportContacts: { - lexicon: 1, - id: 'app.bsky.contact.importContacts', - defs: { - main: { - type: 'procedure', - description: - 'Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['token', 'contacts'], - properties: { - token: { - description: - 'JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.', - type: 'string', - }, - contacts: { - description: - "List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`.", - type: 'array', - items: { - type: 'string', - }, - minLength: 1, - maxLength: 1000, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['matchesAndContactIndexes'], - properties: { - matchesAndContactIndexes: { - description: - 'The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.', - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.contact.defs#matchAndContactIndex', - }, - }, - }, - }, - }, - errors: [ - { - name: 'InvalidDid', - }, - { - name: 'InvalidContacts', - }, - { - name: 'TooManyContacts', - }, - { - name: 'InvalidToken', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactRemoveData: { - lexicon: 1, - id: 'app.bsky.contact.removeData', - defs: { - main: { - type: 'procedure', - description: - 'Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - errors: [ - { - name: 'InvalidDid', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactSendNotification: { - lexicon: 1, - id: 'app.bsky.contact.sendNotification', - defs: { - main: { - type: 'procedure', - description: - 'System endpoint to send notifications related to contact imports. Requires role authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['from', 'to'], - properties: { - from: { - description: 'The DID of who this notification comes from.', - type: 'string', - format: 'did', - }, - to: { - description: 'The DID of who this notification should go to.', - type: 'string', - format: 'did', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - }, - }, - }, - AppBskyContactStartPhoneVerification: { - lexicon: 1, - id: 'app.bsky.contact.startPhoneVerification', - defs: { - main: { - type: 'procedure', - description: - 'Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['phone'], - properties: { - phone: { - description: 'The phone number to receive the code via SMS.', - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - errors: [ - { - name: 'RateLimitExceeded', - }, - { - name: 'InvalidDid', - }, - { - name: 'InvalidPhone', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyContactVerifyPhone: { - lexicon: 1, - id: 'app.bsky.contact.verifyPhone', - defs: { - main: { - type: 'procedure', - description: - 'Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['phone', 'code'], - properties: { - phone: { - description: - 'The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.', - type: 'string', - }, - code: { - description: - 'The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.', - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['token'], - properties: { - token: { - description: - 'JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.', - type: 'string', - }, - }, - }, - }, - errors: [ - { - name: 'RateLimitExceeded', - }, - { - name: 'InvalidDid', - }, - { - name: 'InvalidPhone', - }, - { - name: 'InvalidCode', - }, - { - name: 'InternalError', - }, - ], - }, - }, - }, - AppBskyDraftCreateDraft: { - lexicon: 1, - id: 'app.bsky.draft.createDraft', - defs: { - main: { - type: 'procedure', - description: - 'Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['draft'], - properties: { - draft: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draft', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['id'], - properties: { - id: { - type: 'string', - description: 'The ID of the created draft.', - }, - }, - }, - }, - errors: [ - { - name: 'DraftLimitReached', - description: - 'Trying to insert a new draft when the limit was already reached.', - }, - ], - }, - }, - }, - AppBskyDraftDefs: { - lexicon: 1, - id: 'app.bsky.draft.defs', - defs: { - draftWithId: { - description: - 'A draft with an identifier, used to store drafts in private storage (stash).', - type: 'object', - required: ['id', 'draft'], - properties: { - id: { - description: 'A TID to be used as a draft identifier.', - type: 'string', - format: 'tid', - }, - draft: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draft', - }, - }, - }, - draft: { - description: 'A draft containing an array of draft posts.', - type: 'object', - required: ['posts'], - properties: { - deviceId: { - type: 'string', - description: - 'UUIDv4 identifier of the device that created this draft.', - maxLength: 100, - }, - deviceName: { - type: 'string', - description: - 'The device and/or platform on which the draft was created.', - maxLength: 100, - }, - posts: { - description: 'Array of draft posts that compose this draft.', - type: 'array', - minLength: 1, - maxLength: 100, - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftPost', - }, - }, - langs: { - type: 'array', - description: - 'Indicates human language of posts primary text content.', - maxLength: 3, - items: { - type: 'string', - format: 'language', - }, - }, - postgateEmbeddingRules: { - description: - 'Embedding rules for the postgates to be created when this draft is published.', - type: 'array', - maxLength: 5, - items: { - type: 'union', - refs: ['lex:app.bsky.feed.postgate#disableRule'], - }, - }, - threadgateAllow: { - description: - 'Allow-rules for the threadgate to be created when this draft is published.', - 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', - ], - }, - }, - }, - }, - draftPost: { - description: 'One of the posts that compose a draft.', - type: 'object', - required: ['text'], - properties: { - text: { - type: 'string', - maxLength: 10000, - maxGraphemes: 1000, - description: - 'The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.', - }, - labels: { - type: 'union', - description: - 'Self-label values for this post. Effectively content warnings.', - refs: ['lex:com.atproto.label.defs#selfLabels'], - }, - embedImages: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedImage', - }, - maxLength: 4, - }, - embedVideos: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedVideo', - }, - maxLength: 1, - }, - embedExternals: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedExternal', - }, - maxLength: 1, - }, - embedRecords: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedRecord', - }, - maxLength: 1, - }, - }, - }, - draftView: { - description: 'View to present drafts data to users.', - type: 'object', - required: ['id', 'draft', 'createdAt', 'updatedAt'], - properties: { - id: { - description: 'A TID to be used as a draft identifier.', - type: 'string', - format: 'tid', - }, - draft: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draft', - }, - createdAt: { - description: 'The time the draft was created.', - type: 'string', - format: 'datetime', - }, - updatedAt: { - description: 'The time the draft was last updated.', - type: 'string', - format: 'datetime', - }, - }, - }, - draftEmbedLocalRef: { - type: 'object', - required: ['path'], - properties: { - path: { - type: 'string', - description: - 'Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.', - minLength: 1, - maxLength: 1024, - }, - }, - }, - draftEmbedCaption: { - type: 'object', - required: ['lang', 'content'], - properties: { - lang: { - type: 'string', - format: 'language', - }, - content: { - type: 'string', - maxLength: 10000, - }, - }, - }, - draftEmbedImage: { - type: 'object', - required: ['localRef'], - properties: { - localRef: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedLocalRef', - }, - alt: { - type: 'string', - maxGraphemes: 2000, - }, - }, - }, - draftEmbedVideo: { - type: 'object', - required: ['localRef'], - properties: { - localRef: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedLocalRef', - }, - alt: { - type: 'string', - maxGraphemes: 2000, - }, - captions: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftEmbedCaption', - }, - maxLength: 20, - }, - }, - }, - draftEmbedExternal: { - type: 'object', - required: ['uri'], - properties: { - uri: { - type: 'string', - format: 'uri', - }, - }, - }, - draftEmbedRecord: { - type: 'object', - required: ['record'], - properties: { - record: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', - }, - }, - }, - }, - }, - AppBskyDraftDeleteDraft: { - lexicon: 1, - id: 'app.bsky.draft.deleteDraft', - defs: { - main: { - type: 'procedure', - description: 'Deletes a draft by ID. Requires authentication.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['id'], - properties: { - id: { - type: 'string', - format: 'tid', - }, - }, - }, - }, - }, - }, - }, - AppBskyDraftGetDrafts: { - lexicon: 1, - id: 'app.bsky.draft.getDrafts', - defs: { - main: { - type: 'query', - description: 'Gets views of user drafts. Requires authentication.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['drafts'], - properties: { - cursor: { - type: 'string', - }, - drafts: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyDraftUpdateDraft: { - lexicon: 1, - id: 'app.bsky.draft.updateDraft', - defs: { - main: { - type: 'procedure', - description: - "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.", - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['draft'], - properties: { - draft: { - type: 'ref', - ref: 'lex:app.bsky.draft.defs#draftWithId', - }, - }, - }, - }, - }, - }, - }, - 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, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - description: - 'The raw image file. May be up to 2 MB, formerly limited to 1 MB.', - accept: ['image/*'], - maxSize: 2000000, - }, - 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', - }, - }, - }, - }, - }, - 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, - }, - }, - }, - }, - }, - 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', - description: - 'The mp4 video file. May be up to 100mb, formerly limited to 50mb.', - accept: ['video/mp4'], - maxSize: 100000000, - }, - 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', - }, - presentation: { - type: 'string', - description: 'A hint to the client about how to present the video.', - knownValues: ['default', 'gif'], - }, - }, - }, - 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', - }, - presentation: { - type: 'string', - description: 'A hint to the client about how to present the video.', - knownValues: ['default', 'gif'], - }, - }, - }, - }, - }, - 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', - ], - }, - bookmarkCount: { - type: 'integer', - }, - 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', - }, - debug: { - type: 'unknown', - description: 'Debug information for internal development', - }, - }, - }, - 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', - }, - bookmarked: { - type: 'boolean', - }, - 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, - }, - reqId: { - type: 'string', - description: - 'Unique identifier per request that may be passed back alongside interactions.', - maxLength: 100, - }, - }, - }, - 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', - }, - uri: { - type: 'string', - format: 'at-uri', - }, - cid: { - type: 'string', - format: 'cid', - }, - 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, - }, - reqId: { - type: 'string', - description: - 'Unique identifier per request that may be passed back alongside interactions.', - maxLength: 100, - }, - }, - }, - 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', - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - reqId: { - type: 'string', - description: - 'Unique identifier per request that may be passed back alongside interactions.', - maxLength: 100, - }, - }, - }, - }, - errors: [ - { - name: 'UnknownFeed', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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, - }, - }, - }, - }, - }, - 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: {}, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - AppBskyFeedSearchPosts: { - lexicon: 1, - id: 'app.bsky.feed.searchPosts', - defs: { - main: { - type: 'query', - description: - 'Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.', - 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', - }, - ], - }, - }, - }, - 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: { - feed: { - type: 'string', - format: 'at-uri', - }, - interactions: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.feed.defs#interaction', - }, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - 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: 300, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - blocking: { - type: 'string', - format: 'at-uri', - description: - 'if the actor blocks this DID, this is the AT-URI of the block record', - }, - blockedBy: { - type: 'string', - format: 'at-uri', - description: - 'if the actor is blocked by this DID, contains the AT-URI of the block record', - }, - blockingByList: { - type: 'string', - format: 'at-uri', - description: - 'if the actor blocks this DID via a block list, this is the AT-URI of the listblock record', - }, - blockedByList: { - type: 'string', - format: 'at-uri', - description: - 'if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record', - }, - }, - }, - }, - }, - 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', - }, - via: { - type: 'ref', - ref: 'lex:com.atproto.repo.strongRef', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - purposes: { - type: 'array', - description: - 'Optional filter by list purpose. If not specified, all supported types are returned.', - items: { - type: 'string', - knownValues: ['modlist', 'curatelist'], - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyGraphGetListsWithMembership: { - lexicon: 1, - id: 'app.bsky.graph.getListsWithMembership', - defs: { - main: { - type: 'query', - description: - 'Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.', - parameters: { - type: 'params', - required: ['actor'], - properties: { - actor: { - type: 'string', - format: 'at-identifier', - description: 'The account (actor) to check for membership.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - purposes: { - type: 'array', - description: - 'Optional filter by list purpose. If not specified, all supported types are returned.', - items: { - type: 'string', - knownValues: ['modlist', 'curatelist'], - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['listsWithMembership'], - properties: { - cursor: { - type: 'string', - }, - listsWithMembership: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.graph.getListsWithMembership#listWithMembership', - }, - }, - }, - }, - }, - }, - listWithMembership: { - description: - 'A list and an optional list item indicating membership of a target user to that list.', - type: 'object', - required: ['list'], - properties: { - list: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#listView', - }, - listItem: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#listItemView', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyGraphGetStarterPacksWithMembership: { - lexicon: 1, - id: 'app.bsky.graph.getStarterPacksWithMembership', - defs: { - main: { - type: 'query', - description: - 'Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth.', - parameters: { - type: 'params', - required: ['actor'], - properties: { - actor: { - type: 'string', - format: 'at-identifier', - description: 'The account (actor) to check for membership.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['starterPacksWithMembership'], - properties: { - cursor: { - type: 'string', - }, - starterPacksWithMembership: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership', - }, - }, - }, - }, - }, - }, - starterPackWithMembership: { - description: - 'A starter pack and an optional list item indicating membership of a target user to that starter pack.', - type: 'object', - required: ['starterPack'], - properties: { - starterPack: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#starterPackView', - }, - listItem: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#listItemView', - }, - }, - }, - }, - }, - 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', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - isFallback: { - type: 'boolean', - description: - 'DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid', - default: false, - }, - recId: { - type: 'integer', - description: 'DEPRECATED: use recIdStr instead.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - AppBskyGraphVerification: { - lexicon: 1, - id: 'app.bsky.graph.verification', - defs: { - main: { - type: 'record', - description: - 'Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.', - key: 'tid', - record: { - type: 'object', - required: ['subject', 'handle', 'displayName', 'createdAt'], - properties: { - subject: { - description: 'DID of the subject the verification applies to.', - type: 'string', - format: 'did', - }, - handle: { - description: - 'Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.', - type: 'string', - format: 'handle', - }, - displayName: { - description: - 'Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.', - type: 'string', - }, - createdAt: { - description: 'Date of when the verification was created.', - 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', - }, - }, - }, - }, - }, - }, - 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', - ], - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - AppBskyNotificationDeclaration: { - lexicon: 1, - id: 'app.bsky.notification.declaration', - defs: { - main: { - type: 'record', - description: - "A declaration of the user's choices related to notifications that can be produced by them.", - key: 'literal:self', - record: { - type: 'object', - required: ['allowSubscriptions'], - properties: { - allowSubscriptions: { - type: 'string', - description: - "A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.", - knownValues: ['followers', 'mutuals', 'none'], - }, - }, - }, - }, - }, - }, - AppBskyNotificationDefs: { - lexicon: 1, - id: 'app.bsky.notification.defs', - defs: { - recordDeleted: { - type: 'object', - properties: {}, - }, - chatPreference: { - type: 'object', - required: ['include', 'push'], - properties: { - include: { - type: 'string', - knownValues: ['all', 'accepted'], - }, - push: { - type: 'boolean', - }, - }, - }, - filterablePreference: { - type: 'object', - required: ['include', 'list', 'push'], - properties: { - include: { - type: 'string', - knownValues: ['all', 'follows'], - }, - list: { - type: 'boolean', - }, - push: { - type: 'boolean', - }, - }, - }, - preference: { - type: 'object', - required: ['list', 'push'], - properties: { - list: { - type: 'boolean', - }, - push: { - type: 'boolean', - }, - }, - }, - preferences: { - type: 'object', - required: [ - 'chat', - 'follow', - 'like', - 'likeViaRepost', - 'mention', - 'quote', - 'reply', - 'repost', - 'repostViaRepost', - 'starterpackJoined', - 'subscribedPost', - 'unverified', - 'verified', - ], - properties: { - chat: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#chatPreference', - }, - follow: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - like: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - likeViaRepost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - mention: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - quote: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - reply: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - repost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - repostViaRepost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - starterpackJoined: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - subscribedPost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - unverified: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - verified: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - }, - }, - activitySubscription: { - type: 'object', - required: ['post', 'reply'], - properties: { - post: { - type: 'boolean', - }, - reply: { - type: 'boolean', - }, - }, - }, - subjectActivitySubscription: { - description: - 'Object used to store activity subscription data in stash.', - type: 'object', - required: ['subject', 'activitySubscription'], - properties: { - subject: { - type: 'string', - format: 'did', - }, - activitySubscription: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#activitySubscription', - }, - }, - }, - }, - }, - AppBskyNotificationGetPreferences: { - lexicon: 1, - id: 'app.bsky.notification.getPreferences', - defs: { - main: { - type: 'query', - description: - 'Get notification-related preferences for an account. Requires auth.', - parameters: { - type: 'params', - properties: {}, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['preferences'], - properties: { - preferences: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preferences', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - AppBskyNotificationListActivitySubscriptions: { - lexicon: 1, - id: 'app.bsky.notification.listActivitySubscriptions', - defs: { - main: { - type: 'query', - description: - 'Enumerate all accounts to which the requesting account is subscribed to receive notifications for. 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: ['subscriptions'], - properties: { - cursor: { - type: 'string', - }, - subscriptions: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - }, - }, - }, - }, - }, - }, - 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: - 'The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.', - knownValues: [ - 'like', - 'repost', - 'follow', - 'mention', - 'reply', - 'quote', - 'starterpack-joined', - 'verified', - 'unverified', - 'like-via-repost', - 'repost-via-repost', - 'subscribed-post', - 'contact-match', - ], - }, - 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', - }, - }, - }, - }, - }, - }, - AppBskyNotificationPutActivitySubscription: { - lexicon: 1, - id: 'app.bsky.notification.putActivitySubscription', - defs: { - main: { - type: 'procedure', - description: - 'Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['subject', 'activitySubscription'], - properties: { - subject: { - type: 'string', - format: 'did', - }, - activitySubscription: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#activitySubscription', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['subject'], - properties: { - subject: { - type: 'string', - format: 'did', - }, - activitySubscription: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#activitySubscription', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - AppBskyNotificationPutPreferencesV2: { - lexicon: 1, - id: 'app.bsky.notification.putPreferencesV2', - defs: { - main: { - type: 'procedure', - description: - 'Set notification-related preferences for an account. Requires auth.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - properties: { - chat: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#chatPreference', - }, - follow: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - like: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - likeViaRepost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - mention: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - quote: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - reply: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - repost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - repostViaRepost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#filterablePreference', - }, - starterpackJoined: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - subscribedPost: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - unverified: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - verified: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preference', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['preferences'], - properties: { - preferences: { - type: 'ref', - ref: 'lex:app.bsky.notification.defs#preferences', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ageRestricted: { - type: 'boolean', - description: 'Set to true when the actor is age restricted', - }, - }, - }, - }, - }, - }, - }, - AppBskyNotificationUnregisterPush: { - lexicon: 1, - id: 'app.bsky.notification.unregisterPush', - defs: { - main: { - type: 'procedure', - description: - 'The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - skeletonTrend: { - type: 'object', - required: [ - 'topic', - 'displayName', - 'link', - 'startedAt', - 'postCount', - 'dids', - ], - properties: { - topic: { - type: 'string', - }, - displayName: { - type: 'string', - }, - link: { - type: 'string', - }, - startedAt: { - type: 'string', - format: 'datetime', - }, - postCount: { - type: 'integer', - }, - status: { - type: 'string', - knownValues: ['hot'], - }, - category: { - type: 'string', - }, - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - }, - }, - trendView: { - type: 'object', - required: [ - 'topic', - 'displayName', - 'link', - 'startedAt', - 'postCount', - 'actors', - ], - properties: { - topic: { - type: 'string', - }, - displayName: { - type: 'string', - }, - link: { - type: 'string', - }, - startedAt: { - type: 'string', - format: 'datetime', - }, - postCount: { - type: 'integer', - }, - status: { - type: 'string', - knownValues: ['hot'], - }, - category: { - type: 'string', - }, - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileViewBasic', - }, - }, - }, - }, - threadItemPost: { - type: 'object', - required: [ - 'post', - 'moreParents', - 'moreReplies', - 'opThread', - 'hiddenByThreadgate', - 'mutedByViewer', - ], - properties: { - post: { - type: 'ref', - ref: 'lex:app.bsky.feed.defs#postView', - }, - moreParents: { - type: 'boolean', - description: - 'This post has more parents that were not present in the response. This is just a boolean, without the number of parents.', - }, - moreReplies: { - type: 'integer', - description: - 'This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate.', - }, - opThread: { - type: 'boolean', - description: - 'This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.', - }, - hiddenByThreadgate: { - type: 'boolean', - description: - 'The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread.', - }, - mutedByViewer: { - type: 'boolean', - description: - 'This is by an account muted by the viewer requesting it.', - }, - }, - }, - threadItemNoUnauthenticated: { - type: 'object', - properties: {}, - }, - threadItemNotFound: { - type: 'object', - properties: {}, - }, - threadItemBlocked: { - type: 'object', - required: ['author'], - properties: { - author: { - type: 'ref', - ref: 'lex:app.bsky.feed.defs#blockedAuthor', - }, - }, - }, - ageAssuranceState: { - type: 'object', - description: - 'The computed state of the age assurance process, returned to the user in question on certain authenticated requests.', - required: ['status'], - properties: { - lastInitiatedAt: { - type: 'string', - format: 'datetime', - description: 'The timestamp when this state was last updated.', - }, - status: { - type: 'string', - description: 'The status of the age assurance process.', - knownValues: ['unknown', 'pending', 'assured', 'blocked'], - }, - }, - }, - ageAssuranceEvent: { - type: 'object', - description: 'Object used to store age assurance data in stash.', - required: ['createdAt', 'status', 'attemptId'], - properties: { - createdAt: { - type: 'string', - format: 'datetime', - description: 'The date and time of this write operation.', - }, - status: { - type: 'string', - description: 'The status of the age assurance process.', - knownValues: ['unknown', 'pending', 'assured'], - }, - attemptId: { - type: 'string', - description: - 'The unique identifier for this instance of the age assurance flow, in UUID format.', - }, - email: { - type: 'string', - description: 'The email used for AA.', - }, - initIp: { - type: 'string', - description: 'The IP address used when initiating the AA flow.', - }, - initUa: { - type: 'string', - description: 'The user agent used when initiating the AA flow.', - }, - completeIp: { - type: 'string', - description: 'The IP address used when completing the AA flow.', - }, - completeUa: { - type: 'string', - description: 'The user agent used when completing the AA flow.', - }, - }, - }, - }, - }, - AppBskyUnspeccedGetAgeAssuranceState: { - lexicon: 1, - id: 'app.bsky.unspecced.getAgeAssuranceState', - defs: { - main: { - type: 'query', - description: - 'Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.', - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState', - }, - }, - }, - }, - }, - 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', - }, - liveNow: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.getConfig#liveNowConfig', - }, - }, - }, - }, - }, - }, - liveNowConfig: { - type: 'object', - required: ['did', 'domains'], - properties: { - did: { - type: 'string', - format: 'did', - }, - domains: { - type: 'array', - items: { - type: 'string', - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks: { - lexicon: 1, - id: 'app.bsky.unspecced.getOnboardingSuggestedStarterPacks', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested starterpacks for onboarding', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['starterPacks'], - properties: { - starterPacks: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#starterPackView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks', - parameters: { - type: 'params', - properties: { - 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: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['starterPacks'], - properties: { - starterPacks: { - type: 'array', - items: { - type: 'string', - format: 'at-uri', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers', - parameters: { - type: 'params', - properties: { - viewer: { - type: 'string', - format: 'did', - description: - 'DID of the account making the request (not included for public/unauthenticated queries).', - }, - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['dids'], - properties: { - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - recId: { - type: 'string', - description: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetPostThreadOtherV2: { - lexicon: 1, - id: 'app.bsky.unspecced.getPostThreadOtherV2', - defs: { - main: { - type: 'query', - description: - "(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. 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 post record. This is the anchor post.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['thread'], - properties: { - thread: { - type: 'array', - description: - 'A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.', - items: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem', - }, - }, - }, - }, - }, - }, - 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. Items above have negative depths, items below have positive depths.', - }, - value: { - type: 'union', - refs: ['lex:app.bsky.unspecced.defs#threadItemPost'], - }, - }, - }, - }, - }, - AppBskyUnspeccedGetPostThreadV2: { - lexicon: 1, - id: 'app.bsky.unspecced.getPostThreadV2', - defs: { - main: { - type: 'query', - description: - "(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). 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 post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post.', - }, - above: { - type: 'boolean', - description: 'Whether to include parents above the anchor.', - default: true, - }, - below: { - type: 'integer', - description: - 'How many levels of replies to include below the anchor.', - default: 6, - minimum: 0, - maximum: 20, - }, - branchingFactor: { - type: 'integer', - description: - 'Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).', - default: 10, - minimum: 0, - maximum: 100, - }, - sort: { - type: 'string', - description: 'Sorting for the thread replies.', - knownValues: ['newest', 'oldest', 'top'], - default: 'oldest', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['thread', 'hasOtherReplies'], - properties: { - 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:app.bsky.unspecced.getPostThreadV2#threadItem', - }, - }, - threadgate: { - type: 'ref', - ref: 'lex:app.bsky.feed.defs#threadgateView', - }, - hasOtherReplies: { - type: 'boolean', - description: - 'Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them.', - }, - }, - }, - }, - }, - 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. Items above have negative depths, items below have positive depths.', - }, - value: { - type: 'union', - refs: [ - 'lex:app.bsky.unspecced.defs#threadItemPost', - 'lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated', - 'lex:app.bsky.unspecced.defs#threadItemNotFound', - 'lex:app.bsky.unspecced.defs#threadItemBlocked', - ], - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedFeeds: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedFeeds', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested feeds', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['feeds'], - properties: { - feeds: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.feed.defs#generatorView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedFeedsSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds', - parameters: { - type: 'params', - properties: { - 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: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['feeds'], - properties: { - feeds: { - type: 'array', - items: { - type: 'string', - format: 'at-uri', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedOnboardingUsers: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedOnboardingUsers', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested users for onboarding', - parameters: { - type: 'params', - properties: { - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actors'], - properties: { - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - recId: { - type: 'string', - description: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedStarterPacks: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedStarterPacks', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested starterpacks', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['starterPacks'], - properties: { - starterPacks: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.graph.defs#starterPackView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks', - parameters: { - type: 'params', - properties: { - 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: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['starterPacks'], - properties: { - starterPacks: { - type: 'array', - items: { - type: 'string', - format: 'at-uri', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsers: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsers', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested users', - parameters: { - type: 'params', - properties: { - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actors'], - properties: { - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - recId: { - type: 'string', - description: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForDiscover: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForDiscover', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested users for the Discover page', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actors'], - properties: { - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover', - parameters: { - type: 'params', - properties: { - 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: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['dids'], - properties: { - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForExplore: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForExplore', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested users for the Explore page', - parameters: { - type: 'params', - properties: { - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actors'], - properties: { - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForExploreSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore', - parameters: { - type: 'params', - properties: { - viewer: { - type: 'string', - format: 'did', - description: - 'DID of the account making the request (not included for public/unauthenticated queries).', - }, - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['dids'], - properties: { - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForSeeMore: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForSeeMore', - defs: { - main: { - type: 'query', - description: 'Get a list of suggested users for the See More page', - parameters: { - type: 'params', - properties: { - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actors'], - properties: { - actors: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore', - parameters: { - type: 'params', - properties: { - viewer: { - type: 'string', - format: 'did', - description: - 'DID of the account making the request (not included for public/unauthenticated queries).', - }, - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['dids'], - properties: { - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetSuggestedUsersSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getSuggestedUsersSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers', - parameters: { - type: 'params', - properties: { - viewer: { - type: 'string', - format: 'did', - description: - 'DID of the account making the request (not included for public/unauthenticated queries).', - }, - category: { - type: 'string', - description: 'Category of users to get suggestions for.', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 50, - default: 25, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['dids'], - properties: { - dids: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - recId: { - type: 'string', - description: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - 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: 'DEPRECATED: use recIdStr instead.', - }, - recIdStr: { - type: 'string', - description: - 'Snowflake for this recommendation, use when submitting recommendation events.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetTrends: { - lexicon: 1, - id: 'app.bsky.unspecced.getTrends', - defs: { - main: { - type: 'query', - description: 'Get the current trends on the network', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['trends'], - properties: { - trends: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.defs#trendView', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedGetTrendsSkeleton: { - lexicon: 1, - id: 'app.bsky.unspecced.getTrendsSkeleton', - defs: { - main: { - type: 'query', - description: - 'Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends', - parameters: { - type: 'params', - properties: { - 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: 25, - default: 10, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['trends'], - properties: { - trends: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.defs#skeletonTrend', - }, - }, - }, - }, - }, - }, - }, - }, - AppBskyUnspeccedInitAgeAssurance: { - lexicon: 1, - id: 'app.bsky.unspecced.initAgeAssurance', - defs: { - main: { - type: 'procedure', - description: - "Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.", - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['email', 'language', 'countryCode'], - properties: { - email: { - type: 'string', - description: - "The user's email address to receive assurance instructions.", - }, - language: { - type: 'string', - description: - "The user's preferred language for communication during the assurance process.", - }, - countryCode: { - type: 'string', - description: - "An ISO 3166-1 alpha-2 code of the user's location.", - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:app.bsky.unspecced.defs#ageAssuranceState', - }, - }, - errors: [ - { - name: 'InvalidEmail', - }, - { - name: 'DidTooLong', - }, - { - name: 'InvalidInitiation', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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'], - }, - allowGroupInvites: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Declaration about group chat invitation preferences for the record owner.', - type: 'string', - knownValues: ['all', 'none', 'following'], - }, - }, - }, - }, - }, - }, - ChatBskyActorDefs: { - lexicon: 1, - id: 'chat.bsky.actor.defs', - defs: { - memberRole: { - type: 'string', - knownValues: ['owner', 'standard'], - }, - 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', - }, - chatDisabled: { - type: 'boolean', - description: - 'Set to true when the actor cannot actively participate in conversations', - }, - verification: { - type: 'ref', - ref: 'lex:app.bsky.actor.defs#verificationState', - }, - kind: { - description: - 'Union field that has data specific to different kinds of convos.', - type: 'union', - refs: [ - 'lex:chat.bsky.actor.defs#directConvoMember', - 'lex:chat.bsky.actor.defs#groupConvoMember', - ], - }, - }, - }, - directConvoMember: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - type: 'object', - properties: {}, - }, - groupConvoMember: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - type: 'object', - required: ['role'], - properties: { - addedBy: { - description: - 'Who added this member. Only present if the member was added (instead of joining via link).', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - role: { - description: - "The member's role within this conversation. Only present in group conversation member lists.", - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#memberRole', - }, - }, - }, - }, - }, - ChatBskyActorDeleteAccount: { - lexicon: 1, - id: 'chat.bsky.actor.deleteAccount', - defs: { - main: { - type: 'procedure', - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: {}, - }, - }, - }, - }, - }, - ChatBskyActorExportAccountData: { - lexicon: 1, - id: 'chat.bsky.actor.exportAccountData', - defs: { - main: { - type: 'query', - output: { - encoding: 'application/jsonl', - }, - }, - }, - }, - ChatBskyConvoAcceptConvo: { - lexicon: 1, - id: 'chat.bsky.convo.acceptConvo', - defs: { - main: { - type: 'procedure', - description: - 'Marks a conversation as accepted, so it is shown in the list of accepted convos instead on the request convos.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoAddReaction: { - lexicon: 1, - id: 'chat.bsky.convo.addReaction', - defs: { - main: { - type: 'procedure', - description: - 'Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'messageId', 'value'], - properties: { - convoId: { - type: 'string', - }, - messageId: { - type: 'string', - }, - value: { - type: 'string', - minLength: 1, - maxLength: 64, - minGraphemes: 1, - maxGraphemes: 1, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['message'], - properties: { - message: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#messageView', - }, - }, - }, - }, - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'ReactionNotAllowed', - description: - 'Indicates that reactions are not allowed on this message, e.g. because it is a system message.', - }, - { - name: 'ReactionMessageDeleted', - description: - 'Indicates that the message has been deleted and reactions can no longer be added/removed.', - }, - { - name: 'ReactionLimitReached', - description: - "Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent.", - }, - { - name: 'ReactionInvalidValue', - description: - 'Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.', - }, - ], - }, - }, - }, - ChatBskyConvoDefs: { - lexicon: 1, - id: 'chat.bsky.convo.defs', - defs: { - convoKind: { - type: 'string', - knownValues: ['direct', 'group'], - }, - convoLockStatus: { - type: 'string', - knownValues: ['unlocked', 'locked', 'locked-permanently'], - }, - convoStatus: { - type: 'string', - knownValues: ['request', 'accepted'], - }, - 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'], - }, - reactions: { - type: 'array', - description: - 'Reactions to this message, in ascending order of creation time.', - items: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#reactionView', - }, - }, - sender: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#messageViewSender', - }, - sentAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - systemMessageView: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - type: 'object', - required: ['id', 'rev', 'sentAt', 'data'], - properties: { - id: { - type: 'string', - }, - rev: { - type: 'string', - }, - sentAt: { - type: 'string', - format: 'datetime', - }, - data: { - type: 'union', - refs: [ - 'lex:chat.bsky.convo.defs#systemMessageDataAddMember', - 'lex:chat.bsky.convo.defs#systemMessageDataRemoveMember', - 'lex:chat.bsky.convo.defs#systemMessageDataMemberJoin', - 'lex:chat.bsky.convo.defs#systemMessageDataMemberLeave', - 'lex:chat.bsky.convo.defs#systemMessageDataLockConvo', - 'lex:chat.bsky.convo.defs#systemMessageDataUnlockConvo', - 'lex:chat.bsky.convo.defs#systemMessageDataLockConvoPermanently', - 'lex:chat.bsky.convo.defs#systemMessageDataEditGroup', - 'lex:chat.bsky.convo.defs#systemMessageDataCreateJoinLink', - 'lex:chat.bsky.convo.defs#systemMessageDataEditJoinLink', - 'lex:chat.bsky.convo.defs#systemMessageDataEnableJoinLink', - 'lex:chat.bsky.convo.defs#systemMessageDataDisableJoinLink', - ], - }, - }, - }, - systemMessageDataAddMember: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo.', - type: 'object', - required: ['member', 'role', 'addedBy'], - properties: { - member: { - description: 'Current view of the member who was added.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - role: { - description: - "Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.", - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#memberRole', - }, - addedBy: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataRemoveMember: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo.', - type: 'object', - required: ['member', 'removedBy'], - properties: { - member: { - description: 'Current view of the member who was removed.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - removedBy: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataMemberJoin: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link.', - type: 'object', - required: ['member', 'role'], - properties: { - member: { - description: 'Current view of the member who joined.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - role: { - description: - "Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.", - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#memberRole', - }, - approvedBy: { - description: - 'If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataMemberLeave: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo.', - type: 'object', - required: ['member'], - properties: { - member: { - description: 'Current view of the member who left the group.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataLockConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked.', - type: 'object', - required: ['lockedBy'], - properties: { - lockedBy: { - description: 'Current view of the member who locked the group.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataUnlockConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked.', - type: 'object', - required: ['unlockedBy'], - properties: { - unlockedBy: { - description: 'Current view of the member who unlocked the group.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataLockConvoPermanently: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently.', - type: 'object', - required: ['lockedBy'], - properties: { - lockedBy: { - description: 'Current view of the member who locked the group.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - systemMessageDataEditGroup: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited.', - type: 'object', - properties: { - oldName: { - description: 'Group name that was replaced.', - type: 'string', - }, - newName: { - description: 'Group name that replaced the old.', - type: 'string', - }, - }, - }, - systemMessageDataCreateJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created.', - type: 'object', - properties: {}, - }, - systemMessageDataEditJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited.', - type: 'object', - properties: {}, - }, - systemMessageDataEnableJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled.', - type: 'object', - properties: {}, - }, - systemMessageDataDisableJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled.', - type: 'object', - properties: {}, - }, - 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', - }, - }, - }, - reactionView: { - type: 'object', - required: ['value', 'sender', 'createdAt'], - properties: { - value: { - type: 'string', - }, - sender: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#reactionViewSender', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - reactionViewSender: { - type: 'object', - required: ['did'], - properties: { - did: { - type: 'string', - format: 'did', - }, - }, - }, - messageAndReactionView: { - type: 'object', - required: ['message', 'reaction'], - properties: { - message: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#messageView', - }, - reaction: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#reactionView', - }, - }, - }, - convoView: { - type: 'object', - required: ['id', 'rev', 'members', 'muted', 'unreadCount'], - properties: { - id: { - type: 'string', - }, - rev: { - type: 'string', - }, - members: { - description: - 'Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who invited the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all 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', - 'lex:chat.bsky.convo.defs#systemMessageView', - ], - }, - lastReaction: { - type: 'union', - refs: ['lex:chat.bsky.convo.defs#messageAndReactionView'], - }, - muted: { - type: 'boolean', - }, - status: { - description: - 'Convo status for the viewer member (not the convo itself).', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoStatus', - }, - unreadCount: { - type: 'integer', - }, - kind: { - description: - 'Union field that has data specific to different kinds of convos.', - type: 'union', - refs: [ - 'lex:chat.bsky.convo.defs#directConvo', - 'lex:chat.bsky.convo.defs#groupConvo', - ], - }, - }, - }, - directConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - type: 'object', - properties: {}, - }, - groupConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - type: 'object', - required: ['name', 'lockStatus', 'memberCount'], - properties: { - name: { - type: 'string', - description: 'The display name of the group conversation.', - maxGraphemes: 128, - maxLength: 1280, - }, - memberCount: { - type: 'integer', - description: - 'The total number of members in the group conversation.', - }, - joinLink: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinLinkView', - }, - lockStatus: { - description: 'The lock status of the conversation.', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoLockStatus', - }, - }, - }, - logBeginConvo: { - description: - 'Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - logAcceptConvo: { - description: - 'Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - logLeaveConvo: { - description: - 'Event indicating the viewer left a convo. Can be direct or group.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - logMuteConvo: { - description: - 'Event indicating the viewer muted a convo. Can be direct or group.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - logUnmuteConvo: { - description: - 'Event indicating the viewer unmuted a convo. Can be direct or group.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - logCreateMessage: { - description: - 'Event indicating a user-originated message was created. Is not emitted for system messages.', - 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: { - description: - 'Event indicating a user-originated message was deleted. Is not emitted for system messages.', - 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: { - description: - 'DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.', - 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', - 'lex:chat.bsky.convo.defs#systemMessageView', - ], - }, - }, - }, - logAddReaction: { - description: 'Event indicating a reaction was added to a message.', - type: 'object', - required: ['rev', 'convoId', 'message', 'reaction'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - type: 'union', - refs: [ - 'lex:chat.bsky.convo.defs#messageView', - 'lex:chat.bsky.convo.defs#deletedMessageView', - ], - }, - reaction: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#reactionView', - }, - }, - }, - logRemoveReaction: { - description: 'Event indicating a reaction was removed from a message.', - type: 'object', - required: ['rev', 'convoId', 'message', 'reaction'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - type: 'union', - refs: [ - 'lex:chat.bsky.convo.defs#messageView', - 'lex:chat.bsky.convo.defs#deletedMessageView', - ], - }, - reaction: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#reactionView', - }, - }, - }, - logReadConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message.', - 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', - 'lex:chat.bsky.convo.defs#systemMessageView', - ], - }, - }, - }, - logAddMember: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataAddMember', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logRemoveMember: { - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).", - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataRemoveMember', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logMemberJoin: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataMemberJoin', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logMemberLeave: { - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).", - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataMemberLeave', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logLockConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataLockConvo', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logUnlockConvo: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataUnlockConvo', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logLockConvoPermanently: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataLockConvoPermanently', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logEditGroup: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataEditGroup', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logCreateJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataCreateJoinLink', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logEditJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataEditJoinLink', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logEnableJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataEnableJoinLink', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logDisableJoinLink: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo.', - type: 'object', - required: ['rev', 'convoId', 'message'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - message: { - description: - 'A system message with data of type #systemMessageDataDisableJoinLink', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#systemMessageView', - }, - }, - }, - logIncomingJoinRequest: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this.', - type: 'object', - required: ['rev', 'convoId', 'member'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - member: { - description: 'Prospective member who requested to join.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - logApproveJoinRequest: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.', - type: 'object', - required: ['rev', 'convoId', 'member'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - member: { - description: 'Prospective member who requested to join.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - logRejectJoinRequest: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this.', - type: 'object', - required: ['rev', 'convoId', 'member'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - member: { - description: 'Prospective member who requested to join.', - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - logOutgoingJoinRequest: { - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the viewer.', - type: 'object', - required: ['rev', 'convoId'], - properties: { - rev: { - type: 'string', - }, - convoId: { - type: 'string', - }, - }, - }, - }, - }, - ChatBskyConvoDeleteMessageForSelf: { - lexicon: 1, - id: 'chat.bsky.convo.deleteMessageForSelf', - defs: { - main: { - type: 'procedure', - description: - "Marks a message as deleted for the viewer, so they won't see that message in future enumerations.", - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'MessageDeleteNotAllowed', - description: - 'Indicates that this message cannot be deleted, e.g. because it is a system message.', - }, - ], - 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', - }, - }, - }, - }, - }, - ChatBskyConvoGetConvo: { - lexicon: 1, - id: 'chat.bsky.convo.getConvo', - defs: { - main: { - type: 'query', - description: 'Gets an existing conversation by its ID.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoGetConvoAvailability: { - lexicon: 1, - id: 'chat.bsky.convo.getConvoAvailability', - defs: { - main: { - type: 'query', - description: - "Check whether the requester and the other members can start a 1-1 chat. Only applicable to direct (non-group) conversations. If an existing convo is found for these members, it is returned. Does not create a new convo if it doesn't exist.", - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoGetConvoForMembers: { - lexicon: 1, - id: 'chat.bsky.convo.getConvoForMembers', - defs: { - main: { - type: 'query', - description: - 'Get or create a 1-1 conversation for the given members. Always returns the same direct (non-group) conversation. To create a group conversation, use createGroup.', - errors: [ - { - name: 'AccountSuspended', - }, - { - name: 'BlockedActor', - }, - { - name: 'MessagesDisabled', - }, - { - name: 'NotFollowedBySender', - }, - { - name: 'RecipientNotFound', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoGetConvoMembers: { - lexicon: 1, - id: 'chat.bsky.convo.getConvoMembers', - defs: { - main: { - type: 'query', - description: 'Returns a paginated list of members from a conversation.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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: ['members'], - properties: { - cursor: { - type: 'string', - }, - members: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - }, - }, - }, - }, - }, - 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#logMuteConvo', - 'lex:chat.bsky.convo.defs#logUnmuteConvo', - 'lex:chat.bsky.convo.defs#logCreateMessage', - 'lex:chat.bsky.convo.defs#logDeleteMessage', - 'lex:chat.bsky.convo.defs#logReadMessage', - 'lex:chat.bsky.convo.defs#logAddReaction', - 'lex:chat.bsky.convo.defs#logRemoveReaction', - 'lex:chat.bsky.convo.defs#logReadConvo', - 'lex:chat.bsky.convo.defs#logAddMember', - 'lex:chat.bsky.convo.defs#logRemoveMember', - 'lex:chat.bsky.convo.defs#logMemberJoin', - 'lex:chat.bsky.convo.defs#logMemberLeave', - 'lex:chat.bsky.convo.defs#logLockConvo', - 'lex:chat.bsky.convo.defs#logUnlockConvo', - 'lex:chat.bsky.convo.defs#logLockConvoPermanently', - 'lex:chat.bsky.convo.defs#logEditGroup', - 'lex:chat.bsky.convo.defs#logCreateJoinLink', - 'lex:chat.bsky.convo.defs#logEditJoinLink', - 'lex:chat.bsky.convo.defs#logEnableJoinLink', - 'lex:chat.bsky.convo.defs#logDisableJoinLink', - 'lex:chat.bsky.convo.defs#logIncomingJoinRequest', - 'lex:chat.bsky.convo.defs#logApproveJoinRequest', - 'lex:chat.bsky.convo.defs#logRejectJoinRequest', - 'lex:chat.bsky.convo.defs#logOutgoingJoinRequest', - ], - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoGetMessages: { - lexicon: 1, - id: 'chat.bsky.convo.getMessages', - defs: { - main: { - type: 'query', - description: 'Returns a page of messages from a conversation.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - 'lex:chat.bsky.convo.defs#systemMessageView', - ], - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoLeaveConvo: { - lexicon: 1, - id: 'chat.bsky.convo.leaveConvo', - defs: { - main: { - type: 'procedure', - description: - 'Leaves a conversation (direct or group). For group, this effectively removes membership. For direct, membership is never removed, only changed to remove from enumerations by the user who left.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'OwnerCannotLeave', - description: - 'The owner of a group conversation cannot leave before locking the group.', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoListConvoRequests: { - lexicon: 1, - id: 'chat.bsky.convo.listConvoRequests', - defs: { - main: { - type: 'query', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests are returned as joinRequestView.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['requests'], - properties: { - cursor: { - type: 'string', - }, - requests: { - type: 'array', - items: { - type: 'union', - refs: [ - 'lex:chat.bsky.convo.defs#convoView', - 'lex:chat.bsky.group.defs#joinRequestView', - ], - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoListConvos: { - lexicon: 1, - id: 'chat.bsky.convo.listConvos', - defs: { - main: { - type: 'query', - description: - 'Returns a page of conversations (direct or group) for the user.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - cursor: { - type: 'string', - }, - readState: { - type: 'string', - knownValues: ['unread'], - }, - status: { - description: - 'Filter convos by their status. It is discouraged to call with "request" and preferred to call chat.bsky.convo.listConvoRequests, which also includes group join requests made by the user.', - type: 'string', - knownValues: ['request', 'accepted'], - }, - kind: { - type: 'string', - description: 'Filter by conversation kind.', - knownValues: ['direct', 'group'], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoLockConvo: { - lexicon: 1, - id: 'chat.bsky.convo.lockConvo', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Locks a group convo so no more content (messages, reactions) can be added to it.', - errors: [ - { - name: 'ConvoLocked', - }, - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoMuteConvo: { - lexicon: 1, - id: 'chat.bsky.convo.muteConvo', - defs: { - main: { - type: 'procedure', - description: - 'Mutes a conversation, preventing notifications related to it.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoRemoveReaction: { - lexicon: 1, - id: 'chat.bsky.convo.removeReaction', - defs: { - main: { - type: 'procedure', - description: - "Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.", - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'messageId', 'value'], - properties: { - convoId: { - type: 'string', - }, - messageId: { - type: 'string', - }, - value: { - type: 'string', - minLength: 1, - maxLength: 64, - minGraphemes: 1, - maxGraphemes: 1, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['message'], - properties: { - message: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#messageView', - }, - }, - }, - }, - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'ReactionNotAllowed', - description: - 'Indicates that reactions are not allowed on this message, e.g. because it is a system message.', - }, - { - name: 'ReactionMessageDeleted', - description: - 'Indicates that the message has been deleted and reactions can no longer be added/removed.', - }, - { - name: 'ReactionInvalidValue', - description: - 'Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.', - }, - ], - }, - }, - }, - ChatBskyConvoSendMessage: { - lexicon: 1, - id: 'chat.bsky.convo.sendMessage', - defs: { - main: { - type: 'procedure', - description: 'Sends a message to a conversation.', - errors: [ - { - name: 'ConvoLocked', - }, - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - ChatBskyConvoSendMessageBatch: { - lexicon: 1, - id: 'chat.bsky.convo.sendMessageBatch', - defs: { - main: { - type: 'procedure', - description: 'Sends a batch of messages to a conversation.', - errors: [ - { - name: 'ConvoLocked', - }, - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - ChatBskyConvoUnlockConvo: { - lexicon: 1, - id: 'chat.bsky.convo.unlockConvo', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Unlocks a group convo so it is able to receive new content.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoUnmuteConvo: { - lexicon: 1, - id: 'chat.bsky.convo.unmuteConvo', - defs: { - main: { - type: 'procedure', - description: - 'Unmutes a conversation, allowing notifications related to it.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoUpdateAllRead: { - lexicon: 1, - id: 'chat.bsky.convo.updateAllRead', - defs: { - main: { - type: 'procedure', - description: - 'Sets conversations from a user as read to the latest message, with filters.', - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyConvoUpdateRead: { - lexicon: 1, - id: 'chat.bsky.convo.updateRead', - defs: { - main: { - type: 'procedure', - description: - 'Updates the read state of a conversation from, optionally specifying the last read message.', - errors: [ - { - name: 'InvalidConvo', - }, - ], - 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', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupAddMembers: { - lexicon: 1, - id: 'chat.bsky.group.addMembers', - defs: { - main: { - type: 'procedure', - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Adds members to a group. The members are added in 'request' status, so they have to accept it. This creates convo memberships.", - errors: [ - { - name: 'AccountSuspended', - }, - { - name: 'BlockedActor', - }, - { - name: 'GroupInvitesDisabled', - }, - { - name: 'ConvoLocked', - }, - { - name: 'InsufficientRole', - }, - { - name: 'InvalidConvo', - }, - { - name: 'MemberLimitReached', - }, - { - name: 'NotFollowedBySender', - }, - { - name: 'RecipientNotFound', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'members'], - properties: { - convoId: { - type: 'string', - }, - members: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - minLength: 1, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convo'], - properties: { - convo: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - addedMembers: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupApproveJoinRequest: { - lexicon: 1, - id: 'chat.bsky.group.approveJoinRequest', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Approves a request to join a group (via join link) the user owns. Action taken by the group owner.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - { - name: 'MemberLimitReached', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'member'], - properties: { - convoId: { - type: 'string', - }, - member: { - type: 'string', - format: 'did', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convo'], - properties: { - convo: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupCreateGroup: { - lexicon: 1, - id: 'chat.bsky.group.createGroup', - defs: { - main: { - type: 'procedure', - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'pending' membership for all members, except the owner who is 'accepted'.", - errors: [ - { - name: 'AccountSuspended', - }, - { - name: 'BlockedActor', - }, - { - name: 'GroupInvitesDisabled', - }, - { - name: 'NotFollowedBySender', - }, - { - name: 'RecipientNotFound', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['members', 'name'], - properties: { - members: { - type: 'array', - maxLength: 49, - items: { - type: 'string', - format: 'did', - }, - }, - name: { - type: 'string', - minLength: 1, - maxGraphemes: 128, - maxLength: 1280, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convo'], - properties: { - convo: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupCreateJoinLink: { - lexicon: 1, - id: 'chat.bsky.group.createJoinLink', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a join link for the group convo.', - errors: [ - { - name: 'EnabledJoinLinkAlreadyExists', - }, - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'joinRule'], - properties: { - convoId: { - type: 'string', - }, - requireApproval: { - type: 'boolean', - default: false, - }, - joinRule: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinRule', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['joinLink'], - properties: { - joinLink: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinLinkView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupDefs: { - lexicon: 1, - id: 'chat.bsky.group.defs', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here].', - defs: { - linkEnabledStatus: { - type: 'string', - knownValues: ['enabled', 'disabled'], - }, - joinRule: { - type: 'string', - knownValues: ['anyone', 'followedByOwner'], - }, - joinLinkView: { - type: 'object', - required: [ - 'code', - 'enabledStatus', - 'requireApproval', - 'joinRule', - 'createdAt', - ], - properties: { - code: { - type: 'string', - }, - enabledStatus: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#linkEnabledStatus', - }, - requireApproval: { - type: 'boolean', - }, - joinRule: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinRule', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - groupPublicView: { - type: 'object', - required: ['name', 'owner', 'memberCount', 'requireApproval'], - properties: { - name: { - type: 'string', - }, - owner: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - memberCount: { - type: 'integer', - }, - requireApproval: { - type: 'boolean', - }, - }, - }, - joinRequestView: { - type: 'object', - required: ['convoId', 'requestedBy', 'requestedAt'], - properties: { - convoId: { - type: 'string', - }, - requestedBy: { - type: 'ref', - ref: 'lex:chat.bsky.actor.defs#profileViewBasic', - }, - requestedAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - }, - }, - ChatBskyGroupDisableJoinLink: { - lexicon: 1, - id: 'chat.bsky.group.disableJoinLink', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Disables the active join link for the group convo.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - { - name: 'NoJoinLink', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId'], - properties: { - convoId: { - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['joinLink'], - properties: { - joinLink: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinLinkView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupEditGroup: { - lexicon: 1, - id: 'chat.bsky.group.editGroup', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Edits group settings.', - errors: [ - { - name: 'ConvoLocked', - }, - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'name'], - properties: { - convoId: { - type: 'string', - }, - name: { - type: 'string', - minLength: 1, - maxGraphemes: 128, - maxLength: 1280, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convo'], - properties: { - convo: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupEditJoinLink: { - lexicon: 1, - id: 'chat.bsky.group.editJoinLink', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Edits the existing join link settings for the group convo.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - { - name: 'NoJoinLink', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId'], - properties: { - convoId: { - type: 'string', - }, - requireApproval: { - type: 'boolean', - }, - joinRule: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinRule', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['joinLink'], - properties: { - joinLink: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinLinkView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupEnableJoinLink: { - lexicon: 1, - id: 'chat.bsky.group.enableJoinLink', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Re-enables a previously disabled join link for the group convo.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - { - name: 'NoJoinLink', - }, - { - name: 'LinkAlreadyEnabled', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId'], - properties: { - convoId: { - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['joinLink'], - properties: { - joinLink: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinLinkView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupGetGroupPublicInfo: { - lexicon: 1, - id: 'chat.bsky.group.getGroupPublicInfo', - defs: { - main: { - type: 'query', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Get public information about a group from an join link.', - errors: [ - { - name: 'InvalidCode', - }, - ], - parameters: { - type: 'params', - required: ['code'], - properties: { - code: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['group'], - properties: { - group: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#groupPublicView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupListJoinRequests: { - lexicon: 1, - id: 'chat.bsky.group.listJoinRequests', - defs: { - main: { - type: 'query', - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner's point of view.", - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - 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: ['requests'], - properties: { - cursor: { - type: 'string', - }, - requests: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:chat.bsky.group.defs#joinRequestView', - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupRejectJoinRequest: { - lexicon: 1, - id: 'chat.bsky.group.rejectJoinRequest', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Rejects a request to join a group (via join link) the user owns. Action taken by the group owner.', - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'member'], - properties: { - convoId: { - type: 'string', - }, - member: { - type: 'string', - format: 'did', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: [], - properties: {}, - }, - }, - }, - }, - }, - ChatBskyGroupRemoveMembers: { - lexicon: 1, - id: 'chat.bsky.group.removeMembers', - defs: { - main: { - type: 'procedure', - description: - "[NOTE: This is under active development and should be considered unstable while this note is here]. Removes members from a group. This deletes convo memberships, doesn't just set a status.", - errors: [ - { - name: 'InvalidConvo', - }, - { - name: 'InsufficientRole', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convoId', 'members'], - properties: { - convoId: { - type: 'string', - }, - members: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - minLength: 1, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['convo'], - properties: { - convo: { - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - }, - }, - }, - }, - }, - }, - ChatBskyGroupRequestJoin: { - lexicon: 1, - id: 'chat.bsky.group.requestJoin', - defs: { - main: { - type: 'procedure', - description: - '[NOTE: This is under active development and should be considered unstable while this note is here]. Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member.', - errors: [ - { - name: 'ConvoLocked', - }, - { - name: 'FollowRequired', - }, - { - name: 'InvalidCode', - }, - { - name: 'LinkDisabled', - }, - { - name: 'MemberLimitReached', - }, - { - name: 'UserKicked', - }, - ], - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['code'], - properties: { - code: { - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['status'], - properties: { - status: { - type: 'string', - knownValues: ['joined', 'pending'], - }, - convo: { - description: - 'The group convo joined. This is only present in the case of status=joined', - type: 'ref', - ref: 'lex:chat.bsky.convo.defs#convoView', - }, - }, - }, - }, - }, - }, - }, - 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', - 'lex:chat.bsky.convo.defs#systemMessageView', - ], - }, - }, - }, - }, - }, - }, - }, - }, - ChatBskyModerationSubscribeModEvents: { - lexicon: 1, - id: 'chat.bsky.moderation.subscribeModEvents', - defs: { - main: { - type: 'subscription', - description: - 'Subscribe to stream of chat events targeted to moderation. Private endpoint.', - parameters: { - type: 'params', - properties: { - cursor: { - type: 'string', - description: - "The last known event seq number to backfill from. Use '2222222222222' to backfill from the beginning. Don't specify a cursor to listen only for new events.", - }, - }, - }, - message: { - schema: { - type: 'union', - refs: [ - 'lex:chat.bsky.moderation.subscribeModEvents#eventConvoFirstMessage', - ], - }, - }, - 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.', - }, - ], - }, - eventConvoFirstMessage: { - type: 'object', - required: ['createdAt', 'rev', 'convoId', 'user', 'recipients'], - properties: { - convoId: { - type: 'string', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - messageId: { - type: 'string', - }, - recipients: { - description: - 'The list of DIDs message recipients. Does not include the sender, which is in the `user` field', - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - rev: { - type: 'string', - }, - user: { - description: 'The DID of the message author.', - type: 'string', - format: 'did', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - ComAtprotoAdminUpdateAccountSigningKey: { - lexicon: 1, - id: 'com.atproto.admin.updateAccountSigningKey', - defs: { - main: { - type: 'procedure', - description: - "Administrative action to update an account's signing key in their Did document.", - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['did', 'signingKey'], - properties: { - did: { - type: 'string', - format: 'did', - }, - signingKey: { - type: 'string', - format: 'did', - description: 'Did-key formatted public key', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - ComAtprotoIdentityDefs: { - lexicon: 1, - id: 'com.atproto.identity.defs', - defs: { - identityInfo: { - type: 'object', - required: ['did', 'handle', 'didDoc'], - properties: { - did: { - type: 'string', - format: 'did', - }, - handle: { - type: 'string', - format: 'handle', - description: - "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document.", - }, - didDoc: { - type: 'unknown', - description: 'The complete DID document for the identity.', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - ComAtprotoIdentityRefreshIdentity: { - lexicon: 1, - id: 'com.atproto.identity.refreshIdentity', - defs: { - main: { - type: 'procedure', - description: - 'Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['identifier'], - properties: { - identifier: { - type: 'string', - format: 'at-identifier', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:com.atproto.identity.defs#identityInfo', - }, - }, - errors: [ - { - name: 'HandleNotFound', - description: - 'The resolution process confirmed that the handle does not resolve to any DID.', - }, - { - name: 'DidNotFound', - description: - 'The DID resolution process confirmed that there is no current DID.', - }, - { - name: 'DidDeactivated', - description: - 'The DID previously existed, but has been deactivated.', - }, - ], - }, - }, - }, - 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.', - }, - }, - }, - ComAtprotoIdentityResolveDid: { - lexicon: 1, - id: 'com.atproto.identity.resolveDid', - defs: { - main: { - type: 'query', - description: - 'Resolves DID to DID document. Does not bi-directionally verify handle.', - parameters: { - type: 'params', - required: ['did'], - properties: { - did: { - type: 'string', - format: 'did', - description: 'DID to resolve.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['didDoc'], - properties: { - didDoc: { - type: 'unknown', - description: 'The complete DID document for the identity.', - }, - }, - }, - }, - errors: [ - { - name: 'DidNotFound', - description: - 'The DID resolution process confirmed that there is no current DID.', - }, - { - name: 'DidDeactivated', - description: - 'The DID previously existed, but has been deactivated.', - }, - ], - }, - }, - }, - ComAtprotoIdentityResolveHandle: { - lexicon: 1, - id: 'com.atproto.identity.resolveHandle', - defs: { - main: { - type: 'query', - description: - 'Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.', - 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', - }, - }, - }, - }, - errors: [ - { - name: 'HandleNotFound', - description: - 'The resolution process confirmed that the handle does not resolve to any DID.', - }, - ], - }, - }, - }, - ComAtprotoIdentityResolveIdentity: { - lexicon: 1, - id: 'com.atproto.identity.resolveIdentity', - defs: { - main: { - type: 'query', - description: - 'Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).', - parameters: { - type: 'params', - required: ['identifier'], - properties: { - identifier: { - type: 'string', - format: 'at-identifier', - description: 'Handle or DID to resolve.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:com.atproto.identity.defs#identityInfo', - }, - }, - errors: [ - { - name: 'HandleNotFound', - description: - 'The resolution process confirmed that the handle does not resolve to any DID.', - }, - { - name: 'DidNotFound', - description: - 'The DID resolution process confirmed that there is no current DID.', - }, - { - name: 'DidDeactivated', - description: - 'The DID previously existed, but has been deactivated.', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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.', - }, - }, - }, - }, - }, - }, - }, - 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', - '!warn', - '!no-unauthenticated', - 'porn', - 'sexual', - 'nudity', - 'graphic-media', - 'bot', - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - ComAtprotoLexiconResolveLexicon: { - lexicon: 1, - id: 'com.atproto.lexicon.resolveLexicon', - defs: { - main: { - type: 'query', - description: 'Resolves an atproto lexicon (NSID) to a schema.', - parameters: { - type: 'params', - properties: { - nsid: { - format: 'nsid', - type: 'string', - description: 'The lexicon NSID to resolve.', - }, - }, - required: ['nsid'], - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - properties: { - cid: { - type: 'string', - format: 'cid', - description: 'The CID of the lexicon schema record.', - }, - schema: { - type: 'ref', - ref: 'lex:com.atproto.lexicon.schema#main', - description: 'The resolved lexicon schema record.', - }, - uri: { - type: 'string', - format: 'at-uri', - description: 'The AT-URI of the lexicon schema record.', - }, - }, - required: ['uri', 'cid', 'schema'], - }, - }, - errors: [ - { - description: 'No lexicon was resolved for the NSID.', - name: 'LexiconNotFound', - }, - ], - }, - }, - }, - 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.", - }, - }, - }, - }, - }, - }, - 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', - ], - }, - modTool: { - type: 'ref', - ref: 'lex:com.atproto.moderation.createReport#modTool', - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - modTool: { - type: 'object', - description: - 'Moderation tool information for tracing the source of the action', - required: ['name'], - properties: { - name: { - type: 'string', - description: - "Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')", - }, - meta: { - type: 'unknown', - description: 'Additional arbitrary metadata about the source', - }, - }, - }, - }, - }, - 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', - 'tools.ozone.report.defs#reasonAppeal', - 'tools.ozone.report.defs#reasonOther', - 'tools.ozone.report.defs#reasonViolenceAnimal', - 'tools.ozone.report.defs#reasonViolenceThreats', - 'tools.ozone.report.defs#reasonViolenceGraphicContent', - 'tools.ozone.report.defs#reasonViolenceGlorification', - 'tools.ozone.report.defs#reasonViolenceExtremistContent', - 'tools.ozone.report.defs#reasonViolenceTrafficking', - 'tools.ozone.report.defs#reasonViolenceOther', - 'tools.ozone.report.defs#reasonSexualAbuseContent', - 'tools.ozone.report.defs#reasonSexualNCII', - 'tools.ozone.report.defs#reasonSexualDeepfake', - 'tools.ozone.report.defs#reasonSexualAnimal', - 'tools.ozone.report.defs#reasonSexualUnlabeled', - 'tools.ozone.report.defs#reasonSexualOther', - 'tools.ozone.report.defs#reasonChildSafetyCSAM', - 'tools.ozone.report.defs#reasonChildSafetyGroom', - 'tools.ozone.report.defs#reasonChildSafetyPrivacy', - 'tools.ozone.report.defs#reasonChildSafetyHarassment', - 'tools.ozone.report.defs#reasonChildSafetyOther', - 'tools.ozone.report.defs#reasonHarassmentTroll', - 'tools.ozone.report.defs#reasonHarassmentTargeted', - 'tools.ozone.report.defs#reasonHarassmentHateSpeech', - 'tools.ozone.report.defs#reasonHarassmentDoxxing', - 'tools.ozone.report.defs#reasonHarassmentOther', - 'tools.ozone.report.defs#reasonMisleadingBot', - 'tools.ozone.report.defs#reasonMisleadingImpersonation', - 'tools.ozone.report.defs#reasonMisleadingSpam', - 'tools.ozone.report.defs#reasonMisleadingScam', - 'tools.ozone.report.defs#reasonMisleadingElections', - 'tools.ozone.report.defs#reasonMisleadingOther', - 'tools.ozone.report.defs#reasonRuleSiteSecurity', - 'tools.ozone.report.defs#reasonRuleProhibitedSales', - 'tools.ozone.report.defs#reasonRuleBanEvasion', - 'tools.ozone.report.defs#reasonRuleOther', - 'tools.ozone.report.defs#reasonSelfHarmContent', - 'tools.ozone.report.defs#reasonSelfHarmED', - 'tools.ozone.report.defs#reasonSelfHarmStunts', - 'tools.ozone.report.defs#reasonSelfHarmSubstances', - 'tools.ozone.report.defs#reasonSelfHarmOther', - ], - }, - reasonSpam: { - type: 'token', - description: - 'Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`.', - }, - reasonViolation: { - type: 'token', - description: - 'Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`.', - }, - reasonMisleading: { - type: 'token', - description: - 'Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`.', - }, - reasonSexual: { - type: 'token', - description: - 'Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`.', - }, - reasonRude: { - type: 'token', - description: - 'Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`.', - }, - reasonOther: { - type: 'token', - description: - 'Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`.', - }, - reasonAppeal: { - type: 'token', - description: 'Appeal a previously taken moderation action', - }, - subjectType: { - type: 'string', - description: 'Tag describing a type of subject that might be reported.', - knownValues: ['account', 'record', 'chat'], - }, - }, - }, - 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, - format: 'record-key', - description: - 'NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility.', - }, - 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', - format: 'record-key', - }, - 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', - format: 'record-key', - }, - }, - }, - 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: {}, - }, - }, - }, - 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', - format: 'record-key', - 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.", - }, - ], - }, - }, - }, - ComAtprotoRepoDefs: { - lexicon: 1, - id: 'com.atproto.repo.defs', - defs: { - commitMeta: { - type: 'object', - required: ['cid', 'rev'], - properties: { - cid: { - type: 'string', - format: 'cid', - }, - rev: { - type: 'string', - format: 'tid', - }, - }, - }, - }, - }, - 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', - format: 'record-key', - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - 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', - }, - }, - }, - }, - }, - 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', - format: 'record-key', - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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.", - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - ComAtprotoServerDeleteSession: { - lexicon: 1, - id: 'com.atproto.server.deleteSession', - defs: { - main: { - type: 'procedure', - description: - "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", - errors: [ - { - name: 'InvalidToken', - }, - { - name: 'ExpiredToken', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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.', - }, - ], - }, - }, - }, - 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', - }, - 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'], - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - email: { - type: 'string', - }, - emailConfirmed: { - type: 'boolean', - }, - emailAuthFactor: { - type: 'boolean', - }, - 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', - }, - { - name: 'InvalidToken', - }, - { - name: 'ExpiredToken', - }, - ], - }, - }, - }, - ComAtprotoServerRequestAccountDelete: { - lexicon: 1, - id: 'com.atproto.server.requestAccountDelete', - defs: { - main: { - type: 'procedure', - description: 'Initiate a user account deletion via email.', - }, - }, - }, - ComAtprotoServerRequestEmailConfirmation: { - lexicon: 1, - id: 'com.atproto.server.requestEmailConfirmation', - defs: { - main: { - type: 'procedure', - description: - 'Request an email with a code to confirm ownership of email.', - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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.', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - ComAtprotoSyncDefs: { - lexicon: 1, - id: 'com.atproto.sync.defs', - defs: { - hostStatus: { - type: 'string', - knownValues: ['active', 'idle', 'offline', 'throttled', 'banned'], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - ComAtprotoSyncGetHostStatus: { - lexicon: 1, - id: 'com.atproto.sync.getHostStatus', - defs: { - main: { - type: 'query', - description: - 'Returns information about a specified upstream host, as consumed by the server. Implemented by relays.', - parameters: { - type: 'params', - required: ['hostname'], - properties: { - hostname: { - type: 'string', - description: - 'Hostname of the host (eg, PDS or relay) being queried.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['hostname'], - properties: { - hostname: { - type: 'string', - }, - seq: { - type: 'integer', - description: - 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).', - }, - accountCount: { - type: 'integer', - description: - 'Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts.', - }, - status: { - type: 'ref', - ref: 'lex:com.atproto.sync.defs#hostStatus', - }, - }, - }, - }, - errors: [ - { - name: 'HostNotFound', - }, - ], - }, - }, - }, - 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', - format: 'tid', - }, - }, - }, - }, - errors: [ - { - name: 'RepoNotFound', - }, - { - name: 'RepoTakendown', - }, - { - name: 'RepoSuspended', - }, - { - name: 'RepoDeactivated', - }, - ], - }, - }, - }, - 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', - format: 'record-key', - }, - }, - }, - output: { - encoding: 'application/vnd.ipld.car', - }, - errors: [ - { - name: 'RecordNotFound', - }, - { - 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', - format: 'tid', - 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', - }, - ], - }, - }, - }, - 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', - 'deleted', - 'deactivated', - 'desynchronized', - 'throttled', - ], - }, - rev: { - type: 'string', - format: 'tid', - description: - 'Optional field, the current rev of the repo, if active=true', - }, - }, - }, - }, - errors: [ - { - name: 'RepoNotFound', - }, - ], - }, - }, - }, - 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', - format: 'tid', - 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', - }, - ], - }, - }, - }, - ComAtprotoSyncListHosts: { - lexicon: 1, - id: 'com.atproto.sync.listHosts', - defs: { - main: { - type: 'query', - description: - 'Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.', - parameters: { - type: 'params', - properties: { - limit: { - type: 'integer', - minimum: 1, - maximum: 1000, - default: 200, - }, - cursor: { - type: 'string', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['hosts'], - properties: { - cursor: { - type: 'string', - }, - hosts: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:com.atproto.sync.listHosts#host', - }, - description: - 'Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first.', - }, - }, - }, - }, - }, - host: { - type: 'object', - required: ['hostname'], - properties: { - hostname: { - type: 'string', - description: 'hostname of server; not a URL (no scheme)', - }, - seq: { - type: 'integer', - description: - 'Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor).', - }, - accountCount: { - type: 'integer', - }, - status: { - type: 'ref', - ref: 'lex:com.atproto.sync.defs#hostStatus', - }, - }, - }, - }, - }, - 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', - format: 'tid', - }, - 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', - 'deleted', - 'deactivated', - 'desynchronized', - 'throttled', - ], - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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. DEPRECATED: just use com.atproto.sync.requestCrawl', - 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.', - }, - }, - }, - }, - errors: [ - { - name: 'HostBanned', - }, - ], - }, - }, - }, - 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#sync', - 'lex:com.atproto.sync.subscribeRepos#identity', - 'lex:com.atproto.sync.subscribeRepos#account', - '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: ['since'], - properties: { - seq: { - type: 'integer', - description: 'The stream sequence number of this message.', - }, - rebase: { - type: 'boolean', - description: 'DEPRECATED -- unused', - }, - tooBig: { - type: 'boolean', - description: - 'DEPRECATED -- replaced by #sync event and data limits. 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. Note that all other message types name this field 'did'.", - }, - commit: { - type: 'cid-link', - description: 'Repo commit object CID.', - }, - rev: { - type: 'string', - format: 'tid', - 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', - format: 'tid', - 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. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.", - maxLength: 2000000, - }, - 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: - 'DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit.', - }, - }, - prevData: { - type: 'cid-link', - description: - "The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose.", - }, - time: { - type: 'string', - format: 'datetime', - description: - 'Timestamp of when this message was originally broadcast.', - }, - }, - }, - sync: { - type: 'object', - description: - 'Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository.', - required: ['seq', 'did', 'blocks', 'rev', 'time'], - properties: { - seq: { - type: 'integer', - description: 'The stream sequence number of this message.', - }, - did: { - type: 'string', - format: 'did', - description: - 'The account this repo event corresponds to. Must match that in the commit object.', - }, - blocks: { - type: 'bytes', - description: - "CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.", - maxLength: 10000, - }, - rev: { - type: 'string', - description: - 'The rev of the commit. This value must match that in the commit object.', - }, - 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', - 'desynchronized', - 'throttled', - ], - }, - }, - }, - 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.', - }, - prev: { - type: 'cid-link', - description: - 'For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.', - }, - }, - }, - }, - }, - 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: {}, - }, - }, - }, - }, - }, - ComAtprotoTempCheckHandleAvailability: { - lexicon: 1, - id: 'com.atproto.temp.checkHandleAvailability', - defs: { - main: { - type: 'query', - description: - 'Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.', - parameters: { - type: 'params', - required: ['handle'], - properties: { - handle: { - type: 'string', - format: 'handle', - description: - 'Tentative handle. Will be checked for availability or used to build handle suggestions.', - }, - email: { - type: 'string', - description: - 'User-provided email. Might be used to build handle suggestions.', - }, - birthDate: { - type: 'string', - format: 'datetime', - description: - 'User-provided birth date. Might be used to build handle suggestions.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['handle', 'result'], - properties: { - handle: { - type: 'string', - format: 'handle', - description: 'Echo of the input handle.', - }, - result: { - type: 'union', - refs: [ - 'lex:com.atproto.temp.checkHandleAvailability#resultAvailable', - 'lex:com.atproto.temp.checkHandleAvailability#resultUnavailable', - ], - }, - }, - }, - }, - errors: [ - { - name: 'InvalidEmail', - description: 'An invalid email was provided.', - }, - ], - }, - resultAvailable: { - type: 'object', - description: 'Indicates the provided handle is available.', - properties: {}, - }, - resultUnavailable: { - type: 'object', - description: - 'Indicates the provided handle is unavailable and gives suggestions of available handles.', - required: ['suggestions'], - properties: { - suggestions: { - type: 'array', - description: - 'List of suggested handles based on the provided inputs.', - items: { - type: 'ref', - ref: 'lex:com.atproto.temp.checkHandleAvailability#suggestion', - }, - }, - }, - }, - suggestion: { - type: 'object', - required: ['handle', 'method'], - properties: { - handle: { - type: 'string', - format: 'handle', - }, - method: { - type: 'string', - description: - 'Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics.', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - ComAtprotoTempDereferenceScope: { - lexicon: 1, - id: 'com.atproto.temp.dereferenceScope', - defs: { - main: { - type: 'query', - description: - 'Allows finding the oauth permission scope from a reference', - parameters: { - type: 'params', - required: ['scope'], - properties: { - scope: { - type: 'string', - description: "The scope reference (starts with 'ref:')", - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['scope'], - properties: { - scope: { - type: 'string', - description: 'The full oauth permission scope', - }, - }, - }, - }, - errors: [ - { - name: 'InvalidScopeReference', - description: 'An invalid scope reference was provided.', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - ComAtprotoTempRevokeAccountCredentials: { - lexicon: 1, - id: 'com.atproto.temp.revokeAccountCredentials', - defs: { - main: { - type: 'procedure', - description: - 'Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['account'], - properties: { - account: { - type: 'string', - format: 'at-identifier', - }, - }, - }, - }, - }, - }, - }, - ComGermnetworkDeclaration: { - lexicon: 1, - id: 'com.germnetwork.declaration', - defs: { - main: { - type: 'record', - description: 'A declaration of a Germ Network account', - key: 'literal:self', - record: { - type: 'object', - required: ['version', 'currentKey'], - properties: { - version: { - type: 'string', - description: - 'Semver version number, without pre-release or build information, for the format of opaque content', - minLength: 5, - maxLength: 14, - }, - currentKey: { - type: 'bytes', - description: - 'Opaque value, an ed25519 public key prefixed with a byte enum', - }, - messageMe: { - type: 'ref', - description: 'Controls who can message this account', - ref: 'lex:com.germnetwork.declaration#messageMe', - }, - keyPackage: { - type: 'bytes', - description: - 'Opaque value, contains MLS KeyPackage(s), and other signature data, and is signed by the currentKey', - }, - continuityProofs: { - type: 'array', - description: 'Array of opaque values to allow for key rolling', - items: { - type: 'bytes', - }, - maxLength: 1000, - }, - }, - }, - }, - messageMe: { - type: 'object', - required: ['showButtonTo', 'messageMeUrl'], - properties: { - messageMeUrl: { - type: 'string', - description: - 'A URL to present to an account that does not have its own com.germnetwork.declaration record, must have an empty fragment component, where the app should fill in the fragment component with the DIDs of the two accounts who wish to message each other', - format: 'uri', - minLength: 1, - maxLength: 2047, - }, - showButtonTo: { - type: 'string', - knownValues: ['none', 'usersIFollow', 'everyone'], - description: - "The policy of who can message the account, this value is included in the keyPackage, but is duplicated here to allow applications to decide if they should show a 'Message on Germ' button to the viewer.", - minLength: 1, - maxLength: 100, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - ToolsOzoneHostingGetAccountHistory: { - lexicon: 1, - id: 'tools.ozone.hosting.getAccountHistory', - defs: { - main: { - type: 'query', - description: - 'Get account history, e.g. log of updated email addresses or other identity information.', - parameters: { - type: 'params', - required: ['did'], - properties: { - did: { - type: 'string', - format: 'did', - }, - events: { - type: 'array', - items: { - type: 'string', - knownValues: [ - 'accountCreated', - 'emailUpdated', - 'emailConfirmed', - 'passwordUpdated', - 'handleUpdated', - ], - }, - }, - cursor: { - type: 'string', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['events'], - properties: { - cursor: { - type: 'string', - }, - events: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.hosting.getAccountHistory#event', - }, - }, - }, - }, - }, - }, - event: { - type: 'object', - required: ['details', 'createdBy', 'createdAt'], - properties: { - details: { - type: 'union', - refs: [ - 'lex:tools.ozone.hosting.getAccountHistory#accountCreated', - 'lex:tools.ozone.hosting.getAccountHistory#emailUpdated', - 'lex:tools.ozone.hosting.getAccountHistory#emailConfirmed', - 'lex:tools.ozone.hosting.getAccountHistory#passwordUpdated', - 'lex:tools.ozone.hosting.getAccountHistory#handleUpdated', - ], - }, - createdBy: { - type: 'string', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - }, - }, - accountCreated: { - type: 'object', - required: [], - properties: { - email: { - type: 'string', - }, - handle: { - type: 'string', - format: 'handle', - }, - }, - }, - emailUpdated: { - type: 'object', - required: ['email'], - properties: { - email: { - type: 'string', - }, - }, - }, - emailConfirmed: { - type: 'object', - required: ['email'], - properties: { - email: { - type: 'string', - }, - }, - }, - passwordUpdated: { - type: 'object', - required: [], - properties: {}, - }, - handleUpdated: { - type: 'object', - required: ['handle'], - properties: { - handle: { - type: 'string', - format: 'handle', - }, - }, - }, - }, - }, - ToolsOzoneModerationCancelScheduledActions: { - lexicon: 1, - id: 'tools.ozone.moderation.cancelScheduledActions', - defs: { - main: { - type: 'procedure', - description: - 'Cancel all pending scheduled moderation actions for specified subjects', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['subjects'], - properties: { - subjects: { - type: 'array', - maxLength: 100, - items: { - type: 'string', - format: 'did', - }, - description: - 'Array of DID subjects to cancel scheduled actions for', - }, - comment: { - type: 'string', - description: - 'Optional comment describing the reason for cancellation', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.cancelScheduledActions#cancellationResults', - }, - }, - }, - cancellationResults: { - type: 'object', - required: ['succeeded', 'failed'], - properties: { - succeeded: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - description: - 'DIDs for which all pending scheduled actions were successfully cancelled', - }, - failed: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.cancelScheduledActions#failedCancellation', - }, - description: - 'DIDs for which cancellation failed with error details', - }, - }, - }, - failedCancellation: { - type: 'object', - required: ['did', 'error'], - properties: { - did: { - type: 'string', - format: 'did', - }, - error: { - type: 'string', - }, - errorCode: { - type: 'string', - }, - }, - }, - }, - }, - 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', - 'lex:tools.ozone.moderation.defs#ageAssuranceEvent', - 'lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent', - 'lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent', - 'lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent', - 'lex:tools.ozone.moderation.defs#scheduleTakedownEvent', - 'lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent', - ], - }, - 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', - }, - modTool: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#modTool', - }, - }, - }, - 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', - 'lex:tools.ozone.moderation.defs#ageAssuranceEvent', - 'lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent', - 'lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent', - 'lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent', - 'lex:tools.ozone.moderation.defs#scheduleTakedownEvent', - 'lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent', - ], - }, - 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', - }, - modTool: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#modTool', - }, - }, - }, - 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', - 'lex:chat.bsky.convo.defs#messageRef', - ], - }, - 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', - }, - accountStrike: { - description: - 'Strike information for the account (account-level only)', - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#accountStrike', - }, - ageAssuranceState: { - type: 'string', - description: 'Current age assurance state of the subject.', - knownValues: ['pending', 'assured', 'unknown', 'reset', 'blocked'], - }, - ageAssuranceUpdatedBy: { - type: 'string', - description: - 'Whether or not the last successful update to age assurance was made by the user or admin.', - knownValues: ['admin', 'user'], - }, - }, - }, - subjectView: { - description: - "Detailed view of a subject. For record subjects, the author's repo and profile will be returned.", - type: 'object', - required: ['type', 'subject'], - properties: { - type: { - type: 'ref', - ref: 'lex:com.atproto.moderation.defs#subjectType', - }, - subject: { - type: 'string', - }, - status: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#subjectStatusView', - }, - repo: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#repoViewDetail', - }, - profile: { - type: 'union', - refs: [], - }, - record: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#recordViewDetail', - }, - }, - }, - 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', - }, - }, - }, - accountStrike: { - description: 'Strike information for an account', - type: 'object', - properties: { - activeStrikeCount: { - description: - 'Current number of active strikes (excluding expired strikes)', - type: 'integer', - }, - totalStrikeCount: { - description: - 'Total number of strikes ever received (including expired strikes)', - type: 'integer', - }, - firstStrikeAt: { - description: 'Timestamp of the first strike received', - type: 'string', - format: 'datetime', - }, - lastStrikeAt: { - description: 'Timestamp of the most recent strike received', - type: 'string', - format: 'datetime', - }, - }, - }, - subjectReviewState: { - type: 'string', - knownValues: [ - 'tools.ozone.moderation.defs#reviewOpen', - 'tools.ozone.moderation.defs#reviewEscalated', - 'tools.ozone.moderation.defs#reviewClosed', - '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.', - }, - severityLevel: { - type: 'string', - description: - "Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).", - }, - targetServices: { - type: 'array', - items: { - type: 'string', - knownValues: ['appview', 'pds'], - }, - description: - 'List of services where the takedown should be applied. If empty or not provided, takedown is applied on all configured services.', - }, - strikeCount: { - type: 'integer', - description: - 'Number of strikes to assign to the user for this violation.', - }, - strikeExpiresAt: { - type: 'string', - format: 'datetime', - description: - 'When the strike should expire. If not provided, the strike never expires.', - }, - }, - }, - modEventReverseTakedown: { - type: 'object', - description: 'Revert take down action on a subject', - properties: { - comment: { - type: 'string', - description: 'Describe reasoning behind the reversal.', - }, - policies: { - type: 'array', - maxLength: 5, - items: { - type: 'string', - }, - description: - 'Names/Keywords of the policy infraction for which takedown is being reversed.', - }, - severityLevel: { - type: 'string', - description: - "Severity level of the violation. Usually set from the last policy infraction's severity.", - }, - strikeCount: { - type: 'integer', - description: - "Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity.", - }, - }, - }, - 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, - }, - }, - }, - ageAssuranceEvent: { - type: 'object', - description: - 'Age assurance info coming directly from users. Only works on DID subjects.', - required: ['createdAt', 'status', 'attemptId'], - properties: { - createdAt: { - type: 'string', - format: 'datetime', - description: 'The date and time of this write operation.', - }, - attemptId: { - type: 'string', - description: - 'The unique identifier for this instance of the age assurance flow, in UUID format.', - }, - status: { - type: 'string', - description: 'The status of the Age Assurance process.', - knownValues: ['unknown', 'pending', 'assured'], - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - countryCode: { - type: 'string', - description: - 'The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow.', - }, - regionCode: { - type: 'string', - description: - 'The ISO 3166-2 region code provided when beginning the Age Assurance flow.', - }, - initIp: { - type: 'string', - description: 'The IP address used when initiating the AA flow.', - }, - initUa: { - type: 'string', - description: 'The user agent used when initiating the AA flow.', - }, - completeIp: { - type: 'string', - description: 'The IP address used when completing the AA flow.', - }, - completeUa: { - type: 'string', - description: 'The user agent used when completing the AA flow.', - }, - }, - }, - ageAssuranceOverrideEvent: { - type: 'object', - description: - 'Age assurance status override by moderators. Only works on DID subjects.', - required: ['comment', 'status'], - properties: { - status: { - type: 'string', - description: - 'The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.', - knownValues: ['assured', 'reset', 'blocked'], - }, - access: { - type: 'ref', - ref: 'lex:app.bsky.ageassurance.defs#access', - }, - comment: { - type: 'string', - minLength: 1, - description: 'Comment describing the reason for the override.', - }, - }, - }, - ageAssurancePurgeEvent: { - type: 'object', - description: - 'Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only.', - required: ['comment'], - properties: { - comment: { - type: 'string', - minLength: 1, - description: 'Comment describing the reason for the purge.', - }, - }, - }, - revokeAccountCredentialsEvent: { - type: 'object', - description: - 'Account credentials revocation by moderators. Only works on DID subjects.', - required: ['comment'], - properties: { - comment: { - minLength: 1, - type: 'string', - description: 'Comment describing the reason for the revocation.', - }, - }, - }, - 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.', - }, - policies: { - type: 'array', - maxLength: 5, - items: { - type: 'string', - }, - description: - 'Names/Keywords of the policies that necessitated the email.', - }, - severityLevel: { - type: 'string', - description: - "Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense", - }, - strikeCount: { - type: 'integer', - description: - 'Number of strikes to assign to the user for this violation. Normally 0 as an indicator of a warning and only added as a strike on a repeat offense.', - }, - strikeExpiresAt: { - type: 'string', - format: 'datetime', - description: - 'When the strike should expire. If not provided, the strike never expires.', - }, - isDelivered: { - type: 'boolean', - description: - "Indicates whether the email was successfully delivered to the user's inbox.", - }, - }, - }, - 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', - }, - }, - }, - scheduleTakedownEvent: { - type: 'object', - description: 'Logs a scheduled takedown action for an account.', - properties: { - comment: { - type: 'string', - }, - executeAt: { - type: 'string', - format: 'datetime', - }, - executeAfter: { - type: 'string', - format: 'datetime', - }, - executeUntil: { - type: 'string', - format: 'datetime', - }, - }, - }, - cancelScheduledTakedownEvent: { - type: 'object', - description: - 'Logs cancellation of a scheduled takedown action for an account.', - properties: { - comment: { - type: 'string', - }, - }, - }, - 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.", - }, - }, - }, - modTool: { - type: 'object', - description: - 'Moderation tool information for tracing the source of the action', - required: ['name'], - properties: { - name: { - type: 'string', - description: - "Name/identifier of the source (e.g., 'automod', 'ozone/workspace')", - }, - meta: { - type: 'unknown', - description: 'Additional arbitrary metadata about the source', - }, - }, - }, - timelineEventPlcCreate: { - type: 'token', - description: - 'Moderation event timeline event for a PLC create operation', - }, - timelineEventPlcOperation: { - type: 'token', - description: - 'Moderation event timeline event for generic PLC operation', - }, - timelineEventPlcTombstone: { - type: 'token', - description: - 'Moderation event timeline event for a PLC tombstone operation', - }, - scheduledActionView: { - type: 'object', - description: 'View of a scheduled moderation action', - required: ['id', 'action', 'did', 'createdBy', 'createdAt', 'status'], - properties: { - id: { - type: 'integer', - description: 'Auto-incrementing row ID', - }, - action: { - type: 'string', - knownValues: ['takedown'], - description: 'Type of action to be executed', - }, - eventData: { - type: 'unknown', - description: - 'Serialized event object that will be propagated to the event when performed', - }, - did: { - type: 'string', - format: 'did', - description: 'Subject DID for the action', - }, - executeAt: { - type: 'string', - format: 'datetime', - description: 'Exact time to execute the action', - }, - executeAfter: { - type: 'string', - format: 'datetime', - description: - 'Earliest time to execute the action (for randomized scheduling)', - }, - executeUntil: { - type: 'string', - format: 'datetime', - description: - 'Latest time to execute the action (for randomized scheduling)', - }, - randomizeExecution: { - type: 'boolean', - description: - 'Whether execution time should be randomized within the specified range', - }, - createdBy: { - type: 'string', - format: 'did', - description: 'DID of the user who created this scheduled action', - }, - createdAt: { - type: 'string', - format: 'datetime', - description: 'When the scheduled action was created', - }, - updatedAt: { - type: 'string', - format: 'datetime', - description: 'When the scheduled action was last updated', - }, - status: { - type: 'string', - knownValues: ['pending', 'executed', 'cancelled', 'failed'], - description: 'Current status of the scheduled action', - }, - lastExecutedAt: { - type: 'string', - format: 'datetime', - description: 'When the action was last attempted to be executed', - }, - lastFailureReason: { - type: 'string', - description: 'Reason for the last execution failure', - }, - executionEventId: { - type: 'integer', - description: - 'ID of the moderation event created when action was successfully executed', - }, - }, - }, - }, - }, - 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', - 'lex:tools.ozone.moderation.defs#ageAssuranceEvent', - 'lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent', - 'lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent', - 'lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent', - 'lex:tools.ozone.moderation.defs#scheduleTakedownEvent', - 'lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent', - ], - }, - 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', - }, - modTool: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#modTool', - }, - externalId: { - type: 'string', - description: - 'An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject.', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#modEventView', - }, - }, - errors: [ - { - name: 'SubjectHasAction', - }, - { - name: 'DuplicateExternalId', - description: - 'An event with the same external ID already exists for the subject.', - }, - ], - }, - }, - }, - ToolsOzoneModerationGetAccountTimeline: { - lexicon: 1, - id: 'tools.ozone.moderation.getAccountTimeline', - defs: { - main: { - type: 'query', - description: - 'Get timeline of all available events of an account. This includes moderation events, account history and did history.', - parameters: { - type: 'params', - required: ['did'], - properties: { - did: { - type: 'string', - format: 'did', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['timeline'], - properties: { - timeline: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.getAccountTimeline#timelineItem', - }, - }, - }, - }, - }, - errors: [ - { - name: 'RepoNotFound', - }, - ], - }, - timelineItem: { - type: 'object', - required: ['day', 'summary'], - properties: { - day: { - type: 'string', - }, - summary: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.getAccountTimeline#timelineItemSummary', - }, - }, - }, - }, - timelineItemSummary: { - type: 'object', - required: ['eventSubjectType', 'eventType', 'count'], - properties: { - eventSubjectType: { - type: 'string', - knownValues: ['account', 'record', 'chat'], - }, - eventType: { - type: 'string', - knownValues: [ - 'tools.ozone.moderation.defs#modEventTakedown', - 'tools.ozone.moderation.defs#modEventReverseTakedown', - 'tools.ozone.moderation.defs#modEventComment', - 'tools.ozone.moderation.defs#modEventReport', - 'tools.ozone.moderation.defs#modEventLabel', - 'tools.ozone.moderation.defs#modEventAcknowledge', - 'tools.ozone.moderation.defs#modEventEscalate', - 'tools.ozone.moderation.defs#modEventMute', - 'tools.ozone.moderation.defs#modEventUnmute', - 'tools.ozone.moderation.defs#modEventMuteReporter', - 'tools.ozone.moderation.defs#modEventUnmuteReporter', - 'tools.ozone.moderation.defs#modEventEmail', - 'tools.ozone.moderation.defs#modEventResolveAppeal', - 'tools.ozone.moderation.defs#modEventDivert', - 'tools.ozone.moderation.defs#modEventTag', - 'tools.ozone.moderation.defs#accountEvent', - 'tools.ozone.moderation.defs#identityEvent', - 'tools.ozone.moderation.defs#recordEvent', - 'tools.ozone.moderation.defs#modEventPriorityScore', - 'tools.ozone.moderation.defs#revokeAccountCredentialsEvent', - 'tools.ozone.moderation.defs#ageAssuranceEvent', - 'tools.ozone.moderation.defs#ageAssuranceOverrideEvent', - 'tools.ozone.moderation.defs#timelineEventPlcCreate', - 'tools.ozone.moderation.defs#timelineEventPlcOperation', - 'tools.ozone.moderation.defs#timelineEventPlcTombstone', - 'tools.ozone.hosting.getAccountHistory#accountCreated', - 'tools.ozone.hosting.getAccountHistory#emailConfirmed', - 'tools.ozone.hosting.getAccountHistory#passwordUpdated', - 'tools.ozone.hosting.getAccountHistory#handleUpdated', - 'tools.ozone.moderation.defs#scheduleTakedownEvent', - 'tools.ozone.moderation.defs#cancelScheduledTakedownEvent', - ], - }, - count: { - type: 'integer', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - ], - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - ], - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneModerationGetSubjects: { - lexicon: 1, - id: 'tools.ozone.moderation.getSubjects', - defs: { - main: { - type: 'query', - description: 'Get details about subjects.', - parameters: { - type: 'params', - required: ['subjects'], - properties: { - subjects: { - type: 'array', - maxLength: 100, - minLength: 1, - items: { - type: 'string', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['subjects'], - properties: { - subjects: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#subjectView', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneModerationListScheduledActions: { - lexicon: 1, - id: 'tools.ozone.moderation.listScheduledActions', - defs: { - main: { - type: 'procedure', - description: - 'List scheduled moderation actions with optional filtering', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['statuses'], - properties: { - startsAfter: { - type: 'string', - format: 'datetime', - description: - 'Filter actions scheduled to execute after this time', - }, - endsBefore: { - type: 'string', - format: 'datetime', - description: - 'Filter actions scheduled to execute before this time', - }, - subjects: { - type: 'array', - maxLength: 100, - items: { - type: 'string', - format: 'did', - }, - description: 'Filter actions for specific DID subjects', - }, - statuses: { - type: 'array', - minLength: 1, - items: { - type: 'string', - knownValues: ['pending', 'executed', 'cancelled', 'failed'], - }, - description: 'Filter actions by status', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - description: 'Maximum number of results to return', - }, - cursor: { - type: 'string', - description: 'Cursor for pagination', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['actions'], - properties: { - actions: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#scheduledActionView', - }, - }, - cursor: { - type: 'string', - description: 'Cursor for next page of results', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - modTool: { - type: 'array', - items: { - type: 'string', - }, - description: - 'If specified, only events where the modTool name matches any of the given values are returned', - }, - batchId: { - type: 'string', - description: - 'If specified, only events where the batchId matches the given value are returned', - }, - ageAssuranceState: { - type: 'string', - description: - 'If specified, only events where the age assurance state matches the given value are returned', - knownValues: [ - 'pending', - 'assured', - 'unknown', - 'reset', - 'blocked', - ], - }, - withStrike: { - type: 'boolean', - description: - 'If specified, only events where strikeCount value is set 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - knownValues: [ - 'tools.ozone.moderation.defs#reviewOpen', - 'tools.ozone.moderation.defs#reviewClosed', - 'tools.ozone.moderation.defs#reviewEscalated', - 'tools.ozone.moderation.defs#reviewNone', - ], - }, - 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.', - }, - minStrikeCount: { - type: 'integer', - minimum: 1, - description: - 'If specified, only subjects that belong to an account that has at least this many active strikes will be returned.', - }, - ageAssuranceState: { - type: 'string', - description: - 'If specified, only subjects with the given age assurance state will be returned.', - knownValues: [ - 'pending', - 'assured', - 'unknown', - 'reset', - 'blocked', - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneModerationScheduleAction: { - lexicon: 1, - id: 'tools.ozone.moderation.scheduleAction', - defs: { - main: { - type: 'procedure', - description: - 'Schedule a moderation action to be executed at a future time', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['action', 'subjects', 'createdBy', 'scheduling'], - properties: { - action: { - type: 'union', - refs: ['lex:tools.ozone.moderation.scheduleAction#takedown'], - }, - subjects: { - type: 'array', - maxLength: 100, - items: { - type: 'string', - format: 'did', - }, - description: 'Array of DID subjects to schedule the action for', - }, - createdBy: { - type: 'string', - format: 'did', - }, - scheduling: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.scheduleAction#schedulingConfig', - }, - modTool: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.defs#modTool', - description: - 'This will be propagated to the moderation event when it is applied', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.scheduleAction#scheduledActionResults', - }, - }, - }, - takedown: { - type: 'object', - description: 'Schedule a takedown action', - 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.', - }, - severityLevel: { - type: 'string', - description: - "Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.).", - }, - strikeCount: { - type: 'integer', - description: - 'Number of strikes to assign to the user when takedown is applied.', - }, - strikeExpiresAt: { - type: 'string', - format: 'datetime', - description: - 'When the strike should expire. If not provided, the strike never expires.', - }, - emailContent: { - type: 'string', - description: 'Email content to be sent to the user upon takedown.', - }, - emailSubject: { - type: 'string', - description: - 'Subject of the email to be sent to the user upon takedown.', - }, - }, - }, - schedulingConfig: { - type: 'object', - description: 'Configuration for when the action should be executed', - properties: { - executeAt: { - type: 'string', - format: 'datetime', - description: 'Exact time to execute the action', - }, - executeAfter: { - type: 'string', - format: 'datetime', - description: - 'Earliest time to execute the action (for randomized scheduling)', - }, - executeUntil: { - type: 'string', - format: 'datetime', - description: - 'Latest time to execute the action (for randomized scheduling)', - }, - }, - }, - scheduledActionResults: { - type: 'object', - required: ['succeeded', 'failed'], - properties: { - succeeded: { - type: 'array', - items: { - type: 'string', - format: 'did', - }, - }, - failed: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.moderation.scheduleAction#failedScheduling', - }, - }, - }, - }, - failedScheduling: { - type: 'object', - required: ['subject', 'error'], - properties: { - subject: { - type: 'string', - format: 'did', - }, - error: { - type: 'string', - }, - errorCode: { - type: 'string', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneReportDefs: { - lexicon: 1, - id: 'tools.ozone.report.defs', - defs: { - reasonType: { - type: 'string', - knownValues: [ - 'tools.ozone.report.defs#reasonAppeal', - 'tools.ozone.report.defs#reasonOther', - 'tools.ozone.report.defs#reasonViolenceAnimal', - 'tools.ozone.report.defs#reasonViolenceThreats', - 'tools.ozone.report.defs#reasonViolenceGraphicContent', - 'tools.ozone.report.defs#reasonViolenceGlorification', - 'tools.ozone.report.defs#reasonViolenceExtremistContent', - 'tools.ozone.report.defs#reasonViolenceTrafficking', - 'tools.ozone.report.defs#reasonViolenceOther', - 'tools.ozone.report.defs#reasonSexualAbuseContent', - 'tools.ozone.report.defs#reasonSexualNCII', - 'tools.ozone.report.defs#reasonSexualDeepfake', - 'tools.ozone.report.defs#reasonSexualAnimal', - 'tools.ozone.report.defs#reasonSexualUnlabeled', - 'tools.ozone.report.defs#reasonSexualOther', - 'tools.ozone.report.defs#reasonChildSafetyCSAM', - 'tools.ozone.report.defs#reasonChildSafetyGroom', - 'tools.ozone.report.defs#reasonChildSafetyPrivacy', - 'tools.ozone.report.defs#reasonChildSafetyHarassment', - 'tools.ozone.report.defs#reasonChildSafetyOther', - 'tools.ozone.report.defs#reasonHarassmentTroll', - 'tools.ozone.report.defs#reasonHarassmentTargeted', - 'tools.ozone.report.defs#reasonHarassmentHateSpeech', - 'tools.ozone.report.defs#reasonHarassmentDoxxing', - 'tools.ozone.report.defs#reasonHarassmentOther', - 'tools.ozone.report.defs#reasonMisleadingBot', - 'tools.ozone.report.defs#reasonMisleadingImpersonation', - 'tools.ozone.report.defs#reasonMisleadingSpam', - 'tools.ozone.report.defs#reasonMisleadingScam', - 'tools.ozone.report.defs#reasonMisleadingElections', - 'tools.ozone.report.defs#reasonMisleadingOther', - 'tools.ozone.report.defs#reasonRuleSiteSecurity', - 'tools.ozone.report.defs#reasonRuleProhibitedSales', - 'tools.ozone.report.defs#reasonRuleBanEvasion', - 'tools.ozone.report.defs#reasonRuleOther', - 'tools.ozone.report.defs#reasonSelfHarmContent', - 'tools.ozone.report.defs#reasonSelfHarmED', - 'tools.ozone.report.defs#reasonSelfHarmStunts', - 'tools.ozone.report.defs#reasonSelfHarmSubstances', - 'tools.ozone.report.defs#reasonSelfHarmOther', - ], - }, - reasonAppeal: { - type: 'token', - description: 'Appeal a previously taken moderation action', - }, - reasonOther: { - type: 'token', - description: 'An issue not included in these options', - }, - reasonViolenceAnimal: { - type: 'token', - description: 'Animal welfare violations', - }, - reasonViolenceThreats: { - type: 'token', - description: 'Threats or incitement', - }, - reasonViolenceGraphicContent: { - type: 'token', - description: 'Graphic violent content', - }, - reasonViolenceGlorification: { - type: 'token', - description: 'Glorification of violence', - }, - reasonViolenceExtremistContent: { - type: 'token', - description: - "Extremist content. These reports will be sent only be sent to the application's Moderation Authority.", - }, - reasonViolenceTrafficking: { - type: 'token', - description: 'Human trafficking', - }, - reasonViolenceOther: { - type: 'token', - description: 'Other violent content', - }, - reasonSexualAbuseContent: { - type: 'token', - description: 'Adult sexual abuse content', - }, - reasonSexualNCII: { - type: 'token', - description: 'Non-consensual intimate imagery', - }, - reasonSexualDeepfake: { - type: 'token', - description: 'Deepfake adult content', - }, - reasonSexualAnimal: { - type: 'token', - description: 'Animal sexual abuse', - }, - reasonSexualUnlabeled: { - type: 'token', - description: 'Unlabelled adult content', - }, - reasonSexualOther: { - type: 'token', - description: 'Other sexual violence content', - }, - reasonChildSafetyCSAM: { - type: 'token', - description: - "Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority.", - }, - reasonChildSafetyGroom: { - type: 'token', - description: - "Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority.", - }, - reasonChildSafetyPrivacy: { - type: 'token', - description: 'Privacy violation involving a minor', - }, - reasonChildSafetyHarassment: { - type: 'token', - description: 'Harassment or bullying of minors', - }, - reasonChildSafetyOther: { - type: 'token', - description: - "Other child safety. These reports will be sent only be sent to the application's Moderation Authority.", - }, - reasonHarassmentTroll: { - type: 'token', - description: 'Trolling', - }, - reasonHarassmentTargeted: { - type: 'token', - description: 'Targeted harassment', - }, - reasonHarassmentHateSpeech: { - type: 'token', - description: 'Hate speech', - }, - reasonHarassmentDoxxing: { - type: 'token', - description: 'Doxxing', - }, - reasonHarassmentOther: { - type: 'token', - description: 'Other harassing or hateful content', - }, - reasonMisleadingBot: { - type: 'token', - description: 'Fake account or bot', - }, - reasonMisleadingImpersonation: { - type: 'token', - description: 'Impersonation', - }, - reasonMisleadingSpam: { - type: 'token', - description: 'Spam', - }, - reasonMisleadingScam: { - type: 'token', - description: 'Scam', - }, - reasonMisleadingElections: { - type: 'token', - description: 'False information about elections', - }, - reasonMisleadingOther: { - type: 'token', - description: 'Other misleading content', - }, - reasonRuleSiteSecurity: { - type: 'token', - description: 'Hacking or system attacks', - }, - reasonRuleProhibitedSales: { - type: 'token', - description: 'Promoting or selling prohibited items or services', - }, - reasonRuleBanEvasion: { - type: 'token', - description: 'Banned user returning', - }, - reasonRuleOther: { - type: 'token', - description: 'Other', - }, - reasonSelfHarmContent: { - type: 'token', - description: 'Content promoting or depicting self-harm', - }, - reasonSelfHarmED: { - type: 'token', - description: 'Eating disorders', - }, - reasonSelfHarmStunts: { - type: 'token', - description: 'Dangerous challenges or activities', - }, - reasonSelfHarmSubstances: { - type: 'token', - description: 'Dangerous substances or drug abuse', - }, - reasonSelfHarmOther: { - type: 'token', - description: 'Other dangerous content', - }, - }, - }, - ToolsOzoneSafelinkAddRule: { - lexicon: 1, - id: 'tools.ozone.safelink.addRule', - defs: { - main: { - type: 'procedure', - description: 'Add a new URL safety rule', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['url', 'pattern', 'action', 'reason'], - properties: { - url: { - type: 'string', - description: 'The URL or domain to apply the rule to', - }, - pattern: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#patternType', - }, - action: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#actionType', - }, - reason: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#reasonType', - }, - comment: { - type: 'string', - description: 'Optional comment about the decision', - }, - createdBy: { - type: 'string', - format: 'did', - description: 'Author DID. Only respected when using admin auth', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#event', - }, - }, - errors: [ - { - name: 'InvalidUrl', - description: 'The provided URL is invalid', - }, - { - name: 'RuleAlreadyExists', - description: 'A rule for this URL/domain already exists', - }, - ], - }, - }, - }, - ToolsOzoneSafelinkDefs: { - lexicon: 1, - id: 'tools.ozone.safelink.defs', - defs: { - event: { - type: 'object', - description: 'An event for URL safety decisions', - required: [ - 'id', - 'eventType', - 'url', - 'pattern', - 'action', - 'reason', - 'createdBy', - 'createdAt', - ], - properties: { - id: { - type: 'integer', - description: 'Auto-incrementing row ID', - }, - eventType: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#eventType', - }, - url: { - type: 'string', - description: 'The URL that this rule applies to', - }, - pattern: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#patternType', - }, - action: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#actionType', - }, - reason: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#reasonType', - }, - createdBy: { - type: 'string', - format: 'did', - description: 'DID of the user who created this rule', - }, - createdAt: { - type: 'string', - format: 'datetime', - }, - comment: { - type: 'string', - description: 'Optional comment about the decision', - }, - }, - }, - eventType: { - type: 'string', - knownValues: ['addRule', 'updateRule', 'removeRule'], - }, - patternType: { - type: 'string', - knownValues: ['domain', 'url'], - }, - actionType: { - type: 'string', - knownValues: ['block', 'warn', 'whitelist'], - }, - reasonType: { - type: 'string', - knownValues: ['csam', 'spam', 'phishing', 'none'], - }, - urlRule: { - type: 'object', - description: 'Input for creating a URL safety rule', - required: [ - 'url', - 'pattern', - 'action', - 'reason', - 'createdBy', - 'createdAt', - 'updatedAt', - ], - properties: { - url: { - type: 'string', - description: 'The URL or domain to apply the rule to', - }, - pattern: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#patternType', - }, - action: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#actionType', - }, - reason: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#reasonType', - }, - comment: { - type: 'string', - description: 'Optional comment about the decision', - }, - createdBy: { - type: 'string', - format: 'did', - description: 'DID of the user added the rule.', - }, - createdAt: { - type: 'string', - format: 'datetime', - description: 'Timestamp when the rule was created', - }, - updatedAt: { - type: 'string', - format: 'datetime', - description: 'Timestamp when the rule was last updated', - }, - }, - }, - }, - }, - ToolsOzoneSafelinkQueryEvents: { - lexicon: 1, - id: 'tools.ozone.safelink.queryEvents', - defs: { - main: { - type: 'procedure', - description: 'Query URL safety audit events', - input: { - encoding: 'application/json', - schema: { - type: 'object', - properties: { - cursor: { - type: 'string', - description: 'Cursor for pagination', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - description: 'Maximum number of results to return', - }, - urls: { - type: 'array', - items: { - type: 'string', - }, - description: 'Filter by specific URLs or domains', - }, - patternType: { - type: 'string', - description: 'Filter by pattern type', - }, - sortDirection: { - type: 'string', - knownValues: ['asc', 'desc'], - default: 'desc', - description: 'Sort direction', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['events'], - properties: { - cursor: { - type: 'string', - description: - 'Next cursor for pagination. Only present if there are more results.', - }, - events: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#event', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneSafelinkQueryRules: { - lexicon: 1, - id: 'tools.ozone.safelink.queryRules', - defs: { - main: { - type: 'procedure', - description: 'Query URL safety rules', - input: { - encoding: 'application/json', - schema: { - type: 'object', - properties: { - cursor: { - type: 'string', - description: 'Cursor for pagination', - }, - limit: { - type: 'integer', - minimum: 1, - maximum: 100, - default: 50, - description: 'Maximum number of results to return', - }, - urls: { - type: 'array', - items: { - type: 'string', - }, - description: 'Filter by specific URLs or domains', - }, - patternType: { - type: 'string', - description: 'Filter by pattern type', - }, - actions: { - type: 'array', - items: { - type: 'string', - }, - description: 'Filter by action types', - }, - reason: { - type: 'string', - description: 'Filter by reason type', - }, - createdBy: { - type: 'string', - format: 'did', - description: 'Filter by rule creator', - }, - sortDirection: { - type: 'string', - knownValues: ['asc', 'desc'], - default: 'desc', - description: 'Sort direction', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['rules'], - properties: { - cursor: { - type: 'string', - description: - 'Next cursor for pagination. Only present if there are more results.', - }, - rules: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#urlRule', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneSafelinkRemoveRule: { - lexicon: 1, - id: 'tools.ozone.safelink.removeRule', - defs: { - main: { - type: 'procedure', - description: 'Remove an existing URL safety rule', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['url', 'pattern'], - properties: { - url: { - type: 'string', - description: 'The URL or domain to remove the rule for', - }, - pattern: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#patternType', - }, - comment: { - type: 'string', - description: - 'Optional comment about why the rule is being removed', - }, - createdBy: { - type: 'string', - format: 'did', - description: - 'Optional DID of the user. Only respected when using admin auth.', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#event', - }, - }, - errors: [ - { - name: 'RuleNotFound', - description: 'No active rule found for this URL/domain', - }, - ], - }, - }, - }, - ToolsOzoneSafelinkUpdateRule: { - lexicon: 1, - id: 'tools.ozone.safelink.updateRule', - defs: { - main: { - type: 'procedure', - description: 'Update an existing URL safety rule', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['url', 'pattern', 'action', 'reason'], - properties: { - url: { - type: 'string', - description: 'The URL or domain to update the rule for', - }, - pattern: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#patternType', - }, - action: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#actionType', - }, - reason: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#reasonType', - }, - comment: { - type: 'string', - description: 'Optional comment about the update', - }, - createdBy: { - type: 'string', - format: 'did', - description: - 'Optional DID to credit as the creator. Only respected for admin_token authentication.', - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'ref', - ref: 'lex:tools.ozone.safelink.defs#event', - }, - }, - errors: [ - { - name: 'RuleNotFound', - description: 'No active rule found for this URL/domain', - }, - ], - }, - }, - }, - 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', - }, - verifierDid: { - type: 'string', - format: 'did', - description: 'The did of the verifier used for verification.', - }, - }, - }, - }, - }, - 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', - 'tools.ozone.team.defs#roleVerifier', - ], - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - 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', - 'tools.ozone.team.defs#roleVerifier', - ], - }, - 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#roleVerifier', - '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', - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneSignatureDefs: { - lexicon: 1, - id: 'tools.ozone.signature.defs', - defs: { - sigDetail: { - type: 'object', - required: ['property', 'value'], - properties: { - property: { - type: 'string', - }, - value: { - type: 'string', - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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#roleVerifier', - '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.', - }, - ], - }, - }, - }, - 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: [ - 'tools.ozone.team.defs#roleAdmin', - 'tools.ozone.team.defs#roleModerator', - 'tools.ozone.team.defs#roleTriage', - 'tools.ozone.team.defs#roleVerifier', - ], - }, - }, - }, - 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.', - }, - roleVerifier: { - type: 'token', - description: 'Verifier role. Only allowed to issue verifications.', - }, - }, - }, - 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', - }, - ], - }, - }, - }, - 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: { - q: { - type: 'string', - }, - 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', - }, - }, - }, - }, - }, - }, - }, - }, - 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#roleVerifier', - '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', - }, - ], - }, - }, - }, - ToolsOzoneVerificationDefs: { - lexicon: 1, - id: 'tools.ozone.verification.defs', - defs: { - verificationView: { - type: 'object', - description: 'Verification data for the associated subject.', - required: [ - 'issuer', - 'uri', - 'subject', - 'handle', - 'displayName', - 'createdAt', - ], - properties: { - issuer: { - type: 'string', - description: 'The user who issued this verification.', - format: 'did', - }, - uri: { - type: 'string', - description: 'The AT-URI of the verification record.', - format: 'at-uri', - }, - subject: { - type: 'string', - format: 'did', - description: 'The subject of the verification.', - }, - handle: { - type: 'string', - description: - 'Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.', - format: 'handle', - }, - displayName: { - type: 'string', - description: - 'Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.', - }, - createdAt: { - type: 'string', - description: 'Timestamp when the verification was created.', - format: 'datetime', - }, - revokeReason: { - type: 'string', - description: - 'Describes the reason for revocation, also indicating that the verification is no longer valid.', - }, - revokedAt: { - type: 'string', - description: 'Timestamp when the verification was revoked.', - format: 'datetime', - }, - revokedBy: { - type: 'string', - description: 'The user who revoked this verification.', - format: 'did', - }, - subjectProfile: { - type: 'union', - refs: [], - }, - issuerProfile: { - type: 'union', - refs: [], - }, - subjectRepo: { - type: 'union', - refs: [ - 'lex:tools.ozone.moderation.defs#repoViewDetail', - 'lex:tools.ozone.moderation.defs#repoViewNotFound', - ], - }, - issuerRepo: { - type: 'union', - refs: [ - 'lex:tools.ozone.moderation.defs#repoViewDetail', - 'lex:tools.ozone.moderation.defs#repoViewNotFound', - ], - }, - }, - }, - }, - }, - ToolsOzoneVerificationGrantVerifications: { - lexicon: 1, - id: 'tools.ozone.verification.grantVerifications', - defs: { - main: { - type: 'procedure', - description: - 'Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['verifications'], - properties: { - verifications: { - type: 'array', - description: 'Array of verification requests to process', - maxLength: 100, - items: { - type: 'ref', - ref: 'lex:tools.ozone.verification.grantVerifications#verificationInput', - }, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['verifications', 'failedVerifications'], - properties: { - verifications: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.verification.defs#verificationView', - }, - }, - failedVerifications: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.verification.grantVerifications#grantError', - }, - }, - }, - }, - }, - }, - verificationInput: { - type: 'object', - required: ['subject', 'handle', 'displayName'], - properties: { - subject: { - type: 'string', - description: 'The did of the subject being verified', - format: 'did', - }, - handle: { - type: 'string', - description: - 'Handle of the subject the verification applies to at the moment of verifying.', - format: 'handle', - }, - displayName: { - type: 'string', - description: - 'Display name of the subject the verification applies to at the moment of verifying.', - }, - createdAt: { - type: 'string', - format: 'datetime', - description: - 'Timestamp for verification record. Defaults to current time when not specified.', - }, - }, - }, - grantError: { - type: 'object', - description: 'Error object for failed verifications.', - required: ['error', 'subject'], - properties: { - error: { - type: 'string', - description: 'Error message describing the reason for failure.', - }, - subject: { - type: 'string', - description: 'The did of the subject being verified', - format: 'did', - }, - }, - }, - }, - }, - ToolsOzoneVerificationListVerifications: { - lexicon: 1, - id: 'tools.ozone.verification.listVerifications', - defs: { - main: { - type: 'query', - description: 'List verifications', - parameters: { - type: 'params', - properties: { - cursor: { - type: 'string', - description: 'Pagination cursor', - }, - limit: { - type: 'integer', - description: 'Maximum number of results to return', - minimum: 1, - maximum: 100, - default: 50, - }, - createdAfter: { - type: 'string', - format: 'datetime', - description: - 'Filter to verifications created after this timestamp', - }, - createdBefore: { - type: 'string', - format: 'datetime', - description: - 'Filter to verifications created before this timestamp', - }, - issuers: { - type: 'array', - maxLength: 100, - description: 'Filter to verifications from specific issuers', - items: { - type: 'string', - format: 'did', - }, - }, - subjects: { - type: 'array', - description: 'Filter to specific verified DIDs', - maxLength: 100, - items: { - type: 'string', - format: 'did', - }, - }, - sortDirection: { - type: 'string', - description: 'Sort direction for creation date', - enum: ['asc', 'desc'], - default: 'desc', - }, - isRevoked: { - type: 'boolean', - description: - 'Filter to verifications that are revoked or not. By default, includes both.', - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['verifications'], - properties: { - cursor: { - type: 'string', - }, - verifications: { - type: 'array', - items: { - type: 'ref', - ref: 'lex:tools.ozone.verification.defs#verificationView', - }, - }, - }, - }, - }, - }, - }, - }, - ToolsOzoneVerificationRevokeVerifications: { - lexicon: 1, - id: 'tools.ozone.verification.revokeVerifications', - defs: { - main: { - type: 'procedure', - description: - 'Revoke previously granted verifications in batches of up to 100.', - input: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['uris'], - properties: { - uris: { - type: 'array', - description: 'Array of verification record uris to revoke', - maxLength: 100, - items: { - type: 'string', - description: - 'The AT-URI of the verification record to revoke.', - format: 'at-uri', - }, - }, - revokeReason: { - type: 'string', - description: - 'Reason for revoking the verification. This is optional and can be omitted if not needed.', - maxLength: 1000, - }, - }, - }, - }, - output: { - encoding: 'application/json', - schema: { - type: 'object', - required: ['revokedVerifications', 'failedRevocations'], - properties: { - revokedVerifications: { - type: 'array', - description: 'List of verification uris successfully revoked', - items: { - type: 'string', - format: 'at-uri', - }, - }, - failedRevocations: { - type: 'array', - description: - "List of verification uris that couldn't be revoked, including failure reasons", - items: { - type: 'ref', - ref: 'lex:tools.ozone.verification.revokeVerifications#revokeError', - }, - }, - }, - }, - }, - }, - revokeError: { - type: 'object', - description: 'Error object for failed revocations', - required: ['uri', 'error'], - properties: { - uri: { - type: 'string', - description: - 'The AT-URI of the verification record that failed to revoke.', - format: 'at-uri', - }, - error: { - type: 'string', - description: - 'Description of the error that occurred during revocation.', - }, - }, - }, - }, - }, -} as const satisfies 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 = { - AppBskyActorDefs: 'app.bsky.actor.defs', - AppBskyActorGetPreferences: 'app.bsky.actor.getPreferences', - AppBskyActorGetProfile: 'app.bsky.actor.getProfile', - AppBskyActorGetProfiles: 'app.bsky.actor.getProfiles', - AppBskyActorGetSuggestions: 'app.bsky.actor.getSuggestions', - AppBskyActorProfile: 'app.bsky.actor.profile', - AppBskyActorPutPreferences: 'app.bsky.actor.putPreferences', - AppBskyActorSearchActors: 'app.bsky.actor.searchActors', - AppBskyActorSearchActorsTypeahead: 'app.bsky.actor.searchActorsTypeahead', - AppBskyActorStatus: 'app.bsky.actor.status', - AppBskyAgeassuranceBegin: 'app.bsky.ageassurance.begin', - AppBskyAgeassuranceDefs: 'app.bsky.ageassurance.defs', - AppBskyAgeassuranceGetConfig: 'app.bsky.ageassurance.getConfig', - AppBskyAgeassuranceGetState: 'app.bsky.ageassurance.getState', - AppBskyBookmarkCreateBookmark: 'app.bsky.bookmark.createBookmark', - AppBskyBookmarkDefs: 'app.bsky.bookmark.defs', - AppBskyBookmarkDeleteBookmark: 'app.bsky.bookmark.deleteBookmark', - AppBskyBookmarkGetBookmarks: 'app.bsky.bookmark.getBookmarks', - AppBskyContactDefs: 'app.bsky.contact.defs', - AppBskyContactDismissMatch: 'app.bsky.contact.dismissMatch', - AppBskyContactGetMatches: 'app.bsky.contact.getMatches', - AppBskyContactGetSyncStatus: 'app.bsky.contact.getSyncStatus', - AppBskyContactImportContacts: 'app.bsky.contact.importContacts', - AppBskyContactRemoveData: 'app.bsky.contact.removeData', - AppBskyContactSendNotification: 'app.bsky.contact.sendNotification', - AppBskyContactStartPhoneVerification: - 'app.bsky.contact.startPhoneVerification', - AppBskyContactVerifyPhone: 'app.bsky.contact.verifyPhone', - AppBskyDraftCreateDraft: 'app.bsky.draft.createDraft', - AppBskyDraftDefs: 'app.bsky.draft.defs', - AppBskyDraftDeleteDraft: 'app.bsky.draft.deleteDraft', - AppBskyDraftGetDrafts: 'app.bsky.draft.getDrafts', - AppBskyDraftUpdateDraft: 'app.bsky.draft.updateDraft', - AppBskyEmbedDefs: 'app.bsky.embed.defs', - AppBskyEmbedExternal: 'app.bsky.embed.external', - AppBskyEmbedImages: 'app.bsky.embed.images', - AppBskyEmbedRecord: 'app.bsky.embed.record', - AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia', - AppBskyEmbedVideo: 'app.bsky.embed.video', - AppBskyFeedDefs: 'app.bsky.feed.defs', - AppBskyFeedDescribeFeedGenerator: 'app.bsky.feed.describeFeedGenerator', - AppBskyFeedGenerator: 'app.bsky.feed.generator', - AppBskyFeedGetActorFeeds: 'app.bsky.feed.getActorFeeds', - AppBskyFeedGetActorLikes: 'app.bsky.feed.getActorLikes', - AppBskyFeedGetAuthorFeed: 'app.bsky.feed.getAuthorFeed', - AppBskyFeedGetFeed: 'app.bsky.feed.getFeed', - AppBskyFeedGetFeedGenerator: 'app.bsky.feed.getFeedGenerator', - AppBskyFeedGetFeedGenerators: 'app.bsky.feed.getFeedGenerators', - AppBskyFeedGetFeedSkeleton: 'app.bsky.feed.getFeedSkeleton', - AppBskyFeedGetLikes: 'app.bsky.feed.getLikes', - AppBskyFeedGetListFeed: 'app.bsky.feed.getListFeed', - AppBskyFeedGetPostThread: 'app.bsky.feed.getPostThread', - AppBskyFeedGetPosts: 'app.bsky.feed.getPosts', - AppBskyFeedGetQuotes: 'app.bsky.feed.getQuotes', - AppBskyFeedGetRepostedBy: 'app.bsky.feed.getRepostedBy', - AppBskyFeedGetSuggestedFeeds: 'app.bsky.feed.getSuggestedFeeds', - AppBskyFeedGetTimeline: 'app.bsky.feed.getTimeline', - AppBskyFeedLike: 'app.bsky.feed.like', - AppBskyFeedPost: 'app.bsky.feed.post', - AppBskyFeedPostgate: 'app.bsky.feed.postgate', - AppBskyFeedRepost: 'app.bsky.feed.repost', - AppBskyFeedSearchPosts: 'app.bsky.feed.searchPosts', - AppBskyFeedSendInteractions: 'app.bsky.feed.sendInteractions', - AppBskyFeedThreadgate: 'app.bsky.feed.threadgate', - AppBskyGraphBlock: 'app.bsky.graph.block', - AppBskyGraphDefs: 'app.bsky.graph.defs', - AppBskyGraphFollow: 'app.bsky.graph.follow', - AppBskyGraphGetActorStarterPacks: 'app.bsky.graph.getActorStarterPacks', - AppBskyGraphGetBlocks: 'app.bsky.graph.getBlocks', - AppBskyGraphGetFollowers: 'app.bsky.graph.getFollowers', - AppBskyGraphGetFollows: 'app.bsky.graph.getFollows', - AppBskyGraphGetKnownFollowers: 'app.bsky.graph.getKnownFollowers', - AppBskyGraphGetList: 'app.bsky.graph.getList', - AppBskyGraphGetListBlocks: 'app.bsky.graph.getListBlocks', - AppBskyGraphGetListMutes: 'app.bsky.graph.getListMutes', - AppBskyGraphGetLists: 'app.bsky.graph.getLists', - AppBskyGraphGetListsWithMembership: 'app.bsky.graph.getListsWithMembership', - AppBskyGraphGetMutes: 'app.bsky.graph.getMutes', - AppBskyGraphGetRelationships: 'app.bsky.graph.getRelationships', - AppBskyGraphGetStarterPack: 'app.bsky.graph.getStarterPack', - AppBskyGraphGetStarterPacks: 'app.bsky.graph.getStarterPacks', - AppBskyGraphGetStarterPacksWithMembership: - 'app.bsky.graph.getStarterPacksWithMembership', - AppBskyGraphGetSuggestedFollowsByActor: - 'app.bsky.graph.getSuggestedFollowsByActor', - AppBskyGraphList: 'app.bsky.graph.list', - AppBskyGraphListblock: 'app.bsky.graph.listblock', - AppBskyGraphListitem: 'app.bsky.graph.listitem', - AppBskyGraphMuteActor: 'app.bsky.graph.muteActor', - AppBskyGraphMuteActorList: 'app.bsky.graph.muteActorList', - AppBskyGraphMuteThread: 'app.bsky.graph.muteThread', - AppBskyGraphSearchStarterPacks: 'app.bsky.graph.searchStarterPacks', - AppBskyGraphStarterpack: 'app.bsky.graph.starterpack', - AppBskyGraphUnmuteActor: 'app.bsky.graph.unmuteActor', - AppBskyGraphUnmuteActorList: 'app.bsky.graph.unmuteActorList', - AppBskyGraphUnmuteThread: 'app.bsky.graph.unmuteThread', - AppBskyGraphVerification: 'app.bsky.graph.verification', - AppBskyLabelerDefs: 'app.bsky.labeler.defs', - AppBskyLabelerGetServices: 'app.bsky.labeler.getServices', - AppBskyLabelerService: 'app.bsky.labeler.service', - AppBskyNotificationDeclaration: 'app.bsky.notification.declaration', - AppBskyNotificationDefs: 'app.bsky.notification.defs', - AppBskyNotificationGetPreferences: 'app.bsky.notification.getPreferences', - AppBskyNotificationGetUnreadCount: 'app.bsky.notification.getUnreadCount', - AppBskyNotificationListActivitySubscriptions: - 'app.bsky.notification.listActivitySubscriptions', - AppBskyNotificationListNotifications: - 'app.bsky.notification.listNotifications', - AppBskyNotificationPutActivitySubscription: - 'app.bsky.notification.putActivitySubscription', - AppBskyNotificationPutPreferences: 'app.bsky.notification.putPreferences', - AppBskyNotificationPutPreferencesV2: 'app.bsky.notification.putPreferencesV2', - AppBskyNotificationRegisterPush: 'app.bsky.notification.registerPush', - AppBskyNotificationUnregisterPush: 'app.bsky.notification.unregisterPush', - AppBskyNotificationUpdateSeen: 'app.bsky.notification.updateSeen', - AppBskyRichtextFacet: 'app.bsky.richtext.facet', - AppBskyUnspeccedDefs: 'app.bsky.unspecced.defs', - AppBskyUnspeccedGetAgeAssuranceState: - 'app.bsky.unspecced.getAgeAssuranceState', - AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig', - AppBskyUnspeccedGetOnboardingSuggestedStarterPacks: - 'app.bsky.unspecced.getOnboardingSuggestedStarterPacks', - AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton: - 'app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton', - AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton: - 'app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton', - AppBskyUnspeccedGetPopularFeedGenerators: - 'app.bsky.unspecced.getPopularFeedGenerators', - AppBskyUnspeccedGetPostThreadOtherV2: - 'app.bsky.unspecced.getPostThreadOtherV2', - AppBskyUnspeccedGetPostThreadV2: 'app.bsky.unspecced.getPostThreadV2', - AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds', - AppBskyUnspeccedGetSuggestedFeedsSkeleton: - 'app.bsky.unspecced.getSuggestedFeedsSkeleton', - AppBskyUnspeccedGetSuggestedOnboardingUsers: - 'app.bsky.unspecced.getSuggestedOnboardingUsers', - AppBskyUnspeccedGetSuggestedStarterPacks: - 'app.bsky.unspecced.getSuggestedStarterPacks', - AppBskyUnspeccedGetSuggestedStarterPacksSkeleton: - 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton', - AppBskyUnspeccedGetSuggestedUsers: 'app.bsky.unspecced.getSuggestedUsers', - AppBskyUnspeccedGetSuggestedUsersForDiscover: - 'app.bsky.unspecced.getSuggestedUsersForDiscover', - AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton: - 'app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton', - AppBskyUnspeccedGetSuggestedUsersForExplore: - 'app.bsky.unspecced.getSuggestedUsersForExplore', - AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton: - 'app.bsky.unspecced.getSuggestedUsersForExploreSkeleton', - AppBskyUnspeccedGetSuggestedUsersForSeeMore: - 'app.bsky.unspecced.getSuggestedUsersForSeeMore', - AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton: - 'app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton', - AppBskyUnspeccedGetSuggestedUsersSkeleton: - 'app.bsky.unspecced.getSuggestedUsersSkeleton', - AppBskyUnspeccedGetSuggestionsSkeleton: - 'app.bsky.unspecced.getSuggestionsSkeleton', - AppBskyUnspeccedGetTaggedSuggestions: - 'app.bsky.unspecced.getTaggedSuggestions', - AppBskyUnspeccedGetTrendingTopics: 'app.bsky.unspecced.getTrendingTopics', - AppBskyUnspeccedGetTrends: 'app.bsky.unspecced.getTrends', - AppBskyUnspeccedGetTrendsSkeleton: 'app.bsky.unspecced.getTrendsSkeleton', - AppBskyUnspeccedInitAgeAssurance: 'app.bsky.unspecced.initAgeAssurance', - AppBskyUnspeccedSearchActorsSkeleton: - 'app.bsky.unspecced.searchActorsSkeleton', - AppBskyUnspeccedSearchPostsSkeleton: 'app.bsky.unspecced.searchPostsSkeleton', - AppBskyUnspeccedSearchStarterPacksSkeleton: - 'app.bsky.unspecced.searchStarterPacksSkeleton', - AppBskyVideoDefs: 'app.bsky.video.defs', - AppBskyVideoGetJobStatus: 'app.bsky.video.getJobStatus', - AppBskyVideoGetUploadLimits: 'app.bsky.video.getUploadLimits', - AppBskyVideoUploadVideo: 'app.bsky.video.uploadVideo', - ChatBskyActorDeclaration: 'chat.bsky.actor.declaration', - ChatBskyActorDefs: 'chat.bsky.actor.defs', - ChatBskyActorDeleteAccount: 'chat.bsky.actor.deleteAccount', - ChatBskyActorExportAccountData: 'chat.bsky.actor.exportAccountData', - ChatBskyConvoAcceptConvo: 'chat.bsky.convo.acceptConvo', - ChatBskyConvoAddReaction: 'chat.bsky.convo.addReaction', - ChatBskyConvoDefs: 'chat.bsky.convo.defs', - ChatBskyConvoDeleteMessageForSelf: 'chat.bsky.convo.deleteMessageForSelf', - ChatBskyConvoGetConvo: 'chat.bsky.convo.getConvo', - ChatBskyConvoGetConvoAvailability: 'chat.bsky.convo.getConvoAvailability', - ChatBskyConvoGetConvoForMembers: 'chat.bsky.convo.getConvoForMembers', - ChatBskyConvoGetConvoMembers: 'chat.bsky.convo.getConvoMembers', - ChatBskyConvoGetLog: 'chat.bsky.convo.getLog', - ChatBskyConvoGetMessages: 'chat.bsky.convo.getMessages', - ChatBskyConvoLeaveConvo: 'chat.bsky.convo.leaveConvo', - ChatBskyConvoListConvoRequests: 'chat.bsky.convo.listConvoRequests', - ChatBskyConvoListConvos: 'chat.bsky.convo.listConvos', - ChatBskyConvoLockConvo: 'chat.bsky.convo.lockConvo', - ChatBskyConvoMuteConvo: 'chat.bsky.convo.muteConvo', - ChatBskyConvoRemoveReaction: 'chat.bsky.convo.removeReaction', - ChatBskyConvoSendMessage: 'chat.bsky.convo.sendMessage', - ChatBskyConvoSendMessageBatch: 'chat.bsky.convo.sendMessageBatch', - ChatBskyConvoUnlockConvo: 'chat.bsky.convo.unlockConvo', - ChatBskyConvoUnmuteConvo: 'chat.bsky.convo.unmuteConvo', - ChatBskyConvoUpdateAllRead: 'chat.bsky.convo.updateAllRead', - ChatBskyConvoUpdateRead: 'chat.bsky.convo.updateRead', - ChatBskyGroupAddMembers: 'chat.bsky.group.addMembers', - ChatBskyGroupApproveJoinRequest: 'chat.bsky.group.approveJoinRequest', - ChatBskyGroupCreateGroup: 'chat.bsky.group.createGroup', - ChatBskyGroupCreateJoinLink: 'chat.bsky.group.createJoinLink', - ChatBskyGroupDefs: 'chat.bsky.group.defs', - ChatBskyGroupDisableJoinLink: 'chat.bsky.group.disableJoinLink', - ChatBskyGroupEditGroup: 'chat.bsky.group.editGroup', - ChatBskyGroupEditJoinLink: 'chat.bsky.group.editJoinLink', - ChatBskyGroupEnableJoinLink: 'chat.bsky.group.enableJoinLink', - ChatBskyGroupGetGroupPublicInfo: 'chat.bsky.group.getGroupPublicInfo', - ChatBskyGroupListJoinRequests: 'chat.bsky.group.listJoinRequests', - ChatBskyGroupRejectJoinRequest: 'chat.bsky.group.rejectJoinRequest', - ChatBskyGroupRemoveMembers: 'chat.bsky.group.removeMembers', - ChatBskyGroupRequestJoin: 'chat.bsky.group.requestJoin', - ChatBskyModerationGetActorMetadata: 'chat.bsky.moderation.getActorMetadata', - ChatBskyModerationGetMessageContext: 'chat.bsky.moderation.getMessageContext', - ChatBskyModerationSubscribeModEvents: - 'chat.bsky.moderation.subscribeModEvents', - ChatBskyModerationUpdateActorAccess: 'chat.bsky.moderation.updateActorAccess', - ComAtprotoAdminDefs: 'com.atproto.admin.defs', - ComAtprotoAdminDeleteAccount: 'com.atproto.admin.deleteAccount', - ComAtprotoAdminDisableAccountInvites: - 'com.atproto.admin.disableAccountInvites', - ComAtprotoAdminDisableInviteCodes: 'com.atproto.admin.disableInviteCodes', - ComAtprotoAdminEnableAccountInvites: 'com.atproto.admin.enableAccountInvites', - ComAtprotoAdminGetAccountInfo: 'com.atproto.admin.getAccountInfo', - ComAtprotoAdminGetAccountInfos: 'com.atproto.admin.getAccountInfos', - ComAtprotoAdminGetInviteCodes: 'com.atproto.admin.getInviteCodes', - ComAtprotoAdminGetSubjectStatus: 'com.atproto.admin.getSubjectStatus', - ComAtprotoAdminSearchAccounts: 'com.atproto.admin.searchAccounts', - ComAtprotoAdminSendEmail: 'com.atproto.admin.sendEmail', - ComAtprotoAdminUpdateAccountEmail: 'com.atproto.admin.updateAccountEmail', - ComAtprotoAdminUpdateAccountHandle: 'com.atproto.admin.updateAccountHandle', - ComAtprotoAdminUpdateAccountPassword: - 'com.atproto.admin.updateAccountPassword', - ComAtprotoAdminUpdateAccountSigningKey: - 'com.atproto.admin.updateAccountSigningKey', - ComAtprotoAdminUpdateSubjectStatus: 'com.atproto.admin.updateSubjectStatus', - ComAtprotoIdentityDefs: 'com.atproto.identity.defs', - ComAtprotoIdentityGetRecommendedDidCredentials: - 'com.atproto.identity.getRecommendedDidCredentials', - ComAtprotoIdentityRefreshIdentity: 'com.atproto.identity.refreshIdentity', - ComAtprotoIdentityRequestPlcOperationSignature: - 'com.atproto.identity.requestPlcOperationSignature', - ComAtprotoIdentityResolveDid: 'com.atproto.identity.resolveDid', - ComAtprotoIdentityResolveHandle: 'com.atproto.identity.resolveHandle', - ComAtprotoIdentityResolveIdentity: 'com.atproto.identity.resolveIdentity', - ComAtprotoIdentitySignPlcOperation: 'com.atproto.identity.signPlcOperation', - ComAtprotoIdentitySubmitPlcOperation: - 'com.atproto.identity.submitPlcOperation', - ComAtprotoIdentityUpdateHandle: 'com.atproto.identity.updateHandle', - ComAtprotoLabelDefs: 'com.atproto.label.defs', - ComAtprotoLabelQueryLabels: 'com.atproto.label.queryLabels', - ComAtprotoLabelSubscribeLabels: 'com.atproto.label.subscribeLabels', - ComAtprotoLexiconResolveLexicon: 'com.atproto.lexicon.resolveLexicon', - ComAtprotoLexiconSchema: 'com.atproto.lexicon.schema', - ComAtprotoModerationCreateReport: 'com.atproto.moderation.createReport', - ComAtprotoModerationDefs: 'com.atproto.moderation.defs', - ComAtprotoRepoApplyWrites: 'com.atproto.repo.applyWrites', - ComAtprotoRepoCreateRecord: 'com.atproto.repo.createRecord', - ComAtprotoRepoDefs: 'com.atproto.repo.defs', - ComAtprotoRepoDeleteRecord: 'com.atproto.repo.deleteRecord', - ComAtprotoRepoDescribeRepo: 'com.atproto.repo.describeRepo', - ComAtprotoRepoGetRecord: 'com.atproto.repo.getRecord', - ComAtprotoRepoImportRepo: 'com.atproto.repo.importRepo', - ComAtprotoRepoListMissingBlobs: 'com.atproto.repo.listMissingBlobs', - ComAtprotoRepoListRecords: 'com.atproto.repo.listRecords', - ComAtprotoRepoPutRecord: 'com.atproto.repo.putRecord', - ComAtprotoRepoStrongRef: 'com.atproto.repo.strongRef', - ComAtprotoRepoUploadBlob: 'com.atproto.repo.uploadBlob', - ComAtprotoServerActivateAccount: 'com.atproto.server.activateAccount', - ComAtprotoServerCheckAccountStatus: 'com.atproto.server.checkAccountStatus', - ComAtprotoServerConfirmEmail: 'com.atproto.server.confirmEmail', - ComAtprotoServerCreateAccount: 'com.atproto.server.createAccount', - ComAtprotoServerCreateAppPassword: 'com.atproto.server.createAppPassword', - ComAtprotoServerCreateInviteCode: 'com.atproto.server.createInviteCode', - ComAtprotoServerCreateInviteCodes: 'com.atproto.server.createInviteCodes', - ComAtprotoServerCreateSession: 'com.atproto.server.createSession', - ComAtprotoServerDeactivateAccount: 'com.atproto.server.deactivateAccount', - ComAtprotoServerDefs: 'com.atproto.server.defs', - ComAtprotoServerDeleteAccount: 'com.atproto.server.deleteAccount', - ComAtprotoServerDeleteSession: 'com.atproto.server.deleteSession', - ComAtprotoServerDescribeServer: 'com.atproto.server.describeServer', - ComAtprotoServerGetAccountInviteCodes: - 'com.atproto.server.getAccountInviteCodes', - ComAtprotoServerGetServiceAuth: 'com.atproto.server.getServiceAuth', - ComAtprotoServerGetSession: 'com.atproto.server.getSession', - ComAtprotoServerListAppPasswords: 'com.atproto.server.listAppPasswords', - ComAtprotoServerRefreshSession: 'com.atproto.server.refreshSession', - ComAtprotoServerRequestAccountDelete: - 'com.atproto.server.requestAccountDelete', - ComAtprotoServerRequestEmailConfirmation: - 'com.atproto.server.requestEmailConfirmation', - ComAtprotoServerRequestEmailUpdate: 'com.atproto.server.requestEmailUpdate', - ComAtprotoServerRequestPasswordReset: - 'com.atproto.server.requestPasswordReset', - ComAtprotoServerReserveSigningKey: 'com.atproto.server.reserveSigningKey', - ComAtprotoServerResetPassword: 'com.atproto.server.resetPassword', - ComAtprotoServerRevokeAppPassword: 'com.atproto.server.revokeAppPassword', - ComAtprotoServerUpdateEmail: 'com.atproto.server.updateEmail', - ComAtprotoSyncDefs: 'com.atproto.sync.defs', - ComAtprotoSyncGetBlob: 'com.atproto.sync.getBlob', - ComAtprotoSyncGetBlocks: 'com.atproto.sync.getBlocks', - ComAtprotoSyncGetCheckout: 'com.atproto.sync.getCheckout', - ComAtprotoSyncGetHead: 'com.atproto.sync.getHead', - ComAtprotoSyncGetHostStatus: 'com.atproto.sync.getHostStatus', - ComAtprotoSyncGetLatestCommit: 'com.atproto.sync.getLatestCommit', - ComAtprotoSyncGetRecord: 'com.atproto.sync.getRecord', - ComAtprotoSyncGetRepo: 'com.atproto.sync.getRepo', - ComAtprotoSyncGetRepoStatus: 'com.atproto.sync.getRepoStatus', - ComAtprotoSyncListBlobs: 'com.atproto.sync.listBlobs', - ComAtprotoSyncListHosts: 'com.atproto.sync.listHosts', - ComAtprotoSyncListRepos: 'com.atproto.sync.listRepos', - ComAtprotoSyncListReposByCollection: 'com.atproto.sync.listReposByCollection', - ComAtprotoSyncNotifyOfUpdate: 'com.atproto.sync.notifyOfUpdate', - ComAtprotoSyncRequestCrawl: 'com.atproto.sync.requestCrawl', - ComAtprotoSyncSubscribeRepos: 'com.atproto.sync.subscribeRepos', - ComAtprotoTempAddReservedHandle: 'com.atproto.temp.addReservedHandle', - ComAtprotoTempCheckHandleAvailability: - 'com.atproto.temp.checkHandleAvailability', - ComAtprotoTempCheckSignupQueue: 'com.atproto.temp.checkSignupQueue', - ComAtprotoTempDereferenceScope: 'com.atproto.temp.dereferenceScope', - ComAtprotoTempFetchLabels: 'com.atproto.temp.fetchLabels', - ComAtprotoTempRequestPhoneVerification: - 'com.atproto.temp.requestPhoneVerification', - ComAtprotoTempRevokeAccountCredentials: - 'com.atproto.temp.revokeAccountCredentials', - ComGermnetworkDeclaration: 'com.germnetwork.declaration', - ToolsOzoneCommunicationCreateTemplate: - 'tools.ozone.communication.createTemplate', - ToolsOzoneCommunicationDefs: 'tools.ozone.communication.defs', - ToolsOzoneCommunicationDeleteTemplate: - 'tools.ozone.communication.deleteTemplate', - ToolsOzoneCommunicationListTemplates: - 'tools.ozone.communication.listTemplates', - ToolsOzoneCommunicationUpdateTemplate: - 'tools.ozone.communication.updateTemplate', - ToolsOzoneHostingGetAccountHistory: 'tools.ozone.hosting.getAccountHistory', - ToolsOzoneModerationCancelScheduledActions: - 'tools.ozone.moderation.cancelScheduledActions', - ToolsOzoneModerationDefs: 'tools.ozone.moderation.defs', - ToolsOzoneModerationEmitEvent: 'tools.ozone.moderation.emitEvent', - ToolsOzoneModerationGetAccountTimeline: - 'tools.ozone.moderation.getAccountTimeline', - ToolsOzoneModerationGetEvent: 'tools.ozone.moderation.getEvent', - ToolsOzoneModerationGetRecord: 'tools.ozone.moderation.getRecord', - ToolsOzoneModerationGetRecords: 'tools.ozone.moderation.getRecords', - ToolsOzoneModerationGetRepo: 'tools.ozone.moderation.getRepo', - ToolsOzoneModerationGetReporterStats: - 'tools.ozone.moderation.getReporterStats', - ToolsOzoneModerationGetRepos: 'tools.ozone.moderation.getRepos', - ToolsOzoneModerationGetSubjects: 'tools.ozone.moderation.getSubjects', - ToolsOzoneModerationListScheduledActions: - 'tools.ozone.moderation.listScheduledActions', - ToolsOzoneModerationQueryEvents: 'tools.ozone.moderation.queryEvents', - ToolsOzoneModerationQueryStatuses: 'tools.ozone.moderation.queryStatuses', - ToolsOzoneModerationScheduleAction: 'tools.ozone.moderation.scheduleAction', - ToolsOzoneModerationSearchRepos: 'tools.ozone.moderation.searchRepos', - ToolsOzoneReportDefs: 'tools.ozone.report.defs', - ToolsOzoneSafelinkAddRule: 'tools.ozone.safelink.addRule', - ToolsOzoneSafelinkDefs: 'tools.ozone.safelink.defs', - ToolsOzoneSafelinkQueryEvents: 'tools.ozone.safelink.queryEvents', - ToolsOzoneSafelinkQueryRules: 'tools.ozone.safelink.queryRules', - ToolsOzoneSafelinkRemoveRule: 'tools.ozone.safelink.removeRule', - ToolsOzoneSafelinkUpdateRule: 'tools.ozone.safelink.updateRule', - ToolsOzoneServerGetConfig: 'tools.ozone.server.getConfig', - ToolsOzoneSetAddValues: 'tools.ozone.set.addValues', - ToolsOzoneSetDefs: 'tools.ozone.set.defs', - ToolsOzoneSetDeleteSet: 'tools.ozone.set.deleteSet', - ToolsOzoneSetDeleteValues: 'tools.ozone.set.deleteValues', - ToolsOzoneSetGetValues: 'tools.ozone.set.getValues', - ToolsOzoneSetQuerySets: 'tools.ozone.set.querySets', - ToolsOzoneSetUpsertSet: 'tools.ozone.set.upsertSet', - ToolsOzoneSettingDefs: 'tools.ozone.setting.defs', - ToolsOzoneSettingListOptions: 'tools.ozone.setting.listOptions', - ToolsOzoneSettingRemoveOptions: 'tools.ozone.setting.removeOptions', - ToolsOzoneSettingUpsertOption: 'tools.ozone.setting.upsertOption', - ToolsOzoneSignatureDefs: 'tools.ozone.signature.defs', - ToolsOzoneSignatureFindCorrelation: 'tools.ozone.signature.findCorrelation', - ToolsOzoneSignatureFindRelatedAccounts: - 'tools.ozone.signature.findRelatedAccounts', - ToolsOzoneSignatureSearchAccounts: 'tools.ozone.signature.searchAccounts', - ToolsOzoneTeamAddMember: 'tools.ozone.team.addMember', - ToolsOzoneTeamDefs: 'tools.ozone.team.defs', - ToolsOzoneTeamDeleteMember: 'tools.ozone.team.deleteMember', - ToolsOzoneTeamListMembers: 'tools.ozone.team.listMembers', - ToolsOzoneTeamUpdateMember: 'tools.ozone.team.updateMember', - ToolsOzoneVerificationDefs: 'tools.ozone.verification.defs', - ToolsOzoneVerificationGrantVerifications: - 'tools.ozone.verification.grantVerifications', - ToolsOzoneVerificationListVerifications: - 'tools.ozone.verification.listVerifications', - ToolsOzoneVerificationRevokeVerifications: - 'tools.ozone.verification.revokeVerifications', -} as const diff --git a/packages/api/src/client/types/app/bsky/actor/defs.ts b/packages/api/src/client/types/app/bsky/actor/defs.ts deleted file mode 100644 index 31096ad6e36..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/defs.ts +++ /dev/null @@ -1,716 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as AppBskyGraphDefs from '../graph/defs.js' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' -import type * as AppBskyNotificationDefs from '../notification/defs.js' -import type * as AppBskyFeedThreadgate from '../feed/threadgate.js' -import type * as AppBskyFeedPostgate from '../feed/postgate.js' -import type * as AppBskyEmbedExternal from '../embed/external.js' - -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 - pronouns?: string - avatar?: string - associated?: ProfileAssociated - viewer?: ViewerState - labels?: ComAtprotoLabelDefs.Label[] - createdAt?: string - verification?: VerificationState - status?: StatusView - /** Debug information for internal development */ - debug?: { [_ in string]: unknown } -} - -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 - pronouns?: string - description?: string - avatar?: string - associated?: ProfileAssociated - indexedAt?: string - createdAt?: string - viewer?: ViewerState - labels?: ComAtprotoLabelDefs.Label[] - verification?: VerificationState - status?: StatusView - /** Debug information for internal development */ - debug?: { [_ in string]: unknown } -} - -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 - pronouns?: string - website?: 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 - verification?: VerificationState - status?: StatusView - /** Debug information for internal development */ - debug?: { [_ in string]: unknown } -} - -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 - activitySubscription?: ProfileAssociatedActivitySubscription - germ?: ProfileAssociatedGerm -} - -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 & {}) - allowGroupInvites?: 'all' | 'none' | 'following' | (string & {}) -} - -const hashProfileAssociatedChat = 'profileAssociatedChat' - -export function isProfileAssociatedChat(v: V) { - return is$typed(v, id, hashProfileAssociatedChat) -} - -export function validateProfileAssociatedChat(v: V) { - return validate(v, id, hashProfileAssociatedChat) -} - -export interface ProfileAssociatedGerm { - $type?: 'app.bsky.actor.defs#profileAssociatedGerm' - messageMeUrl: string - showButtonTo: 'usersIFollow' | 'everyone' | (string & {}) -} - -const hashProfileAssociatedGerm = 'profileAssociatedGerm' - -export function isProfileAssociatedGerm(v: V) { - return is$typed(v, id, hashProfileAssociatedGerm) -} - -export function validateProfileAssociatedGerm(v: V) { - return validate(v, id, hashProfileAssociatedGerm) -} - -export interface ProfileAssociatedActivitySubscription { - $type?: 'app.bsky.actor.defs#profileAssociatedActivitySubscription' - allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {}) -} - -const hashProfileAssociatedActivitySubscription = - 'profileAssociatedActivitySubscription' - -export function isProfileAssociatedActivitySubscription(v: V) { - return is$typed(v, id, hashProfileAssociatedActivitySubscription) -} - -export function validateProfileAssociatedActivitySubscription(v: V) { - return validate( - v, - id, - hashProfileAssociatedActivitySubscription, - ) -} - -/** 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 - activitySubscription?: AppBskyNotificationDefs.ActivitySubscription -} - -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) -} - -/** Represents the verification information about the user this object is attached to. */ -export interface VerificationState { - $type?: 'app.bsky.actor.defs#verificationState' - /** All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. */ - verifications: VerificationView[] - /** The user's status as a verified account. */ - verifiedStatus: 'valid' | 'invalid' | 'none' | (string & {}) - /** The user's status as a trusted verifier. */ - trustedVerifierStatus: 'valid' | 'invalid' | 'none' | (string & {}) -} - -const hashVerificationState = 'verificationState' - -export function isVerificationState(v: V) { - return is$typed(v, id, hashVerificationState) -} - -export function validateVerificationState(v: V) { - return validate(v, id, hashVerificationState) -} - -/** An individual verification for an associated subject. */ -export interface VerificationView { - $type?: 'app.bsky.actor.defs#verificationView' - /** The user who issued this verification. */ - issuer: string - /** The AT-URI of the verification record. */ - uri: string - /** True if the verification passes validation, otherwise false. */ - isValid: boolean - /** Timestamp when the verification was created. */ - createdAt: string -} - -const hashVerificationView = 'verificationView' - -export function isVerificationView(v: V) { - return is$typed(v, id, hashVerificationView) -} - -export function validateVerificationView(v: V) { - return validate(v, id, hashVerificationView) -} - -export type Preferences = ( - | $Typed - | $Typed - | $Typed - | $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 & {}) -} - -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 & {}) - 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) -} - -/** Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration. */ -export interface DeclaredAgePref { - $type?: 'app.bsky.actor.defs#declaredAgePref' - /** Indicates if the user has declared that they are over 13 years of age. */ - isOverAge13?: boolean - /** Indicates if the user has declared that they are over 16 years of age. */ - isOverAge16?: boolean - /** Indicates if the user has declared that they are over 18 years of age. */ - isOverAge18?: boolean -} - -const hashDeclaredAgePref = 'declaredAgePref' - -export function isDeclaredAgePref(v: V) { - return is$typed(v, id, hashDeclaredAgePref) -} - -export function validateDeclaredAgePref(v: V) { - return validate(v, id, hashDeclaredAgePref) -} - -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 & {}) -} - -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 & {}) - -/** 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 & {}) - /** 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) -} - -/** Preferences for how verified accounts appear in the app. */ -export interface VerificationPrefs { - $type?: 'app.bsky.actor.defs#verificationPrefs' - /** Hide the blue check badges for verified accounts and trusted verifiers. */ - hideBadges: boolean -} - -const hashVerificationPrefs = 'verificationPrefs' - -export function isVerificationPrefs(v: V) { - return is$typed(v, id, hashVerificationPrefs) -} - -export function validateVerificationPrefs(v: V) { - return validate(v, id, hashVerificationPrefs) -} - -/** Preferences for live events. */ -export interface LiveEventPreferences { - $type?: 'app.bsky.actor.defs#liveEventPreferences' - /** A list of feed IDs that the user has hidden from live events. */ - hiddenFeedIds?: string[] - /** Whether to hide all feeds from live events. */ - hideAllFeeds: boolean -} - -const hashLiveEventPreferences = 'liveEventPreferences' - -export function isLiveEventPreferences(v: V) { - return is$typed(v, id, hashLiveEventPreferences) -} - -export function validateLiveEventPreferences(v: V) { - return validate(v, id, hashLiveEventPreferences) -} - -/** 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, - ) -} - -export interface StatusView { - $type?: 'app.bsky.actor.defs#statusView' - uri?: string - cid?: string - /** The status for the account. */ - status: 'app.bsky.actor.status#live' | (string & {}) - record: { [_ in string]: unknown } - embed?: $Typed | { $type: string } - labels?: ComAtprotoLabelDefs.Label[] - /** The date when this status will expire. The application might choose to no longer return the status after expiration. */ - expiresAt?: string - /** True if the status is not expired, false if it is expired. Only present if expiration was set. */ - isActive?: boolean - /** True if the user's go-live access has been disabled by a moderator, false otherwise. */ - isDisabled?: boolean -} - -const hashStatusView = 'statusView' - -export function isStatusView(v: V) { - return is$typed(v, id, hashStatusView) -} - -export function validateStatusView(v: V) { - return validate(v, id, hashStatusView) -} diff --git a/packages/api/src/client/types/app/bsky/actor/getPreferences.ts b/packages/api/src/client/types/app/bsky/actor/getPreferences.ts deleted file mode 100644 index ca0127b208c..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/getPreferences.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.getPreferences' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - preferences: AppBskyActorDefs.Preferences -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/getProfile.ts b/packages/api/src/client/types/app/bsky/actor/getProfile.ts deleted file mode 100644 index 7c165ed9b5d..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/getProfile.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.getProfile' - -export type QueryParams = { - /** Handle or DID of account to fetch profile of. */ - actor: string -} -export type InputSchema = undefined -export type OutputSchema = AppBskyActorDefs.ProfileViewDetailed - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/getProfiles.ts b/packages/api/src/client/types/app/bsky/actor/getProfiles.ts deleted file mode 100644 index 93f5525732c..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/getProfiles.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.getProfiles' - -export type QueryParams = { - actors: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - profiles: AppBskyActorDefs.ProfileViewDetailed[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts deleted file mode 100644 index 4f286106fec..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.getSuggestions' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - actors: AppBskyActorDefs.ProfileView[] - /** DEPRECATED: use recIdStr instead. */ - recId?: number - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/profile.ts b/packages/api/src/client/types/app/bsky/actor/profile.ts deleted file mode 100644 index 9adf22c7663..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/profile.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.profile' - -export interface Main { - $type: 'app.bsky.actor.profile' - displayName?: string - /** Free-form profile description text. */ - description?: string - /** Free-form pronouns text. */ - pronouns?: string - website?: 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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/actor/putPreferences.ts b/packages/api/src/client/types/app/bsky/actor/putPreferences.ts deleted file mode 100644 index 36ca14119ff..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/putPreferences.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.putPreferences' - -export type QueryParams = {} - -export interface InputSchema { - preferences: AppBskyActorDefs.Preferences -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/searchActors.ts b/packages/api/src/client/types/app/bsky/actor/searchActors.ts deleted file mode 100644 index 848ba3a3691..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/searchActors.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.searchActors' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts b/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts deleted file mode 100644 index 51ef5f7dd5c..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.searchActorsTypeahead' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/actor/status.ts b/packages/api/src/client/types/app/bsky/actor/status.ts deleted file mode 100644 index c6b8c4ec17d..00000000000 --- a/packages/api/src/client/types/app/bsky/actor/status.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyEmbedExternal from '../embed/external.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.actor.status' - -export interface Main { - $type: 'app.bsky.actor.status' - /** The status for the account. */ - status: 'app.bsky.actor.status#live' | (string & {}) - embed?: $Typed | { $type: string } - /** The duration of the status in minutes. Applications can choose to impose minimum and maximum limits. */ - durationMinutes?: number - createdAt: string - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} - -/** Advertises an account as currently offering live content. */ -export const LIVE = `${id}#live` diff --git a/packages/api/src/client/types/app/bsky/ageassurance/begin.ts b/packages/api/src/client/types/app/bsky/ageassurance/begin.ts deleted file mode 100644 index 8d47aa0f276..00000000000 --- a/packages/api/src/client/types/app/bsky/ageassurance/begin.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyAgeassuranceDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.ageassurance.begin' - -export type QueryParams = {} - -export interface InputSchema { - /** The user's email address to receive Age Assurance instructions. */ - email: string - /** The user's preferred language for communication during the Age Assurance process. */ - language: string - /** An ISO 3166-1 alpha-2 code of the user's location. */ - countryCode: string - /** An optional ISO 3166-2 code of the user's region or state within the country. */ - regionCode?: string -} - -export type OutputSchema = AppBskyAgeassuranceDefs.State - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidEmailError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidTooLongError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidInitiationError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class RegionNotSupportedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidEmail') return new InvalidEmailError(e) - if (e.error === 'DidTooLong') return new DidTooLongError(e) - if (e.error === 'InvalidInitiation') return new InvalidInitiationError(e) - if (e.error === 'RegionNotSupported') return new RegionNotSupportedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/ageassurance/defs.ts b/packages/api/src/client/types/app/bsky/ageassurance/defs.ts deleted file mode 100644 index 13a8fb73cb7..00000000000 --- a/packages/api/src/client/types/app/bsky/ageassurance/defs.ts +++ /dev/null @@ -1,303 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.ageassurance.defs' - -/** The access level granted based on Age Assurance data we've processed. */ -export type Access = 'unknown' | 'none' | 'safe' | 'full' | (string & {}) -/** The status of the Age Assurance process. */ -export type Status = - | 'unknown' - | 'pending' - | 'assured' - | 'blocked' - | (string & {}) - -/** The user's computed Age Assurance state. */ -export interface State { - $type?: 'app.bsky.ageassurance.defs#state' - /** The timestamp when this state was last updated. */ - lastInitiatedAt?: string - status: Status - access: Access -} - -const hashState = 'state' - -export function isState(v: V) { - return is$typed(v, id, hashState) -} - -export function validateState(v: V) { - return validate(v, id, hashState) -} - -/** Additional metadata needed to compute Age Assurance state client-side. */ -export interface StateMetadata { - $type?: 'app.bsky.ageassurance.defs#stateMetadata' - /** The account creation timestamp. */ - accountCreatedAt?: string -} - -const hashStateMetadata = 'stateMetadata' - -export function isStateMetadata(v: V) { - return is$typed(v, id, hashStateMetadata) -} - -export function validateStateMetadata(v: V) { - return validate(v, id, hashStateMetadata) -} - -export interface Config { - $type?: 'app.bsky.ageassurance.defs#config' - /** The per-region Age Assurance configuration. */ - regions: ConfigRegion[] -} - -const hashConfig = 'config' - -export function isConfig(v: V) { - return is$typed(v, id, hashConfig) -} - -export function validateConfig(v: V) { - return validate(v, id, hashConfig) -} - -/** The Age Assurance configuration for a specific region. */ -export interface ConfigRegion { - $type?: 'app.bsky.ageassurance.defs#configRegion' - /** The ISO 3166-1 alpha-2 country code this configuration applies to. */ - countryCode: string - /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */ - regionCode?: string - /** The minimum age (as a whole integer) required to use Bluesky in this region. */ - minAccessAge: number - /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */ - rules: ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[] -} - -const hashConfigRegion = 'configRegion' - -export function isConfigRegion(v: V) { - return is$typed(v, id, hashConfigRegion) -} - -export function validateConfigRegion(v: V) { - return validate(v, id, hashConfigRegion) -} - -/** Age Assurance rule that applies by default. */ -export interface ConfigRegionRuleDefault { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleDefault' - access: Access -} - -const hashConfigRegionRuleDefault = 'configRegionRuleDefault' - -export function isConfigRegionRuleDefault(v: V) { - return is$typed(v, id, hashConfigRegionRuleDefault) -} - -export function validateConfigRegionRuleDefault(v: V) { - return validate( - v, - id, - hashConfigRegionRuleDefault, - ) -} - -/** Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age. */ -export interface ConfigRegionRuleIfDeclaredOverAge { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge' - /** The age threshold as a whole integer. */ - age: number - access: Access -} - -const hashConfigRegionRuleIfDeclaredOverAge = - 'configRegionRuleIfDeclaredOverAge' - -export function isConfigRegionRuleIfDeclaredOverAge(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfDeclaredOverAge) -} - -export function validateConfigRegionRuleIfDeclaredOverAge(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfDeclaredOverAge, - ) -} - -/** Age Assurance rule that applies if the user has declared themselves under a certain age. */ -export interface ConfigRegionRuleIfDeclaredUnderAge { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge' - /** The age threshold as a whole integer. */ - age: number - access: Access -} - -const hashConfigRegionRuleIfDeclaredUnderAge = - 'configRegionRuleIfDeclaredUnderAge' - -export function isConfigRegionRuleIfDeclaredUnderAge(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfDeclaredUnderAge) -} - -export function validateConfigRegionRuleIfDeclaredUnderAge(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfDeclaredUnderAge, - ) -} - -/** Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age. */ -export interface ConfigRegionRuleIfAssuredOverAge { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge' - /** The age threshold as a whole integer. */ - age: number - access: Access -} - -const hashConfigRegionRuleIfAssuredOverAge = 'configRegionRuleIfAssuredOverAge' - -export function isConfigRegionRuleIfAssuredOverAge(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfAssuredOverAge) -} - -export function validateConfigRegionRuleIfAssuredOverAge(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfAssuredOverAge, - ) -} - -/** Age Assurance rule that applies if the user has been assured to be under a certain age. */ -export interface ConfigRegionRuleIfAssuredUnderAge { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge' - /** The age threshold as a whole integer. */ - age: number - access: Access -} - -const hashConfigRegionRuleIfAssuredUnderAge = - 'configRegionRuleIfAssuredUnderAge' - -export function isConfigRegionRuleIfAssuredUnderAge(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfAssuredUnderAge) -} - -export function validateConfigRegionRuleIfAssuredUnderAge(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfAssuredUnderAge, - ) -} - -/** Age Assurance rule that applies if the account is equal-to or newer than a certain date. */ -export interface ConfigRegionRuleIfAccountNewerThan { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan' - /** The date threshold as a datetime string. */ - date: string - access: Access -} - -const hashConfigRegionRuleIfAccountNewerThan = - 'configRegionRuleIfAccountNewerThan' - -export function isConfigRegionRuleIfAccountNewerThan(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfAccountNewerThan) -} - -export function validateConfigRegionRuleIfAccountNewerThan(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfAccountNewerThan, - ) -} - -/** Age Assurance rule that applies if the account is older than a certain date. */ -export interface ConfigRegionRuleIfAccountOlderThan { - $type?: 'app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan' - /** The date threshold as a datetime string. */ - date: string - access: Access -} - -const hashConfigRegionRuleIfAccountOlderThan = - 'configRegionRuleIfAccountOlderThan' - -export function isConfigRegionRuleIfAccountOlderThan(v: V) { - return is$typed(v, id, hashConfigRegionRuleIfAccountOlderThan) -} - -export function validateConfigRegionRuleIfAccountOlderThan(v: V) { - return validate( - v, - id, - hashConfigRegionRuleIfAccountOlderThan, - ) -} - -/** Object used to store Age Assurance data in stash. */ -export interface Event { - $type?: 'app.bsky.ageassurance.defs#event' - /** The date and time of this write operation. */ - createdAt: string - /** The unique identifier for this instance of the Age Assurance flow, in UUID format. */ - attemptId: string - /** The status of the Age Assurance process. */ - status: 'unknown' | 'pending' | 'assured' | 'blocked' | (string & {}) - /** The access level granted based on Age Assurance data we've processed. */ - access: 'unknown' | 'none' | 'safe' | 'full' | (string & {}) - /** The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. */ - countryCode: string - /** The ISO 3166-2 region code provided when beginning the Age Assurance flow. */ - regionCode?: string - /** The email used for Age Assurance. */ - email?: string - /** The IP address used when initiating the Age Assurance flow. */ - initIp?: string - /** The user agent used when initiating the Age Assurance flow. */ - initUa?: string - /** The IP address used when completing the Age Assurance flow. */ - completeIp?: string - /** The user agent used when completing the Age Assurance flow. */ - completeUa?: string -} - -const hashEvent = 'event' - -export function isEvent(v: V) { - return is$typed(v, id, hashEvent) -} - -export function validateEvent(v: V) { - return validate(v, id, hashEvent) -} diff --git a/packages/api/src/client/types/app/bsky/ageassurance/getConfig.ts b/packages/api/src/client/types/app/bsky/ageassurance/getConfig.ts deleted file mode 100644 index b36a446cce1..00000000000 --- a/packages/api/src/client/types/app/bsky/ageassurance/getConfig.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyAgeassuranceDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.ageassurance.getConfig' - -export type QueryParams = {} -export type InputSchema = undefined -export type OutputSchema = AppBskyAgeassuranceDefs.Config - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/ageassurance/getState.ts b/packages/api/src/client/types/app/bsky/ageassurance/getState.ts deleted file mode 100644 index 9028c3c1b9b..00000000000 --- a/packages/api/src/client/types/app/bsky/ageassurance/getState.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyAgeassuranceDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.ageassurance.getState' - -export type QueryParams = { - countryCode: string - regionCode?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - state: AppBskyAgeassuranceDefs.State - metadata: AppBskyAgeassuranceDefs.StateMetadata -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/bookmark/createBookmark.ts b/packages/api/src/client/types/app/bsky/bookmark/createBookmark.ts deleted file mode 100644 index b23dceab75b..00000000000 --- a/packages/api/src/client/types/app/bsky/bookmark/createBookmark.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.bookmark.createBookmark' - -export type QueryParams = {} - -export interface InputSchema { - uri: string - cid: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export class UnsupportedCollectionError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'UnsupportedCollection') - return new UnsupportedCollectionError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/bookmark/defs.ts b/packages/api/src/client/types/app/bsky/bookmark/defs.ts deleted file mode 100644 index f466b4917eb..00000000000 --- a/packages/api/src/client/types/app/bsky/bookmark/defs.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' -import type * as AppBskyFeedDefs from '../feed/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.bookmark.defs' - -/** Object used to store bookmark data in stash. */ -export interface Bookmark { - $type?: 'app.bsky.bookmark.defs#bookmark' - subject: ComAtprotoRepoStrongRef.Main -} - -const hashBookmark = 'bookmark' - -export function isBookmark(v: V) { - return is$typed(v, id, hashBookmark) -} - -export function validateBookmark(v: V) { - return validate(v, id, hashBookmark) -} - -export interface BookmarkView { - $type?: 'app.bsky.bookmark.defs#bookmarkView' - subject: ComAtprotoRepoStrongRef.Main - createdAt?: string - item: - | $Typed - | $Typed - | $Typed - | { $type: string } -} - -const hashBookmarkView = 'bookmarkView' - -export function isBookmarkView(v: V) { - return is$typed(v, id, hashBookmarkView) -} - -export function validateBookmarkView(v: V) { - return validate(v, id, hashBookmarkView) -} diff --git a/packages/api/src/client/types/app/bsky/bookmark/deleteBookmark.ts b/packages/api/src/client/types/app/bsky/bookmark/deleteBookmark.ts deleted file mode 100644 index 1d51167d2e3..00000000000 --- a/packages/api/src/client/types/app/bsky/bookmark/deleteBookmark.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.bookmark.deleteBookmark' - -export type QueryParams = {} - -export interface InputSchema { - uri: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export class UnsupportedCollectionError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'UnsupportedCollection') - return new UnsupportedCollectionError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/bookmark/getBookmarks.ts b/packages/api/src/client/types/app/bsky/bookmark/getBookmarks.ts deleted file mode 100644 index e6938e8ce59..00000000000 --- a/packages/api/src/client/types/app/bsky/bookmark/getBookmarks.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyBookmarkDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.bookmark.getBookmarks' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - bookmarks: AppBskyBookmarkDefs.BookmarkView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/defs.ts b/packages/api/src/client/types/app/bsky/contact/defs.ts deleted file mode 100644 index 9258135f79f..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/defs.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.defs' - -/** Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match. */ -export interface MatchAndContactIndex { - $type?: 'app.bsky.contact.defs#matchAndContactIndex' - match: AppBskyActorDefs.ProfileView - /** The index of this match in the import contact input. */ - contactIndex: number -} - -const hashMatchAndContactIndex = 'matchAndContactIndex' - -export function isMatchAndContactIndex(v: V) { - return is$typed(v, id, hashMatchAndContactIndex) -} - -export function validateMatchAndContactIndex(v: V) { - return validate(v, id, hashMatchAndContactIndex) -} - -export interface SyncStatus { - $type?: 'app.bsky.contact.defs#syncStatus' - /** Last date when contacts where imported. */ - syncedAt: string - /** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. */ - matchesCount: number -} - -const hashSyncStatus = 'syncStatus' - -export function isSyncStatus(v: V) { - return is$typed(v, id, hashSyncStatus) -} - -export function validateSyncStatus(v: V) { - return validate(v, id, hashSyncStatus) -} - -/** A stash object to be sent via bsync representing a notification to be created. */ -export interface Notification { - $type?: 'app.bsky.contact.defs#notification' - /** The DID of who this notification comes from. */ - from: string - /** The DID of who this notification should go to. */ - to: string -} - -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/packages/api/src/client/types/app/bsky/contact/dismissMatch.ts b/packages/api/src/client/types/app/bsky/contact/dismissMatch.ts deleted file mode 100644 index d47761c499a..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/dismissMatch.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.dismissMatch' - -export type QueryParams = {} - -export interface InputSchema { - /** The subject's DID to dismiss the match with. */ - subject: string -} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/getMatches.ts b/packages/api/src/client/types/app/bsky/contact/getMatches.ts deleted file mode 100644 index 8cae0209e14..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/getMatches.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.getMatches' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - matches: AppBskyActorDefs.ProfileView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidLimitError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidCursorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InvalidLimit') return new InvalidLimitError(e) - if (e.error === 'InvalidCursor') return new InvalidCursorError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/getSyncStatus.ts b/packages/api/src/client/types/app/bsky/contact/getSyncStatus.ts deleted file mode 100644 index 630e603e866..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/getSyncStatus.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyContactDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.getSyncStatus' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - syncStatus?: AppBskyContactDefs.SyncStatus -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/importContacts.ts b/packages/api/src/client/types/app/bsky/contact/importContacts.ts deleted file mode 100644 index d1be9a6004c..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/importContacts.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyContactDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.importContacts' - -export type QueryParams = {} - -export interface InputSchema { - /** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. */ - token: string - /** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. */ - contacts: string[] -} - -export interface OutputSchema { - /** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. */ - matchesAndContactIndexes: AppBskyContactDefs.MatchAndContactIndex[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidContactsError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class TooManyContactsError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidTokenError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InvalidContacts') return new InvalidContactsError(e) - if (e.error === 'TooManyContacts') return new TooManyContactsError(e) - if (e.error === 'InvalidToken') return new InvalidTokenError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/removeData.ts b/packages/api/src/client/types/app/bsky/contact/removeData.ts deleted file mode 100644 index 4c240c0adc1..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/removeData.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.removeData' - -export type QueryParams = {} - -export interface InputSchema {} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/sendNotification.ts b/packages/api/src/client/types/app/bsky/contact/sendNotification.ts deleted file mode 100644 index d571ffbda5e..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/sendNotification.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.sendNotification' - -export type QueryParams = {} - -export interface InputSchema { - /** The DID of who this notification comes from. */ - from: string - /** The DID of who this notification should go to. */ - to: string -} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/startPhoneVerification.ts b/packages/api/src/client/types/app/bsky/contact/startPhoneVerification.ts deleted file mode 100644 index 32a9393f30a..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/startPhoneVerification.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.startPhoneVerification' - -export type QueryParams = {} - -export interface InputSchema { - /** The phone number to receive the code via SMS. */ - phone: string -} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class RateLimitExceededError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidPhoneError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'RateLimitExceeded') return new RateLimitExceededError(e) - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InvalidPhone') return new InvalidPhoneError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/contact/verifyPhone.ts b/packages/api/src/client/types/app/bsky/contact/verifyPhone.ts deleted file mode 100644 index cf2de84208a..00000000000 --- a/packages/api/src/client/types/app/bsky/contact/verifyPhone.ts +++ /dev/null @@ -1,85 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.contact.verifyPhone' - -export type QueryParams = {} - -export interface InputSchema { - /** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. */ - phone: string - /** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. */ - code: string -} - -export interface OutputSchema { - /** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. */ - token: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class RateLimitExceededError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidDidError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidPhoneError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidCodeError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InternalError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'RateLimitExceeded') return new RateLimitExceededError(e) - if (e.error === 'InvalidDid') return new InvalidDidError(e) - if (e.error === 'InvalidPhone') return new InvalidPhoneError(e) - if (e.error === 'InvalidCode') return new InvalidCodeError(e) - if (e.error === 'InternalError') return new InternalError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/draft/createDraft.ts b/packages/api/src/client/types/app/bsky/draft/createDraft.ts deleted file mode 100644 index a240c3f2912..00000000000 --- a/packages/api/src/client/types/app/bsky/draft/createDraft.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyDraftDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.draft.createDraft' - -export type QueryParams = {} - -export interface InputSchema { - draft: AppBskyDraftDefs.Draft -} - -export interface OutputSchema { - /** The ID of the created draft. */ - id: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class DraftLimitReachedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'DraftLimitReached') return new DraftLimitReachedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/draft/defs.ts b/packages/api/src/client/types/app/bsky/draft/defs.ts deleted file mode 100644 index 7c516573d86..00000000000 --- a/packages/api/src/client/types/app/bsky/draft/defs.ts +++ /dev/null @@ -1,212 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedPostgate from '../feed/postgate.js' -import type * as AppBskyFeedThreadgate from '../feed/threadgate.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.draft.defs' - -/** A draft with an identifier, used to store drafts in private storage (stash). */ -export interface DraftWithId { - $type?: 'app.bsky.draft.defs#draftWithId' - /** A TID to be used as a draft identifier. */ - id: string - draft: Draft -} - -const hashDraftWithId = 'draftWithId' - -export function isDraftWithId(v: V) { - return is$typed(v, id, hashDraftWithId) -} - -export function validateDraftWithId(v: V) { - return validate(v, id, hashDraftWithId) -} - -/** A draft containing an array of draft posts. */ -export interface Draft { - $type?: 'app.bsky.draft.defs#draft' - /** UUIDv4 identifier of the device that created this draft. */ - deviceId?: string - /** The device and/or platform on which the draft was created. */ - deviceName?: string - /** Array of draft posts that compose this draft. */ - posts: DraftPost[] - /** Indicates human language of posts primary text content. */ - langs?: string[] - /** Embedding rules for the postgates to be created when this draft is published. */ - postgateEmbeddingRules?: ( - | $Typed - | { $type: string } - )[] - /** Allow-rules for the threadgate to be created when this draft is published. */ - threadgateAllow?: ( - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[] -} - -const hashDraft = 'draft' - -export function isDraft(v: V) { - return is$typed(v, id, hashDraft) -} - -export function validateDraft(v: V) { - return validate(v, id, hashDraft) -} - -/** One of the posts that compose a draft. */ -export interface DraftPost { - $type?: 'app.bsky.draft.defs#draftPost' - /** The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts. */ - text: string - labels?: $Typed | { $type: string } - embedImages?: DraftEmbedImage[] - embedVideos?: DraftEmbedVideo[] - embedExternals?: DraftEmbedExternal[] - embedRecords?: DraftEmbedRecord[] -} - -const hashDraftPost = 'draftPost' - -export function isDraftPost(v: V) { - return is$typed(v, id, hashDraftPost) -} - -export function validateDraftPost(v: V) { - return validate(v, id, hashDraftPost) -} - -/** View to present drafts data to users. */ -export interface DraftView { - $type?: 'app.bsky.draft.defs#draftView' - /** A TID to be used as a draft identifier. */ - id: string - draft: Draft - /** The time the draft was created. */ - createdAt: string - /** The time the draft was last updated. */ - updatedAt: string -} - -const hashDraftView = 'draftView' - -export function isDraftView(v: V) { - return is$typed(v, id, hashDraftView) -} - -export function validateDraftView(v: V) { - return validate(v, id, hashDraftView) -} - -export interface DraftEmbedLocalRef { - $type?: 'app.bsky.draft.defs#draftEmbedLocalRef' - /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */ - path: string -} - -const hashDraftEmbedLocalRef = 'draftEmbedLocalRef' - -export function isDraftEmbedLocalRef(v: V) { - return is$typed(v, id, hashDraftEmbedLocalRef) -} - -export function validateDraftEmbedLocalRef(v: V) { - return validate(v, id, hashDraftEmbedLocalRef) -} - -export interface DraftEmbedCaption { - $type?: 'app.bsky.draft.defs#draftEmbedCaption' - lang: string - content: string -} - -const hashDraftEmbedCaption = 'draftEmbedCaption' - -export function isDraftEmbedCaption(v: V) { - return is$typed(v, id, hashDraftEmbedCaption) -} - -export function validateDraftEmbedCaption(v: V) { - return validate(v, id, hashDraftEmbedCaption) -} - -export interface DraftEmbedImage { - $type?: 'app.bsky.draft.defs#draftEmbedImage' - localRef: DraftEmbedLocalRef - alt?: string -} - -const hashDraftEmbedImage = 'draftEmbedImage' - -export function isDraftEmbedImage(v: V) { - return is$typed(v, id, hashDraftEmbedImage) -} - -export function validateDraftEmbedImage(v: V) { - return validate(v, id, hashDraftEmbedImage) -} - -export interface DraftEmbedVideo { - $type?: 'app.bsky.draft.defs#draftEmbedVideo' - localRef: DraftEmbedLocalRef - alt?: string - captions?: DraftEmbedCaption[] -} - -const hashDraftEmbedVideo = 'draftEmbedVideo' - -export function isDraftEmbedVideo(v: V) { - return is$typed(v, id, hashDraftEmbedVideo) -} - -export function validateDraftEmbedVideo(v: V) { - return validate(v, id, hashDraftEmbedVideo) -} - -export interface DraftEmbedExternal { - $type?: 'app.bsky.draft.defs#draftEmbedExternal' - uri: string -} - -const hashDraftEmbedExternal = 'draftEmbedExternal' - -export function isDraftEmbedExternal(v: V) { - return is$typed(v, id, hashDraftEmbedExternal) -} - -export function validateDraftEmbedExternal(v: V) { - return validate(v, id, hashDraftEmbedExternal) -} - -export interface DraftEmbedRecord { - $type?: 'app.bsky.draft.defs#draftEmbedRecord' - record: ComAtprotoRepoStrongRef.Main -} - -const hashDraftEmbedRecord = 'draftEmbedRecord' - -export function isDraftEmbedRecord(v: V) { - return is$typed(v, id, hashDraftEmbedRecord) -} - -export function validateDraftEmbedRecord(v: V) { - return validate(v, id, hashDraftEmbedRecord) -} diff --git a/packages/api/src/client/types/app/bsky/draft/deleteDraft.ts b/packages/api/src/client/types/app/bsky/draft/deleteDraft.ts deleted file mode 100644 index 6cdbe28f6eb..00000000000 --- a/packages/api/src/client/types/app/bsky/draft/deleteDraft.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.draft.deleteDraft' - -export type QueryParams = {} - -export interface InputSchema { - id: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/draft/getDrafts.ts b/packages/api/src/client/types/app/bsky/draft/getDrafts.ts deleted file mode 100644 index 4dc0be16316..00000000000 --- a/packages/api/src/client/types/app/bsky/draft/getDrafts.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyDraftDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.draft.getDrafts' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - drafts: AppBskyDraftDefs.DraftView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/draft/updateDraft.ts b/packages/api/src/client/types/app/bsky/draft/updateDraft.ts deleted file mode 100644 index 9c15b25b9d6..00000000000 --- a/packages/api/src/client/types/app/bsky/draft/updateDraft.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyDraftDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.draft.updateDraft' - -export type QueryParams = {} - -export interface InputSchema { - draft: AppBskyDraftDefs.DraftWithId -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/embed/defs.ts b/packages/api/src/client/types/app/bsky/embed/defs.ts deleted file mode 100644 index e7a4c5410da..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/defs.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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/packages/api/src/client/types/app/bsky/embed/external.ts b/packages/api/src/client/types/app/bsky/embed/external.ts deleted file mode 100644 index d29485cff83..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/external.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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/packages/api/src/client/types/app/bsky/embed/images.ts b/packages/api/src/client/types/app/bsky/embed/images.ts deleted file mode 100644 index c60d085a09e..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/images.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyEmbedDefs from './defs.js' - -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' - /** The raw image file. May be up to 2 MB, formerly limited to 1 MB. */ - 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/packages/api/src/client/types/app/bsky/embed/record.ts b/packages/api/src/client/types/app/bsky/embed/record.ts deleted file mode 100644 index b0d2049802c..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/record.ts +++ /dev/null @@ -1,146 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' -import type * as AppBskyFeedDefs from '../feed/defs.js' -import type * as AppBskyGraphDefs from '../graph/defs.js' -import type * as AppBskyLabelerDefs from '../labeler/defs.js' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as AppBskyEmbedImages from './images.js' -import type * as AppBskyEmbedVideo from './video.js' -import type * as AppBskyEmbedExternal from './external.js' -import type * as AppBskyEmbedRecordWithMedia from './recordWithMedia.js' - -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/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts b/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts deleted file mode 100644 index 995b8294712..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/recordWithMedia.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyEmbedRecord from './record.js' -import type * as AppBskyEmbedImages from './images.js' -import type * as AppBskyEmbedVideo from './video.js' -import type * as AppBskyEmbedExternal from './external.js' - -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/packages/api/src/client/types/app/bsky/embed/video.ts b/packages/api/src/client/types/app/bsky/embed/video.ts deleted file mode 100644 index 5477ccd7791..00000000000 --- a/packages/api/src/client/types/app/bsky/embed/video.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyEmbedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.embed.video' - -export interface Main { - $type?: 'app.bsky.embed.video' - /** The mp4 video file. May be up to 100mb, formerly limited to 50mb. */ - video: BlobRef - captions?: Caption[] - /** Alt text description of the video, for accessibility. */ - alt?: string - aspectRatio?: AppBskyEmbedDefs.AspectRatio - /** A hint to the client about how to present the video. */ - presentation?: 'default' | 'gif' | (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 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 - /** A hint to the client about how to present the video. */ - presentation?: 'default' | 'gif' | (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/packages/api/src/client/types/app/bsky/feed/defs.ts b/packages/api/src/client/types/app/bsky/feed/defs.ts deleted file mode 100644 index b4e7ccc9e37..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/defs.ts +++ /dev/null @@ -1,428 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as AppBskyEmbedImages from '../embed/images.js' -import type * as AppBskyEmbedVideo from '../embed/video.js' -import type * as AppBskyEmbedExternal from '../embed/external.js' -import type * as AppBskyEmbedRecord from '../embed/record.js' -import type * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' -import type * as AppBskyGraphDefs from '../graph/defs.js' - -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 } - bookmarkCount?: number - replyCount?: number - repostCount?: number - likeCount?: number - quoteCount?: number - indexedAt: string - viewer?: ViewerState - labels?: ComAtprotoLabelDefs.Label[] - threadgate?: ThreadgateView - /** Debug information for internal development */ - debug?: { [_ in string]: unknown } -} - -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 - bookmarked?: boolean - 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 - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: 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 - uri?: string - cid?: string - 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 & {}) - 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 & {}) - /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ - feedContext?: string - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: 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/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts b/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts deleted file mode 100644 index f167cc80de0..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/describeFeedGenerator.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.describeFeedGenerator' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - did: string - feeds: Feed[] - links?: Links -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -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/packages/api/src/client/types/app/bsky/feed/generator.ts b/packages/api/src/client/types/app/bsky/feed/generator.ts deleted file mode 100644 index 54cc72d7d14..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/generator.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.generator' - -export interface Main { - $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 & {}) - createdAt: string - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts b/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts deleted file mode 100644 index c10676588be..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getActorFeeds.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getActorFeeds' - -export type QueryParams = { - actor: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feeds: AppBskyFeedDefs.GeneratorView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts b/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts deleted file mode 100644 index d1551702ea6..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getActorLikes.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getActorLikes' - -export type QueryParams = { - actor: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feed: AppBskyFeedDefs.FeedViewPost[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BlockedActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class BlockedByActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BlockedActor') return new BlockedActorError(e) - if (e.error === 'BlockedByActor') return new BlockedByActorError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts b/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts deleted file mode 100644 index 6b703a26bb0..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getAuthorFeed.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getAuthorFeed' - -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 & {}) - includePins?: boolean -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feed: AppBskyFeedDefs.FeedViewPost[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BlockedActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class BlockedByActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BlockedActor') return new BlockedActorError(e) - if (e.error === 'BlockedByActor') return new BlockedByActorError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getFeed.ts b/packages/api/src/client/types/app/bsky/feed/getFeed.ts deleted file mode 100644 index 9ac3d5684d2..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getFeed.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getFeed' - -export type QueryParams = { - feed: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feed: AppBskyFeedDefs.FeedViewPost[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class UnknownFeedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'UnknownFeed') return new UnknownFeedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts b/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts deleted file mode 100644 index 504c61a0799..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getFeedGenerator.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getFeedGenerator' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts b/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts deleted file mode 100644 index 2e047ee071e..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getFeedGenerators.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getFeedGenerators' - -export type QueryParams = { - feeds: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - feeds: AppBskyFeedDefs.GeneratorView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts b/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts deleted file mode 100644 index 9393126efc4..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getFeedSkeleton.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getFeedSkeleton' - -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[] - /** Unique identifier per request that may be passed back alongside interactions. */ - reqId?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class UnknownFeedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'UnknownFeed') return new UnknownFeedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getLikes.ts b/packages/api/src/client/types/app/bsky/feed/getLikes.ts deleted file mode 100644 index 62b35c74f38..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getLikes.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -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/packages/api/src/client/types/app/bsky/feed/getListFeed.ts b/packages/api/src/client/types/app/bsky/feed/getListFeed.ts deleted file mode 100644 index 3d23b1fa1be..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getListFeed.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getListFeed' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class UnknownListError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'UnknownList') return new UnknownListError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getPostThread.ts b/packages/api/src/client/types/app/bsky/feed/getPostThread.ts deleted file mode 100644 index 60897600c44..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getPostThread.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getPostThread' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class NotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'NotFound') return new NotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getPosts.ts b/packages/api/src/client/types/app/bsky/feed/getPosts.ts deleted file mode 100644 index b143d8df9ce..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getPosts.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getPosts' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getQuotes.ts b/packages/api/src/client/types/app/bsky/feed/getQuotes.ts deleted file mode 100644 index eadcafd888b..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getQuotes.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getQuotes' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts b/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts deleted file mode 100644 index 43858f5afb4..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getRepostedBy.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getRepostedBy' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts b/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts deleted file mode 100644 index 9e3ddd8a34f..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getSuggestedFeeds' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feeds: AppBskyFeedDefs.GeneratorView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/getTimeline.ts b/packages/api/src/client/types/app/bsky/feed/getTimeline.ts deleted file mode 100644 index df73779e144..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/getTimeline.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.getTimeline' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/like.ts b/packages/api/src/client/types/app/bsky/feed/like.ts deleted file mode 100644 index 2d6d9b08687..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/like.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.like' - -export interface Main { - $type: 'app.bsky.feed.like' - subject: ComAtprotoRepoStrongRef.Main - createdAt: string - via?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/feed/post.ts b/packages/api/src/client/types/app/bsky/feed/post.ts deleted file mode 100644 index decaa83cd6b..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/post.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' -import type * as AppBskyEmbedImages from '../embed/images.js' -import type * as AppBskyEmbedVideo from '../embed/video.js' -import type * as AppBskyEmbedExternal from '../embed/external.js' -import type * as AppBskyEmbedRecord from '../embed/record.js' -import type * as AppBskyEmbedRecordWithMedia from '../embed/recordWithMedia.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.post' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} - -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/packages/api/src/client/types/app/bsky/feed/postgate.ts b/packages/api/src/client/types/app/bsky/feed/postgate.ts deleted file mode 100644 index 10ba24d8355..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/postgate.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.postgate' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} - -/** 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/packages/api/src/client/types/app/bsky/feed/repost.ts b/packages/api/src/client/types/app/bsky/feed/repost.ts deleted file mode 100644 index d7c0259cab8..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/repost.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.repost' - -export interface Main { - $type: 'app.bsky.feed.repost' - subject: ComAtprotoRepoStrongRef.Main - createdAt: string - via?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/feed/searchPosts.ts b/packages/api/src/client/types/app/bsky/feed/searchPosts.ts deleted file mode 100644 index abceb89c7e9..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/searchPosts.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.searchPosts' - -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 & {}) - /** 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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BadQueryStringError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BadQueryString') return new BadQueryStringError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts b/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts deleted file mode 100644 index 720f5aa1f6b..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/sendInteractions.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.sendInteractions' - -export type QueryParams = {} - -export interface InputSchema { - feed?: string - interactions: AppBskyFeedDefs.Interaction[] -} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/feed/threadgate.ts b/packages/api/src/client/types/app/bsky/feed/threadgate.ts deleted file mode 100644 index 8d88800c1fb..00000000000 --- a/packages/api/src/client/types/app/bsky/feed/threadgate.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.feed.threadgate' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} - -/** 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/packages/api/src/client/types/app/bsky/graph/block.ts b/packages/api/src/client/types/app/bsky/graph/block.ts deleted file mode 100644 index 09869a82f42..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/block.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.block' - -export interface Main { - $type: 'app.bsky.graph.block' - /** DID of the account to be blocked. */ - subject: string - createdAt: string - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/graph/defs.ts b/packages/api/src/client/types/app/bsky/graph/defs.ts deleted file mode 100644 index 318f0af0f68..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/defs.ts +++ /dev/null @@ -1,206 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' -import type * as AppBskyFeedDefs from '../feed/defs.js' - -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 & {}) - -/** 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 - /** if the actor blocks this DID, this is the AT-URI of the block record */ - blocking?: string - /** if the actor is blocked by this DID, contains the AT-URI of the block record */ - blockedBy?: string - /** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record */ - blockingByList?: string - /** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record */ - blockedByList?: 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/packages/api/src/client/types/app/bsky/graph/follow.ts b/packages/api/src/client/types/app/bsky/graph/follow.ts deleted file mode 100644 index 5eb64dfa36f..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/follow.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.follow' - -export interface Main { - $type: 'app.bsky.graph.follow' - subject: string - createdAt: string - via?: ComAtprotoRepoStrongRef.Main - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts b/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts deleted file mode 100644 index 53807ce7d27..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getActorStarterPacks.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getActorStarterPacks' - -export type QueryParams = { - actor: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getBlocks.ts b/packages/api/src/client/types/app/bsky/graph/getBlocks.ts deleted file mode 100644 index 0e96a1b9003..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getBlocks.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getBlocks' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - blocks: AppBskyActorDefs.ProfileView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getFollowers.ts b/packages/api/src/client/types/app/bsky/graph/getFollowers.ts deleted file mode 100644 index f3c46c3741a..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getFollowers.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getFollowers' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getFollows.ts b/packages/api/src/client/types/app/bsky/graph/getFollows.ts deleted file mode 100644 index 7733f0aa011..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getFollows.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getFollows' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts b/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts deleted file mode 100644 index d5e81f40a5d..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getKnownFollowers.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getKnownFollowers' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getList.ts b/packages/api/src/client/types/app/bsky/graph/getList.ts deleted file mode 100644 index 41030daba36..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getList.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getList' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts b/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts deleted file mode 100644 index b4ff22dd68d..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getListBlocks.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getListBlocks' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - lists: AppBskyGraphDefs.ListView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getListMutes.ts b/packages/api/src/client/types/app/bsky/graph/getListMutes.ts deleted file mode 100644 index dca0797c38a..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getListMutes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getListMutes' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - lists: AppBskyGraphDefs.ListView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getLists.ts b/packages/api/src/client/types/app/bsky/graph/getLists.ts deleted file mode 100644 index 6c49fbf5556..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getLists.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getLists' - -export type QueryParams = { - /** The account (actor) to enumerate lists from. */ - actor: string - limit?: number - cursor?: string - /** Optional filter by list purpose. If not specified, all supported types are returned. */ - purposes?: 'modlist' | 'curatelist' | (string & {})[] -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - lists: AppBskyGraphDefs.ListView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getListsWithMembership.ts b/packages/api/src/client/types/app/bsky/graph/getListsWithMembership.ts deleted file mode 100644 index e497e04b89e..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getListsWithMembership.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getListsWithMembership' - -export type QueryParams = { - /** The account (actor) to check for membership. */ - actor: string - limit?: number - cursor?: string - /** Optional filter by list purpose. If not specified, all supported types are returned. */ - purposes?: 'modlist' | 'curatelist' | (string & {})[] -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - listsWithMembership: ListWithMembership[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -/** A list and an optional list item indicating membership of a target user to that list. */ -export interface ListWithMembership { - $type?: 'app.bsky.graph.getListsWithMembership#listWithMembership' - list: AppBskyGraphDefs.ListView - listItem?: AppBskyGraphDefs.ListItemView -} - -const hashListWithMembership = 'listWithMembership' - -export function isListWithMembership(v: V) { - return is$typed(v, id, hashListWithMembership) -} - -export function validateListWithMembership(v: V) { - return validate(v, id, hashListWithMembership) -} diff --git a/packages/api/src/client/types/app/bsky/graph/getMutes.ts b/packages/api/src/client/types/app/bsky/graph/getMutes.ts deleted file mode 100644 index 184083c9644..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getMutes.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getMutes' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - mutes: AppBskyActorDefs.ProfileView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getRelationships.ts b/packages/api/src/client/types/app/bsky/graph/getRelationships.ts deleted file mode 100644 index bec761df621..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getRelationships.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getRelationships' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ActorNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ActorNotFound') return new ActorNotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts b/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts deleted file mode 100644 index 8264c5d069c..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getStarterPack.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getStarterPack' - -export type QueryParams = { - /** Reference (AT-URI) of the starter pack record. */ - starterPack: string -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPack: AppBskyGraphDefs.StarterPackView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts b/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts deleted file mode 100644 index 07caa46664e..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getStarterPacks.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getStarterPacks' - -export type QueryParams = { - uris: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPacks: AppBskyGraphDefs.StarterPackViewBasic[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/getStarterPacksWithMembership.ts b/packages/api/src/client/types/app/bsky/graph/getStarterPacksWithMembership.ts deleted file mode 100644 index 4d4cc55e1d9..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getStarterPacksWithMembership.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getStarterPacksWithMembership' - -export type QueryParams = { - /** The account (actor) to check for membership. */ - actor: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - starterPacksWithMembership: StarterPackWithMembership[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -/** A starter pack and an optional list item indicating membership of a target user to that starter pack. */ -export interface StarterPackWithMembership { - $type?: 'app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership' - starterPack: AppBskyGraphDefs.StarterPackView - listItem?: AppBskyGraphDefs.ListItemView -} - -const hashStarterPackWithMembership = 'starterPackWithMembership' - -export function isStarterPackWithMembership(v: V) { - return is$typed(v, id, hashStarterPackWithMembership) -} - -export function validateStarterPackWithMembership(v: V) { - return validate( - v, - id, - hashStarterPackWithMembership, - ) -} diff --git a/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts b/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts deleted file mode 100644 index 5eb8eca9188..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.getSuggestedFollowsByActor' - -export type QueryParams = { - actor: string -} -export type InputSchema = undefined - -export interface OutputSchema { - suggestions: AppBskyActorDefs.ProfileView[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string - /** DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid */ - isFallback: boolean - /** DEPRECATED: use recIdStr instead. */ - recId?: number -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/list.ts b/packages/api/src/client/types/app/bsky/graph/list.ts deleted file mode 100644 index d0013cd5e8e..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/list.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.list' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/graph/listblock.ts b/packages/api/src/client/types/app/bsky/graph/listblock.ts deleted file mode 100644 index bb2bffbe53d..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/listblock.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.listblock' - -export interface Main { - $type: 'app.bsky.graph.listblock' - /** Reference (AT-URI) to the mod list record. */ - subject: string - createdAt: string - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/graph/listitem.ts b/packages/api/src/client/types/app/bsky/graph/listitem.ts deleted file mode 100644 index a7aacfc99ee..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/listitem.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.listitem' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/graph/muteActor.ts b/packages/api/src/client/types/app/bsky/graph/muteActor.ts deleted file mode 100644 index 29ab4113294..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/muteActor.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.muteActor' - -export type QueryParams = {} - -export interface InputSchema { - actor: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/muteActorList.ts b/packages/api/src/client/types/app/bsky/graph/muteActorList.ts deleted file mode 100644 index d4696dfabb4..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/muteActorList.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.muteActorList' - -export type QueryParams = {} - -export interface InputSchema { - list: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/muteThread.ts b/packages/api/src/client/types/app/bsky/graph/muteThread.ts deleted file mode 100644 index 4417bd6bba5..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/muteThread.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.muteThread' - -export type QueryParams = {} - -export interface InputSchema { - root: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/searchStarterPacks.ts b/packages/api/src/client/types/app/bsky/graph/searchStarterPacks.ts deleted file mode 100644 index 8831856bb44..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/searchStarterPacks.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.searchStarterPacks' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/starterpack.ts b/packages/api/src/client/types/app/bsky/graph/starterpack.ts deleted file mode 100644 index 92af266c315..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/starterpack.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyRichtextFacet from '../richtext/facet.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.starterpack' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} - -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/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts b/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts deleted file mode 100644 index 3737ad71a91..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/unmuteActor.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.unmuteActor' - -export type QueryParams = {} - -export interface InputSchema { - actor: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts b/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts deleted file mode 100644 index fb3b7380f1d..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/unmuteActorList.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.unmuteActorList' - -export type QueryParams = {} - -export interface InputSchema { - list: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts b/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts deleted file mode 100644 index 3e1c1311229..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/unmuteThread.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.unmuteThread' - -export type QueryParams = {} - -export interface InputSchema { - root: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/graph/verification.ts b/packages/api/src/client/types/app/bsky/graph/verification.ts deleted file mode 100644 index 3cc74eefac1..00000000000 --- a/packages/api/src/client/types/app/bsky/graph/verification.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.graph.verification' - -export interface Main { - $type: 'app.bsky.graph.verification' - /** DID of the subject the verification applies to. */ - subject: string - /** Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying. */ - handle: string - /** Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying. */ - displayName: string - /** Date of when the verification was created. */ - createdAt: string - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/labeler/defs.ts b/packages/api/src/client/types/app/bsky/labeler/defs.ts deleted file mode 100644 index ea910bbde65..00000000000 --- a/packages/api/src/client/types/app/bsky/labeler/defs.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js' - -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/packages/api/src/client/types/app/bsky/labeler/getServices.ts b/packages/api/src/client/types/app/bsky/labeler/getServices.ts deleted file mode 100644 index ba24378c335..00000000000 --- a/packages/api/src/client/types/app/bsky/labeler/getServices.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyLabelerDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.labeler.getServices' - -export type QueryParams = { - dids: string[] - detailed?: boolean -} -export type InputSchema = undefined - -export interface OutputSchema { - views: ( - | $Typed - | $Typed - | { $type: string } - )[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/labeler/service.ts b/packages/api/src/client/types/app/bsky/labeler/service.ts deleted file mode 100644 index 81e080f628a..00000000000 --- a/packages/api/src/client/types/app/bsky/labeler/service.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyLabelerDefs from './defs.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' -import type * as ComAtprotoModerationDefs from '../../../com/atproto/moderation/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.labeler.service' - -export interface Main { - $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 hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/notification/declaration.ts b/packages/api/src/client/types/app/bsky/notification/declaration.ts deleted file mode 100644 index 4ef2f94bb7f..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/declaration.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.declaration' - -export interface Main { - $type: 'app.bsky.notification.declaration' - /** A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'. */ - allowSubscriptions: 'followers' | 'mutuals' | 'none' | (string & {}) - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/app/bsky/notification/defs.ts b/packages/api/src/client/types/app/bsky/notification/defs.ts deleted file mode 100644 index 7ff0a82d550..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/defs.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.defs' - -export interface RecordDeleted { - $type?: 'app.bsky.notification.defs#recordDeleted' -} - -const hashRecordDeleted = 'recordDeleted' - -export function isRecordDeleted(v: V) { - return is$typed(v, id, hashRecordDeleted) -} - -export function validateRecordDeleted(v: V) { - return validate(v, id, hashRecordDeleted) -} - -export interface ChatPreference { - $type?: 'app.bsky.notification.defs#chatPreference' - include: 'all' | 'accepted' | (string & {}) - push: boolean -} - -const hashChatPreference = 'chatPreference' - -export function isChatPreference(v: V) { - return is$typed(v, id, hashChatPreference) -} - -export function validateChatPreference(v: V) { - return validate(v, id, hashChatPreference) -} - -export interface FilterablePreference { - $type?: 'app.bsky.notification.defs#filterablePreference' - include: 'all' | 'follows' | (string & {}) - list: boolean - push: boolean -} - -const hashFilterablePreference = 'filterablePreference' - -export function isFilterablePreference(v: V) { - return is$typed(v, id, hashFilterablePreference) -} - -export function validateFilterablePreference(v: V) { - return validate(v, id, hashFilterablePreference) -} - -export interface Preference { - $type?: 'app.bsky.notification.defs#preference' - list: boolean - push: boolean -} - -const hashPreference = 'preference' - -export function isPreference(v: V) { - return is$typed(v, id, hashPreference) -} - -export function validatePreference(v: V) { - return validate(v, id, hashPreference) -} - -export interface Preferences { - $type?: 'app.bsky.notification.defs#preferences' - chat: ChatPreference - follow: FilterablePreference - like: FilterablePreference - likeViaRepost: FilterablePreference - mention: FilterablePreference - quote: FilterablePreference - reply: FilterablePreference - repost: FilterablePreference - repostViaRepost: FilterablePreference - starterpackJoined: Preference - subscribedPost: Preference - unverified: Preference - verified: Preference -} - -const hashPreferences = 'preferences' - -export function isPreferences(v: V) { - return is$typed(v, id, hashPreferences) -} - -export function validatePreferences(v: V) { - return validate(v, id, hashPreferences) -} - -export interface ActivitySubscription { - $type?: 'app.bsky.notification.defs#activitySubscription' - post: boolean - reply: boolean -} - -const hashActivitySubscription = 'activitySubscription' - -export function isActivitySubscription(v: V) { - return is$typed(v, id, hashActivitySubscription) -} - -export function validateActivitySubscription(v: V) { - return validate(v, id, hashActivitySubscription) -} - -/** Object used to store activity subscription data in stash. */ -export interface SubjectActivitySubscription { - $type?: 'app.bsky.notification.defs#subjectActivitySubscription' - subject: string - activitySubscription: ActivitySubscription -} - -const hashSubjectActivitySubscription = 'subjectActivitySubscription' - -export function isSubjectActivitySubscription(v: V) { - return is$typed(v, id, hashSubjectActivitySubscription) -} - -export function validateSubjectActivitySubscription(v: V) { - return validate( - v, - id, - hashSubjectActivitySubscription, - ) -} diff --git a/packages/api/src/client/types/app/bsky/notification/getPreferences.ts b/packages/api/src/client/types/app/bsky/notification/getPreferences.ts deleted file mode 100644 index 881bf05846c..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/getPreferences.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyNotificationDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.getPreferences' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - preferences: AppBskyNotificationDefs.Preferences -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts b/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts deleted file mode 100644 index fb26be5b5dd..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/getUnreadCount.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.getUnreadCount' - -export type QueryParams = { - priority?: boolean - seenAt?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - count: number -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/listActivitySubscriptions.ts b/packages/api/src/client/types/app/bsky/notification/listActivitySubscriptions.ts deleted file mode 100644 index f25c2b8d4e7..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/listActivitySubscriptions.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.listActivitySubscriptions' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - subscriptions: AppBskyActorDefs.ProfileView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/listNotifications.ts b/packages/api/src/client/types/app/bsky/notification/listNotifications.ts deleted file mode 100644 index a6f94ac7bb2..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/listNotifications.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -export interface Notification { - $type?: 'app.bsky.notification.listNotifications#notification' - uri: string - cid: string - author: AppBskyActorDefs.ProfileView - /** The reason why this notification was delivered - e.g. your post was liked, or you received a new follower. */ - reason: - | 'like' - | 'repost' - | 'follow' - | 'mention' - | 'reply' - | 'quote' - | 'starterpack-joined' - | 'verified' - | 'unverified' - | 'like-via-repost' - | 'repost-via-repost' - | 'subscribed-post' - | 'contact-match' - | (string & {}) - 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/packages/api/src/client/types/app/bsky/notification/putActivitySubscription.ts b/packages/api/src/client/types/app/bsky/notification/putActivitySubscription.ts deleted file mode 100644 index 7141e1ac285..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/putActivitySubscription.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyNotificationDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.putActivitySubscription' - -export type QueryParams = {} - -export interface InputSchema { - subject: string - activitySubscription: AppBskyNotificationDefs.ActivitySubscription -} - -export interface OutputSchema { - subject: string - activitySubscription?: AppBskyNotificationDefs.ActivitySubscription -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/putPreferences.ts b/packages/api/src/client/types/app/bsky/notification/putPreferences.ts deleted file mode 100644 index 8c102849cb5..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/putPreferences.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.putPreferences' - -export type QueryParams = {} - -export interface InputSchema { - priority: boolean -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/putPreferencesV2.ts b/packages/api/src/client/types/app/bsky/notification/putPreferencesV2.ts deleted file mode 100644 index 38ddf2b2ff5..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/putPreferencesV2.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyNotificationDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.putPreferencesV2' - -export type QueryParams = {} - -export interface InputSchema { - chat?: AppBskyNotificationDefs.ChatPreference - follow?: AppBskyNotificationDefs.FilterablePreference - like?: AppBskyNotificationDefs.FilterablePreference - likeViaRepost?: AppBskyNotificationDefs.FilterablePreference - mention?: AppBskyNotificationDefs.FilterablePreference - quote?: AppBskyNotificationDefs.FilterablePreference - reply?: AppBskyNotificationDefs.FilterablePreference - repost?: AppBskyNotificationDefs.FilterablePreference - repostViaRepost?: AppBskyNotificationDefs.FilterablePreference - starterpackJoined?: AppBskyNotificationDefs.Preference - subscribedPost?: AppBskyNotificationDefs.Preference - unverified?: AppBskyNotificationDefs.Preference - verified?: AppBskyNotificationDefs.Preference -} - -export interface OutputSchema { - preferences: AppBskyNotificationDefs.Preferences -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/registerPush.ts b/packages/api/src/client/types/app/bsky/notification/registerPush.ts deleted file mode 100644 index 3fcb158a416..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/registerPush.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.registerPush' - -export type QueryParams = {} - -export interface InputSchema { - serviceDid: string - token: string - platform: 'ios' | 'android' | 'web' | (string & {}) - appId: string - /** Set to true when the actor is age restricted */ - ageRestricted?: boolean -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/unregisterPush.ts b/packages/api/src/client/types/app/bsky/notification/unregisterPush.ts deleted file mode 100644 index b2c0b9e9531..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/unregisterPush.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.unregisterPush' - -export type QueryParams = {} - -export interface InputSchema { - serviceDid: string - token: string - platform: 'ios' | 'android' | 'web' | (string & {}) - appId: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/notification/updateSeen.ts b/packages/api/src/client/types/app/bsky/notification/updateSeen.ts deleted file mode 100644 index 75e6783a27b..00000000000 --- a/packages/api/src/client/types/app/bsky/notification/updateSeen.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.notification.updateSeen' - -export type QueryParams = {} - -export interface InputSchema { - seenAt: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/richtext/facet.ts b/packages/api/src/client/types/app/bsky/richtext/facet.ts deleted file mode 100644 index c9dba903cd8..00000000000 --- a/packages/api/src/client/types/app/bsky/richtext/facet.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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/packages/api/src/client/types/app/bsky/unspecced/defs.ts b/packages/api/src/client/types/app/bsky/unspecced/defs.ts deleted file mode 100644 index 63de1603017..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/defs.ts +++ /dev/null @@ -1,250 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' -import type * as AppBskyFeedDefs from '../feed/defs.js' - -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) -} - -export interface SkeletonTrend { - $type?: 'app.bsky.unspecced.defs#skeletonTrend' - topic: string - displayName: string - link: string - startedAt: string - postCount: number - status?: 'hot' | (string & {}) - category?: string - dids: string[] -} - -const hashSkeletonTrend = 'skeletonTrend' - -export function isSkeletonTrend(v: V) { - return is$typed(v, id, hashSkeletonTrend) -} - -export function validateSkeletonTrend(v: V) { - return validate(v, id, hashSkeletonTrend) -} - -export interface TrendView { - $type?: 'app.bsky.unspecced.defs#trendView' - topic: string - displayName: string - link: string - startedAt: string - postCount: number - status?: 'hot' | (string & {}) - category?: string - actors: AppBskyActorDefs.ProfileViewBasic[] -} - -const hashTrendView = 'trendView' - -export function isTrendView(v: V) { - return is$typed(v, id, hashTrendView) -} - -export function validateTrendView(v: V) { - return validate(v, id, hashTrendView) -} - -export interface ThreadItemPost { - $type?: 'app.bsky.unspecced.defs#threadItemPost' - post: AppBskyFeedDefs.PostView - /** This post has more parents that were not present in the response. This is just a boolean, without the number of parents. */ - moreParents: boolean - /** This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate. */ - moreReplies: number - /** This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread. */ - opThread: boolean - /** The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread. */ - hiddenByThreadgate: boolean - /** This is by an account muted by the viewer requesting it. */ - mutedByViewer: boolean -} - -const hashThreadItemPost = 'threadItemPost' - -export function isThreadItemPost(v: V) { - return is$typed(v, id, hashThreadItemPost) -} - -export function validateThreadItemPost(v: V) { - return validate(v, id, hashThreadItemPost) -} - -export interface ThreadItemNoUnauthenticated { - $type?: 'app.bsky.unspecced.defs#threadItemNoUnauthenticated' -} - -const hashThreadItemNoUnauthenticated = 'threadItemNoUnauthenticated' - -export function isThreadItemNoUnauthenticated(v: V) { - return is$typed(v, id, hashThreadItemNoUnauthenticated) -} - -export function validateThreadItemNoUnauthenticated(v: V) { - return validate( - v, - id, - hashThreadItemNoUnauthenticated, - ) -} - -export interface ThreadItemNotFound { - $type?: 'app.bsky.unspecced.defs#threadItemNotFound' -} - -const hashThreadItemNotFound = 'threadItemNotFound' - -export function isThreadItemNotFound(v: V) { - return is$typed(v, id, hashThreadItemNotFound) -} - -export function validateThreadItemNotFound(v: V) { - return validate(v, id, hashThreadItemNotFound) -} - -export interface ThreadItemBlocked { - $type?: 'app.bsky.unspecced.defs#threadItemBlocked' - author: AppBskyFeedDefs.BlockedAuthor -} - -const hashThreadItemBlocked = 'threadItemBlocked' - -export function isThreadItemBlocked(v: V) { - return is$typed(v, id, hashThreadItemBlocked) -} - -export function validateThreadItemBlocked(v: V) { - return validate(v, id, hashThreadItemBlocked) -} - -/** The computed state of the age assurance process, returned to the user in question on certain authenticated requests. */ -export interface AgeAssuranceState { - $type?: 'app.bsky.unspecced.defs#ageAssuranceState' - /** The timestamp when this state was last updated. */ - lastInitiatedAt?: string - /** The status of the age assurance process. */ - status: 'unknown' | 'pending' | 'assured' | 'blocked' | (string & {}) -} - -const hashAgeAssuranceState = 'ageAssuranceState' - -export function isAgeAssuranceState(v: V) { - return is$typed(v, id, hashAgeAssuranceState) -} - -export function validateAgeAssuranceState(v: V) { - return validate(v, id, hashAgeAssuranceState) -} - -/** Object used to store age assurance data in stash. */ -export interface AgeAssuranceEvent { - $type?: 'app.bsky.unspecced.defs#ageAssuranceEvent' - /** The date and time of this write operation. */ - createdAt: string - /** The status of the age assurance process. */ - status: 'unknown' | 'pending' | 'assured' | (string & {}) - /** The unique identifier for this instance of the age assurance flow, in UUID format. */ - attemptId: string - /** The email used for AA. */ - email?: string - /** The IP address used when initiating the AA flow. */ - initIp?: string - /** The user agent used when initiating the AA flow. */ - initUa?: string - /** The IP address used when completing the AA flow. */ - completeIp?: string - /** The user agent used when completing the AA flow. */ - completeUa?: string -} - -const hashAgeAssuranceEvent = 'ageAssuranceEvent' - -export function isAgeAssuranceEvent(v: V) { - return is$typed(v, id, hashAgeAssuranceEvent) -} - -export function validateAgeAssuranceEvent(v: V) { - return validate(v, id, hashAgeAssuranceEvent) -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getAgeAssuranceState.ts b/packages/api/src/client/types/app/bsky/unspecced/getAgeAssuranceState.ts deleted file mode 100644 index 069f8eefca9..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getAgeAssuranceState.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getAgeAssuranceState' - -export type QueryParams = {} -export type InputSchema = undefined -export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts b/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts deleted file mode 100644 index e35f8b6afa7..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getConfig.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getConfig' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - checkEmailConfirmed?: boolean - liveNow?: LiveNowConfig[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -export interface LiveNowConfig { - $type?: 'app.bsky.unspecced.getConfig#liveNowConfig' - did: string - domains: string[] -} - -const hashLiveNowConfig = 'liveNowConfig' - -export function isLiveNowConfig(v: V) { - return is$typed(v, id, hashLiveNowConfig) -} - -export function validateLiveNowConfig(v: V) { - return validate(v, id, hashLiveNowConfig) -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts b/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts deleted file mode 100644 index f59a166066a..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacks.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from '../graph/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getOnboardingSuggestedStarterPacks' - -export type QueryParams = { - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPacks: AppBskyGraphDefs.StarterPackView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts deleted file mode 100644 index a1dc36f0cc2..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPacks: string[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts deleted file mode 100644 index c2a5bf8e722..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - dids: string[] - /** DEPRECATED: use recIdStr instead. */ - recId?: string - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts b/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts deleted file mode 100644 index c27da862122..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from '../feed/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getPopularFeedGenerators' - -export type QueryParams = { - limit?: number - cursor?: string - query?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - feeds: AppBskyFeedDefs.GeneratorView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getPostThreadOtherV2.ts b/packages/api/src/client/types/app/bsky/unspecced/getPostThreadOtherV2.ts deleted file mode 100644 index 2922df62e48..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getPostThreadOtherV2.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getPostThreadOtherV2' - -export type QueryParams = { - /** Reference (AT-URI) to post record. This is the anchor post. */ - anchor: string -} -export type InputSchema = undefined - -export interface OutputSchema { - /** A flat list of other thread items. The depth of each item is indicated by the depth property inside the item. */ - thread: ThreadItem[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -export interface ThreadItem { - $type?: 'app.bsky.unspecced.getPostThreadOtherV2#threadItem' - uri: string - /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */ - depth: number - value: $Typed | { $type: string } -} - -const hashThreadItem = 'threadItem' - -export function isThreadItem(v: V) { - return is$typed(v, id, hashThreadItem) -} - -export function validateThreadItem(v: V) { - return validate(v, id, hashThreadItem) -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getPostThreadV2.ts b/packages/api/src/client/types/app/bsky/unspecced/getPostThreadV2.ts deleted file mode 100644 index b643649d88e..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getPostThreadV2.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from '../feed/defs.js' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getPostThreadV2' - -export type QueryParams = { - /** Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post. */ - anchor: string - /** Whether to include parents above the anchor. */ - above?: boolean - /** How many levels of replies to include below the anchor. */ - below?: number - /** Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated). */ - branchingFactor?: number - /** Sorting for the thread replies. */ - sort?: 'newest' | 'oldest' | 'top' | (string & {}) -} -export type InputSchema = undefined - -export interface OutputSchema { - /** A flat list of thread items. The depth of each item is indicated by the depth property inside the item. */ - thread: ThreadItem[] - threadgate?: AppBskyFeedDefs.ThreadgateView - /** Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them. */ - hasOtherReplies: boolean -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -export interface ThreadItem { - $type?: 'app.bsky.unspecced.getPostThreadV2#threadItem' - uri: string - /** The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths. */ - depth: number - value: - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } -} - -const hashThreadItem = 'threadItem' - -export function isThreadItem(v: V) { - return is$typed(v, id, hashThreadItem) -} - -export function validateThreadItem(v: V) { - return validate(v, id, hashThreadItem) -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeeds.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeeds.ts deleted file mode 100644 index 10d444532f6..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeeds.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyFeedDefs from '../feed/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedFeeds' - -export type QueryParams = { - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - feeds: AppBskyFeedDefs.GeneratorView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts deleted file mode 100644 index 522b1947684..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - feeds: string[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts deleted file mode 100644 index a3f64b0ef9f..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedOnboardingUsers' - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - actors: AppBskyActorDefs.ProfileView[] - /** DEPRECATED: use recIdStr instead. */ - recId?: string - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacks.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacks.ts deleted file mode 100644 index 17b90dbd908..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacks.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyGraphDefs from '../graph/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedStarterPacks' - -export type QueryParams = { - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPacks: AppBskyGraphDefs.StarterPackView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts deleted file mode 100644 index d5d26e866b4..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedStarterPacksSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - starterPacks: string[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsers.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsers.ts deleted file mode 100644 index 1250df94d95..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsers.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsers' - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - actors: AppBskyActorDefs.ProfileView[] - /** DEPRECATED: use recIdStr instead. */ - recId?: string - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts deleted file mode 100644 index 468bd7f69fd..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForDiscover' - -export type QueryParams = { - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - actors: AppBskyActorDefs.ProfileView[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts deleted file mode 100644 index a846ce1c5ab..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - dids: string[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts deleted file mode 100644 index 82f40896ad7..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForExplore' - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - actors: AppBskyActorDefs.ProfileView[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts deleted file mode 100644 index 9cbed886eed..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForExploreSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - dids: string[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts deleted file mode 100644 index fdd7c854433..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForSeeMore' - -export type QueryParams = { - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - actors: AppBskyActorDefs.ProfileView[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts deleted file mode 100644 index 43f9d7c399b..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - dids: string[] - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts deleted file mode 100644 index 9cbff2bf8fd..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestedUsersSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - /** Category of users to get suggestions for. */ - category?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - dids: string[] - /** DEPRECATED: use recIdStr instead. */ - recId?: string - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts deleted file mode 100644 index 4fd9e041d31..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getSuggestionsSkeleton.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getSuggestionsSkeleton' - -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 - /** DEPRECATED: use recIdStr instead. */ - recId?: number - /** Snowflake for this recommendation, use when submitting recommendation events. */ - recIdStr?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts b/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts deleted file mode 100644 index 237f30844c2..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getTaggedSuggestions' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - suggestions: Suggestion[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -export interface Suggestion { - $type?: 'app.bsky.unspecced.getTaggedSuggestions#suggestion' - tag: string - subjectType: 'actor' | 'feed' | (string & {}) - 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/packages/api/src/client/types/app/bsky/unspecced/getTrendingTopics.ts b/packages/api/src/client/types/app/bsky/unspecced/getTrendingTopics.ts deleted file mode 100644 index d346cd1d13d..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getTrendingTopics.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getTrendingTopics' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getTrends.ts b/packages/api/src/client/types/app/bsky/unspecced/getTrends.ts deleted file mode 100644 index 46a7b5d9524..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getTrends.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getTrends' - -export type QueryParams = { - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - trends: AppBskyUnspeccedDefs.TrendView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/getTrendsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/getTrendsSkeleton.ts deleted file mode 100644 index 286629b8445..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/getTrendsSkeleton.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.getTrendsSkeleton' - -export type QueryParams = { - /** DID of the account making the request (not included for public/unauthenticated queries). */ - viewer?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - trends: AppBskyUnspeccedDefs.SkeletonTrend[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/initAgeAssurance.ts b/packages/api/src/client/types/app/bsky/unspecced/initAgeAssurance.ts deleted file mode 100644 index 2c72adaa700..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/initAgeAssurance.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.initAgeAssurance' - -export type QueryParams = {} - -export interface InputSchema { - /** The user's email address to receive assurance instructions. */ - email: string - /** The user's preferred language for communication during the assurance process. */ - language: string - /** An ISO 3166-1 alpha-2 code of the user's location. */ - countryCode: string -} - -export type OutputSchema = AppBskyUnspeccedDefs.AgeAssuranceState - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidEmailError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidTooLongError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidInitiationError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidEmail') return new InvalidEmailError(e) - if (e.error === 'DidTooLong') return new DidTooLongError(e) - if (e.error === 'InvalidInitiation') return new InvalidInitiationError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts deleted file mode 100644 index 120c9cda5de..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/searchActorsSkeleton.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.searchActorsSkeleton' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BadQueryStringError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BadQueryString') return new BadQueryStringError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts deleted file mode 100644 index c33d6a2cd8d..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/searchPostsSkeleton.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.searchPostsSkeleton' - -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 & {}) - /** 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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BadQueryStringError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BadQueryString') return new BadQueryStringError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts b/packages/api/src/client/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts deleted file mode 100644 index 03c3866001e..00000000000 --- a/packages/api/src/client/types/app/bsky/unspecced/searchStarterPacksSkeleton.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyUnspeccedDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.unspecced.searchStarterPacksSkeleton' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class BadQueryStringError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'BadQueryString') return new BadQueryStringError(e) - } - - return e -} diff --git a/packages/api/src/client/types/app/bsky/video/defs.ts b/packages/api/src/client/types/app/bsky/video/defs.ts deleted file mode 100644 index f2e32aa4b47..00000000000 --- a/packages/api/src/client/types/app/bsky/video/defs.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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 & {}) - /** 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/packages/api/src/client/types/app/bsky/video/getJobStatus.ts b/packages/api/src/client/types/app/bsky/video/getJobStatus.ts deleted file mode 100644 index b5fceaa0b49..00000000000 --- a/packages/api/src/client/types/app/bsky/video/getJobStatus.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyVideoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.video.getJobStatus' - -export type QueryParams = { - jobId: string -} -export type InputSchema = undefined - -export interface OutputSchema { - jobStatus: AppBskyVideoDefs.JobStatus -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts b/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts deleted file mode 100644 index 74fa661d957..00000000000 --- a/packages/api/src/client/types/app/bsky/video/getUploadLimits.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.video.getUploadLimits' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema { - canUpload: boolean - remainingDailyVideos?: number - remainingDailyBytes?: number - message?: string - error?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/app/bsky/video/uploadVideo.ts b/packages/api/src/client/types/app/bsky/video/uploadVideo.ts deleted file mode 100644 index 3f59fb9ed69..00000000000 --- a/packages/api/src/client/types/app/bsky/video/uploadVideo.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyVideoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'app.bsky.video.uploadVideo' - -export type QueryParams = {} -export type InputSchema = string | Uint8Array | Blob - -export interface OutputSchema { - jobStatus: AppBskyVideoDefs.JobStatus -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'video/mp4' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/actor/declaration.ts b/packages/api/src/client/types/chat/bsky/actor/declaration.ts deleted file mode 100644 index b29868faa3d..00000000000 --- a/packages/api/src/client/types/chat/bsky/actor/declaration.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.actor.declaration' - -export interface Main { - $type: 'chat.bsky.actor.declaration' - allowIncoming: 'all' | 'none' | 'following' | (string & {}) - /** [NOTE: This is under active development and should be considered unstable while this note is here]. Declaration about group chat invitation preferences for the record owner. */ - allowGroupInvites?: 'all' | 'none' | 'following' | (string & {}) - [k: string]: unknown -} - -const hashMain = 'main' - -export function isMain(v: V) { - return is$typed(v, id, hashMain) -} - -export function validateMain(v: V) { - return validate
(v, id, hashMain, true) -} - -export { - type Main as Record, - isMain as isRecord, - validateMain as validateRecord, -} diff --git a/packages/api/src/client/types/chat/bsky/actor/defs.ts b/packages/api/src/client/types/chat/bsky/actor/defs.ts deleted file mode 100644 index eaeb3c58942..00000000000 --- a/packages/api/src/client/types/chat/bsky/actor/defs.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyActorDefs from '../../../app/bsky/actor/defs.js' -import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.actor.defs' - -export type MemberRole = 'owner' | 'standard' | (string & {}) - -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[] - createdAt?: string - /** Set to true when the actor cannot actively participate in conversations */ - chatDisabled?: boolean - verification?: AppBskyActorDefs.VerificationState - kind?: - | $Typed - | $Typed - | { $type: 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) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. */ -export interface DirectConvoMember { - $type?: 'chat.bsky.actor.defs#directConvoMember' -} - -const hashDirectConvoMember = 'directConvoMember' - -export function isDirectConvoMember(v: V) { - return is$typed(v, id, hashDirectConvoMember) -} - -export function validateDirectConvoMember(v: V) { - return validate(v, id, hashDirectConvoMember) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. */ -export interface GroupConvoMember { - $type?: 'chat.bsky.actor.defs#groupConvoMember' - addedBy?: ProfileViewBasic - role: MemberRole -} - -const hashGroupConvoMember = 'groupConvoMember' - -export function isGroupConvoMember(v: V) { - return is$typed(v, id, hashGroupConvoMember) -} - -export function validateGroupConvoMember(v: V) { - return validate(v, id, hashGroupConvoMember) -} diff --git a/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts b/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts deleted file mode 100644 index 36352aaa246..00000000000 --- a/packages/api/src/client/types/chat/bsky/actor/deleteAccount.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.actor.deleteAccount' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts b/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts deleted file mode 100644 index d72717fb857..00000000000 --- a/packages/api/src/client/types/chat/bsky/actor/exportAccountData.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.actor.exportAccountData' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: Uint8Array -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/acceptConvo.ts b/packages/api/src/client/types/chat/bsky/convo/acceptConvo.ts deleted file mode 100644 index b8522fd42fa..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/acceptConvo.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.acceptConvo' - -export type QueryParams = {} - -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 CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/addReaction.ts b/packages/api/src/client/types/chat/bsky/convo/addReaction.ts deleted file mode 100644 index e00d2c4ec86..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/addReaction.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.addReaction' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - messageId: string - value: string -} - -export interface OutputSchema { - message: ChatBskyConvoDefs.MessageView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionNotAllowedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionMessageDeletedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionLimitReachedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionInvalidValueError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'ReactionNotAllowed') return new ReactionNotAllowedError(e) - if (e.error === 'ReactionMessageDeleted') - return new ReactionMessageDeletedError(e) - if (e.error === 'ReactionLimitReached') - return new ReactionLimitReachedError(e) - if (e.error === 'ReactionInvalidValue') - return new ReactionInvalidValueError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/defs.ts b/packages/api/src/client/types/chat/bsky/convo/defs.ts deleted file mode 100644 index 2e69c3cbc85..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/defs.ts +++ /dev/null @@ -1,1002 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as AppBskyRichtextFacet from '../../../app/bsky/richtext/facet.js' -import type * as AppBskyEmbedRecord from '../../../app/bsky/embed/record.js' -import type * as ChatBskyActorDefs from '../actor/defs.js' -import type * as ChatBskyGroupDefs from '../group/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.defs' - -export type ConvoKind = 'direct' | 'group' | (string & {}) -export type ConvoLockStatus = - | 'unlocked' - | 'locked' - | 'locked-permanently' - | (string & {}) -export type ConvoStatus = 'request' | 'accepted' | (string & {}) - -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 } - /** Reactions to this message, in ascending order of creation time. */ - reactions?: ReactionView[] - 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) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. */ -export interface SystemMessageView { - $type?: 'chat.bsky.convo.defs#systemMessageView' - id: string - rev: string - sentAt: string - data: - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } -} - -const hashSystemMessageView = 'systemMessageView' - -export function isSystemMessageView(v: V) { - return is$typed(v, id, hashSystemMessageView) -} - -export function validateSystemMessageView(v: V) { - return validate(v, id, hashSystemMessageView) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo. */ -export interface SystemMessageDataAddMember { - $type?: 'chat.bsky.convo.defs#systemMessageDataAddMember' - member: ChatBskyActorDefs.ProfileViewBasic - role: ChatBskyActorDefs.MemberRole - addedBy: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataAddMember = 'systemMessageDataAddMember' - -export function isSystemMessageDataAddMember(v: V) { - return is$typed(v, id, hashSystemMessageDataAddMember) -} - -export function validateSystemMessageDataAddMember(v: V) { - return validate( - v, - id, - hashSystemMessageDataAddMember, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo. */ -export interface SystemMessageDataRemoveMember { - $type?: 'chat.bsky.convo.defs#systemMessageDataRemoveMember' - member: ChatBskyActorDefs.ProfileViewBasic - removedBy: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataRemoveMember = 'systemMessageDataRemoveMember' - -export function isSystemMessageDataRemoveMember(v: V) { - return is$typed(v, id, hashSystemMessageDataRemoveMember) -} - -export function validateSystemMessageDataRemoveMember(v: V) { - return validate( - v, - id, - hashSystemMessageDataRemoveMember, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link. */ -export interface SystemMessageDataMemberJoin { - $type?: 'chat.bsky.convo.defs#systemMessageDataMemberJoin' - member: ChatBskyActorDefs.ProfileViewBasic - role: ChatBskyActorDefs.MemberRole - approvedBy?: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataMemberJoin = 'systemMessageDataMemberJoin' - -export function isSystemMessageDataMemberJoin(v: V) { - return is$typed(v, id, hashSystemMessageDataMemberJoin) -} - -export function validateSystemMessageDataMemberJoin(v: V) { - return validate( - v, - id, - hashSystemMessageDataMemberJoin, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo. */ -export interface SystemMessageDataMemberLeave { - $type?: 'chat.bsky.convo.defs#systemMessageDataMemberLeave' - member: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataMemberLeave = 'systemMessageDataMemberLeave' - -export function isSystemMessageDataMemberLeave(v: V) { - return is$typed(v, id, hashSystemMessageDataMemberLeave) -} - -export function validateSystemMessageDataMemberLeave(v: V) { - return validate( - v, - id, - hashSystemMessageDataMemberLeave, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked. */ -export interface SystemMessageDataLockConvo { - $type?: 'chat.bsky.convo.defs#systemMessageDataLockConvo' - lockedBy: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataLockConvo = 'systemMessageDataLockConvo' - -export function isSystemMessageDataLockConvo(v: V) { - return is$typed(v, id, hashSystemMessageDataLockConvo) -} - -export function validateSystemMessageDataLockConvo(v: V) { - return validate( - v, - id, - hashSystemMessageDataLockConvo, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked. */ -export interface SystemMessageDataUnlockConvo { - $type?: 'chat.bsky.convo.defs#systemMessageDataUnlockConvo' - unlockedBy: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataUnlockConvo = 'systemMessageDataUnlockConvo' - -export function isSystemMessageDataUnlockConvo(v: V) { - return is$typed(v, id, hashSystemMessageDataUnlockConvo) -} - -export function validateSystemMessageDataUnlockConvo(v: V) { - return validate( - v, - id, - hashSystemMessageDataUnlockConvo, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently. */ -export interface SystemMessageDataLockConvoPermanently { - $type?: 'chat.bsky.convo.defs#systemMessageDataLockConvoPermanently' - lockedBy: ChatBskyActorDefs.ProfileViewBasic -} - -const hashSystemMessageDataLockConvoPermanently = - 'systemMessageDataLockConvoPermanently' - -export function isSystemMessageDataLockConvoPermanently(v: V) { - return is$typed(v, id, hashSystemMessageDataLockConvoPermanently) -} - -export function validateSystemMessageDataLockConvoPermanently(v: V) { - return validate( - v, - id, - hashSystemMessageDataLockConvoPermanently, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited. */ -export interface SystemMessageDataEditGroup { - $type?: 'chat.bsky.convo.defs#systemMessageDataEditGroup' - /** Group name that was replaced. */ - oldName?: string - /** Group name that replaced the old. */ - newName?: string -} - -const hashSystemMessageDataEditGroup = 'systemMessageDataEditGroup' - -export function isSystemMessageDataEditGroup(v: V) { - return is$typed(v, id, hashSystemMessageDataEditGroup) -} - -export function validateSystemMessageDataEditGroup(v: V) { - return validate( - v, - id, - hashSystemMessageDataEditGroup, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created. */ -export interface SystemMessageDataCreateJoinLink { - $type?: 'chat.bsky.convo.defs#systemMessageDataCreateJoinLink' -} - -const hashSystemMessageDataCreateJoinLink = 'systemMessageDataCreateJoinLink' - -export function isSystemMessageDataCreateJoinLink(v: V) { - return is$typed(v, id, hashSystemMessageDataCreateJoinLink) -} - -export function validateSystemMessageDataCreateJoinLink(v: V) { - return validate( - v, - id, - hashSystemMessageDataCreateJoinLink, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited. */ -export interface SystemMessageDataEditJoinLink { - $type?: 'chat.bsky.convo.defs#systemMessageDataEditJoinLink' -} - -const hashSystemMessageDataEditJoinLink = 'systemMessageDataEditJoinLink' - -export function isSystemMessageDataEditJoinLink(v: V) { - return is$typed(v, id, hashSystemMessageDataEditJoinLink) -} - -export function validateSystemMessageDataEditJoinLink(v: V) { - return validate( - v, - id, - hashSystemMessageDataEditJoinLink, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled. */ -export interface SystemMessageDataEnableJoinLink { - $type?: 'chat.bsky.convo.defs#systemMessageDataEnableJoinLink' -} - -const hashSystemMessageDataEnableJoinLink = 'systemMessageDataEnableJoinLink' - -export function isSystemMessageDataEnableJoinLink(v: V) { - return is$typed(v, id, hashSystemMessageDataEnableJoinLink) -} - -export function validateSystemMessageDataEnableJoinLink(v: V) { - return validate( - v, - id, - hashSystemMessageDataEnableJoinLink, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled. */ -export interface SystemMessageDataDisableJoinLink { - $type?: 'chat.bsky.convo.defs#systemMessageDataDisableJoinLink' -} - -const hashSystemMessageDataDisableJoinLink = 'systemMessageDataDisableJoinLink' - -export function isSystemMessageDataDisableJoinLink(v: V) { - return is$typed(v, id, hashSystemMessageDataDisableJoinLink) -} - -export function validateSystemMessageDataDisableJoinLink(v: V) { - return validate( - v, - id, - hashSystemMessageDataDisableJoinLink, - ) -} - -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 ReactionView { - $type?: 'chat.bsky.convo.defs#reactionView' - value: string - sender: ReactionViewSender - createdAt: string -} - -const hashReactionView = 'reactionView' - -export function isReactionView(v: V) { - return is$typed(v, id, hashReactionView) -} - -export function validateReactionView(v: V) { - return validate(v, id, hashReactionView) -} - -export interface ReactionViewSender { - $type?: 'chat.bsky.convo.defs#reactionViewSender' - did: string -} - -const hashReactionViewSender = 'reactionViewSender' - -export function isReactionViewSender(v: V) { - return is$typed(v, id, hashReactionViewSender) -} - -export function validateReactionViewSender(v: V) { - return validate(v, id, hashReactionViewSender) -} - -export interface MessageAndReactionView { - $type?: 'chat.bsky.convo.defs#messageAndReactionView' - message: MessageView - reaction: ReactionView -} - -const hashMessageAndReactionView = 'messageAndReactionView' - -export function isMessageAndReactionView(v: V) { - return is$typed(v, id, hashMessageAndReactionView) -} - -export function validateMessageAndReactionView(v: V) { - return validate(v, id, hashMessageAndReactionView) -} - -export interface ConvoView { - $type?: 'chat.bsky.convo.defs#convoView' - id: string - rev: string - /** Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who invited the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members. */ - members: ChatBskyActorDefs.ProfileViewBasic[] - lastMessage?: - | $Typed - | $Typed - | $Typed - | { $type: string } - lastReaction?: $Typed | { $type: string } - muted: boolean - status?: ConvoStatus - unreadCount: number - kind?: $Typed | $Typed | { $type: string } -} - -const hashConvoView = 'convoView' - -export function isConvoView(v: V) { - return is$typed(v, id, hashConvoView) -} - -export function validateConvoView(v: V) { - return validate(v, id, hashConvoView) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. */ -export interface DirectConvo { - $type?: 'chat.bsky.convo.defs#directConvo' -} - -const hashDirectConvo = 'directConvo' - -export function isDirectConvo(v: V) { - return is$typed(v, id, hashDirectConvo) -} - -export function validateDirectConvo(v: V) { - return validate(v, id, hashDirectConvo) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. */ -export interface GroupConvo { - $type?: 'chat.bsky.convo.defs#groupConvo' - /** The display name of the group conversation. */ - name: string - /** The total number of members in the group conversation. */ - memberCount: number - joinLink?: ChatBskyGroupDefs.JoinLinkView - lockStatus: ConvoLockStatus -} - -const hashGroupConvo = 'groupConvo' - -export function isGroupConvo(v: V) { - return is$typed(v, id, hashGroupConvo) -} - -export function validateGroupConvo(v: V) { - return validate(v, id, hashGroupConvo) -} - -/** Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event. */ -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) -} - -/** Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group. */ -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) -} - -/** Event indicating the viewer left a convo. Can be direct or group. */ -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) -} - -/** Event indicating the viewer muted a convo. Can be direct or group. */ -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) -} - -/** Event indicating the viewer unmuted a convo. Can be direct or group. */ -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) -} - -/** Event indicating a user-originated message was created. Is not emitted for system messages. */ -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) -} - -/** Event indicating a user-originated message was deleted. Is not emitted for system messages. */ -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) -} - -/** DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message. */ -export interface LogReadMessage { - $type?: 'chat.bsky.convo.defs#logReadMessage' - rev: string - convoId: string - message: - | $Typed - | $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) -} - -/** Event indicating a reaction was added to a message. */ -export interface LogAddReaction { - $type?: 'chat.bsky.convo.defs#logAddReaction' - rev: string - convoId: string - message: $Typed | $Typed | { $type: string } - reaction: ReactionView -} - -const hashLogAddReaction = 'logAddReaction' - -export function isLogAddReaction(v: V) { - return is$typed(v, id, hashLogAddReaction) -} - -export function validateLogAddReaction(v: V) { - return validate(v, id, hashLogAddReaction) -} - -/** Event indicating a reaction was removed from a message. */ -export interface LogRemoveReaction { - $type?: 'chat.bsky.convo.defs#logRemoveReaction' - rev: string - convoId: string - message: $Typed | $Typed | { $type: string } - reaction: ReactionView -} - -const hashLogRemoveReaction = 'logRemoveReaction' - -export function isLogRemoveReaction(v: V) { - return is$typed(v, id, hashLogRemoveReaction) -} - -export function validateLogRemoveReaction(v: V) { - return validate(v, id, hashLogRemoveReaction) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message. */ -export interface LogReadConvo { - $type?: 'chat.bsky.convo.defs#logReadConvo' - rev: string - convoId: string - message: - | $Typed - | $Typed - | $Typed - | { $type: string } -} - -const hashLogReadConvo = 'logReadConvo' - -export function isLogReadConvo(v: V) { - return is$typed(v, id, hashLogReadConvo) -} - -export function validateLogReadConvo(v: V) { - return validate(v, id, hashLogReadConvo) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees). */ -export interface LogAddMember { - $type?: 'chat.bsky.convo.defs#logAddMember' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogAddMember = 'logAddMember' - -export function isLogAddMember(v: V) { - return is$typed(v, id, hashLogAddMember) -} - -export function validateLogAddMember(v: V) { - return validate(v, id, hashLogAddMember) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message). */ -export interface LogRemoveMember { - $type?: 'chat.bsky.convo.defs#logRemoveMember' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogRemoveMember = 'logRemoveMember' - -export function isLogRemoveMember(v: V) { - return is$typed(v, id, hashLogRemoveMember) -} - -export function validateLogRemoveMember(v: V) { - return validate(v, id, hashLogRemoveMember) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees). */ -export interface LogMemberJoin { - $type?: 'chat.bsky.convo.defs#logMemberJoin' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogMemberJoin = 'logMemberJoin' - -export function isLogMemberJoin(v: V) { - return is$typed(v, id, hashLogMemberJoin) -} - -export function validateLogMemberJoin(v: V) { - return validate(v, id, hashLogMemberJoin) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message). */ -export interface LogMemberLeave { - $type?: 'chat.bsky.convo.defs#logMemberLeave' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogMemberLeave = 'logMemberLeave' - -export function isLogMemberLeave(v: V) { - return is$typed(v, id, hashLogMemberLeave) -} - -export function validateLogMemberLeave(v: V) { - return validate(v, id, hashLogMemberLeave) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked. */ -export interface LogLockConvo { - $type?: 'chat.bsky.convo.defs#logLockConvo' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogLockConvo = 'logLockConvo' - -export function isLogLockConvo(v: V) { - return is$typed(v, id, hashLogLockConvo) -} - -export function validateLogLockConvo(v: V) { - return validate(v, id, hashLogLockConvo) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked. */ -export interface LogUnlockConvo { - $type?: 'chat.bsky.convo.defs#logUnlockConvo' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogUnlockConvo = 'logUnlockConvo' - -export function isLogUnlockConvo(v: V) { - return is$typed(v, id, hashLogUnlockConvo) -} - -export function validateLogUnlockConvo(v: V) { - return validate(v, id, hashLogUnlockConvo) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently. */ -export interface LogLockConvoPermanently { - $type?: 'chat.bsky.convo.defs#logLockConvoPermanently' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogLockConvoPermanently = 'logLockConvoPermanently' - -export function isLogLockConvoPermanently(v: V) { - return is$typed(v, id, hashLogLockConvoPermanently) -} - -export function validateLogLockConvoPermanently(v: V) { - return validate( - v, - id, - hashLogLockConvoPermanently, - ) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited. */ -export interface LogEditGroup { - $type?: 'chat.bsky.convo.defs#logEditGroup' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogEditGroup = 'logEditGroup' - -export function isLogEditGroup(v: V) { - return is$typed(v, id, hashLogEditGroup) -} - -export function validateLogEditGroup(v: V) { - return validate(v, id, hashLogEditGroup) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo. */ -export interface LogCreateJoinLink { - $type?: 'chat.bsky.convo.defs#logCreateJoinLink' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogCreateJoinLink = 'logCreateJoinLink' - -export function isLogCreateJoinLink(v: V) { - return is$typed(v, id, hashLogCreateJoinLink) -} - -export function validateLogCreateJoinLink(v: V) { - return validate(v, id, hashLogCreateJoinLink) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited. */ -export interface LogEditJoinLink { - $type?: 'chat.bsky.convo.defs#logEditJoinLink' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogEditJoinLink = 'logEditJoinLink' - -export function isLogEditJoinLink(v: V) { - return is$typed(v, id, hashLogEditJoinLink) -} - -export function validateLogEditJoinLink(v: V) { - return validate(v, id, hashLogEditJoinLink) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo. */ -export interface LogEnableJoinLink { - $type?: 'chat.bsky.convo.defs#logEnableJoinLink' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogEnableJoinLink = 'logEnableJoinLink' - -export function isLogEnableJoinLink(v: V) { - return is$typed(v, id, hashLogEnableJoinLink) -} - -export function validateLogEnableJoinLink(v: V) { - return validate(v, id, hashLogEnableJoinLink) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo. */ -export interface LogDisableJoinLink { - $type?: 'chat.bsky.convo.defs#logDisableJoinLink' - rev: string - convoId: string - message: SystemMessageView -} - -const hashLogDisableJoinLink = 'logDisableJoinLink' - -export function isLogDisableJoinLink(v: V) { - return is$typed(v, id, hashLogDisableJoinLink) -} - -export function validateLogDisableJoinLink(v: V) { - return validate(v, id, hashLogDisableJoinLink) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this. */ -export interface LogIncomingJoinRequest { - $type?: 'chat.bsky.convo.defs#logIncomingJoinRequest' - rev: string - convoId: string - member: ChatBskyActorDefs.ProfileViewBasic -} - -const hashLogIncomingJoinRequest = 'logIncomingJoinRequest' - -export function isLogIncomingJoinRequest(v: V) { - return is$typed(v, id, hashLogIncomingJoinRequest) -} - -export function validateLogIncomingJoinRequest(v: V) { - return validate(v, id, hashLogIncomingJoinRequest) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo. */ -export interface LogApproveJoinRequest { - $type?: 'chat.bsky.convo.defs#logApproveJoinRequest' - rev: string - convoId: string - member: ChatBskyActorDefs.ProfileViewBasic -} - -const hashLogApproveJoinRequest = 'logApproveJoinRequest' - -export function isLogApproveJoinRequest(v: V) { - return is$typed(v, id, hashLogApproveJoinRequest) -} - -export function validateLogApproveJoinRequest(v: V) { - return validate(v, id, hashLogApproveJoinRequest) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this. */ -export interface LogRejectJoinRequest { - $type?: 'chat.bsky.convo.defs#logRejectJoinRequest' - rev: string - convoId: string - member: ChatBskyActorDefs.ProfileViewBasic -} - -const hashLogRejectJoinRequest = 'logRejectJoinRequest' - -export function isLogRejectJoinRequest(v: V) { - return is$typed(v, id, hashLogRejectJoinRequest) -} - -export function validateLogRejectJoinRequest(v: V) { - return validate(v, id, hashLogRejectJoinRequest) -} - -/** [NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the viewer. */ -export interface LogOutgoingJoinRequest { - $type?: 'chat.bsky.convo.defs#logOutgoingJoinRequest' - rev: string - convoId: string -} - -const hashLogOutgoingJoinRequest = 'logOutgoingJoinRequest' - -export function isLogOutgoingJoinRequest(v: V) { - return is$typed(v, id, hashLogOutgoingJoinRequest) -} - -export function validateLogOutgoingJoinRequest(v: V) { - return validate(v, id, hashLogOutgoingJoinRequest) -} diff --git a/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts b/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts deleted file mode 100644 index caee5ee9c68..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/deleteMessageForSelf.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.deleteMessageForSelf' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - messageId: string -} - -export type OutputSchema = ChatBskyConvoDefs.DeletedMessageView - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class MessageDeleteNotAllowedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'MessageDeleteNotAllowed') - return new MessageDeleteNotAllowedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvo.ts b/packages/api/src/client/types/chat/bsky/convo/getConvo.ts deleted file mode 100644 index 8dcd129110c..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getConvo.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getConvo' - -export type QueryParams = { - convoId: string -} -export type InputSchema = undefined - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvoAvailability.ts b/packages/api/src/client/types/chat/bsky/convo/getConvoAvailability.ts deleted file mode 100644 index 9b1fbdc7e59..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getConvoAvailability.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getConvoAvailability' - -export type QueryParams = { - members: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - canChat: boolean - convo?: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts b/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts deleted file mode 100644 index 3772d4b5e70..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getConvoForMembers.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getConvoForMembers' - -export type QueryParams = { - members: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class AccountSuspendedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class BlockedActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class MessagesDisabledError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NotFollowedBySenderError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class RecipientNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'AccountSuspended') return new AccountSuspendedError(e) - if (e.error === 'BlockedActor') return new BlockedActorError(e) - if (e.error === 'MessagesDisabled') return new MessagesDisabledError(e) - if (e.error === 'NotFollowedBySender') - return new NotFollowedBySenderError(e) - if (e.error === 'RecipientNotFound') return new RecipientNotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getConvoMembers.ts b/packages/api/src/client/types/chat/bsky/convo/getConvoMembers.ts deleted file mode 100644 index 8fe66348798..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getConvoMembers.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getConvoMembers' - -export type QueryParams = { - convoId: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - members: ChatBskyActorDefs.ProfileViewBasic[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getLog.ts b/packages/api/src/client/types/chat/bsky/convo/getLog.ts deleted file mode 100644 index a3f6479b0e5..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getLog.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getLog' - -export type QueryParams = { - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - logs: ( - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | $Typed - | { $type: string } - )[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/getMessages.ts b/packages/api/src/client/types/chat/bsky/convo/getMessages.ts deleted file mode 100644 index 47f5021487d..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/getMessages.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.getMessages' - -export type QueryParams = { - convoId: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - messages: ( - | $Typed - | $Typed - | $Typed - | { $type: string } - )[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts b/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts deleted file mode 100644 index c8746ceee38..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/leaveConvo.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.leaveConvo' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - convoId: string - rev: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class OwnerCannotLeaveError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'OwnerCannotLeave') return new OwnerCannotLeaveError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/listConvoRequests.ts b/packages/api/src/client/types/chat/bsky/convo/listConvoRequests.ts deleted file mode 100644 index 6e97f6a39d4..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/listConvoRequests.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' -import type * as ChatBskyGroupDefs from '../group/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.listConvoRequests' - -export type QueryParams = { - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - requests: ( - | $Typed - | $Typed - | { $type: string } - )[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/listConvos.ts b/packages/api/src/client/types/chat/bsky/convo/listConvos.ts deleted file mode 100644 index b1036369dbb..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/listConvos.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.listConvos' - -export type QueryParams = { - limit?: number - cursor?: string - readState?: 'unread' | (string & {}) - /** Filter convos by their status. It is discouraged to call with "request" and preferred to call chat.bsky.convo.listConvoRequests, which also includes group join requests made by the user. */ - status?: 'request' | 'accepted' | (string & {}) - /** Filter by conversation kind. */ - kind?: 'direct' | 'group' | (string & {}) -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - convos: ChatBskyConvoDefs.ConvoView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/lockConvo.ts b/packages/api/src/client/types/chat/bsky/convo/lockConvo.ts deleted file mode 100644 index 5ad2401d246..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/lockConvo.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.lockConvo' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts b/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts deleted file mode 100644 index d42ed8770ec..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/muteConvo.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.muteConvo' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/removeReaction.ts b/packages/api/src/client/types/chat/bsky/convo/removeReaction.ts deleted file mode 100644 index 51f903ddb10..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/removeReaction.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.removeReaction' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - messageId: string - value: string -} - -export interface OutputSchema { - message: ChatBskyConvoDefs.MessageView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionNotAllowedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionMessageDeletedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ReactionInvalidValueError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'ReactionNotAllowed') return new ReactionNotAllowedError(e) - if (e.error === 'ReactionMessageDeleted') - return new ReactionMessageDeletedError(e) - if (e.error === 'ReactionInvalidValue') - return new ReactionInvalidValueError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts b/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts deleted file mode 100644 index d6938937045..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/sendMessage.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.sendMessage' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - message: ChatBskyConvoDefs.MessageInput -} - -export type OutputSchema = ChatBskyConvoDefs.MessageView - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts b/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts deleted file mode 100644 index 1315981d44f..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/sendMessageBatch.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.sendMessageBatch' - -export type QueryParams = {} - -export interface InputSchema { - items: BatchItem[] -} - -export interface OutputSchema { - items: ChatBskyConvoDefs.MessageView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} - -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/packages/api/src/client/types/chat/bsky/convo/unlockConvo.ts b/packages/api/src/client/types/chat/bsky/convo/unlockConvo.ts deleted file mode 100644 index bd027fd6c7e..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/unlockConvo.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.unlockConvo' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts b/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts deleted file mode 100644 index 355c1df8db9..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/unmuteConvo.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.unmuteConvo' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/updateAllRead.ts b/packages/api/src/client/types/chat/bsky/convo/updateAllRead.ts deleted file mode 100644 index 4befba6cfbd..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/updateAllRead.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.updateAllRead' - -export type QueryParams = {} - -export interface InputSchema { - status?: 'request' | 'accepted' | (string & {}) -} - -export interface OutputSchema { - /** The count of updated convos. */ - updatedCount: number -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/convo/updateRead.ts b/packages/api/src/client/types/chat/bsky/convo/updateRead.ts deleted file mode 100644 index f2fc0479a86..00000000000 --- a/packages/api/src/client/types/chat/bsky/convo/updateRead.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.convo.updateRead' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - messageId?: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/addMembers.ts b/packages/api/src/client/types/chat/bsky/group/addMembers.ts deleted file mode 100644 index 7ed5cd7c90c..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/addMembers.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' -import type * as ChatBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.addMembers' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - members: string[] -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView - addedMembers?: ChatBskyActorDefs.ProfileViewBasic[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class AccountSuspendedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class BlockedActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class GroupInvitesDisabledError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class MemberLimitReachedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NotFollowedBySenderError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class RecipientNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'AccountSuspended') return new AccountSuspendedError(e) - if (e.error === 'BlockedActor') return new BlockedActorError(e) - if (e.error === 'GroupInvitesDisabled') - return new GroupInvitesDisabledError(e) - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'MemberLimitReached') return new MemberLimitReachedError(e) - if (e.error === 'NotFollowedBySender') - return new NotFollowedBySenderError(e) - if (e.error === 'RecipientNotFound') return new RecipientNotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/approveJoinRequest.ts b/packages/api/src/client/types/chat/bsky/group/approveJoinRequest.ts deleted file mode 100644 index 3bb103e9b73..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/approveJoinRequest.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.approveJoinRequest' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - member: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class MemberLimitReachedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - if (e.error === 'MemberLimitReached') return new MemberLimitReachedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/createGroup.ts b/packages/api/src/client/types/chat/bsky/group/createGroup.ts deleted file mode 100644 index 9db2a64ec4c..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/createGroup.ts +++ /dev/null @@ -1,85 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.createGroup' - -export type QueryParams = {} - -export interface InputSchema { - members: string[] - name: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class AccountSuspendedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class BlockedActorError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class GroupInvitesDisabledError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NotFollowedBySenderError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class RecipientNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'AccountSuspended') return new AccountSuspendedError(e) - if (e.error === 'BlockedActor') return new BlockedActorError(e) - if (e.error === 'GroupInvitesDisabled') - return new GroupInvitesDisabledError(e) - if (e.error === 'NotFollowedBySender') - return new NotFollowedBySenderError(e) - if (e.error === 'RecipientNotFound') return new RecipientNotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/createJoinLink.ts b/packages/api/src/client/types/chat/bsky/group/createJoinLink.ts deleted file mode 100644 index 5e85a6cea25..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/createJoinLink.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.createJoinLink' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - requireApproval?: boolean - joinRule: ChatBskyGroupDefs.JoinRule -} - -export interface OutputSchema { - joinLink: ChatBskyGroupDefs.JoinLinkView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class EnabledJoinLinkAlreadyExistsError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'EnabledJoinLinkAlreadyExists') - return new EnabledJoinLinkAlreadyExistsError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/defs.ts b/packages/api/src/client/types/chat/bsky/group/defs.ts deleted file mode 100644 index 22710307e01..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/defs.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyActorDefs from '../actor/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.defs' - -export type LinkEnabledStatus = 'enabled' | 'disabled' | (string & {}) -export type JoinRule = 'anyone' | 'followedByOwner' | (string & {}) - -export interface JoinLinkView { - $type?: 'chat.bsky.group.defs#joinLinkView' - code: string - enabledStatus: LinkEnabledStatus - requireApproval: boolean - joinRule: JoinRule - createdAt: string -} - -const hashJoinLinkView = 'joinLinkView' - -export function isJoinLinkView(v: V) { - return is$typed(v, id, hashJoinLinkView) -} - -export function validateJoinLinkView(v: V) { - return validate(v, id, hashJoinLinkView) -} - -export interface GroupPublicView { - $type?: 'chat.bsky.group.defs#groupPublicView' - name: string - owner: ChatBskyActorDefs.ProfileViewBasic - memberCount: number - requireApproval: boolean -} - -const hashGroupPublicView = 'groupPublicView' - -export function isGroupPublicView(v: V) { - return is$typed(v, id, hashGroupPublicView) -} - -export function validateGroupPublicView(v: V) { - return validate(v, id, hashGroupPublicView) -} - -export interface JoinRequestView { - $type?: 'chat.bsky.group.defs#joinRequestView' - convoId: string - requestedBy: ChatBskyActorDefs.ProfileViewBasic - requestedAt: string -} - -const hashJoinRequestView = 'joinRequestView' - -export function isJoinRequestView(v: V) { - return is$typed(v, id, hashJoinRequestView) -} - -export function validateJoinRequestView(v: V) { - return validate(v, id, hashJoinRequestView) -} diff --git a/packages/api/src/client/types/chat/bsky/group/disableJoinLink.ts b/packages/api/src/client/types/chat/bsky/group/disableJoinLink.ts deleted file mode 100644 index 0ee48421be0..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/disableJoinLink.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.disableJoinLink' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - joinLink: ChatBskyGroupDefs.JoinLinkView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NoJoinLinkError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - if (e.error === 'NoJoinLink') return new NoJoinLinkError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/editGroup.ts b/packages/api/src/client/types/chat/bsky/group/editGroup.ts deleted file mode 100644 index 2103657338b..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/editGroup.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.editGroup' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - name: string -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/editJoinLink.ts b/packages/api/src/client/types/chat/bsky/group/editJoinLink.ts deleted file mode 100644 index 2e8fe1b186d..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/editJoinLink.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.editJoinLink' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - requireApproval?: boolean - joinRule?: ChatBskyGroupDefs.JoinRule -} - -export interface OutputSchema { - joinLink: ChatBskyGroupDefs.JoinLinkView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NoJoinLinkError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - if (e.error === 'NoJoinLink') return new NoJoinLinkError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/enableJoinLink.ts b/packages/api/src/client/types/chat/bsky/group/enableJoinLink.ts deleted file mode 100644 index 9225b02b742..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/enableJoinLink.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.enableJoinLink' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string -} - -export interface OutputSchema { - joinLink: ChatBskyGroupDefs.JoinLinkView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class NoJoinLinkError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class LinkAlreadyEnabledError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - if (e.error === 'NoJoinLink') return new NoJoinLinkError(e) - if (e.error === 'LinkAlreadyEnabled') return new LinkAlreadyEnabledError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/getGroupPublicInfo.ts b/packages/api/src/client/types/chat/bsky/group/getGroupPublicInfo.ts deleted file mode 100644 index 616f7475fb2..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/getGroupPublicInfo.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.getGroupPublicInfo' - -export type QueryParams = { - code: string -} -export type InputSchema = undefined - -export interface OutputSchema { - group: ChatBskyGroupDefs.GroupPublicView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidCodeError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidCode') return new InvalidCodeError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/listJoinRequests.ts b/packages/api/src/client/types/chat/bsky/group/listJoinRequests.ts deleted file mode 100644 index f6db134abf9..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/listJoinRequests.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyGroupDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.listJoinRequests' - -export type QueryParams = { - convoId: string - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - requests: ChatBskyGroupDefs.JoinRequestView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/rejectJoinRequest.ts b/packages/api/src/client/types/chat/bsky/group/rejectJoinRequest.ts deleted file mode 100644 index 1e190f0fe1a..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/rejectJoinRequest.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.rejectJoinRequest' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - member: string -} - -export interface OutputSchema {} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/removeMembers.ts b/packages/api/src/client/types/chat/bsky/group/removeMembers.ts deleted file mode 100644 index da698a79533..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/removeMembers.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.removeMembers' - -export type QueryParams = {} - -export interface InputSchema { - convoId: string - members: string[] -} - -export interface OutputSchema { - convo: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class InvalidConvoError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InsufficientRoleError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'InvalidConvo') return new InvalidConvoError(e) - if (e.error === 'InsufficientRole') return new InsufficientRoleError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/group/requestJoin.ts b/packages/api/src/client/types/chat/bsky/group/requestJoin.ts deleted file mode 100644 index 65376f1699e..00000000000 --- a/packages/api/src/client/types/chat/bsky/group/requestJoin.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.group.requestJoin' - -export type QueryParams = {} - -export interface InputSchema { - code: string -} - -export interface OutputSchema { - status: 'joined' | 'pending' | (string & {}) - convo?: ChatBskyConvoDefs.ConvoView -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class ConvoLockedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class FollowRequiredError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class InvalidCodeError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class LinkDisabledError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class MemberLimitReachedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class UserKickedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'ConvoLocked') return new ConvoLockedError(e) - if (e.error === 'FollowRequired') return new FollowRequiredError(e) - if (e.error === 'InvalidCode') return new InvalidCodeError(e) - if (e.error === 'LinkDisabled') return new LinkDisabledError(e) - if (e.error === 'MemberLimitReached') return new MemberLimitReachedError(e) - if (e.error === 'UserKicked') return new UserKickedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts b/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts deleted file mode 100644 index 288423dba12..00000000000 --- a/packages/api/src/client/types/chat/bsky/moderation/getActorMetadata.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} - -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/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts b/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts deleted file mode 100644 index 1101469b950..00000000000 --- a/packages/api/src/client/types/chat/bsky/moderation/getMessageContext.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ChatBskyConvoDefs from '../convo/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.moderation.getMessageContext' - -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 - | $Typed - | { $type: string } - )[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/chat/bsky/moderation/subscribeModEvents.ts b/packages/api/src/client/types/chat/bsky/moderation/subscribeModEvents.ts deleted file mode 100644 index ebadfd046f3..00000000000 --- a/packages/api/src/client/types/chat/bsky/moderation/subscribeModEvents.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.moderation.subscribeModEvents' - -export interface EventConvoFirstMessage { - $type?: 'chat.bsky.moderation.subscribeModEvents#eventConvoFirstMessage' - convoId: string - createdAt: string - messageId?: string - /** The list of DIDs message recipients. Does not include the sender, which is in the `user` field */ - recipients: string[] - rev: string - /** The DID of the message author. */ - user: string -} - -const hashEventConvoFirstMessage = 'eventConvoFirstMessage' - -export function isEventConvoFirstMessage(v: V) { - return is$typed(v, id, hashEventConvoFirstMessage) -} - -export function validateEventConvoFirstMessage(v: V) { - return validate(v, id, hashEventConvoFirstMessage) -} diff --git a/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts b/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts deleted file mode 100644 index bdef5d2312f..00000000000 --- a/packages/api/src/client/types/chat/bsky/moderation/updateActorAccess.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'chat.bsky.moderation.updateActorAccess' - -export type QueryParams = {} - -export interface InputSchema { - actor: string - allowAccess: boolean - ref?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/defs.ts b/packages/api/src/client/types/com/atproto/admin/defs.ts deleted file mode 100644 index 14d86006073..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/defs.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoServerDefs from '../server/defs.js' - -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/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts b/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts deleted file mode 100644 index ad8155f5ac3..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/deleteAccount.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.deleteAccount' - -export type QueryParams = {} - -export interface InputSchema { - did: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts b/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts deleted file mode 100644 index 18b885a7070..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/disableAccountInvites.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.disableAccountInvites' - -export type QueryParams = {} - -export interface InputSchema { - account: string - /** Optional reason for disabled invites. */ - note?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts b/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts deleted file mode 100644 index 559c77a61a8..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/disableInviteCodes.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.disableInviteCodes' - -export type QueryParams = {} - -export interface InputSchema { - codes?: string[] - accounts?: string[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts b/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts deleted file mode 100644 index 4c5c12313c8..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/enableAccountInvites.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.enableAccountInvites' - -export type QueryParams = {} - -export interface InputSchema { - account: string - /** Optional reason for enabled invites. */ - note?: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts b/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts deleted file mode 100644 index 061f7781844..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/getAccountInfo.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoAdminDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.getAccountInfo' - -export type QueryParams = { - did: string -} -export type InputSchema = undefined -export type OutputSchema = ComAtprotoAdminDefs.AccountView - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts b/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts deleted file mode 100644 index 869b5076078..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/getAccountInfos.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoAdminDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.getAccountInfos' - -export type QueryParams = { - dids: string[] -} -export type InputSchema = undefined - -export interface OutputSchema { - infos: ComAtprotoAdminDefs.AccountView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts b/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts deleted file mode 100644 index 45302093022..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/getInviteCodes.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoServerDefs from '../server/defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.getInviteCodes' - -export type QueryParams = { - sort?: 'recent' | 'usage' | (string & {}) - limit?: number - cursor?: string -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - codes: ComAtprotoServerDefs.InviteCode[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts b/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts deleted file mode 100644 index cd6be1e789f..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/getSubjectStatus.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoAdminDefs from './defs.js' -import type * as ComAtprotoRepoStrongRef from '../repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.getSubjectStatus' - -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts b/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts deleted file mode 100644 index 802bb9100fb..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/searchAccounts.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoAdminDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.searchAccounts' - -export type QueryParams = { - email?: string - cursor?: string - limit?: number -} -export type InputSchema = undefined - -export interface OutputSchema { - cursor?: string - accounts: ComAtprotoAdminDefs.AccountView[] -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts b/packages/api/src/client/types/com/atproto/admin/sendEmail.ts deleted file mode 100644 index bf027d452ea..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/sendEmail.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.sendEmail' - -export type QueryParams = {} - -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 CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts deleted file mode 100644 index 82fb80661ae..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountEmail.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.updateAccountEmail' - -export type QueryParams = {} - -export interface InputSchema { - /** The handle or DID of the repo. */ - account: string - email: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts deleted file mode 100644 index 43be17f2c40..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountHandle.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.updateAccountHandle' - -export type QueryParams = {} - -export interface InputSchema { - did: string - handle: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts deleted file mode 100644 index 6bf88c5da5c..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountPassword.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.updateAccountPassword' - -export type QueryParams = {} - -export interface InputSchema { - did: string - password: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/updateAccountSigningKey.ts b/packages/api/src/client/types/com/atproto/admin/updateAccountSigningKey.ts deleted file mode 100644 index a517efca41e..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/updateAccountSigningKey.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.updateAccountSigningKey' - -export type QueryParams = {} - -export interface InputSchema { - did: string - /** Did-key formatted public key */ - signingKey: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts b/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts deleted file mode 100644 index dc26bf7295a..00000000000 --- a/packages/api/src/client/types/com/atproto/admin/updateSubjectStatus.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoAdminDefs from './defs.js' -import type * as ComAtprotoRepoStrongRef from '../repo/strongRef.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.admin.updateSubjectStatus' - -export type QueryParams = {} - -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 CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/defs.ts b/packages/api/src/client/types/com/atproto/identity/defs.ts deleted file mode 100644 index 5554b56a8cc..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/defs.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.defs' - -export interface IdentityInfo { - $type?: 'com.atproto.identity.defs#identityInfo' - did: string - /** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */ - handle: string - /** The complete DID document for the identity. */ - didDoc: { [_ in string]: unknown } -} - -const hashIdentityInfo = 'identityInfo' - -export function isIdentityInfo(v: V) { - return is$typed(v, id, hashIdentityInfo) -} - -export function validateIdentityInfo(v: V) { - return validate(v, id, hashIdentityInfo) -} diff --git a/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts b/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts deleted file mode 100644 index d05cfb78d71..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.getRecommendedDidCredentials' - -export type QueryParams = {} -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 interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/refreshIdentity.ts b/packages/api/src/client/types/com/atproto/identity/refreshIdentity.ts deleted file mode 100644 index 4716d466052..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/refreshIdentity.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoIdentityDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.refreshIdentity' - -export type QueryParams = {} - -export interface InputSchema { - identifier: string -} - -export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class HandleNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidDeactivatedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'HandleNotFound') return new HandleNotFoundError(e) - if (e.error === 'DidNotFound') return new DidNotFoundError(e) - if (e.error === 'DidDeactivated') return new DidDeactivatedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts b/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts deleted file mode 100644 index 9b81702a753..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.requestPlcOperationSignature' - -export type QueryParams = {} -export type InputSchema = undefined - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/resolveDid.ts b/packages/api/src/client/types/com/atproto/identity/resolveDid.ts deleted file mode 100644 index d49d5e18004..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/resolveDid.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.resolveDid' - -export type QueryParams = { - /** DID to resolve. */ - did: string -} -export type InputSchema = undefined - -export interface OutputSchema { - /** The complete DID document for the identity. */ - didDoc: { [_ in string]: unknown } -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class DidNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidDeactivatedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'DidNotFound') return new DidNotFoundError(e) - if (e.error === 'DidDeactivated') return new DidDeactivatedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts b/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts deleted file mode 100644 index 40a212cb3c4..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/resolveHandle.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.resolveHandle' - -export type QueryParams = { - /** The handle to resolve. */ - handle: string -} -export type InputSchema = undefined - -export interface OutputSchema { - did: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class HandleNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'HandleNotFound') return new HandleNotFoundError(e) - } - - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/resolveIdentity.ts b/packages/api/src/client/types/com/atproto/identity/resolveIdentity.ts deleted file mode 100644 index c9bd2011483..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/resolveIdentity.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' -import type * as ComAtprotoIdentityDefs from './defs.js' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.resolveIdentity' - -export type QueryParams = { - /** Handle or DID to resolve. */ - identifier: string -} -export type InputSchema = undefined -export type OutputSchema = ComAtprotoIdentityDefs.IdentityInfo - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export class HandleNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidNotFoundError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export class DidDeactivatedError extends XRPCError { - constructor(src: XRPCError) { - super(src.status, src.error, src.message, src.headers, { cause: src }) - } -} - -export function toKnownErr(e: any) { - if (e instanceof XRPCError) { - if (e.error === 'HandleNotFound') return new HandleNotFoundError(e) - if (e.error === 'DidNotFound') return new DidNotFoundError(e) - if (e.error === 'DidDeactivated') return new DidDeactivatedError(e) - } - - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts b/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts deleted file mode 100644 index af85c98cab7..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/signPlcOperation.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.signPlcOperation' - -export type QueryParams = {} - -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 CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap - data: OutputSchema -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts b/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts deleted file mode 100644 index d31992acd3b..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/submitPlcOperation.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.submitPlcOperation' - -export type QueryParams = {} - -export interface InputSchema { - operation: { [_ in string]: unknown } -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/identity/updateHandle.ts b/packages/api/src/client/types/com/atproto/identity/updateHandle.ts deleted file mode 100644 index 44ebc7d07fd..00000000000 --- a/packages/api/src/client/types/com/atproto/identity/updateHandle.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { HeadersMap, XRPCError } from '@atproto/xrpc' -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -const is$typed = _is$typed, - validate = _validate -const id = 'com.atproto.identity.updateHandle' - -export type QueryParams = {} - -export interface InputSchema { - /** The new handle. */ - handle: string -} - -export interface CallOptions { - signal?: AbortSignal - headers?: HeadersMap - qp?: QueryParams - encoding?: 'application/json' -} - -export interface Response { - success: boolean - headers: HeadersMap -} - -export function toKnownErr(e: any) { - return e -} diff --git a/packages/api/src/client/types/com/atproto/label/defs.ts b/packages/api/src/client/types/com/atproto/label/defs.ts deleted file mode 100644 index c9b0fb813c6..00000000000 --- a/packages/api/src/client/types/com/atproto/label/defs.ts +++ /dev/null @@ -1,143 +0,0 @@ -/** - * GENERATED CODE - DO NOT MODIFY - */ -import { type ValidationResult, BlobRef } from '@atproto/lexicon' -import { CID } from 'multiformats/cid' -import { validate as _validate } from '../../../../lexicons' -import { - type $Typed, - is$typed as _is$typed, - type OmitKey, -} from '../../../../util' - -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