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, "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": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/base",
"plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended", "plugin:prettier/recommended",
"plugin:import/recommended", "prettier"
"plugin:import/typescript"
], ],
"plugins": ["n"],
"ignorePatterns": ["dist", "node_modules"], "ignorePatterns": ["dist", "node_modules"],
"rules": { "rules": {
"no-var": "error", "no-var": "error",
"prefer-const": "warn", "prefer-const": "warn",
"no-misleading-character-class": "warn", "no-misleading-character-class": "warn",
"eqeqeq": ["error", "always", { "null": "ignore" }], "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": [ "@typescript-eslint/no-unused-vars": [
"error", "warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
], ],
"@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-ts-comment": "off",
@ -67,34 +43,6 @@
"rules": { "rules": {
"@typescript-eslint/no-var-requires": "off" "@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: jobs:
bsky-container-aws: bsky-container-aws:
if: github.repository == 'bluesky-social/atproto' if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
packages: write packages: write

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
.gitignore vendored
View File

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

1
.npmrc
View File

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

View File

@ -1,19 +1,12 @@
node_modules node_modules
interop-test-files interop-test-files
__snapshots__
dist dist
build
.nyc_output
coverage
pnpm-lock.yaml pnpm-lock.yaml
.pnpm* .pnpm*
.changeset .changeset
*.d.ts
packages/bsky/src/data-plane/gen
CHANGELOG.md 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, "tabWidth": 2,
"semi": false, "semi": false,
"singleQuote": true, "singleQuote": true,
"plugins": ["prettier-plugin-tailwindcss"],
"overrides": [ "overrides": [
{ {
"files": "*.hbs", "files": "*.hbs",
"options": { "options": {
"singleQuote": false "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 #### [goeo\_](https://bsky.app/profile/did:web:genco.me), Security disclosure, May 2024
#### [DavidBuchanan314](https://github.com/DavidBuchanan314), Security disclosure, November 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 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>). 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 .PHONY: codegen
codegen: ## Re-generate packages from lexicon/ files 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 .PHONY: lint
lint: ## Run style checks and verify syntax lint: ## Run style checks and verify syntax
@ -38,10 +43,6 @@ lint: ## Run style checks and verify syntax
fmt: ## Run syntax re-formatting fmt: ## Run syntax re-formatting
pnpm format pnpm format
.PHONY: fmt-lexicons
fmt-lexicons: ## Run syntax re-formatting, just on .json files
pnpm exec eslint ./lexicons/ --ext .json --fix
.PHONY: deps .PHONY: deps
deps: ## Installs dependent libs using 'pnpm install' deps: ## Installs dependent libs using 'pnpm install'
pnpm install --frozen-lockfile 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: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.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 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.*
com.example.foo.blah* com.example.foo.blah*
com.example.foo.*blah com.example.foo.*blah
com.example.f00
com.exa💩ple.thing com.exa💩ple.thing
a-0.b-1.c-3 a-0.b-1.c-3
a-0.b-1.c-o a-0.b-1.c-o
a0.b1.c3
1.0.0.127.record 1.0.0.127.record
0two.example.foo 0two.example.foo
example.com example.com
@ -27,4 +29,4 @@ com.atproto.feed.p*st
com.atproto.feed.po#t com.atproto.feed.po#t
com.atproto.feed.p!ot com.atproto.feed.p!ot
com.example-.foo 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 # valid examples
com.example.fooBar com.example.fooBar
com.example.fooBarV2
net.users.bob.ping net.users.bob.ping
a.b.c a.b.c
m.xn--masekowski-d0b.pl m.xn--masekowski-d0b.pl
@ -19,8 +18,6 @@ test.12345.record
a01.thing.record a01.thing.record
a.0.c a.0.c
xn--fiqs8s.xn--fiqa61au8b7zsevnm8ak20mc4a87e.record.two xn--fiqs8s.xn--fiqa61au8b7zsevnm8ak20mc4a87e.record.two
a0.b1.c3
com.example.f00
# allows onion (Tor) NSIDs # allows onion (Tor) NSIDs
onion.expyuzz4wqqyqhjn.spec.getThing onion.expyuzz4wqqyqhjn.spec.getThing

View File

@ -23,11 +23,7 @@
"type": "array", "type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" } "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
}, },
"createdAt": { "type": "string", "format": "datetime" }, "createdAt": { "type": "string", "format": "datetime" }
"verification": {
"type": "ref",
"ref": "#verificationState"
}
} }
}, },
"profileView": { "profileView": {
@ -57,10 +53,6 @@
"labels": { "labels": {
"type": "array", "type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" } "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"verification": {
"type": "ref",
"ref": "#verificationState"
} }
} }
}, },
@ -103,10 +95,6 @@
"pinnedPost": { "pinnedPost": {
"type": "ref", "type": "ref",
"ref": "com.atproto.repo.strongRef" "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": { "preferences": {
"type": "array", "type": "array",
"items": { "items": {
@ -234,8 +174,7 @@
"#mutedWordsPref", "#mutedWordsPref",
"#hiddenPostsPref", "#hiddenPostsPref",
"#bskyAppStatePref", "#bskyAppStatePref",
"#labelersPref", "#labelersPref"
"#postInteractionSettingsPref"
] ]
} }
}, },
@ -529,36 +468,6 @@
"description": "The date and time at which the NUX will expire and should be considered completed." "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": { "properties": {
"video": { "video": {
"type": "blob", "type": "blob",
"description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.",
"accept": ["video/mp4"], "accept": ["video/mp4"],
"maxSize": 100000000 "maxSize": 50000000
}, },
"captions": { "captions": {
"type": "array", "type": "array",

View File

@ -48,13 +48,6 @@
"pinned": { "type": "boolean" } "pinned": { "type": "boolean" }
} }
}, },
"threadContext": {
"type": "object",
"description": "Metadata about this post within the context of the thread it is in.",
"properties": {
"rootAuthorLike": { "type": "string", "format": "at-uri" }
}
},
"feedViewPost": { "feedViewPost": {
"type": "object", "type": "object",
"required": ["post"], "required": ["post"],
@ -115,8 +108,7 @@
"type": "union", "type": "union",
"refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"] "refs": ["#threadViewPost", "#notFoundPost", "#blockedPost"]
} }
}, }
"threadContext": { "type": "ref", "ref": "#threadContext" }
} }
}, },
"notFoundPost": { "notFoundPost": {
@ -170,13 +162,6 @@
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" } "items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
}, },
"viewer": { "type": "ref", "ref": "#generatorViewerState" }, "viewer": { "type": "ref", "ref": "#generatorViewerState" },
"contentMode": {
"type": "string",
"knownValues": [
"app.bsky.feed.defs#contentModeUnspecified",
"app.bsky.feed.defs#contentModeVideo"
]
},
"indexedAt": { "type": "string", "format": "datetime" } "indexedAt": { "type": "string", "format": "datetime" }
} }
}, },
@ -277,14 +262,6 @@
"type": "token", "type": "token",
"description": "User clicked through to the embedded content of the feed item" "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": { "interactionSeen": {
"type": "token", "type": "token",
"description": "Feed item was seen by user" "description": "Feed item was seen by user"

View File

@ -39,13 +39,6 @@
"description": "Self-label values", "description": "Self-label values",
"refs": ["com.atproto.label.defs#selfLabels"] "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" } "createdAt": { "type": "string", "format": "datetime" }
} }
} }

