Compare commits

..

3 Commits

Author SHA1 Message Date
445f38c6be filter embed 2025-01-15 01:51:45 -05:00
f8a71d0aab maximum call stack size exceeded fuckin 2025-01-15 01:06:55 -05:00
49c8c9f124 filter youtube tracking links 2025-01-15 00:53:22 -05:00
2472 changed files with 28894 additions and 110217 deletions

View File

@ -1,5 +0,0 @@
---
"@atproto/api": patch
---
Add verification state to profile view lexicons

View File

@ -1,5 +0,0 @@
---
"@atproto/oauth-provider-frontend": patch
---
Minor UI/UX tweaks

View File

@ -1,50 +1,26 @@
{
"root": true,
// parse TypeScript files
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser
"parser": "@typescript-eslint/parser",
// configure eslint using options described at
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/base",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
"prettier"
],
"plugins": ["n"],
"ignorePatterns": ["dist", "node_modules"],
"rules": {
"no-var": "error",
"prefer-const": "warn",
"no-misleading-character-class": "warn",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"n/global-require": "error",
"n/no-extraneous-import": "error",
"n/prefer-node-protocol": "error",
"import/extensions": ["off", "ignorePackages"],
"import/export": "off",
"import/namespace": "off",
"import/no-deprecated": "error",
"import/no-absolute-path": "error",
"import/no-dynamic-require": "error",
"import/no-self-import": "error",
"import/order": [
"error",
{
"named": true,
"distinctGroup": true,
"alphabetize": { "order": "asc" },
"newlines-between": "never",
"groups": [
"builtin",
"external",
"internal",
"parent",
["index", "sibling"],
"object"
]
}
],
"@typescript-eslint/no-unused-vars": [
"error",
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
],
"@typescript-eslint/ban-ts-comment": "off",
@ -67,34 +43,6 @@
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["**/*.test.ts", "**/tests/**/*.ts"],
"rules": {
"n/no-extraneous-import": [
"error",
{ "allowModules": ["@atproto/dev-env"] }
]
}
}
],
"settings": {
"node": { "version": ">=18.7.0" },
"import/internal-regex": "^@atproto(?:-labs)?/",
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/resolver": {
"typescript": {
"project": [
"tsconfig.json",
"packages/oauth/*/tsconfig.json",
"packages/oauth/*/tsconfig.src.json",
"packages/internal/*/tsconfig.json",
"packages/*/tsconfig.json"
]
},
"node": {
"extensions": [".js", ".jsx", ".json"]
}
}
}
]
}

View File

@ -12,7 +12,7 @@ env:
jobs:
bsky-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -3,7 +3,6 @@ on:
push:
branches:
- main
- divy/etcd-dp-host-list
env:
REGISTRY: ghcr.io
USERNAME: ${{ github.actor }}
@ -15,7 +14,7 @@ env:
jobs:
bsky-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -12,7 +12,7 @@ env:
jobs:
bsync-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -14,7 +14,7 @@ env:
jobs:
bsync-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -3,7 +3,7 @@ on:
push:
branches:
- main
- divy/ozone-metadata
- divy/ozone-passthru
env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }}
USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }}
@ -13,7 +13,7 @@ env:
jobs:
ozone-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -14,7 +14,7 @@ env:
jobs:
ozone-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -12,7 +12,7 @@ env:
jobs:
pds-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -14,7 +14,7 @@ env:
jobs:
pds-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

View File

@ -13,7 +13,7 @@ jobs:
build:
name: Build & Publish
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

View File

@ -12,7 +12,7 @@ concurrency:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable && corepack prepare --activate
@ -35,7 +35,6 @@ jobs:
path: |
packages/*/dist
packages/*/*/dist
packages/oauth/*/src/locales/*/messages.ts
retention-days: 1
test:
name: Test
@ -43,7 +42,7 @@ jobs:
strategy:
matrix:
shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable && corepack prepare --activate
@ -67,7 +66,7 @@ jobs:
verify:
name: Verify
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable && corepack prepare --activate

2
.gitignore vendored
View File