View File

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

View File

@ -26,7 +26,6 @@
"description": "List of AT-URIs embedding this post that the author has detached from." "description": "List of AT-URIs embedding this post that the author has detached from."
}, },
"embeddingRules": { "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", "type": "array",
"maxLength": 5, "maxLength": 5,
"items": { "items": {

View File

@ -16,17 +16,11 @@
"description": "Reference (AT-URI) to the post record." "description": "Reference (AT-URI) to the post record."
}, },
"allow": { "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", "type": "array",
"maxLength": 5, "maxLength": 5,
"items": { "items": {
"type": "union", "type": "union",
"refs": [ "refs": ["#mentionRule", "#followingRule", "#listRule"]
"#mentionRule",
"#followerRule",
"#followingRule",
"#listRule"
]
} }
}, },
"createdAt": { "type": "string", "format": "datetime" }, "createdAt": { "type": "string", "format": "datetime" },
@ -47,11 +41,6 @@
"description": "Allow replies from actors mentioned in your post.", "description": "Allow replies from actors mentioned in your post.",
"properties": {} "properties": {}
}, },
"followerRule": {
"type": "object",
"description": "Allow replies from actors who follow you.",
"properties": {}
},
"followingRule": { "followingRule": {
"type": "object", "type": "object",
"description": "Allow replies from actors you follow.", "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": { "labels": {
"type": "array", "type": "array",
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" } "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", "type": "union",
"refs": ["com.atproto.label.defs#selfLabels"] "refs": ["com.atproto.label.defs#selfLabels"]
}, },
"createdAt": { "type": "string", "format": "datetime" }, "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" }
}
} }
} }
} }

View File

@ -32,60 +32,6 @@
"description": { "type": "string" }, "description": { "type": "string" },
"link": { "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", "type": "union",
"refs": ["app.bsky.embed.record#view"] "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" }, "sender": { "type": "ref", "ref": "#messageViewSender" },
"sentAt": { "type": "string", "format": "datetime" } "sentAt": { "type": "string", "format": "datetime" }
} }
@ -77,30 +72,6 @@
"did": { "type": "string", "format": "did" } "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": { "convoView": {
"type": "object", "type": "object",
"required": ["id", "rev", "members", "muted", "unreadCount"], "required": ["id", "rev", "members", "muted", "unreadCount"],
@ -118,15 +89,8 @@
"type": "union", "type": "union",
"refs": ["#messageView", "#deletedMessageView"] "refs": ["#messageView", "#deletedMessageView"]
}, },
"lastReaction": {
"type": "union",
"refs": ["#messageAndReactionView"]
},
"muted": { "type": "boolean" }, "muted": { "type": "boolean" },
"status": { "opened": { "type": "boolean" },
"type": "string",
"knownValues": ["request", "accepted"]
},
"unreadCount": { "type": "integer" } "unreadCount": { "type": "integer" }
} }
}, },
@ -138,14 +102,6 @@
"convoId": { "type": "string" } "convoId": { "type": "string" }
} }
}, },
"logAcceptConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logLeaveConvo": { "logLeaveConvo": {
"type": "object", "type": "object",
"required": ["rev", "convoId"], "required": ["rev", "convoId"],
@ -154,22 +110,6 @@
"convoId": { "type": "string" } "convoId": { "type": "string" }
} }
}, },
"logMuteConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logUnmuteConvo": {
"type": "object",
"required": ["rev", "convoId"],
"properties": {
"rev": { "type": "string" },
"convoId": { "type": "string" }
}
},
"logCreateMessage": { "logCreateMessage": {
"type": "object", "type": "object",
"required": ["rev", "convoId", "message"], "required": ["rev", "convoId", "message"],
@ -193,44 +133,6 @@
"refs": ["#messageView", "#deletedMessageView"] "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", "type": "union",
"refs": [ "refs": [
"chat.bsky.convo.defs#logBeginConvo", "chat.bsky.convo.defs#logBeginConvo",
"chat.bsky.convo.defs#logAcceptConvo",
"chat.bsky.convo.defs#logLeaveConvo", "chat.bsky.convo.defs#logLeaveConvo",
"chat.bsky.convo.defs#logMuteConvo",
"chat.bsky.convo.defs#logUnmuteConvo",
"chat.bsky.convo.defs#logCreateMessage", "chat.bsky.convo.defs#logCreateMessage",
"chat.bsky.convo.defs#logDeleteMessage", "chat.bsky.convo.defs#logDeleteMessage"
"chat.bsky.convo.defs#logReadMessage",
"chat.bsky.convo.defs#logAddReaction",
"chat.bsky.convo.defs#logRemoveReaction"
] ]
} }
} }

View File