@ -5,12 +5,12 @@ yarn-error.log
packages/**/dist
.idea
packages/*/coverage
.vscode/
test.sqlite
.DS_Store
*.log
*.tsbuildinfo
.*.env
.env.*
.env
\#*\#
*~

1
.npmrc
View File

@ -1,2 +1 @@
enable-pre-post-scripts = true
include-workspace-root = true

View File

@ -1,19 +1,12 @@
node_modules
interop-test-files
__snapshots__
dist
build
.nyc_output
coverage
pnpm-lock.yaml
.pnpm*
.changeset
*.d.ts
packages/bsky/src/data-plane/gen
CHANGELOG.md
# Prettier is used to format the code during codegen
packages/api/src/client
packages/bsky/src/lexicon
packages/pds/src/lexicon
packages/ozone/src/lexicon
# Automatically generated by lingui
packages/oauth/*/src/locales/*/messages.ts
packages/oauth/oauth-provider-frontend/src/routeTree.gen.ts

View File

@ -3,20 +3,12 @@
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"plugins": ["prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.hbs",
"options": {
"singleQuote": false
}
},
{
"files": [".eslintrc"],
"options": {
"parser": "json",
"trailingComma": "none"
}
}
]
}

View File

@ -1,8 +0,0 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"wengerk.highlight-bad-chars",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}

51
.vscode/settings.json vendored
View File

@ -1,51 +0,0 @@
{
"cSpell.language": "en,en-US",
"cSpell.userWords": [
"algs",
"appview",
"atproto",
"blockstore",
"bluesky",
"bsky",
"bsync",
"clsx",
"consolas",
"dpop",
"googleusercontent",
"hcaptcha",
"hexeditor",
"ingester",
"insertable",
"jwks",
"keypair",
"kysely",
"merkle",
"msid",
"multibase",
"multiformats",
"nameserver",
"oidc",
"pkce",
"ponyfill",
"proxied",
"ssrf",
"undici",
"webcrypto",
"whatwg",
"xrpc"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.sortImports": "never"
},
"files.associations": {
"**/tsconfig/*.json": "jsonc"
},
"files.defaultLanguage": "ts",
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "es5",
"typescript.tsdk": "node_modules/typescript/lib"
}

View File

@ -19,7 +19,3 @@ ATProto receives so many contributions that we could never list everyone who des
#### [goeo\_](https://bsky.app/profile/did:web:genco.me), Security disclosure, May 2024
#### [DavidBuchanan314](https://github.com/DavidBuchanan314), Security disclosure, November 2024
#### [daniel](https://hackerone.com/daniel), Security disclosure, November 2024
#### [imax](https://github.com/imax9000), Security disclosure, January 2025

View File

@ -1,6 +1,6 @@
Dual MIT/Apache-2.0 License
Copyright (c) 2022-2025 Bluesky PBC, and Contributors
Copyright (c) 2022-2024 Bluesky PBC, and Contributors
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).

View File

@ -28,7 +28,12 @@ run-dev-env-logged: ## Run a "development environment" shell (with logging)
.PHONY: codegen
codegen: ## Re-generate packages from lexicon/ files
pnpm codegen
cd packages/api; pnpm run codegen
cd packages/pds; pnpm run codegen
cd packages/bsky; pnpm run codegen
cd packages/ozone; pnpm run codegen
# clean up codegen output
pnpm format
.PHONY: lint
lint: ## Run style checks and verify syntax
@ -38,10 +43,6 @@ lint: ## Run style checks and verify syntax
fmt: ## Run syntax re-formatting
pnpm format
.PHONY: fmt-lexicons
fmt-lexicons: ## Run syntax re-formatting, just on .json files
pnpm exec eslint ./lexicons/ --ext .json --fix
.PHONY: deps
deps: ## Installs dependent libs using 'pnpm install'
pnpm install --frozen-lockfile

View File

@ -32,4 +32,3 @@ at://did:abc:123/io.nsid.someFunc/-
at://did:abc:123/io.nsid.someFunc/_
at://did:abc:123/io.nsid.someFunc/~
at://did:abc:123/io.nsid.someFunc/...
at://did:plc:asdf123/com.atproto.feed.postV2

View File

@ -3,13 +3,15 @@ com.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.foo
com.example.oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
com.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.foo
# invalid examples
# invliad examples
com.example.foo.*
com.example.foo.blah*
com.example.foo.*blah
com.example.f00
com.exa💩ple.thing
a-0.b-1.c-3
a-0.b-1.c-o
a0.b1.c3
1.0.0.127.record
0two.example.foo
example.com
@ -27,4 +29,4 @@ com.atproto.feed.p*st
com.atproto.feed.po#t
com.atproto.feed.p!ot
com.example-.foo
com.example.fooBar.2

View File

@ -5,7 +5,6 @@ com.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle.middle
# valid examples
com.example.fooBar
com.example.fooBarV2
net.users.bob.ping
a.b.c
m.xn--masekowski-d0b.pl
@ -19,8 +18,6 @@ test.12345.record
a01.thing.record
a.0.c
xn--fiqs8s.xn--fiqa61au8b7zsevnm8ak20mc4a87e.record.two
a0.b1.c3
com.example.f00
# allows onion (Tor) NSIDs
onion.expyuzz4wqqyqhjn.spec.getThing

View File

@ -23,11 +23,7 @@
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"createdAt": { "type": "string", "format": "datetime" },
"verification": {
"type": "ref",
"ref": "#verificationState"
}
"createdAt": { "type": "string", "format": "datetime" }
}
},
"profileView": {
@ -57,10 +53,6 @@
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"verification": {
"type": "ref",
"ref": "#verificationState"
}
}
},
@ -103,10 +95,6 @@
"pinnedPost": {
"type": "ref",
"ref": "com.atproto.repo.strongRef"
},
"verification": {
"type": "ref",
"ref": "#verificationState"
}
}
},
@ -170,54 +158,6 @@
}
}
},
"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": "#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": {
@ -234,8 +174,7 @@
"#mutedWordsPref",
"#hiddenPostsPref",
"#bskyAppStatePref",
"#labelersPref",
"#postInteractionSettingsPref"
"#labelersPref"
]
}
},
@ -529,36 +468,6 @@
"description": "The date and time at which the NUX will expire and should be considered completed."
}
}
},
"postInteractionSettingsPref": {
"type": "object",
"description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",
"required": [],
"properties": {
"threadgateAllowRules": {
"description": "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",
"type": "array",
"maxLength": 5,
"items": {
"type": "union",
"refs": [
"app.bsky.feed.threadgate#mentionRule",
"app.bsky.feed.threadgate#followerRule",
"app.bsky.feed.threadgate#followingRule",
"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": ["app.bsky.feed.postgate#disableRule"]
}
}
}
}
}
}

View File

@ -9,9 +9,8 @@
"properties": {
"video": {
"type": "blob",
"description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.",
"accept": ["video/mp4"],
"maxSize": 100000000
"maxSize": 50000000
},
"captions": {
"type": "array",

View File

@ -48,13 +48,6 @@
"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"],
@ -115,8 +108,7 @@
"type": "union",
"refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"]
}
},
"threadContext": { "type": "ref", "ref": "#threadContext" }
}
}
},
"notFoundPost": {
@ -170,13 +162,6 @@
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"viewer": { "type": "ref", "ref": "#generatorViewerState" },
"contentMode": {
"type": "string",
"knownValues": [
"app.bsky.feed.defs#contentModeUnspecified",
"app.bsky.feed.defs#contentModeVideo"
]
},
"indexedAt": { "type": "string", "format": "datetime" }
}
},
@ -277,14 +262,6 @@
"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"

View File

@ -39,13 +39,6 @@
"description": "Self-label values",
"refs": ["com.atproto.label.defs#selfLabels"]
},
"contentMode": {
"type": "string",
"knownValues": [
"app.bsky.feed.defs#contentModeUnspecified",
"app.bsky.feed.defs#contentModeVideo"
]
},
"createdAt": { "type": "string", "format": "datetime" }
}
}

View File

@ -24,8 +24,7 @@
"posts_with_replies",
"posts_no_replies",
"posts_with_media",
"posts_and_author_threads",
"posts_with_video"
"posts_and_author_threads"
],
"default": "posts_with_replies"
},

View File

@ -26,7 +26,6 @@
"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": {

View File

@ -16,17 +16,11 @@
"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": [
"#mentionRule",
"#followerRule",
"#followingRule",
"#listRule"
]
"refs": ["#mentionRule", "#followingRule", "#listRule"]
}
},
"createdAt": { "type": "string", "format": "datetime" },
@ -47,11 +41,6 @@
"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.",

View File

@ -1,36 +0,0 @@
{
"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"
}
}
}
}
}
}

View File

@ -35,27 +35,6 @@
"labels": {
"type": "array",
"items": { "type": "ref", "ref": "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": "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": "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" }
}
}
},

View File

@ -18,28 +18,7 @@
"type": "union",
"refs": ["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": "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": "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" }
}
"createdAt": { "type": "string", "format": "datetime" }
}
}
}

View File

@ -32,60 +32,6 @@
"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": "app.bsky.actor.defs#profileViewBasic"
}
}
}
}
}
}

View File

@ -1,37 +0,0 @@
{
"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": "app.bsky.feed.defs#generatorView"
}
}
}
}
}
}
}
}

View File

@ -1,42 +0,0 @@
{
"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"
}
}
}
}
}
}
}
}

View File

@ -1,37 +0,0 @@
{
"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": "app.bsky.graph.defs#starterPackView"
}
}
}
}
}
}
}
}

View File

@ -1,42 +0,0 @@
{
"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"
}
}
}
}
}
}
}
}

View File

@ -1,41 +0,0 @@
{
"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": "app.bsky.actor.defs#profileView"
}
}
}
}
}
}
}
}

View File

@ -1,46 +0,0 @@
{
"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"
}
}
}
}
}
}
}
}

View File

@ -1,37 +0,0 @@
{
"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": "app.bsky.unspecced.defs#trendView"
}
}
}
}
}
}
}
}

View File

@ -1,42 +0,0 @@
{
"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": "app.bsky.unspecced.defs#skeletonTrend"
}
}
}
}
}
}
}
}

View File

@ -1,31 +0,0 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.acceptConvo",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["convoId"],
"properties": {
"convoId": { "type": "string" }
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"rev": {
"description": "Rev when the convo was accepted. If not present, the convo was already accepted.",
"type": "string"
}
}
}
}
}
}
}

View File

@ -1,55 +0,0 @@
{
"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": "chat.bsky.convo.defs#messageView"
}
}
}
},
"errors": [
{
"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."
}
]
}
}
}

View File

@ -51,11 +51,6 @@
"type": "union",
"refs": ["app.bsky.embed.record#view"]
},
"reactions": {
"type": "array",
"description": "Reactions to this message, in ascending order of creation time.",
"items": { "type": "ref", "ref": "#reactionView" }
},
"sender": { "type": "ref", "ref": "#messageViewSender" },
"sentAt": { "type": "string", "format": "datetime" }
}
@ -77,30 +72,6 @@
"did": { "type": "string", "format": "did" }
}
},
"reactionView": {
"type": "object",
"required": ["value", "sender", "createdAt"],
"properties": {
"value": { "type": "string" },
"sender": { "type": "ref", "ref": "#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": "#messageView" },
"reaction": { "type": "ref", "ref": "#reactionView" }
}
},
"convoView": {
"type": "object",
"required": ["id", "rev", "members", "muted", "unreadCount"],
@ -118,15 +89,8 @@
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
},
"lastReaction": {
"type": "union",
"refs": ["#messageAndReactionView"]
},
"muted": { "type": "boolean" },
"status": {
"type": "string",
"knownValues": ["request", "accepted"]
},
"opened": { "type": "boolean" },
"unreadCount": { "type": "integer" }
}
},
@ -138,14 +102,6 @@
"convoId": { "type": "string" }
}
},
"logAcceptConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logLeaveConvo": {
"type": "object",
"required": ["rev", "convoId"],
@ -154,22 +110,6 @@
"convoId": { "type": "string" }
}
},
"logMuteConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logUnmuteConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logCreateMessage": {
"type": "object",
"required": ["rev", "convoId", "message"],
@ -193,44 +133,6 @@
"refs": ["#messageView", "#deletedMessageView"]
}
}
},
"logReadMessage": {
"type": "object",
"required": ["rev", "convoId", "message"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" },
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
}
}
},
"logAddReaction": {
"type": "object",
"required": ["rev", "convoId", "message", "reaction"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" },
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
},
"reaction": { "type": "ref", "ref": "#reactionView" }
}
},
"logRemoveReaction": {
"type": "object",
"required": ["rev", "convoId", "message", "reaction"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" },
"message": {
"type": "union",
"refs": ["#messageView", "#deletedMessageView"]
},
"reaction": { "type": "ref", "ref": "#reactionView" }
}
}
}
}

View File

@ -1,41 +0,0 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.getConvoAvailability",
"defs": {
"main": {
"type": "query",
"description": "Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned.",
"parameters": {
"type": "params",
"required": ["members"],
"properties": {
"members": {
"type": "array",
"minLength": 1,
"maxLength": 10,
"items": {
"type": "string",
"format": "did"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["canChat"],
"properties": {
"canChat": {
"type": "boolean"
},
"convo": {
"type": "ref",
"ref": "chat.bsky.convo.defs#convoView"
}
}
}
}
}
}
}

View File

@ -24,15 +24,9 @@
"type": "union",
"refs": [
"chat.bsky.convo.defs#logBeginConvo",
"chat.bsky.convo.defs#logAcceptConvo",
"chat.bsky.convo.defs#logLeaveConvo",
"chat.bsky.convo.defs#logMuteConvo",
"chat.bsky.convo.defs#logUnmuteConvo",
"chat.bsky.convo.defs#logCreateMessage",
"chat.bsky.convo.defs#logDeleteMessage",
"chat.bsky.convo.defs#logReadMessage",
"chat.bsky.convo.defs#logAddReaction",
"chat.bsky.convo.defs#logRemoveReaction"
"chat.bsky.convo.defs#logDeleteMessage"
]
}
}

View File

@ -13,15 +13,7 @@
"maximum": 100,
"default": 50
},
"cursor": { "type": "string" },
"readState": {
"type": "string",
"knownValues": ["unread"]
},
"status": {
"type": "string",
"knownValues": ["request", "accepted"]
}
"cursor": { "type": "string" }
}
},
"output": {

View File

@ -1,51 +0,0 @@
{
"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": "chat.bsky.convo.defs#messageView"
}
}
}
},
"errors": [
{
"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."
}
]
}
}
}

View File

@ -1,34 +0,0 @@
{
"lexicon": 1,
"id": "chat.bsky.convo.updateAllRead",
"defs": {
"main": {
"type": "procedure",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"knownValues": ["request", "accepted"]
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["updatedCount"],
"properties": {
"updatedCount": {
"description": "The count of updated convos.",
"type": "integer"
}
}
}
}
}
}
}

View File

@ -1,25 +0,0 @@
{
"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"
}
}
}
}
}
}
}

View File

@ -1,22 +0,0 @@
{
"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."
}
}
}
}
}

View File

@ -1,44 +0,0 @@
{
"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": "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."
}
]
}
}
}

View File

@ -1,44 +0,0 @@
{
"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."
}
]
}
}
}

View File

@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",
"description": "Resolves a handle (domain name) to a DID.",
"parameters": {
"type": "params",
"required": ["handle"],
@ -25,13 +25,7 @@
"did": { "type": "string", "format": "did" }
}
}
},
"errors": [
{
"name": "HandleNotFound",
"description": "The resolution process confirmed that the handle does not resolve to any DID."
}
]
}
}
}
}

View File

@ -1,42 +0,0 @@
{
"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": "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."
}
]
}
}
}

View File

@ -1,21 +0,0 @@
{
"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."
}
}
}
}
}
}

View File

@ -41,11 +41,6 @@
"reasonAppeal": {
"type": "token",
"description": "Appeal: appeal a previously taken moderation action"
},
"subjectType": {
"type": "string",
"description": "Tag describing a type of subject that might be reported.",
"knownValues": ["account", "record", "chat"]
}
}
}

View File

@ -70,12 +70,7 @@
"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."
},
"rkey": { "type": "string", "maxLength": 512 },
"value": { "type": "unknown" }
}
},
@ -85,7 +80,7 @@
"required": ["collection", "rkey", "value"],
"properties": {
"collection": { "type": "string", "format": "nsid" },
"rkey": { "type": "string", "format": "record-key" },
"rkey": { "type": "string" },
"value": { "type": "unknown" }
}
},
@ -95,7 +90,7 @@
"required": ["collection", "rkey"],
"properties": {
"collection": { "type": "string", "format": "nsid" },
"rkey": { "type": "string", "format": "record-key" }
"rkey": { "type": "string" }
}
},
"createResult": {

View File

@ -23,7 +23,6 @@
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "The Record Key.",
"maxLength": 512
},

View File

@ -7,7 +7,7 @@
"required": ["cid", "rev"],
"properties": {
"cid": { "type": "string", "format": "cid" },
"rev": { "type": "string", "format": "tid" }
"rev": { "type": "string" }
}
}
}

View File

@ -23,7 +23,6 @@
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "The Record Key."
},
"swapRecord": {

View File

@ -19,11 +19,7 @@
"format": "nsid",
"description": "The NSID of the record collection."
},
"rkey": {
"type": "string",
"description": "The Record Key.",
"format": "record-key"
},
"rkey": { "type": "string", "description": "The Record Key." },
"cid": {
"type": "string",
"format": "cid",

View File

@ -27,6 +27,14 @@
"description": "The number of records to return."
},
"cursor": { "type": "string" },
"rkeyStart": {
"type": "string",
"description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)"
},
"rkeyEnd": {
"type": "string",
"description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)"
},
"reverse": {
"type": "boolean",
"description": "Flag to reverse the order of the returned records."

View File

@ -24,7 +24,6 @@
},
"rkey": {
"type": "string",
"format": "record-key",
"description": "The Record Key.",
"maxLength": 512
},

View File

@ -1,10 +0,0 @@
{
"lexicon": 1,
"id": "com.atproto.sync.defs",
"defs": {
"hostStatus": {
"type": "string",
"knownValues": ["active", "idle", "offline", "throttled", "banned"]
}
}
}

View File

@ -1,43 +0,0 @@
{
"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": "com.atproto.sync.defs#hostStatus"
}
}
}
},
"errors": [{ "name": "HostNotFound" }]
}
}
}

View File

@ -23,7 +23,7 @@
"required": ["cid", "rev"],
"properties": {
"cid": { "type": "string", "format": "cid" },
"rev": { "type": "string", "format": "tid" }
"rev": { "type": "string" }
}
}
},

View File

@ -15,10 +15,11 @@
"description": "The DID of the repo."
},
"collection": { "type": "string", "format": "nsid" },
"rkey": {
"rkey": { "type": "string", "description": "Record Key" },
"commit": {
"type": "string",
"description": "Record Key",
"format": "record-key"
"format": "cid",
"description": "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit"
}
}
},

View File

@ -16,7 +16,6 @@
},
"since": {
"type": "string",
"format": "tid",
"description": "The revision ('rev') of the repo to create a diff from."
}
}

View File

@ -27,18 +27,10 @@
"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"
]
"knownValues": ["takendown", "suspended", "deactivated"]
},
"rev": {
"type": "string",
"format": "tid",
"description": "Optional field, the current rev of the repo, if active=true"
}
}

View File

@ -16,7 +16,6 @@
},
"since": {
"type": "string",
"format": "tid",
"description": "Optional revision of the repo to list blobs since."
},
"limit": {

View File

@ -1,56 +0,0 @@
{
"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": "#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": "com.atproto.sync.defs#hostStatus"
}
}
}
}
}

View File

@ -42,19 +42,12 @@
"format": "cid",
"description": "Current repo commit CID"
},
"rev": { "type": "string", "format": "tid" },
"rev": { "type": "string" },
"active": { "type": "boolean" },
"status": {
"type": "string",
"description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
"knownValues": [
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
"knownValues": ["takendown", "suspended", "deactivated"]
}
}
}

View File

@ -1,46 +0,0 @@
{
"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": "#repo" }
}
}
}
}
},
"repo": {
"type": "object",
"required": ["did"],
"properties": {
"did": { "type": "string", "format": "did" }
}
}
}
}

View File

@ -4,7 +4,7 @@
"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",
"description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.",
"input": {
"encoding": "application/json",
"schema": {

View File

@ -17,8 +17,7 @@
}
}
}
},
"errors": [{ "name": "HostBanned" }]
}
}
}
}

View File

@ -17,7 +17,15 @@
"message": {
"schema": {
"type": "union",
"refs": ["#commit", "#sync", "#identity", "#account", "#info"]
"refs": [
"#commit",
"#identity",
"#account",
"#handle",
"#migrate",
"#tombstone",
"#info"
]
}
},
"errors": [
@ -44,7 +52,7 @@
"blobs",
"time"
],
"nullable": ["since"],
"nullable": ["prev", "since"],
"properties": {
"seq": {
"type": "integer",
@ -53,31 +61,33 @@
"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."
"description": "Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data."
},
"repo": {
"type": "string",
"format": "did",
"description": "The repo this event comes from. Note that all other message types name this field 'did'."
"description": "The repo this event comes from."
},
"commit": {
"type": "cid-link",
"description": "Repo commit object CID."
},
"prev": {
"type": "cid-link",
"description": "DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability."
},
"rev": {
"type": "string",
"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
"description": "CAR file containing relevant blocks, as a diff since the previous repo state.",
"maxLength": 1000000
},
"ops": {
"type": "array",
@ -92,43 +102,9 @@
"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."
"description": "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",
@ -166,17 +142,43 @@
"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"
]
"knownValues": ["takendown", "suspended", "deleted", "deactivated"]
}
}
},
"handle": {
"type": "object",
"description": "DEPRECATED -- Use #identity event instead",
"required": ["seq", "did", "handle", "time"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"handle": { "type": "string", "format": "handle" },
"time": { "type": "string", "format": "datetime" }
}
},
"migrate": {
"type": "object",
"description": "DEPRECATED -- Use #account event instead",
"required": ["seq", "did", "migrateTo", "time"],
"nullable": ["migrateTo"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"migrateTo": { "type": "string" },
"time": { "type": "string", "format": "datetime" }
}
},
"tombstone": {
"type": "object",
"description": "DEPRECATED -- Use #account event instead",
"required": ["seq", "did", "time"],
"properties": {
"seq": { "type": "integer" },
"did": { "type": "string", "format": "did" },
"time": { "type": "string", "format": "datetime" }
}
},
"info": {
"type": "object",
"required": ["name"],
@ -204,10 +206,6 @@
"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."
}
}
}

View File

@ -34,8 +34,7 @@
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent",
"#modEventPriorityScore"
"#recordEvent"
]
},
"subject": {
@ -85,8 +84,7 @@
"#modEventTag",
"#accountEvent",
"#identityEvent",
"#recordEvent",
"#modEventPriorityScore"
"#recordEvent"
]
},
"subject": {
@ -145,12 +143,6 @@
"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"
@ -190,110 +182,6 @@
"tags": {
"type": "array",
"items": { "type": "string" }
},
"accountStats": {
"description": "Statistics related to the account subject",
"type": "ref",
"ref": "#accountStats"
},
"recordsStats": {
"description": "Statistics related to the record subjects authored by the subject's account",
"type": "ref",
"ref": "#recordsStats"
}
}
},
"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": "com.atproto.moderation.defs#subjectType"
},
"subject": {
"type": "string"
},
"status": {
"type": "ref",
"ref": "#subjectStatusView"
},
"repo": {
"type": "ref",
"ref": "#repoViewDetail"
},
"profile": {
"type": "union",
"refs": []
},
"record": {
"type": "ref",
"ref": "#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"
}
}
},
@ -367,7 +255,8 @@
},
"modEventComment": {
"type": "object",
"description": "Add a comment to a subject. An empty comment will clear any previously set sticky comment.",
"description": "Add a comment to a subject",
"required": ["comment"],
"properties": {
"comment": {
"type": "string"
@ -411,25 +300,6 @@
"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
}
}
},
@ -841,58 +711,6 @@
"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."
}
}
}
}
}

View File

@ -27,12 +27,10 @@
"tools.ozone.moderation.defs#modEventReverseTakedown",
"tools.ozone.moderation.defs#modEventResolveAppeal",
"tools.ozone.moderation.defs#modEventEmail",
"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#recordEvent"
]
},
"subject": {

View File

@ -1,40 +0,0 @@
{
"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": "tools.ozone.moderation.defs#reporterStats"
}
}
}
}
}
}
}
}

View File

@ -1,40 +0,0 @@
{
"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": "tools.ozone.moderation.defs#subjectView"
}
}
}
}
}
}
}
}

View File

@ -107,13 +107,7 @@
"sortField": {
"type": "string",
"default": "lastReportedAt",
"enum": [
"lastReviewedAt",
"lastReportedAt",
"reportedRecordsCount",
"takendownRecordsCount",
"priorityScore"
]
"enum": ["lastReviewedAt", "lastReportedAt"]
},
"sortDirection": {
"type": "string",
@ -164,24 +158,6 @@
"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."
}
}
},

View File

@ -8,27 +8,13 @@
"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"
}
"cursor": { "type": "string" }
}
},
"output": {
@ -37,9 +23,7 @@
"type": "object",
"required": ["members"],
"properties": {
"cursor": {
"type": "string"
},
"cursor": { "type": "string" },
"members": {
"type": "array",
"items": {

View File

@ -6,12 +6,12 @@
"license": "MIT",
"private": true,
"engines": {
"node": ">=18.7.0"
"node": "18"
},
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
"packageManager": "pnpm@8.15.9",
"scripts": {
"lint:fix": "pnpm lint --fix",
"lint": "eslint . --ext .ts,.js,.tsx,.jsx",
"lint": "eslint . --ext .ts,.js",
"style:fix": "prettier --write .",
"style": "prettier --check .",
"verify": "pnpm --stream '/^verify:.+$/'",
@ -19,13 +19,12 @@
"verify:lint": "pnpm lint",
"verify:types": "tsc --build tsconfig.json",
"format": "pnpm lint:fix && pnpm style:fix",
"precodegen": "pnpm run --recursive --stream --filter '@atproto/lex-cli...' build --force",
"codegen": "pnpm run --sort --recursive --stream --parallel codegen",
"build": "pnpm run --sort --recursive --stream '/^(build|build:.+)$/'",
"dev": "NODE_ENV=development pnpm run --recursive --parallel --stream '/^(dev|dev:.+)$/'",
"dev:tsc": "tsc --build tsconfig.json --preserveWatchOutput --watch",
"test": "LOG_ENABLED=false ./packages/dev-infra/with-test-redis-and-db.sh pnpm test --stream --recursive",
"test:withFlags": "pnpm run test --",
"build": "pnpm --recursive --stream build",
"dev": "NODE_ENV=development pnpm --stream '/^dev:.+$/'",
"dev:tsc": "tsc --build tsconfig.json --watch",
"dev:pkg": "pnpm --recursive --parallel --stream dev",
"test": "LOG_ENABLED=false ./packages/dev-infra/with-test-redis-and-db.sh pnpm --stream -r test",
"test:withFlags": "LOG_ENABLED=false ./packages/dev-infra/with-test-redis-and-db.sh pnpm --stream -r test --",
"changeset": "changeset",
"release": "pnpm build && changeset publish",
"version-packages": "changeset version && git add ."
@ -43,17 +42,13 @@
"dotenv": "^16.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-n": "^17.15.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^28.1.2",
"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.2"
"typescript": "^5.6.3"
},
"workspaces": {
"packages": [

View File

@ -1,260 +1,5 @@
# @atproto/api
## 0.15.0
### Minor Changes
- [#3715](https://github.com/bluesky-social/atproto/pull/3715) [`23462184d`](https://github.com/bluesky-social/atproto/commit/23462184dc941ba2fc3b4d054985a53715585020) Thanks [@knotbin](https://github.com/knotbin)! - run codegen for changes in lex-cli
## 0.14.22
### Patch Changes
- [#3714](https://github.com/bluesky-social/atproto/pull/3714) [`fc61662d7`](https://github.com/bluesky-social/atproto/commit/fc61662d7b88597f78383e37ee54264a8bb4b670) Thanks [@bnewbold](https://github.com/bnewbold)! - new lexicons: listHosts and getHostStatus endpoints under com.atproto.sync
- [#3741](https://github.com/bluesky-social/atproto/pull/3741) [`ca07871c4`](https://github.com/bluesky-social/atproto/commit/ca07871c487abc99fe7b7f8671aa8d98eb5dc4bb) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Update reaction limit on chat lexicon
## 0.14.21
### Patch Changes
- [#3724](https://github.com/bluesky-social/atproto/pull/3724) [`8b7bf7e8f`](https://github.com/bluesky-social/atproto/commit/8b7bf7e8f0e5447c68633a87a2a3cff99f9e7e1c) Thanks [@haileyok](https://github.com/haileyok)! - Return `ProfileView` from `getSuggestedUsers` unspecced endpoint
## 0.14.20
### Patch Changes
- [#3713](https://github.com/bluesky-social/atproto/pull/3713) [`0e681d303`](https://github.com/bluesky-social/atproto/commit/0e681d3036fd0b35c6d2198638392051b2ce4c81) Thanks [@haileyok](https://github.com/haileyok)! - add `getSuggestedUsers` and `getSuggestedUsersSkeleton`
## 0.14.19
### Patch Changes
- [#3680](https://github.com/bluesky-social/atproto/pull/3680) [`efb302db1`](https://github.com/bluesky-social/atproto/commit/efb302db1a615b68795c725a22489dbd0400e011) Thanks [@haileyok](https://github.com/haileyok)! - Add unspecced `getSuggestedFeeds` and associated types
- Updated dependencies [[`4db923ca1`](https://github.com/bluesky-social/atproto/commit/4db923ca1c4fadd31d41c851933659e5186ee144)]:
- @atproto/common-web@0.4.1
- @atproto/lexicon@0.4.10
- @atproto/xrpc@0.6.12
## 0.14.18
### Patch Changes
- [#3706](https://github.com/bluesky-social/atproto/pull/3706) [`04b6230cd`](https://github.com/bluesky-social/atproto/commit/04b6230cd2fbfe4a06cb00ab8ccb8e6c87c6c546) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Return `StarterPackView` instead of `StarterPackViewBasic` from `getSuggestedStarterPacks`
## 0.14.17
### Patch Changes
- [#2519](https://github.com/bluesky-social/atproto/pull/2519) [`bdbd3c3e3`](https://github.com/bluesky-social/atproto/commit/bdbd3c3e3f8fe8476a3fecac73810554846c938f) Thanks [@dholms](https://github.com/dholms)! - Add com.atproto.admin.updateAccountSigningKey
- [#3673](https://github.com/bluesky-social/atproto/pull/3673) [`2b7efb6cb`](https://github.com/bluesky-social/atproto/commit/2b7efb6cb1c93a108570efdafe9d9ec3f1018dfa) Thanks [@haileyok](https://github.com/haileyok)! - Add `getTrends`, `getTrendsSkeleton`, and associated types
- [#3705](https://github.com/bluesky-social/atproto/pull/3705) [`b0a0f1484`](https://github.com/bluesky-social/atproto/commit/b0a0f1484378adeb5e2aa20b9b6ff2c2eca0f740) Thanks [@dholms](https://github.com/dholms)! - Fix codegent for com.atproto.admin.updateAccountSigningKey
- [#3677](https://github.com/bluesky-social/atproto/pull/3677) [`0eea698be`](https://github.com/bluesky-social/atproto/commit/0eea698bef76520ae4cc0e1f2efbb588a0459556) Thanks [@haileyok](https://github.com/haileyok)! - Add `getSuggestedStarterPacks`, `getSuggestedStarterPacksSkeleton`, and associated types
## 0.14.16
### Patch Changes
- [#3695](https://github.com/bluesky-social/atproto/pull/3695) [`652894308`](https://github.com/bluesky-social/atproto/commit/65289430806976ec13177ed9c9f0e883e8f9330c) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Fix last reaction lexicon
## 0.14.15
### Patch Changes
- [#3692](https://github.com/bluesky-social/atproto/pull/3692) [`b4ab5011b`](https://github.com/bluesky-social/atproto/commit/b4ab5011bcc64f9f05122a8773806af8e0c13146) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Support more ways to instantiate an `Agent`
## 0.14.14
### Patch Changes
- [#3685](https://github.com/bluesky-social/atproto/pull/3685) [`9a05892f6`](https://github.com/bluesky-social/atproto/commit/9a05892f6fd405bf6bb96c9c8d2a9a89d5e94bc5) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Update chat reaction lexicon
## 0.14.13
### Patch Changes
- [#3651](https://github.com/bluesky-social/atproto/pull/3651) [`076c2f987`](https://github.com/bluesky-social/atproto/commit/076c2f9872387217806624306e3af08878d1adcd) Thanks [@foysalit](https://github.com/foysalit)! - Add getSubjects endpoint to ozone for fetching detailed view of multiple subjects
## 0.14.12
### Patch Changes
- [#3674](https://github.com/bluesky-social/atproto/pull/3674) [`44f5c3639`](https://github.com/bluesky-social/atproto/commit/44f5c3639fcaf73865d21ec4b0c64baa641006c0) Thanks [@mozzius](https://github.com/mozzius)! - run codegen for changes in chat lexicon
## 0.14.11
### Patch Changes
- [#3670](https://github.com/bluesky-social/atproto/pull/3670) [`d87ffc7bf`](https://github.com/bluesky-social/atproto/commit/d87ffc7bfe3c1e792dc84a320544eb2e053d61ce) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Add DM reactions lexicons
## 0.14.10
### Patch Changes
- Updated dependencies [[`670b6b5de`](https://github.com/bluesky-social/atproto/commit/670b6b5de2bf91e6944761c98eb1126fb6a681ee)]:
- @atproto/syntax@0.4.0
- @atproto/lexicon@0.4.9
- @atproto/xrpc@0.6.11
## 0.14.9
### Patch Changes
- [#3587](https://github.com/bluesky-social/atproto/pull/3587) [`18fbfa000`](https://github.com/bluesky-social/atproto/commit/18fbfa00057dda9ef4eba77d8b4e87994893c952) Thanks [@foysalit](https://github.com/foysalit)! - Add searchable handle and displayName to ozone team members
## 0.14.8
### Patch Changes
- [#3585](https://github.com/bluesky-social/atproto/pull/3585) [`38320191e`](https://github.com/bluesky-social/atproto/commit/38320191e559f8b928c6e951a9b4a6207240bfc1) Thanks [@dholms](https://github.com/dholms)! - Wrap sync v1.1 semantics. Add #sync event to subscribeRepos and deprecate #handle and #tombstone events
- [#3602](https://github.com/bluesky-social/atproto/pull/3602) [`6bcbb6d8c`](https://github.com/bluesky-social/atproto/commit/6bcbb6d8cd3696280935ff7892d8e191fd21fa49) Thanks [@devinivy](https://github.com/devinivy)! - Permit 100mb video embeds.
- [#2264](https://github.com/bluesky-social/atproto/pull/2264) [`dc6e4ecb0`](https://github.com/bluesky-social/atproto/commit/dc6e4ecb0e09bbf4bc7a79c6ac43fb6da4166200) Thanks [@bnewbold](https://github.com/bnewbold)! - new com.atproto.identity endpoints: resolveDid, resolveIdentity, refreshIdentity
- Updated dependencies [[`850e39843`](https://github.com/bluesky-social/atproto/commit/850e39843cb0ec9ea716675f7568c0c601f45e29)]:
- @atproto/syntax@0.3.4
- @atproto/lexicon@0.4.8
- @atproto/xrpc@0.6.10
## 0.14.7
### Patch Changes
- [#3521](https://github.com/bluesky-social/atproto/pull/3521) [`99e2809ca`](https://github.com/bluesky-social/atproto/commit/99e2809ca2ebf70acaa10254f140a8dd0fad4305) Thanks [@bnewbold](https://github.com/bnewbold)! - Add `reasonTypes`, `subjectTypes`, and `subjectCollections` properties to labeler service records.
- [#2506](https://github.com/bluesky-social/atproto/pull/2506) [`27b0a7be1`](https://github.com/bluesky-social/atproto/commit/27b0a7be1ed1b6e098114791d84ec9dc844db552) Thanks [@bnewbold](https://github.com/bnewbold)! - remove some deprecated fields from com.atproto Lexicons
- [#3579](https://github.com/bluesky-social/atproto/pull/3579) [`11d8d21be`](https://github.com/bluesky-social/atproto/commit/11d8d21beac4b79ac44b930197761f9d08dbb492) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Mirror new labeler service record properties on `labelerViewDetailed`.
## 0.14.6
### Patch Changes
- [#3576](https://github.com/bluesky-social/atproto/pull/3576) [`44f81f2eb`](https://github.com/bluesky-social/atproto/commit/44f81f2eb9229e21aec4472b3a05e855396dbec5) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Add chat.bsky.convo.updateAllRead lex
## 0.14.5
### Patch Changes
- [#3449](https://github.com/bluesky-social/atproto/pull/3449) [`7e3678c08`](https://github.com/bluesky-social/atproto/commit/7e3678c089d2faa1a884a52a4fb80b8116c9854f) Thanks [@dholms](https://github.com/dholms)! - Updated subscribeRepo to include prev CIDs for operations and covering proofs for all ops.
- [#3572](https://github.com/bluesky-social/atproto/pull/3572) [`9b643fbec`](https://github.com/bluesky-social/atproto/commit/9b643fbecac30de5cfdb80d0671bfa55e9f4512a) Thanks [@foysalit](https://github.com/foysalit)! - Make comment property optional on ozone comment event
- [#3391](https://github.com/bluesky-social/atproto/pull/3391) [`6e382f67a`](https://github.com/bluesky-social/atproto/commit/6e382f67aa73532efadfea80ff96a27b526cb178) Thanks [@bnewbold](https://github.com/bnewbold)! - update sync lexicons for induction firehose
## 0.14.4
### Patch Changes
- [#3561](https://github.com/bluesky-social/atproto/pull/3561) [`b9cb049d9`](https://github.com/bluesky-social/atproto/commit/b9cb049d940cc706681142ef498238f74e2f539c) Thanks [@foysalit](https://github.com/foysalit)! - Add Divert event to the list of allowed ozone events
## 0.14.3
### Patch Changes
- [#3564](https://github.com/bluesky-social/atproto/pull/3564) [`22af31a89`](https://github.com/bluesky-social/atproto/commit/22af31a898476c5e317aea263af366bddda120d6) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Update chat lexicons
- [#2378](https://github.com/bluesky-social/atproto/pull/2378) [`01874c4be`](https://github.com/bluesky-social/atproto/commit/01874c4be73a41ffb8fe28378f674949aa2c938f) Thanks [@bnewbold](https://github.com/bnewbold)! - set 'tid' and 'record-key' formats on com.atproto.sync and com.atproto.repo lexicons
## 0.14.2
### Patch Changes
- [#3524](https://github.com/bluesky-social/atproto/pull/3524) [`010f10c6f`](https://github.com/bluesky-social/atproto/commit/010f10c6f212f699ad42c0349a58bbcf2172e3cc) Thanks [@bnewbold](https://github.com/bnewbold)! - add com.atproto.sync.listReposByCollection Lexicon
- [#3546](https://github.com/bluesky-social/atproto/pull/3546) [`a9887f687`](https://github.com/bluesky-social/atproto/commit/a9887f68778c49932d92cfea98aadcfa4d5b62e9) Thanks [@foysalit](https://github.com/foysalit)! - Add reporter stats endpoint on ozone service
## 0.14.1
### Patch Changes
- [#3535](https://github.com/bluesky-social/atproto/pull/3535) [`ba5bb6e66`](https://github.com/bluesky-social/atproto/commit/ba5bb6e667fb58bbefd332844957de575e102ca3) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Fix bug preventing "logout()" calls from working.
## 0.14.0
### Minor Changes
- [#2999](https://github.com/bluesky-social/atproto/pull/2999) [`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update Lexicon derived code to better reflect data typings. In particular, Lexicon derived interfaces will now explicitly include the `$type` property that can be present in the data.
- [#2999](https://github.com/bluesky-social/atproto/pull/2999) [`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Helper functions (e.g. `NS.isRecord`) no longer casts the output value. Use `asPredicate(NS.validateRecord)` to create a predicate function that will ensure that an unknown value is indeed an `NS.Record`. The `isX` helper function's purpose is to discriminate between `$type`d values from unions.
### Patch Changes
- [#2999](https://github.com/bluesky-social/atproto/pull/2999) [`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Fixes a bug that would clear interests prefs when updating hidden posts
- Updated dependencies [[`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c), [`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c), [`c53d943c8`](https://github.com/bluesky-social/atproto/commit/c53d943c8be5b8886254e020970a68c0f745b14c)]:
- @atproto/syntax@0.3.3
- @atproto/lexicon@0.4.7
- @atproto/xrpc@0.6.9
## 0.13.35
### Patch Changes
- [#3495](https://github.com/bluesky-social/atproto/pull/3495) [`709a85b0b`](https://github.com/bluesky-social/atproto/commit/709a85b0b633b5483b7161db64b429c746239153) Thanks [@foysalit](https://github.com/foysalit)! - Add a priority score to ozone subjects
## 0.13.34
### Patch Changes
- [#3496](https://github.com/bluesky-social/atproto/pull/3496) [`dc8a7842e`](https://github.com/bluesky-social/atproto/commit/dc8a7842e67f5f3709e88310d2a60d384453b486) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - Add followerRule threadgate
- [#3501](https://github.com/bluesky-social/atproto/pull/3501) [`636951e47`](https://github.com/bluesky-social/atproto/commit/636951e4728cd52c2e5355eb93b47d7e869b67e9) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Include `followerRule` as valid setting in `postInteractionSettings` pref
## 0.13.33
### Patch Changes
- [#3220](https://github.com/bluesky-social/atproto/pull/3220) [`61dc0d60e`](https://github.com/bluesky-social/atproto/commit/61dc0d60e19b88c6427a54c6d95a391b5f4da7bd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Apply new linting rules regarding import order
- [#3494](https://github.com/bluesky-social/atproto/pull/3494) [`87ed907a6`](https://github.com/bluesky-social/atproto/commit/87ed907a6b96b408c02c9af819cec8380a453254) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `setPostInteractionSettings` for configuring default interaction settings for creation of posts
- Updated dependencies [[`61dc0d60e`](https://github.com/bluesky-social/atproto/commit/61dc0d60e19b88c6427a54c6d95a391b5f4da7bd), [`8a30e0ed9`](https://github.com/bluesky-social/atproto/commit/8a30e0ed9239cb2037d54fb98e70e8b0cfbc3e39)]:
- @atproto/common-web@0.4.0
- @atproto/lexicon@0.4.6
- @atproto/syntax@0.3.2
- @atproto/xrpc@0.6.8
## 0.13.32
### Patch Changes
- [#3352](https://github.com/bluesky-social/atproto/pull/3352) [`7f52e6735`](https://github.com/bluesky-social/atproto/commit/7f52e67354906c3bf9830d7a2924ab58d6160905) Thanks [@foysalit](https://github.com/foysalit)! - Auto resolve appeals when taking down
- Updated dependencies [[`fb64d50ee`](https://github.com/bluesky-social/atproto/commit/fb64d50ee220316b9f1183e5c3259629489734c9)]:
- @atproto/xrpc@0.6.7
## 0.13.31
### Patch Changes
- [#3441](https://github.com/bluesky-social/atproto/pull/3441) [`8c6c7813a`](https://github.com/bluesky-social/atproto/commit/8c6c7813a9c2110c8fe21acdca8f09554a1983ce) Thanks [@mozzius](https://github.com/mozzius)! - Allow passing `allowTakendown` to createSession
## 0.13.30
### Patch Changes
- [#3429](https://github.com/bluesky-social/atproto/pull/3429) [`e6e6aea38`](https://github.com/bluesky-social/atproto/commit/e6e6aea3814e3d0bb42a537f80d77947e85fa73f) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - add feedViewPost.threadContext defs
- [#3390](https://github.com/bluesky-social/atproto/pull/3390) [`c0a75d310`](https://github.com/bluesky-social/atproto/commit/c0a75d310aa92c067799a97d1acc5bd0543114c5) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - posts_with_video filter in getAuthorFeed
## 0.13.29
### Patch Changes
- [#3416](https://github.com/bluesky-social/atproto/pull/3416) [`50603b4f2`](https://github.com/bluesky-social/atproto/commit/50603b4f2ef08bd618730107ec164a57f27dcca6) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update `tools.ozone.moderation.queryStatuses` lexicon
## 0.13.28
### Patch Changes
- [#3389](https://github.com/bluesky-social/atproto/pull/3389) [`cbf17066f`](https://github.com/bluesky-social/atproto/commit/cbf17066f314fbc7f2e943127ee4a9f589f8bec2) Thanks [@rafaelbsky](https://github.com/rafaelbsky)! - add feedgen content mode lexicon spec
## 0.13.27
### Patch Changes

View File

@ -85,7 +85,7 @@ are available:
- [@atproto/oauth-client-node](https://www.npmjs.com/package/@atproto/oauth-client-node): for
Node.js.
- [@atproto/oauth-client](https://www.npmjs.com/package/@atproto/oauth-client):
Lower level; compatible with most JS engines.
Lower lever; compatible with most JS engines.
Every `@atproto/oauth-client-*` implementation has a different way to obtain an
`OAuthSession` instance that can be used to instantiate an `Agent` (from

View File

@ -0,0 +1,9 @@
import { BskyAgent } from '@atproto/api'
describe('Agent Benchmarks', () => {
it('Creates new Agent instance 10 times', () => {
for (let i = 0; i < 10; i++) {
new BskyAgent({ service: 'https://bsky.social' })
}
})
})

View File

@ -5,5 +5,4 @@ module.exports = {
testTimeout: 60000,
setupFiles: ['<rootDir>/../../jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: { '^(\\.\\.?\\/.+)\\.js$': ['$1.ts', '$1.js'] },
}

View File

@ -1,6 +1,6 @@
{
"name": "@atproto/api",
"version": "0.15.0",
"version": "0.13.27",
"license": "MIT",
"description": "Client library for atproto and Bluesky",
"keywords": [

File diff suppressed because it is too large Load Diff

View File

@ -309,7 +309,6 @@ export class CredentialSession implements SessionManager {
identifier: opts.identifier,
password: opts.password,
authFactorToken: opts.authFactorToken,
allowTakendown: opts.allowTakendown,
})
this.session = {
accessJwt: res.data.accessJwt,
@ -337,7 +336,7 @@ export class CredentialSession implements SessionManager {
try {
await this.server.deleteSession(undefined, {
headers: {
authorization: `Bearer ${this.session.refreshJwt}`,
authorization: `Bearer ${this.session.accessJwt}`,
},
})
} catch {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +1,15 @@
/**
* GENERATED CODE - DO NOT MODIFY
*/
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
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 AppBskyFeedThreadgate from '../feed/threadgate.js'
import type * as AppBskyFeedPostgate from '../feed/postgate.js'
const is$typed = _is$typed,
validate = _validate
const id = 'app.bsky.actor.defs'
import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import * as AppBskyGraphDefs from '../graph/defs'
import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
export interface ProfileViewBasic {
$type?: 'app.bsky.actor.defs#profileViewBasic'
did: string
handle: string
displayName?: string
@ -29,21 +18,22 @@ export interface ProfileViewBasic {
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
createdAt?: string
verification?: VerificationState
[k: string]: unknown
}
const hashProfileViewBasic = 'profileViewBasic'
export function isProfileViewBasic<V>(v: V) {
return is$typed(v, id, hashProfileViewBasic)
export function isProfileViewBasic(v: unknown): v is ProfileViewBasic {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileViewBasic'
)
}
export function validateProfileViewBasic<V>(v: V) {
return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic)
export function validateProfileViewBasic(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#profileViewBasic', v)
}
export interface ProfileView {
$type?: 'app.bsky.actor.defs#profileView'
did: string
handle: string
displayName?: string
@ -54,21 +44,22 @@ export interface ProfileView {
createdAt?: string
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
verification?: VerificationState
[k: string]: unknown
}
const hashProfileView = 'profileView'
export function isProfileView<V>(v: V) {
return is$typed(v, id, hashProfileView)
export function isProfileView(v: unknown): v is ProfileView {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileView'
)
}
export function validateProfileView<V>(v: V) {
return validate<ProfileView & V>(v, id, hashProfileView)
export function validateProfileView(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#profileView', v)
}
export interface ProfileViewDetailed {
$type?: 'app.bsky.actor.defs#profileViewDetailed'
did: string
handle: string
displayName?: string
@ -85,56 +76,63 @@ export interface ProfileViewDetailed {
viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[]
pinnedPost?: ComAtprotoRepoStrongRef.Main
verification?: VerificationState
[k: string]: unknown
}
const hashProfileViewDetailed = 'profileViewDetailed'
export function isProfileViewDetailed<V>(v: V) {
return is$typed(v, id, hashProfileViewDetailed)
export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileViewDetailed'
)
}
export function validateProfileViewDetailed<V>(v: V) {
return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed)
export function validateProfileViewDetailed(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#profileViewDetailed', v)
}
export interface ProfileAssociated {
$type?: 'app.bsky.actor.defs#profileAssociated'
lists?: number
feedgens?: number
starterPacks?: number
labeler?: boolean
chat?: ProfileAssociatedChat
[k: string]: unknown
}
const hashProfileAssociated = 'profileAssociated'
export function isProfileAssociated<V>(v: V) {
return is$typed(v, id, hashProfileAssociated)
export function isProfileAssociated(v: unknown): v is ProfileAssociated {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileAssociated'
)
}
export function validateProfileAssociated<V>(v: V) {
return validate<ProfileAssociated & V>(v, id, hashProfileAssociated)
export function validateProfileAssociated(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#profileAssociated', v)
}
export interface ProfileAssociatedChat {
$type?: 'app.bsky.actor.defs#profileAssociatedChat'
allowIncoming: 'all' | 'none' | 'following' | (string & {})
[k: string]: unknown
}
const hashProfileAssociatedChat = 'profileAssociatedChat'
export function isProfileAssociatedChat<V>(v: V) {
return is$typed(v, id, hashProfileAssociatedChat)
export function isProfileAssociatedChat(
v: unknown,
): v is ProfileAssociatedChat {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileAssociatedChat'
)
}
export function validateProfileAssociatedChat<V>(v: V) {
return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat)
export function validateProfileAssociatedChat(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#profileAssociatedChat', v)
}
/** 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
@ -143,197 +141,168 @@ export interface ViewerState {
following?: string
followedBy?: string
knownFollowers?: KnownFollowers
[k: string]: unknown
}
const hashViewerState = 'viewerState'
export function isViewerState<V>(v: V) {
return is$typed(v, id, hashViewerState)
export function isViewerState(v: unknown): v is ViewerState {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#viewerState'
)
}
export function validateViewerState<V>(v: V) {
return validate<ViewerState & V>(v, id, hashViewerState)
export function validateViewerState(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#viewerState', v)
}
/** The subject's followers whom you also follow */
export interface KnownFollowers {
$type?: 'app.bsky.actor.defs#knownFollowers'
count: number
followers: ProfileViewBasic[]
[k: string]: unknown
}
const hashKnownFollowers = 'knownFollowers'
export function isKnownFollowers<V>(v: V) {
return is$typed(v, id, hashKnownFollowers)
export function isKnownFollowers(v: unknown): v is KnownFollowers {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#knownFollowers'
)
}
export function validateKnownFollowers<V>(v: V) {
return validate<KnownFollowers & V>(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: V) {
return is$typed(v, id, hashVerificationState)
}
export function validateVerificationState<V>(v: V) {
return validate<VerificationState & V>(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: V) {
return is$typed(v, id, hashVerificationView)
}
export function validateVerificationView<V>(v: V) {
return validate<VerificationView & V>(v, id, hashVerificationView)
export function validateKnownFollowers(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#knownFollowers', v)
}
export type Preferences = (
| $Typed<AdultContentPref>
| $Typed<ContentLabelPref>
| $Typed<SavedFeedsPref>
| $Typed<SavedFeedsPrefV2>
| $Typed<PersonalDetailsPref>
| $Typed<FeedViewPref>
| $Typed<ThreadViewPref>
| $Typed<InterestsPref>
| $Typed<MutedWordsPref>
| $Typed<HiddenPostsPref>
| $Typed<BskyAppStatePref>
| $Typed<LabelersPref>
| $Typed<PostInteractionSettingsPref>
| { $type: string }
| AdultContentPref
| ContentLabelPref
| SavedFeedsPref
| SavedFeedsPrefV2
| PersonalDetailsPref
| FeedViewPref
| ThreadViewPref
| InterestsPref
| MutedWordsPref
| HiddenPostsPref
| BskyAppStatePref
| LabelersPref
| { $type: string; [k: string]: unknown }
)[]
export interface AdultContentPref {
$type?: 'app.bsky.actor.defs#adultContentPref'
enabled: boolean
[k: string]: unknown
}
const hashAdultContentPref = 'adultContentPref'
export function isAdultContentPref<V>(v: V) {
return is$typed(v, id, hashAdultContentPref)
export function isAdultContentPref(v: unknown): v is AdultContentPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#adultContentPref'
)
}
export function validateAdultContentPref<V>(v: V) {
return validate<AdultContentPref & V>(v, id, hashAdultContentPref)
export function validateAdultContentPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#adultContentPref', v)
}
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 & {})
[k: string]: unknown
}
const hashContentLabelPref = 'contentLabelPref'
export function isContentLabelPref<V>(v: V) {
return is$typed(v, id, hashContentLabelPref)
export function isContentLabelPref(v: unknown): v is ContentLabelPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#contentLabelPref'
)
}
export function validateContentLabelPref<V>(v: V) {
return validate<ContentLabelPref & V>(v, id, hashContentLabelPref)
export function validateContentLabelPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#contentLabelPref', v)
}
export interface SavedFeed {
$type?: 'app.bsky.actor.defs#savedFeed'
id: string
type: 'feed' | 'list' | 'timeline' | (string & {})
value: string
pinned: boolean
[k: string]: unknown
}
const hashSavedFeed = 'savedFeed'
export function isSavedFeed<V>(v: V) {
return is$typed(v, id, hashSavedFeed)
export function isSavedFeed(v: unknown): v is SavedFeed {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeed'
)
}
export function validateSavedFeed<V>(v: V) {
return validate<SavedFeed & V>(v, id, hashSavedFeed)
export function validateSavedFeed(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#savedFeed', v)
}
export interface SavedFeedsPrefV2 {
$type?: 'app.bsky.actor.defs#savedFeedsPrefV2'
items: SavedFeed[]
[k: string]: unknown
}
const hashSavedFeedsPrefV2 = 'savedFeedsPrefV2'
export function isSavedFeedsPrefV2<V>(v: V) {
return is$typed(v, id, hashSavedFeedsPrefV2)
export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeedsPrefV2'
)
}
export function validateSavedFeedsPrefV2<V>(v: V) {
return validate<SavedFeedsPrefV2 & V>(v, id, hashSavedFeedsPrefV2)
export function validateSavedFeedsPrefV2(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#savedFeedsPrefV2', v)
}
export interface SavedFeedsPref {
$type?: 'app.bsky.actor.defs#savedFeedsPref'
pinned: string[]
saved: string[]
timelineIndex?: number
[k: string]: unknown
}
const hashSavedFeedsPref = 'savedFeedsPref'
export function isSavedFeedsPref<V>(v: V) {
return is$typed(v, id, hashSavedFeedsPref)
export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeedsPref'
)
}
export function validateSavedFeedsPref<V>(v: V) {
return validate<SavedFeedsPref & V>(v, id, hashSavedFeedsPref)
export function validateSavedFeedsPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#savedFeedsPref', v)
}
export interface PersonalDetailsPref {
$type?: 'app.bsky.actor.defs#personalDetailsPref'
/** The birth date of account owner. */
birthDate?: string
[k: string]: unknown
}
const hashPersonalDetailsPref = 'personalDetailsPref'
export function isPersonalDetailsPref<V>(v: V) {
return is$typed(v, id, hashPersonalDetailsPref)
export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#personalDetailsPref'
)
}
export function validatePersonalDetailsPref<V>(v: V) {
return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref)
export function validatePersonalDetailsPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#personalDetailsPref', v)
}
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. */
@ -346,20 +315,22 @@ export interface FeedViewPref {
hideReposts?: boolean
/** Hide quote posts in the feed. */
hideQuotePosts?: boolean
[k: string]: unknown
}
const hashFeedViewPref = 'feedViewPref'
export function isFeedViewPref<V>(v: V) {
return is$typed(v, id, hashFeedViewPref)
export function isFeedViewPref(v: unknown): v is FeedViewPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#feedViewPref'
)
}
export function validateFeedViewPref<V>(v: V) {
return validate<FeedViewPref & V>(v, id, hashFeedViewPref)
export function validateFeedViewPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#feedViewPref', v)
}
export interface ThreadViewPref {
$type?: 'app.bsky.actor.defs#threadViewPref'
/** Sorting mode for threads. */
sort?:
| 'oldest'
@ -370,39 +341,43 @@ export interface ThreadViewPref {
| (string & {})
/** Show followed users at the top of all replies. */
prioritizeFollowedUsers?: boolean
[k: string]: unknown
}
const hashThreadViewPref = 'threadViewPref'
export function isThreadViewPref<V>(v: V) {
return is$typed(v, id, hashThreadViewPref)
export function isThreadViewPref(v: unknown): v is ThreadViewPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#threadViewPref'
)
}
export function validateThreadViewPref<V>(v: V) {
return validate<ThreadViewPref & V>(v, id, hashThreadViewPref)
export function validateThreadViewPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#threadViewPref', v)
}
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[]
[k: string]: unknown
}
const hashInterestsPref = 'interestsPref'
export function isInterestsPref<V>(v: V) {
return is$typed(v, id, hashInterestsPref)
export function isInterestsPref(v: unknown): v is InterestsPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#interestsPref'
)
}
export function validateInterestsPref<V>(v: V) {
return validate<InterestsPref & V>(v, id, hashInterestsPref)
export function validateInterestsPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#interestsPref', v)
}
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
@ -412,165 +387,148 @@ export interface MutedWord {
actorTarget: 'all' | 'exclude-following' | (string & {})
/** The date and time at which the muted word will expire and no longer be applied. */
expiresAt?: string
[k: string]: unknown
}
const hashMutedWord = 'mutedWord'
export function isMutedWord<V>(v: V) {
return is$typed(v, id, hashMutedWord)
export function isMutedWord(v: unknown): v is MutedWord {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#mutedWord'
)
}
export function validateMutedWord<V>(v: V) {
return validate<MutedWord & V>(v, id, hashMutedWord)
export function validateMutedWord(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#mutedWord', v)
}
export interface MutedWordsPref {
$type?: 'app.bsky.actor.defs#mutedWordsPref'
/** A list of words the account owner has muted. */
items: MutedWord[]
[k: string]: unknown
}
const hashMutedWordsPref = 'mutedWordsPref'
export function isMutedWordsPref<V>(v: V) {
return is$typed(v, id, hashMutedWordsPref)
export function isMutedWordsPref(v: unknown): v is MutedWordsPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#mutedWordsPref'
)
}
export function validateMutedWordsPref<V>(v: V) {
return validate<MutedWordsPref & V>(v, id, hashMutedWordsPref)
export function validateMutedWordsPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#mutedWordsPref', v)
}
export interface HiddenPostsPref {
$type?: 'app.bsky.actor.defs#hiddenPostsPref'
/** A list of URIs of posts the account owner has hidden. */
items: string[]
[k: string]: unknown
}
const hashHiddenPostsPref = 'hiddenPostsPref'
export function isHiddenPostsPref<V>(v: V) {
return is$typed(v, id, hashHiddenPostsPref)
export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#hiddenPostsPref'
)
}
export function validateHiddenPostsPref<V>(v: V) {
return validate<HiddenPostsPref & V>(v, id, hashHiddenPostsPref)
export function validateHiddenPostsPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#hiddenPostsPref', v)
}
export interface LabelersPref {
$type?: 'app.bsky.actor.defs#labelersPref'
labelers: LabelerPrefItem[]
[k: string]: unknown
}
const hashLabelersPref = 'labelersPref'
export function isLabelersPref<V>(v: V) {
return is$typed(v, id, hashLabelersPref)
export function isLabelersPref(v: unknown): v is LabelersPref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#labelersPref'
)
}
export function validateLabelersPref<V>(v: V) {
return validate<LabelersPref & V>(v, id, hashLabelersPref)
export function validateLabelersPref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#labelersPref', v)
}
export interface LabelerPrefItem {
$type?: 'app.bsky.actor.defs#labelerPrefItem'
did: string
[k: string]: unknown
}
const hashLabelerPrefItem = 'labelerPrefItem'
export function isLabelerPrefItem<V>(v: V) {
return is$typed(v, id, hashLabelerPrefItem)
export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#labelerPrefItem'
)
}
export function validateLabelerPrefItem<V>(v: V) {
return validate<LabelerPrefItem & V>(v, id, hashLabelerPrefItem)
export function validateLabelerPrefItem(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#labelerPrefItem', v)
}
/** 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[]
[k: string]: unknown
}
const hashBskyAppStatePref = 'bskyAppStatePref'
export function isBskyAppStatePref<V>(v: V) {
return is$typed(v, id, hashBskyAppStatePref)
export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#bskyAppStatePref'
)
}
export function validateBskyAppStatePref<V>(v: V) {
return validate<BskyAppStatePref & V>(v, id, hashBskyAppStatePref)
export function validateBskyAppStatePref(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#bskyAppStatePref', v)
}
/** 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
[k: string]: unknown
}
const hashBskyAppProgressGuide = 'bskyAppProgressGuide'
export function isBskyAppProgressGuide<V>(v: V) {
return is$typed(v, id, hashBskyAppProgressGuide)
export function isBskyAppProgressGuide(v: unknown): v is BskyAppProgressGuide {
return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#bskyAppProgressGuide'
)
}
export function validateBskyAppProgressGuide<V>(v: V) {
return validate<BskyAppProgressGuide & V>(v, id, hashBskyAppProgressGuide)
export function validateBskyAppProgressGuide(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#bskyAppProgressGuide', v)
}
/** 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
[k: string]: unknown
}
const hashNux = 'nux'
export function isNux<V>(v: V) {
return is$typed(v, id, hashNux)
}
export function validateNux<V>(v: V) {
return validate<Nux & V>(v, id, hashNux)
}
/** Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly. */
export interface PostInteractionSettingsPref {
$type?: 'app.bsky.actor.defs#postInteractionSettingsPref'
/** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */
threadgateAllowRules?: (
| $Typed<AppBskyFeedThreadgate.MentionRule>
| $Typed<AppBskyFeedThreadgate.FollowerRule>
| $Typed<AppBskyFeedThreadgate.FollowingRule>
| $Typed<AppBskyFeedThreadgate.ListRule>
| { $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<AppBskyFeedPostgate.DisableRule>
| { $type: string }
)[]
}
const hashPostInteractionSettingsPref = 'postInteractionSettingsPref'
export function isPostInteractionSettingsPref<V>(v: V) {
return is$typed(v, id, hashPostInteractionSettingsPref)
}
export function validatePostInteractionSettingsPref<V>(v: V) {
return validate<PostInteractionSettingsPref & V>(
v,
id,
hashPostInteractionSettingsPref,
export function isNux(v: unknown): v is Nux {
return (
isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.defs#nux'
)
}
export function validateNux(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#nux', v)
}

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY
*/
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
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'
import * as AppBskyActorDefs from './defs'
export interface QueryParams {}
@ -22,6 +14,7 @@ export type InputSchema = undefined
export interface OutputSchema {
preferences: AppBskyActorDefs.Preferences
[k: string]: unknown
}
export interface CallOptions {

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY
*/
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
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'
import * as AppBskyActorDefs from './defs'
export interface QueryParams {
/** Handle or DID of account to fetch profile of. */

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY
*/
import { HeadersMap, XRPCError } from '@atproto/xrpc'
import { type ValidationResult, BlobRef } from '@atproto/lexicon'
import { ValidationResult, BlobRef } from '@atproto/lexicon'
import { isObj, hasProp } from '../../../../util'
import { lexicons } from '../../../../lexicons'
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'
import * as AppBskyActorDefs from './defs'
export interface QueryParams {
actors: string[]
@ -24,6 +16,7 @@ export type InputSchema = undefined
export interface OutputSchema {
profiles: AppBskyActorDefs.ProfileViewDetailed[]
[k: string]: unknown
}
export interface CallOptions {

Some files were not shown because too many files have changed in this diff Show More