@ -13,15 +13,7 @@
"maximum": 100, "maximum": 100,
"default": 50 "default": 50
}, },
"cursor": { "type": "string" }, "cursor": { "type": "string" }
"readState": {
"type": "string",
"knownValues": ["unread"]
},
"status": {
"type": "string",
"knownValues": ["request", "accepted"]
}
} }
}, },
"output": { "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": { "defs": {
"main": { "main": {
"type": "query", "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": { "parameters": {
"type": "params", "type": "params",
"required": ["handle"], "required": ["handle"],
@ -25,13 +25,7 @@
"did": { "type": "string", "format": "did" } "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": { "reasonAppeal": {
"type": "token", "type": "token",
"description": "Appeal: appeal a previously taken moderation action" "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"], "required": ["collection", "value"],
"properties": { "properties": {
"collection": { "type": "string", "format": "nsid" }, "collection": { "type": "string", "format": "nsid" },
"rkey": { "rkey": { "type": "string", "maxLength": 512 },
"type": "string",
"maxLength": 512,
"format": "record-key",
"description": "NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."
},
"value": { "type": "unknown" } "value": { "type": "unknown" }
} }
}, },
@ -85,7 +80,7 @@
"required": ["collection", "rkey", "value"], "required": ["collection", "rkey", "value"],
"properties": { "properties": {
"collection": { "type": "string", "format": "nsid" }, "collection": { "type": "string", "format": "nsid" },
"rkey": { "type": "string", "format": "record-key" }, "rkey": { "type": "string" },
"value": { "type": "unknown" } "value": { "type": "unknown" }
} }
}, },
@ -95,7 +90,7 @@
"required": ["collection", "rkey"], "required": ["collection", "rkey"],
"properties": { "properties": {
"collection": { "type": "string", "format": "nsid" }, "collection": { "type": "string", "format": "nsid" },
"rkey": { "type": "string", "format": "record-key" } "rkey": { "type": "string" }
} }
}, },
"createResult": { "createResult": {

View File

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

View File

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

View File

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

View File

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

View File

@ -27,6 +27,14 @@
"description": "The number of records to return." "description": "The number of records to return."
}, },
"cursor": { "type": "string" }, "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": { "reverse": {
"type": "boolean", "type": "boolean",
"description": "Flag to reverse the order of the returned records." "description": "Flag to reverse the order of the returned records."

View File

@ -24,7 +24,6 @@
}, },
"rkey": { "rkey": {
"type": "string", "type": "string",
"format": "record-key",
"description": "The Record Key.", "description": "The Record Key.",
"maxLength": 512 "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"], "required": ["cid", "rev"],
"properties": { "properties": {
"cid": { "type": "string", "format": "cid" }, "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." "description": "The DID of the repo."
}, },
"collection": { "type": "string", "format": "nsid" }, "collection": { "type": "string", "format": "nsid" },
"rkey": { "rkey": { "type": "string", "description": "Record Key" },
"commit": {
"type": "string", "type": "string",
"description": "Record Key", "format": "cid",
"format": "record-key" "description": "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit"
} }
} }
}, },

View File

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

View File

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

View File

@ -16,7 +16,6 @@
}, },
"since": { "since": {
"type": "string", "type": "string",
"format": "tid",
"description": "Optional revision of the repo to list blobs since." "description": "Optional revision of the repo to list blobs since."
}, },
"limit": { "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", "format": "cid",
"description": "Current repo commit CID" "description": "Current repo commit CID"
}, },
"rev": { "type": "string", "format": "tid" }, "rev": { "type": "string" },
"active": { "type": "boolean" }, "active": { "type": "boolean" },
"status": { "status": {
"type": "string", "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.", "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": [ "knownValues": ["takendown", "suspended", "deactivated"]
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
} }
} }
} }

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": { "defs": {
"main": { "main": {
"type": "procedure", "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": { "input": {
"encoding": "application/json", "encoding": "application/json",
"schema": { "schema": {

View File

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

View File

@ -17,7 +17,15 @@
"message": { "message": {
"schema": { "schema": {
"type": "union", "type": "union",
"refs": ["#commit", "#sync", "#identity", "#account", "#info"] "refs": [
"#commit",
"#identity",
"#account",
"#handle",
"#migrate",
"#tombstone",
"#info"
]
} }
}, },
"errors": [ "errors": [
@ -44,7 +52,7 @@
"blobs", "blobs",
"time" "time"
], ],
"nullable": ["since"], "nullable": ["prev", "since"],
"properties": { "properties": {
"seq": { "seq": {
"type": "integer", "type": "integer",
@ -53,31 +61,33 @@
"rebase": { "type": "boolean", "description": "DEPRECATED -- unused" }, "rebase": { "type": "boolean", "description": "DEPRECATED -- unused" },
"tooBig": { "tooBig": {
"type": "boolean", "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": { "repo": {
"type": "string", "type": "string",
"format": "did", "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": { "commit": {
"type": "cid-link", "type": "cid-link",
"description": "Repo commit object CID." "description": "Repo commit object CID."
}, },
"prev": {
"type": "cid-link",
"description": "DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability."
},
"rev": { "rev": {
"type": "string", "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." "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": { "since": {
"type": "string", "type": "string",
"format": "tid",
"description": "The rev of the last emitted commit from this repo (if any)." "description": "The rev of the last emitted commit from this repo (if any)."
}, },
"blocks": { "blocks": {
"type": "bytes", "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.", "description": "CAR file containing relevant blocks, as a diff since the previous repo state.",
"maxLength": 2000000 "maxLength": 1000000
}, },
"ops": { "ops": {
"type": "array", "type": "array",
@ -92,43 +102,9 @@
"type": "array", "type": "array",
"items": { "items": {
"type": "cid-link", "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": { "time": {
"type": "string", "type": "string",
"format": "datetime", "format": "datetime",
@ -166,17 +142,43 @@
"status": { "status": {
"type": "string", "type": "string",
"description": "If active=false, this optional field indicates a reason for why the account is not active.", "description": "If active=false, this optional field indicates a reason for why the account is not active.",
"knownValues": [ "knownValues": ["takendown", "suspended", "deleted", "deactivated"]
"takendown",
"suspended",
"deleted",
"deactivated",
"desynchronized",
"throttled"
]
} }
} }
}, },
"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": { "info": {
"type": "object", "type": "object",
"required": ["name"], "required": ["name"],
@ -204,10 +206,6 @@
"cid": { "cid": {
"type": "cid-link", "type": "cid-link",
"description": "For creates and updates, the new record CID. For deletions, null." "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", "#modEventTag",
"#accountEvent", "#accountEvent",
"#identityEvent", "#identityEvent",
"#recordEvent", "#recordEvent"
"#modEventPriorityScore"
] ]
}, },
"subject": { "subject": {
@ -85,8 +84,7 @@
"#modEventTag", "#modEventTag",
"#accountEvent", "#accountEvent",
"#identityEvent", "#identityEvent",
"#recordEvent", "#recordEvent"
"#modEventPriorityScore"
] ]
}, },
"subject": { "subject": {
@ -145,12 +143,6 @@
"type": "string", "type": "string",
"description": "Sticky comment on the subject." "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": { "muteUntil": {
"type": "string", "type": "string",
"format": "datetime" "format": "datetime"
@ -190,110 +182,6 @@
"tags": { "tags": {
"type": "array", "type": "array",
"items": { "type": "string" } "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": { "modEventComment": {
"type": "object", "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": { "properties": {
"comment": { "comment": {
"type": "string" "type": "string"
@ -411,25 +300,6 @@
"negateLabelVals": { "negateLabelVals": {
"type": "array", "type": "array",
"items": { "type": "string" } "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" "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#modEventReverseTakedown",
"tools.ozone.moderation.defs#modEventResolveAppeal", "tools.ozone.moderation.defs#modEventResolveAppeal",
"tools.ozone.moderation.defs#modEventEmail", "tools.ozone.moderation.defs#modEventEmail",
"tools.ozone.moderation.defs#modEventDivert",
"tools.ozone.moderation.defs#modEventTag", "tools.ozone.moderation.defs#modEventTag",
"tools.ozone.moderation.defs#accountEvent", "tools.ozone.moderation.defs#accountEvent",
"tools.ozone.moderation.defs#identityEvent", "tools.ozone.moderation.defs#identityEvent",
"tools.ozone.moderation.defs#recordEvent", "tools.ozone.moderation.defs#recordEvent"
"tools.ozone.moderation.defs#modEventPriorityScore"
] ]
}, },
"subject": { "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": { "sortField": {
"type": "string", "type": "string",
"default": "lastReportedAt", "default": "lastReportedAt",
"enum": [ "enum": ["lastReviewedAt", "lastReportedAt"]
"lastReviewedAt",
"lastReportedAt",
"reportedRecordsCount",
"takendownRecordsCount",
"priorityScore"
]
}, },
"sortDirection": { "sortDirection": {
"type": "string", "type": "string",
@ -164,24 +158,6 @@
"type": "string", "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.", "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"] "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": { "parameters": {
"type": "params", "type": "params",
"properties": { "properties": {
"q": {
"type": "string"
},
"disabled": {
"type": "boolean"
},
"roles": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": { "limit": {
"type": "integer", "type": "integer",
"minimum": 1, "minimum": 1,
"maximum": 100, "maximum": 100,
"default": 50 "default": 50
}, },
"cursor": { "cursor": { "type": "string" }
"type": "string"
}
} }
}, },
"output": { "output": {
@ -37,9 +23,7 @@
"type": "object", "type": "object",
"required": ["members"], "required": ["members"],
"properties": { "properties": {
"cursor": { "cursor": { "type": "string" },
"type": "string"
},
"members": { "members": {
"type": "array", "type": "array",
"items": { "items": {

View File

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

View File

@ -1,260 +1,5 @@
# @atproto/api # @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 ## 0.13.27
### Patch Changes ### Patch Changes

View File

@ -85,7 +85,7 @@ are available:
- [@atproto/oauth-client-node](https://www.npmjs.com/package/@atproto/oauth-client-node): for - [@atproto/oauth-client-node](https://www.npmjs.com/package/@atproto/oauth-client-node): for
Node.js. Node.js.
- [@atproto/oauth-client](https://www.npmjs.com/package/@atproto/oauth-client): - [@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 Every `@atproto/oauth-client-*` implementation has a different way to obtain an
`OAuthSession` instance that can be used to instantiate an `Agent` (from `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, testTimeout: 60000,
setupFiles: ['<rootDir>/../../jest.setup.ts'], setupFiles: ['<rootDir>/../../jest.setup.ts'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'], setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: { '^(\\.\\.?\\/.+)\\.js$': ['$1.ts', '$1.js'] },
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@atproto/api", "name": "@atproto/api",
"version": "0.15.0", "version": "0.13.27",
"license": "MIT", "license": "MIT",
"description": "Client library for atproto and Bluesky", "description": "Client library for atproto and Bluesky",
"keywords": [ "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, identifier: opts.identifier,
password: opts.password, password: opts.password,
authFactorToken: opts.authFactorToken, authFactorToken: opts.authFactorToken,
allowTakendown: opts.allowTakendown,
}) })
this.session = { this.session = {
accessJwt: res.data.accessJwt, accessJwt: res.data.accessJwt,
@ -337,7 +336,7 @@ export class CredentialSession implements SessionManager {
try { try {
await this.server.deleteSession(undefined, { await this.server.deleteSession(undefined, {
headers: { headers: {
authorization: `Bearer ${this.session.refreshJwt}`, authorization: `Bearer ${this.session.accessJwt}`,
}, },
}) })
} catch { } 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 * 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 { CID } from 'multiformats/cid'
import { validate as _validate } from '../../../../lexicons' import * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs'
import { import * as AppBskyGraphDefs from '../graph/defs'
type $Typed, import * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef'
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'
export interface ProfileViewBasic { export interface ProfileViewBasic {
$type?: 'app.bsky.actor.defs#profileViewBasic'
did: string did: string
handle: string handle: string
displayName?: string displayName?: string
@ -29,21 +18,22 @@ export interface ProfileViewBasic {
viewer?: ViewerState viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[] labels?: ComAtprotoLabelDefs.Label[]
createdAt?: string createdAt?: string
verification?: VerificationState [k: string]: unknown
} }
const hashProfileViewBasic = 'profileViewBasic' export function isProfileViewBasic(v: unknown): v is ProfileViewBasic {
return (
export function isProfileViewBasic<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashProfileViewBasic) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileViewBasic'
)
} }
export function validateProfileViewBasic<V>(v: V) { export function validateProfileViewBasic(v: unknown): ValidationResult {
return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic) return lexicons.validate('app.bsky.actor.defs#profileViewBasic', v)
} }
export interface ProfileView { export interface ProfileView {
$type?: 'app.bsky.actor.defs#profileView'
did: string did: string
handle: string handle: string
displayName?: string displayName?: string
@ -54,21 +44,22 @@ export interface ProfileView {
createdAt?: string createdAt?: string
viewer?: ViewerState viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[] labels?: ComAtprotoLabelDefs.Label[]
verification?: VerificationState [k: string]: unknown
} }
const hashProfileView = 'profileView' export function isProfileView(v: unknown): v is ProfileView {
return (
export function isProfileView<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashProfileView) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileView'
)
} }
export function validateProfileView<V>(v: V) { export function validateProfileView(v: unknown): ValidationResult {
return validate<ProfileView & V>(v, id, hashProfileView) return lexicons.validate('app.bsky.actor.defs#profileView', v)
} }
export interface ProfileViewDetailed { export interface ProfileViewDetailed {
$type?: 'app.bsky.actor.defs#profileViewDetailed'
did: string did: string
handle: string handle: string
displayName?: string displayName?: string
@ -85,56 +76,63 @@ export interface ProfileViewDetailed {
viewer?: ViewerState viewer?: ViewerState
labels?: ComAtprotoLabelDefs.Label[] labels?: ComAtprotoLabelDefs.Label[]
pinnedPost?: ComAtprotoRepoStrongRef.Main pinnedPost?: ComAtprotoRepoStrongRef.Main
verification?: VerificationState [k: string]: unknown
} }
const hashProfileViewDetailed = 'profileViewDetailed' export function isProfileViewDetailed(v: unknown): v is ProfileViewDetailed {
return (
export function isProfileViewDetailed<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashProfileViewDetailed) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileViewDetailed'
)
} }
export function validateProfileViewDetailed<V>(v: V) { export function validateProfileViewDetailed(v: unknown): ValidationResult {
return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed) return lexicons.validate('app.bsky.actor.defs#profileViewDetailed', v)
} }
export interface ProfileAssociated { export interface ProfileAssociated {
$type?: 'app.bsky.actor.defs#profileAssociated'
lists?: number lists?: number
feedgens?: number feedgens?: number
starterPacks?: number starterPacks?: number
labeler?: boolean labeler?: boolean
chat?: ProfileAssociatedChat chat?: ProfileAssociatedChat
[k: string]: unknown
} }
const hashProfileAssociated = 'profileAssociated' export function isProfileAssociated(v: unknown): v is ProfileAssociated {
return (
export function isProfileAssociated<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashProfileAssociated) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileAssociated'
)
} }
export function validateProfileAssociated<V>(v: V) { export function validateProfileAssociated(v: unknown): ValidationResult {
return validate<ProfileAssociated & V>(v, id, hashProfileAssociated) return lexicons.validate('app.bsky.actor.defs#profileAssociated', v)
} }
export interface ProfileAssociatedChat { export interface ProfileAssociatedChat {
$type?: 'app.bsky.actor.defs#profileAssociatedChat'
allowIncoming: 'all' | 'none' | 'following' | (string & {}) allowIncoming: 'all' | 'none' | 'following' | (string & {})
[k: string]: unknown
} }
const hashProfileAssociatedChat = 'profileAssociatedChat' export function isProfileAssociatedChat(
v: unknown,
export function isProfileAssociatedChat<V>(v: V) { ): v is ProfileAssociatedChat {
return is$typed(v, id, hashProfileAssociatedChat) return (
isObj(v) &&
hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#profileAssociatedChat'
)
} }
export function validateProfileAssociatedChat<V>(v: V) { export function validateProfileAssociatedChat(v: unknown): ValidationResult {
return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat) 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. */ /** Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests. */
export interface ViewerState { export interface ViewerState {
$type?: 'app.bsky.actor.defs#viewerState'
muted?: boolean muted?: boolean
mutedByList?: AppBskyGraphDefs.ListViewBasic mutedByList?: AppBskyGraphDefs.ListViewBasic
blockedBy?: boolean blockedBy?: boolean
@ -143,197 +141,168 @@ export interface ViewerState {
following?: string following?: string
followedBy?: string followedBy?: string
knownFollowers?: KnownFollowers knownFollowers?: KnownFollowers
[k: string]: unknown
} }
const hashViewerState = 'viewerState' export function isViewerState(v: unknown): v is ViewerState {
return (
export function isViewerState<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashViewerState) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#viewerState'
)
} }
export function validateViewerState<V>(v: V) { export function validateViewerState(v: unknown): ValidationResult {
return validate<ViewerState & V>(v, id, hashViewerState) return lexicons.validate('app.bsky.actor.defs#viewerState', v)
} }
/** The subject's followers whom you also follow */ /** The subject's followers whom you also follow */
export interface KnownFollowers { export interface KnownFollowers {
$type?: 'app.bsky.actor.defs#knownFollowers'
count: number count: number
followers: ProfileViewBasic[] followers: ProfileViewBasic[]
[k: string]: unknown
} }
const hashKnownFollowers = 'knownFollowers' export function isKnownFollowers(v: unknown): v is KnownFollowers {
return (
export function isKnownFollowers<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashKnownFollowers) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#knownFollowers'
)
} }
export function validateKnownFollowers<V>(v: V) { export function validateKnownFollowers(v: unknown): ValidationResult {
return validate<KnownFollowers & V>(v, id, hashKnownFollowers) return lexicons.validate('app.bsky.actor.defs#knownFollowers', v)
}
/** 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 type Preferences = ( export type Preferences = (
| $Typed<AdultContentPref> | AdultContentPref
| $Typed<ContentLabelPref> | ContentLabelPref
| $Typed<SavedFeedsPref> | SavedFeedsPref
| $Typed<SavedFeedsPrefV2> | SavedFeedsPrefV2
| $Typed<PersonalDetailsPref> | PersonalDetailsPref
| $Typed<FeedViewPref> | FeedViewPref
| $Typed<ThreadViewPref> | ThreadViewPref
| $Typed<InterestsPref> | InterestsPref
| $Typed<MutedWordsPref> | MutedWordsPref
| $Typed<HiddenPostsPref> | HiddenPostsPref
| $Typed<BskyAppStatePref> | BskyAppStatePref
| $Typed<LabelersPref> | LabelersPref
| $Typed<PostInteractionSettingsPref> | { $type: string; [k: string]: unknown }
| { $type: string }
)[] )[]
export interface AdultContentPref { export interface AdultContentPref {
$type?: 'app.bsky.actor.defs#adultContentPref'
enabled: boolean enabled: boolean
[k: string]: unknown
} }
const hashAdultContentPref = 'adultContentPref' export function isAdultContentPref(v: unknown): v is AdultContentPref {
return (
export function isAdultContentPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashAdultContentPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#adultContentPref'
)
} }
export function validateAdultContentPref<V>(v: V) { export function validateAdultContentPref(v: unknown): ValidationResult {
return validate<AdultContentPref & V>(v, id, hashAdultContentPref) return lexicons.validate('app.bsky.actor.defs#adultContentPref', v)
} }
export interface ContentLabelPref { export interface ContentLabelPref {
$type?: 'app.bsky.actor.defs#contentLabelPref'
/** Which labeler does this preference apply to? If undefined, applies globally. */ /** Which labeler does this preference apply to? If undefined, applies globally. */
labelerDid?: string labelerDid?: string
label: string label: string
visibility: 'ignore' | 'show' | 'warn' | 'hide' | (string & {}) visibility: 'ignore' | 'show' | 'warn' | 'hide' | (string & {})
[k: string]: unknown
} }
const hashContentLabelPref = 'contentLabelPref' export function isContentLabelPref(v: unknown): v is ContentLabelPref {
return (
export function isContentLabelPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashContentLabelPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#contentLabelPref'
)
} }
export function validateContentLabelPref<V>(v: V) { export function validateContentLabelPref(v: unknown): ValidationResult {
return validate<ContentLabelPref & V>(v, id, hashContentLabelPref) return lexicons.validate('app.bsky.actor.defs#contentLabelPref', v)
} }
export interface SavedFeed { export interface SavedFeed {
$type?: 'app.bsky.actor.defs#savedFeed'
id: string id: string
type: 'feed' | 'list' | 'timeline' | (string & {}) type: 'feed' | 'list' | 'timeline' | (string & {})
value: string value: string
pinned: boolean pinned: boolean
[k: string]: unknown
} }
const hashSavedFeed = 'savedFeed' export function isSavedFeed(v: unknown): v is SavedFeed {
return (
export function isSavedFeed<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashSavedFeed) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeed'
)
} }
export function validateSavedFeed<V>(v: V) { export function validateSavedFeed(v: unknown): ValidationResult {
return validate<SavedFeed & V>(v, id, hashSavedFeed) return lexicons.validate('app.bsky.actor.defs#savedFeed', v)
} }
export interface SavedFeedsPrefV2 { export interface SavedFeedsPrefV2 {
$type?: 'app.bsky.actor.defs#savedFeedsPrefV2'
items: SavedFeed[] items: SavedFeed[]
[k: string]: unknown
} }
const hashSavedFeedsPrefV2 = 'savedFeedsPrefV2' export function isSavedFeedsPrefV2(v: unknown): v is SavedFeedsPrefV2 {
return (
export function isSavedFeedsPrefV2<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashSavedFeedsPrefV2) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeedsPrefV2'
)
} }
export function validateSavedFeedsPrefV2<V>(v: V) { export function validateSavedFeedsPrefV2(v: unknown): ValidationResult {
return validate<SavedFeedsPrefV2 & V>(v, id, hashSavedFeedsPrefV2) return lexicons.validate('app.bsky.actor.defs#savedFeedsPrefV2', v)
} }
export interface SavedFeedsPref { export interface SavedFeedsPref {
$type?: 'app.bsky.actor.defs#savedFeedsPref'
pinned: string[] pinned: string[]
saved: string[] saved: string[]
timelineIndex?: number timelineIndex?: number
[k: string]: unknown
} }
const hashSavedFeedsPref = 'savedFeedsPref' export function isSavedFeedsPref(v: unknown): v is SavedFeedsPref {
return (
export function isSavedFeedsPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashSavedFeedsPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#savedFeedsPref'
)
} }
export function validateSavedFeedsPref<V>(v: V) { export function validateSavedFeedsPref(v: unknown): ValidationResult {
return validate<SavedFeedsPref & V>(v, id, hashSavedFeedsPref) return lexicons.validate('app.bsky.actor.defs#savedFeedsPref', v)
} }
export interface PersonalDetailsPref { export interface PersonalDetailsPref {
$type?: 'app.bsky.actor.defs#personalDetailsPref'
/** The birth date of account owner. */ /** The birth date of account owner. */
birthDate?: string birthDate?: string
[k: string]: unknown
} }
const hashPersonalDetailsPref = 'personalDetailsPref' export function isPersonalDetailsPref(v: unknown): v is PersonalDetailsPref {
return (
export function isPersonalDetailsPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashPersonalDetailsPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#personalDetailsPref'
)
} }
export function validatePersonalDetailsPref<V>(v: V) { export function validatePersonalDetailsPref(v: unknown): ValidationResult {
return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref) return lexicons.validate('app.bsky.actor.defs#personalDetailsPref', v)
} }
export interface FeedViewPref { export interface FeedViewPref {
$type?: 'app.bsky.actor.defs#feedViewPref'
/** The URI of the feed, or an identifier which describes the feed. */ /** The URI of the feed, or an identifier which describes the feed. */
feed: string feed: string
/** Hide replies in the feed. */ /** Hide replies in the feed. */
@ -346,20 +315,22 @@ export interface FeedViewPref {
hideReposts?: boolean hideReposts?: boolean
/** Hide quote posts in the feed. */ /** Hide quote posts in the feed. */
hideQuotePosts?: boolean hideQuotePosts?: boolean
[k: string]: unknown
} }
const hashFeedViewPref = 'feedViewPref' export function isFeedViewPref(v: unknown): v is FeedViewPref {
return (
export function isFeedViewPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashFeedViewPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#feedViewPref'
)
} }
export function validateFeedViewPref<V>(v: V) { export function validateFeedViewPref(v: unknown): ValidationResult {
return validate<FeedViewPref & V>(v, id, hashFeedViewPref) return lexicons.validate('app.bsky.actor.defs#feedViewPref', v)
} }
export interface ThreadViewPref { export interface ThreadViewPref {
$type?: 'app.bsky.actor.defs#threadViewPref'
/** Sorting mode for threads. */ /** Sorting mode for threads. */
sort?: sort?:
| 'oldest' | 'oldest'
@ -370,39 +341,43 @@ export interface ThreadViewPref {
| (string & {}) | (string & {})
/** Show followed users at the top of all replies. */ /** Show followed users at the top of all replies. */
prioritizeFollowedUsers?: boolean prioritizeFollowedUsers?: boolean
[k: string]: unknown
} }
const hashThreadViewPref = 'threadViewPref' export function isThreadViewPref(v: unknown): v is ThreadViewPref {
return (
export function isThreadViewPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashThreadViewPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#threadViewPref'
)
} }
export function validateThreadViewPref<V>(v: V) { export function validateThreadViewPref(v: unknown): ValidationResult {
return validate<ThreadViewPref & V>(v, id, hashThreadViewPref) return lexicons.validate('app.bsky.actor.defs#threadViewPref', v)
} }
export interface InterestsPref { export interface InterestsPref {
$type?: 'app.bsky.actor.defs#interestsPref'
/** A list of tags which describe the account owner's interests gathered during onboarding. */ /** A list of tags which describe the account owner's interests gathered during onboarding. */
tags: string[] tags: string[]
[k: string]: unknown
} }
const hashInterestsPref = 'interestsPref' export function isInterestsPref(v: unknown): v is InterestsPref {
return (
export function isInterestsPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashInterestsPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#interestsPref'
)
} }
export function validateInterestsPref<V>(v: V) { export function validateInterestsPref(v: unknown): ValidationResult {
return validate<InterestsPref & V>(v, id, hashInterestsPref) return lexicons.validate('app.bsky.actor.defs#interestsPref', v)
} }
export type MutedWordTarget = 'content' | 'tag' | (string & {}) export type MutedWordTarget = 'content' | 'tag' | (string & {})
/** A word that the account owner has muted. */ /** A word that the account owner has muted. */
export interface MutedWord { export interface MutedWord {
$type?: 'app.bsky.actor.defs#mutedWord'
id?: string id?: string
/** The muted word itself. */ /** The muted word itself. */
value: string value: string
@ -412,165 +387,148 @@ export interface MutedWord {
actorTarget: 'all' | 'exclude-following' | (string & {}) actorTarget: 'all' | 'exclude-following' | (string & {})
/** The date and time at which the muted word will expire and no longer be applied. */ /** The date and time at which the muted word will expire and no longer be applied. */
expiresAt?: string expiresAt?: string
[k: string]: unknown
} }
const hashMutedWord = 'mutedWord' export function isMutedWord(v: unknown): v is MutedWord {
return (
export function isMutedWord<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashMutedWord) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#mutedWord'
)
} }
export function validateMutedWord<V>(v: V) { export function validateMutedWord(v: unknown): ValidationResult {
return validate<MutedWord & V>(v, id, hashMutedWord) return lexicons.validate('app.bsky.actor.defs#mutedWord', v)
} }
export interface MutedWordsPref { export interface MutedWordsPref {
$type?: 'app.bsky.actor.defs#mutedWordsPref'
/** A list of words the account owner has muted. */ /** A list of words the account owner has muted. */
items: MutedWord[] items: MutedWord[]
[k: string]: unknown
} }
const hashMutedWordsPref = 'mutedWordsPref' export function isMutedWordsPref(v: unknown): v is MutedWordsPref {
return (
export function isMutedWordsPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashMutedWordsPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#mutedWordsPref'
)
} }
export function validateMutedWordsPref<V>(v: V) { export function validateMutedWordsPref(v: unknown): ValidationResult {
return validate<MutedWordsPref & V>(v, id, hashMutedWordsPref) return lexicons.validate('app.bsky.actor.defs#mutedWordsPref', v)
} }
export interface HiddenPostsPref { export interface HiddenPostsPref {
$type?: 'app.bsky.actor.defs#hiddenPostsPref'
/** A list of URIs of posts the account owner has hidden. */ /** A list of URIs of posts the account owner has hidden. */
items: string[] items: string[]
[k: string]: unknown
} }
const hashHiddenPostsPref = 'hiddenPostsPref' export function isHiddenPostsPref(v: unknown): v is HiddenPostsPref {
return (
export function isHiddenPostsPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashHiddenPostsPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#hiddenPostsPref'
)
} }
export function validateHiddenPostsPref<V>(v: V) { export function validateHiddenPostsPref(v: unknown): ValidationResult {
return validate<HiddenPostsPref & V>(v, id, hashHiddenPostsPref) return lexicons.validate('app.bsky.actor.defs#hiddenPostsPref', v)
} }
export interface LabelersPref { export interface LabelersPref {
$type?: 'app.bsky.actor.defs#labelersPref'
labelers: LabelerPrefItem[] labelers: LabelerPrefItem[]
[k: string]: unknown
} }
const hashLabelersPref = 'labelersPref' export function isLabelersPref(v: unknown): v is LabelersPref {
return (
export function isLabelersPref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashLabelersPref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#labelersPref'
)
} }
export function validateLabelersPref<V>(v: V) { export function validateLabelersPref(v: unknown): ValidationResult {
return validate<LabelersPref & V>(v, id, hashLabelersPref) return lexicons.validate('app.bsky.actor.defs#labelersPref', v)
} }
export interface LabelerPrefItem { export interface LabelerPrefItem {
$type?: 'app.bsky.actor.defs#labelerPrefItem'
did: string did: string
[k: string]: unknown
} }
const hashLabelerPrefItem = 'labelerPrefItem' export function isLabelerPrefItem(v: unknown): v is LabelerPrefItem {
return (
export function isLabelerPrefItem<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashLabelerPrefItem) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#labelerPrefItem'
)
} }
export function validateLabelerPrefItem<V>(v: V) { export function validateLabelerPrefItem(v: unknown): ValidationResult {
return validate<LabelerPrefItem & V>(v, id, hashLabelerPrefItem) 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. */ /** A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this. */
export interface BskyAppStatePref { export interface BskyAppStatePref {
$type?: 'app.bsky.actor.defs#bskyAppStatePref'
activeProgressGuide?: BskyAppProgressGuide activeProgressGuide?: BskyAppProgressGuide
/** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */ /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */
queuedNudges?: string[] queuedNudges?: string[]
/** Storage for NUXs the user has encountered. */ /** Storage for NUXs the user has encountered. */
nuxs?: Nux[] nuxs?: Nux[]
[k: string]: unknown
} }
const hashBskyAppStatePref = 'bskyAppStatePref' export function isBskyAppStatePref(v: unknown): v is BskyAppStatePref {
return (
export function isBskyAppStatePref<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashBskyAppStatePref) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#bskyAppStatePref'
)
} }
export function validateBskyAppStatePref<V>(v: V) { export function validateBskyAppStatePref(v: unknown): ValidationResult {
return validate<BskyAppStatePref & V>(v, id, hashBskyAppStatePref) 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. */ /** If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress. */
export interface BskyAppProgressGuide { export interface BskyAppProgressGuide {
$type?: 'app.bsky.actor.defs#bskyAppProgressGuide'
guide: string guide: string
[k: string]: unknown
} }
const hashBskyAppProgressGuide = 'bskyAppProgressGuide' export function isBskyAppProgressGuide(v: unknown): v is BskyAppProgressGuide {
return (
export function isBskyAppProgressGuide<V>(v: V) { isObj(v) &&
return is$typed(v, id, hashBskyAppProgressGuide) hasProp(v, '$type') &&
v.$type === 'app.bsky.actor.defs#bskyAppProgressGuide'
)
} }
export function validateBskyAppProgressGuide<V>(v: V) { export function validateBskyAppProgressGuide(v: unknown): ValidationResult {
return validate<BskyAppProgressGuide & V>(v, id, hashBskyAppProgressGuide) return lexicons.validate('app.bsky.actor.defs#bskyAppProgressGuide', v)
} }
/** A new user experiences (NUX) storage object */ /** A new user experiences (NUX) storage object */
export interface Nux { export interface Nux {
$type?: 'app.bsky.actor.defs#nux'
id: string id: string
completed: boolean completed: boolean
/** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */ /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */
data?: string data?: string
/** The date and time at which the NUX will expire and should be considered completed. */ /** The date and time at which the NUX will expire and should be considered completed. */
expiresAt?: string expiresAt?: string
[k: string]: unknown
} }
const hashNux = 'nux' export function isNux(v: unknown): v is Nux {
return (
export function isNux<V>(v: V) { isObj(v) && hasProp(v, '$type') && v.$type === 'app.bsky.actor.defs#nux'
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 validateNux(v: unknown): ValidationResult {
return lexicons.validate('app.bsky.actor.defs#nux', v)
}

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY * GENERATED CODE - DO NOT MODIFY
*/ */
import { HeadersMap, XRPCError } from '@atproto/xrpc' 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 { CID } from 'multiformats/cid'
import { validate as _validate } from '../../../../lexicons' import * as AppBskyActorDefs from './defs'
import {
type $Typed,
is$typed as _is$typed,
type OmitKey,
} from '../../../../util'
import type * as AppBskyActorDefs from './defs.js'
const is$typed = _is$typed,
validate = _validate
const id = 'app.bsky.actor.getPreferences'
export interface QueryParams {} export interface QueryParams {}
@ -22,6 +14,7 @@ export type InputSchema = undefined
export interface OutputSchema { export interface OutputSchema {
preferences: AppBskyActorDefs.Preferences preferences: AppBskyActorDefs.Preferences
[k: string]: unknown
} }
export interface CallOptions { export interface CallOptions {

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY * GENERATED CODE - DO NOT MODIFY
*/ */
import { HeadersMap, XRPCError } from '@atproto/xrpc' 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 { CID } from 'multiformats/cid'
import { validate as _validate } from '../../../../lexicons' import * as AppBskyActorDefs from './defs'
import {
type $Typed,
is$typed as _is$typed,
type OmitKey,
} from '../../../../util'
import type * as AppBskyActorDefs from './defs.js'
const is$typed = _is$typed,
validate = _validate
const id = 'app.bsky.actor.getProfile'
export interface QueryParams { export interface QueryParams {
/** Handle or DID of account to fetch profile of. */ /** Handle or DID of account to fetch profile of. */

View File

@ -2,19 +2,11 @@
* GENERATED CODE - DO NOT MODIFY * GENERATED CODE - DO NOT MODIFY
*/ */
import { HeadersMap, XRPCError } from '@atproto/xrpc' 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 { CID } from 'multiformats/cid'
import { validate as _validate } from '../../../../lexicons' import * as AppBskyActorDefs from './defs'
import {
type $Typed,
is$typed as _is$typed,
type OmitKey,
} from '../../../../util'
import type * as AppBskyActorDefs from './defs.js'
const is$typed = _is$typed,
validate = _validate
const id = 'app.bsky.actor.getProfiles'
export interface QueryParams { export interface QueryParams {
actors: string[] actors: string[]
@ -24,6 +16,7 @@ export type InputSchema = undefined
export interface OutputSchema { export interface OutputSchema {
profiles: AppBskyActorDefs.ProfileViewDetailed[] profiles: AppBskyActorDefs.ProfileViewDetailed[]
[k: string]: unknown
} }
export interface CallOptions { export interface CallOptions {

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